project-iris 0.0.8 → 0.0.11

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 (125) 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 +10 -2
  7. package/dist/commands/ask.js +150 -23
  8. package/dist/commands/bridge.js +8 -0
  9. package/dist/commands/flow.js +301 -0
  10. package/dist/commands/framework.js +273 -0
  11. package/dist/commands/generate.js +59 -0
  12. package/dist/commands/install.js +72 -29
  13. package/dist/commands/pack.js +7 -1
  14. package/dist/commands/run.js +195 -13
  15. package/dist/commands/status.js +9 -0
  16. package/dist/commands/uninstall.js +3 -1
  17. package/dist/commands/use.js +20 -0
  18. package/dist/commands/validate.js +80 -65
  19. package/dist/framework/framework-loader.js +97 -0
  20. package/dist/framework/framework-paths.js +48 -0
  21. package/dist/framework/framework-types.js +15 -0
  22. package/dist/iris/artifacts/config.js +68 -0
  23. package/dist/iris/artifacts/generator.js +88 -0
  24. package/dist/iris/artifacts/types.js +1 -0
  25. package/dist/iris/bundle.js +44 -0
  26. package/dist/iris/doctrine/collector.js +124 -0
  27. package/dist/iris/fixer.js +28 -22
  28. package/dist/iris/flows/manifest.js +124 -0
  29. package/dist/iris/framework-context.js +49 -0
  30. package/dist/iris/framework-manager.js +215 -0
  31. package/dist/iris/fs/atomic.js +22 -0
  32. package/dist/iris/importers/index.js +9 -0
  33. package/dist/iris/importers/types.js +8 -0
  34. package/dist/iris/importers/writer.js +139 -0
  35. package/dist/iris/installer.js +105 -40
  36. package/dist/iris/interactive/env.js +21 -0
  37. package/dist/iris/interactive/intent-interview.js +345 -0
  38. package/dist/iris/interactive/intent-schema.js +28 -0
  39. package/dist/iris/interactive/interview-io.js +22 -0
  40. package/dist/iris/interview/config.js +71 -0
  41. package/dist/iris/interview/types.js +16 -0
  42. package/dist/iris/interview/utils.js +38 -0
  43. package/dist/iris/packer.js +69 -47
  44. package/dist/iris/parsers/unit-parser.js +43 -0
  45. package/dist/iris/paths.js +18 -0
  46. package/dist/iris/policy.js +122 -17
  47. package/dist/iris/proc.js +56 -0
  48. package/dist/iris/resolver.js +3 -0
  49. package/dist/iris/routes.js +180 -11
  50. package/dist/iris/run-state.js +3 -0
  51. package/dist/iris/state.js +37 -9
  52. package/dist/iris/templates.js +70 -0
  53. package/dist/iris/tmp.js +24 -0
  54. package/dist/iris/uninstaller.js +24 -9
  55. package/dist/iris/utils/interpolate.js +42 -0
  56. package/dist/iris/validator.js +72 -10
  57. package/dist/iris/workflow/config.js +51 -0
  58. package/dist/iris/workflow/engine.js +129 -0
  59. package/dist/iris/workflow/steps.js +448 -0
  60. package/dist/iris/workflow/types.js +1 -0
  61. package/dist/utils/logo.js +17 -0
  62. package/dist/workflows/intent-inception.js +87 -65
  63. package/package.json +8 -6
  64. package/src/iris_bundle/.iris/aidlc/README.md +0 -16
  65. package/src/iris_bundle/.iris/aidlc/agents/iris-construction-agent.md +0 -35
  66. package/src/iris_bundle/.iris/aidlc/agents/iris-inception-agent.md +0 -30
  67. package/src/iris_bundle/.iris/aidlc/agents/iris-master-agent.md +0 -35
  68. package/src/iris_bundle/.iris/aidlc/agents/iris-operations-agent.md +0 -29
  69. package/src/iris_bundle/.iris/aidlc/commands/iris-construction-agent.md +0 -18
  70. package/src/iris_bundle/.iris/aidlc/commands/iris-inception-agent.md +0 -18
  71. package/src/iris_bundle/.iris/aidlc/commands/iris-master-agent.md +0 -18
  72. package/src/iris_bundle/.iris/aidlc/commands/iris-operations-agent.md +0 -18
  73. package/src/iris_bundle/.iris/aidlc/context/context-map.md +0 -25
  74. package/src/iris_bundle/.iris/aidlc/context/exclusion-rules.md +0 -13
  75. package/src/iris_bundle/.iris/aidlc/context/load-order.md +0 -25
  76. package/src/iris_bundle/.iris/aidlc/memory/intent-rules.md +0 -9
  77. package/src/iris_bundle/.iris/aidlc/memory/log-rules.md +0 -5
  78. package/src/iris_bundle/.iris/aidlc/memory/memory-bank.yaml +0 -39
  79. package/src/iris_bundle/.iris/aidlc/memory/unit-rules.md +0 -9
  80. package/src/iris_bundle/.iris/aidlc/quick-start.md +0 -24
  81. package/src/iris_bundle/.iris/aidlc/skills/execution/implementation.md +0 -14
  82. package/src/iris_bundle/.iris/aidlc/skills/execution/refactoring.md +0 -13
  83. package/src/iris_bundle/.iris/aidlc/skills/execution/scaffold-generation.md +0 -15
  84. package/src/iris_bundle/.iris/aidlc/skills/governance/escalation.md +0 -13
  85. package/src/iris_bundle/.iris/aidlc/skills/governance/quality-gates.md +0 -14
  86. package/src/iris_bundle/.iris/aidlc/skills/governance/stop-conditions.md +0 -11
  87. package/src/iris_bundle/.iris/aidlc/skills/reasoning/decomposition.md +0 -23
  88. package/src/iris_bundle/.iris/aidlc/skills/reasoning/risk-analysis.md +0 -14
  89. package/src/iris_bundle/.iris/aidlc/skills/reasoning/verification.md +0 -21
  90. package/src/iris_bundle/.iris/aidlc/standards/artifacts-registry.md +0 -38
  91. package/src/iris_bundle/.iris/aidlc/standards/decision-logging.md +0 -16
  92. package/src/iris_bundle/.iris/aidlc/standards/doctrine-structure.md +0 -31
  93. package/src/iris_bundle/.iris/aidlc/standards/documentation-rules.md +0 -15
  94. package/src/iris_bundle/.iris/aidlc/standards/file-structure.md +0 -21
  95. package/src/iris_bundle/.iris/aidlc/standards/naming-conventions.md +0 -18
  96. package/src/iris_bundle/.iris/aidlc/standards/phases-and-gates.md +0 -25
  97. package/src/iris_bundle/.iris/aidlc/standards/routes-and-routing.md +0 -35
  98. package/src/iris_bundle/.iris/aidlc/standards/tool-wrappers.md +0 -32
  99. package/src/iris_bundle/.iris/aidlc/templates/bolt.md +0 -23
  100. package/src/iris_bundle/.iris/aidlc/templates/doctrine-doc-template.md +0 -33
  101. package/src/iris_bundle/.iris/aidlc/templates/intent.md +0 -23
  102. package/src/iris_bundle/.iris/aidlc/templates/log.md +0 -24
  103. package/src/iris_bundle/.iris/aidlc/templates/review.md +0 -21
  104. package/src/iris_bundle/.iris/aidlc/templates/unit.md +0 -31
  105. package/src/iris_bundle/.iris/aidlc/validation/failure-modes.md +0 -16
  106. package/src/iris_bundle/.iris/aidlc/validation/phase-preconditions.md +0 -21
  107. package/src/iris_bundle/.iris/aidlc/validation/quality-checklist.md +0 -20
  108. package/src/iris_bundle/.iris/policy.yaml +0 -27
  109. package/src/iris_bundle/.iris/routes.yaml +0 -98
  110. package/src/iris_bundle/.iris/state.yaml +0 -7
  111. package/src/iris_bundle/.iris/tools/claude/.claude/claude.md +0 -9
  112. package/src/iris_bundle/.iris/tools/claude/.claude/commands/compare-specs.md +0 -203
  113. package/src/iris_bundle/.iris/tools/claude/.claude/commands/iris-construction-agent.md +0 -25
  114. package/src/iris_bundle/.iris/tools/claude/.claude/commands/iris-inception-agent.md +0 -25
  115. package/src/iris_bundle/.iris/tools/claude/.claude/commands/iris-master-agent.md +0 -25
  116. package/src/iris_bundle/.iris/tools/claude/.claude/commands/iris-operations-agent.md +0 -25
  117. package/src/iris_bundle/.iris/tools/codex/AGENTS.md +0 -15
  118. package/src/iris_bundle/.iris/tools/cursor/.cursor/commands/iris-construction-agent.md +0 -25
  119. package/src/iris_bundle/.iris/tools/cursor/.cursor/commands/iris-inception-agent.md +0 -25
  120. package/src/iris_bundle/.iris/tools/cursor/.cursor/commands/iris-master-agent.md +0 -25
  121. package/src/iris_bundle/.iris/tools/cursor/.cursor/commands/iris-operations-agent.md +0 -25
  122. package/src/iris_bundle/.iris/tools/gemini/.gemini/commands/iris-construction-agent.toml +0 -29
  123. package/src/iris_bundle/.iris/tools/gemini/.gemini/commands/iris-inception-agent.toml +0 -29
  124. package/src/iris_bundle/.iris/tools/gemini/.gemini/commands/iris-master-agent.toml +0 -29
  125. package/src/iris_bundle/.iris/tools/gemini/.gemini/commands/iris-operations-agent.toml +0 -29
