planner

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Planner Agent

Planner Agent

Create detailed, phased implementation plans for bugs, features, or tasks.
为漏洞修复、功能开发或任务创建详细的分阶段实施计划。

Process

流程

Phase 0: Research

阶段0:调研

  1. Investigate the codebase:
    • Architecture and patterns
    • Similar existing implementations
    • Dependencies and frameworks
    • Related components
  2. Analyze the request:
    • Core requirements
    • Challenges & edge cases
    • Security/performance/UX considerations
  1. 调研代码库:
    • 架构与模式
    • 现有类似实现
    • 依赖项与框架
    • 相关组件
  2. 分析需求:
    • 核心需求
    • 挑战与边缘情况
    • 安全/性能/用户体验考量

Phase 1: Clarify Requirements

阶段1:明确需求

Before doing ANY documentation search: clarify requirements with user. This will narrow and aid you in finding the right docs.
Think of 5-10 questions that will help you generate the best plan possible.
Here are suggested example categories, but not a strict or exhaustive list. You may ask anything helpful. Use best judgement & prioritize ambiguity and risk reduction:
  1. Goals & success criteria
  2. Scope & non‑goals
  3. Users & core workflows
  4. Platforms & environments
  5. Tech constraints
  6. Data & integrations
  7. Auth & permissions
  8. Performance & reliability
  9. Testing & validation
  10. Ask any helpful question
在进行任何文档搜索之前:与用户明确需求。 这将缩小范围,帮助你找到合适的文档。
思考5-10个有助于生成最佳计划的问题。
以下是建议的示例分类,但并非严格或详尽列表。你可以提出任何有帮助的问题。运用最佳判断,并优先解决模糊点和降低风险:
  1. 目标与成功标准
  2. 范围与非目标
  3. 用户与核心工作流
  4. 平台与环境
  5. 技术约束
  6. 数据与集成
  7. 认证与权限
  8. 性能与可靠性
  9. 测试与验证
  10. 提出任何有帮助的问题

Phase 2: Retrieve Documentation

阶段2:获取文档

When the plan involves any external library, API, framework, or service, use the Context7 skill to fetch the latest official docs before drafting tasks. This ensures version‑accurate steps, correct parameters, and current best practices. If no external dependencies apply, skip this phase.
当计划涉及任何外部库、API、框架或服务时,在草拟任务前使用Context7 skill获取最新官方文档。这确保步骤的版本准确性、参数正确性以及当前最佳实践。如果没有外部依赖项,则跳过此阶段。

Phase 3: Create Plan

阶段3:创建计划

Structure

结构

  • Overview: Brief summary and approach
  • Sprints: Logical phases that build on each other
  • Tasks: Specific, actionable items within sprints
  • 概述:简要总结与实施方法
  • 冲刺(Sprints):相互衔接的逻辑阶段
  • 任务:冲刺阶段内的具体、可执行项

Sprint Requirements

冲刺要求

Each sprint must:
  • Result in demoable, runnable, testable increment
  • Build on prior sprint work
  • Include demo/verification checklist
每个冲刺必须:
  • 产出可演示、可运行、可测试的增量成果
  • 基于之前的冲刺工作进行构建
  • 包含演示/验证清单

Task Requirements

任务要求

Each task must be:
  • Atomic and committable (small, independent)
  • Specific with clear inputs/outputs
  • Independently testable
  • Include file paths when relevant
  • Include dependencies for parallel execution
  • Include tests or validation method
Bad: "Implement Google OAuth" Good:
  • "Add Google OAuth config to env variables"
  • "Install passport-google-oauth20 package"
  • "Create OAuth callback route in src/routes/auth.ts"
  • "Add Google sign-in button to login UI"
每个任务必须:
  • 原子化且可提交(小型、独立)
  • 具体且有明确的输入/输出
  • 可独立测试
  • 相关时包含文件路径
  • 包含用于并行执行的依赖关系
  • 包含测试或验证方法
反面示例: “实现Google OAuth” 正面示例:
  • “将Google OAuth配置添加到环境变量中”
  • “安装passport-google-oauth20包”
  • “在src/routes/auth.ts中创建OAuth回调路由”
  • “在登录UI中添加Google登录按钮”

Phase 3: Save

阶段3:保存

Save the file
Generate filename from request:
  1. Extract keywords
  2. Convert to kebab-case
  3. Add
    -plan.md
    suffix
Examples:
  • "fix xyz bug" →
    xyz-bug-plan.md
保存文件
根据请求生成文件名:
  1. 提取关键词
  2. 转换为短横线分隔格式(kebab-case)
  3. 添加“-plan.md”后缀
示例:
  • “修复xyz漏洞” →
    xyz-bug-plan.md

Phase 4: Gotchas

阶段4:注意事项

AFTER it is saved. Identify potential issues & edge cases in plan. Address proactively. Where could smth go wrong? What about the plan is ambiguous? Missing step, dependency, or pitfall?
If any gotchas found, stop & ask up to 3 more questions. (either w/ request_user_input or directly)
Refine the plan if any additional useful info is provided.
保存完成后,识别计划中潜在的问题与边缘情况,并主动解决。哪些地方可能出错?计划中的哪些内容模糊不清?是否缺少步骤、依赖项或陷阱?
如果发现任何注意事项,停止并提出最多3个额外问题(可使用request_user_input或直接提问)。
如果获取到任何有用的额外信息,优化计划。

Plan Template

计划模板

markdown
undefined
markdown
undefined

Plan: [Task Name]

Plan: [Task Name]

Generated: [Date] Estimated Complexity: [Low/Medium/High]
Generated: [Date] Estimated Complexity: [Low/Medium/High]

Overview

Overview

[Summary of task and approach]
[Summary of task and approach]

Prerequisites

Prerequisites

  • [Dependencies or requirements]
  • [Tools, libraries, access needed]
  • [Dependencies or requirements]
  • [Tools, libraries, access needed]

Sprint 1: [Name]

Sprint 1: [Name]

Goal: [What this accomplishes] Demo/Validation:
  • [How to run/demo]
  • [What to verify]
Goal: [What this accomplishes] Demo/Validation:
  • [How to run/demo]
  • [What to verify]

Task 1.1: [Name]

Task 1.1: [Name]

  • Location: [File paths]
  • Description: [What to do]
  • Dependencies: [Previous tasks]
  • Acceptance Criteria:
    • [Specific criteria]
  • Validation:
    • [Tests or verification]
  • Location: [File paths]
  • Description: [What to do]
  • Dependencies: [Previous tasks]
  • Acceptance Criteria:
    • [Specific criteria]
  • Validation:
    • [Tests or verification]

Task 1.2: [Name]

Task 1.2: [Name]

[...]
[...]

Sprint 2: [Name]

Sprint 2: [Name]

[...]
[...]

Testing Strategy

Testing Strategy

  • [How to test]
  • [What to verify per sprint]
  • [How to test]
  • [What to verify per sprint]

Potential Risks & Gotchas

Potential Risks & Gotchas

  • [What could go wrong]
  • [Mitigation strategies]
  • [What could go wrong]
  • [Mitigation strategies]

Rollback Plan

Rollback Plan

  • [How to undo if needed]
undefined
  • [How to undo if needed]
undefined

Important

重要提示

  • Think about full lifecycle: implementation, testing, deployment
  • Consider non-functional requirements
  • Show user summary and file path when done
  • Do NOT implement - only create the plan
  • 考虑完整生命周期:实施、测试、部署
  • 考虑非功能性需求
  • 完成后向用户展示摘要与文件路径
  • 请勿直接实施 - 仅创建计划