iriai-build 0.1.0
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/bin/iriai-build.js +78 -0
- package/bridge-v3.js +98 -0
- package/cli/bootstrap.js +83 -0
- package/cli/commands/implementation.js +64 -0
- package/cli/commands/index.js +46 -0
- package/cli/commands/launch.js +153 -0
- package/cli/commands/plan.js +117 -0
- package/cli/commands/setup.js +80 -0
- package/cli/commands/slack.js +97 -0
- package/cli/commands/transfer.js +111 -0
- package/cli/config.js +92 -0
- package/cli/display.js +121 -0
- package/cli/terminal-input.js +666 -0
- package/cli/wait.js +82 -0
- package/index.js +1488 -0
- package/lib/agent-process.js +170 -0
- package/lib/bridge-state.js +126 -0
- package/lib/constants.js +137 -0
- package/lib/health-monitor.js +113 -0
- package/lib/prompt-builder.js +565 -0
- package/lib/signal-watcher.js +215 -0
- package/lib/slack-helpers.js +224 -0
- package/lib/state-machines/feature-lead.js +408 -0
- package/lib/state-machines/operator-agent.js +173 -0
- package/lib/state-machines/planning-role.js +161 -0
- package/lib/state-machines/role-agent.js +186 -0
- package/lib/state-machines/team-orchestrator.js +160 -0
- package/package.json +31 -0
- package/v3/.handover-html-evidence.md +35 -0
- package/v3/KICKOFF-HTML-EVIDENCE.md +98 -0
- package/v3/PLAN-HTML-EVIDENCE-HARDENING.md +603 -0
- package/v3/adapters/desktop-adapter.js +78 -0
- package/v3/adapters/interface.js +146 -0
- package/v3/adapters/slack-adapter.js +608 -0
- package/v3/adapters/slack-helpers.js +179 -0
- package/v3/adapters/terminal-adapter.js +249 -0
- package/v3/agent-supervisor.js +320 -0
- package/v3/artifact-portal.js +1184 -0
- package/v3/bridge.db +0 -0
- package/v3/constants.js +170 -0
- package/v3/db.js +76 -0
- package/v3/file-io.js +216 -0
- package/v3/helpers.js +174 -0
- package/v3/operator.js +364 -0
- package/v3/orchestrator.js +2886 -0
- package/v3/plan-compiler.js +440 -0
- package/v3/prompt-builder.js +849 -0
- package/v3/queries.js +461 -0
- package/v3/recovery.js +508 -0
- package/v3/review-sessions.js +360 -0
- package/v3/roles/accessibility-auditor/CLAUDE.md +50 -0
- package/v3/roles/analytics-engineer/CLAUDE.md +40 -0
- package/v3/roles/architect/CLAUDE.md +809 -0
- package/v3/roles/backend-implementer/CLAUDE.md +97 -0
- package/v3/roles/code-reviewer/CLAUDE.md +89 -0
- package/v3/roles/database-implementer/CLAUDE.md +97 -0
- package/v3/roles/deployer/CLAUDE.md +42 -0
- package/v3/roles/designer/CLAUDE.md +386 -0
- package/v3/roles/documentation/CLAUDE.md +40 -0
- package/v3/roles/feature-lead/CLAUDE.md +233 -0
- package/v3/roles/frontend-implementer/CLAUDE.md +97 -0
- package/v3/roles/implementer/CLAUDE.md +97 -0
- package/v3/roles/integration-tester/CLAUDE.md +174 -0
- package/v3/roles/observability-engineer/CLAUDE.md +40 -0
- package/v3/roles/operator/CLAUDE.md +322 -0
- package/v3/roles/orchestrator/CLAUDE.md +288 -0
- package/v3/roles/package-implementer/CLAUDE.md +47 -0
- package/v3/roles/performance-analyst/CLAUDE.md +49 -0
- package/v3/roles/plan-compiler/CLAUDE.md +163 -0
- package/v3/roles/planning-lead/CLAUDE.md +41 -0
- package/v3/roles/pm/CLAUDE.md +806 -0
- package/v3/roles/regression-tester/CLAUDE.md +135 -0
- package/v3/roles/release-manager/CLAUDE.md +43 -0
- package/v3/roles/security-auditor/CLAUDE.md +90 -0
- package/v3/roles/smoke-tester/CLAUDE.md +97 -0
- package/v3/roles/test-author/CLAUDE.md +42 -0
- package/v3/roles/verifier/CLAUDE.md +90 -0
- package/v3/schema.sql +134 -0
- package/v3/slack-adapter.js +510 -0
- package/v3/slack-helpers.js +346 -0
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
// interface.js — InterfaceAdapter base class.
|
|
2
|
+
// All user-facing I/O flows through this contract.
|
|
3
|
+
// Implementations: SlackAdapter, TerminalAdapter, DesktopAdapter.
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @typedef {Object} DecisionSpec
|
|
7
|
+
* @property {string} id - Semantic ID, e.g. "gate-2-review", "plan-approval"
|
|
8
|
+
* @property {string} title - Human-readable title
|
|
9
|
+
* @property {string} [context] - Brief context text
|
|
10
|
+
* @property {string} [type] - "approval" | "choice" | "confirmation"
|
|
11
|
+
* @property {Array<{id: string, label: string, style?: string, description?: string}>} options
|
|
12
|
+
* @property {string} [reviewUrl] - URL to interactive doc review tool (qa-feedback)
|
|
13
|
+
* @property {string} [qaUrl] - URL to interactive QA testing session (qa-feedback proxy)
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
export class InterfaceAdapter {
|
|
17
|
+
// Default channel/workspace ref. Adapters set this to their primary channel.
|
|
18
|
+
// Used by orchestrator for feature disambiguation when multiple features are active.
|
|
19
|
+
planningChannel = null;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Create a feature channel/workspace. Returns an opaque channel reference string.
|
|
23
|
+
* @param {number} featureId
|
|
24
|
+
* @param {string} slug
|
|
25
|
+
* @returns {Promise<string|null>} channelRef — opaque handle (Slack channel ID, terminal slug, etc.)
|
|
26
|
+
*/
|
|
27
|
+
async createFeatureChannel(featureId, slug) {
|
|
28
|
+
throw new Error("InterfaceAdapter.createFeatureChannel() not implemented");
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Post a general message to the feature's channel.
|
|
33
|
+
* @param {number} featureId
|
|
34
|
+
* @param {string} text
|
|
35
|
+
* @returns {Promise<{ref?: string}>} Opaque message reference
|
|
36
|
+
*/
|
|
37
|
+
async postMessage(featureId, text) {
|
|
38
|
+
throw new Error("InterfaceAdapter.postMessage() not implemented");
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Post a message to the feature's parent thread (e.g. planning channel thread).
|
|
43
|
+
* @param {number} featureId
|
|
44
|
+
* @param {string} text
|
|
45
|
+
* @returns {Promise<void>}
|
|
46
|
+
*/
|
|
47
|
+
async postThreadMessage(featureId, text) {
|
|
48
|
+
throw new Error("InterfaceAdapter.postThreadMessage() not implemented");
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Post a pipeline/system status message.
|
|
53
|
+
* @param {number} featureId
|
|
54
|
+
* @param {string} text
|
|
55
|
+
* @returns {Promise<{ref?: string}>}
|
|
56
|
+
*/
|
|
57
|
+
async postPipelineMessage(featureId, text) {
|
|
58
|
+
throw new Error("InterfaceAdapter.postPipelineMessage() not implemented");
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Post an agent response (with media handling).
|
|
63
|
+
* @param {number} featureId
|
|
64
|
+
* @param {string} agentLabel - Display name of the agent
|
|
65
|
+
* @param {string} content - Raw content (may contain media markers)
|
|
66
|
+
* @returns {Promise<{ref?: string}>}
|
|
67
|
+
*/
|
|
68
|
+
async postAgentResponse(featureId, agentLabel, content) {
|
|
69
|
+
throw new Error("InterfaceAdapter.postAgentResponse() not implemented");
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Upload an artifact file.
|
|
74
|
+
* @param {number} featureId
|
|
75
|
+
* @param {string} filePath - Absolute path to file
|
|
76
|
+
* @param {string} title - Display title
|
|
77
|
+
* @returns {Promise<void>}
|
|
78
|
+
*/
|
|
79
|
+
async uploadArtifact(featureId, filePath, title) {
|
|
80
|
+
throw new Error("InterfaceAdapter.uploadArtifact() not implemented");
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Post a decision prompt (buttons/choices).
|
|
85
|
+
* @param {number} featureId
|
|
86
|
+
* @param {DecisionSpec} decision
|
|
87
|
+
* @returns {Promise<{ref?: string}>} Opaque decision message reference
|
|
88
|
+
*/
|
|
89
|
+
async postDecision(featureId, decision) {
|
|
90
|
+
throw new Error("InterfaceAdapter.postDecision() not implemented");
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Update a decision message to show resolved state.
|
|
95
|
+
* @param {number} featureId
|
|
96
|
+
* @param {string} messageRef - Opaque reference from postDecision
|
|
97
|
+
* @param {string} decisionId
|
|
98
|
+
* @param {string} selectedOption - Option ID
|
|
99
|
+
* @param {string} selectedLabel - Human label
|
|
100
|
+
* @param {string} resolvedBy - User ID
|
|
101
|
+
* @param {string} [feedback]
|
|
102
|
+
* @returns {Promise<void>}
|
|
103
|
+
*/
|
|
104
|
+
async resolveDecisionMessage(featureId, messageRef, decisionId, selectedOption, selectedLabel, resolvedBy, feedback) {
|
|
105
|
+
throw new Error("InterfaceAdapter.resolveDecisionMessage() not implemented");
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Post plan artifacts and approval decision.
|
|
110
|
+
* @param {number} featureId
|
|
111
|
+
* @param {string} planDir - Directory containing plan artifacts
|
|
112
|
+
* @returns {Promise<{ref?: string}>}
|
|
113
|
+
*/
|
|
114
|
+
async postPlanForApproval(featureId, planDir) {
|
|
115
|
+
throw new Error("InterfaceAdapter.postPlanForApproval() not implemented");
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Post feature completion message.
|
|
120
|
+
* @param {number} featureId
|
|
121
|
+
* @returns {Promise<void>}
|
|
122
|
+
*/
|
|
123
|
+
async postFeatureComplete(featureId) {
|
|
124
|
+
throw new Error("InterfaceAdapter.postFeatureComplete() not implemented");
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Add a processing indicator (e.g. :eyes: reaction).
|
|
129
|
+
* @param {number} featureId
|
|
130
|
+
* @param {string} messageRef
|
|
131
|
+
* @returns {Promise<void>}
|
|
132
|
+
*/
|
|
133
|
+
async markProcessing(featureId, messageRef) {
|
|
134
|
+
// Optional — default no-op
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Clear a processing indicator.
|
|
139
|
+
* @param {number} featureId
|
|
140
|
+
* @param {string} messageRef
|
|
141
|
+
* @returns {Promise<void>}
|
|
142
|
+
*/
|
|
143
|
+
async clearProcessing(featureId, messageRef) {
|
|
144
|
+
// Optional — default no-op
|
|
145
|
+
}
|
|
146
|
+
}
|