project-iris 0.0.6

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 (109) hide show
  1. package/README.md +384 -0
  2. package/dist/bridge/connector-factory.js +27 -0
  3. package/dist/bridge/connectors/antigravity-connector.js +18 -0
  4. package/dist/bridge/connectors/cursor-connector.js +31 -0
  5. package/dist/bridge/connectors/vscode-connector.js +31 -0
  6. package/dist/bridge/connectors/windsurf-connector.js +23 -0
  7. package/dist/bridge/filesystem-connector.js +100 -0
  8. package/dist/bridge/types.js +10 -0
  9. package/dist/cli.js +30 -0
  10. package/dist/commands/ask.js +232 -0
  11. package/dist/commands/bridge.js +259 -0
  12. package/dist/commands/develop.js +108 -0
  13. package/dist/commands/doctor.js +102 -0
  14. package/dist/commands/install.js +57 -0
  15. package/dist/commands/pack.js +27 -0
  16. package/dist/commands/phase.js +38 -0
  17. package/dist/commands/run.js +17 -0
  18. package/dist/commands/status.js +105 -0
  19. package/dist/commands/uninstall.js +12 -0
  20. package/dist/commands/validate.js +87 -0
  21. package/dist/iris/artifact-checker.js +78 -0
  22. package/dist/iris/fixer.js +143 -0
  23. package/dist/iris/guard.js +38 -0
  24. package/dist/iris/include.js +49 -0
  25. package/dist/iris/installer.js +269 -0
  26. package/dist/iris/manifest.js +54 -0
  27. package/dist/iris/packer.js +303 -0
  28. package/dist/iris/policy.js +28 -0
  29. package/dist/iris/report.js +53 -0
  30. package/dist/iris/resolver.js +63 -0
  31. package/dist/iris/router.js +114 -0
  32. package/dist/iris/routes.js +20 -0
  33. package/dist/iris/run-state.js +143 -0
  34. package/dist/iris/state.js +85 -0
  35. package/dist/iris/uninstaller.js +166 -0
  36. package/dist/iris/validator.js +329 -0
  37. package/dist/lib.js +96 -0
  38. package/dist/utils/exit-codes.js +7 -0
  39. package/dist/workflows/bolt-execution.js +238 -0
  40. package/dist/workflows/bolt-plan.js +192 -0
  41. package/dist/workflows/intent-inception.js +188 -0
  42. package/package.json +41 -0
  43. package/src/iris_bundle/.iris/aidlc/README.md +16 -0
  44. package/src/iris_bundle/.iris/aidlc/agents/iris-construction-agent.md +35 -0
  45. package/src/iris_bundle/.iris/aidlc/agents/iris-inception-agent.md +30 -0
  46. package/src/iris_bundle/.iris/aidlc/agents/iris-master-agent.md +35 -0
  47. package/src/iris_bundle/.iris/aidlc/agents/iris-operations-agent.md +29 -0
  48. package/src/iris_bundle/.iris/aidlc/commands/iris-construction-agent.md +18 -0
  49. package/src/iris_bundle/.iris/aidlc/commands/iris-inception-agent.md +18 -0
  50. package/src/iris_bundle/.iris/aidlc/commands/iris-master-agent.md +18 -0
  51. package/src/iris_bundle/.iris/aidlc/commands/iris-operations-agent.md +18 -0
  52. package/src/iris_bundle/.iris/aidlc/context/context-map.md +25 -0
  53. package/src/iris_bundle/.iris/aidlc/context/exclusion-rules.md +13 -0
  54. package/src/iris_bundle/.iris/aidlc/context/load-order.md +25 -0
  55. package/src/iris_bundle/.iris/aidlc/memory/intent-rules.md +9 -0
  56. package/src/iris_bundle/.iris/aidlc/memory/log-rules.md +5 -0
  57. package/src/iris_bundle/.iris/aidlc/memory/memory-bank.yaml +39 -0
  58. package/src/iris_bundle/.iris/aidlc/memory/unit-rules.md +9 -0
  59. package/src/iris_bundle/.iris/aidlc/quick-start.md +24 -0
  60. package/src/iris_bundle/.iris/aidlc/skills/execution/implementation.md +14 -0
  61. package/src/iris_bundle/.iris/aidlc/skills/execution/refactoring.md +13 -0
  62. package/src/iris_bundle/.iris/aidlc/skills/execution/scaffold-generation.md +15 -0
  63. package/src/iris_bundle/.iris/aidlc/skills/governance/escalation.md +13 -0
  64. package/src/iris_bundle/.iris/aidlc/skills/governance/quality-gates.md +14 -0
  65. package/src/iris_bundle/.iris/aidlc/skills/governance/stop-conditions.md +11 -0
  66. package/src/iris_bundle/.iris/aidlc/skills/reasoning/decomposition.md +23 -0
  67. package/src/iris_bundle/.iris/aidlc/skills/reasoning/risk-analysis.md +14 -0
  68. package/src/iris_bundle/.iris/aidlc/skills/reasoning/verification.md +21 -0
  69. package/src/iris_bundle/.iris/aidlc/standards/artifacts-registry.md +38 -0
  70. package/src/iris_bundle/.iris/aidlc/standards/decision-logging.md +16 -0
  71. package/src/iris_bundle/.iris/aidlc/standards/doctrine-structure.md +31 -0
  72. package/src/iris_bundle/.iris/aidlc/standards/documentation-rules.md +15 -0
  73. package/src/iris_bundle/.iris/aidlc/standards/file-structure.md +21 -0
  74. package/src/iris_bundle/.iris/aidlc/standards/naming-conventions.md +18 -0
  75. package/src/iris_bundle/.iris/aidlc/standards/phases-and-gates.md +25 -0
  76. package/src/iris_bundle/.iris/aidlc/standards/routes-and-routing.md +35 -0
  77. package/src/iris_bundle/.iris/aidlc/standards/tool-wrappers.md +32 -0
  78. package/src/iris_bundle/.iris/aidlc/templates/bolt.md +23 -0
  79. package/src/iris_bundle/.iris/aidlc/templates/doctrine-doc-template.md +33 -0
  80. package/src/iris_bundle/.iris/aidlc/templates/intent.md +23 -0
  81. package/src/iris_bundle/.iris/aidlc/templates/log.md +24 -0
  82. package/src/iris_bundle/.iris/aidlc/templates/review.md +21 -0
  83. package/src/iris_bundle/.iris/aidlc/templates/unit.md +31 -0
  84. package/src/iris_bundle/.iris/aidlc/validation/failure-modes.md +16 -0
  85. package/src/iris_bundle/.iris/aidlc/validation/phase-preconditions.md +21 -0
  86. package/src/iris_bundle/.iris/aidlc/validation/quality-checklist.md +20 -0
  87. package/src/iris_bundle/.iris/policy.yaml +27 -0
  88. package/src/iris_bundle/.iris/routes.yaml +98 -0
  89. package/src/iris_bundle/.iris/state.yaml +7 -0
  90. package/src/iris_bundle/.iris/tools/antigravity/.antigravity/knowledge/IRIS.md +6 -0
  91. package/src/iris_bundle/.iris/tools/antigravity/.antigravity/workflows/iris-construction-agent.md +25 -0
  92. package/src/iris_bundle/.iris/tools/antigravity/.antigravity/workflows/iris-inception-agent.md +25 -0
  93. package/src/iris_bundle/.iris/tools/antigravity/.antigravity/workflows/iris-master-agent.md +25 -0
  94. package/src/iris_bundle/.iris/tools/antigravity/.antigravity/workflows/iris-operations-agent.md +25 -0
  95. package/src/iris_bundle/.iris/tools/claude/.claude/claude.md +9 -0
  96. package/src/iris_bundle/.iris/tools/claude/.claude/commands/compare-specs.md +203 -0
  97. package/src/iris_bundle/.iris/tools/claude/.claude/commands/iris-construction-agent.md +25 -0
  98. package/src/iris_bundle/.iris/tools/claude/.claude/commands/iris-inception-agent.md +25 -0
  99. package/src/iris_bundle/.iris/tools/claude/.claude/commands/iris-master-agent.md +25 -0
  100. package/src/iris_bundle/.iris/tools/claude/.claude/commands/iris-operations-agent.md +25 -0
  101. package/src/iris_bundle/.iris/tools/codex/AGENTS.md +15 -0
  102. package/src/iris_bundle/.iris/tools/cursor/.cursor/commands/iris-construction-agent.md +25 -0
  103. package/src/iris_bundle/.iris/tools/cursor/.cursor/commands/iris-inception-agent.md +25 -0
  104. package/src/iris_bundle/.iris/tools/cursor/.cursor/commands/iris-master-agent.md +25 -0
  105. package/src/iris_bundle/.iris/tools/cursor/.cursor/commands/iris-operations-agent.md +25 -0
  106. package/src/iris_bundle/.iris/tools/gemini/.gemini/commands/iris-construction-agent.toml +29 -0
  107. package/src/iris_bundle/.iris/tools/gemini/.gemini/commands/iris-inception-agent.toml +29 -0
  108. package/src/iris_bundle/.iris/tools/gemini/.gemini/commands/iris-master-agent.toml +29 -0
  109. package/src/iris_bundle/.iris/tools/gemini/.gemini/commands/iris-operations-agent.toml +29 -0
