refine-plan

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Instructions

操作说明

You are refining a v1 project plan into agent-ready tasks.
你需要将v1版本项目计划细化为可供Agent执行的任务。

Input

输入

  • Read the v1 plan. The user will either provide the file path or you should look for the most recent plan file in the project root or docs/ directory.
  • 阅读v1版本计划。用户要么会提供文件路径,要么你需要在项目根目录或docs/目录下查找最新的计划文件。

Process

处理流程

  1. Analyze the plan using sequential-thinking MCP:
    • Identify all distinct pieces of work
    • Determine dependencies between them
    • Identify the optimal execution order
    • Flag any ambiguities or gaps in the v1 plan
  2. For each task, produce:
    • Title: Clear, action-oriented (e.g., "Implement user auth middleware")
    • Context: Everything an agent needs to understand the task without reading the full plan. Include relevant architectural decisions, file paths, dependencies on other tasks, and constraints.
    • Implementation steps: Numbered steps specific enough to follow, but not so prescriptive that they prevent smart problem-solving
    • Validation criteria: How the agent (or a reviewer) confirms the task is complete. Should include at minimum:
      • What to test / run
      • Expected output or behavior
      • Edge cases to verify
    • Estimated complexity: S / M / L
    • Dependencies: List of task IDs this depends on
  3. Add a "Task 0" at the top of the plan:
    • Title: "Generate Linear issues and update CLAUDE.md"
    • Description: Instructions to run
      /create-issues
      followed by
      /setup-claude-md
    • This ensures the first thing an engineer does is set up the project infrastructure
  1. 使用sequential-thinking MCP分析计划
    • 识别所有不同的工作项
    • 确定工作项之间的依赖关系
    • 确定最优执行顺序
    • 标记v1计划中所有模糊不清或存在缺失的地方
  2. 为每个任务生成以下内容
    • 标题:清晰、面向行动的表述(例如:"实现用户身份验证中间件")
    • 上下文:Agent无需阅读完整计划就能理解任务所需的所有信息,包含相关的架构决策、文件路径、对其他任务的依赖以及约束条件
    • 实现步骤:编号列出的步骤,具体程度足够执行,但又不会过于死板以至于限制灵活的问题解决
    • 验证标准:Agent(或审核者)确认任务完成的依据,至少需要包含:
      • 需要测试/运行的内容
      • 预期输出或行为
      • 需要验证的边界情况
    • 预估复杂度:S / M / L
    • 依赖项:此任务依赖的任务ID列表
  3. 在计划顶部添加「任务0」
    • 标题:"生成Linear issues并更新CLAUDE.md"
    • 描述:运行
      /create-issues
      后再运行
      /setup-claude-md
      的操作说明
    • 这可以确保工程师做的第一件事就是搭建项目基础设施

Output

输出

  • Write the refined plan to
    docs/project-plan-refined.md
  • Use a consistent markdown structure (template below)
  • 将细化后的计划写入
    docs/project-plan-refined.md
  • 使用统一的markdown结构(如下模板)

Output Template

输出模板

undefined
undefined

[Project Name] — Refined Plan

[项目名称] — 细化后计划

Summary

概述

[1-2 sentence summary of the project]
[1-2句话的项目概述]

Task Dependency Graph

任务依赖图

[Mermaid diagram showing task dependencies]
[展示任务依赖关系的Mermaid图]

Tasks

任务列表

Task 0: Generate Linear Issues and Update CLAUDE.md

任务0:生成Linear Issues并更新CLAUDE.md

  • Context: [...]
  • Steps: Run
    /create-issues docs/project-plan-refined.md
    , then run
    /setup-claude-md
  • Validation: All issues exist in Linear; CLAUDE.md passes best practices checklist
  • 上下文:[...]
  • 步骤:运行
    /create-issues docs/project-plan-refined.md
    ,然后运行
    /setup-claude-md
  • 验证:所有issue都已存在于Linear中;CLAUDE.md通过最佳实践检查清单

Task 1: [Title]

任务1:[标题]

  • Context: [...]
  • Steps: [...]
  • Validation: [...]
  • Complexity: [S/M/L]
  • Dependencies: [None | Task IDs]
[...repeat for all tasks]
undefined
  • 上下文:[...]
  • 步骤:[...]
  • 验证:[...]
  • 复杂度:[S/M/L]
  • 依赖项:[无 | 任务ID]
[...所有任务重复上述结构]
undefined

Validation Criteria

验证标准

Read
.claude/skills/_shared/validation-pattern.md
and apply it. Specific criteria for this skill:
  • Every task has all required fields filled in (title, context, steps, validation, complexity, dependencies)
  • An agent reading any single task would have enough context to start working without asking clarifying questions
  • Dependencies form a valid DAG (no circular dependencies)
  • Task 0 is present and correctly references the next skills
  • The refined plan covers all work items from the v1 plan (nothing dropped)
阅读
.claude/skills/_shared/validation-pattern.md
并应用其要求。 此技能的特定验证标准:
  • 每个任务都填写了所有必填字段(标题、上下文、步骤、验证标准、复杂度、依赖项)
  • Agent仅读取单个任务就能获得足够的上下文开始工作,无需询问澄清问题
  • 依赖关系构成有效的DAG(无循环依赖)
  • 存在任务0且正确引用了后续要使用的技能
  • 细化后的计划覆盖了v1计划的所有工作项(无遗漏)