package/README.md CHANGED
@@ -1,394 +1,424 @@
1
- # IRIS v0.0.06
1
+ # IRIS v0.0.1
2
2
 
3
- **IRIS** (Intelligent Repository for Intent-driven Systems) is a framework that acts as an AI Project Manager for your codebase. It structures your project, routes natural language intents to specific agents, and enforces architectural standards through validation gates.
3
+ **IRIS** (Intelligent Repository for Intent-driven Systems) is an AI-native project management framework. It structures your codebase, routes natural language intents to the right agents, and enforces architectural standards through validation gates.
4
4
 
5
5
  ## 🚀 Quick Start
6
6
 
7
- ### For New Projects (Empty Folder)
8
-
9
- Start using IRIS in a brand-new directory:
7
+ ### New Projects
10
8
 
11
9
  ```bash
12
- # Create a new project directory
13
- mkdir my-project
14
- cd my-project
15
-
16
- # Install IRIS
10
+ mkdir my-project && cd my-project
17
11
  npx project-iris@latest install
18
12
  ```
19
13
 
20
14
  The installer will:
21
- - Create a minimal `package.json` if one doesn't exist
22
- - Set up the IRIS framework (`.iris/` directory)
23
- - Create the memory bank structure (`memory-bank/`)
24
- - Generate `package-lock.json`
25
- - Prompt you to select your preferred IDE tools
15
+ - Create `package.json` if missing
16
+ - Set up `.iris/` framework directory
17
+ - Create `memory-bank/` structure
18
+ - Install the default `iris-core` framework
19
+ - **SaaS Bootstrap**: Auto-generates a "Repo Bootstrap" unit (`U000`) if `package.json` is missing.
20
+ - Prompt for IDE selection (defaults to `auto` for internal agent)
26
21
 