package/README.md ADDED
@@ -0,0 +1,384 @@
1
+ # IRIS v0.0.06
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.
4
+
5
+ ## 🚀 Quick Start
6
+
7
+ ### For New Projects (Empty Folder)
8
+
9
+ Start using IRIS in a brand-new directory:
10
+
11
+ ```bash
12
+ # Create a new project directory
13
+ mkdir my-project
14
+ cd my-project
15
+
16
+ # Install IRIS
17
+ npx iris@latest install
18
+ ```
19
+
20
+ 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
26
+
27
+ ### Verify Installation
28
+
29
+ ```bash
30
+ # Check IRIS is working
31
+ npx iris --help
32
+ npx iris validate
33
+
34
+ # Start using IRIS
35
+ npx iris ask "scaffold a new login system"
36
+ ```
37
+
38
+ ### For Existing Projects
39
+
40
+ If you already have a `package.json`, just run:
41
+
42
+ ```bash
43
+ npx iris@latest install
44
+ ```
45
+
46
+ IRIS will integrate with your existing project without breaking anything.
47
+
48
+ ---
49
+
50
+ ## 🔧 Global Install (Optional)
51
+
52
+ For convenience, you can install IRIS globally:
53
+
54
+ ```bash
55
+ npm install -g iris@latest
56
+
57
+ # Now use 'iris' directly
58
+ iris --version
59
+ iris install
60
+ iris ask "create a new feature"
61
+ ```
62
+
63
+ ---
64
+
65
+ ## 🧠 Core Concepts
66
+
67
+ ### The IRIS Method
68
+ IRIS divides project lifecycle into three distinct phases:
69
+ 1. **Inception**: Requirements gathering, architectural planning (`memory-bank/intents`).
70
+ 2. **Construction**: Code implementation, unit testing (`memory-bank/units`).
71
+ 3. **Operations**: Deployment, monitoring, runbooks (`memory-bank/operations`).
72
+
73
+ ### The Memory Bank
74
+ A standardized documentation structure enforced by Navi. The following minimal baseline is required:
75
+
76
+ * **`memory-bank/intents/default/`**:
77
+ * `requirements.md`: Problem statement, scope, success criteria.
78
+ * `system-context.md`: Architecture decisions, constraints, tool versions.
79
+ * **Optional**: `units/<unit-name>/`:
80
+ * `unit-brief.md` (Required if unit folder exists).
81
+ * **`memory-bank/bolts/`**: Reusable code snippets and patterns (`README.md` required).
82
+ * **`memory-bank/standards/`**: Coding and documentation standards (`README.md` required).
83
+ * **`memory-bank/operations/`**: Runbooks and maintenance guides (`README.md` required).
84
+
85
+ Navi ensures these files always exist. If missing, `navi validate` fails. Use `navi validate --fix` to restore them.
86
+
87
+ ---
88
+
89
+ ## 🔄 The Workflow
90
+
91
+ ### 1. Ask (Route Intent)
92
+ Don't guess which agent or prompt to use. Just ask IRIS.
93
+
94
+ ```bash
95
+ iris ask "I need to fix the auth bug in login"
96
+ ```
97
+ * **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.
98
+ * **Artifact**: Creates `.iris/inbox/next.md` with instructions.
99
+
100
+ ### 2. Pack (Context Generation)
101
+ If you just need the context for an agent manually:
102
+
103
+ ```bash
104
+ iris pack --agent inception
105
+ ```
106
+ * **Result**: Generates a single Markdown file containing all relevant project context, rules, and active tasks.
107
+
108
+ ### 3. Validate (Enforcement)
109
+ Ensure your project complies with the defined policies (e.g., "Designs must be approved before coding").
110
+
111
+ ```bash
112
+ iris validate
113
+ ```
114
+
115
+ **Auto-Fix**: IRIS can repair missing directories and file structures automatically.
116
+ ```bash
117
+ iris validate --fix
118
+ ```
119
+
120
+ **Strict Mode (CI)**:
121
+ Use strict mode to fail (exit non-zero) on quality warnings (e.g. placeholders, empty files).
122
+ ```bash
123
+ iris validate --strict
124
+ ```
125
+
126
+ ---
127
+
128
+ ## 🤖 Automated Workflows with `iris develop`
129
+
130
+ **NEW**: Automate the complete IRIS workflow from Intent → Bolt Plan → Execution with IDE agent integration.
131
+
132
+ ### Overview
133
+
134
+ `iris develop` orchestrates the entire IRIS workflow automatically:
135
+ 1. **Intent Inception** - Clarifies requirements through questions, generates intent artifacts
136
+ 2. **Bolt Plan** - Creates implementation plan and individual bolt files
137
+ 3. **Bolt Execution** - Executes each bolt (design → implement → test)
138
+
139
+ All stages interact with your IDE agent via a bridge protocol, with approval gates at each step.
140
+
141
+ ### Quick Start
142
+
143
+ ```bash
144
+ # Terminal 1: Start bridge helper (recommended)
145
+ iris bridge run
146
+
147
+ # Terminal 2: Run workflow
148
+ iris develop "Build a dashboard UI to track IRIS progress"
149
+ ```
150
+
151
+ The workflow will:
152
+ - Generate clarifying questions via your IDE agent
153
+ - Prompt you for answers in the terminal
154
+ - Create intent artifacts (requirements.md, system-context.md)
155
+ - Generate bolt plan and bolt files
156
+ - Execute each bolt with design, implementation, and testing phases
157
+ - Request approval at each major stage
158
+
159
+ ### Usage
160
+
161
+ **Basic workflow:**
162
+ ```bash
163
+ iris develop "Your intent description"
164
+ ```
165
+
166
+ **Resume interrupted workflow:**
167
+ ```bash
168
+ iris develop --resume <runId>
169
+ ```
170
+
171
+ **Auto-approve gates (no prompts):**
172
+ ```bash
173
+ iris develop --gate auto "Your intent"
174
+ ```
175
+
176
+ **Override IDE selection:**
177
+ ```bash
178
+ iris develop --ide cursor "Your intent"
179
+ ```
180
+
181
+ **No-bridge mode (manual result creation):**
182
+ ```bash
183
+ iris develop --no-bridge "Your intent"
184
+ ```
185
+
186
+ ### Bridge Helper
187
+
188
+ The bridge helper watches for workflow tasks and opens them in your IDE:
189
+
190
+ **Start the helper:**
191
+ ```bash
192
+ iris bridge run
193
+ ```
194
+
195
+ **Check bridge status:**
196
+ ```bash
197
+ iris bridge status
198
+ ```
199
+
200
+ The helper will:
201
+ - Watch `.iris/bridge/inbox/` for new tasks
202
+ - Generate human-readable prompts in `.iris/bridge/state/`
203
+ - Attempt to open prompts in your selected IDE
204
+ - Wait for results in `.iris/bridge/outbox/`
205
+ - Clean up completed tasks
206
+
207
+ ### How It Works
208
+
209
+ #### 1. Intent Inception Stage
210
+ - Sends task to IDE agent: "Generate 3-8 clarifying questions"
211
+ - Prompts you for answers in terminal
212
+ - Sends task: "Create requirements.md and system-context.md based on answers"
213
+ - Gate: "Approve intent? (y/N)"
214
+
215
+ #### 2. Bolt Plan Stage
216
+ - Sends task: "Generate bolt plan and individual bolt files"
217
+ - Parses bolt list from generated plan
218
+ - Gate: "Approve bolt plan? (y/N)"
219
+
220
+ #### 3. Bolt Execution Stage (for each bolt)
221
+ - Design phase: Optional design notes and ADRs
222
+ - Implementation phase: Code changes and task completion
223
+ - Testing phase: Run tests or propose test commands
224
+ - Gate: "Approve bolt? (y/N)"
225
+
226
+ ### Bridge Protocol
227
+
228
+ Tasks are communicated via JSON files:
229
+
230
+ **Task Packet** (`.iris/bridge/inbox/<taskId>.json`):
231
+ ```json
232
+ {
233
+ "taskId": "uuid",
234
+ "intent": "Build a dashboard...",
235
+ "stage": "INTENT_INCEPTION",
236
+ "agent": "iris-inception-agent",
237
+ "instructions": "Generate clarifying questions...",
238
+ "inputs": ["path/to/context.md"],
239
+ "expectedOutputs": ["path/to/output.md"]
240
+ }
241
+ ```
242
+
243
+ **Human Prompt** (`.iris/bridge/state/<taskId>.md`):
244
+ - Human-readable version of the task
245
+ - Includes file links and instructions
246
+ - Shows expected result format
247
+
248
+ **Result** (`.iris/bridge/outbox/<taskId>.json`):
249
+ ```json
250
+ {
251
+ "taskId": "uuid",
252
+ "status": "ok",
253
+ "message": "Created requirements.md",
254
+ "filesChanged": ["memory-bank/intents/slug/requirements.md"]
255
+ }
256
+ ```
257
+
258
+ ### IDE Support
259
+
260
+ Supported IDEs with auto-open capability:
261
+ - **Cursor** - Detects `cursor` CLI
262
+ - **VS Code** - Detects `code` CLI
263
+ - **Antigravity** - Always available (filesystem bridge)
264
+ - **Windsurf** - Best-effort with fallback
265
+
266
+ Unsupported IDEs fall back to filesystem bridge (manual file opening).
267
+
268
+ ### Run Tracking
269
+
270
+ All workflow runs are tracked in `.iris/runs/`:
271
+ - `<runId>.json` - Complete run state with events
272
+ - `<runId>.state.json` - Quick resume snapshot
273
+ - `<runId>.md` - Human-readable summary
274
+
275
+ View run summary:
276
+ ```bash
277
+ cat .iris/runs/<runId>.md
278
+ ```
279
+
280
+ ### Troubleshooting
281
+
282
+ **Bridge helper not finding tasks:**
283
+ - Check `.iris/bridge/inbox/` for task files
284
+ - Ensure bridge helper is running (`navi bridge run`)
285
+
286
+ **IDE not opening automatically:**
287
+ - Verify IDE CLI is available (`which cursor`, `which code`)
288
+ - Use `--no-bridge` mode and open files manually
289
+ - Check `navi bridge status` for connector info
290
+
291
+ **Workflow stuck waiting:**
292
+ - Create result file manually in `.iris/bridge/outbox/<taskId>.json`
293
+ - Or terminate and resume with `--resume <runId>`
294
+
295
+ ---
296
+
297
+ ## 🛠 Command Reference
298
+
299
+
300
+ ### Lifecycle
301
+ * **`install`**: Downloads and sets up the strict `.iris` configuration and tools.
302
+ * **`uninstall`**: Safely removes IRIS components (preserves your `memory-bank` by default).
303
+
304
+ ### Workflow
305
+ * **`ask [intent]`**: Routes a natural language request.
306
+ * `--dry-run`: See where it would route without generating files.
307
+ * `--json`: Machine-readable output.
308
+ * **`pack`**: focused context bundle generator.
309
+ * `--agent <name>`: Target specific agent context.
310
+ * `--auth`: Include sensitive rules (optional).
311
+ * **`run <workflow>`**: Execute a named workflow (e.g., `npm run navi run deploy`).
312
+ * **`develop [intent]`**: **NEW** - Automated workflow orchestration (Intent → Bolt Plan → Execution).
313
+ * `--resume <runId>`: Resume interrupted workflow.
314
+ * `--ide <ideId>`: Override IDE selection.
315
+ * `--gate <auto|manual>`: Gate approval mode (default: manual).
316
+ * `--no-bridge`: Fallback mode (manual result creation).
317
+
318
+ ### Bridge
319
+ * **`bridge run`**: **NEW** - Start bridge helper (watches inbox, opens IDE, waits for results).
320
+ * `--poll-interval <ms>`: Polling interval (default: 2000ms).
321
+ * **`bridge status`**: **NEW** - Show bridge status, IDE info, and pending tasks.
322
+
323
+ ### Governance
324
+ * **`validate`**: Checks policy compliance.
325
+ * `--fix`: Auto-creates missing required files/folders.
326
+ * `--strict`: Fail on warnings.
327
+ * **`phase`**: Manage the project lifecycle phase.
328
+ * `phase set <name>`: Request a transition (e.g., `inception` -> `construction`).
329
+ * **`status`**: View current phase, active intent, and validation state.
330
+
331
+ ---
332
+
333
+ ## 👥 Contributing to IRIS
334
+
335
+ This section is for developers who want to contribute to IRIS itself (not for users of IRIS).
336
+
337
+ ### Setup Development Environment
338
+
339
+ ```bash
340
+ # Clone the repository
341
+ git clone <repo-url>
342
+ cd iris-beta
343
+
344
+ # Install dependencies
345
+ npm ci
346
+
347
+ # Build the CLI
348
+ npm run build
349
+
350
+ # Link globally for testing
351
+ npm run link:iris
352
+
353
+ # Verify
354
+ iris --version
355
+ iris doctor
356
+ ```
357
+
358
+ ### Development Workflow
359
+
360
+ ```bash
361
+ # Make changes to src/
362
+
363
+ # Rebuild
364
+ npm run build
365
+
366
+ # Test your changes
367
+ iris --help
368
+ iris validate
369
+
370
+ # Run verification
371
+ npm run verify
372
+ ```
373
+
374
+ ### Repository Hygiene
375
+
376
+ * **`node_modules/`** and **`dist/`** are explicitly ignored.
377
+ * **`verify:repo`**: Run `npm run verify:repo` to confirm hygiene.
378
+ * **`.iris/`**: Contains the "Brain" (policies, routes, state). **Do not delete.**
379
+
380
+ ### Unlink Development Version
381
+
382
+ ```bash
383
+ npm run unlink:iris
384
+ ```
@@ -0,0 +1,27 @@
1
+ import { FilesystemBridgeConnector } from "./filesystem-connector.js";
2
+ import { CursorConnector } from "./connectors/cursor-connector.js";
3
+ import { VSCodeConnector } from "./connectors/vscode-connector.js";
4
+ import { AntigravityConnector } from "./connectors/antigravity-connector.js";
5
+ import { WindsurfConnector } from "./connectors/windsurf-connector.js";
6
+ /**
7
+ * Create a bridge connector based on IDE id
8
+ */
9
+ export function createConnector(ideId) {
10
+ switch (ideId.toLowerCase()) {
11
+ case "cursor":
12
+ return new CursorConnector();
13
+ case "vscode":
14
+ case "code":
15
+ return new VSCodeConnector();
16
+ case "antigravity":
17
+ case "gemini":
18
+ return new AntigravityConnector();
19
+ case "windsurf":
20
+ return new WindsurfConnector();
21
+ case "claude":
22
+ case "codex":
23
+ default:
24
+ // Fallback to filesystem bridge for unsupported IDEs
25
+ return new FilesystemBridgeConnector();
26
+ }
27
+ }
@@ -0,0 +1,18 @@
1
+ import { FilesystemBridgeConnector } from "../filesystem-connector.js";
2
+ /**
3
+ * Antigravity connector
4
+ * Uses filesystem bridge (Antigravity doesn't have a standalone CLI)
5
+ */
6
+ export class AntigravityConnector extends FilesystemBridgeConnector {
7
+ id = "antigravity";
8
+ displayName = "Antigravity (Google Gemini)";
9
+ async isAvailable() {
10
+ // Antigravity is always "available" via filesystem bridge
11
+ // The user interacts through the Gemini interface
12
+ return true;
13
+ }
14
+ async ensureRunning() {
15
+ await super.ensureRunning();
16
+ // No additional setup needed for Antigravity
17
+ }
18
+ }
@@ -0,0 +1,31 @@
1
+ import { execSync } from "child_process";
2
+ import { FilesystemBridgeConnector } from "../filesystem-connector.js";
3
+ /**
4
+ * Cursor IDE connector
5
+ * Extends filesystem bridge with Cursor CLI integration
6
+ */
7
+ export class CursorConnector extends FilesystemBridgeConnector {
8
+ id = "cursor";
9
+ displayName = "Cursor IDE";
10
+ async isAvailable() {
11
+ try {
12
+ execSync("which cursor", { stdio: "ignore" });
13
+ return true;
14
+ }
15
+ catch {
16
+ return false;
17
+ }
18
+ }
19
+ async ensureRunning() {
20
+ await super.ensureRunning();
21
+ // Try to open Cursor if available
22
+ if (await this.isAvailable()) {
23
+ try {
24
+ execSync("cursor --version", { stdio: "ignore" });
25
+ }
26
+ catch {
27
+ // Cursor not running or not available, continue anyway
28
+ }
29
+ }
30
+ }
31
+ }
@@ -0,0 +1,31 @@
1
+ import { execSync } from "child_process";
2
+ import { FilesystemBridgeConnector } from "../filesystem-connector.js";
3
+ /**
4
+ * VS Code connector
5
+ * Extends filesystem bridge with VS Code CLI integration
6
+ */
7
+ export class VSCodeConnector extends FilesystemBridgeConnector {
8
+ id = "vscode";
9
+ displayName = "Visual Studio Code";
10
+ async isAvailable() {
11
+ try {
12
+ execSync("which code", { stdio: "ignore" });
13
+ return true;
14
+ }
15
+ catch {
16
+ return false;
17
+ }
18
+ }
19
+ async ensureRunning() {
20
+ await super.ensureRunning();
21
+ // Try to verify VS Code is available
22
+ if (await this.isAvailable()) {
23
+ try {
24
+ execSync("code --version", { stdio: "ignore" });
25
+ }
26
+ catch {
27
+ // VS Code not running or not available, continue anyway
28
+ }
29
+ }
30
+ }
31
+ }
@@ -0,0 +1,23 @@
1
+ import { execSync } from "child_process";
2
+ import { FilesystemBridgeConnector } from "../filesystem-connector.js";
3
+ /**
4
+ * Windsurf connector
5
+ * Extends filesystem bridge with Windsurf CLI integration (if available)
6
+ */
7
+ export class WindsurfConnector extends FilesystemBridgeConnector {
8
+ id = "windsurf";
9
+ displayName = "Windsurf";
10
+ async isAvailable() {
11
+ try {
12
+ execSync("which windsurf", { stdio: "ignore" });
13
+ return true;
14
+ }
15
+ catch {
16
+ // Fallback to filesystem bridge
17
+ return true;
18
+ }
19
+ }
20
+ async ensureRunning() {
21
+ await super.ensureRunning();
22
+ }
23
+ }
@@ -0,0 +1,100 @@
1
+ import fs from "fs";
2
+ import path from "path";
3
+ const BRIDGE_DIR = path.join(process.cwd(), ".iris/bridge");
4
+ const INBOX_DIR = path.join(BRIDGE_DIR, "inbox");
5
+ const OUTBOX_DIR = path.join(BRIDGE_DIR, "outbox");
6
+ const STATE_DIR = path.join(BRIDGE_DIR, "state");
7
+ /**
8
+ * Filesystem-based bridge connector (baseline implementation)
9
+ * Works by writing/reading JSON files in .iris/bridge/
10
+ */
11
+ export class FilesystemBridgeConnector {
12
+ id = "filesystem";
13
+ displayName = "Filesystem Bridge";
14
+ async isAvailable() {
15
+ // Always available - just needs filesystem
16
+ return true;
17
+ }
18
+ async ensureRunning() {
19
+ // Ensure bridge directories exist
20
+ for (const dir of [INBOX_DIR, OUTBOX_DIR, STATE_DIR]) {
21
+ if (!fs.existsSync(dir)) {
22
+ fs.mkdirSync(dir, { recursive: true });
23
+ }
24
+ }
25
+ }
26
+ async sendTask(packet) {
27
+ await this.ensureRunning();
28
+ const inboxPath = path.join(INBOX_DIR, `${packet.taskId}.json`);
29
+ fs.writeFileSync(inboxPath, JSON.stringify(packet, null, 2), "utf8");
30
+ // Also create a human-readable prompt file
31
+ const promptPath = path.join(STATE_DIR, `${packet.taskId}.md`);
32
+ const promptContent = this.generatePrompt(packet);
33
+ fs.writeFileSync(promptPath, promptContent, "utf8");
34
+ return { taskId: packet.taskId };
35
+ }
36
+ async waitResult(taskId, opts) {
37
+ const timeoutMs = opts?.timeoutMs || 300000; // 5 minutes default
38
+ const pollIntervalMs = opts?.pollIntervalMs || 1000; // 1 second
39
+ const outboxPath = path.join(OUTBOX_DIR, `${taskId}.json`);
40
+ const startTime = Date.now();
41
+ while (Date.now() - startTime < timeoutMs) {
42
+ if (fs.existsSync(outboxPath)) {
43
+ const content = fs.readFileSync(outboxPath, "utf8");
44
+ const result = JSON.parse(content);
45
+ // Clean up
46
+ fs.unlinkSync(outboxPath);
47
+ const inboxPath = path.join(INBOX_DIR, `${taskId}.json`);
48
+ if (fs.existsSync(inboxPath)) {
49
+ fs.unlinkSync(inboxPath);
50
+ }
51
+ return result;
52
+ }
53
+ // Wait before next poll
54
+ await new Promise(resolve => setTimeout(resolve, pollIntervalMs));
55
+ }
56
+ throw new Error(`Timeout waiting for result: ${taskId}`);
57
+ }
58
+ generatePrompt(packet) {
59
+ return `# IRIS Workflow Task
60
+
61
+ **Task ID:** ${packet.taskId}
62
+ **Stage:** ${packet.stage}
63
+ **Agent:** ${packet.agent}
64
+
65
+ ## Intent
66
+
67
+ ${packet.intent}
68
+
69
+ ## Instructions
70
+
71
+ ${packet.instructions}
72
+
73
+ ## Input Files
74
+
75
+ ${packet.inputs.map(p => `- [\`${path.basename(p)}\`](file://${path.resolve(p)})`).join("\n")}
76
+
77
+ ## Expected Outputs
78
+
79
+ ${packet.expectedOutputs.map(p => `- \`${p}\``).join("\n")}
80
+
81
+ ${packet.gates ? `\n## Gates\n\n${packet.gates.join("\n")}\n` : ""}
82
+
83
+ ---
84
+
85
+ **When complete, create a result file at:**
86
+ \`.iris/bridge/outbox/${packet.taskId}.json\`
87
+
88
+ **Result format:**
89
+ \`\`\`json
90
+ {
91
+ "taskId": "${packet.taskId}",
92
+ "status": "ok" | "needs_user" | "error",
93
+ "message": "Description of what was done",
94
+ "filesChanged": ["path/to/file1.md", "path/to/file2.md"],
95
+ "logs": ["Optional log messages"]
96
+ }
97
+ \`\`\`
98
+ `;
99
+ }
100
+ }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Bridge types for navi develop workflow
3
+ */
4
+ export var WorkflowStage;
5
+ (function (WorkflowStage) {
6
+ WorkflowStage["INTENT_INCEPTION"] = "INTENT_INCEPTION";
7
+ WorkflowStage["BOLT_PLAN"] = "BOLT_PLAN";
8
+ WorkflowStage["BOLT_EXECUTION"] = "BOLT_EXECUTION";
9
+ WorkflowStage["DONE"] = "DONE";
10
+ })(WorkflowStage || (WorkflowStage = {}));
package/dist/cli.js ADDED
@@ -0,0 +1,30 @@
1
+ #!/usr/bin/env node
2
+ import { Command } from "commander";
3
+ import { installCommand } from "./commands/install.js";
4
+ import { uninstallCommand } from "./commands/uninstall.js";
5
+ import { phaseCommand } from "./commands/phase.js";
6
+ import { validateCommand } from "./commands/validate.js";
7
+ import { statusCommand } from "./commands/status.js";
8
+ import { runCommand } from "./commands/run.js";
9
+ import { packCommand } from "./commands/pack.js";
10
+ import { askCommand } from "./commands/ask.js";
11
+ import { doctorCommand } from "./commands/doctor.js";
12
+ import { developCommand } from "./commands/develop.js";
13
+ import { bridgeCommand } from "./commands/bridge.js";
14
+ const program = new Command();
15
+ program
16
+ .name("iris")
17
+ .description("IRIS CLI - Intelligent Repository for Intent-driven Systems")
18
+ .version("0.0.06")
19
+ .addCommand(installCommand)
20
+ .addCommand(uninstallCommand)
21
+ .addCommand(phaseCommand)
22
+ .addCommand(validateCommand)
23
+ .addCommand(statusCommand)
24
+ .addCommand(packCommand)
25
+ .addCommand(runCommand)
26
+ .addCommand(askCommand)
27
+ .addCommand(doctorCommand)
28
+ .addCommand(developCommand)
29
+ .addCommand(bridgeCommand);
30
+ program.parseAsync(process.argv);