specsmd 0.0.0-dev.3 → 0.0.0-dev.31

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.
Files changed (37) hide show
  1. package/README.md +10 -2
  2. package/flows/aidlc/commands/construction-agent.md +5 -1
  3. package/flows/aidlc/commands/inception-agent.md +4 -0
  4. package/flows/aidlc/commands/master-agent.md +4 -0
  5. package/flows/aidlc/commands/operations-agent.md +4 -0
  6. package/flows/aidlc/memory-bank.yaml +2 -1
  7. package/{scripts → flows/aidlc/scripts}/artifact-validator.js +3 -3
  8. package/{scripts → flows/aidlc/scripts}/bolt-complete.js +35 -4
  9. package/{scripts → flows/aidlc/scripts}/status-integrity.js +4 -4
  10. package/flows/aidlc/skills/construction/bolt-list.md +1 -1
  11. package/flows/aidlc/skills/construction/bolt-start.md +31 -3
  12. package/flows/aidlc/skills/construction/bolt-status.md +1 -1
  13. package/flows/aidlc/skills/inception/bolt-plan.md +15 -2
  14. package/flows/aidlc/skills/master/analyze-context.md +1 -1
  15. package/flows/aidlc/templates/construction/bolt-template.md +22 -1
  16. package/flows/aidlc/templates/construction/bolt-types/ddd-construction-bolt.md +69 -11
  17. package/flows/aidlc/templates/construction/bolt-types/simple-construction-bolt.md +5 -0
  18. package/flows/aidlc/templates/standards/decision-index-template.md +32 -0
  19. package/flows/simple/README.md +178 -0
  20. package/flows/simple/agents/agent.md +356 -0
  21. package/flows/simple/commands/agent.md +56 -0
  22. package/flows/simple/context-config.yaml +34 -0
  23. package/flows/simple/memory-bank.yaml +66 -0
  24. package/flows/simple/quick-start.md +219 -0
  25. package/flows/simple/skills/design.md +94 -0
  26. package/flows/simple/skills/execute.md +181 -0
  27. package/flows/simple/skills/requirements.md +94 -0
  28. package/flows/simple/skills/tasks.md +133 -0
  29. package/flows/simple/templates/design-template.md +133 -0
  30. package/flows/simple/templates/requirements-template.md +85 -0
  31. package/flows/simple/templates/tasks-template.md +99 -0
  32. package/lib/analytics/tracker.js +6 -2
  33. package/lib/constants.js +4 -6
  34. package/lib/installer.js +3 -14
  35. package/lib/installers/KiroInstaller.js +43 -0
  36. package/lib/installers/WindsurfInstaller.js +0 -54
  37. package/package.json +1 -1
