chati-dev 1.4.0 → 2.0.2
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 +40 -24
- package/framework/agents/build/dev.md +343 -0
- package/framework/agents/clarity/architect.md +112 -0
- package/framework/agents/clarity/brief.md +182 -0
- package/framework/agents/clarity/brownfield-wu.md +181 -0
- package/framework/agents/clarity/detail.md +110 -0
- package/framework/agents/clarity/greenfield-wu.md +153 -0
- package/framework/agents/clarity/ux.md +112 -0
- package/framework/config.yaml +3 -3
- package/framework/constitution.md +31 -1
- package/framework/context/governance.md +37 -0
- package/framework/context/protocols.md +34 -0
- package/framework/context/quality.md +27 -0
- package/framework/context/root.md +24 -0
- package/framework/data/entity-registry.yaml +1 -1
- package/framework/domains/agents/architect.yaml +51 -0
- package/framework/domains/agents/brief.yaml +47 -0
- package/framework/domains/agents/brownfield-wu.yaml +49 -0
- package/framework/domains/agents/detail.yaml +47 -0
- package/framework/domains/agents/dev.yaml +49 -0
- package/framework/domains/agents/devops.yaml +43 -0
- package/framework/domains/agents/greenfield-wu.yaml +47 -0
- package/framework/domains/agents/orchestrator.yaml +49 -0
- package/framework/domains/agents/phases.yaml +47 -0
- package/framework/domains/agents/qa-implementation.yaml +43 -0
- package/framework/domains/agents/qa-planning.yaml +44 -0
- package/framework/domains/agents/tasks.yaml +48 -0
- package/framework/domains/agents/ux.yaml +50 -0
- package/framework/domains/constitution.yaml +77 -0
- package/framework/domains/global.yaml +64 -0
- package/framework/domains/workflows/brownfield-discovery.yaml +16 -0
- package/framework/domains/workflows/brownfield-fullstack.yaml +26 -0
- package/framework/domains/workflows/brownfield-service.yaml +22 -0
- package/framework/domains/workflows/brownfield-ui.yaml +22 -0
- package/framework/domains/workflows/greenfield-fullstack.yaml +26 -0
- package/framework/hooks/constitution-guard.js +101 -0
- package/framework/hooks/mode-governance.js +92 -0
- package/framework/hooks/model-governance.js +76 -0
- package/framework/hooks/prism-engine.js +89 -0
- package/framework/hooks/session-digest.js +60 -0
- package/framework/hooks/settings.json +44 -0
- package/framework/i18n/en.yaml +3 -3
- package/framework/i18n/es.yaml +3 -3
- package/framework/i18n/fr.yaml +3 -3
- package/framework/i18n/pt.yaml +3 -3
- package/framework/intelligence/decision-engine.md +1 -1
- package/framework/migrations/v1.4-to-v2.0.yaml +167 -0
- package/framework/migrations/v2.0-to-v2.0.1.yaml +132 -0
- package/framework/orchestrator/chati.md +284 -6
- package/framework/tasks/architect-api-design.md +63 -0
- package/framework/tasks/architect-consolidate.md +47 -0
- package/framework/tasks/architect-db-design.md +73 -0
- package/framework/tasks/architect-design.md +95 -0
- package/framework/tasks/architect-security-review.md +62 -0
- package/framework/tasks/architect-stack-selection.md +53 -0
- package/framework/tasks/brief-consolidate.md +249 -0
- package/framework/tasks/brief-constraint-identify.md +277 -0
- package/framework/tasks/brief-extract-requirements.md +339 -0
- package/framework/tasks/brief-stakeholder-map.md +176 -0
- package/framework/tasks/brief-validate-completeness.md +121 -0
- package/framework/tasks/brownfield-wu-architecture-map.md +394 -0
- package/framework/tasks/brownfield-wu-deep-discovery.md +312 -0
- package/framework/tasks/brownfield-wu-dependency-scan.md +359 -0
- package/framework/tasks/brownfield-wu-migration-plan.md +483 -0
- package/framework/tasks/brownfield-wu-report.md +325 -0
- package/framework/tasks/brownfield-wu-risk-assess.md +424 -0
- package/framework/tasks/detail-acceptance-criteria.md +372 -0
- package/framework/tasks/detail-consolidate.md +138 -0
- package/framework/tasks/detail-edge-case-analysis.md +300 -0
- package/framework/tasks/detail-expand-prd.md +389 -0
- package/framework/tasks/detail-nfr-extraction.md +223 -0
- package/framework/tasks/dev-code-review.md +404 -0
- package/framework/tasks/dev-consolidate.md +543 -0
- package/framework/tasks/dev-debug.md +322 -0
- package/framework/tasks/dev-implement.md +252 -0
- package/framework/tasks/dev-iterate.md +411 -0
- package/framework/tasks/dev-pr-prepare.md +497 -0
- package/framework/tasks/dev-refactor.md +342 -0
- package/framework/tasks/dev-test-write.md +306 -0
- package/framework/tasks/devops-ci-setup.md +412 -0
- package/framework/tasks/devops-consolidate.md +712 -0
- package/framework/tasks/devops-deploy-config.md +598 -0
- package/framework/tasks/devops-monitoring-setup.md +658 -0
- package/framework/tasks/devops-release-prepare.md +673 -0
- package/framework/tasks/greenfield-wu-analyze-empty.md +169 -0
- package/framework/tasks/greenfield-wu-report.md +266 -0
- package/framework/tasks/greenfield-wu-scaffold-detection.md +203 -0
- package/framework/tasks/greenfield-wu-tech-stack-assess.md +255 -0
- package/framework/tasks/orchestrator-deviation.md +260 -0
- package/framework/tasks/orchestrator-escalate.md +276 -0
- package/framework/tasks/orchestrator-handoff.md +243 -0
- package/framework/tasks/orchestrator-health.md +372 -0
- package/framework/tasks/orchestrator-mode-switch.md +262 -0
- package/framework/tasks/orchestrator-resume.md +189 -0
- package/framework/tasks/orchestrator-route.md +169 -0
- package/framework/tasks/orchestrator-spawn-terminal.md +358 -0
- package/framework/tasks/orchestrator-status.md +260 -0
- package/framework/tasks/orchestrator-suggest-mode.md +372 -0
- package/framework/tasks/phases-breakdown.md +91 -0
- package/framework/tasks/phases-dependency-mapping.md +67 -0
- package/framework/tasks/phases-mvp-scoping.md +94 -0
- package/framework/tasks/qa-impl-consolidate.md +522 -0
- package/framework/tasks/qa-impl-performance-test.md +487 -0
- package/framework/tasks/qa-impl-regression-check.md +413 -0
- package/framework/tasks/qa-impl-sast-scan.md +402 -0
- package/framework/tasks/qa-impl-test-execute.md +344 -0
- package/framework/tasks/qa-impl-verdict.md +339 -0
- package/framework/tasks/qa-planning-consolidate.md +309 -0
- package/framework/tasks/qa-planning-coverage-plan.md +338 -0
- package/framework/tasks/qa-planning-gate-define.md +339 -0
- package/framework/tasks/qa-planning-risk-matrix.md +631 -0
- package/framework/tasks/qa-planning-test-strategy.md +217 -0
- package/framework/tasks/tasks-acceptance-write.md +75 -0
- package/framework/tasks/tasks-consolidate.md +57 -0
- package/framework/tasks/tasks-decompose.md +80 -0
- package/framework/tasks/tasks-estimate.md +66 -0
- package/framework/tasks/ux-a11y-check.md +49 -0
- package/framework/tasks/ux-component-map.md +55 -0
- package/framework/tasks/ux-consolidate.md +46 -0
- package/framework/tasks/ux-user-flow.md +46 -0
- package/framework/tasks/ux-wireframe.md +76 -0
- package/package.json +2 -2
- package/scripts/bundle-framework.js +2 -0
- package/scripts/changelog-generator.js +222 -0
- package/scripts/codebase-mapper.js +728 -0
- package/scripts/commit-message-generator.js +167 -0
- package/scripts/coverage-analyzer.js +260 -0
- package/scripts/dependency-analyzer.js +280 -0
- package/scripts/framework-analyzer.js +308 -0
- package/scripts/generate-constitution-domain.js +253 -0
- package/scripts/health-check.js +481 -0
- package/scripts/ide-sync.js +327 -0
- package/scripts/performance-analyzer.js +325 -0
- package/scripts/plan-tracker.js +278 -0
- package/scripts/populate-entity-registry.js +481 -0
- package/scripts/pr-review.js +317 -0
- package/scripts/rollback-manager.js +310 -0
- package/scripts/stuck-detector.js +343 -0
- package/scripts/test-quality-assessment.js +257 -0
- package/scripts/validate-agents.js +367 -0
- package/scripts/validate-tasks.js +465 -0
- package/src/autonomy/autonomous-gate.js +293 -0
- package/src/autonomy/index.js +51 -0
- package/src/autonomy/mode-manager.js +225 -0
- package/src/autonomy/mode-suggester.js +283 -0
- package/src/autonomy/progress-reporter.js +268 -0
- package/src/autonomy/safety-net.js +320 -0
- package/src/context/bracket-tracker.js +79 -0
- package/src/context/domain-loader.js +107 -0
- package/src/context/engine.js +144 -0
- package/src/context/formatter.js +184 -0
- package/src/context/index.js +4 -0
- package/src/context/layers/l0-constitution.js +28 -0
- package/src/context/layers/l1-global.js +37 -0
- package/src/context/layers/l2-agent.js +39 -0
- package/src/context/layers/l3-workflow.js +42 -0
- package/src/context/layers/l4-task.js +24 -0
- package/src/decision/analyzer.js +167 -0
- package/src/decision/engine.js +270 -0
- package/src/decision/index.js +38 -0
- package/src/decision/registry-healer.js +450 -0
- package/src/decision/registry-updater.js +330 -0
- package/src/gates/circuit-breaker.js +119 -0
- package/src/gates/g1-planning-complete.js +153 -0
- package/src/gates/g2-qa-planning.js +153 -0
- package/src/gates/g3-implementation.js +188 -0
- package/src/gates/g4-qa-implementation.js +207 -0
- package/src/gates/g5-deploy-ready.js +180 -0
- package/src/gates/gate-base.js +144 -0
- package/src/gates/index.js +46 -0
- package/src/installer/brownfield-upgrader.js +249 -0
- package/src/installer/core.js +82 -11
- package/src/installer/file-hasher.js +51 -0
- package/src/installer/manifest.js +117 -0
- package/src/installer/templates.js +17 -15
- package/src/installer/transaction.js +229 -0
- package/src/installer/validator.js +18 -1
- package/src/intelligence/registry-manager.js +2 -2
- package/src/memory/agent-memory.js +255 -0
- package/src/memory/gotchas-injector.js +72 -0
- package/src/memory/gotchas.js +361 -0
- package/src/memory/index.js +35 -0
- package/src/memory/search.js +233 -0
- package/src/memory/session-digest.js +239 -0
- package/src/merger/env-merger.js +112 -0
- package/src/merger/index.js +56 -0
- package/src/merger/replace-merger.js +51 -0
- package/src/merger/yaml-merger.js +127 -0
- package/src/orchestrator/agent-selector.js +285 -0
- package/src/orchestrator/deviation-handler.js +350 -0
- package/src/orchestrator/handoff-engine.js +271 -0
- package/src/orchestrator/index.js +67 -0
- package/src/orchestrator/intent-classifier.js +264 -0
- package/src/orchestrator/pipeline-manager.js +492 -0
- package/src/orchestrator/pipeline-state.js +223 -0
- package/src/orchestrator/session-manager.js +409 -0
- package/src/tasks/executor.js +195 -0
- package/src/tasks/handoff.js +226 -0
- package/src/tasks/index.js +4 -0
- package/src/tasks/loader.js +210 -0
- package/src/tasks/router.js +182 -0
- package/src/terminal/collector.js +216 -0
- package/src/terminal/index.js +30 -0
- package/src/terminal/isolation.js +129 -0
- package/src/terminal/monitor.js +277 -0
- package/src/terminal/spawner.js +269 -0
- package/src/upgrade/checker.js +1 -1
- package/src/wizard/i18n.js +3 -3
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Terminal spawner for multi-agent parallel execution.
|
|
3
|
+
*
|
|
4
|
+
* Spawns separate Claude Code CLI processes so that multiple agents
|
|
5
|
+
* can work concurrently. The heavy lifting is split into pure,
|
|
6
|
+
* testable helpers (buildSpawnCommand) and a thin runtime layer
|
|
7
|
+
* (spawnTerminal) that actually calls child_process.spawn.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { spawn } from 'child_process';
|
|
11
|
+
import { validateWriteScopes, buildIsolationEnv } from './isolation.js';
|
|
12
|
+
|
|
13
|
+
// ---------------------------------------------------------------------------
|
|
14
|
+
// Helpers
|
|
15
|
+
// ---------------------------------------------------------------------------
|
|
16
|
+
|
|
17
|
+
let _counter = 0;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Generate a unique terminal identifier.
|
|
21
|
+
*
|
|
22
|
+
* @param {string} agent - Agent name
|
|
23
|
+
* @returns {string} Unique ID in the form "agent-<timestamp>-<counter>"
|
|
24
|
+
*/
|
|
25
|
+
function generateTerminalId(agent) {
|
|
26
|
+
_counter += 1;
|
|
27
|
+
return `${agent}-${Date.now()}-${_counter}`;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Reset the internal counter (useful in tests).
|
|
32
|
+
*/
|
|
33
|
+
export function _resetCounter() {
|
|
34
|
+
_counter = 0;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// ---------------------------------------------------------------------------
|
|
38
|
+
// Public API
|
|
39
|
+
// ---------------------------------------------------------------------------
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* @typedef {object} SpawnConfig
|
|
43
|
+
* @property {string} agent - Agent name (e.g. "architect")
|
|
44
|
+
* @property {string} taskId - Task identifier
|
|
45
|
+
* @property {object} [contextPayload] - Context to inject via env var
|
|
46
|
+
* @property {string[]} [writeScope] - Override write scope
|
|
47
|
+
* @property {string} [workingDir] - Working directory for the process
|
|
48
|
+
* @property {number} [timeout] - Max execution time in ms
|
|
49
|
+
*/
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* @typedef {object} TerminalHandle
|
|
53
|
+
* @property {string} id - Unique terminal ID
|
|
54
|
+
* @property {object|null} process - child_process.ChildProcess (null when dry)
|
|
55
|
+
* @property {string} agent - Agent name
|
|
56
|
+
* @property {string} taskId - Task identifier
|
|
57
|
+
* @property {string} startedAt - ISO timestamp
|
|
58
|
+
* @property {string} status - "running" | "exited" | "killed"
|
|
59
|
+
* @property {number|null} exitCode - Process exit code (null while running)
|
|
60
|
+
* @property {string[]} stdout - Captured stdout lines
|
|
61
|
+
* @property {string[]} stderr - Captured stderr lines
|
|
62
|
+
* @property {number} timeout - Max execution time in ms
|
|
63
|
+
*/
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Build the CLI command, arguments and environment for spawning a
|
|
67
|
+
* Claude Code terminal. This is a **pure function** -- it does not
|
|
68
|
+
* perform any I/O and is therefore fully testable in isolation.
|
|
69
|
+
*
|
|
70
|
+
* @param {SpawnConfig} config
|
|
71
|
+
* @returns {{ command: string, args: string[], env: Record<string, string> }}
|
|
72
|
+
*/
|
|
73
|
+
export function buildSpawnCommand(config) {
|
|
74
|
+
if (!config || typeof config !== 'object') {
|
|
75
|
+
throw new Error('buildSpawnCommand requires a config object');
|
|
76
|
+
}
|
|
77
|
+
if (!config.agent || typeof config.agent !== 'string') {
|
|
78
|
+
throw new Error('config.agent is required and must be a string');
|
|
79
|
+
}
|
|
80
|
+
if (!config.taskId || typeof config.taskId !== 'string') {
|
|
81
|
+
throw new Error('config.taskId is required and must be a string');
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
const terminalId = generateTerminalId(config.agent);
|
|
85
|
+
const isolationEnv = buildIsolationEnv(config.agent);
|
|
86
|
+
|
|
87
|
+
const env = {
|
|
88
|
+
...isolationEnv,
|
|
89
|
+
CHATI_TERMINAL_ID: terminalId,
|
|
90
|
+
CHATI_AGENT: config.agent,
|
|
91
|
+
CHATI_TASK_ID: config.taskId,
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
if (config.contextPayload) {
|
|
95
|
+
try {
|
|
96
|
+
env.CHATI_CONTEXT = JSON.stringify(config.contextPayload);
|
|
97
|
+
} catch {
|
|
98
|
+
env.CHATI_CONTEXT = '{}';
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// Build the prompt that will be sent to claude CLI
|
|
103
|
+
const prompt = `Execute task ${config.taskId} as agent ${config.agent}. ` +
|
|
104
|
+
`Write scope: ${isolationEnv.CHATI_WRITE_SCOPE || 'none'}. ` +
|
|
105
|
+
`Terminal ID: ${terminalId}.`;
|
|
106
|
+
|
|
107
|
+
const command = 'claude';
|
|
108
|
+
const args = [
|
|
109
|
+
'--print',
|
|
110
|
+
'--dangerously-skip-permissions',
|
|
111
|
+
prompt,
|
|
112
|
+
];
|
|
113
|
+
|
|
114
|
+
return { command, args, env, terminalId };
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Spawn a new terminal process for an agent task.
|
|
119
|
+
*
|
|
120
|
+
* @param {SpawnConfig} config
|
|
121
|
+
* @returns {TerminalHandle}
|
|
122
|
+
*/
|
|
123
|
+
export function spawnTerminal(config) {
|
|
124
|
+
const { command, args, env, terminalId } = buildSpawnCommand(config);
|
|
125
|
+
|
|
126
|
+
const cwd = config.workingDir || process.cwd();
|
|
127
|
+
const timeout = config.timeout || 300_000; // default 5 minutes
|
|
128
|
+
|
|
129
|
+
const child = spawn(command, args, {
|
|
130
|
+
cwd,
|
|
131
|
+
env: { ...process.env, ...env },
|
|
132
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
/** @type {TerminalHandle} */
|
|
136
|
+
const handle = {
|
|
137
|
+
id: terminalId,
|
|
138
|
+
process: child,
|
|
139
|
+
agent: config.agent,
|
|
140
|
+
taskId: config.taskId,
|
|
141
|
+
startedAt: new Date().toISOString(),
|
|
142
|
+
status: 'running',
|
|
143
|
+
exitCode: null,
|
|
144
|
+
stdout: [],
|
|
145
|
+
stderr: [],
|
|
146
|
+
timeout,
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
// Capture output
|
|
150
|
+
if (child.stdout) {
|
|
151
|
+
child.stdout.on('data', (chunk) => {
|
|
152
|
+
handle.stdout.push(chunk.toString());
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
if (child.stderr) {
|
|
156
|
+
child.stderr.on('data', (chunk) => {
|
|
157
|
+
handle.stderr.push(chunk.toString());
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
child.on('exit', (code) => {
|
|
162
|
+
handle.status = 'exited';
|
|
163
|
+
handle.exitCode = code;
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
child.on('error', (err) => {
|
|
167
|
+
handle.status = 'exited';
|
|
168
|
+
handle.exitCode = -1;
|
|
169
|
+
handle.stderr.push(`spawn error: ${err.message}`);
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
return handle;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Spawn a group of terminals concurrently.
|
|
177
|
+
* Validates write scopes before spawning to prevent conflicts.
|
|
178
|
+
*
|
|
179
|
+
* @param {SpawnConfig[]} configs
|
|
180
|
+
* @returns {{ groupId: string, terminals: TerminalHandle[], startedAt: string }}
|
|
181
|
+
* @throws {Error} When write scope conflicts are detected
|
|
182
|
+
*/
|
|
183
|
+
export function spawnParallelGroup(configs) {
|
|
184
|
+
if (!Array.isArray(configs) || configs.length === 0) {
|
|
185
|
+
throw new Error('spawnParallelGroup requires a non-empty array of configs');
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
const validation = validateWriteScopes(configs);
|
|
189
|
+
if (!validation.valid) {
|
|
190
|
+
const details = validation.conflicts
|
|
191
|
+
.map(c => `${c.agents.join(' vs ')} on ${c.path}`)
|
|
192
|
+
.join('; ');
|
|
193
|
+
throw new Error(`Write scope conflicts detected: ${details}`);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
const groupId = `group-${Date.now()}`;
|
|
197
|
+
const terminals = configs.map(cfg => spawnTerminal(cfg));
|
|
198
|
+
|
|
199
|
+
return {
|
|
200
|
+
groupId,
|
|
201
|
+
terminals,
|
|
202
|
+
startedAt: new Date().toISOString(),
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Gracefully kill a spawned terminal.
|
|
208
|
+
* Sends SIGTERM first; if the process is still alive after 5 seconds,
|
|
209
|
+
* escalates to SIGKILL.
|
|
210
|
+
*
|
|
211
|
+
* @param {TerminalHandle} handle
|
|
212
|
+
* @returns {Promise<{ killed: boolean, exitCode: number|null }>}
|
|
213
|
+
*/
|
|
214
|
+
export function killTerminal(handle) {
|
|
215
|
+
if (!handle || !handle.process) {
|
|
216
|
+
return Promise.resolve({ killed: false, exitCode: handle?.exitCode ?? null });
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
if (handle.status === 'exited') {
|
|
220
|
+
return Promise.resolve({ killed: false, exitCode: handle.exitCode });
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
return new Promise((resolve) => {
|
|
224
|
+
const forceKillTimer = setTimeout(() => {
|
|
225
|
+
try {
|
|
226
|
+
handle.process.kill('SIGKILL');
|
|
227
|
+
} catch {
|
|
228
|
+
// already dead -- ignore
|
|
229
|
+
}
|
|
230
|
+
}, 5000);
|
|
231
|
+
|
|
232
|
+
handle.process.once('exit', (code) => {
|
|
233
|
+
clearTimeout(forceKillTimer);
|
|
234
|
+
handle.status = 'killed';
|
|
235
|
+
handle.exitCode = code;
|
|
236
|
+
resolve({ killed: true, exitCode: code });
|
|
237
|
+
});
|
|
238
|
+
|
|
239
|
+
try {
|
|
240
|
+
handle.process.kill('SIGTERM');
|
|
241
|
+
} catch {
|
|
242
|
+
clearTimeout(forceKillTimer);
|
|
243
|
+
handle.status = 'killed';
|
|
244
|
+
resolve({ killed: false, exitCode: handle.exitCode });
|
|
245
|
+
}
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* Return the current status snapshot of a terminal.
|
|
251
|
+
*
|
|
252
|
+
* @param {TerminalHandle} handle
|
|
253
|
+
* @returns {{ id: string, agent: string, status: string, elapsed: number, exitCode: number|null }}
|
|
254
|
+
*/
|
|
255
|
+
export function getTerminalStatus(handle) {
|
|
256
|
+
if (!handle) {
|
|
257
|
+
return { id: 'unknown', agent: 'unknown', status: 'unknown', elapsed: 0, exitCode: null };
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
const elapsed = Date.now() - new Date(handle.startedAt).getTime();
|
|
261
|
+
|
|
262
|
+
return {
|
|
263
|
+
id: handle.id,
|
|
264
|
+
agent: handle.agent,
|
|
265
|
+
status: handle.status,
|
|
266
|
+
elapsed,
|
|
267
|
+
exitCode: handle.exitCode,
|
|
268
|
+
};
|
|
269
|
+
}
|
package/src/upgrade/checker.js
CHANGED
|
@@ -61,7 +61,7 @@ export async function checkForUpdate(targetDir, cliVersion) {
|
|
|
61
61
|
|
|
62
62
|
/**
|
|
63
63
|
* Get changelog between versions
|
|
64
|
-
* In v1, returns placeholder. Future: read from CHANGELOG.md or API
|
|
64
|
+
* In v1, returns placeholder. Future: read from docs/CHANGELOG.md or API
|
|
65
65
|
*/
|
|
66
66
|
function getChangelog(fromVersion, toVersion) {
|
|
67
67
|
return [
|
package/src/wizard/i18n.js
CHANGED
|
@@ -26,7 +26,7 @@ const FALLBACK_EN = {
|
|
|
26
26
|
agents_count: '13 agent definitions (CLARITY, BUILD, DEPLOY phases)',
|
|
27
27
|
workflows_count: '5 workflow blueprints',
|
|
28
28
|
templates_count: '5 templates (PRD, Brownfield PRD, Architecture, Task, QA Gate)',
|
|
29
|
-
constitution: 'Constitution (
|
|
29
|
+
constitution: 'Constitution (17 Articles + Preamble)',
|
|
30
30
|
session_mgmt: 'Session management system',
|
|
31
31
|
quality_gates: 'Quality gates (4-tier validation)',
|
|
32
32
|
proceed: 'Proceed with installation?',
|
|
@@ -34,7 +34,7 @@ const FALLBACK_EN = {
|
|
|
34
34
|
created_chati: 'Created .chati/ session directory',
|
|
35
35
|
created_framework: 'Created chati.dev/ system directory (agents, templates, workflows)',
|
|
36
36
|
created_commands: 'Created .claude/commands/ (thin router)',
|
|
37
|
-
installed_constitution: 'Installed Constitution (Articles I-
|
|
37
|
+
installed_constitution: 'Installed Constitution (Articles I-XVII)',
|
|
38
38
|
created_session: 'Created session.yaml schema',
|
|
39
39
|
created_claude_md: 'Created CLAUDE.md',
|
|
40
40
|
configured_mcps: 'Configured MCPs:',
|
|
@@ -42,7 +42,7 @@ const FALLBACK_EN = {
|
|
|
42
42
|
agents_valid: 'All 13 agents implement 8 protocols',
|
|
43
43
|
handoff_ok: 'Handoff protocol: OK',
|
|
44
44
|
validation_ok: 'Self-validation criteria: OK',
|
|
45
|
-
constitution_ok: 'Constitution:
|
|
45
|
+
constitution_ok: 'Constitution: 17 articles verified',
|
|
46
46
|
created_memories: 'Created .chati/memories/ (Memory Layer)',
|
|
47
47
|
installed_intelligence: 'Installed Intelligence Layer (Context Engine, Memory, Registry)',
|
|
48
48
|
intelligence_valid: 'Intelligence: 6 spec files verified',
|