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.
- package/README.md +384 -0
- package/dist/bridge/connector-factory.js +27 -0
- package/dist/bridge/connectors/antigravity-connector.js +18 -0
- package/dist/bridge/connectors/cursor-connector.js +31 -0
- package/dist/bridge/connectors/vscode-connector.js +31 -0
- package/dist/bridge/connectors/windsurf-connector.js +23 -0
- package/dist/bridge/filesystem-connector.js +100 -0
- package/dist/bridge/types.js +10 -0
- package/dist/cli.js +30 -0
- package/dist/commands/ask.js +232 -0
- package/dist/commands/bridge.js +259 -0
- package/dist/commands/develop.js +108 -0
- package/dist/commands/doctor.js +102 -0
- package/dist/commands/install.js +57 -0
- package/dist/commands/pack.js +27 -0
- package/dist/commands/phase.js +38 -0
- package/dist/commands/run.js +17 -0
- package/dist/commands/status.js +105 -0
- package/dist/commands/uninstall.js +12 -0
- package/dist/commands/validate.js +87 -0
- package/dist/iris/artifact-checker.js +78 -0
- package/dist/iris/fixer.js +143 -0
- package/dist/iris/guard.js +38 -0
- package/dist/iris/include.js +49 -0
- package/dist/iris/installer.js +269 -0
- package/dist/iris/manifest.js +54 -0
- package/dist/iris/packer.js +303 -0
- package/dist/iris/policy.js +28 -0
- package/dist/iris/report.js +53 -0
- package/dist/iris/resolver.js +63 -0
- package/dist/iris/router.js +114 -0
- package/dist/iris/routes.js +20 -0
- package/dist/iris/run-state.js +143 -0
- package/dist/iris/state.js +85 -0
- package/dist/iris/uninstaller.js +166 -0
- package/dist/iris/validator.js +329 -0
- package/dist/lib.js +96 -0
- package/dist/utils/exit-codes.js +7 -0
- package/dist/workflows/bolt-execution.js +238 -0
- package/dist/workflows/bolt-plan.js +192 -0
- package/dist/workflows/intent-inception.js +188 -0
- package/package.json +41 -0
- package/src/iris_bundle/.iris/aidlc/README.md +16 -0
- package/src/iris_bundle/.iris/aidlc/agents/iris-construction-agent.md +35 -0
- package/src/iris_bundle/.iris/aidlc/agents/iris-inception-agent.md +30 -0
- package/src/iris_bundle/.iris/aidlc/agents/iris-master-agent.md +35 -0
- package/src/iris_bundle/.iris/aidlc/agents/iris-operations-agent.md +29 -0
- package/src/iris_bundle/.iris/aidlc/commands/iris-construction-agent.md +18 -0
- package/src/iris_bundle/.iris/aidlc/commands/iris-inception-agent.md +18 -0
- package/src/iris_bundle/.iris/aidlc/commands/iris-master-agent.md +18 -0
- package/src/iris_bundle/.iris/aidlc/commands/iris-operations-agent.md +18 -0
- package/src/iris_bundle/.iris/aidlc/context/context-map.md +25 -0
- package/src/iris_bundle/.iris/aidlc/context/exclusion-rules.md +13 -0
- package/src/iris_bundle/.iris/aidlc/context/load-order.md +25 -0
- package/src/iris_bundle/.iris/aidlc/memory/intent-rules.md +9 -0
- package/src/iris_bundle/.iris/aidlc/memory/log-rules.md +5 -0
- package/src/iris_bundle/.iris/aidlc/memory/memory-bank.yaml +39 -0
- package/src/iris_bundle/.iris/aidlc/memory/unit-rules.md +9 -0
- package/src/iris_bundle/.iris/aidlc/quick-start.md +24 -0
- package/src/iris_bundle/.iris/aidlc/skills/execution/implementation.md +14 -0
- package/src/iris_bundle/.iris/aidlc/skills/execution/refactoring.md +13 -0
- package/src/iris_bundle/.iris/aidlc/skills/execution/scaffold-generation.md +15 -0
- package/src/iris_bundle/.iris/aidlc/skills/governance/escalation.md +13 -0
- package/src/iris_bundle/.iris/aidlc/skills/governance/quality-gates.md +14 -0
- package/src/iris_bundle/.iris/aidlc/skills/governance/stop-conditions.md +11 -0
- package/src/iris_bundle/.iris/aidlc/skills/reasoning/decomposition.md +23 -0
- package/src/iris_bundle/.iris/aidlc/skills/reasoning/risk-analysis.md +14 -0
- package/src/iris_bundle/.iris/aidlc/skills/reasoning/verification.md +21 -0
- package/src/iris_bundle/.iris/aidlc/standards/artifacts-registry.md +38 -0
- package/src/iris_bundle/.iris/aidlc/standards/decision-logging.md +16 -0
- package/src/iris_bundle/.iris/aidlc/standards/doctrine-structure.md +31 -0
- package/src/iris_bundle/.iris/aidlc/standards/documentation-rules.md +15 -0
- package/src/iris_bundle/.iris/aidlc/standards/file-structure.md +21 -0
- package/src/iris_bundle/.iris/aidlc/standards/naming-conventions.md +18 -0
- package/src/iris_bundle/.iris/aidlc/standards/phases-and-gates.md +25 -0
- package/src/iris_bundle/.iris/aidlc/standards/routes-and-routing.md +35 -0
- package/src/iris_bundle/.iris/aidlc/standards/tool-wrappers.md +32 -0
- package/src/iris_bundle/.iris/aidlc/templates/bolt.md +23 -0
- package/src/iris_bundle/.iris/aidlc/templates/doctrine-doc-template.md +33 -0
- package/src/iris_bundle/.iris/aidlc/templates/intent.md +23 -0
- package/src/iris_bundle/.iris/aidlc/templates/log.md +24 -0
- package/src/iris_bundle/.iris/aidlc/templates/review.md +21 -0
- package/src/iris_bundle/.iris/aidlc/templates/unit.md +31 -0
- package/src/iris_bundle/.iris/aidlc/validation/failure-modes.md +16 -0
- package/src/iris_bundle/.iris/aidlc/validation/phase-preconditions.md +21 -0
- package/src/iris_bundle/.iris/aidlc/validation/quality-checklist.md +20 -0
- package/src/iris_bundle/.iris/policy.yaml +27 -0
- package/src/iris_bundle/.iris/routes.yaml +98 -0
- package/src/iris_bundle/.iris/state.yaml +7 -0
- package/src/iris_bundle/.iris/tools/antigravity/.antigravity/knowledge/IRIS.md +6 -0
- package/src/iris_bundle/.iris/tools/antigravity/.antigravity/workflows/iris-construction-agent.md +25 -0
- package/src/iris_bundle/.iris/tools/antigravity/.antigravity/workflows/iris-inception-agent.md +25 -0
- package/src/iris_bundle/.iris/tools/antigravity/.antigravity/workflows/iris-master-agent.md +25 -0
- package/src/iris_bundle/.iris/tools/antigravity/.antigravity/workflows/iris-operations-agent.md +25 -0
- package/src/iris_bundle/.iris/tools/claude/.claude/claude.md +9 -0
- package/src/iris_bundle/.iris/tools/claude/.claude/commands/compare-specs.md +203 -0
- package/src/iris_bundle/.iris/tools/claude/.claude/commands/iris-construction-agent.md +25 -0
- package/src/iris_bundle/.iris/tools/claude/.claude/commands/iris-inception-agent.md +25 -0
- package/src/iris_bundle/.iris/tools/claude/.claude/commands/iris-master-agent.md +25 -0
- package/src/iris_bundle/.iris/tools/claude/.claude/commands/iris-operations-agent.md +25 -0
- package/src/iris_bundle/.iris/tools/codex/AGENTS.md +15 -0
- package/src/iris_bundle/.iris/tools/cursor/.cursor/commands/iris-construction-agent.md +25 -0
- package/src/iris_bundle/.iris/tools/cursor/.cursor/commands/iris-inception-agent.md +25 -0
- package/src/iris_bundle/.iris/tools/cursor/.cursor/commands/iris-master-agent.md +25 -0
- package/src/iris_bundle/.iris/tools/cursor/.cursor/commands/iris-operations-agent.md +25 -0
- package/src/iris_bundle/.iris/tools/gemini/.gemini/commands/iris-construction-agent.toml +29 -0
- package/src/iris_bundle/.iris/tools/gemini/.gemini/commands/iris-inception-agent.toml +29 -0
- package/src/iris_bundle/.iris/tools/gemini/.gemini/commands/iris-master-agent.toml +29 -0
- package/src/iris_bundle/.iris/tools/gemini/.gemini/commands/iris-operations-agent.toml +29 -0
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import { randomUUID } from "crypto";
|
|
2
|
+
import inquirer from "inquirer";
|
|
3
|
+
import kleur from "kleur";
|
|
4
|
+
import fs from "fs";
|
|
5
|
+
import path from "path";
|
|
6
|
+
import { WorkflowStage } from "../bridge/types.js";
|
|
7
|
+
import { appendEvent, saveRun } from "../iris/run-state.js";
|
|
8
|
+
/**
|
|
9
|
+
* Execute Bolt Plan stage
|
|
10
|
+
* Steps:
|
|
11
|
+
* 1. Generate bolt plan and individual bolt files
|
|
12
|
+
* 2. Parse bolt list from plan
|
|
13
|
+
* 3. Gate: Approve bolt plan? (y/N)
|
|
14
|
+
*/
|
|
15
|
+
export async function executeBoltPlan(runState, connector, options) {
|
|
16
|
+
console.log(kleur.bold("Bolt Plan Stage"));
|
|
17
|
+
console.log(kleur.dim("Generating implementation plan and bolts\n"));
|
|
18
|
+
// Step 1: Generate bolt plan
|
|
19
|
+
console.log(kleur.cyan("→ Generating bolt plan..."));
|
|
20
|
+
const planTaskId = randomUUID();
|
|
21
|
+
const planPacket = {
|
|
22
|
+
taskId: planTaskId,
|
|
23
|
+
intent: runState.intent,
|
|
24
|
+
stage: WorkflowStage.BOLT_PLAN,
|
|
25
|
+
agent: "iris-master-agent",
|
|
26
|
+
instructions: `Based on the intent artifacts, create a bolt plan and individual bolt files.
|
|
27
|
+
|
|
28
|
+
Intent: ${runState.intent}
|
|
29
|
+
|
|
30
|
+
Review the intent artifacts in memory-bank/intents/ to understand requirements.
|
|
31
|
+
|
|
32
|
+
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>
|
|
40
|
+
|
|
41
|
+
## Purpose
|
|
42
|
+
Brief description of what this bolt accomplishes
|
|
43
|
+
|
|
44
|
+
## Dependencies
|
|
45
|
+
List any other bolts this depends on
|
|
46
|
+
|
|
47
|
+
## Tasks
|
|
48
|
+
- [ ] Task 1
|
|
49
|
+
- [ ] Task 2
|
|
50
|
+
|
|
51
|
+
## Acceptance Criteria
|
|
52
|
+
- Criterion 1
|
|
53
|
+
- Criterion 2
|
|
54
|
+
|
|
55
|
+
In plan.md, list all bolts in dependency order.`,
|
|
56
|
+
inputs: runState.artifacts,
|
|
57
|
+
expectedOutputs: [
|
|
58
|
+
"memory-bank/operations/bolts/plan.md"
|
|
59
|
+
],
|
|
60
|
+
metadata: { step: "generate_bolt_plan" }
|
|
61
|
+
};
|
|
62
|
+
appendEvent(runState.runId, {
|
|
63
|
+
stage: WorkflowStage.BOLT_PLAN,
|
|
64
|
+
action: "Requesting bolt plan generation",
|
|
65
|
+
taskId: planTaskId
|
|
66
|
+
});
|
|
67
|
+
if (options.noBridge) {
|
|
68
|
+
console.log(kleur.yellow(" Bridge disabled. Task packet written to:"));
|
|
69
|
+
console.log(kleur.dim(` .iris/bridge/inbox/${planTaskId}.json`));
|
|
70
|
+
console.log(kleur.dim(" Manually create result in .iris/bridge/outbox/\n"));
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
try {
|
|
74
|
+
await connector.sendTask(planPacket);
|
|
75
|
+
console.log(kleur.dim(` Task sent: ${planTaskId}`));
|
|
76
|
+
console.log(kleur.dim(" Waiting for IDE agent to create bolt plan...\n"));
|
|
77
|
+
const planResult = await connector.waitResult(planTaskId, {
|
|
78
|
+
timeoutMs: 600000 // 10 minutes
|
|
79
|
+
});
|
|
80
|
+
if (planResult.status === "error") {
|
|
81
|
+
throw new Error(planResult.error || "Failed to generate bolt plan");
|
|
82
|
+
}
|
|
83
|
+
console.log(kleur.green("✓ Bolt plan created"));
|
|
84
|
+
if (planResult.filesChanged) {
|
|
85
|
+
planResult.filesChanged.forEach(file => {
|
|
86
|
+
console.log(kleur.dim(` - ${file}`));
|
|
87
|
+
runState.artifacts.push(file);
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
console.log("");
|
|
91
|
+
appendEvent(runState.runId, {
|
|
92
|
+
stage: WorkflowStage.BOLT_PLAN,
|
|
93
|
+
action: "Bolt plan generated",
|
|
94
|
+
outputs: planResult.filesChanged,
|
|
95
|
+
resultStatus: "ok"
|
|
96
|
+
});
|
|
97
|
+
// Step 2: Parse bolt list from plan
|
|
98
|
+
const bolts = await parseBoltsFromPlan();
|
|
99
|
+
if (bolts.length === 0) {
|
|
100
|
+
console.log(kleur.yellow("⚠ No bolts found in plan. Creating default bolt.\n"));
|
|
101
|
+
bolts.push({
|
|
102
|
+
id: "implementation",
|
|
103
|
+
status: "pending"
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
runState.bolts = bolts;
|
|
107
|
+
console.log(kleur.cyan(`Found ${bolts.length} bolt(s):`));
|
|
108
|
+
bolts.forEach((bolt, i) => {
|
|
109
|
+
console.log(kleur.dim(` ${i + 1}. ${bolt.id}`));
|
|
110
|
+
});
|
|
111
|
+
console.log("");
|
|
112
|
+
// Step 3: Gate - Approve bolt plan?
|
|
113
|
+
if (options.gate === "manual") {
|
|
114
|
+
console.log(kleur.bold(kleur.yellow("Gate: Bolt Plan Approval")));
|
|
115
|
+
const { approved } = await inquirer.prompt([
|
|
116
|
+
{
|
|
117
|
+
type: "confirm",
|
|
118
|
+
name: "approved",
|
|
119
|
+
message: "Approve bolt plan and proceed to execution?",
|
|
120
|
+
default: true
|
|
121
|
+
}
|
|
122
|
+
]);
|
|
123
|
+
appendEvent(runState.runId, {
|
|
124
|
+
stage: WorkflowStage.BOLT_PLAN,
|
|
125
|
+
action: "Gate decision",
|
|
126
|
+
userGateDecision: approved ? "approved" : "rejected"
|
|
127
|
+
});
|
|
128
|
+
if (!approved) {
|
|
129
|
+
console.log(kleur.yellow("\n⚠ Bolt plan rejected. Revision loop not yet implemented."));
|
|
130
|
+
console.log(kleur.dim("For now, manually edit bolt files and re-run.\n"));
|
|
131
|
+
runState.stage = WorkflowStage.DONE;
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
console.log(kleur.green("✓ Bolt plan approved\n"));
|
|
135
|
+
}
|
|
136
|
+
// Move to next stage
|
|
137
|
+
runState.stage = WorkflowStage.BOLT_EXECUTION;
|
|
138
|
+
runState.currentBoltIndex = 0;
|
|
139
|
+
saveRun(runState);
|
|
140
|
+
}
|
|
141
|
+
catch (error) {
|
|
142
|
+
console.error(kleur.red(`\n✗ Error: ${error.message}`));
|
|
143
|
+
appendEvent(runState.runId, {
|
|
144
|
+
stage: WorkflowStage.BOLT_PLAN,
|
|
145
|
+
action: "Stage failed",
|
|
146
|
+
message: error.message,
|
|
147
|
+
resultStatus: "error"
|
|
148
|
+
});
|
|
149
|
+
throw error;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Parse bolts from plan.md
|
|
154
|
+
* Looks for bolt file references or creates default list
|
|
155
|
+
*/
|
|
156
|
+
async function parseBoltsFromPlan() {
|
|
157
|
+
const planPath = path.join(process.cwd(), "memory-bank/operations/bolts/plan.md");
|
|
158
|
+
if (!fs.existsSync(planPath)) {
|
|
159
|
+
return [];
|
|
160
|
+
}
|
|
161
|
+
const content = fs.readFileSync(planPath, "utf8");
|
|
162
|
+
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;
|
|
165
|
+
let match;
|
|
166
|
+
while ((match = boltPattern.exec(content)) !== null) {
|
|
167
|
+
const boltId = match[1].replace(/\.md$/, "");
|
|
168
|
+
if (!bolts.find(b => b.id === boltId)) {
|
|
169
|
+
bolts.push({
|
|
170
|
+
id: boltId,
|
|
171
|
+
status: "pending"
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
// Also check for actual bolt files in the directory
|
|
176
|
+
const boltsDir = path.join(process.cwd(), "memory-bank/operations/bolts");
|
|
177
|
+
if (fs.existsSync(boltsDir)) {
|
|
178
|
+
const files = fs.readdirSync(boltsDir);
|
|
179
|
+
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)) {
|
|
183
|
+
bolts.push({
|
|
184
|
+
id: boltId,
|
|
185
|
+
status: "pending"
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
return bolts;
|
|
192
|
+
}
|
|
@@ -0,0 +1,188 @@
|
|
|
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 Intent Inception stage
|
|
8
|
+
* Steps:
|
|
9
|
+
* 1. Generate clarifying questions (3-8)
|
|
10
|
+
* 2. Prompt user for answers
|
|
11
|
+
* 3. Generate requirements/system-context/stories/units
|
|
12
|
+
* 4. Gate: Approve intent? (y/N)
|
|
13
|
+
*/
|
|
14
|
+
export async function executeIntentInception(runState, connector, options) {
|
|
15
|
+
console.log(kleur.bold("Intent Inception Stage"));
|
|
16
|
+
console.log(kleur.dim("Clarifying requirements and creating intent artifacts\n"));
|
|
17
|
+
// Step 1: Generate clarifying questions
|
|
18
|
+
console.log(kleur.cyan("→ Generating clarifying questions..."));
|
|
19
|
+
const questionsTaskId = randomUUID();
|
|
20
|
+
const questionsPacket = {
|
|
21
|
+
taskId: questionsTaskId,
|
|
22
|
+
intent: runState.intent,
|
|
23
|
+
stage: WorkflowStage.INTENT_INCEPTION,
|
|
24
|
+
agent: "iris-inception-agent",
|
|
25
|
+
instructions: `Based on the intent "${runState.intent}", generate 3-8 clarifying questions to better understand:
|
|
26
|
+
- The problem being solved
|
|
27
|
+
- Success criteria
|
|
28
|
+
- Scope and constraints
|
|
29
|
+
- Technical requirements
|
|
30
|
+
- User expectations
|
|
31
|
+
|
|
32
|
+
Return the questions as a JSON array of strings in the result message.`,
|
|
33
|
+
inputs: [],
|
|
34
|
+
expectedOutputs: [],
|
|
35
|
+
metadata: { step: "clarifying_questions" }
|
|
36
|
+
};
|
|
37
|
+
appendEvent(runState.runId, {
|
|
38
|
+
stage: WorkflowStage.INTENT_INCEPTION,
|
|
39
|
+
action: "Requesting clarifying questions",
|
|
40
|
+
taskId: questionsTaskId
|
|
41
|
+
});
|
|
42
|
+
if (options.noBridge) {
|
|
43
|
+
console.log(kleur.yellow(" Bridge disabled. Task packet written to:"));
|
|
44
|
+
console.log(kleur.dim(` .iris/bridge/inbox/${questionsTaskId}.json`));
|
|
45
|
+
console.log(kleur.dim(" Manually create result in .iris/bridge/outbox/\n"));
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
try {
|
|
49
|
+
await connector.sendTask(questionsPacket);
|
|
50
|
+
console.log(kleur.dim(` Task sent: ${questionsTaskId}`));
|
|
51
|
+
console.log(kleur.dim(" Waiting for IDE agent response...\n"));
|
|
52
|
+
const questionsResult = await connector.waitResult(questionsTaskId, {
|
|
53
|
+
timeoutMs: 300000 // 5 minutes
|
|
54
|
+
});
|
|
55
|
+
if (questionsResult.status === "error") {
|
|
56
|
+
throw new Error(questionsResult.error || "Failed to generate questions");
|
|
57
|
+
}
|
|
58
|
+
// Parse questions from result
|
|
59
|
+
let questions;
|
|
60
|
+
try {
|
|
61
|
+
questions = JSON.parse(questionsResult.message);
|
|
62
|
+
}
|
|
63
|
+
catch {
|
|
64
|
+
// Fallback: treat message as newline-separated questions
|
|
65
|
+
questions = questionsResult.message.split("\n").filter(q => q.trim());
|
|
66
|
+
}
|
|
67
|
+
console.log(kleur.green("✓ Questions received\n"));
|
|
68
|
+
// Step 2: Prompt user for answers
|
|
69
|
+
console.log(kleur.bold("Clarifying Questions:"));
|
|
70
|
+
const answers = {};
|
|
71
|
+
for (let i = 0; i < questions.length; i++) {
|
|
72
|
+
const { answer } = await inquirer.prompt([
|
|
73
|
+
{
|
|
74
|
+
type: "input",
|
|
75
|
+
name: "answer",
|
|
76
|
+
message: `${i + 1}. ${questions[i]}`
|
|
77
|
+
}
|
|
78
|
+
]);
|
|
79
|
+
answers[questions[i]] = answer;
|
|
80
|
+
}
|
|
81
|
+
console.log("");
|
|
82
|
+
appendEvent(runState.runId, {
|
|
83
|
+
stage: WorkflowStage.INTENT_INCEPTION,
|
|
84
|
+
action: "User answered clarifying questions",
|
|
85
|
+
message: `${questions.length} questions answered`
|
|
86
|
+
});
|
|
87
|
+
// Step 3: Generate intent artifacts
|
|
88
|
+
console.log(kleur.cyan("→ Generating intent artifacts..."));
|
|
89
|
+
const intentSlug = runState.intent
|
|
90
|
+
.toLowerCase()
|
|
91
|
+
.replace(/[^a-z0-9]+/g, "-")
|
|
92
|
+
.replace(/^-|-$/g, "")
|
|
93
|
+
.substring(0, 50);
|
|
94
|
+
const artifactsTaskId = randomUUID();
|
|
95
|
+
const artifactsPacket = {
|
|
96
|
+
taskId: artifactsTaskId,
|
|
97
|
+
intent: runState.intent,
|
|
98
|
+
stage: WorkflowStage.INTENT_INCEPTION,
|
|
99
|
+
agent: "iris-inception-agent",
|
|
100
|
+
instructions: `Based on the intent and user answers, create the following intent artifacts:
|
|
101
|
+
|
|
102
|
+
1. requirements.md - Problem statement, scope, success criteria
|
|
103
|
+
2. system-context.md - Architecture decisions, constraints, tooling
|
|
104
|
+
3. stories.md - User stories or feature breakdown (optional)
|
|
105
|
+
4. units/ - If applicable, identify major units/components
|
|
106
|
+
|
|
107
|
+
Intent: ${runState.intent}
|
|
108
|
+
|
|
109
|
+
User Answers:
|
|
110
|
+
${Object.entries(answers).map(([q, a]) => `Q: ${q}\nA: ${a}`).join("\n\n")}
|
|
111
|
+
|
|
112
|
+
Create files in: memory-bank/intents/${intentSlug}/
|
|
113
|
+
|
|
114
|
+
Use the IRIS templates as guidance. Do not use placeholders - write real, specific content based on the intent and answers.`,
|
|
115
|
+
inputs: [],
|
|
116
|
+
expectedOutputs: [
|
|
117
|
+
`memory-bank/intents/${intentSlug}/requirements.md`,
|
|
118
|
+
`memory-bank/intents/${intentSlug}/system-context.md`
|
|
119
|
+
],
|
|
120
|
+
metadata: { step: "generate_artifacts", intentSlug }
|
|
121
|
+
};
|
|
122
|
+
appendEvent(runState.runId, {
|
|
123
|
+
stage: WorkflowStage.INTENT_INCEPTION,
|
|
124
|
+
action: "Requesting artifact generation",
|
|
125
|
+
taskId: artifactsTaskId
|
|
126
|
+
});
|
|
127
|
+
await connector.sendTask(artifactsPacket);
|
|
128
|
+
console.log(kleur.dim(` Task sent: ${artifactsTaskId}`));
|
|
129
|
+
console.log(kleur.dim(" Waiting for IDE agent to create artifacts...\n"));
|
|
130
|
+
const artifactsResult = await connector.waitResult(artifactsTaskId, {
|
|
131
|
+
timeoutMs: 600000 // 10 minutes
|
|
132
|
+
});
|
|
133
|
+
if (artifactsResult.status === "error") {
|
|
134
|
+
throw new Error(artifactsResult.error || "Failed to generate artifacts");
|
|
135
|
+
}
|
|
136
|
+
console.log(kleur.green("✓ Artifacts created"));
|
|
137
|
+
if (artifactsResult.filesChanged) {
|
|
138
|
+
artifactsResult.filesChanged.forEach(file => {
|
|
139
|
+
console.log(kleur.dim(` - ${file}`));
|
|
140
|
+
runState.artifacts.push(file);
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
console.log("");
|
|
144
|
+
appendEvent(runState.runId, {
|
|
145
|
+
stage: WorkflowStage.INTENT_INCEPTION,
|
|
146
|
+
action: "Artifacts generated",
|
|
147
|
+
outputs: artifactsResult.filesChanged,
|
|
148
|
+
resultStatus: "ok"
|
|
149
|
+
});
|
|
150
|
+
// Step 4: Gate - Approve intent?
|
|
151
|
+
if (options.gate === "manual") {
|
|
152
|
+
console.log(kleur.bold(kleur.yellow("Gate: Intent Approval")));
|
|
153
|
+
const { approved } = await inquirer.prompt([
|
|
154
|
+
{
|
|
155
|
+
type: "confirm",
|
|
156
|
+
name: "approved",
|
|
157
|
+
message: "Approve intent artifacts and proceed to Bolt Plan?",
|
|
158
|
+
default: true
|
|
159
|
+
}
|
|
160
|
+
]);
|
|
161
|
+
appendEvent(runState.runId, {
|
|
162
|
+
stage: WorkflowStage.INTENT_INCEPTION,
|
|
163
|
+
action: "Gate decision",
|
|
164
|
+
userGateDecision: approved ? "approved" : "rejected"
|
|
165
|
+
});
|
|
166
|
+
if (!approved) {
|
|
167
|
+
console.log(kleur.yellow("\n⚠ Intent rejected. Revision loop not yet implemented."));
|
|
168
|
+
console.log(kleur.dim("For now, manually edit artifacts and re-run.\n"));
|
|
169
|
+
runState.stage = WorkflowStage.DONE;
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
console.log(kleur.green("✓ Intent approved\n"));
|
|
173
|
+
}
|
|
174
|
+
// Move to next stage
|
|
175
|
+
runState.stage = WorkflowStage.BOLT_PLAN;
|
|
176
|
+
saveRun(runState);
|
|
177
|
+
}
|
|
178
|
+
catch (error) {
|
|
179
|
+
console.error(kleur.red(`\n✗ Error: ${error.message}`));
|
|
180
|
+
appendEvent(runState.runId, {
|
|
181
|
+
stage: WorkflowStage.INTENT_INCEPTION,
|
|
182
|
+
action: "Stage failed",
|
|
183
|
+
message: error.message,
|
|
184
|
+
resultStatus: "error"
|
|
185
|
+
});
|
|
186
|
+
throw error;
|
|
187
|
+
}
|
|
188
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "project-iris",
|
|
3
|
+
"version": "0.0.06",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"bin": {
|
|
6
|
+
"iris": "dist/cli.js"
|
|
7
|
+
},
|
|
8
|
+
"files": [
|
|
9
|
+
"dist/**",
|
|
10
|
+
"src/iris_bundle/**"
|
|
11
|
+
],
|
|
12
|
+
"scripts": {
|
|
13
|
+
"build": "tsc -p tsconfig.json",
|
|
14
|
+
"start": "node dist/cli.js",
|
|
15
|
+
"iris": "node dist/cli.js",
|
|
16
|
+
"dev": "node --loader ts-node/esm src/cli.ts",
|
|
17
|
+
"verify": "npm run build && npm run iris -- validate --strict",
|
|
18
|
+
"verify:repo": "if git ls-files | grep -q '^node_modules/'; then echo 'FAIL: node_modules is tracked'; exit 1; else echo 'PASS: node_modules is not tracked'; fi",
|
|
19
|
+
"lint": "echo \"(add lint if you want)\"",
|
|
20
|
+
"link:iris": "npm run build && chmod +x dist/cli.js && npm link && echo '\n✓ iris linked globally' && echo 'Run: iris doctor' && echo 'If iris is not found, add global bin to PATH:' && echo ' export PATH=\"$(npm prefix -g)/bin:$PATH\"'",
|
|
21
|
+
"unlink:iris": "npm unlink -g && echo '✓ iris unlinked'",
|
|
22
|
+
"doctor": "npm run iris -- doctor",
|
|
23
|
+
"prepublishOnly": "npm run build && node dist/cli.js --help",
|
|
24
|
+
"test:smoke": "npm run build && node scripts/smoke-install.js"
|
|
25
|
+
},
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"@types/js-yaml": "^4.0.9",
|
|
28
|
+
"commander": "^12.1.0",
|
|
29
|
+
"fast-glob": "^3.3.3",
|
|
30
|
+
"gray-matter": "^4.0.3",
|
|
31
|
+
"inquirer": "^9.3.7",
|
|
32
|
+
"js-yaml": "^4.1.0",
|
|
33
|
+
"kleur": "^4.1.5"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@types/inquirer": "^9.0.9",
|
|
37
|
+
"@types/node": "^22.10.2",
|
|
38
|
+
"ts-node": "^10.9.2",
|
|
39
|
+
"typescript": "^5.6.3"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# IRIS AI-DLC Doctrine (Full SDLC) — Core Pack (#1–#4)
|
|
2
|
+
|
|
3
|
+
This folder is the **authoritative doctrine** for IRIS: a strict, file-based SDLC operating system for AI-assisted development.
|
|
4
|
+
|
|
5
|
+
## What is implemented in this pack
|
|
6
|
+
1. **Frozen doctrine layout**
|
|
7
|
+
2. **Strict doc schema applied to core docs**
|
|
8
|
+
3. **Canonical SDLC artifacts + templates**
|
|
9
|
+
4. **Phase transitions (preconditions + exit criteria)**
|
|
10
|
+
|
|
11
|
+
## Non‑negotiables
|
|
12
|
+
- Doctrine governs; tools execute.
|
|
13
|
+
- If it isn't in files, it is unknown.
|
|
14
|
+
- Missing prerequisites are a hard stop.
|
|
15
|
+
|
|
16
|
+
Start with: `quick-start.md` then `standards/phases-and-gates.md`.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# IRIS Construction Agent
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Implement approved units/bolts with verifiable evidence.
|
|
5
|
+
|
|
6
|
+
## Inputs
|
|
7
|
+
- Approved unit(s)
|
|
8
|
+
- Ready bolts (optional but recommended)
|
|
9
|
+
|
|
10
|
+
## Outputs
|
|
11
|
+
- Code changes
|
|
12
|
+
- Verification evidence (review/log)
|
|
13
|
+
- Construction completion log
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
## Hard Rules (Global)
|
|
17
|
+
- MUST follow `standards/phases-and-gates.md`.
|
|
18
|
+
- MUST treat missing prerequisites as a hard stop (`validation/phase-preconditions.md`).
|
|
19
|
+
- MUST log non-trivial decisions (`standards/decision-logging.md`).
|
|
20
|
+
- MUST produce file-addressable outputs (exact paths).
|
|
21
|
+
- MUST NOT invent project state.
|
|
22
|
+
|
|
23
|
+
## Default Output Format
|
|
24
|
+
- Plan (short)
|
|
25
|
+
- File path list (create/modify)
|
|
26
|
+
- Gate mapping (which checklist items are satisfied)
|
|
27
|
+
- Stop conditions (if blocked)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## Procedure
|
|
31
|
+
1. Load unit + bolt(s).
|
|
32
|
+
2. Implement smallest change set.
|
|
33
|
+
3. Verify (`skills/reasoning/verification.md`).
|
|
34
|
+
4. Record evidence.
|
|
35
|
+
5. If scope expands, STOP and request Inception update.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# IRIS Inception Agent
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Create and approve intent + units with testable acceptance criteria.
|
|
5
|
+
|
|
6
|
+
## Outputs
|
|
7
|
+
- Approved intent + approved units
|
|
8
|
+
- Inception kickoff log
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## Hard Rules (Global)
|
|
12
|
+
- MUST follow `standards/phases-and-gates.md`.
|
|
13
|
+
- MUST treat missing prerequisites as a hard stop (`validation/phase-preconditions.md`).
|
|
14
|
+
- MUST log non-trivial decisions (`standards/decision-logging.md`).
|
|
15
|
+
- MUST produce file-addressable outputs (exact paths).
|
|
16
|
+
- MUST NOT invent project state.
|
|
17
|
+
|
|
18
|
+
## Default Output Format
|
|
19
|
+
- Plan (short)
|
|
20
|
+
- File path list (create/modify)
|
|
21
|
+
- Gate mapping (which checklist items are satisfied)
|
|
22
|
+
- Stop conditions (if blocked)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## Procedure
|
|
26
|
+
1. Draft intent (`templates/intent.md`) and refine until measurable.
|
|
27
|
+
2. Decompose into units (`skills/reasoning/decomposition.md`).
|
|
28
|
+
3. Add risks/rollback (`skills/reasoning/risk-analysis.md`).
|
|
29
|
+
4. Approve only when gates pass; otherwise keep Draft.
|
|
30
|
+
5. Log key decisions.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# IRIS Master Agent
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Route work, enforce gates, and resolve conflicts across phases.
|
|
5
|
+
|
|
6
|
+
## Inputs
|
|
7
|
+
- Doctrine: `.iris/aidlc/**`
|
|
8
|
+
- Project memory: `memory-bank/**`
|
|
9
|
+
|
|
10
|
+
## Outputs
|
|
11
|
+
- Routing decisions
|
|
12
|
+
- Gate decisions + reviews
|
|
13
|
+
- Decision logs for architecture-level choices
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
## Hard Rules (Global)
|
|
17
|
+
- MUST follow `standards/phases-and-gates.md`.
|
|
18
|
+
- MUST treat missing prerequisites as a hard stop (`validation/phase-preconditions.md`).
|
|
19
|
+
- MUST log non-trivial decisions (`standards/decision-logging.md`).
|
|
20
|
+
- MUST produce file-addressable outputs (exact paths).
|
|
21
|
+
- MUST NOT invent project state.
|
|
22
|
+
|
|
23
|
+
## Default Output Format
|
|
24
|
+
- Plan (short)
|
|
25
|
+
- File path list (create/modify)
|
|
26
|
+
- Gate mapping (which checklist items are satisfied)
|
|
27
|
+
- Stop conditions (if blocked)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## Procedure
|
|
31
|
+
1. Identify current phase + requested action.
|
|
32
|
+
2. Load required artifacts for that phase.
|
|
33
|
+
3. If prerequisites missing, STOP and request exact file(s).
|
|
34
|
+
4. Route to the correct phase agent.
|
|
35
|
+
5. Enforce gate completion before any transition.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# IRIS Operations Agent
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Operate and stabilize: handover, monitoring, incidents, maintenance.
|
|
5
|
+
|
|
6
|
+
## Outputs
|
|
7
|
+
- Ops handover log
|
|
8
|
+
- Incident logs and postmortems (when needed)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## Hard Rules (Global)
|
|
12
|
+
- MUST follow `standards/phases-and-gates.md`.
|
|
13
|
+
- MUST treat missing prerequisites as a hard stop (`validation/phase-preconditions.md`).
|
|
14
|
+
- MUST log non-trivial decisions (`standards/decision-logging.md`).
|
|
15
|
+
- MUST produce file-addressable outputs (exact paths).
|
|
16
|
+
- MUST NOT invent project state.
|
|
17
|
+
|
|
18
|
+
## Default Output Format
|
|
19
|
+
- Plan (short)
|
|
20
|
+
- File path list (create/modify)
|
|
21
|
+
- Gate mapping (which checklist items are satisfied)
|
|
22
|
+
- Stop conditions (if blocked)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## Procedure
|
|
26
|
+
1. Confirm Ops entry prerequisites.
|
|
27
|
+
2. Maintain runbooks/logs.
|
|
28
|
+
3. For incidents: log → triage → resolve → postmortem (if major).
|
|
29
|
+
4. Feed learnings into standards or new intents.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# /iris-construction-agent
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Run the Construction Agent: implement approved work with evidence.
|
|
5
|
+
|
|
6
|
+
## Loads
|
|
7
|
+
- `.iris/aidlc/standards/**`
|
|
8
|
+
- `.iris/aidlc/validation/**`
|
|
9
|
+
- `.iris/aidlc/memory/**`
|
|
10
|
+
- `.iris/aidlc/agents/iris-construction-agent.md`
|
|
11
|
+
- `memory-bank/**`
|
|
12
|
+
|
|
13
|
+
## Required inputs
|
|
14
|
+
See: `.iris/aidlc/validation/phase-preconditions.md`
|
|
15
|
+
|
|
16
|
+
## Output expectations
|
|
17
|
+
- File-addressable deliverables
|
|
18
|
+
- Evidence and logs where required
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# /iris-inception-agent
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Run the Inception Agent: produce approved intent and units.
|
|
5
|
+
|
|
6
|
+
## Loads
|
|
7
|
+
- `.iris/aidlc/standards/**`
|
|
8
|
+
- `.iris/aidlc/validation/**`
|
|
9
|
+
- `.iris/aidlc/memory/**`
|
|
10
|
+
- `.iris/aidlc/agents/iris-inception-agent.md`
|
|
11
|
+
- `memory-bank/**`
|
|
12
|
+
|
|
13
|
+
## Required inputs
|
|
14
|
+
See: `.iris/aidlc/validation/phase-preconditions.md`
|
|
15
|
+
|
|
16
|
+
## Output expectations
|
|
17
|
+
- File-addressable deliverables
|
|
18
|
+
- Evidence and logs where required
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# /iris-master-agent
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Run the Master Agent: route work and enforce SDLC gates.
|
|
5
|
+
|
|
6
|
+
## Loads
|
|
7
|
+
- `.iris/aidlc/standards/**`
|
|
8
|
+
- `.iris/aidlc/validation/**`
|
|
9
|
+
- `.iris/aidlc/memory/**`
|
|
10
|
+
- `.iris/aidlc/agents/iris-master-agent.md`
|
|
11
|
+
- `memory-bank/**`
|
|
12
|
+
|
|
13
|
+
## Required inputs
|
|
14
|
+
See: `.iris/aidlc/validation/phase-preconditions.md`
|
|
15
|
+
|
|
16
|
+
## Output expectations
|
|
17
|
+
- File-addressable deliverables
|
|
18
|
+
- Evidence and logs where required
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# /iris-operations-agent
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Run the Operations Agent: stabilize and maintain.
|
|
5
|
+
|
|
6
|
+
## Loads
|
|
7
|
+
- `.iris/aidlc/standards/**`
|
|
8
|
+
- `.iris/aidlc/validation/**`
|
|
9
|
+
- `.iris/aidlc/memory/**`
|
|
10
|
+
- `.iris/aidlc/agents/iris-operations-agent.md`
|
|
11
|
+
- `memory-bank/**`
|
|
12
|
+
|
|
13
|
+
## Required inputs
|
|
14
|
+
See: `.iris/aidlc/validation/phase-preconditions.md`
|
|
15
|
+
|
|
16
|
+
## Output expectations
|
|
17
|
+
- File-addressable deliverables
|
|
18
|
+
- Evidence and logs where required
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Context Map
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Define what IRIS loads as context per phase.
|
|
5
|
+
|
|
6
|
+
## Always load
|
|
7
|
+
- `.iris/aidlc/standards/**`
|
|
8
|
+
- `.iris/aidlc/memory/**`
|
|
9
|
+
- `.iris/aidlc/validation/**`
|
|
10
|
+
|
|
11
|
+
## Phase-specific
|
|
12
|
+
### Inception
|
|
13
|
+
- templates: `intent.md`, `unit.md`
|
|
14
|
+
- standards: `phases-and-gates.md`
|
|
15
|
+
|
|
16
|
+
### Construction
|
|
17
|
+
- approved unit(s) + related bolts
|
|
18
|
+
- templates: `bolt.md`, `review.md`
|
|
19
|
+
|
|
20
|
+
### Operations
|
|
21
|
+
- handover + incident/process logs
|
|
22
|
+
- template: `log.md`
|
|
23
|
+
|
|
24
|
+
## Hard Rules
|
|
25
|
+
- Context MUST be minimal but sufficient.
|