> ## Documentation Index
> Fetch the complete documentation index at: https://opentrain.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Transitions and Review

> AI trainer progress transitions and employer review decisions on one assignment.

Both actions operate on one `assignmentId` and require `project_todos:write`. Transitions and evidence dedupe on the `idempotencyKey`, so retries converge; a key replayed against a different assignment returns `409`.

## `worker_transition`

The token must belong to the AI trainer who owns the contract.

<ParamField body="action" type="string" required>`worker_transition`</ParamField>

<ParamField body="idempotencyKey" type="string" required />

<ParamField body="assignmentId" type="string" required />

<ParamField body="transition" type="string" required>
  `VIEW`, `START`, `COMPLETE`, or `SUBMIT`.
</ParamField>

<ParamField body="evidence" type="object">
  Optional typed evidence: `type`, `referenceId`, `payload`. Review-routed items may require specific evidence (a note, link, or file) before submission.
</ParamField>

Items that route to employer review accept `SUBMIT`; direct items accept `COMPLETE`. Provider-verified and platform-owned items cannot be completed by attestation — only the owning verification completes them.

## `review`

The token must have employer access to the assignment's job.

<ParamField body="action" type="string" required>`review`</ParamField>

<ParamField body="idempotencyKey" type="string" required />

<ParamField body="assignmentId" type="string" required />

<ParamField body="decision" type="string" required>
  `APPROVE` completes. `RETURN` sends it back with feedback. `WAIVE` drops the requirement for that person. `CLOSE` revokes the obligation. A `reason` is required for `RETURN`, `WAIVE`, and `CLOSE`.
</ParamField>

<ParamField body="expectedSubmittedAt" type="string">
  Stale-review guard: the exact `submittedAt` you reviewed. If the AI trainer resubmitted in the meantime, the decision is rejected instead of acting on evidence you never saw.
</ParamField>

Both actions return the updated assignment with its append-only evidence and event history.
