@ydtb/specsmd 0.1.22

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 (143) hide show
  1. package/README.md +322 -0
  2. package/bin/cli.js +21 -0
  3. package/flows/aidlc/README.md +372 -0
  4. package/flows/aidlc/agents/construction-agent.md +80 -0
  5. package/flows/aidlc/agents/inception-agent.md +97 -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 +67 -0
  9. package/flows/aidlc/commands/inception-agent.md +59 -0
  10. package/flows/aidlc/commands/master-agent.md +51 -0
  11. package/flows/aidlc/commands/operations-agent.md +81 -0
  12. package/flows/aidlc/context-config.yaml +67 -0
  13. package/flows/aidlc/memory-bank.yaml +105 -0
  14. package/flows/aidlc/quick-start.md +322 -0
  15. package/flows/aidlc/scripts/artifact-validator.cjs +594 -0
  16. package/flows/aidlc/scripts/bolt-complete.cjs +606 -0
  17. package/flows/aidlc/scripts/status-integrity.cjs +598 -0
  18. package/flows/aidlc/skills/construction/bolt-list.md +163 -0
  19. package/flows/aidlc/skills/construction/bolt-replan.md +345 -0
  20. package/flows/aidlc/skills/construction/bolt-start.md +442 -0
  21. package/flows/aidlc/skills/construction/bolt-status.md +185 -0
  22. package/flows/aidlc/skills/construction/navigator.md +196 -0
  23. package/flows/aidlc/skills/construction/prototype-apply.md +311 -0
  24. package/flows/aidlc/skills/inception/bolt-plan.md +372 -0
  25. package/flows/aidlc/skills/inception/context.md +171 -0
  26. package/flows/aidlc/skills/inception/intent-create.md +211 -0
  27. package/flows/aidlc/skills/inception/intent-list.md +124 -0
  28. package/flows/aidlc/skills/inception/navigator.md +207 -0
  29. package/flows/aidlc/skills/inception/requirements.md +227 -0
  30. package/flows/aidlc/skills/inception/review.md +248 -0
  31. package/flows/aidlc/skills/inception/story-create.md +304 -0
  32. package/flows/aidlc/skills/inception/units.md +278 -0
  33. package/flows/aidlc/skills/inception/vibe-to-spec.md +410 -0
  34. package/flows/aidlc/skills/master/analyze-context.md +239 -0
  35. package/flows/aidlc/skills/master/answer-question.md +141 -0
  36. package/flows/aidlc/skills/master/explain-flow.md +158 -0
  37. package/flows/aidlc/skills/master/project-init.md +281 -0
  38. package/flows/aidlc/skills/master/route-request.md +126 -0
  39. package/flows/aidlc/skills/operations/build.md +237 -0
  40. package/flows/aidlc/skills/operations/deploy.md +259 -0
  41. package/flows/aidlc/skills/operations/monitor.md +265 -0
  42. package/flows/aidlc/skills/operations/navigator.md +209 -0
  43. package/flows/aidlc/skills/operations/verify.md +224 -0
  44. package/flows/aidlc/templates/construction/bolt-template.md +226 -0
  45. package/flows/aidlc/templates/construction/bolt-types/ddd-construction-bolt/adr-template.md +49 -0
  46. package/flows/aidlc/templates/construction/bolt-types/ddd-construction-bolt/ddd-01-domain-model-template.md +55 -0
  47. package/flows/aidlc/templates/construction/bolt-types/ddd-construction-bolt/ddd-02-technical-design-template.md +67 -0
  48. package/flows/aidlc/templates/construction/bolt-types/ddd-construction-bolt/ddd-03-test-report-template.md +62 -0
  49. package/flows/aidlc/templates/construction/bolt-types/ddd-construction-bolt.md +590 -0
  50. package/flows/aidlc/templates/construction/bolt-types/simple-construction-bolt.md +347 -0
  51. package/flows/aidlc/templates/construction/bolt-types/spike-bolt.md +240 -0
  52. package/flows/aidlc/templates/construction/construction-log-template.md +129 -0
  53. package/flows/aidlc/templates/construction/standards/coding-standards.md +29 -0
  54. package/flows/aidlc/templates/construction/standards/system-architecture.md +22 -0
  55. package/flows/aidlc/templates/construction/standards/tech-stack.md +19 -0
  56. package/flows/aidlc/templates/inception/inception-log-template.md +134 -0
  57. package/flows/aidlc/templates/inception/project/README.md +55 -0
  58. package/flows/aidlc/templates/inception/requirements-template.md +144 -0
  59. package/flows/aidlc/templates/inception/stories-template.md +38 -0
  60. package/flows/aidlc/templates/inception/story-template.md +147 -0
  61. package/flows/aidlc/templates/inception/system-context-template.md +29 -0
  62. package/flows/aidlc/templates/inception/unit-brief-template.md +177 -0
  63. package/flows/aidlc/templates/inception/units-template.md +52 -0
  64. package/flows/aidlc/templates/standards/catalog.yaml +345 -0
  65. package/flows/aidlc/templates/standards/coding-standards.guide.md +553 -0
  66. package/flows/aidlc/templates/standards/data-stack.guide.md +162 -0
  67. package/flows/aidlc/templates/standards/decision-index-template.md +32 -0
  68. package/flows/aidlc/templates/standards/tech-stack.guide.md +280 -0
  69. package/flows/fire/README.md +19 -0
  70. package/flows/fire/agents/builder/agent.md +254 -0
  71. package/flows/fire/agents/builder/skills/code-review/SKILL.md +257 -0
  72. package/flows/fire/agents/builder/skills/code-review/references/auto-fix-rules.md +218 -0
  73. package/flows/fire/agents/builder/skills/code-review/references/review-categories.md +154 -0
  74. package/flows/fire/agents/builder/skills/code-review/templates/review-report.md.hbs +120 -0
  75. package/flows/fire/agents/builder/skills/commit-changes/SKILL.md +232 -0
  76. package/flows/fire/agents/builder/skills/commit-changes/scripts/commit-changes.cjs +447 -0
  77. package/flows/fire/agents/builder/skills/run-execute/SKILL.md +700 -0
  78. package/flows/fire/agents/builder/skills/run-execute/scripts/complete-run.cjs +748 -0
  79. package/flows/fire/agents/builder/skills/run-execute/scripts/init-run.cjs +457 -0
  80. package/flows/fire/agents/builder/skills/run-execute/scripts/update-phase.cjs +239 -0
  81. package/flows/fire/agents/builder/skills/run-execute/templates/plan.md.hbs +61 -0
  82. package/flows/fire/agents/builder/skills/run-execute/templates/test-report.md.hbs +81 -0
  83. package/flows/fire/agents/builder/skills/run-plan/SKILL.md +366 -0
  84. package/flows/fire/agents/builder/skills/run-status/SKILL.md +96 -0
  85. package/flows/fire/agents/builder/skills/walkthrough-generate/SKILL.md +181 -0
  86. package/flows/fire/agents/builder/skills/walkthrough-generate/templates/walkthrough.md.hbs +108 -0
  87. package/flows/fire/agents/orchestrator/agent.md +144 -0
  88. package/flows/fire/agents/orchestrator/skills/project-init/SKILL.md +226 -0
  89. package/flows/fire/agents/orchestrator/skills/project-init/templates/coding-standards.md.hbs +149 -0
  90. package/flows/fire/agents/orchestrator/skills/project-init/templates/constitution.md.hbs +43 -0
  91. package/flows/fire/agents/orchestrator/skills/project-init/templates/system-architecture.md.hbs +101 -0
  92. package/flows/fire/agents/orchestrator/skills/project-init/templates/tech-stack.md.hbs +136 -0
  93. package/flows/fire/agents/orchestrator/skills/project-init/templates/testing-standards.md.hbs +94 -0
  94. package/flows/fire/agents/orchestrator/skills/route/SKILL.md +146 -0
  95. package/flows/fire/agents/orchestrator/skills/status/SKILL.md +696 -0
  96. package/flows/fire/agents/planner/agent.md +143 -0
  97. package/flows/fire/agents/planner/skills/design-doc-generate/SKILL.md +156 -0
  98. package/flows/fire/agents/planner/skills/design-doc-generate/templates/design.md.hbs +124 -0
  99. package/flows/fire/agents/planner/skills/intent-capture/SKILL.md +125 -0
  100. package/flows/fire/agents/planner/skills/intent-capture/templates/brief.md.hbs +40 -0
  101. package/flows/fire/agents/planner/skills/work-item-decompose/SKILL.md +166 -0
  102. package/flows/fire/agents/planner/skills/work-item-decompose/templates/work-item.md.hbs +40 -0
  103. package/flows/fire/commands/fire-builder.md +56 -0
  104. package/flows/fire/commands/fire-planner.md +48 -0
  105. package/flows/fire/commands/fire.md +46 -0
  106. package/flows/fire/memory-bank.yaml +240 -0
  107. package/flows/fire/quick-start.md +146 -0
  108. package/flows/simple/README.md +190 -0
  109. package/flows/simple/agents/agent.md +404 -0
  110. package/flows/simple/commands/agent.md +60 -0
  111. package/flows/simple/context-config.yaml +34 -0
  112. package/flows/simple/memory-bank.yaml +66 -0
  113. package/flows/simple/quick-start.md +231 -0
  114. package/flows/simple/skills/design.md +96 -0
  115. package/flows/simple/skills/execute.md +190 -0
  116. package/flows/simple/skills/requirements.md +94 -0
  117. package/flows/simple/skills/tasks.md +136 -0
  118. package/flows/simple/templates/design-template.md +138 -0
  119. package/flows/simple/templates/requirements-template.md +85 -0
  120. package/flows/simple/templates/tasks-template.md +104 -0
  121. package/lib/InstallerFactory.js +36 -0
  122. package/lib/analytics/env-detector.js +92 -0
  123. package/lib/analytics/index.js +22 -0
  124. package/lib/analytics/machine-id.js +33 -0
  125. package/lib/analytics/tracker.js +232 -0
  126. package/lib/cli-utils.js +342 -0
  127. package/lib/constants.js +44 -0
  128. package/lib/installer.js +406 -0
  129. package/lib/installers/AntigravityInstaller.js +22 -0
  130. package/lib/installers/ClaudeInstaller.js +85 -0
  131. package/lib/installers/ClineInstaller.js +21 -0
  132. package/lib/installers/CodexInstaller.js +21 -0
  133. package/lib/installers/CopilotInstaller.js +113 -0
  134. package/lib/installers/CursorInstaller.js +63 -0
  135. package/lib/installers/GeminiInstaller.js +75 -0
  136. package/lib/installers/KiroInstaller.js +77 -0
  137. package/lib/installers/OpenCodeInstaller.js +30 -0
  138. package/lib/installers/RooInstaller.js +22 -0
  139. package/lib/installers/ToolInstaller.js +76 -0
  140. package/lib/installers/WindsurfInstaller.js +22 -0
  141. package/lib/markdown-validator.ts +175 -0
  142. package/lib/yaml-validator.ts +99 -0
  143. package/package.json +69 -0
