planning

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Planning

规划

Core Principle

核心原则

Context window = RAM (volatile, limited)
Filesystem     = Disk (persistent, unlimited)
→ Anything important gets written to disk.
Planning tokens are cheaper than implementation tokens. Front-load thinking; scale effort to complexity.
上下文窗口 = 内存(易失性、有限)
文件系统     = 磁盘(持久性、无限)
→ 任何重要内容都应写入磁盘。
规划所用的token成本低于实施所用的token成本。提前开展思考工作;根据复杂度调整投入力度。

Procedure

实施步骤

  1. Run the Goal Quality Gate on the stated goal.
  2. Pick the path per When to Plan: full plan, flat list, or skip.
  3. For a full plan, scaffold
    .plan/
    via init-plan.sh.
  4. Write the plan per the Plan Template, applying the quality, sizing, and task rules.
  5. Run the Verify checklist against the finished plan.
  6. Offer the Execution Handoff choice.
  1. 对既定目标执行目标质量审核关卡
  2. 根据何时需要规划选择合适路径:完整规划、扁平列表或跳过规划。
  3. 若需完整规划,通过init-plan.sh搭建
    .plan/
    目录结构。
  4. 遵循规划模板编写规划,同时应用质量、规模和任务规则。
  5. 针对完成的规划执行验证检查清单。
  6. 提供执行交接选项。

Goal Quality Gate

目标质量审核关卡

Run this gate before When to Plan below — a weak goal wastes tokens on any path and produces an unverifiable result. Answer these five questions first:
  1. What concrete thing will be true when this is done? (named artifact, system state, or user-visible behavior — not "improve X" or "investigate Y")
  2. What evidence will prove it? (specific test, command, screenshot, metric — not "looks right")
  3. What quantitative or binary threshold defines success? (p95 < 250ms;
    npm run test:checkout
    passes;
    gh pr view 123
    shows no unresolved threads)
  4. What scope boundaries matter? (which files/modules/environments are in scope; which are explicitly not)
  5. What should cause the agent to stop and ask? (which decisions belong to the user, not Claude)
Then apply the Means test to the answer to question 1: if the implementation changed, would this still be the goal? If not, what was named is a Means, not the Objective. A request that supplies only an approach ("move the retry logic out of the controller into a job") passes all five questions while anchoring the plan to a mechanism -- and when the mechanism turns out wrong there is nothing left to re-derive the plan from. Recover the Objective from why the approach was proposed, keep the approach as the current best route, and record it as a decision rather than as the goal.
Reject pure-activity goals ("make progress", "keep investigating", "improve things") -- repair them into a verifiable outcome or ask one concise clarification before planning. Skip this gate only when the request already names a specific artifact AND a clear success signal in the user's own words -- the same choice-free cases listed under When to Plan below. Anything vaguer than that runs the gate.
在执行下方的何时需要规划之前先运行此关卡——目标不明确会浪费token,且无法产出可验证的结果。先回答以下五个问题:
  1. 完成后会实现哪些具体成果?(指定的工件、系统状态或用户可见行为——而非“改进X”或“调研Y”)
  2. 有哪些证据可以证明成果达成?(具体测试、命令、截图、指标——而非“看起来正确”)
  3. 成功的量化或二元阈值是什么?(p95 < 250ms;
    npm run test:checkout
    执行通过;
    gh pr view 123
    显示无未解决线程)
  4. 哪些范围边界至关重要?(哪些文件/模块/环境在范围内;哪些明确排除在外)
  5. 哪些情况会导致Agent停止并询问?(哪些决策属于用户,而非Claude)
