feature-design-assistant
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseFeature Design Assistant
功能设计助手
Help turn ideas into fully formed designs and specs through structured information gathering and collaborative validation.
Announce at start: "I'm using the feature-design-assistant skill to design this feature."
通过结构化的信息收集和协作验证,帮助将想法转化为完整的设计和规格说明。
开始时需告知: "我正在使用feature-design-assistant技能来设计此功能。"
Phase 1: Context Discovery
阶段1:背景探索
First, explore the codebase to understand:
- Project structure and tech stack
- Existing patterns and conventions
- Related features or modules
- Recent changes in relevant areas
首先,探索代码库以了解:
- 项目结构和技术栈
- 现有模式和约定
- 相关功能或模块
- 相关领域的近期变更
Phase 2: Structured Information Gathering
阶段2:结构化信息收集
Use AskUserQuestion to batch collect information efficiently. Each call can ask up to 4 questions.
使用AskUserQuestion高效批量收集信息。每次调用最多可提出4个问题。
Round 1: Core Requirements (4 questions)
第一轮:核心需求(4个问题)
json
{
"questions": [
{
"question": "What is the primary goal of this feature?",
"header": "Goal",
"multiSelect": false,
"options": [
{ "label": "New Functionality", "description": "Add entirely new capability to the system" },
{ "label": "Enhancement", "description": "Improve or extend existing feature" },
{ "label": "Bug Fix", "description": "Fix incorrect behavior or issue" },
{ "label": "Refactoring", "description": "Improve code quality without changing behavior" }
]
},
{
"question": "Who are the primary users of this feature?",
"header": "Users",
"multiSelect": true,
"options": [
{ "label": "End Users", "description": "External customers using the product" },
{ "label": "Admins", "description": "Internal administrators or operators" },
{ "label": "Developers", "description": "Other developers using APIs or SDKs" },
{ "label": "System", "description": "Automated processes or background jobs" }
]
},
{
"question": "What is the expected scope of this feature?",
"header": "Scope",
"multiSelect": false,
"options": [
{ "label": "Small (1-2 days)", "description": "Single component, limited changes" },
{ "label": "Medium (3-5 days)", "description": "Multiple components, moderate complexity" },
{ "label": "Large (1-2 weeks)", "description": "Cross-cutting concerns, significant changes" },
{ "label": "Unsure", "description": "Need to explore further to estimate" }
]
},
{
"question": "Are there any hard deadlines or constraints?",
"header": "Timeline",
"multiSelect": false,
"options": [
{ "label": "Urgent", "description": "Need this ASAP, within days" },
{ "label": "This Sprint", "description": "Should be done within current sprint" },
{ "label": "Flexible", "description": "No hard deadline, quality over speed" },
{ "label": "Planning Only", "description": "Just designing now, implementing later" }
]
}
]
}json
{
"questions": [
{
"question": "What is the primary goal of this feature?",
"header": "Goal",
"multiSelect": false,
"options": [
{ "label": "New Functionality", "description": "Add entirely new capability to the system" },
{ "label": "Enhancement", "description": "Improve or extend existing feature" },
{ "label": "Bug Fix", "description": "Fix incorrect behavior or issue" },
{ "label": "Refactoring", "description": "Improve code quality without changing behavior" }
]
},
{
"question": "Who are the primary users of this feature?",
"header": "Users",
"multiSelect": true,
"options": [
{ "label": "End Users", "description": "External customers using the product" },
{ "label": "Admins", "description": "Internal administrators or operators" },
{ "label": "Developers", "description": "Other developers using APIs or SDKs" },
{ "label": "System", "description": "Automated processes or background jobs" }
]
},
{
"question": "What is the expected scope of this feature?",
"header": "Scope",
"multiSelect": false,
"options": [
{ "label": "Small (1-2 days)", "description": "Single component, limited changes" },
{ "label": "Medium (3-5 days)", "description": "Multiple components, moderate complexity" },
{ "label": "Large (1-2 weeks)", "description": "Cross-cutting concerns, significant changes" },
{ "label": "Unsure", "description": "Need to explore further to estimate" }
]
},
{
"question": "Are there any hard deadlines or constraints?",
"header": "Timeline",
"multiSelect": false,
"options": [
{ "label": "Urgent", "description": "Need this ASAP, within days" },
{ "label": "This Sprint", "description": "Should be done within current sprint" },
{ "label": "Flexible", "description": "No hard deadline, quality over speed" },
{ "label": "Planning Only", "description": "Just designing now, implementing later" }
]
}
]
}Round 2: Technical Requirements (4 questions)
第二轮:技术需求(4个问题)
json
{
"questions": [
{
"question": "Which layers of the system will this feature touch?",
"header": "Layers",
"multiSelect": true,
"options": [
{ "label": "Data Model", "description": "Database schema, models, migrations" },
{ "label": "Business Logic", "description": "Services, domain logic, rules" },
{ "label": "API", "description": "REST/GraphQL endpoints, contracts" },
{ "label": "UI", "description": "Frontend components, user interface" }
]
},
{
"question": "What are the key quality requirements?",
"header": "Quality",
"multiSelect": true,
"options": [
{ "label": "High Performance", "description": "Must handle high load or be very fast" },
{ "label": "Strong Security", "description": "Sensitive data, auth, access control" },
{ "label": "High Reliability", "description": "Cannot fail, needs redundancy" },
{ "label": "Easy Maintenance", "description": "Needs to be easily understood and modified" }
]
},
{
"question": "How should errors be handled?",
"header": "Errors",
"multiSelect": false,
"options": [
{ "label": "Fail Fast", "description": "Stop immediately on any error" },
{ "label": "Graceful Degrade", "description": "Continue with reduced functionality" },
{ "label": "Retry & Recover", "description": "Automatic retry with recovery logic" },
{ "label": "Context Dependent", "description": "Different strategies for different cases" }
]
},
{
"question": "What testing approach is preferred?",
"header": "Testing",
"multiSelect": false,
"options": [
{ "label": "TDD (Recommended)", "description": "Write tests first, then implementation" },
{ "label": "Test After", "description": "Implement first, add tests after" },
{ "label": "Minimal Tests", "description": "Only critical path testing" },
{ "label": "No Tests", "description": "Skip testing for this feature" }
]
}
]
}json
{
"questions": [
{
"question": "Which layers of the system will this feature touch?",
"header": "Layers",
"multiSelect": true,
"options": [
{ "label": "Data Model", "description": "Database schema, models, migrations" },
{ "label": "Business Logic", "description": "Services, domain logic, rules" },
{ "label": "API", "description": "REST/GraphQL endpoints, contracts" },
{ "label": "UI", "description": "Frontend components, user interface" }
]
},
{
"question": "What are the key quality requirements?",
"header": "Quality",
"multiSelect": true,
"options": [
{ "label": "High Performance", "description": "Must handle high load or be very fast" },
{ "label": "Strong Security", "description": "Sensitive data, auth, access control" },
{ "label": "High Reliability", "description": "Cannot fail, needs redundancy" },
{ "label": "Easy Maintenance", "description": "Needs to be easily understood and modified" }
]
},
{
"question": "How should errors be handled?",
"header": "Errors",
"multiSelect": false,
"options": [
{ "label": "Fail Fast", "description": "Stop immediately on any error" },
{ "label": "Graceful Degrade", "description": "Continue with reduced functionality" },
{ "label": "Retry & Recover", "description": "Automatic retry with recovery logic" },
{ "label": "Context Dependent", "description": "Different strategies for different cases" }
]
},
{
"question": "What testing approach is preferred?",
"header": "Testing",
"multiSelect": false,
"options": [
{ "label": "TDD (Recommended)", "description": "Write tests first, then implementation" },
{ "label": "Test After", "description": "Implement first, add tests after" },
{ "label": "Minimal Tests", "description": "Only critical path testing" },
{ "label": "No Tests", "description": "Skip testing for this feature" }
]
}
]
}Round 3: Integration & Dependencies (4 questions)
第三轮:集成与依赖(4个问题)
json
{
"questions": [
{
"question": "Does this feature need external integrations?",
"header": "Integrations",
"multiSelect": true,
"options": [
{ "label": "Database", "description": "New tables, queries, or migrations" },
{ "label": "External APIs", "description": "Third-party service calls" },
{ "label": "Message Queue", "description": "Async processing, events" },
{ "label": "None", "description": "No external integrations needed" }
]
},
{
"question": "Are there dependencies on other features or teams?",
"header": "Dependencies",
"multiSelect": true,
"options": [
{ "label": "Auth System", "description": "User authentication or authorization" },
{ "label": "Other Features", "description": "Depends on features being developed" },
{ "label": "External Team", "description": "Needs input from another team" },
{ "label": "None", "description": "Fully independent feature" }
]
},
{
"question": "How should we handle backwards compatibility?",
"header": "Compat",
"multiSelect": false,
"options": [
{ "label": "Must Maintain", "description": "Cannot break existing clients" },
{ "label": "Version API", "description": "Create new version, deprecate old" },
{ "label": "Breaking OK", "description": "Can make breaking changes" },
{ "label": "Not Applicable", "description": "New feature, no existing users" }
]
},
{
"question": "What documentation is needed?",
"header": "Docs",
"multiSelect": true,
"options": [
{ "label": "API Docs", "description": "Endpoint documentation" },
{ "label": "User Guide", "description": "How-to for end users" },
{ "label": "Dev Guide", "description": "Technical implementation details" },
{ "label": "None", "description": "No documentation needed" }
]
}
]
}json
{
"questions": [
{
"question": "Does this feature need external integrations?",
"header": "Integrations",
"multiSelect": true,
"options": [
{ "label": "Database", "description": "New tables, queries, or migrations" },
{ "label": "External APIs", "description": "Third-party service calls" },
{ "label": "Message Queue", "description": "Async processing, events" },
{ "label": "None", "description": "No external integrations needed" }
]
},
{
"question": "Are there dependencies on other features or teams?",
"header": "Dependencies",
"multiSelect": true,
"options": [
{ "label": "Auth System", "description": "User authentication or authorization" },
{ "label": "Other Features", "description": "Depends on features being developed" },
{ "label": "External Team", "description": "Needs input from another team" },
{ "label": "None", "description": "Fully independent feature" }
]
},
{
"question": "How should we handle backwards compatibility?",
"header": "Compat",
"multiSelect": false,
"options": [
{ "label": "Must Maintain", "description": "Cannot break existing clients" },
{ "label": "Version API", "description": "Create new version, deprecate old" },
{ "label": "Breaking OK", "description": "Can make breaking changes" },
{ "label": "Not Applicable", "description": "New feature, no existing users" }
]
},
{
"question": "What documentation is needed?",
"header": "Docs",
"multiSelect": true,
"options": [
{ "label": "API Docs", "description": "Endpoint documentation" },
{ "label": "User Guide", "description": "How-to for end users" },
{ "label": "Dev Guide", "description": "Technical implementation details" },
{ "label": "None", "description": "No documentation needed" }
]
}
]
}Round 4: Clarifying Questions (Context-Dependent)
第四轮:澄清问题(基于上下文)
Based on previous answers, ask follow-up questions. Examples:
If UI layer selected:
json
{
"questions": [
{
"question": "What UI framework/approach should we use?",
"header": "UI Tech",
"multiSelect": false,
"options": [
{ "label": "React", "description": "React components with hooks" },
{ "label": "Vue", "description": "Vue.js components" },
{ "label": "Server-Side", "description": "Server-rendered HTML templates" },
{ "label": "Existing Pattern", "description": "Follow current project conventions" }
]
}
]
}If High Security selected:
json
{
"questions": [
{
"question": "What security measures are required?",
"header": "Security",
"multiSelect": true,
"options": [
{ "label": "Input Validation", "description": "Strict input sanitization" },
{ "label": "Rate Limiting", "description": "Prevent abuse and DoS" },
{ "label": "Audit Logging", "description": "Track all sensitive actions" },
{ "label": "Encryption", "description": "Encrypt data at rest/transit" }
]
}
]
}根据之前的答案,提出后续问题。示例:
如果选择了UI层:
json
{
"questions": [
{
"question": "What UI framework/approach should we use?",
"header": "UI Tech",
"multiSelect": false,
"options": [
{ "label": "React", "description": "React components with hooks" },
{ "label": "Vue", "description": "Vue.js components" },
{ "label": "Server-Side", "description": "Server-rendered HTML templates" },
{ "label": "Existing Pattern", "description": "Follow current project conventions" }
]
}
]
}如果选择了高安全性:
json
{
"questions": [
{
"question": "What security measures are required?",
"header": "Security",
"multiSelect": true,
"options": [
{ "label": "Input Validation", "description": "Strict input sanitization" },
{ "label": "Rate Limiting", "description": "Prevent abuse and DoS" },
{ "label": "Audit Logging", "description": "Track all sensitive actions" },
{ "label": "Encryption", "description": "Encrypt data at rest/transit" }
]
}
]
}Phase 3: Approach Exploration
阶段3:方案探索
After gathering requirements, propose 2-3 approaches:
markdown
undefined收集需求后,提出2-3种方案:
markdown
undefinedApproach Options
方案选项
Option A: [Name] (Recommended)
选项A:[名称](推荐)
Pros: ...
Cons: ...
Best for: ...
优点: ...
缺点: ...
适用场景: ...
Option B: [Name]
选项B:[名称]
Pros: ...
Cons: ...
Best for: ...
优点: ...
缺点: ...
适用场景: ...
Option C: [Name]
选项C:[名称]
Pros: ...
Cons: ...
Best for: ...
Use AskUserQuestion to confirm approach:
```json
{
"questions": [
{
"question": "Which approach would you like to proceed with?",
"header": "Approach",
"multiSelect": false,
"options": [
{ "label": "Option A (Recommended)", "description": "Brief summary of approach A" },
{ "label": "Option B", "description": "Brief summary of approach B" },
{ "label": "Option C", "description": "Brief summary of approach C" }
]
}
]
}优点: ...
缺点: ...
适用场景: ...
使用AskUserQuestion确认方案:
```json
{
"questions": [
{
"question": "Which approach would you like to proceed with?",
"header": "Approach",
"multiSelect": false,
"options": [
{ "label": "Option A (Recommended)", "description": "Brief summary of approach A" },
{ "label": "Option B", "description": "Brief summary of approach B" },
{ "label": "Option C", "description": "Brief summary of approach C" }
]
}
]
}Phase 4: Design Presentation
阶段4:设计展示
Present design in sections (300-500 words each), validate after each:
- Architecture Overview - High-level structure
- Data Model - Entities, relationships, schema
- API Design - Endpoints, request/response
- Component Design - Internal modules, interfaces
- Error Handling - Error cases, recovery strategies
- Testing Strategy - What and how to test
After each section, use AskUserQuestion:
json
{
"questions": [
{
"question": "Does this section look correct?",
"header": "Review",
"multiSelect": false,
"options": [
{ "label": "Looks Good", "description": "Continue to next section" },
{ "label": "Minor Changes", "description": "Small adjustments needed" },
{ "label": "Major Revision", "description": "Significant changes required" },
{ "label": "Questions", "description": "Need clarification before proceeding" }
]
}
]
}分部分展示设计(每部分300-500字),每部分后进行验证:
- 架构概述 - 高层结构
- 数据模型 - 实体、关系、schema
- API设计 - 端点、请求/响应
- 组件设计 - 内部模块、接口
- 错误处理 - 错误场景、恢复策略
- 测试策略 - 测试内容与方式
每部分之后,使用AskUserQuestion:
json
{
"questions": [
{
"question": "Does this section look correct?",
"header": "Review",
"multiSelect": false,
"options": [
{ "label": "Looks Good", "description": "Continue to next section" },
{ "label": "Minor Changes", "description": "Small adjustments needed" },
{ "label": "Major Revision", "description": "Significant changes required" },
{ "label": "Questions", "description": "Need clarification before proceeding" }
]
}
]
}Phase 5: Documentation & Tasks
阶段5:文档与任务
Save Design Document
保存设计文档
Write to :
docs/designs/YYYY-MM-DD-<topic>-design.mdmarkdown
undefined写入:
docs/designs/YYYY-MM-DD-<topic>-design.mdmarkdown
undefinedFeature: [Name]
功能:[名称]
Summary
摘要
[Brief description]
[简要描述]
Requirements
需求
[From Phase 2 answers]
[来自阶段2的答案]
Architecture
架构
[From Phase 4]
[来自阶段4的内容]
Implementation Tasks
实施任务
[Task checklist]
undefined[任务清单]
undefinedGenerate Implementation Tasks
生成实施任务
markdown
undefinedmarkdown
undefinedImplementation Tasks
实施任务
-
Task Title
priority:1phase:modeltime:15min- files: src/file1.py, tests/test_file1.py
- Write failing test for X
- Run test, verify it fails
- Implement minimal code
- Run test, verify it passes
- Commit
-
Another Task
priority:2phase:apideps:Task Titletime:10min- files: src/api.py
- Write failing test
- Implement and verify
- Commit
undefined-
任务标题
priority:1phase:modeltime:15min- files: src/file1.py, tests/test_file1.py
- 为X编写失败的测试用例
- 运行测试,确认测试失败
- 实现最小化代码
- 运行测试,确认测试通过
- 提交代码
-
另一项任务
priority:2phase:apideps:Task Titletime:10min- files: src/api.py
- 编写失败的测试用例
- 实现并验证
- 提交代码
undefinedPhase 6: Execution Handoff
阶段6:执行交接
json
{
"questions": [
{
"question": "How would you like to proceed with implementation?",
"header": "Next Step",
"multiSelect": false,
"options": [
{ "label": "Execute Now", "description": "Run /feature-pipeline in this session" },
{ "label": "New Session", "description": "Start fresh session for implementation" },
{ "label": "Later", "description": "Save design, implement manually later" },
{ "label": "Revise Design", "description": "Go back and modify the design" }
]
}
]
}json
{
"questions": [
{
"question": "How would you like to proceed with implementation?",
"header": "Next Step",
"multiSelect": false,
"options": [
{ "label": "Execute Now", "description": "Run /feature-pipeline in this session" },
{ "label": "New Session", "description": "Start fresh session for implementation" },
{ "label": "Later", "description": "Save design, implement manually later" },
{ "label": "Revise Design", "description": "Go back and modify the design" }
]
}
]
}Key Principles
核心原则
- Batch questions efficiently - Use all 4 question slots when appropriate
- Use multiSelect for non-exclusive options - Layers, features, requirements
- Use single-select for decisions - Approach, timeline, strategy
- Mark recommendations - Add "(Recommended)" to preferred options
- Progressive refinement - General → Specific questions
- Validate incrementally - Check understanding at each phase
- YAGNI ruthlessly - Remove unnecessary features from designs
- 高效批量提问 - 适当情况下充分利用4个问题名额
- 对非互斥选项使用多选 - 层级、功能、需求
- 对决策使用单选 - 方案、时间线、策略
- 标记推荐选项 - 为首选选项添加“(Recommended)”
- 逐步细化 - 从通用问题到具体问题
- 增量验证 - 在每个阶段检查理解情况
- 严格遵循YAGNI原则 - 从设计中移除不必要的功能