ai-engineering-loop 2.10.1 → 2.12.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/.agents/skills/ael/references/loop-commands.md +2 -0
- package/.agents/skills/ael/references/loop-deliver.md +1 -0
- package/.agents/skills/ael/references/loop-goal.md +1 -0
- package/.agents/skills/ael/references/loop-risky.md +1 -0
- package/.claude/agents/devil-advocate.md +2 -1
- package/.claude/agents/judge.md +2 -0
- package/.grok/agents/devil-advocate.md +2 -1
- package/.grok/agents/judge.md +2 -0
- package/CHANGELOG.md +24 -0
- package/README.md +80 -75
- package/agents/shared/devil-advocate.body.md +2 -1
- package/agents/shared/judge.body.md +2 -0
- package/bin/ai-engineering-loop.js +153 -5
- package/core/goal-contract.md +4 -0
- package/core/iteration-policy.md +4 -0
- package/core/run-isolation.md +55 -0
- package/core/verification-loop.md +25 -0
- package/docs/images/ael-hero.svg +19 -0
- package/docs/images/readme-banner.png +0 -0
- package/docs/images/social-preview.png +0 -0
- package/docs/images/studio-hero-orange.svg +136 -0
- package/lib/ablation.js +1 -1
- package/lib/cli-args.js +5 -2
- package/lib/finding-proofs.js +72 -0
- package/lib/gates.js +21 -0
- package/lib/harness-audit.js +20 -0
- package/lib/interventions.js +56 -0
- package/lib/measurements.js +51 -0
- package/lib/orchestration.js +1 -0
- package/lib/recap-html.js +2 -2
- package/lib/recap.js +2 -0
- package/lib/rules.js +51 -1
- package/lib/run-isolation.js +293 -0
- package/lib/run-state.js +2 -1
- package/lib/safety-fact.js +64 -0
- package/lib/stats.js +9 -0
- package/lib/verification-lanes.js +23 -0
- package/package.json +1 -1
- package/schemas/goal-contract.schema.json +4 -0
|
@@ -14,7 +14,7 @@ const fs = require('fs');
|
|
|
14
14
|
const os = require('os');
|
|
15
15
|
const path = require('path');
|
|
16
16
|
const { readJsonOptional, sha256: sha256Text } = require('../lib/fsutil.js');
|
|
17
|
-
const { execSync, spawn } = require('child_process');
|
|
17
|
+
const { execSync, spawn, spawnSync } = require('child_process');
|
|
18
18
|
|
|
19
19
|
// Command modules load on first use, so a hot path such as
|
|
20
20
|
// `guard check --hook` (run before every tool call) loads only what it
|
|
@@ -929,6 +929,8 @@ function statusJson() {
|
|
|
929
929
|
result.activeRun = { runId: activeRun.runId, state: activeRun.state, updatedAt: activeRun.updatedAt || null, stale: info.stale, idleDays: info.idleDays };
|
|
930
930
|
if (info.stale) result.activeRun.hint = require('../lib/run-abandon.js').abandonCommand(activeRun.runId);
|
|
931
931
|
}
|
|
932
|
+
const worktreeHint = require('../lib/run-isolation.js').pruneHint(CWD);
|
|
933
|
+
if (worktreeHint) result.worktreeHint = worktreeHint;
|
|
932
934
|
}
|
|
933
935
|
}
|
|
934
936
|
return result;
|
|
@@ -976,6 +978,8 @@ function handleStatus() {
|
|
|
976
978
|
const hint = staleRunHint(activeRun);
|
|
977
979
|
if (hint) log.warn(` ${hint}`);
|
|
978
980
|
}
|
|
981
|
+
const worktreeHint = require('../lib/run-isolation.js').pruneHint(CWD);
|
|
982
|
+
if (worktreeHint) log.warn(`- ${worktreeHint}`);
|
|
979
983
|
|
|
980
984
|
const hosts = hostSkillStatus({ home: homeDir(), version: VERSION });
|
|
981
985
|
if (hosts.stale) {
|
|
@@ -1298,6 +1302,65 @@ function workingTreePaths(rootDir) {
|
|
|
1298
1302
|
// `run --abandon [--run <id>] --reason <text> --by <name> [--yes] [--json]`
|
|
1299
1303
|
// (issue #46). ASSISTED asks for confirmation (or --yes); UNATTENDED runs are
|
|
1300
1304
|
// refused unless a human passes --yes. Terminal runs exit 2.
|
|
1305
|
+
function startWorktreeRun(task, runArgs, runJson, realLog) {
|
|
1306
|
+
const isolation = require('../lib/run-isolation.js');
|
|
1307
|
+
try {
|
|
1308
|
+
const worktree = isolation.createWorktree(CWD, { task });
|
|
1309
|
+
const passthrough = [];
|
|
1310
|
+
for (const flag of ['--mode', '--recipe', '--tier', '--tier-reason']) {
|
|
1311
|
+
const value = argValue(flag);
|
|
1312
|
+
if (value != null) passthrough.push(flag, value);
|
|
1313
|
+
}
|
|
1314
|
+
const child = spawnSync(process.execPath, [process.argv[1], 'run', '--json', ...passthrough, task], { cwd: worktree.path, encoding: 'utf8', env: process.env });
|
|
1315
|
+
let started;
|
|
1316
|
+
try {
|
|
1317
|
+
started = JSON.parse(String(child.stdout || '').slice(String(child.stdout || '').indexOf('{')));
|
|
1318
|
+
} catch {
|
|
1319
|
+
started = { ok: false, error: (child.stderr || child.stdout || 'run did not start').trim() };
|
|
1320
|
+
}
|
|
1321
|
+
if (!started.ok) throw Object.assign(new Error(`Worktree created at ${worktree.path}, but the Run did not start: ${started.error}`), { code: started.code || 'RUN_FAILED' });
|
|
1322
|
+
isolation.registerWorktree(worktree.mainRoot, { runId: started.runId, path: worktree.path, branch: worktree.branch, base: worktree.base, task, state: 'active', createdAt: new Date().toISOString() });
|
|
1323
|
+
const result = { ...started, worktree: { path: worktree.path, branch: worktree.branch, mainCheckout: worktree.mainRoot }, next: `Work only in ${worktree.path} for this Run.` };
|
|
1324
|
+
if (runJson) realLog(JSON.stringify(result, null, 2));
|
|
1325
|
+
else {
|
|
1326
|
+
console.log = realLog;
|
|
1327
|
+
log.success(`✓ Run ${started.runId} started in a new worktree`);
|
|
1328
|
+
console.log(`- Path: ${worktree.path}`);
|
|
1329
|
+
console.log(`- Branch: ${worktree.branch} (from ${worktree.base.slice(0, 12)})`);
|
|
1330
|
+
console.log(`- Work only in that folder for this Run. After deliver, Stage 9 removes the worktree when it is clean.`);
|
|
1331
|
+
}
|
|
1332
|
+
} catch (err) {
|
|
1333
|
+
console.log = realLog;
|
|
1334
|
+
if (runJson) realLog(JSON.stringify({ ok: false, code: err.code || 'RUN_FAILED', error: err.message }));
|
|
1335
|
+
else log.error(err.message);
|
|
1336
|
+
process.exit(1);
|
|
1337
|
+
}
|
|
1338
|
+
}
|
|
1339
|
+
|
|
1340
|
+
function handleWorktree() {
|
|
1341
|
+
const json = process.argv.includes('--json');
|
|
1342
|
+
const isolation = require('../lib/run-isolation.js');
|
|
1343
|
+
try {
|
|
1344
|
+
if (args[1] !== 'prune') throw Object.assign(new Error('Use: worktree prune [--yes] [--json]'), { code: 'INVALID_USAGE' });
|
|
1345
|
+
if (!process.argv.includes('--yes')) {
|
|
1346
|
+
const { plan } = isolation.planPrune(CWD);
|
|
1347
|
+
if (json) console.log(JSON.stringify({ ok: true, applied: false, plan }, null, 2));
|
|
1348
|
+
else if (!plan.length) log.success('✓ No AEL worktree needs cleanup');
|
|
1349
|
+
else {
|
|
1350
|
+
for (const row of plan) console.log(`- ${row.path} [${row.runState || 'unknown'}]: ${[...row.actions, ...row.notes].join('; ')}`);
|
|
1351
|
+
console.log('Apply with: ai-engineering-loop worktree prune --yes (uncommitted or unmerged work is never removed)');
|
|
1352
|
+
}
|
|
1353
|
+
return;
|
|
1354
|
+
}
|
|
1355
|
+
const result = isolation.applyPrune(CWD);
|
|
1356
|
+
if (json) console.log(JSON.stringify({ ok: true, applied: true, ...result }, null, 2));
|
|
1357
|
+
else if (!result.done.length) log.success('✓ Nothing to clean up');
|
|
1358
|
+
else for (const item of result.done) console.log(`✓ ${item.action}: ${item.path}`);
|
|
1359
|
+
} catch (err) {
|
|
1360
|
+
stageJsonError(err, json, 'WORKTREE_FAILED');
|
|
1361
|
+
}
|
|
1362
|
+
}
|
|
1363
|
+
|
|
1301
1364
|
function handleRunAbandon() {
|
|
1302
1365
|
const json = process.argv.includes('--json');
|
|
1303
1366
|
const yes = process.argv.includes('--yes');
|
|
@@ -1310,6 +1373,10 @@ function handleRunAbandon() {
|
|
|
1310
1373
|
try {
|
|
1311
1374
|
const plan = runAbandon.planAbandon(CWD, { runId: argValue('--run'), reason: argValue('--reason'), by: argValue('--by') });
|
|
1312
1375
|
const { run } = plan;
|
|
1376
|
+
const activity = require('../lib/run-isolation.js').runActivity(CWD, run);
|
|
1377
|
+
if (activity.live && !process.argv.includes('--force-live')) {
|
|
1378
|
+
throw Object.assign(new Error(`Run ${run.runId} was active ${activity.idleMinutes} minute(s) ago; another session may still be working on it. Add --force-live only if you are sure, or start this task in a worktree: run --worktree "<task>".`), { code: 'RUN_LIVE' });
|
|
1379
|
+
}
|
|
1313
1380
|
if (run.mode === 'UNATTENDED' && !yes) {
|
|
1314
1381
|
throw Object.assign(new Error(`Run ${run.runId} is UNATTENDED. Agents must not abandon it; a human can re-run with --yes.`), { code: 'UNATTENDED_REQUIRES_HUMAN', exitCode: 2 });
|
|
1315
1382
|
}
|
|
@@ -1381,7 +1448,7 @@ function handleRun() {
|
|
|
1381
1448
|
const tierReasonArg = argValue('--tier-reason');
|
|
1382
1449
|
const taskParts = [];
|
|
1383
1450
|
for (let index = 0; index < runArgs.length; index++) {
|
|
1384
|
-
if (
|
|
1451
|
+
if (['--new', '--json', '--worktree'].includes(runArgs[index])) continue;
|
|
1385
1452
|
if (['--mode', '--recipe', '--tier', '--tier-reason'].includes(runArgs[index])) {
|
|
1386
1453
|
index += 1;
|
|
1387
1454
|
continue;
|
|
@@ -1389,9 +1456,16 @@ function handleRun() {
|
|
|
1389
1456
|
taskParts.push(runArgs[index]);
|
|
1390
1457
|
}
|
|
1391
1458
|
const task = taskParts.join(' ').trim();
|
|
1459
|
+
if (runArgs.includes('--worktree')) return startWorktreeRun(task, runArgs, runJson, realLog);
|
|
1392
1460
|
let runResult;
|
|
1393
1461
|
try {
|
|
1394
1462
|
const current = getCurrentRun(CWD);
|
|
1463
|
+
if (!forceNew) {
|
|
1464
|
+
const conflict = require('../lib/run-isolation.js').runConflict(CWD, current, task);
|
|
1465
|
+
if (conflict) {
|
|
1466
|
+
throw Object.assign(new Error(`Run ${conflict.runId} (${conflict.state}) is unfinished and works on a different task${conflict.live ? `; it was active ${conflict.idleMinutes} minute(s) ago` : ''}. Ask the human which option to take; do not pick one yourself.`), { code: 'RUN_CONFLICT', conflict });
|
|
1467
|
+
}
|
|
1468
|
+
}
|
|
1395
1469
|
const policy = loadPolicy(CWD);
|
|
1396
1470
|
const startsNewRun = forceNew || !current || TERMINAL_STATES.has(current.state);
|
|
1397
1471
|
if (forceNew && current && !TERMINAL_STATES.has(current.state)) {
|
|
@@ -1454,10 +1528,14 @@ function handleRun() {
|
|
|
1454
1528
|
} catch (err) {
|
|
1455
1529
|
console.log = realLog;
|
|
1456
1530
|
if (runJson) {
|
|
1457
|
-
realLog(JSON.stringify({ ok: false, code: err.code || 'RUN_FAILED', error: err.message }));
|
|
1458
|
-
process.exit(1);
|
|
1531
|
+
realLog(JSON.stringify({ ok: false, code: err.code || 'RUN_FAILED', error: err.message, ...(err.conflict ? { conflict: err.conflict } : {}) }));
|
|
1532
|
+
process.exit(err.code === 'RUN_CONFLICT' ? 3 : 1);
|
|
1459
1533
|
}
|
|
1460
1534
|
log.error(err.message);
|
|
1535
|
+
if (err.conflict) {
|
|
1536
|
+
for (const option of err.conflict.options) console.log(`- ${option.id === err.conflict.recommended ? '(recommended) ' : ''}${option.label}: ${option.command}`);
|
|
1537
|
+
process.exit(3);
|
|
1538
|
+
}
|
|
1461
1539
|
process.exit(1);
|
|
1462
1540
|
}
|
|
1463
1541
|
if (runJson) {
|
|
@@ -1490,6 +1568,10 @@ function handleRun() {
|
|
|
1490
1568
|
return { stale: h.stale, staleFiles: h.staleFiles, installedVersion: h.installedVersion, packageVersion: VERSION };
|
|
1491
1569
|
})(),
|
|
1492
1570
|
learnings: runLearnings(),
|
|
1571
|
+
...(() => {
|
|
1572
|
+
const hint = require('../lib/run-isolation.js').pruneHint(CWD);
|
|
1573
|
+
return hint ? { worktreeHint: hint } : {};
|
|
1574
|
+
})(),
|
|
1493
1575
|
...specHintField(runResult),
|
|
1494
1576
|
studioUrl: readStudioUrl(CWD)
|
|
1495
1577
|
}, null, 2));
|
|
@@ -3530,6 +3612,10 @@ async function handleVerify() {
|
|
|
3530
3612
|
if (smokeText && !baselineMode && lanes.startupRiskFiles(CWD, loadRun(CWD, runId)).length) {
|
|
3531
3613
|
plan.push({ key: 'smoke', layer: 'L2', text: smokeText });
|
|
3532
3614
|
}
|
|
3615
|
+
const formalText = lanes.verificationCommands(CWD).formal;
|
|
3616
|
+
if (formalText && !baselineMode && !plan.some((step) => step.key === 'formal') && lanes.formalCoveredFiles(CWD, loadRun(CWD, runId)).length) {
|
|
3617
|
+
plan.push({ key: 'formal', layer: 'LF', text: formalText });
|
|
3618
|
+
}
|
|
3533
3619
|
if (!plan.length) throw Object.assign(new Error('No --cmd given and no build/typecheck/lint/test_unit command in .ai-engineering-loop/verification.md. FIX: add them to verification.md or pass --cmd.'), { code: 'INVALID_COMMAND' });
|
|
3534
3620
|
commandsToRun = plan.map((step) => ({ ...splitCommand(step.text, shell || Boolean(step.shell)), key: step.key, layer: step.layer, ...(step.env ? { env: step.env } : {}) }));
|
|
3535
3621
|
defaultPlan = true;
|
|
@@ -3766,6 +3852,43 @@ function handleRules() {
|
|
|
3766
3852
|
}
|
|
3767
3853
|
}
|
|
3768
3854
|
|
|
3855
|
+
function handleSafety() {
|
|
3856
|
+
try {
|
|
3857
|
+
if (args[1] !== 'record') throw Object.assign(new Error('Use: safety record --run <id> --fact <text> [--cmd <command>] [--live] [--level 1-3]'), { code: 'INVALID_USAGE' });
|
|
3858
|
+
const runId = requiredRunId('safety record');
|
|
3859
|
+
const value = require('../lib/safety-fact.js').recordSafetyFact(CWD, runId, {
|
|
3860
|
+
fact: argValue('--fact'),
|
|
3861
|
+
command: argValue('--cmd'),
|
|
3862
|
+
live: process.argv.includes('--live'),
|
|
3863
|
+
level: argValue('--level')
|
|
3864
|
+
});
|
|
3865
|
+
if (process.argv.includes('--json')) console.log(JSON.stringify({ ok: true, runId, safetyFact: value }, null, 2));
|
|
3866
|
+
else log.success(`✓ Safety fact recorded at level ${value.level} (${value.levelName}): ${value.fact}`);
|
|
3867
|
+
} catch (error) {
|
|
3868
|
+
log.error(`${error.code || 'SAFETY_FAILED'}: ${error.message}`);
|
|
3869
|
+
process.exitCode = 1;
|
|
3870
|
+
}
|
|
3871
|
+
}
|
|
3872
|
+
|
|
3873
|
+
function handleMeasurement() {
|
|
3874
|
+
try {
|
|
3875
|
+
if (args[1] !== 'record') throw Object.assign(new Error('Use: measurement record --run <id> --ac <AC-n> --runs <n> --spread <pct> --effect <pct> --limiter <text>'), { code: 'INVALID_USAGE' });
|
|
3876
|
+
const runId = requiredRunId('measurement record');
|
|
3877
|
+
const value = require('../lib/measurements.js').recordMeasurement(CWD, runId, {
|
|
3878
|
+
ac: argValue('--ac'),
|
|
3879
|
+
runs: argValue('--runs'),
|
|
3880
|
+
spread: argValue('--spread'),
|
|
3881
|
+
effect: argValue('--effect'),
|
|
3882
|
+
limiter: argValue('--limiter')
|
|
3883
|
+
});
|
|
3884
|
+
if (process.argv.includes('--json')) console.log(JSON.stringify({ ok: true, runId, measurement: value }, null, 2));
|
|
3885
|
+
else log.success(`✓ ${value.ac}: ${value.runs} runs, spread ${value.spread}%, effect ${value.effect}%, limited by ${value.limiter}`);
|
|
3886
|
+
} catch (error) {
|
|
3887
|
+
log.error(`${error.code || 'MEASUREMENT_FAILED'}: ${error.message}`);
|
|
3888
|
+
process.exitCode = 1;
|
|
3889
|
+
}
|
|
3890
|
+
}
|
|
3891
|
+
|
|
3769
3892
|
function handleRecap() {
|
|
3770
3893
|
try {
|
|
3771
3894
|
const days = argValue('--days') == null ? 7 : Number(argValue('--days'));
|
|
@@ -4104,6 +4227,14 @@ function handleDeliver() {
|
|
|
4104
4227
|
humanApproved: delivery.humanApproved === true,
|
|
4105
4228
|
receipt: receipt && { path: receipt.path, markdown: receipt.markdownPath, digest: receipt.receipt.digest, missingEvidence: receipt.missing }
|
|
4106
4229
|
};
|
|
4230
|
+
if (next.state === 'DELIVERED') {
|
|
4231
|
+
try {
|
|
4232
|
+
const cleanup = require('../lib/run-isolation.js').cleanupAfterDeliver(CWD, runId);
|
|
4233
|
+
if (cleanup) result.cleanup = cleanup;
|
|
4234
|
+
} catch (cause) {
|
|
4235
|
+
result.cleanup = { error: cause.message };
|
|
4236
|
+
}
|
|
4237
|
+
}
|
|
4107
4238
|
if (json) console.log(JSON.stringify(result));
|
|
4108
4239
|
else {
|
|
4109
4240
|
log.success('✓ delivery gate passed');
|
|
@@ -4111,6 +4242,9 @@ function handleDeliver() {
|
|
|
4111
4242
|
if (approved.length) console.log(`- Approved: ${approved.join(', ')} by ${by}`);
|
|
4112
4243
|
if (receipt) console.log(`- Receipt: ${receipt.path} (digest ${receipt.receipt.digest.slice(0, 12)}); paste ${receipt.markdownPath} into the PR/MR body`);
|
|
4113
4244
|
if (receipt?.missing.length) console.log(`! Missing AC evidence (❌ in the receipt): ${receipt.missing.join(', ')}`);
|
|
4245
|
+
if (result.cleanup?.removed) console.log(`- Stage 9: worktree removed, evidence copied to ${result.cleanup.mainCheckout}; branch ${result.cleanup.branch} kept until merged. Continue in ${result.cleanup.mainCheckout}.`);
|
|
4246
|
+
else if (result.cleanup?.keptReason) console.log(`! Stage 9: worktree kept (${result.cleanup.keptReason}); evidence copied to ${result.cleanup.mainCheckout}.`);
|
|
4247
|
+
else if (result.cleanup?.error) console.log(`! Stage 9 cleanup failed: ${result.cleanup.error}`);
|
|
4114
4248
|
}
|
|
4115
4249
|
} catch (err) {
|
|
4116
4250
|
stageJsonError(err, json, 'DELIVER_FAILED');
|
|
@@ -4291,6 +4425,7 @@ function handleLearn() {
|
|
|
4291
4425
|
forbidImport: argValue('--forbid-import'),
|
|
4292
4426
|
forbidApi: argValue('--forbid-api'),
|
|
4293
4427
|
except: argValue('--except'),
|
|
4428
|
+
prove: argValue('--prove'),
|
|
4294
4429
|
shell: !process.argv.includes('--no-shell')
|
|
4295
4430
|
});
|
|
4296
4431
|
if (json) console.log(JSON.stringify({ ok: true, rule }));
|
|
@@ -4365,11 +4500,12 @@ Commands:
|
|
|
4365
4500
|
refresh Reconcile drifted context against repository non-destructively
|
|
4366
4501
|
run [task] Start or resume a stateful engineering run and instruct the agent (never writes to home)
|
|
4367
4502
|
--new start a new run even when another run is active
|
|
4503
|
+
--worktree start this task in a new git worktree (use when another run is unfinished)
|
|
4368
4504
|
--mode report-only|assisted|unattended
|
|
4369
4505
|
--recipe <id> bind an immutable compiled workflow plan
|
|
4370
4506
|
--tier T0|T1|T2 --tier-reason <text> override the automatic tier (recorded)
|
|
4371
4507
|
--json print runId, tier, tier reasons, subagent count, recipe, workflowSource, and studioUrl (tokenless; browser session comes from ael studio)
|
|
4372
|
-
--abandon [--run <id>] --reason <text> --by <name> [--yes] [--json]
|
|
4508
|
+
--abandon [--run <id>] --reason <text> --by <name> [--yes] [--force-live] [--json]
|
|
4373
4509
|
close a stale run as CANCELLED (kept on disk) and release current.json;
|
|
4374
4510
|
ASSISTED asks to confirm, UNATTENDED needs --yes from a human
|
|
4375
4511
|
state Inspect the current run ledger
|
|
@@ -4463,6 +4599,9 @@ Commands:
|
|
|
4463
4599
|
calibrate Compare recorded outcomes with each Run's Finding Ledger: DA misses, wrong dismissals, per reviewer prompt
|
|
4464
4600
|
debt Accepted trade-offs and L3 waivers recorded at delivery: list [--file <path>] | close <id> --by <name> [--note <text>]
|
|
4465
4601
|
next Next unblocked feature from .ai-engineering-loop/features.json, VCR (verified/activated), evidence audit [--json]
|
|
4602
|
+
worktree Clean up AEL worktrees: prune [--yes] [--json] (never removes uncommitted or unmerged work)
|
|
4603
|
+
safety Record the one fact a change is safe because of [record --fact <text> --cmd <proof>] (T2 Judge PASS needs level 4+)
|
|
4604
|
+
measurement Record how a performance number was measured [record --ac <id> --runs <n> --spread <pct> --effect <pct> --limiter <text>]
|
|
4466
4605
|
recap Evidence-backed recap of the last N days as one HTML page [--days 7] [--for me|lead|client] [--projects <p,...>|all] [--out <file>] [--lang <tag>] [--open] [--json]
|
|
4467
4606
|
stats Failure causes by harness layer, false-victory rate, iterations to PASS [--last <n>] [--json]
|
|
4468
4607
|
escalation Compute the minimum Judge model tier from deterministic risk signals
|
|
@@ -4687,6 +4826,15 @@ switch (command) {
|
|
|
4687
4826
|
case 'recap':
|
|
4688
4827
|
handleRecap();
|
|
4689
4828
|
break;
|
|
4829
|
+
case 'worktree':
|
|
4830
|
+
handleWorktree();
|
|
4831
|
+
break;
|
|
4832
|
+
case 'safety':
|
|
4833
|
+
handleSafety();
|
|
4834
|
+
break;
|
|
4835
|
+
case 'measurement':
|
|
4836
|
+
handleMeasurement();
|
|
4837
|
+
break;
|
|
4690
4838
|
case 'stats':
|
|
4691
4839
|
handleStats();
|
|
4692
4840
|
break;
|
package/core/goal-contract.md
CHANGED
|
@@ -162,6 +162,10 @@ For UI or multi-step work, add the flow the user should experience as transition
|
|
|
162
162
|
|
|
163
163
|
`goal draft` returns it as a `From | Event | To` table and a Mermaid `stateDiagram-v2` (`flow.mermaid`), with warnings (a state nothing reaches, a state with no way out that is not Done/Error), so the human checks the intent before freeze. A malformed `flow` fails the Goal gate. The PR receipt shows the same diagram (GitHub renders it) and table under "Intended flow", after "Verification artifacts" and before the acceptance criteria.
|
|
164
164
|
|
|
165
|
+
## Performance ACs (C-33)
|
|
166
|
+
|
|
167
|
+
Mark an AC that claims a number (faster, smaller, more throughput) with `"measure": true`. Judge PASS then needs `measurement record` for it with at least 3 runs, a limiter and spread below the effect (`docs verification-loop`, section 3e).
|
|
168
|
+
|
|
165
169
|
## Look before you freeze: diagrams (C-27)
|
|
166
170
|
|
|
167
171
|
Steps may carry more than `from`, `event`, `to`, so the human can see what else a change touches before freezing:
|
package/core/iteration-policy.md
CHANGED
|
@@ -23,6 +23,10 @@ MAX_ALLOWED_CEILING = 5
|
|
|
23
23
|
|
|
24
24
|
---
|
|
25
25
|
|
|
26
|
+
### Attack the premise (C-32)
|
|
27
|
+
|
|
28
|
+
When the Judge issues ITERATE with an explicit `cause` that repeats the previous ITERATE's cause, verdict.json must carry `premise: {statement, test}`: the one sentence both failed fixes assumed, and the observation that would differ if it were false, with what it showed. Without it `gate judge` refuses (`PREMISE_REQUIRED`). Inferred causes do not trigger this.
|
|
29
|
+
|
|
26
30
|
## 3. The Autonomous Iteration Lifecycle
|
|
27
31
|
|
|
28
32
|
```mermaid
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Run isolation: one task, one checkout
|
|
2
|
+
|
|
3
|
+
Two agent sessions in one checkout corrupt each other: `gate maker --from-git` captures every uncommitted change, so a second task's diff would include the first task's work. AEL keeps one unfinished Run per checkout and moves other tasks into git worktrees (cards C-37 to C-40).
|
|
4
|
+
|
|
5
|
+
## When another Run is unfinished (C-37)
|
|
6
|
+
|
|
7
|
+
`run "<task>"` with an unfinished current Run whose task differs (case and spacing ignored) does not start or resume anything. It exits 3 with `code: RUN_CONFLICT` and:
|
|
8
|
+
|
|
9
|
+
```json
|
|
10
|
+
"conflict": {
|
|
11
|
+
"runId": "...", "state": "MAKER_COMPLETE", "task": "...",
|
|
12
|
+
"lastActivity": "2026-11-21T03:10:00.000Z", "idleMinutes": 4, "live": true,
|
|
13
|
+
"changedFiles": 9, "recommended": "worktree",
|
|
14
|
+
"options": [
|
|
15
|
+
{ "id": "worktree", "command": "ai-engineering-loop run --worktree --json \"<task>\"" },
|
|
16
|
+
{ "id": "resume", "command": "ai-engineering-loop run --json" },
|
|
17
|
+
{ "id": "abandon", "command": "ai-engineering-loop run --abandon --run <id> --reason \"<why>\" --by <name> --force-live" }
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
- `live` means the Run changed state or logged a lifecycle event in the last 15 minutes, so another session is probably working on it.
|
|
23
|
+
- `recommended` is `worktree` when the Run is live or the checkout has uncommitted changes, otherwise `abandon`.
|
|
24
|
+
- The agent shows the options with the host's question UI and waits. It never picks one.
|
|
25
|
+
- The same task, or no task, still resumes the Run.
|
|
26
|
+
- `run --abandon` on a live Run needs `--force-live`.
|
|
27
|
+
|
|
28
|
+
## `run --worktree "<task>"` (C-38)
|
|
29
|
+
|
|
30
|
+
Creates `<repo>.ael-worktrees/<slug>-<id>` next to the repository on branch `ael/<slug>-<id>`, from `HEAD` (uncommitted changes of the other Run stay behind), copies the AEL context files (not `runs/`, `recaps/`, `tasks/` or pointers), starts the Run there, and records it in `.ai-engineering-loop/worktrees.json` of the main checkout. `--mode`, `--recipe`, `--tier` and `--tier-reason` pass through. Work only in the printed path for that Run.
|
|
31
|
+
|
|
32
|
+
## Stage 9: cleanup after deliver (C-39)
|
|
33
|
+
|
|
34
|
+
When `deliver` completes a Run inside a registered worktree:
|
|
35
|
+
|
|
36
|
+
1. `runs/<id>/` is copied to the main checkout, so `stats`, `recap` and `calibrate` keep the history.
|
|
37
|
+
2. If the worktree has no uncommitted or untracked changes (outside `.ai-engineering-loop/`), it is removed. Commits stay on the branch.
|
|
38
|
+
3. The branch is kept until it is merged.
|
|
39
|
+
4. The output's `cleanup.mainCheckout` is where the agent continues.
|
|
40
|
+
|
|
41
|
+
A dirty worktree is kept, with the reason in `cleanup.keptReason`.
|
|
42
|
+
|
|
43
|
+
## `worktree prune` (C-40)
|
|
44
|
+
|
|
45
|
+
`ai-engineering-loop worktree prune` prints a plan; `--yes` applies it. Only worktrees in the registry are considered.
|
|
46
|
+
|
|
47
|
+
| Worktree | Action |
|
|
48
|
+
|---|---|
|
|
49
|
+
| Run delivered, cancelled or escalated, worktree clean | remove the worktree (evidence copied first) |
|
|
50
|
+
| Branch merged into the default branch (or a merged PR, when `gh` is available) and worktree gone | delete the branch |
|
|
51
|
+
| Uncommitted or untracked changes | kept, with a note |
|
|
52
|
+
| Run still active and idle for 7+ days | reported, so a human can abandon it there |
|
|
53
|
+
| Folder already deleted by hand | `git worktree prune`, entry closed |
|
|
54
|
+
|
|
55
|
+
Uncommitted or unmerged work is never removed. `status` and `run` print one line when something can be cleaned up.
|
|
@@ -116,6 +116,31 @@ Detection follows the file's comment syntax: `//`, `/* */` and `*` lines in C-fa
|
|
|
116
116
|
|
|
117
117
|
A reviewer can downgrade a finding (for example public API docs that a doc generator reads) only with `dismissal: {by, evidence}`. A project that needs comments (a library shipping JSDoc, for example) opts out for every Run by having a human add `"comments": "allow"` to `.ai-engineering-loop/rules.json`; C-18 findings still apply.
|
|
118
118
|
|
|
119
|
+
## 3e. Proof, Not Prose (C-29 to C-35)
|
|
120
|
+
|
|
121
|
+
Adapted from pstack (`interrogate`, `blast-radius`, `correct`, `principle-explain-the-number`; MIT, poteto). Each check moves a claim from the agent's word to something the CLI runs. No extra subagents: agents write the command, the CLI runs it.
|
|
122
|
+
|
|
123
|
+
**Findings must reproduce (C-29).** A VALID BLOCKER or HIGH finding may carry `proof: {command}`: a test or script that exits non-zero while the bug is present. At `gate review` the CLI runs every such proof in the repository (120 s timeout; destructive commands are refused by the guard) and sets `proofStatus`:
|
|
124
|
+
|
|
125
|
+
| proofStatus | Meaning | Blocks? |
|
|
126
|
+
|---|---|---|
|
|
127
|
+
| `reproduced` | the command failed: the bug shows | yes |
|
|
128
|
+
| `not_reproduced` | the command passed: the bug did not show | **no** |
|
|
129
|
+
| `refused` | empty or destructive command | yes |
|
|
130
|
+
| `timed_out` | no answer within the timeout | yes |
|
|
131
|
+
|
|
132
|
+
Results go to `runs/<id>/proofs.json`. Only the CLI writes `proofStatus`; a value written by hand is cleared. A finding without `proof` behaves as before.
|
|
133
|
+
|
|
134
|
+
**One safety fact (C-30).** A risky change is usually safe because of one fact. Record it with `ael safety record --run <id> --fact "<fact>" --cmd "<script or test that passes only if the fact holds>"`. A passing command records level 4 (5 with `--live`, when it ran against the running app); without `--cmd`, `--level 1|2|3` records stated, pointed at the line, or walked the failure path. A T2 Judge PASS needs level 4 or more (`SAFETY_FACT_UNPROVEN`).
|
|
135
|
+
|
|
136
|
+
**Rules must catch a real past mistake (C-31).** `learn promote ... --prove <commit>` runs the new check against the commit that introduced the mistake (its added lines for `--scope diff` and forbid rules; its whole tree, in a temporary worktree, for repo rules). The check must fail there, or the promotion is refused (`RULE_NOT_PROVEN`). The rule records `provenBy`; `doctor --harness` lists rules without it.
|
|
137
|
+
|
|
138
|
+
**Explain the number (C-33).** An AC with `"measure": true` (a speedup, a latency, a throughput) needs `ael measurement record --run <id> --ac AC-n --runs <n> --spread <pct> --effect <pct> --limiter "<what bounds the result>"`. Judge PASS needs at least 3 runs, a limiter, and run-to-run spread smaller than the effect (`MEASUREMENT_UNEXPLAINED`).
|
|
139
|
+
|
|
140
|
+
**Drift (C-34, C-35).** `doctor --harness` warns when a feature-map path matches no tracked file. `- **formal_covers**: src/payments/**` in `verification.md` makes default `verify` add the `formal` key whenever the gated diff touches covered files.
|
|
141
|
+
|
|
142
|
+
**Measure it (C-36).** `stats` reports human interventions per Run (answered questions, escalations, problems recorded after delivery) and how many finding proofs reproduced; `recap` shows interventions per Run for me and the lead.
|
|
143
|
+
|
|
119
144
|
## 4. The 4 Verification Gates
|
|
120
145
|
|
|
121
146
|
1. **Gate 1: Unit & Integration Tests**: All unit and edge-case tests must pass with 0 failures.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<svg width="960" height="380" viewBox="0 0 960 380" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect width="960" height="380" rx="12" fill="#FDFDFB"/>
|
|
3
|
+
<rect x="1" y="1" width="958" height="378" rx="11" stroke="#D9D9D5" stroke-width="2"/>
|
|
4
|
+
<text x="48" y="78" fill="#777777" font-family="monospace" font-size="15" letter-spacing="1.5">AI ENGINEERING LOOP</text>
|
|
5
|
+
<text x="48" y="148" fill="#111111" font-family="monospace" font-size="48" letter-spacing="-3">From idea to</text>
|
|
6
|
+
<text x="48" y="204" fill="#FC6404" font-family="monospace" font-size="48" letter-spacing="-3">trusted code.</text>
|
|
7
|
+
<rect x="48" y="258" width="430" height="56" stroke="#111111" stroke-width="2"/>
|
|
8
|
+
<text x="72" y="294" fill="#FC6404" font-family="monospace" font-size="20">$</text>
|
|
9
|
+
<text x="100" y="294" fill="#111111" font-family="monospace" font-size="19">npx ai-engineering-loop init</text>
|
|
10
|
+
<g>
|
|
11
|
+
<circle cx="748" cy="188" r="100" fill="#FC6404">
|
|
12
|
+
<animate attributeName="r" values="100;96;100" dur="3.2s" repeatCount="indefinite"/>
|
|
13
|
+
</circle>
|
|
14
|
+
<ellipse cx="712" cy="190" rx="11" ry="24" fill="#111111" transform="rotate(-8 712 190)"><animate attributeName="opacity" values="1;1;0.12;1" dur="4.8s" repeatCount="indefinite"/></ellipse>
|
|
15
|
+
<ellipse cx="782" cy="190" rx="11" ry="24" fill="#111111" transform="rotate(8 782 190)"><animate attributeName="opacity" values="1;1;0.12;1" dur="4.8s" repeatCount="indefinite"/></ellipse>
|
|
16
|
+
<path d="M602 298H894" stroke="#111111" stroke-width="2"/>
|
|
17
|
+
<ellipse cx="748" cy="304" rx="78" ry="8" fill="#111111" fill-opacity="0.14"/>
|
|
18
|
+
</g>
|
|
19
|
+
</svg>
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="1600" height="900" viewBox="0 0 1600 900" role="img" aria-labelledby="title desc">
|
|
2
|
+
<title id="title">AI Engineering Loop Workflow Studio</title>
|
|
3
|
+
<desc id="desc">A dark Workflow Studio live-run view: a stage rail from goal to deliver with review in progress, a pending question banner, compliance chips, a short timeline, and a Start with AI Agent button.</desc>
|
|
4
|
+
<defs>
|
|
5
|
+
<linearGradient id="bg" x1="0" y1="0" x2="1" y2="1">
|
|
6
|
+
<stop stop-color="#111512"/>
|
|
7
|
+
<stop offset="1" stop-color="#080a09"/>
|
|
8
|
+
</linearGradient>
|
|
9
|
+
<linearGradient id="glow" x1="0" y1="0" x2="1" y2="1">
|
|
10
|
+
<stop stop-color="#fc6404" stop-opacity=".28"/>
|
|
11
|
+
<stop offset="1" stop-color="#fc6404" stop-opacity="0"/>
|
|
12
|
+
</linearGradient>
|
|
13
|
+
<filter id="shadow" x="-30%" y="-30%" width="160%" height="160%">
|
|
14
|
+
<feDropShadow dx="0" dy="18" stdDeviation="24" flood-color="#000" flood-opacity=".45"/>
|
|
15
|
+
</filter>
|
|
16
|
+
<filter id="soft">
|
|
17
|
+
<feGaussianBlur stdDeviation="55"/>
|
|
18
|
+
</filter>
|
|
19
|
+
<pattern id="grid" width="32" height="32" patternUnits="userSpaceOnUse">
|
|
20
|
+
<path d="M32 0H0V32" fill="none" stroke="#fff" stroke-opacity=".035"/>
|
|
21
|
+
</pattern>
|
|
22
|
+
<marker id="arrow" markerWidth="10" markerHeight="10" refX="8" refY="5" orient="auto">
|
|
23
|
+
<path d="M0 0L10 5L0 10Z" fill="#5b625d"/>
|
|
24
|
+
</marker>
|
|
25
|
+
<style>
|
|
26
|
+
.ui{font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif}
|
|
27
|
+
.mono{font-family:"SFMono-Regular",Consolas,monospace}
|
|
28
|
+
.eyebrow{font-size:14px;font-weight:700;letter-spacing:2.4px;fill:#7f8881}
|
|
29
|
+
.node-title{font-size:22px;font-weight:700;fill:#f4f6f4}
|
|
30
|
+
.node-copy{font-size:14px;fill:#888f8a}
|
|
31
|
+
.tiny{font-size:12px;fill:#707873}
|
|
32
|
+
.flow{fill:none;stroke:#5b625d;stroke-width:3;marker-end:url(#arrow)}
|
|
33
|
+
</style>
|
|
34
|
+
</defs>
|
|
35
|
+
|
|
36
|
+
<rect width="1600" height="900" fill="url(#bg)"/>
|
|
37
|
+
<circle cx="1240" cy="70" r="330" fill="#fc6404" opacity=".12" filter="url(#soft)"/>
|
|
38
|
+
<circle cx="280" cy="880" r="260" fill="#fc6404" opacity=".08" filter="url(#soft)"/>
|
|
39
|
+
|
|
40
|
+
<g class="ui">
|
|
41
|
+
<text x="110" y="112" font-size="16" font-weight="800" letter-spacing="2" fill="#fcaa72">AI ENGINEERING LOOP</text>
|
|
42
|
+
<text x="110" y="188" font-size="64" font-weight="750" letter-spacing="-2.8" fill="#f7f9f7">From idea to trusted code.</text>
|
|
43
|
+
<text x="112" y="232" font-size="21" fill="#9da49f">Your AI handles the workflow. You keep the clarity and control.</text>
|
|
44
|
+
</g>
|
|
45
|
+
|
|
46
|
+
<g filter="url(#shadow)">
|
|
47
|
+
<rect x="105" y="290" width="1390" height="510" rx="24" fill="#151816" stroke="#303632"/>
|
|
48
|
+
<rect x="105" y="290" width="1390" height="64" rx="24" fill="#1b1f1c"/>
|
|
49
|
+
<path d="M105 330V354H1495V330" fill="#1b1f1c"/>
|
|
50
|
+
<circle cx="140" cy="322" r="6" fill="#4d544f"/>
|
|
51
|
+
<circle cx="160" cy="322" r="6" fill="#4d544f"/>
|
|
52
|
+
<circle cx="180" cy="322" r="6" fill="#fc6404"/>
|
|
53
|
+
<rect x="680" y="307" width="240" height="30" rx="15" fill="#111411"/>
|
|
54
|
+
<circle cx="704" cy="322" r="6" fill="#fc6404"/>
|
|
55
|
+
<text class="ui tiny" x="720" y="326">Workflow Studio</text>
|
|
56
|
+
|
|
57
|
+
<rect x="105" y="354" width="72" height="446" fill="#101311"/>
|
|
58
|
+
<rect x="123" y="381" width="36" height="36" rx="10" fill="#fc6404"/>
|
|
59
|
+
<path d="M129 400h6l3-8 5 16 3-8h6" fill="none" stroke="#fff" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
60
|
+
<circle cx="141" cy="449" r="15" fill="#252a26"/>
|
|
61
|
+
<path d="M134 444h14M134 449h14M134 454h9" stroke="#818982" stroke-width="2" stroke-linecap="round"/>
|
|
62
|
+
<circle cx="141" cy="500" r="15" fill="#252a26"/>
|
|
63
|
+
<circle cx="135" cy="505" r="3" fill="none" stroke="#818982" stroke-width="2"/>
|
|
64
|
+
<circle cx="147" cy="495" r="3" fill="none" stroke="#818982" stroke-width="2"/>
|
|
65
|
+
<path d="M137.5 502.5l7-5" stroke="#818982" stroke-width="2"/>
|
|
66
|
+
|
|
67
|
+
<rect x="177" y="354" width="1318" height="446" fill="#111411"/>
|
|
68
|
+
<rect x="177" y="354" width="1318" height="446" fill="url(#grid)"/>
|
|
69
|
+
<ellipse cx="1220" cy="410" rx="300" ry="210" fill="url(#glow)"/>
|
|
70
|
+
|
|
71
|
+
<text class="ui eyebrow" x="222" y="397">LIVE RUN / PRODUCT LAUNCH</text>
|
|
72
|
+
<text class="ui tiny" x="222" y="420">T1 · ASSISTED · iteration 1 / 3 · budget 38%</text>
|
|
73
|
+
<rect x="1180" y="375" width="262" height="42" rx="9" fill="#1d221e" stroke="#343a35"/>
|
|
74
|
+
<circle cx="1206" cy="396" r="6" fill="#fc6404"/>
|
|
75
|
+
<circle cx="1206" cy="396" r="11" fill="none" stroke="#fc6404" stroke-opacity=".35" stroke-width="2"/>
|
|
76
|
+
<text class="ui tiny" x="1224" y="400">live: watch · heartbeat 3s ago</text>
|
|
77
|
+
|
|
78
|
+
<rect x="222" y="444" width="1220" height="50" rx="12" fill="#1a2418" stroke="#2f5a22"/>
|
|
79
|
+
<rect x="222" y="444" width="6" height="50" rx="3" fill="#fcaa72"/>
|
|
80
|
+
<text class="ui" x="248" y="474" font-size="13" font-weight="800" letter-spacing="1.4" fill="#fcaa72">QUESTION</text>
|
|
81
|
+
<text class="ui" x="340" y="474" font-size="15" fill="#e4e8e5">Should an empty cart show the “Continue shopping” link?</text>
|
|
82
|
+
<rect x="1316" y="456" width="110" height="26" rx="7" fill="#1d221e" stroke="#3b6b2c"/>
|
|
83
|
+
<text class="ui" x="1371" y="474" text-anchor="middle" font-size="12" font-weight="750" fill="#c9f0bd">Answer</text>
|
|
84
|
+
|
|
85
|
+
<line x1="300" y1="560" x2="1365" y2="560" stroke="#343a35" stroke-width="4" stroke-linecap="round"/>
|
|
86
|
+
<line x1="300" y1="560" x2="939" y2="560" stroke="#fc6404" stroke-width="4" stroke-linecap="round"/>
|
|
87
|
+
<circle cx="300" cy="560" r="18" fill="#fc6404"/>
|
|
88
|
+
<path d="M293 560l5 5 10-11" fill="none" stroke="#fff" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
89
|
+
<text class="ui" x="300" y="608" text-anchor="middle" font-size="13" font-weight="700" letter-spacing="1.6" fill="#c7ccc8">GOAL</text>
|
|
90
|
+
<circle cx="513" cy="560" r="18" fill="#fc6404"/>
|
|
91
|
+
<path d="M506 560l5 5 10-11" fill="none" stroke="#fff" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
92
|
+
<text class="ui" x="513" y="608" text-anchor="middle" font-size="13" font-weight="700" letter-spacing="1.6" fill="#c7ccc8">MAKER</text>
|
|
93
|
+
<circle cx="726" cy="560" r="18" fill="#fc6404"/>
|
|
94
|
+
<path d="M719 560l5 5 10-11" fill="none" stroke="#fff" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
95
|
+
<text class="ui" x="726" y="608" text-anchor="middle" font-size="13" font-weight="700" letter-spacing="1.6" fill="#c7ccc8">VERIFY</text>
|
|
96
|
+
<circle cx="939" cy="560" r="28" fill="#fc6404" opacity=".18"/>
|
|
97
|
+
<circle cx="939" cy="560" r="18" fill="#1c211d" stroke="#fc6404" stroke-width="4"/>
|
|
98
|
+
<circle cx="939" cy="560" r="6" fill="#fc6404"/>
|
|
99
|
+
<text class="ui" x="939" y="608" text-anchor="middle" font-size="13" font-weight="800" letter-spacing="1.6" fill="#f4f6f4">REVIEW</text>
|
|
100
|
+
<circle cx="1152" cy="560" r="18" fill="#1c211d" stroke="#3b433d" stroke-width="3"/>
|
|
101
|
+
<text class="ui" x="1152" y="608" text-anchor="middle" font-size="13" font-weight="700" letter-spacing="1.6" fill="#707873">JUDGE</text>
|
|
102
|
+
<circle cx="1365" cy="560" r="18" fill="#1c211d" stroke="#3b433d" stroke-width="3"/>
|
|
103
|
+
<text class="ui" x="1365" y="608" text-anchor="middle" font-size="13" font-weight="700" letter-spacing="1.6" fill="#707873">DELIVER</text>
|
|
104
|
+
<text class="ui tiny" x="939" y="628" text-anchor="middle" fill="#fcaa72">Devil's Advocate running</text>
|
|
105
|
+
|
|
106
|
+
<rect x="222" y="652" width="600" height="62" rx="12" fill="#191d1a" stroke="#2b312c"/>
|
|
107
|
+
<text class="ui eyebrow" x="246" y="688" font-size="12">COMPLIANCE</text>
|
|
108
|
+
<rect x="384" y="667" width="134" height="32" rx="16" fill="#1c2a18" stroke="#2f5a22"/>
|
|
109
|
+
<circle cx="402" cy="683" r="5" fill="#fc6404"/>
|
|
110
|
+
<text class="ui" x="414" y="688" font-size="13" fill="#c9f0bd">Guard 0 blocks</text>
|
|
111
|
+
<rect x="526" y="667" width="120" height="32" rx="16" fill="#1c2a18" stroke="#2f5a22"/>
|
|
112
|
+
<circle cx="543" cy="683" r="5" fill="#fc6404"/>
|
|
113
|
+
<text class="ui" x="555" y="688" font-size="13" fill="#c9f0bd">Scope in map</text>
|
|
114
|
+
<rect x="654" y="667" width="148" height="32" rx="16" fill="#1d221e" stroke="#343a35"/>
|
|
115
|
+
<circle cx="671" cy="683" r="5" fill="#707873"/>
|
|
116
|
+
<text class="ui" x="683" y="688" font-size="13" fill="#9da49f">Receipt pending</text>
|
|
117
|
+
|
|
118
|
+
<rect x="842" y="652" width="600" height="62" rx="12" fill="#191d1a" stroke="#2b312c"/>
|
|
119
|
+
<text class="ui eyebrow" x="866" y="688" font-size="12">TIMELINE</text>
|
|
120
|
+
<text class="mono tiny" x="966" y="677">10:42</text>
|
|
121
|
+
<text class="ui" x="1012" y="677" font-size="13" fill="#c7ccc8">verify · npm test · 511 passed</text>
|
|
122
|
+
<text class="mono tiny" x="966" y="700">10:44</text>
|
|
123
|
+
<text class="ui" x="1012" y="700" font-size="13" fill="#c7ccc8">review · 2 findings, 0 blocking</text>
|
|
124
|
+
|
|
125
|
+
<rect x="224" y="734" width="1218" height="44" rx="12" fill="#191d1a" stroke="#2b312c"/>
|
|
126
|
+
<text class="mono tiny" x="248" y="761">Task</text>
|
|
127
|
+
<text class="ui" x="300" y="761" font-size="14" fill="#c7ccc8">Ship a reliable feature without babysitting every command</text>
|
|
128
|
+
<rect x="1250" y="743" width="174" height="26" rx="7" fill="#fc6404"/>
|
|
129
|
+
<text class="ui" x="1337" y="761" text-anchor="middle" font-size="12" font-weight="750" fill="#fff">Start with AI Agent</text>
|
|
130
|
+
</g>
|
|
131
|
+
|
|
132
|
+
<g class="ui">
|
|
133
|
+
<text x="112" y="852" font-size="15" fill="#6f7771">Live runs · compliance you can see · evidence you can trust</text>
|
|
134
|
+
<text x="1488" y="852" text-anchor="end" font-size="15" font-weight="700" fill="#fc6404">OPEN SOURCE</text>
|
|
135
|
+
</g>
|
|
136
|
+
</svg>
|
package/lib/ablation.js
CHANGED
|
@@ -10,7 +10,7 @@ const fs = require('fs');
|
|
|
10
10
|
const path = require('path');
|
|
11
11
|
const { runsDir } = require('./run-state.js');
|
|
12
12
|
|
|
13
|
-
const COMPONENTS = Object.freeze(['integrity', 'comments', 'l3', 'l1', 'smoke', 'rules']);
|
|
13
|
+
const COMPONENTS = Object.freeze(['integrity', 'comments', 'l3', 'l1', 'smoke', 'rules', 'proofs']);
|
|
14
14
|
const MARKER = path.join('.ai-engineering-loop', 'bench-ablation.json');
|
|
15
15
|
|
|
16
16
|
function requested(env = process.env) {
|
package/lib/cli-args.js
CHANGED
|
@@ -18,12 +18,15 @@ const WRITER_COMMANDS = Object.freeze({
|
|
|
18
18
|
update: { flags: ['--json', '--yes', '--background', '--force', '--no-pin'], valued: ['--channel', '--pin'], positionals: ['check', 'plan', 'apply', 'auto', 'policy', 'rollback', ...['off', 'notify', 'patch', 'minor', 'all']] },
|
|
19
19
|
projects: { flags: ['--json'], valued: ['--root', '--depth'], positionals: null },
|
|
20
20
|
// `run --abandon` (issue #46) is a writer; plain `run` takes free text.
|
|
21
|
-
'run:abandon': { flags: ['--abandon', '--yes', '--json'], valued: ['--run', '--reason', '--by'], positionals: [] },
|
|
21
|
+
'run:abandon': { flags: ['--abandon', '--yes', '--json', '--force-live'], valued: ['--run', '--reason', '--by'], positionals: [] },
|
|
22
22
|
bench: {
|
|
23
23
|
flags: ['--json', '--sandbox-home'],
|
|
24
24
|
valued: ['--host', '--model', '--scenario', '--repeat', '--bin', '--mode', '--timeout', '--host-arg', '--without'],
|
|
25
25
|
positionals: []
|
|
26
26
|
},
|
|
27
|
+
worktree: { flags: ['--json', '--yes'], valued: [], positionals: ['prune'] },
|
|
28
|
+
safety: { flags: ['--json', '--live'], valued: ['--run', '--fact', '--cmd', '--level'], positionals: ['record'] },
|
|
29
|
+
measurement: { flags: ['--json'], valued: ['--run', '--ac', '--runs', '--spread', '--effect', '--limiter'], positionals: ['record'] },
|
|
27
30
|
recap: { flags: ['--json', '--open'], valued: ['--days', '--for', '--projects', '--out', '--now', '--lang'], positionals: [] },
|
|
28
31
|
migrate: { flags: ['--json', '--dry-run'], valued: ['--from'], positionals: [] },
|
|
29
32
|
debt: { flags: ['--json'], valued: ['--by', '--note', '--file'], positionals: null },
|
|
@@ -31,7 +34,7 @@ const WRITER_COMMANDS = Object.freeze({
|
|
|
31
34
|
verify: { flags: ['--json', '--serial', '--shell', '--related', '--final', '--fresh', '--baseline'], valued: ['--run', '--cmd', '--timeout-ms'], positionals: [] },
|
|
32
35
|
quick: { flags: ['--json', '--serial', '--shell'], valued: ['--run', '--cmd', '--timeout-ms', '--mode'], positionals: null },
|
|
33
36
|
review: { flags: ['--json'], valued: ['--run', '--child-id', '--file'], positionals: ['ingest'] },
|
|
34
|
-
learn: { flags: ['--json', '--dry-run', '--prune', '--no-shell'], valued: ['--max-age-runs', '--check', '--fix', '--why', '--by', '--scope', '--forbid-import', '--forbid-api', '--except'], positionals: null },
|
|
37
|
+
learn: { flags: ['--json', '--dry-run', '--prune', '--no-shell'], valued: ['--max-age-runs', '--check', '--fix', '--why', '--by', '--scope', '--forbid-import', '--forbid-api', '--except', '--prove'], positionals: null },
|
|
35
38
|
guard: { flags: ['--json'], valued: ['--run', '--tool', '--input', '--path', '--command', '--hook'], positionals: ['check'] },
|
|
36
39
|
hooks: { flags: ['--json'], valued: ['--host'], positionals: ['install', 'uninstall', 'status'] },
|
|
37
40
|
impact: { flags: ['--json', '--force'], valued: ['--run', '--by', '--reason', '--allow', '--remove', '--limit'], positionals: ['map', 'show', 'confirm', 'skip', 'drift'] },
|