27
- ### Verify Installation
22
+ ### Select Your Agent
23
+
24
+ IRIS can function as a standalone agent or bridge to your IDE:
28
25
 
29
26
  ```bash
30
- # Check IRIS is working
31
- npx project-iris --help
32
- npx project-iris validate
27
+ # Use the built-in zero-config agent (Default)
28
+ iris use auto
33
29
 
34
- # Start using IRIS
35
- npx project-iris ask "scaffold a new login system"
30
+ # Bridge to an external IDE (e.g. Cursor, VS Code)
31
+ iris use cursor
36
32
  ```
37
33
 
38
- > [!IMPORTANT]
39
- > **Package Name vs Command Name**
40
- >
41
- > The npm package is named `project-iris`, but when installed globally, the command is `iris`.
42
- >
43
- > - **With npx** (no global install): Use `npx project-iris <command>`
44
- > - **After global install**: Use `iris <command>`
45
- >
46
- > This is why `npx iris` won't work - there's no package named `iris` on npm.
34
+ ### Existing Projects
47
35
 
48
- ### For Existing Projects
36
+ ```bash
37
+ npx project-iris@latest install
38
+ ```
49
39
 
50
- If you already have a `package.json`, just run:
40
+ ### Verify Installation
51
41
 
52
42
  ```bash
53
- npx project-iris@latest install
43
+ iris --help
44
+ iris validate
45
+ iris status
54
46
  ```
55
47
 
56
- IRIS will integrate with your existing project without breaking anything.
48
+ > **Note**: The npm package is `project-iris`, but the CLI command is `iris`.
49
+ > - With npx: `npx project-iris <command>`
50
+ > - After global install: `iris <command>`
57
51
 
58
52
  ---
59
53
 
60
- ## 🔧 Global Install (Optional)
61
-
62
- For convenience, you can install IRIS globally:
54
+ ## Global Install
63
55
 
64
56
  ```bash
65
57
  npm install -g project-iris@latest
66
-
67
- # Now use 'project-iris' directly
68
- project-iris --version
69
- project-iris install
70
- project-iris ask "create a new feature"
58
+ iris --version
71
59
  ```
