Skip to content

Commit 78638a9

Browse files
committed
Update templates
1 parent 5333409 commit 78638a9

3 files changed

Lines changed: 126 additions & 28 deletions

File tree

templates/commands/checklist.md

Lines changed: 36 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,24 @@ scripts:
55
ps: scripts/powershell/check-prerequisites.ps1 -Json
66
---
77

8+
## Checklist Purpose
9+
10+
**CRITICAL CLARIFICATION**: Checklists generated by this command are for **requirements validation**, NOT:
11+
- ❌ Verifying code execution or functionality
12+
- ❌ Testing whether code matches the specification
13+
- ❌ Checking implementation correctness
14+
- ❌ Code review or quality assurance
15+
16+
**What checklists ARE for**:
17+
- ✅ Ensuring requirements are clearly captured and complete
18+
- ✅ Identifying ambiguities in specifications or plans
19+
- ✅ Verifying proper scenario coverage across the spec and plan
20+
- ✅ Confirming acceptance criteria are well-defined and measurable
21+
- ✅ Detecting gaps, conflicts, or missing edge cases in requirements
22+
- ✅ Validating that the problem domain is properly understood before implementation
23+
24+
Think of checklists as a **pre-implementation review** to ensure the spec and plan are solid, not a post-implementation verification tool.
25+
826
## User Input
927

