planner

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Planner Skill

Planner Skill

Two workflows: planning (13-step plan creation + review) and execution (implement plans).
包含两种工作流:规划(13步计划创建+审核)和执行(计划落地)。

Activation

激活条件

When this skill activates, IMMEDIATELY invoke the corresponding script. The script IS the workflow.
ModeIntentCommand
planning"plan", "design", "architect"
<invoke working-dir=".claude/skills/scripts" cmd="python3 -m skills.planner.planner --step 1 --total-steps 13" />
execution"execute", "implement", "run plan"
<invoke working-dir=".claude/skills/scripts" cmd="python3 -m skills.planner.executor --step 1 --total-steps 9" />
当该技能被激活时,立即调用对应的脚本。脚本即工作流本身。
模式触发意图命令
planning"plan"、"design"、"architect"
<invoke working-dir=".claude/skills/scripts" cmd="python3 -m skills.planner.planner --step 1 --total-steps 13" />
execution"execute"、"implement"、"run plan"
<invoke working-dir=".claude/skills/scripts" cmd="python3 -m skills.planner.executor --step 1 --total-steps 9" />

When to Use

使用场景

Use when task has:
  • Multiple milestones with dependencies
  • Architectural decisions requiring documentation
  • Complexity benefiting from forced reflection pauses
Skip when task is:
  • Single-step with obvious implementation
  • Quick fix or minor change
  • Already well-specified by user
当任务具备以下特征时使用:
  • 存在多个相互依赖的里程碑
  • 架构决策需要文档记录
  • 复杂度较高,需要强制暂停以进行反思
当任务属于以下情况时跳过:
  • 单步骤且实现方式明确
  • 快速修复或微小变更
  • 用户已提供详细明确的需求

Resources

参考资源

ResourceContentsRead When
.claude/conventions/diff-format.md
Unified diff specificationWriting code changes in milestones
resources/plan-format.md
Plan template structureCompleting planning phase (injected by script)
.claude/conventions/temporal.md
Comment hygiene heuristicsWriting comments in code snippets
.claude/conventions/structural.md
Structural conventionsMaking decisions without explicit user guidance
资源路径内容概述适用场景
.claude/conventions/diff-format.md
统一diff规范在里程碑中编写代码变更时参考
resources/plan-format.md
计划模板结构完成规划阶段时使用(由脚本自动注入)
.claude/conventions/temporal.md
注释编写优化指南在代码片段中编写注释时参考
.claude/conventions/structural.md
结构规范在无用户明确指导时进行决策参考

Planning Workflow (13 steps)

规划工作流(13步)

Steps 1-5: Planning
  1. Context Discovery - explore, gather requirements
  2. Testing Strategy Discovery - identify test patterns
  3. Approach Generation - generate options with tradeoffs
  4. Assumption Surfacing - user confirmation of choices
  5. Approach Selection & Milestones - decide, write milestones + Code Intent
Steps 6-13: Review
  1. QR-Completeness - validate plan structure
  2. Gate - route based on QR result
  3. Developer Fills Diffs - convert Code Intent to diffs
  4. QR-Code - validate diffs and code quality
  5. Gate - route based on QR result
  6. TW Documentation Scrub - clean comments, inject WHY
  7. QR-Docs - validate comment hygiene
  8. Gate - PLAN APPROVED
步骤1-5:规划阶段
  1. 上下文探索 - 调研、收集需求
  2. 测试策略探索 - 确定测试模式
  3. 方案生成 - 生成带权衡分析的多种选项
  4. 假设明确 - 请用户确认选择
  5. 方案选择与里程碑制定 - 确定方案,编写里程碑+代码意图
步骤6-13:审核阶段
  1. QR完整性检查 - 验证计划结构
  2. Gate环节 - 根据QR结果决定后续路径
  3. 开发者编写Diff - 将代码意图转换为diff内容
  4. QR代码检查 - 验证diff和代码质量
  5. Gate环节 - 根据QR结果决定后续路径
  6. TW文档梳理 - 优化注释,补充设计原因(WHY)
  7. QR文档检查 - 验证注释规范
  8. Gate环节 - 计划获批

Execution Workflow (9 steps)

执行工作流(9步)

  1. Execution planning - wave analysis
  2. Reconciliation (conditional) - validate existing code
  3. Implementation - wave-aware parallel dispatch to developers
  4. Code QR - verify code quality (RULE 0/1/2)
  5. Code QR Gate - route to step 3 on fail
  6. Documentation - create CLAUDE.md/README.md
  7. Doc QR - verify documentation quality
  8. Doc QR Gate - route to step 6 on fail
  9. Retrospective - summary presentation
Scripts inject step-specific guidance. Invoke and follow output.
  1. 执行规划 - 阶段分析
  2. 一致性校验(可选) - 验证现有代码
  3. 落地实现 - 基于阶段分析并行分配给开发者
  4. 代码QR检查 - 验证代码质量(遵循RULE 0/1/2)
  5. 代码QR Gate环节 - 失败则返回步骤3
  6. 文档编写 - 创建CLAUDE.md/README.md
  7. 文档QR检查 - 验证文档质量
  8. 文档QR Gate环节 - 失败则返回步骤6
  9. 回顾总结 - 成果展示
脚本会注入各步骤的专属指导。请调用脚本并遵循其输出内容。