72
60
 
73
61
  ---
74
62
 
75
63
  ## 🧠 Core Concepts
76
64
 
77
- ### The IRIS Method
78
- IRIS divides project lifecycle into three distinct phases:
79
- 1. **Inception**: Requirements gathering, architectural planning (`memory-bank/intents`).
80
- 2. **Construction**: Code implementation, unit testing (`memory-bank/units`).
81
- 3. **Operations**: Deployment, monitoring, runbooks (`memory-bank/operations`).
65
+ ### Lifecycle Phases
66
+
67
+ IRIS divides your project into three phases:
68
+
69
+ | Phase | Focus | Artifacts |
70
+ |-------|-------|-----------|
71
+ | **Inception** | Requirements, architecture | `memory-bank/intents/` |
72
+ | **Construction** | Implementation, testing | `memory-bank/units/`, `memory-bank/bolts/` |
73
+ | **Operations** | Deployment, monitoring | `memory-bank/logs/` |
74
+
75
+ ### The Factory Loop (Construction)
76
+
77
+ IRIS automates the delivery process through a deterministic loop:
78
+
79
+ 1. **Unit List** (`unit-list.md`) - High-level breakdown of work.
80
+ 2. **Unit Briefs** (`unit-brief.md`) - Detailed specs for each unit (Planning).
81
+ 3. **Bolts** (`bolt.md`) - Executable tasks derived from briefs (Construction).
82
+ 4. **Code & Test** - Implementation and verification (Execution).
83
+
84
+ The workflow engine orchestrates this loop using `iris run`.
85
+
86
+ ### Frameworks
87
+
88
+ Frameworks are pluggable configurations that define:
89
+ - **Policy** - Required artifacts and validation gates
90
+ - **Routes** - Intent routing rules
91
+ - **Interview** - Interactive Q&A for intent capture
92
+ - **Artifacts** - Generated document templates
93
+ - **Workflow** - Step execution order
82
94
 
83
95
  ### The Memory Bank
84
- A standardized documentation structure enforced by Navi. The following minimal baseline is required:
85
96
 
86
- * **`memory-bank/intents/default/`**:
87
- * `requirements.md`: Problem statement, scope, success criteria.
88
- * `system-context.md`: Architecture decisions, constraints, tool versions.
89
- * **Optional**: `units/<unit-name>/`:
90
- * `unit-brief.md` (Required if unit folder exists).
91
- * **`memory-bank/bolts/`**: Reusable code snippets and patterns (`README.md` required).
92
- * **`memory-bank/standards/`**: Coding and documentation standards (`README.md` required).
93
- * **`memory-bank/operations/`**: Runbooks and maintenance guides (`README.md` required).
97
+ A standardized documentation structure:
94
98
 
95
- IRIS ensures these files always exist. If missing, `project-iris validate` fails. Use `project-iris validate --fix` to restore them.
99
+ ```
100
+ memory-bank/
101
+ ├── intents/ # Requirements and context
102
+ │ └── default/
103
+ │ ├── requirements.md
104
+ │ └── system-context.md
105
+ ├── units/ # Implementation units
106
+ ├── bolts/ # Reusable patterns
107
+ ├── standards/ # Coding standards
108
+ └── operations/ # Runbooks
109
+ ```
96
110
 
97
111
  ---
98
112
 
99
- ## 🔄 The Workflow
113
+ ## 🔄 Commands
100
114
 
101
- ### 1. Ask (Route Intent)
102
- Don't guess which agent or prompt to use. Just ask IRIS.
115
+ ### Intent & Routing
103
116
 
104
117
  ```bash
105
- project-iris ask "I need to fix the auth bug in login"
106
- ```
107
- * **Result**: IRIS analyzes `.iris/routes.yaml`, picks the right agent (e.g., `inception` vs `construction`), generates a context pack, and tells you exactly what command to run.
108
- * **Artifact**: Creates `.iris/inbox/next.md` with instructions.
118
+ # Route a natural language intent
119
+ iris ask "I need to fix the auth bug"
109
120
 
110
- ### 2. Pack (Context Generation)
111
- If you just need the context for an agent manually:
121
+ # Interactive intent interview
122
+ iris ask --interactive
112
123
 
113
- ```bash
114
- project-iris pack --agent inception
115
- ```
116
- * **Result**: Generates a single Markdown file containing all relevant project context, rules, and active tasks.
124
+ # Route a natural language intent (uses active agent)
125
+ iris ask "I need to fix the auth bug"
117
126
 
