plan
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese/plan
/plan
Write a plan file for the current task. Requires /orient to have run first.
为当前任务编写计划文件。需先执行/orient步骤。
Sequence
流程
- Check prerequisites. Confirm a worktree exists and /orient has identified the task. If not, stop and tell the user.
- Brainstorm (one round). Invoke with the task description. One round only — capture direction, do not iterate.
/brainstorming - Read the template. Read from the repo root.
ai-workspace/plans/TEMPLATE.md - Write the plan. Create with ALL template fields:
ai-workspace/plans/<branch-slug>.md
| Field | How to fill |
|---|---|
| Branch | Current branch name |
| Created | Today's date (YYYY-MM-DD) |
| Status | |
| 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 |
| Outcomes & Learnings | Leave empty — populated by /archive |
- 检查前置条件:确认工作树已存在且/orient已识别任务。若未满足,停止操作并告知用户。
- 头脑风暴(一轮):调用/brainstorming工具并传入任务描述。仅进行一轮——确定方向即可,无需迭代。
- 读取模板:从仓库根目录读取文件。
ai-workspace/plans/TEMPLATE.md - 编写计划:创建文件,需填充所有模板字段:
ai-workspace/plans/<branch-slug>.md
| 字段 | 填充方式 |
|---|---|
| Branch | 当前分支名称 |
| Created | 今日日期(YYYY-MM-DD格式) |
| Status | |
| Threat model | 参考下方选择表 |
| Scope ceiling | 保留模板默认值(软限制400/6,硬限制800/10) |
| Task | 1-3句话:说明任务内容及目的 |
| Steps | 具体实施步骤的复选框列表 |
| Confidence Scaffold | |
| Outcomes & Learnings | 留空——由/archive步骤填充 |
Threat model selection
威胁模型选择
| Signal | Model |
|---|---|
| Internal tooling, refactor, docs, tests, config | |
| Auth, secrets, input validation, CI, hooks, permissions | |
| Unsure | |
| 信号 | 模型 |
|---|---|
| 内部工具、重构、文档、测试、配置 | |
| 认证、密钥、输入验证、CI、钩子、权限 | |
| 不确定 | |
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.
- 不得评审计划——评审为/review(第4步)的内容。
- 不得开始实施——计划即为交付成果。
- 不得跳过任何模板字段。
- 若头脑风暴发现任务范围仅为一句话,需告知用户并跳过此步骤。
- 范围上限值固定——不得修改。
- 步骤必须是带复选框的具体操作,而非模糊阶段。
- 需明确包含测试步骤。
Output
输出
After writing, report:
Plan written: ai-workspace/plans/<name>.md
Threat model: advisory|adversarial
Steps: <count>
Next step: /review编写完成后,输出如下内容:
Plan written: ai-workspace/plans/<name>.md
Threat model: advisory|adversarial
Steps: <count>
Next step: /review