1028
```text
@@ -88,23 +106,25 @@ You **MUST** consider the user input before proceeding (if not empty).
88106

89107
Do NOT invent ad-hoc categories; merge sparse categories (<2 items) into the closest higher-signal category.
90108

91-
**Scenario Classification & Coverage**:
109+
**Scenario Classification & Coverage** (Requirements Validation Focus):
92110
- Classify scenarios into: Primary, Alternate, Exception/Error, Recovery/Resilience, Non-Functional
93111
- At least one item per present scenario class; if intentionally absent add: `Confirm intentional absence of <Scenario Class> scenarios`
94112
- Include resilience/rollback coverage when state mutation or migrations occur (partial write, degraded mode, backward compatibility, rollback preconditions)
95113
- If a major scenario lacks acceptance criteria, add an item to define measurable criteria
114+
- **Focus on requirements validation**: Are scenarios clearly defined? Are acceptance criteria measurable? Are edge cases identified in the spec?
96115

97116
**Traceability Requirements**:
98117
- MINIMUM: ≥80% of items MUST include at least one traceability reference
99118
- Each item should include ≥1 of: scenario class tag, spec ref `[Spec §X.Y]`, acceptance criterion `[AC-##]`, or marker `(Assumption)/(Dependency)/(Ambiguity)/(Conflict)`
100119
- If no ID system exists, create an item: `Establish requirement & acceptance criteria ID scheme before proceeding`
101120

102-
**Surface & Resolve Issues**:
121+
**Surface & Resolve Issues** (Pre-Implementation Validation):
103122
- Cluster and create one resolution item per cluster for:
104-
- Ambiguities (vague terms: "fast", "robust", "secure")
105-
- Conflicts (contradictory statements)
106-
- Assumptions (unvalidated premises)
107-
- Dependencies (external systems, feature flags, migrations, upstream APIs)
123+
- Ambiguities (vague terms in spec: "fast", "robust", "secure" - these need quantification)
124+
- Conflicts (contradictory statements in requirements)
125+
- Assumptions (unvalidated premises in the spec or plan)
126+
- Dependencies (external systems, feature flags, migrations, upstream APIs - are they documented?)
127+
- Items should focus on "Is this requirement clear enough to implement?" not "Does the code work?"
108128

109129
**Content Consolidation**:
110130
- Soft cap: If raw candidate items > 40, prioritize by risk/impact and add: `Consolidate remaining low-impact scenarios (see source docs) after priority review`
@@ -119,6 +139,16 @@ You **MUST** consider the user input before proceeding (if not empty).
119139
- Rephrase any such user input into requirement clarity or coverage validation
120140
- Optional brief rationale ONLY if it clarifies requirement intent or risk
121141

142+
**✅ HOW TO PHRASE CHECKLIST ITEMS** (Requirements Validation):
143+
- Good: "Verify error handling scenarios are defined for network failures"
144+
- Bad: "Test error handling for network failures"
145+
- Good: "Confirm acceptance criteria are measurable for performance requirements"
146+
- Bad: "Run performance tests to verify requirements"
147+
- Good: "Identify edge cases for concurrent user access in spec"
148+
- Bad: "Implement thread-safe concurrent access"
149+
- Good: "Clarify ambiguous term 'fast response' with specific timing requirements"
150+
- Bad: "Verify response time is under 100ms"
151+
122152
6. **Structure Reference**: Generate the checklist following the canonical template in `templates/checklist-template.md` for title, meta section, category headings, and ID formatting. If template is unavailable, use: H1 title, purpose/created meta lines, `##` category sections containing `- [ ] CHK### <requirement item>` lines with globally incrementing IDs starting at CHK001.
123153

124154
7. **Report**: Output full path to created checklist, item count, and remind user that each run creates a new file. Summarize:

templates/commands/specify.md

Lines changed: 76 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,25 @@ Given that feature description, do this:
2929
If empty: ERROR "No feature description provided"
3030
2. Extract key concepts from description
3131
Identify: actors, actions, data, constraints
32-
3. For each unclear aspect:
33-
Mark with [NEEDS CLARIFICATION: specific question]
32+
3. For unclear aspects:
33+
- Make informed guesses based on context and industry standards
34+
- Only mark with [NEEDS CLARIFICATION: specific question] if:
35+
- The choice significantly impacts feature scope or user experience
36+
- Multiple reasonable interpretations exist with different implications
37+
- No reasonable default exists
38+
- **LIMIT: Maximum 3 [NEEDS CLARIFICATION] markers total**
39+
- Prioritize clarifications by impact: scope > security/privacy > user experience > technical details
3440
4. Fill User Scenarios & Testing section
3541
If no clear user flow: ERROR "Cannot determine user scenarios"
3642
5. Generate Functional Requirements
3743
Each requirement must be testable
38-
Mark ambiguous requirements
39-
6. Identify Key Entities (if data involved)
40-
7. Return: SUCCESS (spec ready for planning)
44+
Use reasonable defaults for unspecified details (document assumptions in Assumptions section)
45+
6. Define Success Criteria
46+
Create measurable, technology-agnostic outcomes
47+
Include both quantitative metrics (time, performance, volume) and qualitative measures (user satisfaction, task completion)
48+
Each criterion must be verifiable without implementation details
49+
7. Identify Key Entities (if data involved)
50+
8. Return: SUCCESS (spec ready for planning)
4151

4252
4. Write the specification to SPEC_FILE using the template structure, replacing placeholders with concrete details derived from the feature description (arguments) while preserving section order and headings.
4353

@@ -64,9 +74,19 @@ Given that feature description, do this:
6474
- [ ] No [NEEDS CLARIFICATION] markers remain
6575
- [ ] Requirements are testable and unambiguous
6676
- [ ] Success criteria are measurable
77+
- [ ] Success criteria are technology-agnostic (no implementation details)
78+
- [ ] All acceptance scenarios are defined
79+
- [ ] Edge cases are identified
6780
- [ ] Scope is clearly bounded
6881
- [ ] Dependencies and assumptions identified
6982
83+
## Feature Readiness
84+
85+
- [ ] All functional requirements have clear acceptance criteria
86+
- [ ] User scenarios cover primary flows
87+
- [ ] Feature meets measurable outcomes defined in Success Criteria
88+
- [ ] No implementation details leak into specification
89+
7090
## Notes
7191
7292
- Items marked incomplete require spec updates before `/clarify` or `/plan`
@@ -88,7 +108,8 @@ Given that feature description, do this:
88108

89109
- **If [NEEDS CLARIFICATION] markers remain**:
90110
1. Extract all [NEEDS CLARIFICATION: ...] markers from the spec
91-
2. For each clarification needed, present options to user in this format:
111+
2. **LIMIT CHECK**: If more than 3 markers exist, keep only the 3 most critical (by scope/security/UX impact) and make informed guesses for the rest
112+
3. For each clarification needed (max 3), present options to user in this format:
92113

93114
```markdown
94115
## Question [N]: [Topic]
@@ -109,16 +130,16 @@ Given that feature description, do this:
109130
**Your choice**: _[Wait for user response]_
110131
```
111132
112-
3. **CRITICAL - Table Formatting**: Ensure markdown tables are properly formatted:
133+
4. **CRITICAL - Table Formatting**: Ensure markdown tables are properly formatted:
113134
- Use consistent spacing with pipes aligned
114135
- Each cell should have spaces around content: `| Content |` not `|Content|`
115136
- Header separator must have at least 3 dashes: `|--------|`
116137
- Test that the table renders correctly in markdown preview
117-
4. Number questions sequentially (Q1, Q2, Q3, etc.)
118-
5. Present all questions together before waiting for responses
119-
6. Wait for user to respond with their choices for all questions (e.g., "Q1: A, Q2: Custom - [details], Q3: B")
120-
7. Update the spec by replacing each [NEEDS CLARIFICATION] marker with the user's selected or provided answer
121-
8. Re-run validation after all clarifications are resolved
138+
5. Number questions sequentially (Q1, Q2, Q3 - max 3 total)
139+
6. Present all questions together before waiting for responses
140+
7. Wait for user to respond with their choices for all questions (e.g., "Q1: A, Q2: Custom - [details], Q3: B")
141+
8. Update the spec by replacing each [NEEDS CLARIFICATION] marker with the user's selected or provided answer
142+
9. Re-run validation after all clarifications are resolved
122143

123144
d. **Update Checklist**: After each validation iteration, update the checklist file with current pass/fail status
124145

@@ -145,13 +166,46 @@ Given that feature description, do this:
145166

146167
When creating this spec from a user prompt:
147168

148-
1. **Mark all ambiguities**: Use [NEEDS CLARIFICATION: specific question] for any assumption you'd need to make
149-
2. **Don't guess**: If the prompt doesn't specify something (e.g., "login system" without auth method), mark it
150-
3. **Think like a tester**: Every vague requirement should fail the "testable and unambiguous" checklist item
151-
4. **Common underspecified areas**:
152-
- User types and permissions
153-
- Data retention/deletion policies
154-
- Performance targets and scale
155-
- Error handling behaviors
156-
- Integration requirements
157-
- Security/compliance needs
169+
1. **Make informed guesses**: Use context, industry standards, and common patterns to fill gaps
170+
2. **Document assumptions**: Record reasonable defaults in the Assumptions section
171+
3. **Limit clarifications**: Maximum 3 [NEEDS CLARIFICATION] markers - use only for critical decisions that:
172+
- Significantly impact feature scope or user experience
173+
- Have multiple reasonable interpretations with different implications
174+
- Lack any reasonable default
175+
4. **Prioritize clarifications**: scope > security/privacy > user experience > technical details
176+
5. **Think like a tester**: Every vague requirement should fail the "testable and unambiguous" checklist item
177+
6. **Common areas needing clarification** (only if no reasonable default exists):
178+
- Feature scope and boundaries (include/exclude specific use cases)
179+
- User types and permissions (if multiple conflicting interpretations possible)
180+
- Security/compliance requirements (when legally/financially significant)
181+
182+
**Examples of reasonable defaults** (don't ask about these):
183+
184+
- Data retention: Industry-standard practices for the domain
185+
- Performance targets: Standard web/mobile app expectations unless specified
186+
- Error handling: User-friendly messages with appropriate fallbacks
187+
- Authentication method: Standard session-based or OAuth2 for web apps
188+
- Integration patterns: RESTful APIs unless specified otherwise
189+
190+
### Success Criteria Guidelines
191+
192+
Success criteria must be:
193+
194+
1. **Measurable**: Include specific metrics (time, percentage, count, rate)
195+
2. **Technology-agnostic**: No mention of frameworks, languages, databases, or tools
196+
3. **User-focused**: Describe outcomes from user/business perspective, not system internals
197+
4. **Verifiable**: Can be tested/validated without knowing implementation details
198+
199+
**Good examples**:
200+
201+
- "Users can complete checkout in under 3 minutes"
202+
- "System supports 10,000 concurrent users"
203+
- "95% of searches return results in under 1 second"
204+
- "Task completion rate improves by 40%"
205+
206+
**Bad examples** (implementation-focused):
207+
208+
- "API response time is under 200ms" (too technical, use "Users see results instantly")
209+
- "Database can handle 1000 TPS" (implementation detail, use user-facing metric)
210+
- "React components render efficiently" (framework-specific)
211+
- "Redis cache hit rate above 80%" (technology-specific)

templates/spec-template.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,17 @@
5555

5656
- **[Entity 1]**: [What it represents, key attributes without implementation]
5757
- **[Entity 2]**: [What it represents, relationships to other entities]
58+
59+
## Success Criteria *(mandatory)*
60+
61+
<!--
62+
ACTION REQUIRED: Define measurable success criteria.
63+
These must be technology-agnostic and measurable.
64+
-->
65+
66+
### Measurable Outcomes
67+
68+
- **SC-001**: [Measurable metric, e.g., "Users can complete account creation in under 2 minutes"]
69+
- **SC-002**: [Measurable metric, e.g., "System handles 1000 concurrent users without degradation"]
70+
- **SC-003**: [User satisfaction metric, e.g., "90% of users successfully complete primary task on first attempt"]
71+
- **SC-004**: [Business metric, e.g., "Reduce support tickets related to [X] by 50%"]

0 commit comments

Comments
 (0)