project-iris 0.0.8 → 0.0.12

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 (160) hide show
  1. package/README.md +294 -264
  2. package/dist/bridge/agent-runner.js +190 -0
  3. package/dist/bridge/connector-factory.js +4 -0
  4. package/dist/bridge/connectors/in-process-connector.js +29 -0
  5. package/dist/bridge/filesystem-connector.js +5 -0
  6. package/dist/cli.js +12 -2
  7. package/dist/commands/ask.js +150 -23
  8. package/dist/commands/bridge.js +8 -0
  9. package/dist/commands/create.js +25 -0
  10. package/dist/commands/flow.js +301 -0
  11. package/dist/commands/framework.js +273 -0
  12. package/dist/commands/generate.js +59 -0
  13. package/dist/commands/install.js +72 -29
  14. package/dist/commands/pack.js +7 -1
  15. package/dist/commands/run.js +195 -13
  16. package/dist/commands/status.js +9 -0
  17. package/dist/commands/uninstall.js +3 -1
  18. package/dist/commands/use.js +20 -0
  19. package/dist/commands/validate.js +80 -65
  20. package/dist/framework/framework-loader.js +97 -0
  21. package/dist/framework/framework-paths.js +48 -0
  22. package/dist/framework/framework-types.js +15 -0
  23. package/dist/iris/artifacts/config.js +68 -0
  24. package/dist/iris/artifacts/generator.js +88 -0
  25. package/dist/iris/artifacts/types.js +1 -0
  26. package/dist/iris/bundle.js +44 -0
  27. package/dist/iris/doctrine/collector.js +124 -0
  28. package/dist/iris/fixer.js +28 -22
  29. package/dist/iris/flows/manifest.js +124 -0
  30. package/dist/iris/framework-context.js +49 -0
  31. package/dist/iris/framework-manager.js +215 -0
  32. package/dist/iris/fs/atomic.js +22 -0
  33. package/dist/iris/importers/index.js +9 -0
  34. package/dist/iris/importers/types.js +8 -0
  35. package/dist/iris/importers/writer.js +139 -0
  36. package/dist/iris/installer.js +105 -40
  37. package/dist/iris/interactive/env.js +21 -0
  38. package/dist/iris/interactive/intent-interview.js +345 -0
  39. package/dist/iris/interactive/intent-schema.js +28 -0
  40. package/dist/iris/interactive/interview-io.js +22 -0
  41. package/dist/iris/interview/config.js +71 -0
  42. package/dist/iris/interview/types.js +16 -0
  43. package/dist/iris/interview/utils.js +38 -0
  44. package/dist/iris/packer.js +69 -47
  45. package/dist/iris/parsers/unit-parser.js +43 -0
  46. package/dist/iris/paths.js +18 -0
  47. package/dist/iris/policy.js +122 -17
  48. package/dist/iris/proc.js +56 -0
  49. package/dist/iris/resolver.js +3 -0
  50. package/dist/iris/routes.js +180 -11
  51. package/dist/iris/run-state.js +3 -0
  52. package/dist/iris/state.js +37 -9
  53. package/dist/iris/templates.js +70 -0
  54. package/dist/iris/tmp.js +24 -0
  55. package/dist/iris/uninstaller.js +24 -9
  56. package/dist/iris/utils/interpolate.js +42 -0
  57. package/dist/iris/validator.js +72 -10
  58. package/dist/iris/workflow/config.js +51 -0
  59. package/dist/iris/workflow/engine.js +129 -0
  60. package/dist/iris/workflow/steps.js +448 -0
  61. package/dist/iris/workflow/types.js +1 -0
  62. package/dist/iris_bundle/frameworks/iris-core/framework.yaml +9 -0
  63. package/dist/iris_bundle/frameworks/iris-core/memory/memory-bank.yaml +1 -0
  64. package/dist/iris_bundle/frameworks/iris-core/policy.yaml +7 -0
  65. package/dist/iris_bundle/frameworks/iris-core/templates/config/memory-bank.yaml +1 -0
  66. package/dist/iris_bundle/frameworks/iris-core/templates/construction/bolt-template.md +226 -0
  67. package/dist/iris_bundle/frameworks/iris-core/templates/construction/bolt-types/ddd-construction-bolt/adr-template.md +49 -0
  68. package/dist/iris_bundle/frameworks/iris-core/templates/construction/bolt-types/ddd-construction-bolt/ddd-01-domain-model-template.md +55 -0
  69. package/dist/iris_bundle/frameworks/iris-core/templates/construction/bolt-types/ddd-construction-bolt/ddd-02-technical-design-template.md +67 -0
  70. package/dist/iris_bundle/frameworks/iris-core/templates/construction/bolt-types/ddd-construction-bolt/ddd-03-test-report-template.md +62 -0
  71. package/dist/iris_bundle/frameworks/iris-core/templates/construction/bolt-types/ddd-construction-bolt.md +528 -0
  72. package/dist/iris_bundle/frameworks/iris-core/templates/construction/bolt-types/simple-construction-bolt.md +347 -0
  73. package/dist/iris_bundle/frameworks/iris-core/templates/construction/bolt-types/spike-bolt.md +240 -0
  74. package/dist/iris_bundle/frameworks/iris-core/templates/inception/requirements-template.md +144 -0
  75. package/dist/iris_bundle/frameworks/iris-core/templates/inception/stories-template.md +38 -0
  76. package/dist/iris_bundle/frameworks/iris-core/templates/inception/story-template.md +147 -0
  77. package/dist/iris_bundle/frameworks/iris-core/templates/inception/system-context-template.md +29 -0
  78. package/dist/iris_bundle/frameworks/iris-core/templates/inception/unit-brief-template.md +177 -0
  79. package/dist/iris_bundle/frameworks/iris-core/templates/inception/units-template.md +52 -0
  80. package/dist/templates/construction/bolt-template.md +226 -0
  81. package/dist/templates/construction/bolt-types/ddd-construction-bolt/adr-template.md +49 -0
  82. package/dist/templates/construction/bolt-types/ddd-construction-bolt/ddd-01-domain-model-template.md +55 -0
  83. package/dist/templates/construction/bolt-types/ddd-construction-bolt/ddd-02-technical-design-template.md +67 -0
  84. package/dist/templates/construction/bolt-types/ddd-construction-bolt/ddd-03-test-report-template.md +62 -0
  85. package/dist/templates/construction/bolt-types/ddd-construction-bolt.md +528 -0
  86. package/dist/templates/construction/bolt-types/simple-construction-bolt.md +347 -0
  87. package/dist/templates/construction/bolt-types/spike-bolt.md +240 -0
  88. package/dist/templates/inception/requirements-template.md +144 -0
  89. package/dist/templates/inception/stories-template.md +38 -0
  90. package/dist/templates/inception/story-template.md +147 -0
  91. package/dist/templates/inception/system-context-template.md +29 -0
  92. package/dist/templates/inception/unit-brief-template.md +177 -0
  93. package/dist/templates/inception/units-template.md +52 -0
  94. package/dist/utils/logo.js +17 -0
  95. package/dist/workflows/bolt-plan.js +57 -28
  96. package/dist/workflows/intent-inception.js +169 -72
  97. package/dist/workflows/memory-bank-generator.js +180 -0
  98. package/package.json +10 -7
  99. package/src/iris_bundle/.iris/aidlc/README.md +0 -16
  100. package/src/iris_bundle/.iris/aidlc/agents/iris-construction-agent.md +0 -35
  101. package/src/iris_bundle/.iris/aidlc/agents/iris-inception-agent.md +0 -30
  102. package/src/iris_bundle/.iris/aidlc/agents/iris-master-agent.md +0 -35
  103. package/src/iris_bundle/.iris/aidlc/agents/iris-operations-agent.md +0 -29
  104. package/src/iris_bundle/.iris/aidlc/commands/iris-construction-agent.md +0 -18
  105. package/src/iris_bundle/.iris/aidlc/commands/iris-inception-agent.md +0 -18
  106. package/src/iris_bundle/.iris/aidlc/commands/iris-master-agent.md +0 -18
  107. package/src/iris_bundle/.iris/aidlc/commands/iris-operations-agent.md +0 -18
  108. package/src/iris_bundle/.iris/aidlc/context/context-map.md +0 -25
  109. package/src/iris_bundle/.iris/aidlc/context/exclusion-rules.md +0 -13
  110. package/src/iris_bundle/.iris/aidlc/context/load-order.md +0 -25
  111. package/src/iris_bundle/.iris/aidlc/memory/intent-rules.md +0 -9
  112. package/src/iris_bundle/.iris/aidlc/memory/log-rules.md +0 -5
  113. package/src/iris_bundle/.iris/aidlc/memory/memory-bank.yaml +0 -39
  114. package/src/iris_bundle/.iris/aidlc/memory/unit-rules.md +0 -9
  115. package/src/iris_bundle/.iris/aidlc/quick-start.md +0 -24
  116. package/src/iris_bundle/.iris/aidlc/skills/execution/implementation.md +0 -14
  117. package/src/iris_bundle/.iris/aidlc/skills/execution/refactoring.md +0 -13
  118. package/src/iris_bundle/.iris/aidlc/skills/execution/scaffold-generation.md +0 -15
  119. package/src/iris_bundle/.iris/aidlc/skills/governance/escalation.md +0 -13
  120. package/src/iris_bundle/.iris/aidlc/skills/governance/quality-gates.md +0 -14
  121. package/src/iris_bundle/.iris/aidlc/skills/governance/stop-conditions.md +0 -11
  122. package/src/iris_bundle/.iris/aidlc/skills/reasoning/decomposition.md +0 -23
  123. package/src/iris_bundle/.iris/aidlc/skills/reasoning/risk-analysis.md +0 -14
  124. package/src/iris_bundle/.iris/aidlc/skills/reasoning/verification.md +0 -21
  125. package/src/iris_bundle/.iris/aidlc/standards/artifacts-registry.md +0 -38
  126. package/src/iris_bundle/.iris/aidlc/standards/decision-logging.md +0 -16
  127. package/src/iris_bundle/.iris/aidlc/standards/doctrine-structure.md +0 -31
  128. package/src/iris_bundle/.iris/aidlc/standards/documentation-rules.md +0 -15
  129. package/src/iris_bundle/.iris/aidlc/standards/file-structure.md +0 -21
  130. package/src/iris_bundle/.iris/aidlc/standards/naming-conventions.md +0 -18
  131. package/src/iris_bundle/.iris/aidlc/standards/phases-and-gates.md +0 -25
  132. package/src/iris_bundle/.iris/aidlc/standards/routes-and-routing.md +0 -35
  133. package/src/iris_bundle/.iris/aidlc/standards/tool-wrappers.md +0 -32
  134. package/src/iris_bundle/.iris/aidlc/templates/bolt.md +0 -23
  135. package/src/iris_bundle/.iris/aidlc/templates/doctrine-doc-template.md +0 -33
  136. package/src/iris_bundle/.iris/aidlc/templates/intent.md +0 -23
  137. package/src/iris_bundle/.iris/aidlc/templates/log.md +0 -24
  138. package/src/iris_bundle/.iris/aidlc/templates/review.md +0 -21
  139. package/src/iris_bundle/.iris/aidlc/templates/unit.md +0 -31
  140. package/src/iris_bundle/.iris/aidlc/validation/failure-modes.md +0 -16
  141. package/src/iris_bundle/.iris/aidlc/validation/phase-preconditions.md +0 -21
  142. package/src/iris_bundle/.iris/aidlc/validation/quality-checklist.md +0 -20
  143. package/src/iris_bundle/.iris/policy.yaml +0 -27
  144. package/src/iris_bundle/.iris/routes.yaml +0 -98
  145. package/src/iris_bundle/.iris/state.yaml +0 -7
  146. package/src/iris_bundle/.iris/tools/claude/.claude/claude.md +0 -9
  147. package/src/iris_bundle/.iris/tools/claude/.claude/commands/compare-specs.md +0 -203
  148. package/src/iris_bundle/.iris/tools/claude/.claude/commands/iris-construction-agent.md +0 -25
  149. package/src/iris_bundle/.iris/tools/claude/.claude/commands/iris-inception-agent.md +0 -25
  150. package/src/iris_bundle/.iris/tools/claude/.claude/commands/iris-master-agent.md +0 -25
  151. package/src/iris_bundle/.iris/tools/claude/.claude/commands/iris-operations-agent.md +0 -25
  152. package/src/iris_bundle/.iris/tools/codex/AGENTS.md +0 -15
  153. package/src/iris_bundle/.iris/tools/cursor/.cursor/commands/iris-construction-agent.md +0 -25
  154. package/src/iris_bundle/.iris/tools/cursor/.cursor/commands/iris-inception-agent.md +0 -25
  155. package/src/iris_bundle/.iris/tools/cursor/.cursor/commands/iris-master-agent.md +0 -25
  156. package/src/iris_bundle/.iris/tools/cursor/.cursor/commands/iris-operations-agent.md +0 -25
  157. package/src/iris_bundle/.iris/tools/gemini/.gemini/commands/iris-construction-agent.toml +0 -29
  158. package/src/iris_bundle/.iris/tools/gemini/.gemini/commands/iris-inception-agent.toml +0 -29
  159. package/src/iris_bundle/.iris/tools/gemini/.gemini/commands/iris-master-agent.toml +0 -29
  160. package/src/iris_bundle/.iris/tools/gemini/.gemini/commands/iris-operations-agent.toml +0 -29
