project-iris 0.0.13 → 0.0.15

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 (189) hide show
  1. package/README.md +261 -94
  2. package/bin/cli.js +21 -0
  3. package/flows/aidlc/README.md +372 -0
  4. package/flows/aidlc/agents/construction-agent.md +79 -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 +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 +67 -0
  13. package/flows/aidlc/memory-bank.yaml +104 -0
  14. package/flows/aidlc/quick-start.md +322 -0
  15. package/flows/aidlc/skills/construction/bolt-list.md +163 -0
  16. package/flows/aidlc/skills/construction/bolt-replan.md +345 -0
  17. package/flows/aidlc/skills/construction/bolt-start.md +442 -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 +372 -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 +278 -0
  29. package/flows/aidlc/skills/master/analyze-context.md +239 -0
  30. package/flows/aidlc/skills/master/answer-question.md +141 -0
  31. package/flows/aidlc/skills/master/explain-flow.md +158 -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/{dist/iris_bundle/frameworks/iris-core → flows/aidlc}/templates/construction/bolt-types/ddd-construction-bolt.md +3 -3
  40. package/{dist → flows/aidlc}/templates/construction/bolt-types/spike-bolt.md +2 -2
  41. package/flows/aidlc/templates/construction/construction-log-template.md +129 -0
  42. package/flows/aidlc/templates/construction/standards/coding-standards.md +29 -0
  43. package/flows/aidlc/templates/construction/standards/system-architecture.md +22 -0
  44. package/flows/aidlc/templates/construction/standards/tech-stack.md +19 -0
  45. package/flows/aidlc/templates/inception/inception-log-template.md +134 -0
  46. package/flows/aidlc/templates/inception/project/README.md +55 -0
  47. package/flows/aidlc/templates/standards/catalog.yaml +345 -0
  48. package/flows/aidlc/templates/standards/coding-standards.guide.md +553 -0
  49. package/flows/aidlc/templates/standards/data-stack.guide.md +162 -0
  50. package/flows/aidlc/templates/standards/tech-stack.guide.md +280 -0
  51. package/lib/InstallerFactory.js +36 -0
  52. package/lib/analytics/env-detector.js +92 -0
  53. package/lib/analytics/index.js +22 -0
  54. package/lib/analytics/machine-id.js +33 -0
  55. package/lib/analytics/tracker.js +232 -0
  56. package/lib/cli-utils.js +342 -0
  57. package/lib/constants.js +32 -0
  58. package/lib/installer.js +402 -0
  59. package/lib/installers/AntigravityInstaller.js +112 -0
  60. package/lib/installers/ClaudeInstaller.js +85 -0
  61. package/lib/installers/ClineInstaller.js +21 -0
  62. package/lib/installers/CodexInstaller.js +21 -0
  63. package/lib/installers/CopilotInstaller.js +113 -0
  64. package/lib/installers/CursorInstaller.js +63 -0
  65. package/lib/installers/GeminiInstaller.js +75 -0
  66. package/lib/installers/KiroInstaller.js +22 -0
  67. package/lib/installers/OpenCodeInstaller.js +22 -0
  68. package/lib/installers/RooInstaller.js +22 -0
  69. package/lib/installers/ToolInstaller.js +73 -0
  70. package/lib/installers/WindsurfInstaller.js +22 -0
  71. package/lib/markdown-validator.ts +175 -0
  72. package/lib/yaml-validator.ts +99 -0
  73. package/package.json +106 -33
  74. package/scripts/artifact-validator.js +594 -0
  75. package/scripts/bolt-complete.js +606 -0
  76. package/scripts/status-integrity.js +598 -0
  77. package/dist/bridge/agent-runner.js +0 -190
  78. package/dist/bridge/connector-factory.js +0 -31
  79. package/dist/bridge/connectors/antigravity-connector.js +0 -18
  80. package/dist/bridge/connectors/cursor-connector.js +0 -31
  81. package/dist/bridge/connectors/in-process-connector.js +0 -29
  82. package/dist/bridge/connectors/vscode-connector.js +0 -31
  83. package/dist/bridge/connectors/windsurf-connector.js +0 -23
  84. package/dist/bridge/filesystem-connector.js +0 -110
  85. package/dist/bridge/helper.js +0 -203
  86. package/dist/bridge/types.js +0 -10
  87. package/dist/cli.js +0 -40
  88. package/dist/commands/ask.js +0 -259
  89. package/dist/commands/bridge.js +0 -88
  90. package/dist/commands/create.js +0 -25
  91. package/dist/commands/develop.js +0 -141
  92. package/dist/commands/doctor.js +0 -102
  93. package/dist/commands/flow.js +0 -301
  94. package/dist/commands/framework.js +0 -273
  95. package/dist/commands/generate.js +0 -59
  96. package/dist/commands/install.js +0 -100
  97. package/dist/commands/pack.js +0 -33
  98. package/dist/commands/phase.js +0 -38
  99. package/dist/commands/run.js +0 -199
  100. package/dist/commands/status.js +0 -114
  101. package/dist/commands/uninstall.js +0 -14
  102. package/dist/commands/use.js +0 -20
  103. package/dist/commands/validate.js +0 -102
  104. package/dist/framework/framework-loader.js +0 -97
  105. package/dist/framework/framework-paths.js +0 -48
  106. package/dist/framework/framework-types.js +0 -15
  107. package/dist/iris/artifact-checker.js +0 -78
  108. package/dist/iris/artifacts/config.js +0 -68
  109. package/dist/iris/artifacts/generator.js +0 -88
  110. package/dist/iris/artifacts/types.js +0 -1
  111. package/dist/iris/bundle.js +0 -44
  112. package/dist/iris/doctrine/collector.js +0 -124
  113. package/dist/iris/fixer.js +0 -149
  114. package/dist/iris/flows/manifest.js +0 -124
  115. package/dist/iris/framework-context.js +0 -49
  116. package/dist/iris/framework-manager.js +0 -215
  117. package/dist/iris/fs/atomic.js +0 -22
  118. package/dist/iris/guard.js +0 -38
  119. package/dist/iris/importers/index.js +0 -9
  120. package/dist/iris/importers/types.js +0 -8
  121. package/dist/iris/importers/writer.js +0 -139
  122. package/dist/iris/include.js +0 -49
  123. package/dist/iris/installer.js +0 -334
  124. package/dist/iris/interactive/env.js +0 -21
  125. package/dist/iris/interactive/intent-interview.js +0 -345
  126. package/dist/iris/interactive/intent-schema.js +0 -28
  127. package/dist/iris/interactive/interview-io.js +0 -22
  128. package/dist/iris/interview/config.js +0 -71
  129. package/dist/iris/interview/types.js +0 -16
  130. package/dist/iris/interview/utils.js +0 -38
  131. package/dist/iris/manifest.js +0 -54
  132. package/dist/iris/packer.js +0 -325
  133. package/dist/iris/parsers/unit-parser.js +0 -43
  134. package/dist/iris/paths.js +0 -18
  135. package/dist/iris/policy.js +0 -133
  136. package/dist/iris/proc.js +0 -56
  137. package/dist/iris/report.js +0 -53
  138. package/dist/iris/resolver.js +0 -66
  139. package/dist/iris/router.js +0 -114
  140. package/dist/iris/routes.js +0 -189
  141. package/dist/iris/run-state.js +0 -146
  142. package/dist/iris/state.js +0 -113
  143. package/dist/iris/templates.js +0 -70
  144. package/dist/iris/tmp.js +0 -24
  145. package/dist/iris/uninstaller.js +0 -181
  146. package/dist/iris/utils/interpolate.js +0 -42
  147. package/dist/iris/validator.js +0 -391
  148. package/dist/iris/workflow/config.js +0 -51
  149. package/dist/iris/workflow/engine.js +0 -129
  150. package/dist/iris/workflow/steps.js +0 -448
  151. package/dist/iris/workflow/types.js +0 -1
  152. package/dist/iris_bundle/frameworks/iris-core/framework.yaml +0 -9
  153. package/dist/iris_bundle/frameworks/iris-core/memory/memory-bank.yaml +0 -1
  154. package/dist/iris_bundle/frameworks/iris-core/policy.yaml +0 -7
  155. package/dist/iris_bundle/frameworks/iris-core/templates/config/memory-bank.yaml +0 -1
  156. package/dist/iris_bundle/frameworks/iris-core/templates/construction/bolt-types/spike-bolt.md +0 -240
  157. package/dist/lib.js +0 -96
  158. package/dist/templates/construction/bolt-template.md +0 -226
  159. package/dist/templates/construction/bolt-types/ddd-construction-bolt/adr-template.md +0 -49
  160. package/dist/templates/construction/bolt-types/ddd-construction-bolt/ddd-01-domain-model-template.md +0 -55
  161. package/dist/templates/construction/bolt-types/ddd-construction-bolt/ddd-02-technical-design-template.md +0 -67
  162. package/dist/templates/construction/bolt-types/ddd-construction-bolt/ddd-03-test-report-template.md +0 -62
  163. package/dist/templates/construction/bolt-types/ddd-construction-bolt.md +0 -528
  164. package/dist/templates/construction/bolt-types/simple-construction-bolt.md +0 -347
  165. package/dist/templates/inception/requirements-template.md +0 -144
  166. package/dist/templates/inception/stories-template.md +0 -38
  167. package/dist/templates/inception/story-template.md +0 -147
  168. package/dist/templates/inception/system-context-template.md +0 -29
  169. package/dist/templates/inception/unit-brief-template.md +0 -177
  170. package/dist/templates/inception/units-template.md +0 -52
  171. package/dist/utils/exit-codes.js +0 -7
  172. package/dist/utils/logo.js +0 -17
  173. package/dist/workflows/bolt-execution.js +0 -238
  174. package/dist/workflows/bolt-plan.js +0 -221
  175. package/dist/workflows/intent-inception.js +0 -285
  176. package/dist/workflows/memory-bank-generator.js +0 -180
  177. package/dist/workflows/reporting.js +0 -74
  178. /package/{dist/iris_bundle/frameworks/iris-core → flows/aidlc}/templates/construction/bolt-template.md +0 -0
  179. /package/{dist/iris_bundle/frameworks/iris-core → flows/aidlc}/templates/construction/bolt-types/ddd-construction-bolt/adr-template.md +0 -0
  180. /package/{dist/iris_bundle/frameworks/iris-core → flows/aidlc}/templates/construction/bolt-types/ddd-construction-bolt/ddd-01-domain-model-template.md +0 -0
  181. /package/{dist/iris_bundle/frameworks/iris-core → flows/aidlc}/templates/construction/bolt-types/ddd-construction-bolt/ddd-02-technical-design-template.md +0 -0
  182. /package/{dist/iris_bundle/frameworks/iris-core → flows/aidlc}/templates/construction/bolt-types/ddd-construction-bolt/ddd-03-test-report-template.md +0 -0
  183. /package/{dist/iris_bundle/frameworks/iris-core → flows/aidlc}/templates/construction/bolt-types/simple-construction-bolt.md +0 -0
  184. /package/{dist/iris_bundle/frameworks/iris-core → flows/aidlc}/templates/inception/requirements-template.md +0 -0
  185. /package/{dist/iris_bundle/frameworks/iris-core → flows/aidlc}/templates/inception/stories-template.md +0 -0
  186. /package/{dist/iris_bundle/frameworks/iris-core → flows/aidlc}/templates/inception/story-template.md +0 -0
  187. /package/{dist/iris_bundle/frameworks/iris-core → flows/aidlc}/templates/inception/system-context-template.md +0 -0
  188. /package/{dist/iris_bundle/frameworks/iris-core → flows/aidlc}/templates/inception/unit-brief-template.md +0 -0
  189. /package/{dist/iris_bundle/frameworks/iris-core → flows/aidlc}/templates/inception/units-template.md +0 -0
