project-iris 0.0.13 → 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.
- package/README.md +261 -94
- package/bin/cli.js +21 -0
- package/flows/aidlc/README.md +372 -0
- package/flows/aidlc/agents/construction-agent.md +79 -0
- package/flows/aidlc/agents/inception-agent.md +97 -0
- package/flows/aidlc/agents/master-agent.md +61 -0
- package/flows/aidlc/agents/operations-agent.md +89 -0
- package/flows/aidlc/commands/construction-agent.md +63 -0
- package/flows/aidlc/commands/inception-agent.md +55 -0
- package/flows/aidlc/commands/master-agent.md +47 -0
- package/flows/aidlc/commands/operations-agent.md +77 -0
- package/flows/aidlc/context-config.yaml +67 -0
- package/flows/aidlc/memory-bank.yaml +104 -0
- package/flows/aidlc/quick-start.md +322 -0
- package/flows/aidlc/skills/construction/bolt-list.md +163 -0
- package/flows/aidlc/skills/construction/bolt-replan.md +345 -0
- package/flows/aidlc/skills/construction/bolt-start.md +442 -0
- package/flows/aidlc/skills/construction/bolt-status.md +185 -0
- package/flows/aidlc/skills/construction/navigator.md +196 -0
- package/flows/aidlc/skills/inception/bolt-plan.md +372 -0
- package/flows/aidlc/skills/inception/context.md +171 -0
- package/flows/aidlc/skills/inception/intent-create.md +211 -0
- package/flows/aidlc/skills/inception/intent-list.md +124 -0
- package/flows/aidlc/skills/inception/navigator.md +207 -0
- package/flows/aidlc/skills/inception/requirements.md +227 -0
- package/flows/aidlc/skills/inception/review.md +248 -0
- package/flows/aidlc/skills/inception/story-create.md +304 -0
- package/flows/aidlc/skills/inception/units.md +278 -0
- package/flows/aidlc/skills/master/analyze-context.md +239 -0
- package/flows/aidlc/skills/master/answer-question.md +141 -0
- package/flows/aidlc/skills/master/explain-flow.md +158 -0
- package/flows/aidlc/skills/master/project-init.md +281 -0
- package/flows/aidlc/skills/master/route-request.md +126 -0
- package/flows/aidlc/skills/operations/build.md +237 -0
- package/flows/aidlc/skills/operations/deploy.md +259 -0
- package/flows/aidlc/skills/operations/monitor.md +265 -0
- package/flows/aidlc/skills/operations/navigator.md +209 -0
- package/flows/aidlc/skills/operations/verify.md +224 -0
- package/{dist/iris_bundle/frameworks/iris-core → flows/aidlc}/templates/construction/bolt-types/ddd-construction-bolt.md +3 -3
- package/{dist → flows/aidlc}/templates/construction/bolt-types/spike-bolt.md +2 -2
- package/flows/aidlc/templates/construction/construction-log-template.md +129 -0
- package/flows/aidlc/templates/construction/standards/coding-standards.md +29 -0
- package/flows/aidlc/templates/construction/standards/system-architecture.md +22 -0
- package/flows/aidlc/templates/construction/standards/tech-stack.md +19 -0
- package/flows/aidlc/templates/inception/inception-log-template.md +134 -0
- package/flows/aidlc/templates/inception/project/README.md +55 -0
- package/flows/aidlc/templates/standards/catalog.yaml +345 -0
- package/flows/aidlc/templates/standards/coding-standards.guide.md +553 -0
- package/flows/aidlc/templates/standards/data-stack.guide.md +162 -0
- package/flows/aidlc/templates/standards/tech-stack.guide.md +280 -0
- package/lib/InstallerFactory.js +36 -0
- package/lib/analytics/env-detector.js +92 -0
- package/lib/analytics/index.js +22 -0
- package/lib/analytics/machine-id.js +33 -0
- package/lib/analytics/tracker.js +232 -0
- package/lib/cli-utils.js +342 -0
- package/lib/constants.js +32 -0
- package/lib/installer.js +402 -0
- package/lib/installers/AntigravityInstaller.js +22 -0
- package/lib/installers/ClaudeInstaller.js +85 -0
- package/lib/installers/ClineInstaller.js +21 -0
- package/lib/installers/CodexInstaller.js +21 -0
- package/lib/installers/CopilotInstaller.js +113 -0
- package/lib/installers/CursorInstaller.js +63 -0
- package/lib/installers/GeminiInstaller.js +75 -0
- package/lib/installers/KiroInstaller.js +22 -0
- package/lib/installers/OpenCodeInstaller.js +22 -0
- package/lib/installers/RooInstaller.js +22 -0
- package/lib/installers/ToolInstaller.js +73 -0
- package/lib/installers/WindsurfInstaller.js +22 -0
- package/lib/markdown-validator.ts +175 -0
- package/lib/yaml-validator.ts +99 -0
- package/package.json +105 -32
- package/scripts/artifact-validator.js +594 -0
- package/scripts/bolt-complete.js +606 -0
- package/scripts/status-integrity.js +598 -0
- package/dist/bridge/agent-runner.js +0 -190
- package/dist/bridge/connector-factory.js +0 -31
- package/dist/bridge/connectors/antigravity-connector.js +0 -18
- package/dist/bridge/connectors/cursor-connector.js +0 -31
- package/dist/bridge/connectors/in-process-connector.js +0 -29
- package/dist/bridge/connectors/vscode-connector.js +0 -31
- package/dist/bridge/connectors/windsurf-connector.js +0 -23
- package/dist/bridge/filesystem-connector.js +0 -110
- package/dist/bridge/helper.js +0 -203
- package/dist/bridge/types.js +0 -10
- package/dist/cli.js +0 -40
- package/dist/commands/ask.js +0 -259
- package/dist/commands/bridge.js +0 -88
- package/dist/commands/create.js +0 -25
- package/dist/commands/develop.js +0 -141
- package/dist/commands/doctor.js +0 -102
- package/dist/commands/flow.js +0 -301
- package/dist/commands/framework.js +0 -273
- package/dist/commands/generate.js +0 -59
- package/dist/commands/install.js +0 -100
- package/dist/commands/pack.js +0 -33
- package/dist/commands/phase.js +0 -38
- package/dist/commands/run.js +0 -199
- package/dist/commands/status.js +0 -114
- package/dist/commands/uninstall.js +0 -14
- package/dist/commands/use.js +0 -20
- package/dist/commands/validate.js +0 -102
- package/dist/framework/framework-loader.js +0 -97
- package/dist/framework/framework-paths.js +0 -48
- package/dist/framework/framework-types.js +0 -15
- package/dist/iris/artifact-checker.js +0 -78
- package/dist/iris/artifacts/config.js +0 -68
- package/dist/iris/artifacts/generator.js +0 -88
- package/dist/iris/artifacts/types.js +0 -1
- package/dist/iris/bundle.js +0 -44
- package/dist/iris/doctrine/collector.js +0 -124
- package/dist/iris/fixer.js +0 -149
- package/dist/iris/flows/manifest.js +0 -124
- package/dist/iris/framework-context.js +0 -49
- package/dist/iris/framework-manager.js +0 -215
- package/dist/iris/fs/atomic.js +0 -22
- package/dist/iris/guard.js +0 -38
- package/dist/iris/importers/index.js +0 -9
- package/dist/iris/importers/types.js +0 -8
- package/dist/iris/importers/writer.js +0 -139
- package/dist/iris/include.js +0 -49
- package/dist/iris/installer.js +0 -334
- package/dist/iris/interactive/env.js +0 -21
- package/dist/iris/interactive/intent-interview.js +0 -345
- package/dist/iris/interactive/intent-schema.js +0 -28
- package/dist/iris/interactive/interview-io.js +0 -22
- package/dist/iris/interview/config.js +0 -71
- package/dist/iris/interview/types.js +0 -16
- package/dist/iris/interview/utils.js +0 -38
- package/dist/iris/manifest.js +0 -54
- package/dist/iris/packer.js +0 -325
- package/dist/iris/parsers/unit-parser.js +0 -43
- package/dist/iris/paths.js +0 -18
- package/dist/iris/policy.js +0 -133
- package/dist/iris/proc.js +0 -56
- package/dist/iris/report.js +0 -53
- package/dist/iris/resolver.js +0 -66
- package/dist/iris/router.js +0 -114
- package/dist/iris/routes.js +0 -189
- package/dist/iris/run-state.js +0 -146
- package/dist/iris/state.js +0 -113
- package/dist/iris/templates.js +0 -70
- package/dist/iris/tmp.js +0 -24
- package/dist/iris/uninstaller.js +0 -181
- package/dist/iris/utils/interpolate.js +0 -42
- package/dist/iris/validator.js +0 -391
- package/dist/iris/workflow/config.js +0 -51
- package/dist/iris/workflow/engine.js +0 -129
- package/dist/iris/workflow/steps.js +0 -448
- package/dist/iris/workflow/types.js +0 -1
- package/dist/iris_bundle/frameworks/iris-core/framework.yaml +0 -9
- package/dist/iris_bundle/frameworks/iris-core/memory/memory-bank.yaml +0 -1
- package/dist/iris_bundle/frameworks/iris-core/policy.yaml +0 -7
- package/dist/iris_bundle/frameworks/iris-core/templates/config/memory-bank.yaml +0 -1
- package/dist/iris_bundle/frameworks/iris-core/templates/construction/bolt-types/spike-bolt.md +0 -240
- package/dist/lib.js +0 -96
- package/dist/templates/construction/bolt-template.md +0 -226
- package/dist/templates/construction/bolt-types/ddd-construction-bolt/adr-template.md +0 -49
- package/dist/templates/construction/bolt-types/ddd-construction-bolt/ddd-01-domain-model-template.md +0 -55
- package/dist/templates/construction/bolt-types/ddd-construction-bolt/ddd-02-technical-design-template.md +0 -67
- package/dist/templates/construction/bolt-types/ddd-construction-bolt/ddd-03-test-report-template.md +0 -62
- package/dist/templates/construction/bolt-types/ddd-construction-bolt.md +0 -528
- package/dist/templates/construction/bolt-types/simple-construction-bolt.md +0 -347
- package/dist/templates/inception/requirements-template.md +0 -144
- package/dist/templates/inception/stories-template.md +0 -38
- package/dist/templates/inception/story-template.md +0 -147
- package/dist/templates/inception/system-context-template.md +0 -29
- package/dist/templates/inception/unit-brief-template.md +0 -177
- package/dist/templates/inception/units-template.md +0 -52
- package/dist/utils/exit-codes.js +0 -7
- package/dist/utils/logo.js +0 -17
- package/dist/workflows/bolt-execution.js +0 -238
- package/dist/workflows/bolt-plan.js +0 -221
- package/dist/workflows/intent-inception.js +0 -285
- package/dist/workflows/memory-bank-generator.js +0 -180
- package/dist/workflows/reporting.js +0 -74
- /package/{dist/iris_bundle/frameworks/iris-core → flows/aidlc}/templates/construction/bolt-template.md +0 -0
- /package/{dist/iris_bundle/frameworks/iris-core → flows/aidlc}/templates/construction/bolt-types/ddd-construction-bolt/adr-template.md +0 -0
- /package/{dist/iris_bundle/frameworks/iris-core → flows/aidlc}/templates/construction/bolt-types/ddd-construction-bolt/ddd-01-domain-model-template.md +0 -0
- /package/{dist/iris_bundle/frameworks/iris-core → flows/aidlc}/templates/construction/bolt-types/ddd-construction-bolt/ddd-02-technical-design-template.md +0 -0
- /package/{dist/iris_bundle/frameworks/iris-core → flows/aidlc}/templates/construction/bolt-types/ddd-construction-bolt/ddd-03-test-report-template.md +0 -0
- /package/{dist/iris_bundle/frameworks/iris-core → flows/aidlc}/templates/construction/bolt-types/simple-construction-bolt.md +0 -0
- /package/{dist/iris_bundle/frameworks/iris-core → flows/aidlc}/templates/inception/requirements-template.md +0 -0
- /package/{dist/iris_bundle/frameworks/iris-core → flows/aidlc}/templates/inception/stories-template.md +0 -0
- /package/{dist/iris_bundle/frameworks/iris-core → flows/aidlc}/templates/inception/story-template.md +0 -0
- /package/{dist/iris_bundle/frameworks/iris-core → flows/aidlc}/templates/inception/system-context-template.md +0 -0
- /package/{dist/iris_bundle/frameworks/iris-core → flows/aidlc}/templates/inception/unit-brief-template.md +0 -0
- /package/{dist/iris_bundle/frameworks/iris-core → flows/aidlc}/templates/inception/units-template.md +0 -0
|
@@ -1,177 +0,0 @@
|
|
|
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
|
|
@@ -1,52 +0,0 @@
|
|
|
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)
|
package/dist/utils/exit-codes.js
DELETED
package/dist/utils/logo.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,238 +0,0 @@
|
|
|
1
|
-
import { randomUUID } from "crypto";
|
|
2
|
-
import inquirer from "inquirer";
|
|
3
|
-
import kleur from "kleur";
|
|
4
|
-
import { WorkflowStage } from "../bridge/types.js";
|
|
5
|
-
import { appendEvent, saveRun } from "../iris/run-state.js";
|
|
6
|
-
/**
|
|
7
|
-
* Execute Bolt Execution stage
|
|
8
|
-
* For each bolt:
|
|
9
|
-
* 1. Design notes (optional gate)
|
|
10
|
-
* 2. Implementation
|
|
11
|
-
* 3. Testing
|
|
12
|
-
* 4. Gate after implementation
|
|
13
|
-
*/
|
|
14
|
-
export async function executeBoltExecution(runState, connector, options) {
|
|
15
|
-
console.log(kleur.bold("Bolt Execution Stage"));
|
|
16
|
-
console.log(kleur.dim(`Executing ${runState.bolts.length} bolt(s)\n`));
|
|
17
|
-
// Execute each bolt in order
|
|
18
|
-
while (runState.currentBoltIndex < runState.bolts.length) {
|
|
19
|
-
const bolt = runState.bolts[runState.currentBoltIndex];
|
|
20
|
-
console.log(kleur.bold(kleur.cyan(`\n=== Bolt ${runState.currentBoltIndex + 1}/${runState.bolts.length}: ${bolt.id} ===\n`)));
|
|
21
|
-
bolt.status = "in_progress";
|
|
22
|
-
saveRun(runState);
|
|
23
|
-
try {
|
|
24
|
-
await executeSingleBolt(runState, bolt, connector, options);
|
|
25
|
-
bolt.status = "completed";
|
|
26
|
-
runState.currentBoltIndex++;
|
|
27
|
-
saveRun(runState);
|
|
28
|
-
console.log(kleur.green(`✓ Bolt "${bolt.id}" completed\n`));
|
|
29
|
-
}
|
|
30
|
-
catch (error) {
|
|
31
|
-
console.error(kleur.red(`✗ Bolt "${bolt.id}" failed: ${error.message}\n`));
|
|
32
|
-
bolt.status = "failed";
|
|
33
|
-
saveRun(runState);
|
|
34
|
-
throw error;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
// All bolts complete
|
|
38
|
-
console.log(kleur.bold(kleur.green("\n✓ All bolts executed successfully!")));
|
|
39
|
-
runState.stage = WorkflowStage.DONE;
|
|
40
|
-
saveRun(runState);
|
|
41
|
-
}
|
|
42
|
-
async function executeSingleBolt(runState, bolt, connector, options) {
|
|
43
|
-
// Step 1: Design (optional)
|
|
44
|
-
console.log(kleur.cyan("→ Design phase..."));
|
|
45
|
-
const designTaskId = randomUUID();
|
|
46
|
-
const designPacket = {
|
|
47
|
-
taskId: designTaskId,
|
|
48
|
-
intent: runState.intent,
|
|
49
|
-
stage: WorkflowStage.BOLT_EXECUTION,
|
|
50
|
-
agent: "iris-construction-agent",
|
|
51
|
-
instructions: `Design phase for bolt: ${bolt.id}
|
|
52
|
-
|
|
53
|
-
Review the bolt file: memory-bank/operations/bolts/${bolt.id}.md
|
|
54
|
-
|
|
55
|
-
Create design notes covering:
|
|
56
|
-
- Domain model (if applicable)
|
|
57
|
-
- Technical approach
|
|
58
|
-
- Key decisions (ADRs if needed)
|
|
59
|
-
- File structure
|
|
60
|
-
|
|
61
|
-
You may create design notes inline in the bolt file or in separate files.
|
|
62
|
-
This is optional but recommended for complex bolts.`,
|
|
63
|
-
inputs: [
|
|
64
|
-
`memory-bank/operations/bolts/${bolt.id}.md`,
|
|
65
|
-
...runState.artifacts
|
|
66
|
-
],
|
|
67
|
-
expectedOutputs: [],
|
|
68
|
-
metadata: { step: "design", boltId: bolt.id }
|
|
69
|
-
};
|
|
70
|
-
appendEvent(runState.runId, {
|
|
71
|
-
stage: WorkflowStage.BOLT_EXECUTION,
|
|
72
|
-
boltId: bolt.id,
|
|
73
|
-
action: "Design phase started",
|
|
74
|
-
taskId: designTaskId
|
|
75
|
-
});
|
|
76
|
-
if (!options.noBridge) {
|
|
77
|
-
await connector.sendTask(designPacket);
|
|
78
|
-
console.log(kleur.dim(` Task sent: ${designTaskId}`));
|
|
79
|
-
console.log(kleur.dim(" Waiting for design notes...\n"));
|
|
80
|
-
const designResult = await connector.waitResult(designTaskId, {
|
|
81
|
-
timeoutMs: 600000 // 10 minutes
|
|
82
|
-
});
|
|
83
|
-
if (designResult.status === "ok") {
|
|
84
|
-
console.log(kleur.green("✓ Design complete"));
|
|
85
|
-
if (designResult.filesChanged) {
|
|
86
|
-
designResult.filesChanged.forEach(file => console.log(kleur.dim(` - ${file}`)));
|
|
87
|
-
}
|
|
88
|
-
console.log("");
|
|
89
|
-
bolt.designCompleted = true;
|
|
90
|
-
appendEvent(runState.runId, {
|
|
91
|
-
stage: WorkflowStage.BOLT_EXECUTION,
|
|
92
|
-
boltId: bolt.id,
|
|
93
|
-
action: "Design completed",
|
|
94
|
-
outputs: designResult.filesChanged,
|
|
95
|
-
resultStatus: "ok"
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
else {
|
|
100
|
-
console.log(kleur.yellow(" Bridge disabled. Skipping design phase.\n"));
|
|
101
|
-
}
|
|
102
|
-
// Step 2: Implementation
|
|
103
|
-
console.log(kleur.cyan("→ Implementation phase..."));
|
|
104
|
-
const implTaskId = randomUUID();
|
|
105
|
-
const implPacket = {
|
|
106
|
-
taskId: implTaskId,
|
|
107
|
-
intent: runState.intent,
|
|
108
|
-
stage: WorkflowStage.BOLT_EXECUTION,
|
|
109
|
-
agent: "iris-construction-agent",
|
|
110
|
-
instructions: `Implementation phase for bolt: ${bolt.id}
|
|
111
|
-
|
|
112
|
-
Review:
|
|
113
|
-
- Bolt file: memory-bank/operations/bolts/${bolt.id}.md
|
|
114
|
-
- Intent artifacts in memory-bank/intents/
|
|
115
|
-
- Any design notes created
|
|
116
|
-
|
|
117
|
-
Implement all tasks listed in the bolt file.
|
|
118
|
-
Create/modify code files as needed.
|
|
119
|
-
Follow the project's coding standards.
|
|
120
|
-
|
|
121
|
-
Mark tasks as complete in the bolt file as you finish them.`,
|
|
122
|
-
inputs: [
|
|
123
|
-
`memory-bank/operations/bolts/${bolt.id}.md`,
|
|
124
|
-
...runState.artifacts
|
|
125
|
-
],
|
|
126
|
-
expectedOutputs: [],
|
|
127
|
-
gates: ["Implementation complete - ready for testing"],
|
|
128
|
-
metadata: { step: "implementation", boltId: bolt.id }
|
|
129
|
-
};
|
|
130
|
-
appendEvent(runState.runId, {
|
|
131
|
-
stage: WorkflowStage.BOLT_EXECUTION,
|
|
132
|
-
boltId: bolt.id,
|
|
133
|
-
action: "Implementation started",
|
|
134
|
-
taskId: implTaskId
|
|
135
|
-
});
|
|
136
|
-
if (!options.noBridge) {
|
|
137
|
-
await connector.sendTask(implPacket);
|
|
138
|
-
console.log(kleur.dim(` Task sent: ${implTaskId}`));
|
|
139
|
-
console.log(kleur.dim(" Waiting for implementation...\n"));
|
|
140
|
-
const implResult = await connector.waitResult(implTaskId, {
|
|
141
|
-
timeoutMs: 1200000 // 20 minutes
|
|
142
|
-
});
|
|
143
|
-
if (implResult.status === "error") {
|
|
144
|
-
throw new Error(implResult.error || "Implementation failed");
|
|
145
|
-
}
|
|
146
|
-
console.log(kleur.green("✓ Implementation complete"));
|
|
147
|
-
if (implResult.filesChanged) {
|
|
148
|
-
implResult.filesChanged.forEach(file => console.log(kleur.dim(` - ${file}`)));
|
|
149
|
-
}
|
|
150
|
-
console.log("");
|
|
151
|
-
bolt.implementationCompleted = true;
|
|
152
|
-
appendEvent(runState.runId, {
|
|
153
|
-
stage: WorkflowStage.BOLT_EXECUTION,
|
|
154
|
-
boltId: bolt.id,
|
|
155
|
-
action: "Implementation completed",
|
|
156
|
-
outputs: implResult.filesChanged,
|
|
157
|
-
resultStatus: "ok"
|
|
158
|
-
});
|
|
159
|
-
}
|
|
160
|
-
else {
|
|
161
|
-
console.log(kleur.yellow(" Bridge disabled. Skipping implementation.\n"));
|
|
162
|
-
}
|
|
163
|
-
// Step 3: Testing
|
|
164
|
-
console.log(kleur.cyan("→ Testing phase..."));
|
|
165
|
-
const testTaskId = randomUUID();
|
|
166
|
-
const testPacket = {
|
|
167
|
-
taskId: testTaskId,
|
|
168
|
-
intent: runState.intent,
|
|
169
|
-
stage: WorkflowStage.BOLT_EXECUTION,
|
|
170
|
-
agent: "iris-construction-agent",
|
|
171
|
-
instructions: `Testing phase for bolt: ${bolt.id}
|
|
172
|
-
|
|
173
|
-
Run tests or propose test commands for the implemented changes.
|
|
174
|
-
|
|
175
|
-
If tests exist, run them and report results.
|
|
176
|
-
If no tests exist, propose what should be tested and expected outcomes.
|
|
177
|
-
|
|
178
|
-
Include:
|
|
179
|
-
- Test commands run
|
|
180
|
-
- Test results
|
|
181
|
-
- Any issues found`,
|
|
182
|
-
inputs: [
|
|
183
|
-
`memory-bank/operations/bolts/${bolt.id}.md`
|
|
184
|
-
],
|
|
185
|
-
expectedOutputs: [],
|
|
186
|
-
metadata: { step: "testing", boltId: bolt.id }
|
|
187
|
-
};
|
|
188
|
-
appendEvent(runState.runId, {
|
|
189
|
-
stage: WorkflowStage.BOLT_EXECUTION,
|
|
190
|
-
boltId: bolt.id,
|
|
191
|
-
action: "Testing started",
|
|
192
|
-
taskId: testTaskId
|
|
193
|
-
});
|
|
194
|
-
if (!options.noBridge) {
|
|
195
|
-
await connector.sendTask(testPacket);
|
|
196
|
-
console.log(kleur.dim(` Task sent: ${testTaskId}`));
|
|
197
|
-
console.log(kleur.dim(" Waiting for test results...\n"));
|
|
198
|
-
const testResult = await connector.waitResult(testTaskId, {
|
|
199
|
-
timeoutMs: 600000 // 10 minutes
|
|
200
|
-
});
|
|
201
|
-
console.log(kleur.green("✓ Testing complete"));
|
|
202
|
-
console.log(kleur.dim(` ${testResult.message}`));
|
|
203
|
-
console.log("");
|
|
204
|
-
bolt.testingCompleted = true;
|
|
205
|
-
appendEvent(runState.runId, {
|
|
206
|
-
stage: WorkflowStage.BOLT_EXECUTION,
|
|
207
|
-
boltId: bolt.id,
|
|
208
|
-
action: "Testing completed",
|
|
209
|
-
message: testResult.message,
|
|
210
|
-
resultStatus: testResult.status
|
|
211
|
-
});
|
|
212
|
-
}
|
|
213
|
-
else {
|
|
214
|
-
console.log(kleur.yellow(" Bridge disabled. Skipping testing.\n"));
|
|
215
|
-
}
|
|
216
|
-
// Step 4: Gate - Approve bolt?
|
|
217
|
-
if (options.gate === "manual") {
|
|
218
|
-
console.log(kleur.bold(kleur.yellow("Gate: Bolt Completion")));
|
|
219
|
-
const { approved } = await inquirer.prompt([
|
|
220
|
-
{
|
|
221
|
-
type: "confirm",
|
|
222
|
-
name: "approved",
|
|
223
|
-
message: `Approve bolt "${bolt.id}" and continue?`,
|
|
224
|
-
default: true
|
|
225
|
-
}
|
|
226
|
-
]);
|
|
227
|
-
appendEvent(runState.runId, {
|
|
228
|
-
stage: WorkflowStage.BOLT_EXECUTION,
|
|
229
|
-
boltId: bolt.id,
|
|
230
|
-
action: "Gate decision",
|
|
231
|
-
userGateDecision: approved ? "approved" : "rejected"
|
|
232
|
-
});
|
|
233
|
-
if (!approved) {
|
|
234
|
-
throw new Error("Bolt rejected by user");
|
|
235
|
-
}
|
|
236
|
-
console.log(kleur.green("✓ Bolt approved\n"));
|
|
237
|
-
}
|
|
238
|
-
}
|