@@ -0,0 +1,38 @@
1
+ ---
2
+ intent: {NNN}-{intent-name}
3
+ phase: inception
4
+ status: stories-created
5
+ updated: {YYYY-MM-DDTHH:MM:SSZ}
6
+ ---
7
+
8
+ # {Intent Name} - Stories
9
+
10
+ ## User Stories
11
+
12
+ ### Story-1: {Title}
13
+
14
+ **As a** {user type}
15
+ **I want** {goal}
16
+ **So that** {benefit}
17
+
18
+ **Acceptance Criteria**:
19
+
20
+ - [ ] {Criterion 1}
21
+ - [ ] {Criterion 2}
22
+
23
+ **Priority**: High/Medium/Low
24
+ **Estimate**: {T-shirt size: S/M/L/XL}
25
+
26
+ ### Story-2: {Title}
27
+
28
+ ...
29
+
30
+ ## Technical Stories
31
+
32
+ ### Tech-Story-1: {Title}
33
+
34
+ **Description**: {What needs to be done technically}
35
+ **Rationale**: {Why this is needed}
36
+ **Acceptance Criteria**:
37
+
38
+ - [ ] {Criterion}
@@ -0,0 +1,147 @@
1
+ # Story Template
2
+
3
+ Use this template when creating individual story files during story creation.
4
+
5
+ ---
6
+
7
+ ## Frontmatter
8
+
9
+ ```yaml
10
+ ---
11
+ id: {SSS}-{title-slug}
12
+ unit: {UUU}-{unit-name}
13
+ intent: {NNN}-{intent-name}
14
+ status: draft
15
+ priority: must|should|could
16
+ created: {YYYY-MM-DDTHH:MM:SSZ}
17
+ assigned_bolt: null
18
+ implemented: false
19
+ ---
20
+ ```
21
+
22
+ ---
23
+
24
+ ## Content
25
+
26
+ ```markdown
27
+ # Story: {SSS}-{title-slug}
28
+
29
+ ## User Story
30
+
31
+ **As a** {user role}
32
+ **I want** {goal/action}
33
+ **So that** {benefit/reason}
34
+
35
+ ## Acceptance Criteria
36
+
37
+ - [ ] **Given** {precondition}, **When** {action}, **Then** {expected outcome}
38
+ - [ ] **Given** {precondition}, **When** {action}, **Then** {expected outcome}
39
+ - [ ] **Given** {precondition}, **When** {action}, **Then** {expected outcome}
40
+
41
+ ## Technical Notes
42
+
43
+ {Implementation hints, constraints, or considerations}
44
+
45
+ ## Dependencies
46
+
47
+ ### Requires
48
+ - {Other stories this depends on, or "None"}
49
+
50
+ ### Enables
51
+ - {Stories that depend on this, or "None"}
52
+
53
+ ## Edge Cases
54
+
55
+ | Scenario | Expected Behavior |
56
+ |----------|-------------------|
57
+ | {edge case 1} | {behavior} |
58
+ | {edge case 2} | {behavior} |
59
+
60
+ ## Out of Scope
61
+
62
+ - {What this story does NOT cover}
63
+ ```
64
+
65
+ ---
66
+
67
+ ## Priority Levels
68
+
69
+ | Priority | Meaning | Criteria |
70
+ |----------|---------|----------|
71
+ | `must` | Required for MVP | System unusable without this |
72
+ | `should` | Important | Significant value, not blocking |
73
+ | `could` | Nice to have | Enhances experience |
74
+
75
+ ---
76
+
77
+ ## Status Values
78
+
79
+ | Status | Meaning |
80
+ |--------|---------|
81
+ | `draft` | Story written, needs review |
82
+ | `ready` | Reviewed, ready for bolt |
83
+ | `in-progress` | Being implemented in a bolt |
84
+ | `implemented` | Code complete |
85
+ | `tested` | Tests passing |
86
+ | `done` | All acceptance criteria met |
87
+
88
+ ---
89
+
90
+ ## Example
91
+
92
+ ```yaml
93
+ ---
94
+ id: 001-user-signup
95
+ unit: 001-auth-service
96
+ intent: 001-user-authentication
97
+ status: ready
98
+ priority: must
99
+ created: 2024-12-05T10:00:00Z
100
+ assigned_bolt: 001-auth-service
101
+ implemented: false
102
+ ---
103
+ ```
104
+
105
+ ```markdown
106
+ # Story: 001-user-signup
107
+
108
+ ## User Story
109
+
110
+ **As a** new user
111
+ **I want** to register with my email and password
112
+ **So that** I can access the application
113
+
114
+ ## Acceptance Criteria
115
+
116
+ - [ ] **Given** I am on the registration page, **When** I enter valid email and password, **Then** my account is created and I receive a confirmation email
117
+ - [ ] **Given** I enter an email that already exists, **When** I submit registration, **Then** I see an error message "Email already registered"
118
+ - [ ] **Given** I enter a password less than 8 characters, **When** I submit, **Then** I see validation error
119
+
120
+ ## Technical Notes
121
+
122
+ - Password must be hashed with bcrypt (cost factor 12)
123
+ - Email validation should use RFC 5322 compliant regex
124
+ - Rate limit registration to 5 attempts per IP per hour
125
+
126
+ ## Dependencies
127
+
128
+ ### Requires
129
+ - None (first story)
130
+
131
+ ### Enables
132
+ - 002-user-login (User login)
133
+ - 003-email-verification (Email verification)
134
+
135
+ ## Edge Cases
136
+
137
+ | Scenario | Expected Behavior |
138
+ |----------|-------------------|
139
+ | SQL injection in email | Safely escaped, validation fails |
140
+ | Very long email (255+ chars) | Validation error |
141
+ | Unicode in password | Allowed, properly encoded |
142
+
143
+ ## Out of Scope
144
+
145
+ - Social login (OAuth) - separate story
146
+ - Password reset - separate story
147
+ ```
@@ -0,0 +1,29 @@
1
+ ---
2
+ intent: {NNN}-{intent-name}
3
+ phase: inception
4
+ status: context-defined
5
+ updated: {YYYY-MM-DDTHH:MM:SSZ}
6
+ ---
7
+
8
+ # {Intent Name} - System Context
9
+
10
+ ## System Overview
11
+
12
+ {High-level description of what we are building}
13
+
14
+ ## Context Diagram
15
+
16
+ {Mermaid diagram showing System, Users, and External Systems}
17
+
18
+ ## External Integrations
19
+
20
+ - **System A**: {Purpose of integration}
21
+ - **System B**: {Purpose of integration}
22
+
23
+ ## High-Level Constraints
24
+
25
+ - {e.g., Must run on AWS, Must use existing Auth provider}
26
+
27
+ ## Key NFR Goals
28
+
29
+ - {High-level performance/security goals to guide construction}
@@ -0,0 +1,177 @@
1
+ # Unit Brief Template
2
+
3
+ Use this template when creating unit briefs during decomposition. This is the **critical input for Construction**.
4
+
5
+ ---
6
+
7
+ ## Frontmatter
8
+
9
+ ```yaml
10
+ ---
11
+ unit: {UUU}-{unit-name}
12
+ intent: {NNN}-{intent-name}
13
+ phase: inception
14
+ status: draft|ready
15
+ created: {YYYY-MM-DDTHH:MM:SSZ}
16
+ updated: {YYYY-MM-DDTHH:MM:SSZ}
17
+ ---
18
+ ```
19
+
20
+ **Note**: The `unit` field uses the full folder name including the 3-digit prefix (e.g., `001-auth-service`). This matches the folder structure and enables direct path construction in scripts. Story naming uses the story title (e.g., `001-user-signup.md`).
21
+
22
+ ---
23
+
24
+ ## Content
25
+
26
+ ```markdown
27
+ # Unit Brief: {Unit Name}
28
+
29
+ ## Purpose
30
+
31
+ {Clear, concise statement of what this unit does and why it exists}
32
+
33
+ ## Scope
34
+
35
+ ### In Scope
36
+ - {What this unit IS responsible for}
37
+ - {What this unit IS responsible for}
38
+
39
+ ### Out of Scope
40
+ - {What this unit is NOT responsible for}
41
+ - {What other units handle}
42
+
43
+ ---
44
+
45
+ ## Assigned Requirements
46
+
47
+ **These FRs from the intent are assigned to this unit. Stories will be created from these.**
48
+
49
+ | FR | Requirement | Priority |
50
+ |----|-------------|----------|
51
+ | FR-{n} | {description from intent requirements.md} | Must/Should/Could |
52
+
53
+ ---
54
+
55
+ ## Domain Concepts
56
+
57
+ ### Key Entities
58
+ | Entity | Description | Attributes |
59
+ |--------|-------------|------------|
60
+ | {Entity 1} | {What it represents} | {Key properties} |
61
+ | {Entity 2} | {What it represents} | {Key properties} |
62
+
63
+ ### Key Operations
64
+ | Operation | Description | Inputs | Outputs |
65
+ |-----------|-------------|--------|---------|
66
+ | {Operation 1} | {What it does} | {Input data} | {Output data} |
67
+ | {Operation 2} | {What it does} | {Input data} | {Output data} |
68
+
69
+ ---
70
+
71
+ ## Story Summary
72
+
73
+ | Metric | Count |
74
+ |--------|-------|
75
+ | Total Stories | {n} |
76
+ | Must Have | {n} |
77
+ | Should Have | {n} |
78
+ | Could Have | {n} |
79
+
80
+ ### Stories
81
+
82
+ | Story ID | Title | Priority | Status |
83
+ |----------|-------|----------|--------|
84
+ | {story-1} | {Title} | Must | Planned |
85
+ | {story-2} | {Title} | Should | Planned |
86
+
87
+ ---
88
+
89
+ ## Dependencies
90
+
91
+ ### Depends On
92
+ | Unit | Reason |
93
+ |------|--------|
94
+ | {unit-name} | {Why this dependency exists} |
95
+
96
+ ### Depended By
97
+ | Unit | Reason |
98
+ |------|--------|
99
+ | {unit-name} | {Why they depend on this} |
100
+
101
+ ### External Dependencies
102
+ | System | Purpose | Risk |
103
+ |--------|---------|------|
104
+ | {External system} | {Why needed} | {Risk level} |
105
+
106
+ ---
107
+
108
+ ## Technical Context
109
+
110
+ ### Suggested Technology
111
+ {Recommendations based on tech stack standards}
112
+
113
+ ### Integration Points
114
+ | Integration | Type | Protocol |
115
+ |-------------|------|----------|
116
+ | {System/Unit} | API/Event/DB | REST/GraphQL/Kafka |
117
+
118
+ ### Data Storage
119
+ | Data | Type | Volume | Retention |
120
+ |------|------|--------|-----------|
121
+ | {Data type} | SQL/NoSQL/Cache | {Volume} | {Retention} |
122
+
123
+ ---
124
+
125
+ ## Constraints
126
+
127
+ - {Technical constraint specific to this unit}
128
+ - {Business constraint specific to this unit}
129
+
130
+ ---
131
+
132
+ ## Success Criteria
133
+
134
+ ### Functional
135
+ - [ ] {Criterion 1: What must work}
136
+ - [ ] {Criterion 2: What must work}
137
+
138
+ ### Non-Functional
139
+ - [ ] {Performance target}
140
+ - [ ] {Security requirement}
141
+
142
+ ### Quality
143
+ - [ ] Code coverage > 80%
144
+ - [ ] All acceptance criteria met
145
+ - [ ] Code reviewed and approved
146
+
147
+ ---
148
+
149
+ ## Bolt Suggestions
150
+
151
+ Based on stories and complexity:
152
+
153
+ | Bolt | Type | Stories | Objective |
154
+ |------|------|---------|-----------|
155
+ | bolt-{unit}-1 | DDD | S1, S2 | Core entities |
156
+ | bolt-{unit}-2 | DDD | S3, S4 | API layer |
157
+
158
+ ---
159
+
160
+ ## Notes
161
+
162
+ {Any additional context, risks, or considerations for Construction}
163
+ ```
164
+
165
+ ---
166
+
167
+ ## Quality Checklist
168
+
169
+ Before marking unit brief as ready:
170
+
171
+ - [ ] Purpose is clear and specific
172
+ - [ ] Scope boundaries are defined
173
+ - [ ] Key entities identified
174
+ - [ ] Stories assigned to this unit
175
+ - [ ] Dependencies mapped
176
+ - [ ] Success criteria are measurable
177
+ - [ ] Bolt suggestions provided
@@ -0,0 +1,52 @@
1
+ ---
2
+ intent: {NNN}-{intent-name}
3
+ phase: inception
4
+ status: units-decomposed
5
+ updated: {YYYY-MM-DDTHH:MM:SSZ}
6
+ ---
7
+
8
+ # {Intent Name} - Unit Decomposition
9
+
10
+ ## Units Overview
11
+
12
+ This intent decomposes into {N} units of work:
13
+
14
+ ### Unit 1: {unit-name}
15
+
16
+ **Description**: {What this unit does}
17
+
18
+ **Stories**:
19
+
20
+ - Story-1: {Title}
21
+ - Story-3: {Title}
22
+
23
+ **Deliverables**:
24
+
25
+ - {Specific artifacts this unit produces}
26
+
27
+ **Dependencies**:
28
+
29
+ - Depends on: {Other units}
30
+ - Depended by: {Units that need this}
31
+
32
+ **Estimated Complexity**: S/M/L/XL
33
+
34
+ ### Unit 2: {unit-name}
35
+
36
+ ...
37
+
38
+ ## Unit Dependency Graph
39
+
40
+ ```text
41
+ [Unit A] ──> [Unit B] ──> [Unit D]
42
+ │ │
43
+ └────> [Unit C] ──┘
44
+ ```
45
+
46
+ ## Execution Order
47
+
48
+ Based on dependencies:
49
+
50
+ 1. Day 1-2: Unit A (foundation)
51
+ 2. Day 2-4: Unit B, Unit C (parallel)
52
+ 3. Day 5-6: Unit D (integration)
@@ -0,0 +1,17 @@
1
+ import kleur from "kleur";
2
+ /**
3
+ * Display the OSiris Operating System IRIS logo banner
4
+ */
5
+ export function displayLogo(version = "0.0.11") {
6
+ const logo = `
7
+ ██████╗ ███████╗██╗██████╗ ██╗███████╗
8
+ ██╔═══██╗██╔════╝██║██╔══██╗██║██╔════╝
9
+ ██║ ██║███████╗██║██████╔╝██║███████╗
10
+ ██║ ██║╚════██║██║██╔══██╗██║╚════██║
11
+ ╚██████╔╝███████║██║██║ ██║██║███████║
12
+ ╚═════╝ ╚══════╝╚═╝╚═╝ ╚═╝╚═╝╚══════╝`;
13
+ console.log(kleur.yellow(logo));
14
+ console.log("");
15
+ console.log(kleur.yellow().bold("OSiris Operating System") + kleur.yellow(" Intelligent Repository for Intent-driven Systems") + kleur.gray(` v${version}`));
16
+ console.log("");
17
+ }
@@ -5,6 +5,9 @@ import fs from "fs";
5
5
  import path from "path";
