specsmd 0.0.1

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 (83) hide show
  1. package/README.md +300 -0
  2. package/bin/cli.js +21 -0
  3. package/flows/aidlc/README.md +372 -0
  4. package/flows/aidlc/agents/construction-agent.md +81 -0
  5. package/flows/aidlc/agents/inception-agent.md +95 -0
  6. package/flows/aidlc/agents/master-agent.md +61 -0
  7. package/flows/aidlc/agents/operations-agent.md +89 -0
  8. package/flows/aidlc/commands/construction-agent.md +63 -0
  9. package/flows/aidlc/commands/inception-agent.md +55 -0
  10. package/flows/aidlc/commands/master-agent.md +47 -0
  11. package/flows/aidlc/commands/operations-agent.md +77 -0
  12. package/flows/aidlc/context-config.yaml +41 -0
  13. package/flows/aidlc/memory-bank.yaml +104 -0
  14. package/flows/aidlc/quick-start.md +315 -0
  15. package/flows/aidlc/skills/construction/bolt-list.md +163 -0
  16. package/flows/aidlc/skills/construction/bolt-replan.md +343 -0
  17. package/flows/aidlc/skills/construction/bolt-start.md +289 -0
  18. package/flows/aidlc/skills/construction/bolt-status.md +185 -0
  19. package/flows/aidlc/skills/construction/navigator.md +196 -0
  20. package/flows/aidlc/skills/inception/bolt-plan.md +338 -0
  21. package/flows/aidlc/skills/inception/context.md +171 -0
  22. package/flows/aidlc/skills/inception/intent-create.md +211 -0
  23. package/flows/aidlc/skills/inception/intent-list.md +124 -0
  24. package/flows/aidlc/skills/inception/navigator.md +207 -0
  25. package/flows/aidlc/skills/inception/requirements.md +227 -0
  26. package/flows/aidlc/skills/inception/review.md +248 -0
  27. package/flows/aidlc/skills/inception/story-create.md +304 -0
  28. package/flows/aidlc/skills/inception/units.md +271 -0
  29. package/flows/aidlc/skills/master/analyze-context.md +132 -0
  30. package/flows/aidlc/skills/master/answer-question.md +141 -0
  31. package/flows/aidlc/skills/master/explain-flow.md +146 -0
  32. package/flows/aidlc/skills/master/project-init.md +281 -0
  33. package/flows/aidlc/skills/master/route-request.md +126 -0
  34. package/flows/aidlc/skills/operations/build.md +237 -0
  35. package/flows/aidlc/skills/operations/deploy.md +259 -0
  36. package/flows/aidlc/skills/operations/monitor.md +265 -0
  37. package/flows/aidlc/skills/operations/navigator.md +209 -0
  38. package/flows/aidlc/skills/operations/verify.md +224 -0
  39. package/flows/aidlc/templates/construction/bolt-template.md +193 -0
  40. package/flows/aidlc/templates/construction/bolt-types/bdd-construction-bolt.md +250 -0
  41. package/flows/aidlc/templates/construction/bolt-types/ddd-construction-bolt/adr-template.md +49 -0
  42. package/flows/aidlc/templates/construction/bolt-types/ddd-construction-bolt/ddd-01-domain-model-template.md +55 -0
  43. package/flows/aidlc/templates/construction/bolt-types/ddd-construction-bolt/ddd-02-technical-design-template.md +67 -0
  44. package/flows/aidlc/templates/construction/bolt-types/ddd-construction-bolt/ddd-03-test-report-template.md +62 -0
  45. package/flows/aidlc/templates/construction/bolt-types/ddd-construction-bolt.md +528 -0
  46. package/flows/aidlc/templates/construction/bolt-types/simple-construction-bolt.md +273 -0
  47. package/flows/aidlc/templates/construction/bolt-types/spike-bolt.md +240 -0
  48. package/flows/aidlc/templates/construction/bolt-types/tdd-construction-bolt.md +259 -0
  49. package/flows/aidlc/templates/construction/construction-log-template.md +129 -0
  50. package/flows/aidlc/templates/construction/standards/coding-standards.md +29 -0
  51. package/flows/aidlc/templates/construction/standards/system-architecture.md +22 -0
  52. package/flows/aidlc/templates/construction/standards/tech-stack.md +19 -0
  53. package/flows/aidlc/templates/inception/inception-log-template.md +134 -0
  54. package/flows/aidlc/templates/inception/project/README.md +55 -0
  55. package/flows/aidlc/templates/inception/requirements-template.md +144 -0
  56. package/flows/aidlc/templates/inception/stories-template.md +38 -0
  57. package/flows/aidlc/templates/inception/story-template.md +147 -0
  58. package/flows/aidlc/templates/inception/system-context-template.md +29 -0
  59. package/flows/aidlc/templates/inception/unit-brief-template.md +177 -0
  60. package/flows/aidlc/templates/inception/units-template.md +52 -0
  61. package/flows/aidlc/templates/standards/catalog.yaml +345 -0
  62. package/flows/aidlc/templates/standards/coding-standards.guide.md +553 -0
  63. package/flows/aidlc/templates/standards/data-stack.guide.md +162 -0
  64. package/flows/aidlc/templates/standards/tech-stack.guide.md +280 -0
  65. package/lib/InstallerFactory.js +36 -0
  66. package/lib/cli-utils.js +372 -0
  67. package/lib/constants.js +31 -0
  68. package/lib/installer.js +314 -0
  69. package/lib/installers/AntigravityInstaller.js +22 -0
  70. package/lib/installers/ClaudeInstaller.js +85 -0
  71. package/lib/installers/ClineInstaller.js +21 -0
  72. package/lib/installers/CodexInstaller.js +21 -0
  73. package/lib/installers/CopilotInstaller.js +113 -0
  74. package/lib/installers/CursorInstaller.js +63 -0
  75. package/lib/installers/GeminiInstaller.js +75 -0
  76. package/lib/installers/KiroInstaller.js +22 -0
  77. package/lib/installers/OpenCodeInstaller.js +22 -0
  78. package/lib/installers/RooInstaller.js +22 -0
  79. package/lib/installers/ToolInstaller.js +73 -0
  80. package/lib/installers/WindsurfInstaller.js +76 -0
  81. package/lib/markdown-validator.ts +175 -0
  82. package/lib/yaml-validator.ts +99 -0
  83. package/package.json +65 -0
