plan-generator

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
<identity> Plan Generator Skill - Creates structured, validated plans from requirements by coordinating with specialist agents and generating comprehensive planning artifacts. </identity> <capabilities> - Creating plans for new features - Planning refactoring efforts - Planning system migrations - Planning architecture changes - Breaking down complex requirements - Validating existing plans </capabilities> <instructions> <execution_process>
<identity> Plan Generator Skill - 通过协调专业Agent并生成全面的规划工件,根据需求创建结构化、经过验证的计划。 </identity> <capabilities> - 为新功能创建计划 - 规划重构工作 - 规划系统迁移 - 规划架构变更 - 拆解复杂需求 - 验证现有计划 </capabilities> <instructions> <execution_process>

Step 1: Analyze Requirements

步骤1:分析需求

Parse user requirements:
  • Extract explicit requirements
  • Identify implicit requirements
  • Determine planning scope
  • Assess complexity
解析用户需求:
  • 提取明确需求
  • 识别隐含需求
  • 确定规划范围
  • 评估复杂度

Step 2: Coordinate Specialists

步骤2:协调专业人员

Request planning input from relevant agents:
  • Analyst: Business requirements and market context
  • PM: Product requirements and user stories
  • Architect: Technical architecture and design
  • Database Architect: Data requirements
  • UX Expert: Interface requirements
向相关Agent请求规划输入:
  • Analyst:业务需求与市场背景
  • PM:产品需求与用户故事
  • Architect:技术架构与设计
  • Database Architect:数据需求
  • UX Expert:界面需求

Step 3: Generate Plan Structure

步骤3:生成计划结构

Create plan following template:
  • Load template from
    .cursor/templates/plan-template.md
  • Define objectives
  • Break down into steps (≤7 steps per section)
  • Identify dependencies
  • Assign agents to steps
按照模板创建计划:
  • .cursor/templates/plan-template.md
    加载模板
  • 定义目标
  • 拆解为步骤(每个章节≤7个步骤)
  • 识别依赖关系
  • 为步骤分配Agent

Step 4: Assess Risks

步骤4:风险评估

Identify risks and mitigation:
  • Technical risks
  • Resource risks
  • Timeline risks
  • Dependency risks
  • Mitigation strategies
识别风险并制定缓解策略:
  • 技术风险
  • 资源风险
  • 时间线风险
  • 依赖关系风险
  • 缓解策略

Step 5: Validate Plan

步骤5:验证计划

Validate plan completeness:
  • All requirements addressed
  • Dependencies mapped
  • Success criteria defined
  • Risks identified
  • Plan is feasible
验证计划的完整性:
  • 所有需求均已覆盖
  • 依赖关系已映射
  • 成功标准已定义
  • 风险已识别
  • 计划具备可行性

Step 6: Generate Artifacts

步骤6:生成工件

Create plan artifacts:
  • Plan markdown:
    .cursor/context/artifacts/plan-<id>.md
  • Plan JSON:
    .cursor/context/artifacts/plan-<id>.json
  • Plan summary </execution_process>
<plan_types> Feature Development Plan:
  • Objectives: Feature goals
  • Steps: Analysis → Design → Implementation → Testing
  • Agents: Analyst → PM → Architect → Developer → QA
Refactoring Plan:
  • Objectives: Code quality goals
  • Steps: Analysis → Planning → Implementation → Validation
  • Agents: Code Reviewer → Refactoring Specialist → Developer → QA
Migration Plan:
  • Objectives: Migration goals
  • Steps: Analysis → Planning → Execution → Validation
  • Agents: Architect → Legacy Modernizer → Developer → QA
Architecture Plan:
  • Objectives: Architecture goals
  • Steps: Analysis → Design → Validation → Documentation
  • Agents: Architect → Database Architect → Security Architect → Technical Writer </plan_types>