6
6
  import { WorkflowStage } from "../bridge/types.js";
7
7
  import { appendEvent, saveRun } from "../iris/run-state.js";
8
+ import { fileURLToPath } from "url";
9
+ const __filename = fileURLToPath(import.meta.url);
10
+ const __dirname = path.dirname(__filename);
8
11
  /**
9
12
  * Execute Bolt Plan stage
10
13
  * Steps:
@@ -18,44 +21,69 @@ export async function executeBoltPlan(runState, connector, options) {
18
21
  // Step 1: Generate bolt plan
19
22
  console.log(kleur.cyan("→ Generating bolt plan..."));
20
23
  const planTaskId = randomUUID();
24
+ // Load template
25
+ const templateDir = path.join(__dirname, "../templates/construction");
26
+ let boltTemplate = "";
27
+ try {
28
+ if (fs.existsSync(path.join(templateDir, "bolt-template.md"))) {
29
+ boltTemplate = fs.readFileSync(path.join(templateDir, "bolt-template.md"), "utf-8");
30
+ }
31
+ }
32
+ catch (e) {
33
+ console.error("Failed to load bolt template:", e);
34
+ }
21
35
  const planPacket = {
22
36
  taskId: planTaskId,
23
37
  intent: runState.intent,
24
38
  stage: WorkflowStage.BOLT_PLAN,
25
39
  agent: "iris-master-agent",
26
40
  instructions: `Based on the intent artifacts, create a bolt plan and individual bolt files.
41
+
42
+ You must create a DETAILED implementation plan.
27
43
 
28
44
  Intent: ${runState.intent}
29
45
 
30
46
  Review the intent artifacts in memory-bank/intents/ to understand requirements.
31
47
 
32
48
  Create:
33
- 1. memory-bank/operations/bolts/plan.md - Overall implementation plan listing all bolts
34
- 2. memory-bank/operations/bolts/<bolt-id>.md - One file per bolt
35
-
36
- Each bolt should be a focused, testable unit of work (e.g., "setup-database", "create-api-endpoint", "build-ui-component").
37
-
38
- Bolt file format:
39
- # Bolt: <Name>
49
+ 1. memory-bank/bolts/plan.md - Overall implementation plan listing all bolts
50
+ 2. memory-bank/bolts/<bolt-id>/bolt.md - One directory and file per bolt
40
51
 
41
- ## Purpose
42
- Brief description of what this bolt accomplishes
52
+ For each bolt, generate a separate markdown file with:
53
+ 1. Rich YAML frontmatter:
54
+ - id, unit, intent, type, status
55
+ - stories list
56
+ - timestamps (created, started, completed)
57
+ - requires_bolts/enables_bolts arrays
58
+ - complexity metrics
59
+ 2. Full bolt structure:
60
+ - Overview, Objective, Stories Included
61
+ - Bolt Type with reference
62
+ - Stages checklist
63
+ - Dependencies (Requires/Enables)
64
+ - Success Criteria
65
+ - Implementation Notes
43
66
 
44
- ## Dependencies
45
- List any other bolts this depends on
67
+ Analyze dependencies:
68
+ - Identify which bolts must complete before others
69
+ - Set requires_bolts field for dependent bolts
70
+ - Set enables_bolts to show what each bolt unlocks
71
+ - Calculate complexity based on:
72
+ - avg_complexity: 1-5 (code complexity)
73
+ - avg_uncertainty: 1-5 (requirements clarity)
74
+ - max_dependencies: count
75
+ - testing_scope: 1-5 (testing needed)
46
76
 
47
- ## Tasks
48
- - [ ] Task 1
49
- - [ ] Task 2
77
+ Use the following Bolt Template EXACTLY for each bolt file:
50
78
 
51
- ## Acceptance Criteria
52
- - Criterion 1
53
- - Criterion 2
79
+ --- TEMPLATE: bolt.md ---
80
+ ${boltTemplate}
81
+ -------------------------
54
82
 
55
83
  In plan.md, list all bolts in dependency order.`,
56
84
  inputs: runState.artifacts,
57
85
  expectedOutputs: [
58
- "memory-bank/operations/bolts/plan.md"
86
+ "memory-bank/bolts/plan.md"
59
87
  ],
60
88
  metadata: { step: "generate_bolt_plan" }
61
89
  };
@@ -154,17 +182,17 @@ In plan.md, list all bolts in dependency order.`,
154
182
  * Looks for bolt file references or creates default list
155
183
  */