@@ -0,0 +1,219 @@
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
+ 1. Derive a feature name (`user-auth`)
49
+ 2. Generate a requirements document
50
+ 3. Ask for your approval
51
+
52
+ ### Step 2: Review Requirements
53
+
54
+ The agent generates:
55
+ - **Introduction** - Feature summary
56
+ - **Glossary** - Domain terms
57
+ - **Requirements** - User stories with EARS acceptance criteria
58
+
59
+ **Approval phrases:** "yes", "approved", "looks good", "let's continue"
60
+
61
+ **Feedback:** Any other response triggers revision
62
+
63
+ ### Step 3: Review Design
64
+
65
+ After requirements approval, the agent generates:
66
+ - **Architecture** - System overview with Mermaid diagrams
67
+ - **Components** - Interfaces and responsibilities
68
+ - **Data Models** - Types with validation rules
69
+ - **Error Handling** - Strategies for edge cases
70
+ - **Testing Strategy** - Test categories and coverage
71
+
72
+ ### Step 4: Review Tasks
73
+
74
+ After design approval, the agent generates:
75
+ - **Numbered checkbox list** - Incremental coding steps
76
+ - **Requirement references** - Traceability to requirements
77
+ - **Checkpoint tasks** - Verification points
78
+
79
+ ### Step 5: Execute Tasks
80
+
81
+ Once all three documents are approved:
82
+
83
+ ```text
84
+ /specsmd-agent What's the next task?
85
+ ```
86
+
87
+ Or specify a task:
88
+
89
+ ```text
90
+ /specsmd-agent Execute task 2.1 from user-auth
91
+ ```
92
+
93
+ The agent executes one task at a time, then waits for your review.
94
+
95
+ ---
96
+
97
+ ## Commands Reference
98
+
99
+ ### Single Agent: `/specsmd-agent`
100
+
101
+ | Action | Example |
102
+ |--------|---------|
103
+ | Create new spec | `/specsmd-agent Create a todo app with local storage` |
104
+ | Continue existing | `/specsmd-agent` (lists specs if multiple exist) |
105
+ | Resume specific spec | `/specsmd-agent --spec="todo-app"` |
106
+ | Execute tasks | `/specsmd-agent What's the next task?` |
107
+ | Execute specific task | `/specsmd-agent Execute task 3.2` |
108
+
109
+ ---
110
+
111
+ ## File Structure
112
+
113
+ After creating specs, your project will have:
114
+
115
+ ```text
116
+ .specsmd/
117
+ ├── manifest.yaml # Installation manifest
118
+ └── simple/ # Simple flow resources
119
+ ├── agents/agent.md # Agent definition
120
+ ├── skills/ # Agent skills
121
+ │ ├── requirements.md # Phase 1
122
+ │ ├── design.md # Phase 2
123
+ │ ├── tasks.md # Phase 3
124
+ │ └── execute.md # Task execution
125
+ ├── templates/ # Document templates
126
+ ├── memory-bank.yaml # Storage schema
127
+ └── quick-start.md # This file
128
+
129
+ memory-bank/
130
+ └── specs/ # Your feature specs
131
+ └── {feature-name}/
132
+ ├── requirements.md # What to build
133
+ ├── design.md # How to build it
134
+ └── tasks.md # Step-by-step plan
135
+ ```
136
+
137
+ ---
138
+
139
+ ## EARS Format
140
+
141
+ Requirements use EARS (Easy Approach to Requirements Syntax):
142
+
143
+ | Pattern | Format |
144
+ |---------|--------|
145
+ | **Event-driven** | WHEN [trigger], THE [system] SHALL [response] |
146
+ | **State-driven** | WHILE [condition], THE [system] SHALL [response] |
147
+ | **Unwanted** | IF [condition], THEN THE [system] SHALL [response] |
148
+ | **Optional** | WHERE [option], THE [system] SHALL [response] |
149
+
150
+ Example:
151
+ ```
152
+ WHEN user submits login form, THE Auth_System SHALL validate credentials
153
+ IF password is invalid, THEN THE Auth_System SHALL display error message
154
+ ```
155
+
156
+ ---
157
+
158
+ ## Key Principles
159
+
160
+ ### Generate First, Ask Later
161
+ The agent generates a draft immediately. Your feedback refines it.
162
+
163
+ ### Explicit Approval Required
164
+ You must explicitly approve each phase before proceeding.
165
+
166
+ ### One Phase at a Time
167
+ Complete each phase before moving to the next.
168
+
169
+ ### One Task at a Time
170
+ During execution, only one task per interaction. Review before continuing.
171
+
172
+ ---
173
+
174
+ ## Tips for Success
175
+
176
+ 1. **Be specific** - "User auth with email/password and session management" beats "Login feature"
177
+ 2. **Use the glossary** - Define domain terms for consistent language
178
+ 3. **Check INCOSE rules** - Singular, Complete, Verifiable, Unambiguous, Consistent
179
+ 4. **Include edge cases** - Error scenarios in acceptance criteria
180
+ 5. **Review checkpoints** - Verify tests pass during execution
181
+
182
+ ---
183
+
184
+ ## Troubleshooting
185
+
186
+ ### Agent doesn't remember context
187
+ The agent is stateless. It reads spec files at startup. Ensure documents are saved.
188
+
189
+ ### Multiple specs exist
190
+ When you run `/specsmd-agent` without arguments, it lists existing specs and asks which to work on.
191
+
192
+ ### Want to start over
193
+ Delete the spec folder: `rm -rf memory-bank/specs/{feature-name}`
194
+
195
+ ### Get help
196
+ Ask the agent: `/specsmd-agent How do I add a new requirement?`
197
+
198
+ ---
199
+
200
+ ## When to Use Simple Flow vs AI-DLC
201
+
202
+ | Simple Flow | AI-DLC Flow |
203
+ |-------------|-------------|
204
+ | Quick feature specs | Full development lifecycle |
205
+ | Solo or small team | Multi-team coordination |
206
+ | Prototypes & MVPs | Production systems |
207
+ | Minimal overhead | Full traceability |
208
+ | 1 agent, 3 phases | 4 agents, full methodology |
209
+
210
+ ---
211
+
212
+ ## What's Next?
213
+
214
+ 1. Run `/specsmd-agent` with your feature idea
215
+ 2. Review and approve requirements → design → tasks
216
+ 3. Execute tasks one at a time
217
+ 4. Ship your feature!
218
+
219
+ Happy spec-driven development!
@@ -0,0 +1,94 @@
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 `memory-bank/specs/{feature}/requirements.md`
23
+ 2. **Research codebase** if needed:
24
+ - Identify existing patterns and conventions
25
+ - Check tech stack from `memory-bank/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 `memory-bank/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**: `memory-bank/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
+ - "Let's go back to requirements to add [X]"
87
+ - Return to requirements skill, update, get approval, then return here
88
+
89
+ **Forward**: On explicit approval:
90
+ - Proceed to tasks skill to generate implementation plan
91
+
92
+ ## Template Reference
93
+
94
+ See `.specsmd/simple/templates/design-template.md` for full template structure.
@@ -0,0 +1,181 @@
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
+ - `memory-bank/specs/{feature}/requirements.md`
11
+ - `memory-bank/specs/{feature}/design.md`
12
+ - `memory-bank/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
+ - Execute that specific task
38
+
39
+ If user asks for recommendation ("what's next?", "continue", etc.):
40
+ - Use the Task Recommendation Algorithm below
41
+ - Present the recommended task to user for confirmation
42
+
43
+ ### Task Recommendation Algorithm
44
+
45
+ 1. Parse all tasks from tasks.md
46
+ 2. Build task list with status (complete/incomplete)
47
+ 3. For each incomplete task in order:
48
+ - If task has sub-tasks, check if all previous sub-tasks are complete
49
+ - If task has no sub-tasks, check if all previous numbered tasks are complete
50
+ - Skip optional tasks (`*`) unless user specifically asks
51
+ 4. Return first incomplete task with all prerequisites met
52
+ 5. If no incomplete tasks remain, announce completion (see Output section)
53
+
54
+ ### Task Execution
55
+
56
+ 1. **Read task details**:
57
+ - Task description and sub-bullets
58
+ - Requirement references
59
+ 2. **Review relevant design sections**:
60
+ - Components mentioned
61
+ - Interfaces to implement
62
+ - Data models involved
63
+ 3. **Implement the task**:
64
+ - Write MINIMAL code needed to satisfy the task
65
+ - Follow design specifications
66
+ - Match coding standards if defined
67
+ 4. **Verify implementation**:
68
+ - Check code satisfies referenced requirements
69
+ - Run relevant tests if they exist for this component
70
+ - If tests fail, fix before proceeding
71
+ 5. **Mark task complete**:
72
+ - Update tasks.md: `- [ ]` → `- [x]`
73
+ - Only mark complete AFTER verification passes
74
+ 6. **Recommend next task**:
75
+ - Parse remaining incomplete tasks
76
+ - Identify next task with all prerequisites met
77
+ - If no tasks remain, announce completion
78
+ 7. **STOP and wait for user review**
79
+
80
+ ## Critical Rules
81
+
82
+ 1. **ONE TASK AT A TIME**
83
+ - Execute only the single requested task
84
+ - Never automatically proceed to next task
85
+ - Always stop for user review
86
+
87
+ 2. **READ ALL SPECS FIRST**
88
+ - Never execute without reading requirements + design + tasks
89
+ - Context from all three files is essential
90
+
91
+ 3. **VERIFY AGAINST REQUIREMENTS**
92
+ - Implementation must satisfy referenced requirements
93
+ - Check acceptance criteria are met
94
+
95
+ 4. **UPDATE TASK STATUS**
96
+ - Mark task `[x]` only when truly complete
97
+ - If blocked, leave unchecked and explain
98
+
99
+ 5. **WAIT FOR USER**
100
+ - After completing task, pause
101
+ - User decides when to continue
102
+ - Do NOT auto-advance
103
+
104
+ ## Output
105
+
106
+ After task completion:
107
+ ```
108
+ Task [X.Y] complete: [Task description]
109
+
110
+ Changes made:
111
+ - [File 1]: [What was done]
112
+ - [File 2]: [What was done]
113
+
114
+ Verification:
115
+ - Requirements [X.Y, X.Z]: ✓ Satisfied
116
+ - Tests: ✓ Passing (or N/A if no tests for this component)
117
+
118
+ Next recommended task: [X.Z] - [Task description]
119
+
120
+ Ready for the next task? Or would you like to review the changes first?
121
+ ```
122
+
123
+ When ALL tasks are complete:
124
+ ```
125
+ All tasks complete!
126
+
127
+ Summary:
128
+ - [X] tasks executed
129
+ - All requirements covered
130
+ - Tests passing
131
+
132
+ The feature implementation is complete. Consider:
133
+ - Manual testing of the feature
134
+ - Code review before merging
135
+ ```
136
+
137
+ ## Task Execution Checklist
138
+
139
+ Before executing:
140
+ - [ ] Read requirements.md
141
+ - [ ] Read design.md
142
+ - [ ] Read tasks.md
143
+ - [ ] Identify specific task to execute
144
+ - [ ] Review requirement references
145
+ - [ ] Review relevant design sections
146
+
147
+ After executing:
148
+ - [ ] Code changes complete
149
+ - [ ] Verification passed (requirements + tests)
150
+ - [ ] Task marked `[x]` in tasks.md
151
+ - [ ] Next task recommended (or completion announced)
152
+ - [ ] Summary provided to user
153
+ - [ ] STOPPED - waiting for user
154
+
155
+ ## Handling Blocked Tasks
156
+
157
+ If task cannot be completed:
158
+ 1. Do NOT mark as complete
159
+ 2. Explain the blocker
160
+ 3. Suggest resolution:
161
+ - Missing dependency → Execute prerequisite first
162
+ - Design gap → Return to design phase
163
+ - Requirement unclear → Return to requirements phase
164
+
165
+ ## Handling Repeated Failures
166
+
167
+ If implementation fails twice on the same task:
168
+ 1. STOP attempting the same approach
169
+ 2. Explain what has been tried and why it failed
170
+ 3. Suggest alternatives:
171
+ - Different implementation approach
172
+ - Breaking task into smaller sub-tasks
173
+ - Returning to design for clarification
174
+ 4. Ask user for guidance before proceeding
175
+
176
+ ## Sub-task Handling
177
+
178
+ For tasks with sub-tasks (e.g., 2.1, 2.2, 2.3):
179
+ - Execute sub-tasks in order
180
+ - Each sub-task is ONE execution
181
+ - 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 `memory-bank/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 `memory-bank/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**: `memory-bank/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.