<integration> **Integration with Planner Agent**: Planner agent uses this skill to: - Generate plans from requirements - Coordinate specialist input - Validate plan completeness - Track plan execution </integration>
<best_practices>
  1. Coordinate Early: Get specialist input before finalizing plan
  2. Keep Steps Focused: ≤7 steps per plan section
  3. Map Dependencies: Clearly identify prerequisites
  4. Assess Risks: Identify and mitigate risks proactively
  5. Validate Thoroughly: Ensure plan is complete and feasible </best_practices> </instructions>
<examples> <formatting_example> **Example Plan Output**
Command: "Generate plan for user authentication feature"
Generated Plan:
markdown
undefined
创建规划工件:
  • 计划Markdown文件:
    .cursor/context/artifacts/plan-<id>.md
  • 计划JSON文件:
    .cursor/context/artifacts/plan-<id>.json
  • 计划摘要 </execution_process>
<plan_types> 功能开发计划:
  • 目标:功能目标
  • 步骤:分析 → 设计 → 实现 → 测试
  • 负责Agent:Analyst → PM → Architect → Developer → QA
重构计划:
  • 目标:代码质量目标
  • 步骤:分析 → 规划 → 实现 → 验证
  • 负责Agent:Code Reviewer → Refactoring Specialist → Developer → QA
迁移计划:
  • 目标:迁移目标
  • 步骤:分析 → 规划 → 执行 → 验证
  • 负责Agent:Architect → Legacy Modernizer → Developer → QA
架构计划:
  • 目标:架构目标
  • 步骤:分析 → 设计 → 验证 → 文档编制
  • 负责Agent:Architect → Database Architect → Security Architect → Technical Writer </plan_types>
<integration> **与Planner Agent的集成**: Planner Agent 使用此Skill来: - 根据需求生成计划 - 协调专业人员输入 - 验证计划完整性 - 跟踪计划执行 </integration>
<best_practices>
  1. 提前协调:在最终确定计划前获取专业人员的输入
  2. 聚焦步骤:每个计划章节≤7个步骤
  3. 映射依赖关系:明确识别前置条件
  4. 评估风险:主动识别并缓解风险
  5. 全面验证:确保计划完整且可行 </best_practices> </instructions>
<examples> <formatting_example> **示例计划输出**
指令:"为用户认证功能生成计划"
生成的计划:
markdown
undefined

Plan: User Authentication Feature

Plan: User Authentication Feature

Objectives

Objectives

  • Implement JWT-based authentication
  • Support login, logout, and session management
  • Provide secure password handling
  • Implement JWT-based authentication
  • Support login, logout, and session management
  • Provide secure password handling

Steps

Steps

Step 1: Requirements Analysis

Step 1: Requirements Analysis

  • Agent: analyst
  • Dependencies: none
  • Tasks: Analyze auth requirements, research best practices
  • Success Criteria: Requirements document complete
  • Agent: analyst
  • Dependencies: none
  • Tasks: Analyze auth requirements, research best practices
  • Success Criteria: Requirements document complete

Step 2: Architecture Design

Step 2: Architecture Design

  • Agent: architect
  • Dependencies: Step 1
  • Tasks: Design auth architecture, select technologies
  • Success Criteria: Architecture document complete
  • Agent: architect
  • Dependencies: Step 1
  • Tasks: Design auth architecture, select technologies
  • Success Criteria: Architecture document complete

Step 3: Implementation

Step 3: Implementation

  • Agent: developer
  • Dependencies: Step 2
  • Tasks: Implement auth endpoints, JWT handling, password hashing
  • Success Criteria: All tests passing, code reviewed
  • Agent: developer
  • Dependencies: Step 2
  • Tasks: Implement auth endpoints, JWT handling, password hashing
  • Success Criteria: All tests passing, code reviewed

Step 4: Testing

Step 4: Testing

  • Agent: qa
  • Dependencies: Step 3
  • Tasks: Write tests, perform security testing
  • Success Criteria: Test coverage >80%, security validated

</formatting_example>
</examples>
  • Agent: qa
  • Dependencies: Step 3
  • Tasks: Write tests, perform security testing
  • Success Criteria: Test coverage >80%, security validated

</formatting_example>
</examples>