@@ -0,0 +1,196 @@
1
+ # Skill: Construction Navigator
2
+
3
+ ---
4
+
5
+ ## Role
6
+
7
+ Entry point for Construction Agent. Routes to appropriate skill based on state.
8
+
9
+ **NO Checkpoint** - Navigator is a routing skill, not a decision point.
10
+
11
+ ---
12
+
13
+ ## Progress Display
14
+
15
+ Show workflow position with checkpoint markers:
16
+
17
+ ```text
18
+ ### Construction Workflow (2 Checkpoints per Bolt)
19
+
20
+ [Checkpoint 1] Which bolt to work on? --> bolt-list skill
21
+ |
22
+ [Domain + Logical Design]
23
+ |
24
+ [Checkpoint 2] Design Review --> bolt-start skill
25
+ |
26
+ [Code + Tests] --> Auto-validate if tests pass
27
+ |
28
+ [What's Next?] --> Next bolt / Done
29
+ ```
30
+
31
+ ---
32
+
33
+ ## Goal
34
+
35
+ Present the Construction Agent's skills and guide the user to the appropriate next action.
36
+
37
+ ---
38
+
39
+ ## Input
40
+
41
+ - **Optional**: `--unit` - Current unit context
42
+ - **Optional**: `--bolt-id` - Current bolt context
43
+ - **Required**: `.iris/aidlc/memory-bank.yaml` - artifact schema
44
+
45
+ ---
46
+
47
+ ## Process
48
+
49
+ ### 1. Determine Context
50
+
51
+ Load current construction state:
52
+
53
+ - Check for in-progress bolts
54
+ - Identify which units have planned bolts
55
+ - Calculate overall construction progress
56
+
57
+ ### 2. Present Menu
58
+
59
+ ```markdown
60
+ ## Construction Agent
61
+
62
+ {Context section if bolt/unit is active}
63
+
64
+ ### Skills
65
+
66
+ 1 - **List Bolts**: View all bolts and status (`bolt-list`)
67
+ 2 - **Bolt Status**: Detailed status of a bolt (`bolt-status --bolt-id="{id}"`)
68
+ 3 - **Start/Continue Bolt**: Execute bolt stages (`bolt-start --bolt-id="{id}"`)
69
+ 4 - **Plan Bolts**: Plan new bolts → Inception (`bolt-plan --unit="{unit}"`)
70
+
71
+ ### Current State
72
+ {Show in-progress bolts and overall progress}
73
+
74
+ ### Suggested Next Step
75
+ → {Recommended action based on state}
76
+
77
+ **Type a number (1-4) or specify a bolt ID to work on.**
78
+ ```
79
+
80
+ ### 3. Context-Aware Suggestions
81
+
82
+ Based on construction state, suggest actions:
83
+
84
+ - **No bolts planned** → Redirect to Inception for planning
85
+ - **Bolts planned, none started** → Start first bolt
86
+ - **Bolt in-progress** → Continue current bolt
87
+ - **Bolt blocked** → Show blocker, suggest resolution
88
+ - **All bolts complete for unit** → Proceed to Operations
89
+
90
+ ### 4. Handle Selection
91
+
92
+ When user selects an option:
93
+
94
+ 1. Acknowledge the selection
95
+ 2. Load the corresponding skill file
96
+ 3. Execute with current context
97
+
98
+ ---
99
+
100
+ ## Output (With Active Bolt)
101
+
102
+ ```markdown
103
+ ## Construction Agent
104
+
105
+ ### Active Bolt: `{bolt-id}`
106
+ **Unit**: `{unit-name}`
107
+ **Type**: {bolt-type}
108
+ **Stage**: {current_stage} ({n}/{total})
109
+
110
+ ### Progress
111
+ [████████████░░░░░░░░] 60% (3/5 stages)
112
+
113
+ ### Quick Actions
114
+
115
+ 1 - **Continue Current Bolt**: Resume work (`bolt-start --bolt-id="{bolt-id}"`)
116
+ 2 - **View Bolt Status**: Detailed status (`bolt-status --bolt-id="{bolt-id}"`)
117
+ 3 - **List All Bolts**: See all bolts (`bolt-list`)
118
+ 4 - **Switch Bolt**: Select a different bolt
119
+
120
+ ### Suggested Next Step
121
+ → Continue working on `{bolt-id}` - currently at {stage} stage
122
+
123
+ **Press Enter to continue or type a number.**
124
+ ```
125
+
126
+ ---
127
+
128
+ ## Output (No Active Bolt)
129
+
130
+ ```markdown
131
+ ## Construction Agent
132
+
133
+ ### No Active Bolt
134
+
135
+ ### Available Bolts
136
+
137
+ - [ ] `001-auth-service` (auth-service, DDD) - planned
138
+ - [ ] `002-auth-service` (auth-service, DDD) - planned
139
+ - [ ] `003-api-gateway` (api-gateway, Simple) - planned
140
+
141
+ ### Quick Actions
142
+
143
+ 1 - **Start 001-auth-service**: Begin first bolt
144
+ 2 - **List all bolts**: View with details
145
+ 3 - **View bolt status**: Check specific bolt
146
+
147
+ ### Suggested Next Step
148
+ → Start construction with `001-auth-service`
149
+
150
+ **Type a number or enter a bolt ID.**
151
+ ```
152
+
153
+ ---
154
+
155
+ ## Output (All Bolts Complete)
156
+
157
+ ```markdown
158
+ ## Construction Agent
159
+
160
+ ### Construction Complete for Unit: `{unit-name}`
161
+
162
+ All {n} bolts have been completed:
163
+
164
+ - ✅ `001-{unit-name}` - Completed 2024-12-05 (3h)
165
+ - ✅ `005-{unit-name}` - Completed 2024-12-06 (4h)
166
+
167
+ ### Summary
168
+ - Stories delivered: {n}
169
+ - Tests passing: ✅
170
+ - Ready for deployment
171
+
172
+ ### Next Step
173
+ → Proceed to Operations: `/iris-operations-agent --unit="{unit}"`
174
+
175
+ Or work on another unit's bolts.
176
+ ```
177
+
178
+ ---
179
+
180
+ ## Transition
181
+
182
+ After user selection:
183
+
184
+ - → Load selected skill
185
+ - → Skill contains the Checkpoint markers
186
+ - → Execute skill process
187
+
188
+ ---
189
+
190
+ ## Test Contract
191
+
192
+ ```yaml
193
+ input: Unit/bolt state (optional)
194
+ output: Menu with skill options, suggested next step
195
+ checkpoints: 0 (routing only)
196
+ ```
@@ -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**: `.iris/aidlc/memory-bank.yaml` - artifact schema
44
+ - **Required**: `.iris/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
+ `.iris/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 `.iris/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: `.iris/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
+ ```