然后对问题1的答案应用“目标-手段”测试:**如果实施方式改变,这个目标是否依然成立?**如果不成立,那么所提及的内容是手段,而非目标。仅提供方法的请求(如“将重试逻辑从控制器移到作业中”)虽然能通过所有五个问题,但会将规划锚定在特定机制上——当该机制被证明不可行时,将无法重新推导规划。从提出该方法的原因中还原目标,保留该方法作为当前最优路径,并将其记录为决策而非目标。
拒绝纯活动类目标(如“推进工作”“持续调研”“改进现状”)——将其修正为可验证的成果,或在规划前请求一个简洁的澄清。仅当请求已明确指定具体工件且用户自行表述了清晰的成功信号时,才可跳过此关卡——即下方何时需要规划中列出的无需选择的场景。任何更模糊的情况都需运行此关卡。

When to Plan

何时需要规划

Bias toward producing a plan. A thin plan for small work is mild ceremony; skipping a plan when one was warranted costs real time (reinvented decisions, lost unit boundaries, no IDed requirements to verify against). When unsure, write the plan.
  • Full plan (.plan/ directory): multi-file changes, new features, refactors, >5 tool calls
  • Flat list (inline checklist): 3-5 file changes, clear scope, no research -- a numbered task list in the conversation or a single progress.md, no .plan/ scaffolding
Skip planning only when ALL of these hold: the work is atomic (one commit, no unit boundaries worth breaking out); there are no KTDs (Key Technical Decisions: choices between approaches; each KTD becomes a Key Decisions entry in the plan -- if one exists, plan); the scope is self-evident from the request, with no boundaries worth pinning in writing; and no upstream artifact (brainstorm, incident report, deferred follow-up) needs traceability through this plan.
Stress test the "looks atomic" case. Many requests look atomic but hide design decisions. "Add caching to this endpoint" sounds atomic, but TTL, invalidation, cache-key shape, and backend selection are all KTDs -- write the plan. The same trap hides in "migrate package A to B" and "add rate limiting". Genuine skips are choice-free: "fix typo in README line 47", "rename
oldFn
to
newFn
across the repo"
, "bump lodash to 4.17.21" (unless breaking changes warrant a unit-by-unit migration).
When skipping the plan doc, work proceeds directly to execution (
/ia-work
in Claude Code) or to implementation, and any decisions made along the way land in the commit message or
docs/solutions/
if worth carrying forward.
倾向于制定规划。针对小型工作的简易规划只是轻微的流程仪式;而在需要规划时跳过规划则会浪费实际时间(重复决策、丢失单元边界、没有可验证的需求)。若不确定,就编写规划。
  • 完整规划(.plan/目录):多文件变更、新功能、重构、超过5次工具调用
  • 扁平列表(内联检查清单):3-5个文件变更、范围明确、无需调研——对话中的编号任务列表或单个progress.md文件,无需搭建.plan/目录结构
仅当以下所有条件都满足时才跳过规划:工作是原子性的(一次提交,无值得拆分的单元边界);不存在关键技术决策(KTDs)(不同方案间的选择;每个KTD都会成为规划中的“关键决策”条目——若存在KTD,则需规划);范围从请求中即可自明,无需书面明确边界;且无需通过此规划追溯上游工件(头脑风暴、事件报告、延迟跟进事项)。
严格检验“看似原子性”的情况。许多请求看似原子性,但实则隐藏设计决策。“为此端点添加缓存”听起来是原子性的,但TTL、失效策略、缓存键格式和后端选择都是KTD——需编写规划。同样的陷阱也存在于“将包A迁移到B”和“添加速率限制”这类请求中。真正可跳过规划的是无需选择的情况:“修复README第47行的拼写错误”“在整个仓库中将
oldFn
重命名为
newFn
“将lodash版本升级到4.17.21”(除非存在破坏性变更需要逐单元迁移)。
若跳过规划文档,工作将直接进入执行阶段(Claude Code中的
/ia-work
)或实施阶段,过程中做出的任何决策将记录在提交信息或
docs/solutions/
中(若值得留存)。

Planning Files

规划文件