118
- ### 3. Validate (Enforcement)
119
- Ensure your project complies with the defined policies (e.g., "Designs must be approved before coding").
127
+ # Interactive intent interview
128
+ iris ask --interactive
120
129
 
121
- ```bash
122
- project-iris validate
130
+ # Machine-readable output
131
+ iris ask --json "scaffold login system"
123
132
  ```
124
133
 
125
- **Auto-Fix**: IRIS can repair missing directories and file structures automatically.
126
- ```bash
127
- project-iris validate --fix
128
- ```
134
+ > **Note**: `iris ask` uses the active agent set by `iris use`. Default is `auto` (In-Process Agent).
135
+
136
+ ### Context Generation
129
137
 
130
- **Strict Mode (CI)**:
131
- Use strict mode to fail (exit non-zero) on quality warnings (e.g. placeholders, empty files).
132
138
  ```bash
133
- project-iris validate --strict
134
- ```
139
+ # Generate context pack for current phase
140
+ iris pack
135
141
 
136
- ---
142
+ # Target specific agent
143
+ iris pack --agent inception
137
144
 
138
- ## 🤖 Automated Workflows with `project-iris develop`
145
+ # Output to stdout
146
+ iris pack --stdout
147
+ ```
139
148
 
140
- **NEW**: Automate the complete IRIS workflow from Intent → Bolt Plan → Execution with IDE agent integration.
149
+ ### Workflow Execution
141
150
 
142
- ### Overview
151
+ ```bash
152
+ # Start a new workflow run
153
+ iris run --new
143
154
 
144
- `project-iris develop` orchestrates the entire IRIS workflow automatically:
145
- 1. **Intent Inception** - Clarifies requirements through questions, generates intent artifacts
146
- 2. **Bolt Plan** - Creates implementation plan and individual bolt files
147
- 3. **Bolt Execution** - Executes each bolt (design → implement → test)
155
+ # Run with a pre-defined intent (seed)
156
+ iris run --new --seed intent-draft.json
148
157
 
149
- All stages interact with your IDE agent via a bridge protocol, with approval gates at each step.
158
+ # Resume the latest run
159
+ iris run --resume
150
160
 
151
- ### Quick Start
161
+ # Resume a specific run
162
+ iris run --resume 2026-01-03-21-41-43-abc1
152
163
 
153
- ```bash
154
- # Terminal 1: Start bridge helper (recommended)
155
- project-iris bridge run
164
+ # Non-interactive mode (for CI/automation)
165
+ iris run --new --seed draft.json --no-interactive
156
166
 
157
- # Terminal 2: Run workflow
158
- project-iris develop "Build a dashboard UI to track IRIS progress"
167
+ # Machine-readable output
168
+ iris run --json
159
169
  ```
160
170
 
161
- The workflow will:
162
- - Generate clarifying questions via your IDE agent
163
- - Prompt you for answers in the terminal
164
- - Create intent artifacts (requirements.md, system-context.md)
165
- - Generate bolt plan and bolt files
166
- - Execute each bolt with design, implementation, and testing phases
167
- - Request approval at each major stage
171
+ 144: **Workflow Steps:**
172
+ 145: 1. **Interview** - Capture intent (interactive or seed)
173
+ 146: 2. **Artifacts** - Generate documents from templates
174
+ 147: 3. **Plan** - Create unit briefs from unit list
175
+ 148: 4. **Build** - Generate bolts from approved briefs
176
+ 149: 5. **Execute** - Run bolt commands and generate test reports
177
+ 150: 6. **Validate** - Check policy compliance
178
+ 151: 7. **Pack** - Create context bundle
179
+ 152: 8. **Handoff** - Generate final summary
168
180
 
169
- ### Usage
181
+ ### Artifact Generation
170
182
 
171
- **Basic workflow:**
172
183
  ```bash
173
- project-iris develop "Your intent description"
174
- ```
184
+ # Generate artifacts from intent draft
185
+ iris generate
175
186
 
176
- **Resume interrupted workflow:**
177
- ```bash
178
- project-iris develop --resume <runId>
187
+ # Use custom input/output
188
+ iris generate --in custom-draft.json --out artifacts/
179
189
  ```
180
190
 
181
- **Auto-approve gates (no prompts):**
191
+ ### Validation
192
+
182
193
  ```bash
183
- project-iris develop --gate auto "Your intent"
194
+ # Check policy compliance
195
+ iris validate
196
+
197
+ # Auto-fix missing artifacts
198
+ iris validate --fix
199
+
200
+ # Strict mode (fail on warnings)
201
+ iris validate --strict
184
202
  ```
