specsmd 0.1.7 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/flows/aidlc/templates/construction/bolt-types/ddd-construction-bolt.md +1 -1
- package/flows/simple/README.md +190 -0
- package/flows/simple/agents/agent.md +404 -0
- package/flows/simple/commands/agent.md +60 -0
- package/flows/simple/context-config.yaml +34 -0
- package/flows/simple/memory-bank.yaml +66 -0
- package/flows/simple/quick-start.md +231 -0
- package/flows/simple/skills/design.md +96 -0
- package/flows/simple/skills/execute.md +190 -0
- package/flows/simple/skills/requirements.md +94 -0
- package/flows/simple/skills/tasks.md +136 -0
- package/flows/simple/templates/design-template.md +138 -0
- package/flows/simple/templates/requirements-template.md +85 -0
- package/flows/simple/templates/tasks-template.md +104 -0
- package/lib/constants.js +4 -6
- package/lib/installers/KiroInstaller.js +55 -0
- package/package.json +1 -1
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Memory Bank Configuration for Simple Flow
|
|
2
|
+
# Spec-driven development flow
|
|
3
|
+
# Defines the directory structure for spec artifacts
|
|
4
|
+
|
|
5
|
+
# Structure created at project initialization
|
|
6
|
+
structure:
|
|
7
|
+
- path: specs/
|
|
8
|
+
description: "Feature specifications (requirements, design, tasks)"
|
|
9
|
+
|
|
10
|
+
# Dynamic structure (created per feature)
|
|
11
|
+
# - specs/{feature-name}/requirements.md → Phase 1: Requirements
|
|
12
|
+
# - specs/{feature-name}/design.md → Phase 2: Design
|
|
13
|
+
# - specs/{feature-name}/tasks.md → Phase 3: Tasks
|
|
14
|
+
|
|
15
|
+
# Naming Conventions
|
|
16
|
+
naming:
|
|
17
|
+
features:
|
|
18
|
+
format: "{feature-name}"
|
|
19
|
+
example: "todo-app"
|
|
20
|
+
note: "kebab-case derived from feature idea"
|
|
21
|
+
rules:
|
|
22
|
+
- "Lowercase only"
|
|
23
|
+
- "Spaces become hyphens"
|
|
24
|
+
- "Remove special characters except hyphens"
|
|
25
|
+
- "No consecutive hyphens"
|
|
26
|
+
- "2-4 words maximum"
|
|
27
|
+
|
|
28
|
+
# Schema Definition (Source of Truth for Agent)
|
|
29
|
+
schema:
|
|
30
|
+
specs: "specs/{feature-name}/"
|
|
31
|
+
requirements: "specs/{feature-name}/requirements.md"
|
|
32
|
+
design: "specs/{feature-name}/design.md"
|
|
33
|
+
tasks: "specs/{feature-name}/tasks.md"
|
|
34
|
+
|
|
35
|
+
# Workflow Configuration
|
|
36
|
+
workflow:
|
|
37
|
+
phases:
|
|
38
|
+
- name: requirements
|
|
39
|
+
file: requirements.md
|
|
40
|
+
next: design
|
|
41
|
+
approval_prompt: "Do the requirements look good? If so, we can move on to the design."
|
|
42
|
+
- name: design
|
|
43
|
+
file: design.md
|
|
44
|
+
next: tasks
|
|
45
|
+
approval_prompt: "Does the design look good? If so, we can move on to the implementation plan."
|
|
46
|
+
- name: tasks
|
|
47
|
+
file: tasks.md
|
|
48
|
+
next: null
|
|
49
|
+
approval_prompt: "Do the tasks look good?"
|
|
50
|
+
|
|
51
|
+
# State detection rules
|
|
52
|
+
state_detection:
|
|
53
|
+
NEW: "No spec directory exists"
|
|
54
|
+
REQUIREMENTS_PENDING: "Directory exists but no requirements.md"
|
|
55
|
+
DESIGN_PENDING: "requirements.md exists but no design.md"
|
|
56
|
+
TASKS_PENDING: "design.md exists but no tasks.md"
|
|
57
|
+
COMPLETE: "All three files exist"
|
|
58
|
+
EXECUTE: "All files exist and user requests task execution"
|
|
59
|
+
|
|
60
|
+
# Agent Ownership
|
|
61
|
+
ownership:
|
|
62
|
+
spec-agent:
|
|
63
|
+
- specs
|
|
64
|
+
- requirements
|
|
65
|
+
- design
|
|
66
|
+
- tasks
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
# specsmd Simple Flow Quick Start Guide
|
|
2
|
+
|
|
3
|
+
Get started with spec-driven development in minutes.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npx specsmd@latest install
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Select **Simple** when prompted for the SDLC flow.
|
|
14
|
+
|
|
15
|
+
The installer will:
|
|
16
|
+
|
|
17
|
+
1. Detect available agentic coding tools (Claude Code, Cursor, etc.)
|
|
18
|
+
2. Install the spec agent and skills
|
|
19
|
+
3. Set up slash commands for your tools
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Three-Phase Workflow
|
|
24
|
+
|
|
25
|
+
Simple Flow has three sequential phases:
|
|
26
|
+
|
|
27
|
+
| Phase | Output | Purpose |
|
|
28
|
+
|-------|--------|---------|
|
|
29
|
+
| **Requirements** | `requirements.md` | Define what to build with user stories and EARS criteria |
|
|
30
|
+
| **Design** | `design.md` | Create technical design with architecture and data models |
|
|
31
|
+
| **Tasks** | `tasks.md` | Generate implementation checklist with coding tasks |
|
|
32
|
+
|
|
33
|
+
One agent (`/specsmd-agent`) guides you through all phases.
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Quick Start Flow
|
|
38
|
+
|
|
39
|
+
### Step 1: Create a New Spec
|
|
40
|
+
|
|
41
|
+
Open your AI coding tool and invoke the agent with your feature idea:
|
|
42
|
+
|
|
43
|
+
```text
|
|
44
|
+
/specsmd-agent Create a user authentication system with email login
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
The agent will:
|
|
48
|
+
|
|
49
|
+
1. Derive a feature name (`user-auth`)
|
|
50
|
+
2. Generate a requirements document
|
|
51
|
+
3. Ask for your approval
|
|
52
|
+
|
|
53
|
+
### Step 2: Review Requirements
|
|
54
|
+
|
|
55
|
+
The agent generates:
|
|
56
|
+
|
|
57
|
+
- **Introduction** - Feature summary
|
|
58
|
+
- **Glossary** - Domain terms
|
|
59
|
+
- **Requirements** - User stories with EARS acceptance criteria
|
|
60
|
+
|
|
61
|
+
**Approval phrases:** "yes", "approved", "looks good", "let's continue"
|
|
62
|
+
|
|
63
|
+
**Feedback:** Any other response triggers revision
|
|
64
|
+
|
|
65
|
+
### Step 3: Review Design
|
|
66
|
+
|
|
67
|
+
After requirements approval, the agent generates:
|
|
68
|
+
|
|
69
|
+
- **Architecture** - System overview with Mermaid diagrams
|
|
70
|
+
- **Components** - Interfaces and responsibilities
|
|
71
|
+
- **Data Models** - Types with validation rules
|
|
72
|
+
- **Error Handling** - Strategies for edge cases
|
|
73
|
+
- **Testing Strategy** - Test categories and coverage
|
|
74
|
+
|
|
75
|
+
### Step 4: Review Tasks
|
|
76
|
+
|
|
77
|
+
After design approval, the agent generates:
|
|
78
|
+
|
|
79
|
+
- **Numbered checkbox list** - Incremental coding steps
|
|
80
|
+
- **Requirement references** - Traceability to requirements
|
|
81
|
+
- **Checkpoint tasks** - Verification points
|
|
82
|
+
|
|
83
|
+
### Step 5: Execute Tasks
|
|
84
|
+
|
|
85
|
+
Once all three documents are approved:
|
|
86
|
+
|
|
87
|
+
```text
|
|
88
|
+
/specsmd-agent What's the next task?
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Or specify a task:
|
|
92
|
+
|
|
93
|
+
```text
|
|
94
|
+
/specsmd-agent Execute task 2.1 from user-auth
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
The agent executes one task at a time, then waits for your review.
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## Commands Reference
|
|
102
|
+
|
|
103
|
+
### Single Agent: `/specsmd-agent`
|
|
104
|
+
|
|
105
|
+
| Action | Example |
|
|
106
|
+
|--------|---------|
|
|
107
|
+
| Create new spec | `/specsmd-agent Create a todo app with local storage` |
|
|
108
|
+
| Continue existing | `/specsmd-agent` (lists specs if multiple exist) |
|
|
109
|
+
| Resume specific spec | `/specsmd-agent --spec="todo-app"` |
|
|
110
|
+
| Execute tasks | `/specsmd-agent What's the next task?` |
|
|
111
|
+
| Execute specific task | `/specsmd-agent Execute task 3.2` |
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## File Structure
|
|
116
|
+
|
|
117
|
+
After creating specs, your project will have:
|
|
118
|
+
|
|
119
|
+
```text
|
|
120
|
+
.specsmd/
|
|
121
|
+
├── manifest.yaml # Installation manifest
|
|
122
|
+
└── simple/ # Simple flow resources
|
|
123
|
+
├── agents/agent.md # Agent definition
|
|
124
|
+
├── skills/ # Agent skills
|
|
125
|
+
│ ├── requirements.md # Phase 1
|
|
126
|
+
│ ├── design.md # Phase 2
|
|
127
|
+
│ ├── tasks.md # Phase 3
|
|
128
|
+
│ └── execute.md # Task execution
|
|
129
|
+
├── templates/ # Document templates
|
|
130
|
+
├── memory-bank.yaml # Storage schema
|
|
131
|
+
└── quick-start.md # This file
|
|
132
|
+
|
|
133
|
+
specs/ # Your feature specs
|
|
134
|
+
└── {feature-name}/
|
|
135
|
+
├── requirements.md # What to build
|
|
136
|
+
├── design.md # How to build it
|
|
137
|
+
└── tasks.md # Step-by-step plan
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
## EARS Format
|
|
143
|
+
|
|
144
|
+
Requirements use EARS (Easy Approach to Requirements Syntax):
|
|
145
|
+
|
|
146
|
+
| Pattern | Format |
|
|
147
|
+
|---------|--------|
|
|
148
|
+
| **Event-driven** | WHEN [trigger], THE [system] SHALL [response] |
|
|
149
|
+
| **State-driven** | WHILE [condition], THE [system] SHALL [response] |
|
|
150
|
+
| **Unwanted** | IF [condition], THEN THE [system] SHALL [response] |
|
|
151
|
+
| **Optional** | WHERE [option], THE [system] SHALL [response] |
|
|
152
|
+
|
|
153
|
+
Example:
|
|
154
|
+
|
|
155
|
+
```text
|
|
156
|
+
WHEN user submits login form, THE Auth_System SHALL validate credentials
|
|
157
|
+
IF password is invalid, THEN THE Auth_System SHALL display error message
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
## Key Principles
|
|
163
|
+
|
|
164
|
+
### Generate First, Ask Later
|
|
165
|
+
|
|
166
|
+
The agent generates a draft immediately. Your feedback refines it.
|
|
167
|
+
|
|
168
|
+
### Explicit Approval Required
|
|
169
|
+
|
|
170
|
+
You must explicitly approve each phase before proceeding.
|
|
171
|
+
|
|
172
|
+
### One Phase at a Time
|
|
173
|
+
|
|
174
|
+
Complete each phase before moving to the next.
|
|
175
|
+
|
|
176
|
+
### One Task at a Time
|
|
177
|
+
|
|
178
|
+
During execution, only one task per interaction. Review before continuing.
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
## Tips for Success
|
|
183
|
+
|
|
184
|
+
1. **Be specific** - "User auth with email/password and session management" beats "Login feature"
|
|
185
|
+
2. **Check INCOSE rules** - Singular, Complete, Verifiable, Unambiguous, Consistent
|
|
186
|
+
3. **Include edge cases** - Error scenarios in acceptance criteria
|
|
187
|
+
4. **Review checkpoints** - Verify tests pass during execution
|
|
188
|
+
5. **One task at a time** - Agent pauses after each task. Tell it to keep going (e.g., "continue until done", "go yolo")
|
|
189
|
+
|
|
190
|
+
---
|
|
191
|
+
|
|
192
|
+
## Troubleshooting
|
|
193
|
+
|
|
194
|
+
### Agent doesn't remember context
|
|
195
|
+
|
|
196
|
+
The agent is stateless. It reads spec files at startup. Ensure documents are saved.
|
|
197
|
+
|
|
198
|
+
### Multiple specs exist
|
|
199
|
+
|
|
200
|
+
When you run `/specsmd-agent` without arguments, it lists existing specs and asks which to work on.
|
|
201
|
+
|
|
202
|
+
### Want to start over
|
|
203
|
+
|
|
204
|
+
Delete the spec folder: `rm -rf specs/{feature-name}`
|
|
205
|
+
|
|
206
|
+
### Get help
|
|
207
|
+
|
|
208
|
+
Ask the agent: `/specsmd-agent How do I add a new requirement?`
|
|
209
|
+
|
|
210
|
+
---
|
|
211
|
+
|
|
212
|
+
## When to Use Simple Flow vs AI-DLC
|
|
213
|
+
|
|
214
|
+
| Simple Flow | AI-DLC Flow |
|
|
215
|
+
|-------------|-------------|
|
|
216
|
+
| Quick feature specs | Full development lifecycle |
|
|
217
|
+
| Solo or small team | Multi-team coordination |
|
|
218
|
+
| Prototypes & MVPs | Production systems |
|
|
219
|
+
| Minimal overhead | Full traceability |
|
|
220
|
+
| 1 agent, 3 phases | 4 agents, full methodology |
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
## What's Next?
|
|
225
|
+
|
|
226
|
+
1. Run `/specsmd-agent` with your feature idea
|
|
227
|
+
2. Review and approve requirements → design → tasks
|
|
228
|
+
3. Execute tasks one at a time
|
|
229
|
+
4. Ship your feature!
|
|
230
|
+
|
|
231
|
+
Happy spec-driven development!
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# Skill: Generate Design
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Generate a technical design document based on approved requirements. This is Phase 2 of the spec-driven development workflow.
|
|
6
|
+
|
|
7
|
+
## Preconditions
|
|
8
|
+
|
|
9
|
+
- `requirements.md` exists for this feature
|
|
10
|
+
- User has explicitly approved the requirements
|
|
11
|
+
|
|
12
|
+
## Trigger Conditions
|
|
13
|
+
|
|
14
|
+
- Requirements phase completed and approved
|
|
15
|
+
- User requests updates to existing design
|
|
16
|
+
- User provides feedback on design document
|
|
17
|
+
|
|
18
|
+
## Workflow
|
|
19
|
+
|
|
20
|
+
### Initial Generation
|
|
21
|
+
|
|
22
|
+
1. **Read requirements** from `specs/{feature}/requirements.md`
|
|
23
|
+
2. **Research codebase** if needed:
|
|
24
|
+
- Identify existing patterns and conventions
|
|
25
|
+
- Check existing project standards if available
|
|
26
|
+
- Look for similar implementations to reference
|
|
27
|
+
3. **Generate design.md** following the template:
|
|
28
|
+
- Overview (solution approach, tech decisions)
|
|
29
|
+
- Architecture (Mermaid diagram)
|
|
30
|
+
- Components and Interfaces
|
|
31
|
+
- Data Models (with validation rules)
|
|
32
|
+
- Error Handling (recovery strategies)
|
|
33
|
+
- Testing Strategy
|
|
34
|
+
4. **Write file** to `specs/{feature}/design.md`
|
|
35
|
+
5. **Ask for approval**: "Does the design look good? If so, we can move on to the implementation plan."
|
|
36
|
+
|
|
37
|
+
### Update Flow
|
|
38
|
+
|
|
39
|
+
1. **Read existing** `design.md` and `requirements.md`
|
|
40
|
+
2. **Apply user feedback** - modify specific sections
|
|
41
|
+
3. **Write updated file**
|
|
42
|
+
4. **Ask for approval again**
|
|
43
|
+
|
|
44
|
+
## Critical Rules
|
|
45
|
+
|
|
46
|
+
1. **Design MUST address ALL requirements**
|
|
47
|
+
- Every requirement from Phase 1 should be covered
|
|
48
|
+
- Trace design decisions back to requirements
|
|
49
|
+
|
|
50
|
+
2. **Include Architecture Diagram**
|
|
51
|
+
- Use Mermaid syntax for diagrams
|
|
52
|
+
- Show component relationships and data flow
|
|
53
|
+
|
|
54
|
+
3. **Define Clear Interfaces**
|
|
55
|
+
- Use TypeScript-like syntax for interface definitions
|
|
56
|
+
- Include method signatures with types
|
|
57
|
+
|
|
58
|
+
4. **Error Handling is Mandatory**
|
|
59
|
+
- Define error types and conditions
|
|
60
|
+
- Specify recovery strategies
|
|
61
|
+
|
|
62
|
+
5. **Approval Gate**
|
|
63
|
+
- Do NOT proceed to Tasks phase without explicit approval
|
|
64
|
+
- If gaps found, may return to Requirements phase
|
|
65
|
+
|
|
66
|
+
## Output
|
|
67
|
+
|
|
68
|
+
- **File**: `specs/{feature-name}/design.md`
|
|
69
|
+
- **Approval Prompt**: "Does the design look good? If so, we can move on to the implementation plan."
|
|
70
|
+
|
|
71
|
+
## Design Sections Checklist
|
|
72
|
+
|
|
73
|
+
- [ ] Overview (3-5 sentences)
|
|
74
|
+
- [ ] Architecture diagram (Mermaid)
|
|
75
|
+
- [ ] Architectural principles (2-4 bullet points)
|
|
76
|
+
- [ ] Components and interfaces (all major classes/modules)
|
|
77
|
+
- [ ] Data models (with TypeScript interfaces)
|
|
78
|
+
- [ ] Validation rules (per field)
|
|
79
|
+
- [ ] Error handling (by category)
|
|
80
|
+
- [ ] Recovery strategies
|
|
81
|
+
- [ ] Testing strategy (unit + integration)
|
|
82
|
+
|
|
83
|
+
## Phase Transitions
|
|
84
|
+
|
|
85
|
+
**Backward**: If user identifies missing requirements:
|
|
86
|
+
|
|
87
|
+
- "Let's go back to requirements to add [X]"
|
|
88
|
+
- Return to requirements skill, update, get approval, then return here
|
|
89
|
+
|
|
90
|
+
**Forward**: On explicit approval:
|
|
91
|
+
|
|
92
|
+
- Proceed to tasks skill to generate implementation plan
|
|
93
|
+
|
|
94
|
+
## Template Reference
|
|
95
|
+
|
|
96
|
+
See `.specsmd/simple/templates/design-template.md` for full template structure.
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
# Skill: Execute Tasks
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Execute implementation tasks from an approved tasks.md file. This is the post-spec execution phase.
|
|
6
|
+
|
|
7
|
+
## Preconditions
|
|
8
|
+
|
|
9
|
+
- All three spec files exist:
|
|
10
|
+
- `specs/{feature}/requirements.md`
|
|
11
|
+
- `specs/{feature}/design.md`
|
|
12
|
+
- `specs/{feature}/tasks.md`
|
|
13
|
+
- Tasks have been approved by user
|
|
14
|
+
|
|
15
|
+
## Trigger Conditions
|
|
16
|
+
|
|
17
|
+
- User requests to execute a specific task
|
|
18
|
+
- User asks "what's next" or to continue implementation
|
|
19
|
+
- User references the spec and asks to implement
|
|
20
|
+
|
|
21
|
+
## Workflow
|
|
22
|
+
|
|
23
|
+
### Before ANY Task Execution
|
|
24
|
+
|
|
25
|
+
1. **ALWAYS read ALL three spec files**:
|
|
26
|
+
- requirements.md - Understand what to build
|
|
27
|
+
- design.md - Understand how to build it
|
|
28
|
+
- tasks.md - Understand current progress
|
|
29
|
+
2. **Parse tasks.md** to identify:
|
|
30
|
+
- Completed tasks `- [x]`
|
|
31
|
+
- Pending tasks `- [ ]`
|
|
32
|
+
- Next logical task to execute
|
|
33
|
+
|
|
34
|
+
### Task Selection
|
|
35
|
+
|
|
36
|
+
If user specifies a task:
|
|
37
|
+
|
|
38
|
+
- Execute that specific task
|
|
39
|
+
|
|
40
|
+
If user asks for recommendation ("what's next?", "continue", etc.):
|
|
41
|
+
|
|
42
|
+
- Use the Task Recommendation Algorithm below
|
|
43
|
+
- Present the recommended task to user for confirmation
|
|
44
|
+
|
|
45
|
+
### Task Recommendation Algorithm
|
|
46
|
+
|
|
47
|
+
1. Parse all tasks from tasks.md
|
|
48
|
+
2. Build task list with status (complete/incomplete)
|
|
49
|
+
3. For each incomplete task in order:
|
|
50
|
+
- If task has sub-tasks, check if all previous sub-tasks are complete
|
|
51
|
+
- If task has no sub-tasks, check if all previous numbered tasks are complete
|
|
52
|
+
- Skip optional tasks (`*`) unless user specifically asks
|
|
53
|
+
4. Return first incomplete task with all prerequisites met
|
|
54
|
+
5. If no incomplete tasks remain, announce completion (see Output section)
|
|
55
|
+
|
|
56
|
+
### Task Execution
|
|
57
|
+
|
|
58
|
+
1. **Read task details**:
|
|
59
|
+
- Task description and sub-bullets
|
|
60
|
+
- Requirement references
|
|
61
|
+
2. **Review relevant design sections**:
|
|
62
|
+
- Components mentioned
|
|
63
|
+
- Interfaces to implement
|
|
64
|
+
- Data models involved
|
|
65
|
+
3. **Implement the task**:
|
|
66
|
+
- Write MINIMAL code needed to satisfy the task
|
|
67
|
+
- Follow design specifications
|
|
68
|
+
- Match coding standards if defined
|
|
69
|
+
4. **Verify implementation**:
|
|
70
|
+
- Check code satisfies referenced requirements
|
|
71
|
+
- Run relevant tests if they exist for this component
|
|
72
|
+
- If tests fail, fix before proceeding
|
|
73
|
+
5. **Mark task complete**:
|
|
74
|
+
- Update tasks.md: `- [ ]` → `- [x]`
|
|
75
|
+
- Only mark complete AFTER verification passes
|
|
76
|
+
6. **Recommend next task**:
|
|
77
|
+
- Parse remaining incomplete tasks
|
|
78
|
+
- Identify next task with all prerequisites met
|
|
79
|
+
- If no tasks remain, announce completion
|
|
80
|
+
7. **STOP and wait for user review**
|
|
81
|
+
|
|
82
|
+
## Critical Rules
|
|
83
|
+
|
|
84
|
+
1. **ONE TASK AT A TIME**
|
|
85
|
+
- Execute only the single requested task
|
|
86
|
+
- Never automatically proceed to next task
|
|
87
|
+
- Always stop for user review
|
|
88
|
+
|
|
89
|
+
2. **READ ALL SPECS FIRST**
|
|
90
|
+
- Never execute without reading requirements + design + tasks
|
|
91
|
+
- Context from all three files is essential
|
|
92
|
+
|
|
93
|
+
3. **VERIFY AGAINST REQUIREMENTS**
|
|
94
|
+
- Implementation must satisfy referenced requirements
|
|
95
|
+
- Check acceptance criteria are met
|
|
96
|
+
|
|
97
|
+
4. **UPDATE TASK STATUS**
|
|
98
|
+
- Mark task `[x]` only when truly complete
|
|
99
|
+
- If blocked, leave unchecked and explain
|
|
100
|
+
|
|
101
|
+
5. **WAIT FOR USER**
|
|
102
|
+
- After completing task, pause
|
|
103
|
+
- User decides when to continue
|
|
104
|
+
- Do NOT auto-advance
|
|
105
|
+
|
|
106
|
+
## Output
|
|
107
|
+
|
|
108
|
+
After task completion:
|
|
109
|
+
|
|
110
|
+
```text
|
|
111
|
+
Task [X.Y] complete: [Task description]
|
|
112
|
+
|
|
113
|
+
Changes made:
|
|
114
|
+
- [File 1]: [What was done]
|
|
115
|
+
- [File 2]: [What was done]
|
|
116
|
+
|
|
117
|
+
Verification:
|
|
118
|
+
- Requirements [X.Y, X.Z]: ✓ Satisfied
|
|
119
|
+
- Tests: ✓ Passing (or N/A if no tests for this component)
|
|
120
|
+
|
|
121
|
+
Next recommended task: [X.Z] - [Task description]
|
|
122
|
+
|
|
123
|
+
Ready for the next task? Or would you like to review the changes first?
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
When ALL tasks are complete:
|
|
127
|
+
|
|
128
|
+
```text
|
|
129
|
+
All tasks complete!
|
|
130
|
+
|
|
131
|
+
Summary:
|
|
132
|
+
- [X] tasks executed
|
|
133
|
+
- All requirements covered
|
|
134
|
+
- Tests passing
|
|
135
|
+
|
|
136
|
+
The feature implementation is complete. Consider:
|
|
137
|
+
- Manual testing of the feature
|
|
138
|
+
- Code review before merging
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
## Task Execution Checklist
|
|
142
|
+
|
|
143
|
+
Before executing:
|
|
144
|
+
|
|
145
|
+
- [ ] Read requirements.md
|
|
146
|
+
- [ ] Read design.md
|
|
147
|
+
- [ ] Read tasks.md
|
|
148
|
+
- [ ] Identify specific task to execute
|
|
149
|
+
- [ ] Review requirement references
|
|
150
|
+
- [ ] Review relevant design sections
|
|
151
|
+
|
|
152
|
+
After executing:
|
|
153
|
+
|
|
154
|
+
- [ ] Code changes complete
|
|
155
|
+
- [ ] Verification passed (requirements + tests)
|
|
156
|
+
- [ ] Task marked `[x]` in tasks.md
|
|
157
|
+
- [ ] Next task recommended (or completion announced)
|
|
158
|
+
- [ ] Summary provided to user
|
|
159
|
+
- [ ] STOPPED - waiting for user
|
|
160
|
+
|
|
161
|
+
## Handling Blocked Tasks
|
|
162
|
+
|
|
163
|
+
If task cannot be completed:
|
|
164
|
+
|
|
165
|
+
1. Do NOT mark as complete
|
|
166
|
+
2. Explain the blocker
|
|
167
|
+
3. Suggest resolution:
|
|
168
|
+
- Missing dependency → Execute prerequisite first
|
|
169
|
+
- Design gap → Return to design phase
|
|
170
|
+
- Requirement unclear → Return to requirements phase
|
|
171
|
+
|
|
172
|
+
## Handling Repeated Failures
|
|
173
|
+
|
|
174
|
+
If implementation fails twice on the same task:
|
|
175
|
+
|
|
176
|
+
1. STOP attempting the same approach
|
|
177
|
+
2. Explain what has been tried and why it failed
|
|
178
|
+
3. Suggest alternatives:
|
|
179
|
+
- Different implementation approach
|
|
180
|
+
- Breaking task into smaller sub-tasks
|
|
181
|
+
- Returning to design for clarification
|
|
182
|
+
4. Ask user for guidance before proceeding
|
|
183
|
+
|
|
184
|
+
## Sub-task Handling
|
|
185
|
+
|
|
186
|
+
For tasks with sub-tasks (e.g., 2.1, 2.2, 2.3):
|
|
187
|
+
|
|
188
|
+
- Execute sub-tasks in order
|
|
189
|
+
- Each sub-task is ONE execution
|
|
190
|
+
- Parent task (e.g., 2.) marked complete only when all sub-tasks done
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Skill: Generate Requirements
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Generate a requirements document for a feature using EARS (Easy Approach to Requirements Syntax) format. This is Phase 1 of the spec-driven development workflow.
|
|
6
|
+
|
|
7
|
+
## Trigger Conditions
|
|
8
|
+
|
|
9
|
+
- User provides a new feature idea
|
|
10
|
+
- User requests updates to existing requirements
|
|
11
|
+
- User provides feedback on requirements document
|
|
12
|
+
|
|
13
|
+
## Workflow
|
|
14
|
+
|
|
15
|
+
### Initial Generation (New Spec)
|
|
16
|
+
|
|
17
|
+
1. **Parse feature idea** from user input
|
|
18
|
+
2. **Derive feature name** in kebab-case (e.g., "user-authentication")
|
|
19
|
+
3. **Create directory** at `specs/{feature-name}/`
|
|
20
|
+
4. **Generate requirements.md** following the template:
|
|
21
|
+
- Introduction (2-3 sentences)
|
|
22
|
+
- Glossary (3-10 domain terms)
|
|
23
|
+
- Requirements (3-7 user stories with EARS acceptance criteria)
|
|
24
|
+
5. **Write file** to `specs/{feature-name}/requirements.md`
|
|
25
|
+
6. **Ask for approval**: "Do the requirements look good? If so, we can move on to the design."
|
|
26
|
+
|
|
27
|
+
### Update Flow (Existing Spec)
|
|
28
|
+
|
|
29
|
+
1. **Read existing** `requirements.md`
|
|
30
|
+
2. **Apply user feedback** - modify specific sections as requested
|
|
31
|
+
3. **Write updated file**
|
|
32
|
+
4. **Ask for approval again**
|
|
33
|
+
|
|
34
|
+
## Critical Rules
|
|
35
|
+
|
|
36
|
+
1. **Generate FIRST, ask questions LATER**
|
|
37
|
+
- Do NOT ask clarifying questions before generating
|
|
38
|
+
- Create a draft document as starting point for discussion
|
|
39
|
+
- User feedback refines the document iteratively
|
|
40
|
+
|
|
41
|
+
2. **EARS Format is Mandatory**
|
|
42
|
+
- Every acceptance criterion MUST use an EARS pattern
|
|
43
|
+
- Patterns: WHEN/THE SHALL, WHILE/THE SHALL, IF/THEN THE SHALL, WHERE/THE SHALL
|
|
44
|
+
|
|
45
|
+
3. **Approval Gate**
|
|
46
|
+
- Do NOT proceed to Design phase without explicit approval
|
|
47
|
+
- Approval keywords: "yes", "approved", "looks good", "let's continue", "move on"
|
|
48
|
+
- Any feedback = revise and ask again
|
|
49
|
+
|
|
50
|
+
4. **Glossary Consistency**
|
|
51
|
+
- Define system names and domain terms in glossary
|
|
52
|
+
- Use glossary terms consistently in acceptance criteria
|
|
53
|
+
|
|
54
|
+
## Output
|
|
55
|
+
|
|
56
|
+
- **File**: `specs/{feature-name}/requirements.md`
|
|
57
|
+
- **Approval Prompt**: "Do the requirements look good? If so, we can move on to the design."
|
|
58
|
+
|
|
59
|
+
## Example Generation
|
|
60
|
+
|
|
61
|
+
For input: "Create a todo app with local storage"
|
|
62
|
+
|
|
63
|
+
```markdown
|
|
64
|
+
# Requirements Document
|
|
65
|
+
|
|
66
|
+
## Introduction
|
|
67
|
+
|
|
68
|
+
A simple todo application that allows users to manage their daily tasks through a clean interface. The system enables users to add, view, complete, and remove tasks while maintaining data persistence across sessions using browser local storage.
|
|
69
|
+
|
|
70
|
+
## Glossary
|
|
71
|
+
|
|
72
|
+
- **Todo_System**: The complete todo application including user interface and data management
|
|
73
|
+
- **Task**: A single todo item with a description and completion status
|
|
74
|
+
- **Task_List**: The collection of all tasks managed by the system
|
|
75
|
+
- **Local_Storage**: Browser-based persistent storage mechanism
|
|
76
|
+
|
|
77
|
+
## Requirements
|
|
78
|
+
|
|
79
|
+
### Requirement 1
|
|
80
|
+
|
|
81
|
+
**User Story:** As a user, I want to add new tasks to my todo list, so that I can capture things I need to accomplish.
|
|
82
|
+
|
|
83
|
+
#### Acceptance Criteria
|
|
84
|
+
|
|
85
|
+
1. WHEN a user types a task description and presses Enter, THE Todo_System SHALL create a new task and add it to the Task_List
|
|
86
|
+
2. WHEN a user attempts to add an empty task, THE Todo_System SHALL prevent the addition and maintain the current state
|
|
87
|
+
3. WHEN a new task is added, THE Todo_System SHALL persist the task to Local_Storage immediately
|
|
88
|
+
|
|
89
|
+
[... continue with more requirements ...]
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Template Reference
|
|
93
|
+
|
|
94
|
+
See `.specsmd/simple/templates/requirements-template.md` for full template structure.
|