requirements-clarification
0
总安装量
1
周安装量
安装命令
npx skills add https://github.com/youngger9765/career_ios_backend --skill requirements-clarification
Agent 安装分布
amp
1
cline
1
opencode
1
cursor
1
continue
1
kimi-cli
1
Skill 文档
Requirements Clarification Skill
Purpose
STOP implementing before fully understanding requirements.
Prevent the common problem:
客æ¶éæ± â Agent çè§£ä¸å®æ´ â 實ä½åå·® â æµªè²»æééå
Solution: Force clarification BEFORE any code is written.
Auto-Activation
Triggers when user mentions:
- â “éæ±”, “requirement”, “客æ¶è¦”, “æ¡ä¸»èªª”
- â “æ°åè½”, “ç¨æ¶æ³è¦”, “æ³å ä¸å”
- ⠓客æ¶å饔, “éè¦æ¹æ”, “æè©²è¦”
CARIO Clarification Framework
Structured format for requirements clarification:
ð Context (èæ¯)
- What are we working on?
- What's the current state?
â Ambiguity (䏿¸
æ¥çå°æ¹)
- What's unclear or ambiguous?
- What assumptions are we making?
ð¯ Options (å¯è½ççè§£)
- Option A: [interpretation 1]
- Option B: [interpretation 2]
- Option C: [interpretation 3]
ð¡ Recommendation (建è°)
- Recommended approach and why
- Trade-offs of this choice
â¡ Impact (å½±é¿ç¯å)
- What components are affected?
- What tests are needed?
- Estimated complexity?
Mandatory Workflow
Step 1: STOP and Analyze
When user provides requirements, DO NOT implement immediately.
Instead:
- Read the requirement carefully
- Identify ALL ambiguities
- List ALL assumptions
- Generate clarifying questions
Step 2: Use CARIO Format
Example:
User: "客æ¶èªªè¦å ä¸åæå°åè½"
ð Context
- Working on: career_ios_backend client management
- Current state: Clients can only be listed, no search
â Ambiguity
1. æå°ä»éº¼ï¼(Search by what?)
- Client name?
- Client code?
- Email?
- All fields?
2. æå°æ¹å¼ï¼(Search type?)
- Exact match?
- Partial match?
- Fuzzy search?
3. æå°çµæï¼(Results?)
- Paginated?
- How many per page?
- Sorting?
ð¯ Options
Option A: Simple name search (exact match)
- Fastest to implement
- Limited functionality
- Good for MVP
Option B: Multi-field search (partial match)
- Name, email, code searchable
- More flexible
- Moderate complexity
Option C: Full-text search (fuzzy)
- Search all fields
- Most powerful
- Requires additional setup
ð¡ Recommendation
Start with Option B (multi-field partial match):
- Balances power and simplicity
- Covers 80% of use cases
- Can upgrade to Option C later if needed
â¡ Impact
Affected:
- app/api/clients.py (add search endpoint)
- app/schemas/client.py (add search request schema)
- tests/integration/test_clients_api.py (add search tests)
Complexity: ð¡ Medium (2-3 hours)
Tests needed: 3-5 integration tests
Step 3: Get User Confirmation
Use AskUserQuestion tool:
AskUserQuestion(
questions=[{
"question": "å®¢æ¶æå°åè½æè©²æå°åªäºæ¬ä½ï¼",
"header": "Search Fields",
"multiSelect": True,
"options": [
{
"label": "å§å (Name)",
"description": "æå°å®¢æ¶å§å"
},
{
"label": "Email",
"description": "æå° Email å°å"
},
{
"label": "客æ¶ä»£ç¢¼ (Code)",
"description": "æå°å®¢æ¶ä»£ç¢¼"
},
{
"label": "å
¨é¨æ¬ä½ (All)",
"description": "æå°æææåæ¬ä½"
}
]
}]
)
Step 4: Document Understanding
Create a mini-spec:
## Feature: Client Search
### User Story
As a counselor, I want to search for clients by name/email/code,
so that I can quickly find the client I need.
### Acceptance Criteria
- [ ] Can search by client name (partial match)
- [ ] Can search by email (partial match)
- [ ] Can search by client code (exact match)
- [ ] Returns paginated results (10 per page)
- [ ] Case-insensitive search
### API Design
GET /api/v1/clients/search?q={query}&page={page}
Response:
{
"items": [...],
"total": 42,
"page": 1,
"pages": 5
}
### Tests Required
1. test_search_by_name_success
2. test_search_by_email_success
3. test_search_by_code_success
4. test_search_case_insensitive
5. test_search_pagination
Step 5: Only THEN Start TDD
After confirmation, activate tdd-workflow:
â
Requirements clear
â
User confirmed understanding
â
Acceptance criteria defined
â NOW safe to write tests and implement
Common Ambiguity Patterns
Pattern 1: Vague Verbs
â Ambiguous:
- “èç客涔 (handle clients)
- “管çè³æ” (manage data)
- “æ¹é²æè½” (improve performance)
â Clarify:
- What action? (Create? Update? Delete? Search?)
- What data? (Which fields?)
- How much improvement? (What metric? Target?)
Pattern 2: Missing Details
â Incomplete:
- “å ä¸åå ±å” (add a report)
â Clarify:
- What data in report?
- What format? (PDF? Excel? HTML?)
- Who can access?
- How to generate? (On-demand? Scheduled?)
Pattern 3: Assumed Context
â Assumption:
- “客æ¶èªªè¦æ¹æé樣” (client wants it changed)
â Clarify:
- Changed from what state?
- Changed to what state?
- Why the change?
- What stays the same?
Clarification Questions Checklist
Before implementing ANY feature, answer:
Functional Questions
- What exactly should it do?
- What should it NOT do?
- What are edge cases?
- What happens on error?
Data Questions
- What data is needed?
- Where does data come from?
- What’s the data format?
- What are validation rules?
Integration Questions
- What other features are affected?
- What APIs are involved?
- What database changes needed?
- What tests are required?
User Experience Questions
- Who uses this feature?
- When do they use it?
- How do they trigger it?
- What feedback do they get?
Integration with Other Skills
Works with tdd-workflow
1. requirements-clarification (THIS SKILL)
- Clarify requirements
- Get user confirmation
- Document understanding
â
2. tdd-workflow
- Write tests based on acceptance criteria
- Implement to pass tests
- Refactor
Works with api-development
requirements-clarification
â Define API contract
â Clarify request/response format
â
api-development
â Implement FastAPI endpoint
â Follow defined contract
Real Example: Before and After
â Before (No Clarification)
User: "客æ¶èªªè¦è½å¯åºå ±å"
Agent: (ç´æ¥å¯¦ä½)
- Creates PDF export
- Only exports basic info
- No customization
Result: â 客æ¶è¦çæ¯ Excelï¼è¦èªè¨æ¬ä½
â æµªè²» 2 å°æéå
â After (With Clarification)
User: "客æ¶èªªè¦è½å¯åºå ±å"
Agent: (åå requirements-clarification skill)
ð Context: è«®è©¢å ±åå¯åºåè½
â Ambiguity:
1. å¯åºæ ¼å¼ï¼PDF? Excel? é½è¦ï¼
2. å¯åºå
§å®¹ï¼åªäºæ¬ä½ï¼
3. å¯åºææ©ï¼æåï¼èªåï¼
4. 客製åï¼è½é¸ææ¬ä½åï¼
ð¯ Options:
A. PDF only (fixed format)
B. Excel only (customizable)
C. Both formats
ð¡ Recommendation: Option B (Excel)
- 客æ¶é常è¦é²ä¸æ¥åæ
- Excel æ´éæ´»
- å¯èªè¨æ¬ä½
â¡ Impact: Medium complexity
(Gets user confirmation)
User: "å°ï¼è¦ Excelï¼èä¸è¦è½é¸æåªäºæ¬ä½"
Agent: â
æç¢ºäºï¼ç¾å¨ç¨ TDD éç¼...
Result: â
䏿¬¡åå°ï¼å®¢æ¶æ»¿æ
Anti-Patterns to Avoid
â Assuming Without Asking
# Bad
user_input = "å ä¸åæå°"
# â ç´æ¥åè¨æ¯å
¨ææå°ï¼å¯¦ä½å¾æç¼ç¾è¦çæ¯ç°¡å®ç¯©é¸
â Implementing Multiple Interpretations
# Bad
"ä¸ç¢ºå®è¦åªåï¼æä»¥å
¨é¨é½å"
# â æµªè²»æéï¼å¯è½é½ä¸æ¯å®¢æ¶è¦ç
â Asking Too Many Questions
# Bad
"æ 20 ååé¡è¦åä½ ..."
# â ç¨æ¶åç
©ï¼å¯§é¡çµ¦æ¨¡ç³éæ±
# Good
"æ 3 åééµåé¡ï¼æ¾æ¸
å¾å°±è½éå§ï¼"
# â èç¦æ ¸å¿ï¼å¿«é決ç
Success Metrics
Before This Skill
- â±ï¸ éæ±çè§£é¯èª¤çï¼40%
- â±ï¸ éåæéï¼å¹³å 2 å°æ/åè½
- ð¤ å®¢æ¶æ»¿æåº¦ï¼ä¸ç
After This Skill
- â éæ±çè§£é¯èª¤çï¼<5%
- â éåæéï¼å¹¾ä¹æ²æ
- ð å®¢æ¶æ»¿æåº¦ï¼é«
Time Investment:
- Clarification: +10 minutes
- Saved rework: -2 hours
- Net benefit: +1h 50m per feature
Quick Start Template
Copy this whenever receiving requirements:
## Requirement Clarification
User Request: "[ç¨æ¶å話]"
ð Context:
-
â Ambiguity:
1.
2.
3.
ð¯ Options:
A.
B.
C.
ð¡ Recommendation:
-
â¡ Impact:
- Files affected:
- Tests needed:
- Complexity:
---
Questions for user:
1.
2.
3.
Related Skills
- tdd-workflow: Implement after clarification
- api-development: API contract definition
- prd-workflow: Document requirements formally
Skill Version: v1.0 Last Updated: 2025-12-25 Project: career_ios_backend Philosophy: “Measure twice, cut once” – å ææ¸ æ¥ååæ