@@ -0,0 +1,273 @@
1
+ # Bolt Type: Simple Construction
2
+
3
+ ## Mandatory Output Rules (READ FIRST)
4
+
5
+ - 🚫 **NEVER** use ASCII tables for options - they break at different terminal widths
6
+ - ✅ **ALWAYS** use numbered list format: `N - **Option**: Description`
7
+ - ✅ **ALWAYS** use status indicators: ✅ (done) ⏳ (current) [ ] (pending) 🚫 (blocked)
8
+
9
+ ## Success Metrics
10
+
11
+ - ✅ Activities presented as numbered lists (not tables)
12
+ - ✅ Stage progress shown with status indicators
13
+ - ✅ Human checkpoints clearly marked
14
+
15
+ ## Failure Modes
16
+
17
+ - ❌ Using ASCII table for activities
18
+ - ❌ Auto-advancing without human confirmation
19
+ - ❌ Skipping stages
20
+
21
+ ---
22
+
23
+ ## ⛔ CRITICAL: Stage Execution Sequence
24
+
25
+ **Stages MUST be executed in this exact order:**
26
+
27
+ ```text
28
+ Stage 1: Spec → Stage 2: Implement → Stage 3: Test
29
+ ```
30
+
31
+ **Stage Overview:**
32
+
33
+ - ✅/[ ] **1. Spec** (Required) → `spec.md`
34
+ - ✅/[ ] **2. Implement** (Required) → Source code
35
+ - ✅/[ ] **3. Test** (Required) → Tests + `test-report.md`
36
+
37
+ **Rules**:
38
+
39
+ - Each stage MUST be completed before the next begins
40
+ - **⛔ Human validation is MANDATORY at each stage checkpoint - STOP and WAIT for approval**
41
+ - NEVER auto-advance to next stage without explicit user confirmation
42
+
43
+ ---
44
+
45
+ ## Metadata
46
+
47
+ ```yaml
48
+ bolt_type: simple-construction-bolt
49
+ name: Simple Construction Bolt
50
+ description: Lightweight construction for UI, integrations, utilities, and non-DDD work
51
+ version: 1.0.0
52
+ suitable_for:
53
+ - Frontend pages and components
54
+ - Simple backend endpoints
55
+ - Integrations with external APIs
56
+ - Utilities and helper modules
57
+ - Scripts and automation
58
+ - CLI commands
59
+ stages_count: 3
60
+ ```
61
+
62
+ ---
63
+
64
+ ## Overview
65
+
66
+ This bolt type provides a lightweight construction process for work that doesn't need full domain modeling. It's ideal for UI work, integrations, utilities, and any code where the design is straightforward.
67
+
68
+ **Best For**:
69
+
70
+ - Frontend pages, components, layouts
71
+ - Simple CRUD endpoints without complex business logic
72
+ - Third-party API integrations
73
+ - Utility functions and helpers
74
+ - CLI commands and scripts
75
+ - Configuration and setup tasks
76
+
77
+ **NOT For** (use `ddd-construction-bolt` instead):
78
+
79
+ - Complex domain logic with business rules
80
+ - Systems requiring bounded contexts
81
+ - Services with rich domain models
82
+
83
+ ---
84
+
85
+ ## Stages
86
+
87
+ ### Stage 1: Spec
88
+
89
+ **Objective**: Define what to build with clear requirements
90
+
91
+ **Duration**: Minutes to hours (typically 15-60 minutes)
92
+
93
+ **Activities**:
94
+
95
+ 1 - **Review stories**: Understand what needs to be built
96
+ 2 - **Define scope**: List specific deliverables
97
+ 3 - **Identify dependencies**: External APIs, other units, libraries
98
+ 4 - **Define acceptance criteria**: How will we know it's done?
99
+ 5 - **Note technical approach**: High-level implementation notes
100
+
101
+ **Artifact**: `spec.md`
102
+ **Location**: `memory-bank/bolts/{bolt-id}/spec.md`
103
+
104
+ **Template Structure**:
105
+
106
+ ```markdown
107
+ ---
108
+ stage: spec
109
+ bolt: {bolt-id}
110
+ created: {timestamp}
111
+ ---
112
+
113
+ ## Spec: {unit-name}
114
+
115
+ ### Objective
116
+ {What this bolt will accomplish}
117
+
118
+ ### Deliverables
119
+ - {Deliverable 1}
120
+ - {Deliverable 2}
121
+
122
+ ### Dependencies
123
+ - {Dependency 1}: {why needed}
124
+
125
+ ### Technical Approach
126
+ {Brief notes on how to implement}
127
+
128
+ ### Acceptance Criteria
129
+ - [ ] {Criterion 1}
130
+ - [ ] {Criterion 2}
131
+ ```
132
+
133
+ **Completion Criteria**:
134
+
135
+ - [ ] Stories reviewed and understood
136
+ - [ ] Deliverables clearly defined
137
+ - [ ] Dependencies identified
138
+ - [ ] Acceptance criteria documented
139
+
140
+ **⛔ HUMAN Checkpoint**: Present spec summary and **STOP**. Wait for user to confirm before proceeding to Stage 2.
141
+
142
+ ---
143
+
144
+ ### Stage 2: Implement
145
+
146
+ **Objective**: Write the code
147
+
148
+ **Duration**: Hours (varies by complexity)
149
+
150
+ **Activities**:
151
+
152
+ 1 - **Setup structure**: Create files and folders
153
+ 2 - **Implement core functionality**: Build the main features
154
+ 3 - **Handle edge cases**: Error handling, validation
155
+ 4 - **Add documentation**: Code comments, JSDoc/docstrings
156
+ 5 - **Run linting**: Ensure code style compliance
157
+
158
+ **Artifact**: Source code
159
+ **Location**: As defined in project structure (e.g., `src/`, `app/`, `pages/`)
160
+
161
+ **Completion Criteria**:
162
+
163
+ - [ ] All deliverables from spec implemented
164
+ - [ ] Code follows project coding standards
165
+ - [ ] Linting passes
166
+ - [ ] Code is documented
167
+
168
+ **⛔ HUMAN Checkpoint**: Present implementation summary and **STOP**. Wait for user to confirm before proceeding to Stage 3.
169
+
170
+ ---
171
+
172
+ ### Stage 3: Test
173
+
174
+ **Objective**: Verify the implementation works correctly
175
+
176
+ **Duration**: Minutes to hours (typically 30-120 minutes)
177
+
178
+ **Activities**:
179
+
180
+ 1 - **Write unit tests**: Test individual functions/components
181
+ 2 - **Write integration tests**: Test API endpoints or component interactions
182
+ 3 - **Run test suite**: Execute all tests
183
+ 4 - **Verify acceptance criteria**: Check against spec
184
+ 5 - **Document results**: Create test report
185
+
186
+ **Artifact**: `test-report.md`
187
+ **Location**: `memory-bank/bolts/{bolt-id}/test-report.md`
188
+
189
+ **Template Structure**:
190
+
191
+ ```markdown
192
+ ---
193
+ stage: test
194
+ bolt: {bolt-id}
195
+ created: {timestamp}
196
+ ---
197
+
198
+ ## Test Report: {unit-name}
199
+
200
+ ### Summary
201
+
202
+ - **Tests**: {passed}/{total} passed
203
+ - **Coverage**: {percentage}%
204
+
205
+ ### Acceptance Criteria Validation
206
+
207
+ - ✅/❌ **{Criterion}**: {Status}
208
+
209
+ ### Issues Found
210
+ {Any issues discovered during testing}
211
+
212
+ ### Notes
213
+ {Additional observations}
214
+ ```
215
+
216
+ **Completion Criteria**:
217
+
218
+ - [ ] All tests passing
219
+ - [ ] Acceptance criteria verified
220
+ - [ ] Test report created
221
+
222
+ **⛔ HUMAN Checkpoint**: Present test report and **STOP**. Wait for user to confirm bolt completion.
223
+
224
+ ---
225
+
226
+ ## State Tracking
227
+
228
+ Bolt instance tracks progress:
229
+
230
+ ```yaml
231
+ ---
232
+ current_stage: implement
233
+ stages_completed:
234
+ - name: spec
235
+ completed: 2024-12-05T10:00:00Z
236
+ artifact: spec.md
237
+ status: in-progress
238
+ ---
239
+ ```
240
+
241
+ ---
242
+
243
+ ## Bolt Context Loading
244
+
245
+ For Stage 2 (Implement) and Stage 3 (Test), load all artifacts from the bolt folder:
246
+
247
+ **Location**: `memory-bank/bolts/{bolt-id}/`
248
+
249
+ **Load all files in this folder**, which may include:
250
+
251
+ - `bolt.md` - Bolt instance metadata
252
+ - `spec.md` - Spec from Stage 1
253
+
254
+ This ensures implementation and test stages have context from the spec.
255
+
256
+ ---
257
+
258
+ ## Usage by Construction Agent
259
+
260
+ 1. **Load bolt instance** from path defined by `schema.bolts`
261
+ 2. **Read `bolt_type` field** (e.g., `simple-construction-bolt`)
262
+ 3. **Load this definition** from `.specsmd/aidlc/templates/construction/bolt-types/`
263
+ 4. **Check `current_stage`** in bolt instance
264
+ 5. **Load bolt folder artifacts** if stage requires previous context
265
+ 6. **Execute stage** following activities defined here
266
+ 7. **Create artifacts** as specified
267
+ 8. **⛔ STOP and present completion summary** - DO NOT continue automatically
268
+ 9. **Wait for user confirmation** - user must explicitly approve
269
+ 10. **Only after approval**: Update bolt state and advance to next stage
270
+
271
+ **⛔ CRITICAL**: Steps 8-9 are MANDATORY. Never skip the human checkpoint. Never auto-advance.
272
+
273
+ The Construction Agent is **bolt-type agnostic** - it reads stages from this file and executes them.
@@ -0,0 +1,240 @@
1
+ # Bolt Type: Spike (Research)
2
+
3
+ ## Mandatory Output Rules (READ FIRST)
4
+
5
+ - 🚫 **NEVER** use ASCII tables for options - they break at different terminal widths
6
+ - ✅ **ALWAYS** use numbered list format: `N - **Option**: Description`
7
+ - ✅ **ALWAYS** use status indicators: ✅ (done) ⏳ (current) [ ] (pending) 🚫 (blocked)
8
+
9
+ ## Success Metrics
10
+
11
+ - ✅ Activities presented as numbered lists (not tables)
12
+ - ✅ Stage progress shown with status indicators
13
+ - ✅ Human checkpoints clearly marked
14
+
15
+ ## Failure Modes
16
+
17
+ - ❌ Using ASCII table for activities
18
+ - ❌ Auto-advancing without human confirmation
19
+ - ❌ Exceeding time-box without approval
20
+
21
+ ---
22
+
23
+ ## Metadata
24
+
25
+ ```yaml
26
+ bolt_type: spike-bolt
27
+ name: Spike Bolt
28
+ description: Research and proof-of-concept for unknown areas
29
+ version: 1.0.0
30
+ suitable_for:
31
+ - Technical research
32
+ - Proof of concept
33
+ - Evaluating technologies
34
+ - Risk mitigation
35
+ stages_count: 2
36
+ ```
37
+
38
+ ---
39
+
40
+ ## Overview
41
+
42
+ This bolt type is for research and proof-of-concept work when there are unknowns that need investigation before committing to implementation.
43
+
44
+ **Best For**:
45
+
46
+ - Evaluating new technologies
47
+ - Proof of concept for risky approaches
48
+ - Research before estimation
49
+ - Validating assumptions
50
+ - Learning and experimentation
51
+
52
+ **Important**: Spike bolts produce **knowledge**, not production code. The output is documentation, not deployable software.
53
+
54
+ ---
55
+
56
+ ## Stages
57
+
58
+ ### Stage 1: explore
59
+
60
+ **Objective**: Investigate the unknown area and document findings
61
+
62
+ **Duration**: Time-boxed (hours to days, strictly limited)
63
+
64
+ **Activities**:
65
+
66
+ 1 - **Define research questions**: List what needs to be answered
67
+ 2 - **Investigate options**: Research and document alternatives
68
+ 3 - **Build throwaway prototypes**: Create proof-of-concept code
69
+ 4 - **Test assumptions**: Validate or invalidate beliefs
70
+ 5 - **Identify risks**: Document potential issues
71
+ 6 - **Evaluate trade-offs**: Compare options
72
+
73
+ **Artifact**: `spike-exploration.md`
74
+ **Location**: Path defined by `schema.units` in `.specsmd/aidlc/memory-bank.yaml`
75
+ *(Default: `{intents-path}/{intent}/units/{unit}/spike-exploration.md`)*
76
+
77
+ **Template Structure**:
78
+
79
+ ```markdown
80
+ ---
81
+ stage: explore
82
+ bolt: {bolt-id}
83
+ created: {timestamp}
84
+ time_box: {hours}
85
+ ---
86
+
87
+ ## Spike Exploration: {topic}
88
+
89
+ ### Research Questions
90
+ 1. {question 1}
91
+ 2. {question 2}
92
+
93
+ ### Options Investigated
94
+
95
+ - **{Option}**: {Description} - Pros: {list} - Cons: {list}
96
+
97
+ ### Prototype Notes
98
+ {What was built, what was learned}
99
+
100
+ ### Assumptions Tested
101
+
102
+ - **{Assumption}**: Valid: {yes/no} - Evidence: {details}
103
+
104
+ ### Risks Identified
105
+
106
+ - **{Risk}**: Likelihood: {H/M/L} - Impact: {H/M/L} - Mitigation: {approach}
107
+ ```
108
+
109
+ **Completion Criteria**:
110
+
111
+ - [ ] All research questions addressed
112
+ - [ ] Options evaluated
113
+ - [ ] Prototypes built (if applicable)
114
+ - [ ] Assumptions validated or invalidated
115
+ - [ ] Risks documented
116
+
117
+ **⛔ HUMAN Checkpoint**: Present exploration summary and **STOP**. Wait for user to confirm before proceeding to Stage 2.
118
+
119
+ ---
120
+
121
+ ### Stage 2: document
122
+
123
+ **Objective**: Consolidate findings into actionable recommendations
124
+
125
+ **Duration**: Hours (typically 1-2 hours)
126
+
127
+ **Activities**:
128
+
129
+ 1 - **Summarize findings**: Create high-level summary
130
+ 2 - **Make recommendations**: Propose best approach
131
+ 3 - **Estimate implementation**: Provide effort estimates
132
+ 4 - **Identify next bolts**: Suggest follow-up work
133
+ 5 - **Present to team**: Share knowledge
134
+
135
+ **Artifact**: `spike-report.md`
136
+ **Location**: Path defined by `schema.units` in `.specsmd/aidlc/memory-bank.yaml`
137
+ *(Default: `{intents-path}/{intent}/units/{unit}/spike-report.md`)*
138
+
139
+ **Template Structure**:
140
+
141
+ ```markdown
142
+ ---
143
+ stage: document
144
+ bolt: {bolt-id}
145
+ created: {timestamp}
146
+ ---
147
+
148
+ ## Spike Report: {topic}
149
+
150
+ ### Summary
151
+ {High-level summary of what was learned}
152
+
153
+ ### Key Findings
154
+ 1. {finding 1}
155
+ 2. {finding 2}
156
+
157
+ ### Recommendation
158
+ **Recommended Approach**: {option}
159
+
160
+ **Rationale**: {why this option}
161
+
162
+ ### Implementation Estimate
163
+
164
+ - **{Component}**: Effort: {estimate} - Confidence: {H/M/L}
165
+
166
+ ### Risks to Monitor
167
+
168
+ - **{Risk}**: Mitigation: {strategy}
169
+
170
+ ### Suggested Next Steps
171
+ 1. {Create bolt for...}
172
+ 2. {Update requirements with...}
173
+ 3. {Add story for...}
174
+
175
+ ### Artifacts to Archive
176
+ - [ ] Prototype code (if reusable): {location}
177
+ - [ ] Research notes: {location}
178
+ ```
179
+
180
+ **Completion Criteria**:
181
+
182
+ - [ ] Findings documented
183
+ - [ ] Clear recommendation made
184
+ - [ ] Estimates provided
185
+ - [ ] Next steps identified
186
+ - [ ] Knowledge shared with team
187
+
188
+ **⛔ HUMAN Checkpoint**: Present spike report and **STOP**. Wait for user to confirm bolt completion.
189
+
190
+ ---
191
+
192
+ ## Stage Execution
193
+
194
+ ### Sequence
195
+
196
+ ```text
197
+ explore → document
198
+ ```
199
+
200
+ ### Time-Boxing
201
+
202
+ Spikes **MUST** be time-boxed:
203
+
204
+ - Define maximum duration upfront
205
+ - Stop when time-box expires
206
+ - Document whatever was learned
207
+ - Don't extend without explicit approval
208
+
209
+ ### State Tracking
210
+
211
+ ```yaml
212
+ ---
213
+ current_stage: document
214
+ stages_completed:
215
+ - name: explore
216
+ completed: 2024-12-05T16:00:00Z
217
+ time_spent: 4h
218
+ status: in-progress
219
+ time_box: 8h
220
+ time_remaining: 4h
221
+ ---
222
+ ```
223
+
224
+ ---
225
+
226
+ ## Important Notes
227
+
228
+ ### Spike Output
229
+
230
+ - **NOT** production code
231
+ - **NOT** deployable software
232
+ - **IS** knowledge and documentation
233
+ - **IS** input for real construction bolts
234
+
235
+ ### After a Spike
236
+
237
+ 1. Review findings with team
238
+ 2. Update requirements if needed
239
+ 3. Create real construction bolts
240
+ 4. Archive or delete prototype code