/plan
Write a plan file for the current task. Requires /orient to have run first.
Sequence
- Check prerequisites. Confirm a worktree exists and /orient has identified the task. If not, stop and tell the user.
- Brainstorm (one round). Invoke
/brainstormingwith the task description. One round only — capture direction, do not iterate. - Read the template. Read
ai-workspace/plans/TEMPLATE.mdfrom the repo root. - Write the plan. Create
ai-workspace/plans/<branch-slug>.mdwith ALL template fields:
| Field | How to fill |
|---|---|
| Branch | Current branch name |
| Target | Branch to merge into. Default: main. Set to parent branch if stacking on a feature branch. /ship reads this field. |
| Created | Today's date (YYYY-MM-DD) |
| Status | In Progress |
| Threat model | See selection table below |
| Scope ceiling | Keep template defaults (400/6 soft, 800/10 hard) |
| Task | 1-3 sentences: what and why |
| Steps | Checkbox list of concrete implementation steps |
| Confidence Scaffold | Required for adversarial. Recommended for complex advisory. |
| Outcomes & Learnings | Leave empty — populated by /archive |
Threat model selection
| Signal | Model |
|---|---|
| Internal tooling, refactor, docs, tests, config | advisory |
| Auth, secrets, input validation, CI, hooks, permissions | adversarial |
| Unsure | adversarial |
Guardrails
- Do NOT review the plan. That is /review (Step 4).
- Do NOT start implementation. The plan is the deliverable.
- Do NOT skip any template field.
- If brainstorming reveals the task is one-sentence scope, say so and skip.
- Scope ceiling values are fixed — do not change them.
- Steps must be concrete actions with checkboxes, not vague phases.
- Include test steps explicitly. When tests need a separate author (TDD contract), list them as distinct tasks from implementation so /build dispatches test-writer and implementer separately.
Output
After writing, report:
Plan written: ai-workspace/plans/<name>.md
Threat model: advisory|adversarial
Steps: <count>
Next step: /review