@@ -0,0 +1,372 @@
1
+ # Skill: Plan Bolts
2
+
3
+ ---
4
+
5
+ ## Progress Display
6
+
7
+ Show at start of this skill:
8
+
9
+ ```text
10
+ ### Inception Progress
11
+ - [x] Intent created
12
+ - [x] Requirements gathered
13
+ - [ ] Generating artifacts... ← current
14
+ - [x] System Context
15
+ - [x] Units
16
+ - [x] Stories
17
+ - [ ] Bolt Plan ← this skill
18
+ - [ ] Artifacts reviewed (Checkpoint 3)
19
+ - [ ] Ready for Construction
20
+ ```
21
+
22
+ ---
23
+
24
+ ## Checkpoints in This Skill
25
+
26
+ **NO INDIVIDUAL Checkpoint** - This skill is part of the batched artifact generation.
27
+
28
+ All artifacts (Context, Units, Stories, Bolts) are reviewed together at **Checkpoint 3** in the `review` skill.
29
+
30
+ ---
31
+
32
+ ## Goal
33
+
34
+ Group User Stories into logical Bolts (execution sessions) that will guide the Construction Phase.
35
+
36
+ ---
37
+
38
+ ## Input
39
+
40
+ - **Required**: Unit name
41
+ - **Required**: `unit-brief.md` for the unit (contains `default_bolt_type` if specified)
42
+ - **Required**: Stories for the unit (`stories/*.md`)
43
+ - **Required**: `.specsmd/aidlc/memory-bank.yaml` - artifact schema
44
+ - **Required**: `.specsmd/aidlc/templates/standards/catalog.yaml` - project type definitions
45
+
46
+ ---
47
+
48
+ ## Process
49
+
50
+ ### 1. Analyze Stories
51
+
52
+ Review all stories to understand:
53
+
54
+ - Dependencies between stories
55
+ - Complexity and effort estimates
56
+ - Logical groupings by domain/feature
57
+
58
+ ### 2. Determine Bolt Type
59
+
60
+ **Read bolt type from unit-brief.md or use default based on unit type.**
61
+
62
+ 1. **Check unit-brief.md frontmatter** for `default_bolt_type`:
63
+
64
+ ```yaml
65
+ ---
66
+ unit: 001-expense-tracker-ui
67
+ unit_type: frontend
68
+ default_bolt_type: simple-construction-bolt
69
+ ---
70
+ ```
71
+
72
+ 2. **If not specified**, use defaults based on unit type:
73
+ - `unit_type: frontend` → `simple-construction-bolt`
74
+ - `unit_type: cli` → `simple-construction-bolt`
75
+ - `unit_type: backend` or unspecified → `ddd-construction-bolt`
76
+
77
+ 3. **Bolt type templates** are located at:
78
+ `.specsmd/aidlc/templates/construction/bolt-types/{bolt-type}.md`
79
+
80
+ **Available bolt types**:
81
+
82
+ - `ddd-construction-bolt` - For domain-heavy backend work (5 stages)
83
+ - `simple-construction-bolt` - For UI, integrations, utilities (3 stages)
84
+
85
+ ### 3. Assess Story Complexity
86
+
87
+ For each story, evaluate these factors:
88
+
89
+ | Factor | Question | Low (1) | Medium (2) | High (3) |
90
+ |--------|----------|---------|------------|----------|
91
+ | **Complexity** | How intricate is the logic? | CRUD, known patterns | Business rules, validation | Novel algorithms, complex logic |
92
+ | **Uncertainty** | How clear are requirements? | Fully specified | Some ambiguity | Many unknowns (→ spike) |
93
+ | **Dependencies** | What external things does it need? | Self-contained | Internal APIs/units | External systems, 3rd party |
94
+ | **Testing** | What validation is needed? | Unit tests | Integration tests | E2E + manual validation |
95
+
96
+ ### 4. Group Stories into Bolts
97
+
98
+ **Grouping rules:**
99
+
100
+ 1. **Cohesion**: Stories for same domain concept → same bolt
101
+ 2. **Dependencies**: Story A needs Story B → same or adjacent bolt
102
+ 3. **Balance**: Mix high + low complexity stories
103
+ 4. **Limit**: Max 5-6 stories per bolt
104
+ 5. **Risk**: Any story with High (3) Uncertainty → spike bolt first
105
+
106
+ **Suggested groupings:**
107
+
108
+ - **Bolt 1**: Setup & Core Entities (foundational stories)
109
+ - **Bolt 2**: Primary Operations (main CRUD/business logic)
110
+ - **Bolt 3**: Integration & Edge Cases (advanced stories)
111
+
112
+ ### 5. Analyze Dependencies
113
+
114
+ **CRITICAL**: Before defining sequence, analyze ALL dependencies:
115
+
116
+ #### 5a. Story Dependencies (within bolt)
117
+
118
+ For each story, check:
119
+
120
+ - Does it depend on another story's output?
121
+ - Does it require data/models from another story?
122
+
123
+ #### 5b. Bolt Dependencies (within unit)
124
+
125
+ For each bolt, determine:
126
+
127
+ - `requires_bolts`: Which bolts must complete first?
128
+ - `enables_bolts`: Which bolts are waiting on this one?
129
+
130
+ #### 5c. Unit Dependencies (cross-unit)
131
+
132
+ For each bolt, check if it depends on another unit:
133
+
134
+ - `requires_units`: Which units must be complete?
135
+ - Example: `api-bolt-1` may require `auth-service` unit to be complete
136
+
137
+ **Dependency Analysis Output**:
138
+
139
+ ```markdown
140
+ ## Dependency Analysis
141
+
142
+ ### Within-Unit Dependencies
143
+
144
+ - **bolt-auth-2** requires bolt-auth-1 (Needs User entity)
145
+ - **bolt-auth-3** requires bolt-auth-2 (Needs Auth service)
146
+
147
+ ### Cross-Unit Dependencies
148
+
149
+ - **bolt-api-1** requires auth-service unit (Needs auth tokens)
150
+ - **bolt-payment-1** requires user-service unit (Needs user data)
151
+
152
+ ### Dependency Warnings
153
+ - ⚠️ bolt-api-1 blocked until auth-service unit complete
154
+ - ⚠️ Circular dependency detected: {if any}
155
+ ```
156
+
157
+ ### 6. Define Bolt Sequence
158
+
159
+ Establish execution order based on dependencies:
160
+
161
+ ```markdown
162
+ ## Bolt Sequence
163
+
164
+ ```text
165
+
166
+ [Bolt 1] ──► [Bolt 2] ──► [Bolt 3]
167
+ │ │
168
+ ▼ ▼
169
+ Entity API Layer
170
+ Setup Implementation
171
+
172
+ ```
173
+
174
+ ## Cross-Unit Dependencies
175
+
176
+ ```text
177
+
178
+ [auth-service] ──► [api-service]
179
+
180
+
181
+ [payment-service]
182
+
183
+ ```
184
+
185
+ ### 7. Create Bolt Instance Files (CRITICAL)
186
+
187
+ **⚠️ YOU MUST CREATE INDIVIDUAL BOLT DIRECTORIES WITH bolt.md FILES**
188
+ **⚠️ DO NOT CREATE A SUMMARY DOCUMENT CALLED "bolt-plan.md"**
189
+
190
+ 1. **Read Path**: Check `schema.bolts` from `.specsmd/aidlc/memory-bank.yaml`
191
+ *(Default: `memory-bank/bolts/{bolt-id}/`)*
192
+
193
+ 2. **Determine Bolt ID**:
194
+ - List all directories in `memory-bank/bolts/`
195
+ - Extract the 3-digit prefix from each (e.g., `015` from `015-auth-service`)
196
+ - Find the highest number
197
+ - Next bolt uses the next available number (e.g., if highest is `015`, next is `016`)
198
+
199
+ **⚠️ CRITICAL**: The `{BBB}` prefix is a **GLOBAL** sequence across ALL bolts in `memory-bank/bolts/`, NOT per-unit.
200
+
201
+ 3. **Create Directory + File Per Bolt**:
202
+ For EACH bolt in the plan:
203
+ - Create directory: `memory-bank/bolts/{BBB}-{unit-name}/`
204
+ - Create file inside: `memory-bank/bolts/{BBB}-{unit-name}/bolt.md`
205
+ - Use template: `.specsmd/aidlc/templates/construction/bolt-template.md`
206
+
207
+ **Naming Convention** (from `memory-bank.yaml`):
208
+ - Format: `{BBB}-{unit-name}/` where BBB is a **GLOBAL** 3-digit sequence
209
+ - The number is global across ALL bolts in `memory-bank/bolts/` (not per-unit)
210
+ - Example sequence: `001-auth-service/`, `002-auth-service/`, `003-payment-service/`, `004-auth-service/`
211
+
212
+ **Example**: Planning bolts across multiple units (global numbering):
213
+
214
+ ```text
215
+ memory-bank/bolts/
216
+ ├── 001-auth-service/bolt.md ← First bolt ever created
217
+ ├── 002-auth-service/bolt.md ← Second bolt (same unit, continues sequence)
218
+ ├── 003-payment-service/bolt.md ← Third bolt (different unit)
219
+ ├── 004-auth-service/bolt.md ← Fourth bolt (back to auth-service)
220
+ └── 005-api-gateway/bolt.md ← Fifth bolt (another unit)
221
+ ```
222
+
223
+ **Stage artifacts will be added to same directory during construction:**
224
+
225
+ ```text
226
+ memory-bank/bolts/001-auth-service/
227
+ ├── bolt.md ← You create this now
228
+ └── {stage-artifacts} ← Created during construction (varies by bolt type)
229
+ ```
230
+
231
+ *Note: Artifact names depend on bolt type (e.g., DDD bolts create `ddd-01-domain-model.md`, simple bolts create `implementation-plan.md`).*
232
+
233
+ 4. **Bolt File Structure** (CRITICAL: Include all dependencies in frontmatter):
234
+
235
+ ```markdown
236
+ ---
237
+ id: {BBB}-{unit-name}
238
+ unit: {UUU}-{unit-name}
239
+ intent: {NNN}-{intent-name}
240
+ type: {bolt-type} # From unit-brief.md or default (ddd-construction-bolt, simple-construction-bolt)
241
+ status: planned
242
+ stories: [story-1, story-2]
243
+ created: {date}
244
+
245
+ # Dependency Tracking (REQUIRED)
246
+ requires_bolts: [001-auth-service] # Bolts that must complete first
247
+ enables_bolts: [003-auth-service, 001-api-service] # Bolts that depend on this
248
+ requires_units: [auth-service] # Units that must be complete
249
+ blocks: false # true if waiting on dependency
250
+
251
+ # Complexity Assessment (aggregate of included stories)
252
+ complexity:
253
+ avg_complexity: 2 # 1=Low, 2=Medium, 3=High
254
+ avg_uncertainty: 1 # 1=Low, 2=Medium, 3=High
255
+ max_dependencies: 2 # Highest dependency score among stories
256
+ testing_scope: 2 # 1=Unit, 2=Integration, 3=E2E
257
+ ---
258
+
259
+ ## Bolt: {BBB}-{unit-name}
260
+
261
+ ### Objective
262
+ {What this bolt will accomplish}
263
+
264
+ ### Stories Included
265
+
266
+ - [ ] **{story-id}**: {description} - Priority: {priority}
267
+
268
+ ### Expected Outputs
269
+ - {artifact 1}
270
+ - {artifact 2}
271
+
272
+ ### Dependencies
273
+
274
+ #### Bolt Dependencies (within intent)
275
+
276
+ - **001-auth-service** (Required): Completed
277
+ - **002-auth-service** (Optional): In Progress
278
+
279
+ #### Unit Dependencies (cross-unit)
280
+
281
+ - **auth-service**: Needs auth tokens - Completed
282
+
283
+ #### Enables (other bolts waiting on this)
284
+ - 003-auth-service
285
+ - 001-api-service
286
+ ```
287
+
288
+ ### 9. Validate Plan
289
+
290
+ Check the plan against:
291
+
292
+ **Frontmatter Validation (CRITICAL - check each bolt.md)**:
293
+
294
+ - [ ] `id` - Bolt identifier present
295
+ - [ ] `unit` - Parent unit ID present
296
+ - [ ] `intent` - Parent intent ID present
297
+ - [ ] `type` - Bolt type specified (`ddd-construction-bolt` or `simple-construction-bolt`)
298
+ - [ ] `status` - Set to `planned`
299
+ - [ ] `stories` - **Array of story IDs included** (NOT just in body, MUST be in frontmatter)
300
+ - [ ] `created` - Timestamp present
301
+ - [ ] `requires_bolts` - Dependency array present (can be empty `[]`)
302
+ - [ ] `enables_bolts` - Enables array present (can be empty `[]`)
303
+ - [ ] `complexity` - Complexity block with all 4 fields
304
+
305
+ **Content Validation**:
306
+
307
+ - [ ] All stories are assigned to bolts
308
+ - [ ] Dependencies are respected (bolt-to-bolt AND unit-to-unit)
309
+ - [ ] Each bolt has clear outputs
310
+ - [ ] No bolt is too large (max 5-6 stories)
311
+ - [ ] No circular dependencies exist
312
+ - [ ] Cross-unit dependencies are explicit
313
+
314
+ ---
315
+
316
+ ## Output
317
+
318
+ ### Directories & Files Created (REQUIRED)
319
+
320
+ **⚠️ YOU MUST CREATE THESE DIRECTORIES AND FILES:**
321
+
322
+ ```text
323
+ memory-bank/bolts/{BBB}-{unit-name}/bolt.md ← CREATE THIS DIRECTORY AND FILE
324
+ ```
325
+
326
+ **Naming Convention** (from `memory-bank.yaml`):
327
+
328
+ - Format: `{BBB}-{unit-name}/` where BBB is a global 3-digit sequence
329
+ - Example: `001-auth-service/`, `002-auth-service/`, `016-analytics-tracker/`
330
+
331
+ **⚠️ DO NOT CREATE:**
332
+
333
+ - `bolt-plan.md` (summary doc)
334
+ - `README.md` files
335
+ - Flat files like `001-auth-service.md` (must be in directory)
336
+ - Old format like `bolt-{unit}-1/` (incorrect)
337
+
338
+ ### Summary (displayed to user)
339
+
340
+ ```markdown
341
+ ## Bolt Plan Complete: {unit-name}
342
+
343
+ ### Bolts Created
344
+
345
+ - [ ] **001-auth-service** ({bolt-type}): 001-user-signup, 002-user-login
346
+ - [ ] **002-auth-service** ({bolt-type}): 003-password-reset, 004-email-verify
347
+ - [ ] **003-auth-service** ({bolt-type}): 005-mfa-setup
348
+
349
+ ### Dependency Graph
350
+ 001-auth-service ──► 002-auth-service ──► 003-auth-service
351
+
352
+ ### Directories Created
353
+ ✅ `memory-bank/bolts/001-auth-service/bolt.md`
354
+ ✅ `memory-bank/bolts/002-auth-service/bolt.md`
355
+ ✅ `memory-bank/bolts/003-auth-service/bolt.md`
356
+
357
+ ### Total
358
+ - {n} bolts created
359
+ - {n} stories covered
360
+ ```
361
+
362
+ **No menu** - Skill complete, return to agent.
363
+
364
+ ---
365
+
366
+ ## Test Contract
367
+
368
+ ```yaml
369
+ input: Stories for unit
370
+ output: Bolt directories with bolt.md files
371
+ checkpoints: 0 (part of Checkpoint 3 batch)
372
+ ```
@@ -0,0 +1,171 @@
1
+ # Skill: Define System Context
2
+
3
+ ---
4
+
5
+ ## Progress Display
6
+
7
+ Show at start of this skill:
8
+
9
+ ```text
10
+ ### Inception Progress
11
+ - [x] Intent created
12
+ - [x] Requirements gathered
13
+ - [ ] Generating artifacts... ← current
14
+ - [ ] System Context ← this skill
15
+ - [ ] Units
16
+ - [ ] Stories
17
+ - [ ] Bolt Plan
18
+ - [ ] Artifacts reviewed (Checkpoint 3)
19
+ - [ ] Ready for Construction
20
+ ```
21
+
22
+ ---
23
+
24
+ ## Checkpoints in This Skill
25
+
26
+ **NO INDIVIDUAL Checkpoint** - This skill is part of the batched artifact generation.
27
+
28
+ All artifacts (Context, Units, Stories, Bolts) are reviewed together at **Checkpoint 3** in the `review` skill.
29
+
30
+ ---
31
+
32
+ ## Goal
33
+
34
+ Identify system boundaries, actors, and external dependencies to establish the "world" the system lives in.
35
+
36
+ ---
37
+
38
+ ## Input
39
+
40
+ - **Required**: Intent name
41
+ - **Required**: `requirements.md` for the intent
42
+ - **Required**: `.specsmd/aidlc/memory-bank.yaml` - artifact schema
43
+
44
+ ---
45
+
46
+ ## Process
47
+
48
+ ### 1. Identify Actors
49
+
50
+ Ask questions to discover all system users:
51
+
52
+ - **Human Users**: "Who uses this directly?" (Admin, Customer, Support)
53
+ - **System Users**: "What systems call this?" (Scheduler, Event Bus)
54
+ - **External Systems**: "What third-party services interact?" (Stripe, Auth0)
55
+
56
+ ### 2. Map External Systems
57
+
58
+ For each external dependency, document:
59
+
60
+ - **System name**: What is it?
61
+ - **Direction**: Inbound/Outbound/Both
62
+ - **Data Exchanged**: What data crosses?
63
+ - **Protocol**: REST/GraphQL/Event
64
+
65
+ ### 3. Define Data Flows
66
+
67
+ Document what data crosses the boundary:
68
+
69
+ **Inbound**:
70
+
71
+ - What data enters the system?
72
+ - What format? (JSON, XML, Binary)
73
+ - What validation is needed?
74
+
75
+ **Outbound**:
76
+
77
+ - What data leaves the system?
78
+ - What consumers expect it?
79
+ - What guarantees are needed? (Delivery, ordering)
80
+
81
+ ### 4. Create Context Diagram
82
+
83
+ Generate a C4 Context diagram (Mermaid):
84
+
85
+ ```markdown
86
+ ## System Context Diagram
87
+
88
+ ​```mermaid
89
+ C4Context
90
+ title System Context - {intent-name}
91
+
92
+ Person(user, "User", "Primary user of the system")
93
+ System(sys, "{System Name}", "The system being built")
94
+ System_Ext(ext1, "External System", "Third-party service")
95
+
96
+ Rel(user, sys, "Uses")
97
+ Rel(sys, ext1, "Integrates with")
98
+ ​```
99
+ ```
100
+
101
+ ### 5. Document Context
102
+
103
+ 1. **Read Path**: Check `schema.system_context` from `.specsmd/aidlc/memory-bank.yaml`
104
+ *(Default: `memory-bank/intents/{intent-name}/system-context.md`)*
105
+
106
+ 2. **Use Template**: `.specsmd/aidlc/templates/inception/system-context-template.md`
107
+
108
+ 3. **Structure**:
109
+
110
+ ```markdown
111
+ ## Actors
112
+
113
+ - **{Actor}** ({Type}): {Description}
114
+
115
+ ## External Systems
116
+
117
+ - **{System}**: {Purpose} - {Integration Type}
118
+
119
+ ## Data Flows
120
+ ### Inbound
121
+ ### Outbound
122
+
123
+ ## Context Diagram
124
+ {Mermaid diagram}
125
+ ```
126
+
127
+ ### 6. Validate Completeness
128
+
129
+ Ask:
130
+
131
+ - "Did I miss any third-party integrations?"
132
+ - "Are there legacy systems this needs to work with?"
133
+ - "Any planned future integrations to consider?"
134
+
135
+ ---
136
+
137
+ ## Output
138
+
139
+ ```markdown
140
+ ## System Context: {intent-name}
141
+
142
+ ### Actors Identified
143
+
144
+ - **Customer** (Human): Web/Mobile UI
145
+ - **Admin** (Human): Admin Dashboard
146
+ - **Payment Gateway** (System): REST API
147
+
148
+ ### External Dependencies
149
+
150
+ - **Stripe**: Payments - Risk: High
151
+ - **SendGrid**: Email - Risk: Medium
152
+
153
+ ### Data Flow Summary
154
+ - **Inbound**: User requests, webhook events
155
+ - **Outbound**: Transaction records, notifications
156
+
157
+ ### Artifact Created
158
+ ✅ `{intent-path}/system-context.md`
159
+ ```
160
+
161
+ **No menu** - Skill complete, return to agent.
162
+
163
+ ---
164
+
165
+ ## Test Contract
166
+
167
+ ```yaml
168
+ input: Intent requirements
169
+ output: system-context.md with actors, systems, data flows
170
+ checkpoints: 0 (part of Checkpoint 3 batch)
171
+ ```