opentrain lms retraining is the case-orchestration layer for individualized quality remediation. Course authoring, Native Forms, Preview, publishing, grading, result release, and RETURN remain in their existing LMS and Project To-do commands.
Individualized retraining requires
@opentrain-ai/cli 0.9.0 or newer.lms:read and lms:write:
Discover the live LMS contract
Start every agent run with:agentSurfaces LMS family status and each operation’s authorized value. Then read the LMS response’s retraining, assessments, course, lessonContent, assets, preview, and mastery sections before generating content or mutations. Do not hard-code question types, limits, or retry rules from an older run.
If either capability command reports disabled, rollout_gated, or unauthorized, stop and return that structured result.
Use JSON as the agent protocol
Use--json for automation. The CLI writes exactly one JSON document to stdout and does not prompt. A failure exits nonzero with this shape:
error.code, error.status, and structured error.details, not the message. Reuse the same --key after a transport failure; do not generate a new key for the retry.
Register a published skill-gap module
Create a draft case
Prefer a stable contract ID:--worker-name only when you do not have a contract ID. It must resolve to exactly one active contract.
For a wall-clock deadline, replace the offset with all three flags:
--body-json-file. Do not mix it with field flags.
Update a draft case
Only aDRAFT case can be edited. Read the latest case revision, then apply one revision-fenced patch:
--patch-json for a small inline patch. When switching the due-date channel, clear the old channel and set the new one in the same patch so the case still has exactly one due rule.
Preview and plan
Use the existingopentrain lms preview … commands to test the worker renderer without creating an assignment.
Then generate the assignment plan:
Confirm the assignment
--confirm-assign records the employer-approved mutation; it does not let an agent approve its own plan. The write creates exactly one canonical Project To-do assignment. If the receipt is stale or expired, run plan again and obtain approval for the new result.
Monitor and close
--all follows bounded cursor pages. Before reporting a complete audit, confirm the returned collection is complete; otherwise persist its resume cursor and continue.
Use existing LMS status, run-history, employer-review, grading, result-release, and Project To-do RETURN commands for the live assignment.
Close the case only when its requested outcome agrees with that canonical assignment:
opentrain lms retraining <command> --help for action-specific flags and safety rules.
See Manage individualized retraining with an agent for the complete authoring, Preview, approval, assignment, grading, and retry sequence.