156
184
  async function parseBoltsFromPlan() {
157
- const planPath = path.join(process.cwd(), "memory-bank/operations/bolts/plan.md");
185
+ const planPath = path.join(process.cwd(), "memory-bank/bolts/plan.md");
158
186
  if (!fs.existsSync(planPath)) {
159
187
  return [];
160
188
  }
161
189
  const content = fs.readFileSync(planPath, "utf8");
162
190
  const bolts = [];
163
- // Look for bolt file references (e.g., "- bolt-name.md" or "1. bolt-name")
164
- const boltPattern = /(?:^|\n)(?:\d+\.|[-*])\s+([a-z0-9-]+)(?:\.md)?/gi;
191
+ // Look for bolt file references (e.g., "- bolt-name" or "1. bolt-name")
192
+ const boltPattern = /(?:^|\n)(?:\d+\.|[-*])\s+([a-z0-9-]+)(?:\/bolt\.md)?/gi;
165
193
  let match;
166
194
  while ((match = boltPattern.exec(content)) !== null) {
167
- const boltId = match[1].replace(/\.md$/, "");
195
+ const boltId = match[1].replace(/\/bolt\.md$/, "");
168
196
  if (!bolts.find(b => b.id === boltId)) {
169
197
  bolts.push({
170
198
  id: boltId,
@@ -172,16 +200,17 @@ async function parseBoltsFromPlan() {
172
200
  });
173
201
  }
174
202
  }
175
- // Also check for actual bolt files in the directory
176
- const boltsDir = path.join(process.cwd(), "memory-bank/operations/bolts");
203
+ // Also check for actual bolt directories
204
+ const boltsDir = path.join(process.cwd(), "memory-bank/bolts");
177
205
  if (fs.existsSync(boltsDir)) {
178
206
  const files = fs.readdirSync(boltsDir);
179
207
  files.forEach(file => {
180
- if (file.endsWith(".md") && file !== "plan.md") {
181
- const boltId = file.replace(/\.md$/, "");
182
- if (!bolts.find(b => b.id === boltId)) {
208
+ // Check if it's a directory and has bolt.md
209
+ const boltPath = path.join(boltsDir, file, "bolt.md");
210
+ if (fs.existsSync(boltPath)) {
211
+ if (!bolts.find(b => b.id === file)) {
183
212
  bolts.push({
184
- id: boltId,
213
+ id: file,
185
214
  status: "pending"
186
215
  });
187
216
  }