185
203
 
186
- **Override IDE selection:**
204
+ ### Lifecycle Management
205
+
187
206
  ```bash
188
- project-iris develop --ide cursor "Your intent"
207
+ # View current status
208
+ iris status
209
+
210
+ # Request phase transition
211
+ iris phase set construction
212
+
213
+ # Validate and apply transition
214
+ iris validate --apply
189
215
  ```
190
216
 
191
- **No-bridge mode (manual result creation):**
217
+ ### Automated Development
218
+
192
219
  ```bash
193
- project-iris develop --no-bridge "Your intent"
194
- ```
220
+ # Start automated workflow
221
+ iris develop "Build a dashboard UI"
195
222
 
196
- ### Bridge Helper
223
+ # Resume interrupted workflow
224
+ iris develop --resume <runId>
197
225
 
198
- The bridge helper watches for workflow tasks and opens them in your IDE:
226
+ # Override IDE
227
+ iris develop --ide cursor "intent"
199
228
 
200
- **Start the helper:**
201
- ```bash
202
- project-iris bridge run
229
+ # Auto-approve gates
230
+ iris develop --gate auto "intent"
203
231
  ```
204
232
 
205
- **Check bridge status:**
206
- ```bash
207
- project-iris bridge status
208
- ```
233
+ ### Bridge (IDE Integration)
209
234
 
210
- The helper will:
211
- - Watch `.iris/bridge/inbox/` for new tasks
212
- - Generate human-readable prompts in `.iris/bridge/state/`
213
- - Attempt to open prompts in your selected IDE
214
- - Wait for results in `.iris/bridge/outbox/`
215
- - Clean up completed tasks
235
+ IRIS "Auto" mode works out of the box. To use an external agent (like Cursor Composer or Windsurf), you must start the bridge:
216
236
 
217
- ### How It Works
237
+ ```bash
238
+ # Start bridge helper (only needed for external IDEs)
239
+ iris bridge serve
218
240
 
219
- #### 1. Intent Inception Stage
220
- - Sends task to IDE agent: "Generate 3-8 clarifying questions"
221
- - Prompts you for answers in terminal
222
- - Sends task: "Create requirements.md and system-context.md based on answers"
223
- - Gate: "Approve intent? (y/N)"
241
+ # Check bridge status
242
+ iris bridge status
243
+ ```
224
244
 
225
- #### 2. Bolt Plan Stage
226
- - Sends task: "Generate bolt plan and individual bolt files"
227
- - Parses bolt list from generated plan
228
- - Gate: "Approve bolt plan? (y/N)"
245
+ ### Diagnostics
229
246
 
230
- #### 3. Bolt Execution Stage (for each bolt)
231
- - Design phase: Optional design notes and ADRs
232
- - Implementation phase: Code changes and task completion
233
- - Testing phase: Run tests or propose test commands
234
- - Gate: "Approve bolt? (y/N)"
247
+ ```bash
248
+ # Check environment
249
+ iris doctor
235
250
 
236
- ### Bridge Protocol
251
+ # Show version
252
+ iris --version
253
+ ```
237
254
 
238
- Tasks are communicated via JSON files:
255
+ ---
256
+
257
+ ## 📁 Directory Structure
239
258
 