Scaffold the
.plan/
directory with pre-populated templates using init-plan.sh:
bash
SKILL_DIR="<absolute path of the directory containing this SKILL.md>"
bash "$SKILL_DIR/scripts/init-plan.sh" "Feature Name"
Substitute the real absolute path before running; never execute the command with the angle-bracket placeholder. Anchor the call to
SKILL_DIR
rather than a bare
init-plan.sh
— a relative path resolves against the caller's working directory, not the skill, and breaks from a subdirectory or under a non-Claude harness.
This creates
.plan/
with the three pre-populated files below and adds
.plan/
to
.gitignore
.
.plan/
files are ephemeral working state -- do not commit them; old files are overwritten when starting a new feature. Within a multi-phase feature, use numbered intermediate files (
01-setup.md
,
02-phase1-complete.md
) to preserve state across phases.
docs/plans/
is the separate, committed home for a formal plan document;
.plan/
supports the work session.
FilePurposeUpdate When
.plan/task_plan.md
Phases, tasks, decisions, errorsAfter each phase
.plan/findings.md
Research, discoveries, code analysisAfter any discovery
.plan/progress.md
Session log, test results, files changedThroughout session
使用init-plan.sh搭建带有预填充模板的
.plan/
目录:
bash
SKILL_DIR="<包含此SKILL.md的目录绝对路径>"
bash "$SKILL_DIR/scripts/init-plan.sh" "功能名称"
运行前替换为真实的绝对路径;切勿使用尖括号占位符执行命令。将调用锚定到
SKILL_DIR
而非直接使用
init-plan.sh
——相对路径会根据调用者的工作目录解析,而非技能所在目录,在子目录或非Claude工具环境下会失效。
此命令会创建包含以下三个预填充文件的
.plan/
目录,并将
.plan/
添加到
.gitignore
中。
.plan/
文件是临时工作状态——请勿提交;启动新功能时会覆盖旧文件。对于多阶段功能,使用编号中间文件(
01-setup.md
02-phase1-complete.md
)来保留各阶段的状态。
docs/plans/
是独立的、已提交的正式规划文档存放处;
.plan/
用于支持工作会话。
文件用途更新时机
.plan/task_plan.md
阶段、任务、决策、错误信息每个阶段完成后
.plan/findings.md
调研结果、发现、代码分析任何发现产生后
.plan/progress.md
会话日志、测试结果、变更文件会话全程

Test Discovery (Existing Projects)

测试发现(已有项目)

For existing code, discover the test landscape before planning: find related test/spec files (
Glob("**/*test*")
,
Grep
), read the canonical test command from config (
package.json
scripts,
pytest.ini
,
phpunit.xml
, CI), and note coverage gaps -- the plan should extend existing test patterns, not introduce new frameworks. Skip for greenfield projects with no tests yet.
对于已有代码,在规划前先了解测试环境:找到相关测试/规范文件(
Glob("**/*test*")
Grep
),从配置文件中读取标准测试命令(
package.json
脚本、
pytest.ini
phpunit.xml
、CI配置),并记录覆盖率差距——规划应扩展现有测试模式,而非引入新框架。对于尚无测试的新项目可跳过此步骤。

Reference Implementations

参考实现

When target behavior is hard to describe but an existing implementation embodies it, cite that source as the spec and plan to reimplement its semantics -- source code is higher-fidelity than prose, docs, or screenshots. Record a
ref:
pointer in the plan so the implementer reads the source, not a summary. Full guidance in execution-and-methodology.md.
当目标行为难以描述但已有实现可作为参考时,将该源代码作为规范,并规划重新实现其语义——源代码比 prose、文档或截图更保真。在规划中记录
ref:
指针,以便实现者直接阅读源代码而非摘要。完整指南请参考execution-and-methodology.md

Plan Template

规划模板

markdown
undefined
markdown
undefined

Plan: [Feature/Task Name]

规划:[功能/任务名称]

Approach

方法

[1-3 sentences: what and why]
[1-3句话:做什么及原因]

Scope

