plan-feature
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseFeature Planning
特性规划
Create concrete, implementation-ready plans for features and complex changes.
DO NOT WRITE CODE during planning. Only explore, analyse, and document.
为功能特性和复杂变更创建具体的、可直接用于实施的计划。
规划阶段请勿编写代码,仅进行探索、分析和文档记录。
Planning threshold
规划阈值
Before deep planning, quickly confirm the scope:
- Plan in detail when changes affect 3+ files or multiple systems
- Plan in detail when requirements are unclear or architectural tradeoffs exist
- Skip heavyweight planning for single-file changes with clear requirements
- For small/obvious changes, give a short execution outline instead of a full spec
在深入规划前,先快速确认范围:
- 当变更影响3个及以上文件或多个系统时,需制定详细计划
- 当需求不明确或存在架构权衡时,需制定详细计划
- 对于需求明确的单文件变更,可跳过重量级规划
- 对于小型/明显的变更,只需给出简短的执行大纲,无需完整规范
Planning workflow
规划工作流
1. Discovery
1. 需求挖掘
Ask targeted questions to uncover intent. For each question:
- Present 2-3 concrete options with tradeoffs
- Give your recommended option with clear reasoning
- One question at a time; wait for user response
- Skip questions already answered by the user
Critical questions:
- What problem are you solving? (user pain point, business goal)
- What should happen? (expected behaviour, success criteria)
- What should NOT happen? (constraints, edge cases to avoid)
- Who is this for? (user type, environment, scale)
- How will you verify it works? (testing approach, validation)
提出针对性问题以明确用户意图。每个问题需满足:
- 给出2-3个具体选项及各选项的权衡点
- 给出你的推荐选项及清晰的理由
- 一次只提一个问题,等待用户回复
- 跳过用户已回答过的问题
核心问题:
- 你要解决什么问题?(用户痛点、业务目标)
- 预期达成什么效果?(预期行为、成功标准)
- 需要避免什么情况?(约束条件、需规避的边缘场景)
- 这是为谁设计的?(用户类型、运行环境、规模)
- 你将如何验证功能正常?(测试方法、验证方式)
Speed-to-learning reference
快速学习参考
- Use for a lightweight shipping loop and feedback cadence.
ship-fast-loop.md
- 如需轻量级交付循环和反馈节奏,请参考。
ship-fast-loop.md
2. Analysis
2. 分析阶段
Explore the codebase systematically:
- Locate relevant files (document paths with line numbers)
- Map existing patterns (architecture, naming, data flow)
- Identify dependencies (what will be affected by changes)
- Find similar implementations (to maintain consistency)
- Note relevant standards (from ,
implement-frontend, etc)define-architecture
Document findings:
- File: - what it does, how it's relevant
path/to/file.ts:123 - Pattern: existing approach for similar features
- Constraint: technical limitation or requirement
系统地探索代码库:
- 定位相关文件(记录文件路径及行号)
- 梳理现有模式(架构、命名规范、数据流)
- 识别依赖关系(变更会影响哪些部分)
- 查找类似实现(以保持一致性)
- 记录相关标准(来自、
implement-frontend等)define-architecture
记录分析结果:
- 文件:- 功能说明及相关性
path/to/file.ts:123 - 模式:类似功能的现有实现方式
- 约束:技术限制或要求
3. Planning
3. 规划阶段
Create a concrete, ordered plan with:
For each change, specify:
- File path and approximate line number
- Exact function/component/class to modify
- What to add/remove/change (be specific)
- Why this change (how it fits the goal)
- Dependencies (what must happen first)
Plan structure:
undefined创建具体的、有序的计划,包含以下内容:
每项变更需明确:
- 文件路径及大致行号
- 需修改的具体函数/组件/类
- 新增/删除/修改的具体内容
- 变更原因(如何契合目标)
- 依赖关系(哪些步骤需先完成)
计划结构:
undefinedGoal
目标
[One sentence: what we're building and why]
[一句话说明:要构建的内容及目的]
Changes
变更内容
1. [Description]
1. [变更描述]
- File:
path/to/file.ts:45 - Action: Add that does X
functionName() - Reasoning: Needed because Y
- Dependencies: None
- 文件:
path/to/file.ts:45 - 操作:新增实现X功能
functionName() - 原因:因Y需求需要
- 依赖:无
2. [Description]
2. [变更描述]
- File:
path/to/other.ts:89 - Action: Modify to handle Z
existingFunction() - Reasoning: Integrates with change #1
- Dependencies: #1 must complete first
- 文件:
path/to/other.ts:89 - 操作:修改以支持Z场景
existingFunction() - 原因:与变更#1集成
- 依赖:需先完成#1
Validation
验证标准
- Tests pass
- Feature works for case A
- Edge case B is handled
- Follows (if frontend)
implement-frontend - No console logs or debug code
undefined- 测试用例全部通过
- 功能在场景A下正常工作
- 已处理边缘场景B
- 符合规范(若为前端变更)
implement-frontend - 无控制台日志或调试代码
undefined4. Standards reference
4. 标准参考
Explicitly note which standards apply:
- Frontend changes: reference ,
implement-frontendaudit-ui - UI changes: reference
design-ui - Motion: reference
ui-animation - Backend: reference
define-architecture - Typography: reference
audit-ui
Format: "This plan must follow for forms and type safety."
implement-frontend明确标注需遵循的相关标准:
- 前端变更:参考、
implement-frontendaudit-ui - UI变更:参考
design-ui - 动效:参考
ui-animation - 后端变更:参考
define-architecture - 排版:参考
audit-ui
格式示例:"本计划需遵循中关于表单和类型安全的规范。"
implement-frontendAnti-patterns
反模式
Avoid vague plans:
- Bad: "Update the authentication system"
- Good: "Modify to add
auth/middleware.ts:34that checks token expiry"validateSession()
Avoid missing context:
- Bad: "Add error handling"
- Good: "Wrap API call in with try/catch, show toast on error per
auth/api.ts:67"audit-ui
Avoid assuming knowledge:
- Bad: "Use the standard pattern"
- Good: "Follow the existing DAO pattern from (class-based with explicit types)"
user/dao.ts:12
Avoid incomplete acceptance criteria:
- Bad: "Make sure it works"
- Good: "Verify: (1) form submits on Enter, (2) shows inline errors, (3) disables submit during request"
Avoid ignoring standards:
- Bad: Plan uses types and manual form state
any - Good: Plan enforces : no
implement-frontend, uses React Hook Formany
避免模糊的计划:
- 错误示例:"更新认证系统"
- 正确示例:"修改,新增
auth/middleware.ts:34函数检查令牌过期时间"validateSession()
避免缺失上下文:
- 错误示例:"添加错误处理"
- 正确示例:"在处为API调用添加try/catch包裹,按照
auth/api.ts:67规范在错误时显示提示弹窗"audit-ui
避免假设对方已知信息:
- 错误示例:"使用标准模式"
- 正确示例:"遵循中的现有DAO模式(基于类的实现,包含明确类型定义)"
user/dao.ts:12
避免不完整的验收标准:
- 错误示例:"确保功能正常"
- 正确示例:"验证:(1) 按Enter键可提交表单,(2) 显示内联错误提示,(3) 请求过程中禁用提交按钮"
避免忽略标准:
- 错误示例:计划使用类型和手动维护表单状态
any - 正确示例:计划遵循规范:不使用
implement-frontend类型,采用React Hook Formany
Validation checklist
验证清单
Before handing off the plan, verify:
- Someone can implement without asking questions
- File paths are valid with approximate line numbers
- Steps are ordered with clear dependencies
- Acceptance criteria are testable
- Relevant skill standards explicitly referenced
- Every decision is justified (the "why")
- No ambiguous language ("update", "improve", "enhance" without specifics)
交付计划前,请确认:
- 他人无需额外提问即可直接实施
- 文件路径有效且包含大致行号
- 步骤按顺序排列,依赖关系清晰
- 验收标准可测试
- 已明确引用相关技能标准
- 每个决策都有充分理由(即“为什么”)
- 无模糊表述(如未明确说明的“更新”、“改进”、“增强”)