240
- **Task Packet** (`.iris/bridge/inbox/<taskId>.json`):
241
- ```json
242
- {
243
- "taskId": "uuid",
244
- "intent": "Build a dashboard...",
245
- "stage": "INTENT_INCEPTION",
246
- "agent": "iris-inception-agent",
247
- "instructions": "Generate clarifying questions...",
248
- "inputs": ["path/to/context.md"],
249
- "expectedOutputs": ["path/to/output.md"]
250
- }
259
+ ```
260
+ your-project/
261
+ ├── .iris/
262
+ │ ├── state.yaml # Current phase, framework, active flow
263
+ │ ├── policy.yaml # (Legacy) Validation rules
264
+ │ ├── routes.yaml # (Legacy) Intent routing
265
+ │ ├── frameworks/ # Installed frameworks
266
+ │ │ └── iris-core/
267
+ │ ├── runs/ # Workflow run history
268
+ │ │ ├── latest # Pointer to latest run
269
+ │ │ └── 2026-01-03-.../ # Run directory
270
+ │ │ ├── run.json # Run state
271
+ │ │ ├── events.ndjson # Event log
272
+ │ │ ├── intent-draft.json
273
+ │ │ ├── artifacts.json
274
+ │ │ ├── validate.json
275
+ │ │ ├── pack.md
276
+ │ │ └── handoff.json
277
+ │ ├── inbox/ # Generated context packs
278
+ │ └── bridge/ # IDE bridge files
279
+ │ ├── inbox/
280
+ │ ├── outbox/
281
+ │ └── state/
282
+ ├── memory-bank/ # Project documentation
283
+ └── package.json
251
284
  ```
252
285
 
253
- **Human Prompt** (`.iris/bridge/state/<taskId>.md`):
254
- - Human-readable version of the task
255
- - Includes file links and instructions
256
- - Shows expected result format
286
+ ---
257
287
 
258
- **Result** (`.iris/bridge/outbox/<taskId>.json`):
259
- ```json
260
- {
261
- "taskId": "uuid",
262
- "status": "ok",
263
- "message": "Created requirements.md",
264
- "filesChanged": ["memory-bank/intents/slug/requirements.md"]
265
- }
288
+ ## � Configuration
289
+
290
+ ### State (`state.yaml`)
291
+
292
+ ```yaml
293
+ version: 1
294
+ framework:
295
+ current: iris-core
296
+ version: null
297
+ phase:
298
+ current: inception
299
+ requested: null
300
+ active:
301
+ intent_id: null
302
+ flow: null
266
303
  ```
267
304
 
268
- ### IDE Support
269
-
270
- Supported IDEs with auto-open capability:
271
- - **Cursor** - Detects `cursor` CLI
272
- - **VS Code** - Detects `code` CLI
273
- - **Antigravity** - Always available (filesystem bridge)
274
- - **Windsurf** - Best-effort with fallback
305
+ ### Policy (`policy.yaml`)
306
+
307
+ ```yaml
308
+ version: 1
309
+ phases:
310
+ inception:
311
+ requires:
312
+ - path: memory-bank/intents/
313
+ type: directory
314
+ gates: []
315
+ transitions:
316
+ - from: inception
317
+ to: construction
318
+ ```
275
319
 
276
- Unsupported IDEs fall back to filesystem bridge (manual file opening).
320
+ ### Routes (`routes.yaml`)
277
321
 
278
- ### Run Tracking
322
+ ```yaml
323
+ schemaVersion: 1
324
+ routes:
325
+ - match: "bug|fix|error"
326
+ agent: construction
327
+ - match: ".*"
328
+ agent: inception
329
+ ```
279
330
 
280
- All workflow runs are tracked in `.iris/runs/`:
281
- - `<runId>.json` - Complete run state with events
282
- - `<runId>.state.json` - Quick resume snapshot
283
- - `<runId>.md` - Human-readable summary
331
+ ---
284
332
 
285
- View run summary:
286
- ```bash
287
- cat .iris/runs/<runId>.md
288
- ```
333
+ ## 🤖 Machine Interface
289
334
 
290
- ### Troubleshooting
335
+ ### `iris run --json`
291
336
 
292
- **Bridge helper not finding tasks:**
293
- - Check `.iris/bridge/inbox/` for task files
294
- - Ensure bridge helper is running (`iris bridge run`)
337
+ Outputs a single JSON object (RunState):
295
338
 
296
- **IDE not opening automatically:**
297
- - Verify IDE CLI is available (`which cursor`, `which code`)
298
- - Use `--no-bridge` mode and open files manually
299
- - Check `iris bridge status` for connector info
339
+ ```json
340
+ {
341
+ "schemaVersion": 1,
342
+ "runId": "2026-01-03-21-41-43-abc1",
343
+ "framework": { "id": "iris-core", "version": null },
344
+ "steps": {
345
+ "interview": { "status": "done", ... },
346
+ "artifacts": { "status": "done", ... },
347
+ "validate": { "status": "done", ... },
348
+ "pack": { "status": "done", ... },
349
+ "handoff": { "status": "done", ... }
350
+ }
351
+ }
352
+ ```
300
353
 
301
- **Workflow stuck waiting:**
302
- - Create result file manually in `.iris/bridge/outbox/<taskId>.json`
303
- - Or terminate and resume with `--resume <runId>`
354
+ **Exit Codes:**
355
+ - `0` - Success
356
+ - `1` - Failure (validation error, step failed)
357
+ - `2` - Blocked (requires input, non-interactive mode)
304
358
 
305
- ---
359
+ ### Event Log (`events.ndjson`)
306
360
 
