Agent Plan-mode

Status: supported — one Implementation handoff option (alongside OpenSpec).

Use Agent Plan-mode when you want your editor’s Plan mode (Cursor Plan via Shift+Tab, Codex /plan, Claude Code plan permission / /plan). AuthRight writes a Binding package under .authright/changes/<dir>/agent-plan/. In Plan mode the host reads that package plus the application repository and authors a host execution plan; user Build executes that host plan. AuthRight does not switch Plan mode for you and does not edit application source.

/auth:to-openspec and /auth:to-plan are two handoff commands—pick one. Prefer OpenSpec when OpenSpec is installed and you want that path.

When to export

After decisions are accepted, contract.md is filled, and request-match has passed:

Terminal
$authright change <id> --ready
$authright request-match <id>
# Switch the chat session to Plan mode first, then:
$authright to-plan <id> --phase prepare # claims/feed + skeleton
# Host elaborates agent-plan/requirements.md (observable Scenarios + concrete paths)
$authright to-plan <id> --phase check
$authright to-plan <id> --phase finalize # DECIDED → EXPORTED
# Then CreatePlan / Build tracing the elaborated Binding

Chat equivalent (after init): /auth:to-plan (Cursor /auth-to-plan, Claude /auth:to-plan, Codex $authright-to-plan). Omit the change id when it is already in the chat context; pass AUTH-YYYY-NNNN only when needed.

Plan mode first (chat): when the change is ready to export, the skill stops if you are not already in Plan mode—switch, then run the command again. If Decide work is still open, it finishes that first. Terminal authright to-plan can write the package for scripts; in chat, stay in Plan mode.

This writes .authright/changes/<dir>/agent-plan/ including:

  • authright-feed.md / authright-claims.yaml — Binding-expansion inventory for host elaboration (same family as OpenSpec prepare)
  • handoff.yaml — Agent Plan-mode handoff marker, change id, and skeleton_requirements_digest
  • plan-seed.md — instructions for Plan mode (locks stay fixed; locked inputs; required host-plan outline; short change snapshot; repo recon; thickness bar)
  • tasks.md — milestone coverage index (short theme checkboxes; not SCIM/field SoT — consult requirements.md per milestone)
  • constraints.md — hard constraints (same role as OpenSpec design.md)
  • requirements.md — SHALL / WHEN / THEN checks including full SCIM/admin contracts (same role as OpenSpec specs/)

to-plan is elaborate-first (like OpenSpec propose-first, without OpenSpec CLI): prepare writes claims/feed + skeleton; you rewrite requirements.md into observable Scenario WHEN/THEN with at least two distinct concrete API/UI paths; --phase check soft-fails (exit 1) until the elaboration gate and claim coverage pass; --phase finalize fail-closes and moves DECIDED → EXPORTED. Invalid --phase values fail closed (no silent rematerialize).

Flags: --force-tasks regenerates tasks.md; --force-requirements regenerates the requirements skeleton for re-elaboration (default preserves elaborated requirements and non-empty constraints.md on re-prepare); --force overwrites foreign/unknown agent-plan/ ownership.

After finalize, treat agent-plan/ as the Binding package for obligations and review—not Decision Package YAML. Author a host execution plan that traces that Binding (do not invent a competing API tree at Build). The host plan MUST include a short Binding consult section and MUST NOT label agent-plan/*.md as Source of truth. If you also ran to-openspec, both packages may exist; pick one for this session (Plan Build or OpenSpec apply).

Does not need OpenSpec. Does not write openspec/changes/.

After export

Stay in Plan mode, feed from plan-seed.md (and @ sibling files), read the repository, produce the host plan, Build/approve that plan, implement, then:

Terminal
$authright review <id>
# or in chat: /auth:review
# (or /auth:review AUTH-YYYY-NNNN)

Review binds against the Binding package (agent-plan/), not against the host plan file.

On this page