project-iris 0.0.12 → 0.0.14

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 +214 -323
  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 +22 -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 +105 -32
  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,304 @@
1
+ # Skill: Create Stories
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
+ - [ ] Stories ← this skill
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
+ Define atomic, testable User Stories for each Unit that will guide Construction.
35
+
36
+ ---
37
+
38
+ ## Input
39
+
40
+ - **Required**: Unit name and `unit-brief.md`
41
+ - **Required**: `.iris/aidlc/memory-bank.yaml` - artifact schema
42
+ - **Optional**: Requirements to reference
43
+
44
+ ---
45
+
46
+ ## Process
47
+
48
+ ### 0. Gap Analysis (Internal)
49
+
50
+ Before creating stories, analyze existing state internally:
51
+
52
+ 1. **Read story-index.md** if it exists
53
+ 2. **Scan story folders** for existing `.md` files
54
+ 3. **Identify gaps** - missing files, unmarked stories
55
+
56
+ **Auto-proceed**: Create missing stories and update markers. Do not stop for user input.
57
+
58
+ ---
59
+
60
+ ### 1. Analyze Unit Brief
61
+
62
+ Review the unit-brief.md to understand:
63
+
64
+ - **Assigned Requirements** - FRs mapped to this unit (stories come from these)
65
+ - Purpose and scope
66
+ - Key entities and operations
67
+ - Dependencies
68
+ - Success criteria
69
+
70
+ **IMPORTANT**: Stories are created from the unit's **Assigned Requirements** section, NOT directly from intent requirements.md. The FR-to-unit mapping happened during unit decomposition.
71
+
72
+ ### 2. Generate Stories
73
+
74
+ For each feature in the unit:
75
+
76
+ 1. **Identify User Actions**: What can users do?
77
+ 2. **Break Down**: One story per testable behavior
78
+ 3. **Format**: Use standard user story format
79
+ 4. **Size**: Each story should be completable in one bolt stage
80
+
81
+ **Story Format**:
82
+
83
+ ```markdown
84
+ ## Story: {story-id}
85
+
86
+ ### User Story
87
+ As a {role}
88
+ I want to {action}
89
+ So that {benefit}
90
+
91
+ ### Acceptance Criteria
92
+ - [ ] Given {context}, When {action}, Then {outcome}
93
+ - [ ] Given {context}, When {action}, Then {outcome}
94
+
95
+ ### Technical Notes
96
+ - {implementation hints if any}
97
+
98
+ ### Dependencies
99
+ - {other stories this depends on}
100
+ ```
101
+
102
+ ### 3. Apply INVEST Criteria
103
+
104
+ Validate each story against:
105
+
106
+ - [ ] **I**ndependent: Can be developed without other stories? (Preferred)
107
+ - [ ] **N**egotiable: Details can be refined during bolt? (Required)
108
+ - [ ] **V**aluable: Delivers value to user? (Required)
109
+ - [ ] **E**stimable: Scope is clear enough to plan? (Required)
110
+ - [ ] **S**mall: Fits in a single bolt stage? (Required)
111
+ - [ ] **T**estable: Acceptance criteria are binary? (Required)
112
+
113
+ ### 4. Group by Priority
114
+
115
+ Organize stories for bolt planning:
116
+
117
+ - **Must**: Core functionality (Authentication, core CRUD)
118
+ - **Should**: Important but not blocking (Error handling, validation)
119
+ - **Could**: Nice to have (Advanced features, optimizations)
120
+
121
+ ### 5. Document Stories
122
+
123
+ 1. **Read Path**: Check `schema.stories` from `.iris/aidlc/memory-bank.yaml`
124
+ *(Default: `memory-bank/intents/{intent-name}/units/{unit-name}/stories/`)*
125
+
126
+ 2. **Create Directory**:
127
+ Ensure `.../units/{unit-name}/stories/` exists
128
+
129
+ 3. **Create Story Files** (IMPORTANT - ONE FILE PER STORY):
130
+
131
+ **Read naming convention from `.iris/aidlc/memory-bank.yaml`**
132
+
133
+ Format: `{SSS}-{title-slug}.md`
134
+ - `{SSS}` = 3-digit story number (e.g., `001`, `002`)
135
+ - `{title-slug}` = Kebab-case story title (e.g., `user-can-login`)
136
+
137
+ **DO NOT** create a single `stories.md` file with all stories
138
+
139
+ Use template: `.iris/aidlc/templates/inception/story-template.md`
140
+
141
+ **Example for intent `001-user-authentication`, unit `auth-service` with 6 stories:**
142
+
143
+ ```text
144
+ 001-user-authentication/
145
+ └── units/
146
+ └── auth-service/
147
+ ├── unit-brief.md
148
+ └── stories/
149
+ ├── 001-user-signup.md
150
+ ├── 002-user-login.md
151
+ ├── 003-user-logout.md
152
+ ├── 004-invite-members.md
153
+ ├── 005-remove-members.md
154
+ └── 006-change-roles.md
155
+ ```
156
+
157
+ **Global uniqueness** comes from the full path:
158
+ `memory-bank/intents/001-user-authentication/units/auth-service/stories/001-user-signup.md`
159
+
160
+ 4. **Link to Unit**:
161
+ Update unit's story index if one exists
162
+
163
+ ### 6. Update Unit Brief with Story Summary
164
+
165
+ **CRITICAL**: After creating stories, update the unit-brief.md with a story summary.
166
+
167
+ Add/update this section in the unit's `unit-brief.md`:
168
+
169
+ ```markdown
170
+ ---
171
+
172
+ ## Story Summary
173
+
174
+ - **Total Stories**: {n}
175
+ - **Must Have**: {n}
176
+ - **Should Have**: {n}
177
+ - **Could Have**: {n}
178
+
179
+ ### Stories
180
+
181
+ - [ ] **AUTH-001**: User signup - Must - Planned
182
+ - [ ] **AUTH-002**: User login - Must - Planned
183
+ ```
184
+
185
+ This ensures each unit-brief shows its story count at a glance.
186
+
187
+ ### 7. Update Global Story Index
188
+
189
+ **CRITICAL**: After creating EACH story, IMMEDIATELY update the index.
190
+
191
+ **DO NOT** batch index updates - mark each story right after creating its file.
192
+
193
+ 1. **Read Configuration**: Check `story-index` settings in `.iris/aidlc/memory-bank.yaml`
194
+
195
+ 2. **Mark each story as generated:**
196
+
197
+ **Format - add ✅ GENERATED marker immediately after filename:**
198
+
199
+ ```markdown
200
+ ### 001-user-signup.md ✅ GENERATED
201
+ **Title**: User Registration with Password Hashing
202
+ ```
203
+
204
+ **Status markers:**
205
+ - No marker = Planned (not yet created)
206
+ - `✅ GENERATED` = File created
207
+ - `✅ COMPLETED` = Implemented in Construction
208
+
209
+ 3. **Based on mode**:
210
+
211
+ **Option 1: single-file** (default)
212
+ - Path: `memory-bank/story-index.md`
213
+ - Add all stories to the central index with full paths
214
+
215
+ **Option 2: per-intent**
216
+ - Path: `memory-bank/intents/{intent-name}/story-index.md`
217
+ - Create/update per-intent story indices
218
+
219
+ **Option 3: aggregate**
220
+ - No file to update (computed from unit stories on demand)
221
+
222
+ 4. **Story Index Format**:
223
+
224
+ ```markdown
225
+ # Global Story Index
226
+
227
+ ## Overview
228
+ - **Total stories**: {count}
229
+ - **Generated**: {count with ✅ GENERATED}
230
+ - **Last updated**: {date}
231
+
232
+ ---
233
+
234
+ ## Stories by Intent
235
+
236
+ ### {intent-name}
237
+
238
+ - [ ] **001-intent-AUTH-001** (auth): User signup - Must - Planned
239
+ - [x] **001-intent-AUTH-002** (auth): User login - Must - ✅ GENERATED
240
+ - [x] **001-intent-TASKS-001** (tasks): Create task - Must - ✅ COMPLETED
241
+
242
+ ---
243
+
244
+ ## Stories by Status
245
+
246
+ - **Planned**: {n}
247
+ - **Generated**: {n}
248
+ - **In Progress**: {n}
249
+ - **Completed**: {n}
250
+ ```
251
+
252
+ 5. **Verification after batch generation:**
253
+
254
+ After generating all stories for a unit, verify:
255
+
256
+ ```markdown
257
+ ### Verification: {unit-name}
258
+ - Stories planned: {n}
259
+ - Stories created: {n}
260
+ - Index updated: {n} marked ✅ GENERATED
261
+ - Gaps: {list any missing}
262
+ ```
263
+
264
+ ---
265
+
266
+ ## Output
267
+
268
+ ```markdown
269
+ ## Stories Created: {unit-name}
270
+
271
+ ### Story Summary
272
+
273
+ - [ ] **S1**: User can register - Must - No dependencies
274
+ - [ ] **S2**: User can login - Must - Requires S1
275
+ - [ ] **S3**: User can reset password - Should - Requires S1
276
+ - [ ] **S4**: User can enable MFA - Could - Requires S2
277
+
278
+ ### Acceptance Criteria Count
279
+ - **Total criteria**: {n}
280
+ - **Must-have stories**: {n}
281
+ - **Should-have stories**: {n}
282
+ - **Could-have stories**: {n}
283
+
284
+ ### Artifacts Created (one file per story)
285
+ ✅ `{unit-path}/stories/001-{title-slug}.md`
286
+ ✅ `{unit-path}/stories/002-{title-slug}.md`
287
+ ✅ `{unit-path}/stories/003-{title-slug}.md`
288
+
289
+ ### Estimated Bolt Coverage
290
+ - Stories can be grouped into ~{n} bolts
291
+ - Suggested grouping provided in bolt-plan
292
+ ```
293
+
294
+ **No menu** - Skill complete, return to agent.
295
+
296
+ ---
297
+
298
+ ## Test Contract
299
+
300
+ ```yaml
301
+ input: Unit brief, requirements
302
+ output: Individual story files with acceptance criteria
303
+ checkpoints: 0 (part of Checkpoint 3 batch)
304
+ ```
@@ -0,0 +1,278 @@
1
+ # Skill: Decompose into Units
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
+ - [ ] Units ← this skill
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
+ Break the Intent into independently deployable Units of Work based on project type configuration.
35
+
36
+ ---
37
+
38
+ ## Input
39
+
40
+ - **Required**: Intent name
41
+ - **Required**: `requirements.md` for the intent
42
+ - **Required**: `system-context.md` for the intent
43
+ - **Required**: `.iris/aidlc/memory-bank.yaml` - artifact schema
44
+ - **Required**: `memory-bank/project.yaml` - project configuration (for project_type)
45
+ - **Required**: `.iris/aidlc/templates/standards/catalog.yaml` - project type definitions
46
+
47
+ ---
48
+
49
+ ## Process
50
+
51
+ ### 1. Load Project Type Configuration
52
+
53
+ **CRITICAL**: Before decomposing, understand what types of units to create.
54
+
55
+ 1. **Read project type** from `memory-bank/project.yaml`:
56
+
57
+ ```yaml
58
+ project_type: full-stack-web # or backend-api, frontend-app, cli-tool, library
59
+ ```
60
+
61
+ 2. **Read unit structure** from `catalog.yaml` under `project_types.{project_type}.unit_structure`:
62
+
63
+ ```yaml
64
+ unit_structure:
65
+ backend:
66
+ enabled: true
67
+ decomposition: domain-driven
68
+ default_bolt_type: ddd-construction-bolt
69
+ frontend:
70
+ enabled: true
71
+ decomposition: feature-based
72
+ default_bolt_type: simple-construction-bolt
73
+ naming_pattern: "{intent}-ui"
74
+ ```
75
+
76
+ 3. **Determine which unit types to create**:
77
+ - If `backend.enabled: true` → Create backend service units using domain-driven decomposition
78
+ - If `frontend.enabled: true` → Create a frontend unit for UI work
79
+ - If `cli.enabled: true` → Create CLI command units
80
+
81
+ **If project.yaml doesn't exist**, default to `backend-api` behavior (backend only).
82
+
83
+ ---
84
+
85
+ ### 2. Analyze Domain (Backend Units)
86
+
87
+ **Skip this step if `backend.enabled: false`.**
88
+
89
+ Review requirements and context to identify:
90
+
91
+ - **Bounded Contexts**: "What distinct domains exist?"
92
+ - **Aggregates**: "What are the core entities and their boundaries?"
93
+ - **Services**: "What operations span multiple entities?"
94
+ - **Integration Points**: "Where do contexts communicate?"
95
+
96
+ ### 3. Apply Decomposition Criteria (Backend Units)
97
+
98
+ **Skip this step if `backend.enabled: false`.**
99
+
100
+ For each potential unit, verify:
101
+
102
+ - [ ] **Single Responsibility**: Does it do one thing well? (Required)
103
+ - [ ] **Independence**: Can it be built/tested separately? (Required)
104
+ - [ ] **Deployability**: Can it be deployed independently? (Preferred)
105
+ - [ ] **Clear Interface**: Are inputs/outputs well-defined? (Required)
106
+ - [ ] **Cohesion**: Do its parts belong together? (Required)
107
+
108
+ ### 4. Map Requirements to Units
109
+
110
+ **CRITICAL**: Each FR from requirements.md must be assigned to exactly one unit.
111
+
112
+ ```markdown
113
+ ## Requirement-to-Unit Mapping
114
+
115
+ - **FR-1**: {description} → `{unit-name}`
116
+ - **FR-2**: {description} → `{unit-name}`
117
+ - **FR-3**: {description} → `{unit-name}`
118
+ ```
119
+
120
+ This mapping ensures:
121
+
122
+ - Every FR is accounted for
123
+ - Units have clear scope based on assigned FRs
124
+ - Stories will be created from unit's assigned FRs (not directly from intent)
125
+
126
+ ### 5. Create Frontend Unit (if enabled)
127
+
128
+ **Skip this step if `frontend.enabled: false`.**
129
+
130
+ When `frontend.enabled: true` in the project type configuration, create a frontend unit:
131
+
132
+ ```markdown
133
+ ### Unit N: {intent}-ui
134
+
135
+ - **Purpose**: Frontend application (pages, components, state management)
136
+ - **Responsibility**: User interface and client-side logic
137
+ - **Assigned Requirements**: All user-facing FRs
138
+ - **Dependencies**: All backend service units
139
+ - **Interface**: Consumes APIs from backend units
140
+ - **Unit Type**: frontend
141
+ - **Default Bolt Type**: simple-construction-bolt
142
+ ```
143
+
144
+ **Frontend unit characteristics**:
145
+
146
+ - Named using `naming_pattern` from catalog (default: `{intent}-ui`)
147
+ - Depends on ALL backend service units
148
+ - Uses `simple-construction-bolt` (not DDD)
149
+ - Assigned all user-facing requirements (UI, UX, interactions)
150
+
151
+ **Include in unit-brief.md**:
152
+
153
+ ```yaml
154
+ ---
155
+ unit: {UUU}-{intent}-ui
156
+ unit_type: frontend
157
+ default_bolt_type: simple-construction-bolt
158
+ ---
159
+ ```
160
+
161
+ **Note**: The `unit` field uses the full folder name including the numeric prefix (e.g., `001-auth-service`, `002-auth-service-ui`). This matches the folder structure and enables direct path construction in scripts.
162
+
163
+ ---
164
+
165
+ ### 6. Propose Unit Structure
166
+
167
+ Present proposed decomposition with their assigned requirements:
168
+
169
+ ```markdown
170
+ ## Proposed Units
171
+
172
+ ### Unit 1: {unit-name}
173
+ - **Purpose**: {what it does}
174
+ - **Responsibility**: {single responsibility}
175
+ - **Assigned Requirements**: FR-1, FR-2
176
+ - **Dependencies**: {other units it depends on}
177
+ - **Interface**: {how other units interact with it}
178
+
179
+ ### Unit 2: {unit-name}
180
+ - **Assigned Requirements**: FR-3, FR-4
181
+ ...
182
+
183
+ ### Unit N: {intent}-ui (if frontend enabled)
184
+ - **Purpose**: Frontend application
185
+ - **Unit Type**: frontend
186
+ - **Dependencies**: All backend units
187
+ ```
188
+
189
+ ### 7. Document Units
190
+
191
+ 1. **Read Path**: Check `schema.units` from `.iris/aidlc/memory-bank.yaml`
192
+ *(Default: `memory-bank/intents/{intent-name}/units.md`)*
193
+
194
+ 2. **Create Central List**:
195
+ Update `units.md` with all units for this intent
196
+
197
+ 3. **Create Unit Directories**:
198
+ For each unit: `{schema.units}/{UUU}-{unit-name}/`
199
+
200
+ 4. **Create Unit Brief** (CRITICAL):
201
+ For each unit, create `{UUU}-{unit-name}/unit-brief.md` using `.iris/aidlc/templates/inception/unit-brief-template.md`
202
+
203
+ This brief is the **input for Construction Agent**. Include:
204
+ - Purpose and scope
205
+ - Key entities and operations
206
+ - Dependencies on other units
207
+ - Technical constraints
208
+ - Success criteria
209
+
210
+ Example frontmatter:
211
+
212
+ ```yaml
213
+ ---
214
+ unit: {UUU}-{unit-name}
215
+ intent: {NNN}-{intent-name}
216
+ phase: inception
217
+ status: draft
218
+ ---
219
+ ```
220
+
221
+ **Note**: The `unit` field uses the full folder name including the numeric prefix. This matches the folder structure and enables direct path construction in scripts.
222
+
223
+ Story naming uses the story title (e.g., `001-user-signup.md`). No prefix field needed.
224
+
225
+ **For frontend units**, also include:
226
+
227
+ ```yaml
228
+ unit_type: frontend
229
+ default_bolt_type: simple-construction-bolt
230
+ ```
231
+
232
+ ### 8. Validate Independence
233
+
234
+ For each unit, verify:
235
+
236
+ - [ ] Can be developed by a separate team
237
+ - [ ] Has clear API/interface
238
+ - [ ] Failure doesn't cascade to other units
239
+ - [ ] Can be deployed without deploying others
240
+
241
+ ---
242
+
243
+ ## Output
244
+
245
+ ```markdown
246
+ ## Unit Decomposition: {NNN}-{intent-name}
247
+
248
+ ### Units Created
249
+
250
+ - [ ] **{UUU}-{unit-1}**: {purpose} - Dependencies: None - Stories: ~{n}
251
+ - [ ] **{UUU}-{unit-2}**: {purpose} - Dependencies: `{UUU}-{unit-1}` - Stories: ~{n}
252
+
253
+ ### Dependency Graph
254
+
255
+ {UUU}-{unit-1} ──► {UUU}-{unit-2} ──► {UUU}-{unit-3}
256
+
257
+
258
+ {UUU}-{unit-4}
259
+
260
+ ### Artifacts Created
261
+
262
+ ✅ `{intent-path}/units.md`
263
+ ✅ `{intent-path}/units/{UUU}-{unit-1}/unit-brief.md`
264
+ ✅ `{intent-path}/units/{UUU}-{unit-2}/unit-brief.md`
265
+
266
+ ```
267
+
268
+ **No menu** - Skill complete, return to agent.
269
+
270
+ ---
271
+
272
+ ## Test Contract
273
+
274
+ ```yaml
275
+ input: Intent requirements, system context, project.yaml, catalog.yaml
276
+ output: units.md, unit-brief.md for each unit (including frontend unit if enabled)
277
+ checkpoints: 0 (part of Checkpoint 3 batch)
278
+ ```