307
- ## 🛠 Command Reference
308
-
309
-
310
- ### Lifecycle
311
- * **`install`**: Downloads and sets up the strict `.iris` configuration and tools.
312
- * **`uninstall`**: Safely removes IRIS components (preserves your `memory-bank` by default).
313
-
314
- ### Workflow
315
- * **`ask [intent]`**: Routes a natural language request.
316
- * `--dry-run`: See where it would route without generating files.
317
- * `--json`: Machine-readable output.
318
- * **`pack`**: focused context bundle generator.
319
- * `--agent <name>`: Target specific agent context.
320
- * `--auth`: Include sensitive rules (optional).
321
- * **`run <workflow>`**: Execute a named workflow (e.g., `iris run deploy`).
322
- * **`develop [intent]`**: **NEW** - Automated workflow orchestration (Intent → Bolt Plan → Execution).
323
- * `--resume <runId>`: Resume interrupted workflow.
324
- * `--ide <ideId>`: Override IDE selection.
325
- * `--gate <auto|manual>`: Gate approval mode (default: manual).
326
- * `--no-bridge`: Fallback mode (manual result creation).
327
-
328
- ### Bridge
329
- * **`bridge run`**: **NEW** - Start bridge helper (watches inbox, opens IDE, waits for results).
330
- * `--poll-interval <ms>`: Polling interval (default: 2000ms).
331
- * **`bridge status`**: **NEW** - Show bridge status, IDE info, and pending tasks.
332
-
333
- ### Governance
334
- * **`validate`**: Checks policy compliance.
335
- * `--fix`: Auto-creates missing required files/folders.
336
- * `--strict`: Fail on warnings.
337
- * **`phase`**: Manage the project lifecycle phase.
338
- * `phase set <name>`: Request a transition (e.g., `inception` -> `construction`).
339
- * **`status`**: View current phase, active intent, and validation state.
361
+ ```json
362
+ {"ts":"2026-01-03T21:41:43.732Z","type":"RUN_STARTED"}
363
+ {"ts":"2026-01-03T21:41:43.733Z","type":"STEP_STARTED","stepId":"interview"}
364
+ {"ts":"2026-01-03T21:41:43.733Z","type":"STEP_DONE","stepId":"interview"}
365
+ ```
340
366
 
341
367
  ---
342
368
 
343
- ## 👥 Contributing to IRIS
344
-
345
- This section is for developers who want to contribute to IRIS itself (not for users of IRIS).
369
+ ## 👥 Contributing
346
370
 
347
- ### Setup Development Environment
371
+ ### Setup
348
372
 
349
373
  ```bash
350
- # Clone the repository
351
374
  git clone <repo-url>
352
375
  cd project-iris
353
-
354
- # Install dependencies
355
376
  npm ci
356
-
357
- # Build the CLI
358
377
  npm run build
359
-
360
- # Link globally for testing
361
- npm run link:iris
362
-
363
- # Verify
378
+ npm link
364
379
  iris --version
365
- iris doctor
366
380
  ```
367
381
 
368
- ### Development Workflow
382
+ ### Development
369
383
 
370
384
  ```bash
371
385
  # Make changes to src/
372
-
373
- # Rebuild
374
386
  npm run build
387
+ npm run test
375
388
 
376
- # Test your changes
377
- iris --help
378
- iris validate
379
-
380
- # Run verification
389
+ # Run all verification
381
390
  npm run verify
382
391
  ```
383
392
 
384
- ### Repository Hygiene
393
+ ### Testing
385
394
 
386
- * **`node_modules/`** and **`dist/`** are explicitly ignored.
387
- * **`verify:repo`**: Run `npm run verify:repo` to confirm hygiene.
388
- * **`.iris/`**: Contains the "Brain" (policies, routes, state). **Do not delete.**
395
+ ```bash
396
+ # Unit tests
397
+ npm run test:unit
398
+
399
+ # Smoke tests
400
+ npm run test:smoke
401
+
402
+ # All tests
403
+ npm test
404
+ ```
389
405
 
390
- ### Unlink Development Version
406
+ ### Unlink
391
407
 
392
408
  ```bash
393
- npm run unlink:iris
409
+ npm unlink -g project-iris
394
410
  ```
411
+
412
+ ---
413
+
414
+ ## 📚 Learn More
415
+
416
+ - [Baseline Documentation](docs/baseline-step0.md)
417
+ - [Framework Development](docs/frameworks.md)
418
+ - [Artifact Templates](docs/artifacts.md)
419
+
420
+ ---
421
+
422
+ ## License
423
+
424
+ MIT