范围

  • In: [what's included]
  • Out: [what's explicitly excluded]
  • 包含:[纳入的内容]
  • 排除:[明确排除的内容]

Global Constraints

全局约束

[Binds every phase: version floors; naming/format rules; platform limits; security/compatibility invariants. Exact spec values verbatim, never paraphrased. Every task inherits these. Omit if none.]
[约束所有阶段:最低版本要求;命名/格式规则;平台限制;安全/兼容性不变量。准确引用规范值,切勿意译。所有任务均继承这些约束。若无则省略。]

Key Decisions (review first)

关键决策(优先审阅)

[Decisions likeliest to change on review: data model shapes; new type/interface contracts; user-facing or UX flows. Per decision: choice, discarded alternative, one-line why. Listed first so review redirects design before mechanical work is planned around it; mechanical refactoring stays in the phases. Omit if no non-obvious choice was made.]
[最可能在审阅时变更的决策:数据模型形状;新类型/接口契约;用户可见或UX流程。每项决策需包含:选择的方案、被弃用的方案、一行原因说明。优先列出这些内容,以便在围绕机械工作制定规划前通过审阅调整设计;机械重构内容留在阶段部分。若无非显而易见的决策则省略。]

File Structure

文件结构

[ALL files created or modified, one-line responsibility each; locks decomposition before tasks are defined. Write for a zero-context engineer.]
FileActionResponsibility
path/to/file.ts
Create[what this file does]
path/to/existing.ts
Modify[what changes and why]
[所有创建或修改的文件,每行说明其职责;在定义任务前锁定分解方式。面向无上下文的工程师编写。]
文件操作职责
path/to/file.ts
创建[此文件的作用]
path/to/existing.ts
修改[变更内容及原因]

Next Step

下一步

[one line: the phase and task to resume on]
[一行:将继续的阶段和任务]

Phase 1: [Name]

阶段1:[名称]

Status: pending | in_progress | complete Files: [specific files, max 5-8 per phase] Posture: [test-first | characterization-first | external-delegate] Tasks:
  • [Verb-first atomic task] --
    path/to/file.ts
  • [Next task] Verify: [specific test: "POST /api/users → 201", not "test feature"] Exit: [clear done definition]
状态:待处理 | 进行中 | 已完成 文件:[具体文件,每个阶段最多5-8个] 姿态:[测试优先 | 特征优先 | 外部委托] 任务:
  • [动词开头的原子任务] --
    path/to/file.ts
  • [下一个任务] 验证:[具体测试:"POST /api/users → 201",而非"测试功能"] 退出条件:[明确的完成定义]

Phase 2: [Name]

阶段2:[名称]

...
...

Deferred to Implementation

延迟到实施阶段处理

  • [Things intentionally left unspecified -- details that depend on what you find in the code]
  • [有意未明确的内容——取决于代码中实际发现的细节]

Open Questions

未解决问题

  • [Max 3, only truly blocking unknowns]
undefined
  • [最多3个,仅包含真正阻塞的未知项]
undefined

Plan Quality Rules

规划质量规则

Keep phase state current. Changing a phase's
Status
also refreshes
## Next Step
. That one line is what the resume protocol reads after a compaction or a new session, so a stale
Next Step
is worse than none -- it resumes work that already happened.
No placeholders in tasks. Every task must contain actual code patterns, commands, or file paths. Forbid: "TBD", "TODO", "handle errors appropriately", "add validation", "implement as needed", "similar to above", "Similar to Task N", "See above." Tasks may be read out of order -- repeat the spec, code pattern, or file path in every task that needs it. A step that cannot be specified concretely needs further breakdown before it belongs in a plan.
Type-consistency check. After writing all tasks, scan for naming drift. If Task 3 says
clearLayers()
but Task 7 says
clearFullLayers()
, that's a bug in the plan. Function names, variable names, and file paths must be consistent across all tasks.
No gold-plating. Build exactly what the spec requires -- no features or "nice-to-haves" beyond it. Quote the exact spec requirements in the plan and flag any additions explicitly as scope expansion needing approval. Basic first implementations are acceptable -- most need 2-3 revision cycles anyway.
Front-load high-variance decisions. Order the plan document by how likely each part is to change on review, not by execution order -- the template's Key Decisions bracket defines what goes there; execution order still governs the phases themselves.
保持阶段状态更新。更改阶段的
Status
时也要更新
## 下一步
。这一行是压缩或新会话后恢复协议读取的内容,因此过时的
下一步
比没有更糟——它会恢复已完成的工作。
任务中无占位符。每个任务必须包含实际代码模式、命令或文件路径。禁止使用:"TBD"、"TODO"、"适当处理错误"、"添加验证"、"按需实现"、"与上文类似"、"与任务N类似"、"见上文"。任务可能会被无序读取——在每个需要的任务中重复规范、代码模式或文件路径。无法明确指定的步骤需要进一步分解后才能纳入规划。
类型一致性检查。编写完所有任务后,检查命名是否一致。如果任务3写的是
clearLayers()
但任务7写的是
clearFullLayers()
,这是规划中的错误。函数名、变量名和文件路径在所有任务中必须保持一致。
过度设计。严格按照规范要求构建——不添加规范之外的功能或“锦上添花”的内容。在规划中引用确切的规范要求,并明确标记任何超出范围的新增内容需获得批准。基础的初始实现是可接受的——大多数功能都需要2-3轮修订。
优先处理高方差决策。按照各部分在审阅时变更的可能性排序规划文档,而非按照执行顺序——模板中的关键决策部分定义了应放在此处的内容;执行顺序仍由阶段本身决定。

Phase Sizing Rules

阶段规模规则

Every phase must be context-safe:
  • Max 5-8 files touched
  • Max 2 dependencies on other phases
  • No single task exceeds ~2 hours of focused work -- if it would, split further
  • Fits in one focused session for a developer without external blockers
  • If a phase violates these → split it
  • Scope challenge: if the overall plan touches 8+ files or introduces 2+ new classes/services, challenge the scope. Ask: can this be split into smaller, independently shippable increments?
每个阶段必须上下文安全
  • 最多涉及5-8个文件
  • 最多依赖2个其他阶段
  • 单个任务的专注工作时间不超过约2小时——若超过,则进一步拆分
  • 适合开发者在无外部阻塞的情况下完成一个专注会话
  • 若阶段违反这些规则→拆分阶段
  • 范围挑战:如果整体规划涉及8个及以上文件或引入2个及以上新类/服务,需对范围提出质疑。询问:能否将其拆分为更小的、可独立交付的增量?

Task Decomposition

任务分解

Decompose by user-visible capability (vertical slices), not by technical layer, so each phase is independently demonstrable. Checkpoint every 2-3 tasks to catch integration drift early. Full guidance -- vertical slicing and the checkpoint system -- in execution-and-methodology.md.
按用户可见的能力(垂直切片)分解,而非按技术层,以便每个阶段都能独立演示。每2-3个任务设置一个检查点,尽早发现集成偏差。完整指南——垂直切片和检查点系统——请参考execution-and-methodology.md

Decision Authority

决策权限

Not every decision needs user input:
Claude decides (technical implementation): language, framework, architecture, libraries, file structure, naming conventions, test strategy, error handling approach, database schema details, API design patterns. Make the call, document the rationale in the plan.
User decides (experience-affecting): scope tradeoffs ("cut X to hit deadline?"), UX choices that change what users see or do, data model decisions that constrain future product options, anything where two valid paths lead to meaningfully different user outcomes.
Heuristic: If the decision changes what the user experiences, ask. If it changes how the code works, decide.
并非所有决策都需要用户输入:
Claude决策(技术实现):语言、框架、架构、库、文件结构、命名规范、测试策略、错误处理方法、数据库模式细节、API设计模式。做出决策,并在规划中记录理由。
用户决策(影响体验):范围权衡(“为了赶截止日期是否砍掉X?”)、改变用户所见所为的UX选择、限制未来产品选项的数据模型决策、任何两种有效路径会导致用户结果显著不同的情况。
启发式规则:如果决策改变用户体验,则询问用户。如果决策改变代码工作方式,则自行决定。

Clarifying Questions

澄清问题

Ask via AskUserQuestion (Claude Code; load with ToolSearch
select:AskUserQuestion
if not loaded) or request_user_input (Codex); fall back to numbered options in chat.
Scale to complexity:
  • Small task: 0-1 questions, assume reasonable defaults
  • Medium feature: 1-2 questions on critical unknowns
  • Large project: 3-5 questions (auth, data model, integrations, scope)
Only ask about decisions that fall in the "user decides" category above. Make reasonable assumptions for everything else.
通过AskUserQuestion(Claude Code;若未加载,使用ToolSearch
select:AskUserQuestion
加载)或request_user_input(Codex)提问;在聊天中可退而求其次使用编号选项。
根据复杂度调整提问数量:
  • 小型任务:0-1个问题,采用合理默认值
  • 中型功能:1-2个关于关键未知项的问题
  • 大型项目:3-5个问题(认证、数据模型、集成、范围)
仅询问属于上述“用户决策”范畴的问题。其他所有情况均采用合理假设。

Task Rules

任务规则

Write every task as if the implementer has zero context and questionable taste -- they cannot infer intent from conversation history, so everything must be in the plan.
  • Atomic: one action, 2-5 minutes to complete. "Write the failing test" is a step. "Implement the feature" is not.
  • Verb-first: "Add...", "Create...", "Refactor...", "Verify..."
  • Concrete: name specific files, endpoints, components. Include exact commands with expected output, code snippets, and file paths with line ranges for modifications.
  • Ordered: respect dependencies, sequential when needed
  • Verifiable: include at least one validation task per phase
  • Complete: do not defer test coverage, skip edge cases, or omit error handling to save time. The marginal cost of completeness during initial implementation is near-zero compared to retrofitting later.
编写每个任务时,假设实现者毫无上下文且品味存疑——他们无法从对话历史中推断意图,因此所有内容必须包含在规划中。
  • 原子性:一个动作,2-5分钟即可完成。“编写失败测试”是一个步骤。“实现功能”不是。
  • 动词开头:“添加...”、“创建...”、“重构...”、“验证...”
  • 具体性:指定具体文件、端点、组件。包含带有预期输出的确切命令、代码片段,以及修改的文件路径和行范围。
  • 有序性:尊重依赖关系,必要时按顺序执行
  • 可验证性:每个阶段至少包含一个验证任务
  • 完整性:不要为了节省时间而推迟测试覆盖、跳过边缘情况或省略错误处理。初始实现时保证完整性的边际成本几乎为零,远低于后续改造的成本。

Operational Patterns

操作模式

Context management rules, error protocol (3-attempt escalation), iterative plan refinement, the 5-question context check, and session-continuity/traceability conventions (numbered outputs, resume protocol, SHA and deviation notes) are in operational-patterns.md. Read when starting a multi-phase plan or resuming after a gap.
上下文管理规则、错误协议(3次尝试升级)、迭代规划细化、5问题上下文检查,以及会话连续性/可追溯性约定(编号输出、恢复协议、SHA和偏差说明)请参考operational-patterns.md。启动多阶段规划或间隔后恢复工作时请阅读。

Execution Posture Signals

执行姿态信号

Phases can carry optional metadata that shapes how
/ia-work
sequences implementation. Default is tests-after; opt in per phase via the header (
## Phase 2: Auth middleware [test-first]
):
test-first
(write failing test before implementation),
characterization-first
(capture existing behavior before changing it),
external-delegate
(mark units suitable for parallel/external execution). When to use each is in execution-and-methodology.md.
阶段可携带可选元数据,以影响
/ia-work
的实施顺序。默认是先实施后测试;可通过阶段头部选择启用(
## 阶段2:认证中间件 [test-first]
):
test-first
(先编写失败测试再实现)、
characterization-first
(在变更前捕获现有行为)、
external-delegate
(标记适合并行/外部执行的单元)。各姿态的使用场景请参考execution-and-methodology.md

Plan Deepening

规划深化

When asked to "deepen" or "strengthen" an existing plan, load plan-deepening.md — targeted research workflow (additive, not restructuring), per-section enhancement format, and Enhancement Summary block at the plan head. Orchestrated by the
/ia-deepen-plan
command.
当被要求“深化”或“强化”现有规划时,请加载plan-deepening.md——针对性研究流程(增量式,而非重构)、按部分增强格式,以及规划头部的增强摘要块。由
/ia-deepen-plan
命令协调。

Execution Handoff

执行交接

When a plan is complete, offer the user an explicit choice -- subagent-driven (dispatch each phase to a focused agent) or inline execution -- rather than drifting into implementation. State a one-sentence recommendation, then present the choice via the same ask mechanism as Clarifying Questions and wait for the user to pick; do not auto-start either path. Dispatch discipline and portable task-prompt anchoring are in execution-and-methodology.md.
规划完成后,向用户提供明确的选择——子Agent驱动(将每个阶段分派给专注的Agent)或内联执行——而非直接进入实施阶段。给出一句简短的建议,然后通过与澄清问题相同的提问方式呈现选择,并等待用户选择;请勿自动启动任一路径。分派规则和可移植任务提示锚定请参考execution-and-methodology.md

Verify

验证

  • Plan file exists at
    .plan/task_plan.md
    (or
    docs/plans/
    for formal plans)
  • All tasks are verb-first and atomic (2-5 minutes each)
  • File structure table is complete with action and responsibility columns
  • Phase sizing respects 5-8 file limit
  • No placeholder tasks ("implement feature", "add tests") -- every task names specific files and patterns
  • Each phase delivers end-to-end functionality (not a single horizontal layer)
  • Open questions limited to 3 or fewer genuinely blocking unknowns
  • 规划文件存在于
    .plan/task_plan.md
    (正式规划存于
    docs/plans/
  • 所有任务均为动词开头且原子性(2-5分钟完成)
  • 文件结构表格包含完整的操作和职责列
  • 阶段规模符合最多5-8个文件的限制
  • 无占位符任务(“实现功能”、“添加测试”)——每个任务都指定了具体文件和模式
  • 每个阶段交付端到端功能(而非单一水平层)
  • 未解决问题限制为3个及以下真正阻塞的未知项

Integration

集成

  • Predecessor:
    ia-brainstorming
    when requirements are ambiguous -- use an existing brainstorm spec (
    docs/brainstorms/
    ) as input and skip idea refinement.
  • Architecture decisions: record significant trade-offs (chosen approach, what was given up) as an ADR (
    /ia-adr
    in Claude Code); ADRs outlive the plan.
  • Threat modeling: dispatch
    ia-security-sentinel
    in threat-model mode before implementation when the plan adds auth flows, payment handling, external API surfaces, or new trust boundaries -- architectural gaps are cheaper to fix in the plan than the code.
  • Prose quality:
    ia-writing
    to humanize plan language and strip AI slop.
  • Execution handoff: after approval, per Execution Handoff above.
  • 前置环节:当需求不明确时,先执行
    ia-brainstorming
    ——使用现有头脑风暴规范(
    docs/brainstorms/
    )作为输入,跳过想法细化。
  • 架构决策:将重大权衡(选择的方案、放弃的内容)记录为ADR(Claude Code中的
    /ia-adr
    );ADR的留存时间长于规划。
  • 威胁建模:当规划添加认证流程、支付处理、外部API接口或新信任边界时,在实施前以威胁建模模式调用
    ia-security-sentinel
    ——在规划阶段修复架构漏洞比在代码阶段修复成本更低。
  • 文案质量:使用
    ia-writing
    优化规划语言,去除AI生成的冗余内容。
  • 执行交接:获得批准后,按照上述执行交接流程操作。 ",