@open-agent-toolkit/cli 0.2.77 → 0.3.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/assets/agents/oat-phase-implementer.md +5 -5
- package/assets/agents/oat-reviewer.md +15 -15
- package/assets/agents/recon-worker.md +12 -12
- package/assets/bundle-metadata.json +1 -1
- package/assets/docs/cli-utilities/workflow-gates.md +1 -1
- package/assets/docs/workflows/projects/artifacts.md +2 -2
- package/assets/docs/workflows/projects/autonomy.md +1 -1
- package/assets/docs/workflows/projects/implementation-execution.md +4 -4
- package/assets/docs/workflows/projects/lifecycle.md +1 -1
- package/assets/docs/workflows/projects/reviews.md +11 -11
- package/assets/docs/workflows/skills/recon.md +53 -27
- package/assets/public-package-versions.json +4 -4
- package/assets/skills/oat-agent-instructions-analyze/SKILL.md +3 -3
- package/assets/skills/oat-docs-analyze/SKILL.md +3 -3
- package/assets/skills/oat-project-autonomous/SKILL.md +2 -2
- package/assets/skills/oat-project-autonomous/references/gate-inventory.md +14 -14
- package/assets/skills/oat-project-design/SKILL.md +2 -2
- package/assets/skills/oat-project-discover/SKILL.md +2 -2
- package/assets/skills/oat-project-document/SKILL.md +1 -1
- package/assets/skills/oat-project-document/references/docs/autonomy-contract.md +14 -14
- package/assets/skills/oat-project-implement/SKILL.md +2 -2
- package/assets/skills/oat-project-implement/references/completion-and-closeout.md +1 -1
- package/assets/skills/oat-project-implement/references/docs/autonomy-contract.md +14 -14
- package/assets/skills/oat-project-implement/references/phase-execution.md +3 -3
- package/assets/skills/oat-project-implement/references/plan-and-resume.md +2 -2
- package/assets/skills/oat-project-import-plan/SKILL.md +2 -2
- package/assets/skills/oat-project-lite/SKILL.md +1 -1
- package/assets/skills/oat-project-lite/references/docs/autonomy-contract.md +14 -14
- package/assets/skills/oat-project-plan/SKILL.md +2 -2
- package/assets/skills/oat-project-plan-writing/SKILL.md +4 -4
- package/assets/skills/oat-project-pr-final/SKILL.md +1 -1
- package/assets/skills/oat-project-pr-final/references/docs/autonomy-contract.md +14 -14
- package/assets/skills/oat-project-quick-start/SKILL.md +2 -2
- package/assets/skills/oat-project-quick-start/references/docs/autonomy-contract.md +14 -14
- package/assets/skills/oat-project-review-provide/SKILL.md +14 -14
- package/assets/skills/oat-project-review-provide-remote/SKILL.md +10 -10
- package/assets/skills/oat-project-review-receive/SKILL.md +64 -45
- package/assets/skills/oat-project-review-receive-remote/SKILL.md +6 -6
- package/assets/skills/oat-project-revise/SKILL.md +2 -2
- package/assets/skills/oat-review-provide/SKILL.md +2 -2
- package/assets/skills/oat-review-provide/references/review-artifact-template.md +3 -3
- package/assets/skills/oat-review-provide-remote/SKILL.md +11 -11
- package/assets/skills/oat-review-receive/SKILL.md +18 -17
- package/assets/skills/oat-review-receive-remote/SKILL.md +13 -13
- package/assets/skills/oat-wave-execute/SKILL.md +2 -2
- package/assets/skills/recon/SKILL.md +37 -19
- package/assets/skills/recon/references/packet-contract.md +33 -30
- package/assets/skills/recon/references/profiles.md +18 -15
- package/assets/skills/recon/references/worker-contract.md +87 -7
- package/assets/skills/recon/scripts/create-review-brief.mjs +2 -25
- package/assets/skills/recon/scripts/lib/cli-entry.mjs +21 -0
- package/assets/skills/recon/scripts/lib/contracts.mjs +144 -38
- package/assets/skills/recon/scripts/lib/routing.mjs +2 -5
- package/assets/skills/recon/scripts/lib/validated-run.mjs +1 -1
- package/assets/skills/recon/scripts/prepare-routing.mjs +2 -26
- package/assets/skills/recon/scripts/reconcile-ledger.mjs +269 -2
- package/assets/skills/recon/scripts/render-packet.mjs +2 -25
- package/assets/skills/recon/scripts/validate-artifact.mjs +2 -25
- package/assets/skills/recon/scripts/validate-packet.mjs +73 -43
- package/assets/templates/plan.md +1 -1
- package/dist/commands/gate/__fixtures__/fake-runtime.mjs +4 -4
- package/dist/commands/gate/index.d.ts.map +1 -1
- package/dist/commands/gate/index.js +20 -11
- package/dist/commands/gate/review-verdict.d.ts +2 -2
- package/dist/commands/gate/review-verdict.d.ts.map +1 -1
- package/dist/commands/gate/review-verdict.js +223 -57
- package/dist/review-remote/body-builder.d.ts +3 -3
- package/dist/review-remote/body-builder.d.ts.map +1 -1
- package/dist/review-remote/body-builder.js +12 -12
- package/dist/review-remote/reviewer-dispatch.d.ts +2 -2
- package/dist/review-remote/reviewer-dispatch.d.ts.map +1 -1
- package/dist/review-remote/reviewer-dispatch.js +15 -7
- package/package.json +2 -2
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import { createHash, randomUUID } from 'node:crypto';
|
|
4
|
-
import { realpathSync } from 'node:fs';
|
|
5
4
|
import { lstat, open, rename, rm } from 'node:fs/promises';
|
|
6
5
|
import { join, resolve } from 'node:path';
|
|
7
|
-
import { fileURLToPath } from 'node:url';
|
|
8
6
|
|
|
9
7
|
import { hashFile } from './lib/canonical-json.mjs';
|
|
8
|
+
import { isDirectExecution } from './lib/cli-entry.mjs';
|
|
10
9
|
import {
|
|
11
10
|
assertSafeExistingPath,
|
|
12
11
|
assertSafeOutputPath,
|
|
@@ -437,29 +436,7 @@ async function main(argv) {
|
|
|
437
436
|
process.stdout.write(`${JSON.stringify(result, null, 2)}\n`);
|
|
438
437
|
}
|
|
439
438
|
|
|
440
|
-
|
|
441
|
-
* Direct invocation, compared as canonical paths on both sides. Comparing a raw
|
|
442
|
-
* `process.argv[1]` against `import.meta.url` makes this script a silent no-op
|
|
443
|
-
* that exits 0 whenever the skill is reached through a symlinked install root,
|
|
444
|
-
* and canonicalizing only one side has the same effect under
|
|
445
|
-
* `--preserve-symlinks-main`, which keeps the link in `import.meta.url`.
|
|
446
|
-
* A path that cannot be canonicalized is not a module Node loaded as the entry
|
|
447
|
-
* point, so a thrown `realpathSync` means "not invoked directly" and returns
|
|
448
|
-
* `false`; it never masks a direct run.
|
|
449
|
-
*/
|
|
450
|
-
function isDirectInvocation(invokedPath) {
|
|
451
|
-
if (!invokedPath) return false;
|
|
452
|
-
try {
|
|
453
|
-
return (
|
|
454
|
-
realpathSync(fileURLToPath(import.meta.url)) ===
|
|
455
|
-
realpathSync(resolve(invokedPath))
|
|
456
|
-
);
|
|
457
|
-
} catch {
|
|
458
|
-
return false;
|
|
459
|
-
}
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
if (isDirectInvocation(process.argv[1])) {
|
|
439
|
+
if (isDirectExecution(import.meta.url)) {
|
|
463
440
|
main(process.argv.slice(2)).catch((error) => {
|
|
464
441
|
process.stderr.write(`${error instanceof Error ? error.message : error}\n`);
|
|
465
442
|
process.exitCode = 1;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { realpathSync } from 'node:fs';
|
|
4
3
|
import { mkdir, readFile, rename, writeFile } from 'node:fs/promises';
|
|
5
4
|
import { basename, join, resolve } from 'node:path';
|
|
6
|
-
import { fileURLToPath } from 'node:url';
|
|
7
5
|
|
|
6
|
+
import { isDirectExecution } from './lib/cli-entry.mjs';
|
|
8
7
|
import { validateArtifactShape } from './lib/contracts.mjs';
|
|
9
8
|
import {
|
|
10
9
|
assertSafeExistingPath,
|
|
@@ -86,29 +85,7 @@ async function main(argv) {
|
|
|
86
85
|
process.exitCode = result.valid ? 0 : 1;
|
|
87
86
|
}
|
|
88
87
|
|
|
89
|
-
|
|
90
|
-
* Direct invocation, compared as canonical paths on both sides. Comparing a raw
|
|
91
|
-
* `process.argv[1]` against `import.meta.url` makes this script a silent no-op
|
|
92
|
-
* that exits 0 whenever the skill is reached through a symlinked install root,
|
|
93
|
-
* and canonicalizing only one side has the same effect under
|
|
94
|
-
* `--preserve-symlinks-main`, which keeps the link in `import.meta.url`.
|
|
95
|
-
* A path that cannot be canonicalized is not a module Node loaded as the entry
|
|
96
|
-
* point, so a thrown `realpathSync` means "not invoked directly" and returns
|
|
97
|
-
* `false`; it never masks a direct run.
|
|
98
|
-
*/
|
|
99
|
-
function isDirectInvocation(invokedPath) {
|
|
100
|
-
if (!invokedPath) return false;
|
|
101
|
-
try {
|
|
102
|
-
return (
|
|
103
|
-
realpathSync(fileURLToPath(import.meta.url)) ===
|
|
104
|
-
realpathSync(resolve(invokedPath))
|
|
105
|
-
);
|
|
106
|
-
} catch {
|
|
107
|
-
return false;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
if (isDirectInvocation(process.argv[1])) {
|
|
88
|
+
if (isDirectExecution(import.meta.url)) {
|
|
112
89
|
main(process.argv.slice(2)).catch((error) => {
|
|
113
90
|
process.stderr.write(`${error instanceof Error ? error.message : error}\n`);
|
|
114
91
|
process.exitCode = 2;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { realpathSync } from 'node:fs';
|
|
4
3
|
import { readFile, rm } from 'node:fs/promises';
|
|
5
4
|
import { join, resolve } from 'node:path';
|
|
6
|
-
import { fileURLToPath } from 'node:url';
|
|
7
5
|
|
|
8
6
|
import { hashCanonicalJson, hashFile, sha256 } from './lib/canonical-json.mjs';
|
|
7
|
+
import { isDirectExecution } from './lib/cli-entry.mjs';
|
|
9
8
|
import {
|
|
10
9
|
isDigest,
|
|
11
10
|
isObject,
|
|
@@ -30,7 +29,6 @@ const requiredPasses = {
|
|
|
30
29
|
'semantic-verification',
|
|
31
30
|
'adversarial',
|
|
32
31
|
'coverage',
|
|
33
|
-
'reconciliation',
|
|
34
32
|
],
|
|
35
33
|
thorough: [
|
|
36
34
|
'map',
|
|
@@ -38,7 +36,6 @@ const requiredPasses = {
|
|
|
38
36
|
'semantic-verification',
|
|
39
37
|
'adversarial',
|
|
40
38
|
'coverage',
|
|
41
|
-
'reconciliation',
|
|
42
39
|
'redundant-gather',
|
|
43
40
|
'redundant-verification',
|
|
44
41
|
],
|
|
@@ -675,10 +672,6 @@ const passContracts = {
|
|
|
675
672
|
},
|
|
676
673
|
adversarial: { kind: 'recon.review-result', reviewKind: 'adversarial' },
|
|
677
674
|
coverage: { kind: 'recon.review-result', reviewKind: 'coverage' },
|
|
678
|
-
reconciliation: {
|
|
679
|
-
kind: 'recon.review-result',
|
|
680
|
-
reviewKind: 'reconciliation',
|
|
681
|
-
},
|
|
682
675
|
'redundant-verification': {
|
|
683
676
|
kind: 'recon.review-result',
|
|
684
677
|
reviewKind: 'redundant-verification',
|
|
@@ -747,7 +740,6 @@ const reviewWaveMode = {
|
|
|
747
740
|
semantic: 'semantic-verification',
|
|
748
741
|
adversarial: 'adversarial',
|
|
749
742
|
coverage: 'coverage',
|
|
750
|
-
reconciliation: 'reconciliation',
|
|
751
743
|
'redundant-verification': 'redundant-verification',
|
|
752
744
|
'contradiction-resolution': 'contradiction-resolution',
|
|
753
745
|
};
|
|
@@ -968,6 +960,13 @@ function validateApprovedLanes(
|
|
|
968
960
|
const written = new Set();
|
|
969
961
|
for (const [id, { reference, value }] of artifactsById) {
|
|
970
962
|
if (value.runId !== manifest.run.id) continue;
|
|
963
|
+
if (
|
|
964
|
+
value.kind === 'recon.review-result' &&
|
|
965
|
+
value.reviewKind === 'reconciliation' &&
|
|
966
|
+
value.reviewerLane === 'controller:reconcile-ledger-v1'
|
|
967
|
+
) {
|
|
968
|
+
continue;
|
|
969
|
+
}
|
|
971
970
|
const laneId = artifactLaneId(value);
|
|
972
971
|
if (laneId === null) continue;
|
|
973
972
|
const approved = lanes.get(laneId);
|
|
@@ -1243,33 +1242,68 @@ function sameReference(left, right) {
|
|
|
1243
1242
|
}
|
|
1244
1243
|
|
|
1245
1244
|
function resolveTerminalReconciliation(
|
|
1245
|
+
manifest,
|
|
1246
1246
|
artifactsById,
|
|
1247
1247
|
artifactsByPath,
|
|
1248
|
-
passes,
|
|
1249
1248
|
reconciliationRequired,
|
|
1250
1249
|
errors,
|
|
1251
1250
|
) {
|
|
1252
|
-
const
|
|
1251
|
+
const declaration = manifest.execution?.reconciliation;
|
|
1253
1252
|
const reconciliationResults = [...artifactsById.values()].filter(
|
|
1254
1253
|
({ value }) =>
|
|
1255
1254
|
value.kind === 'recon.review-result' &&
|
|
1256
1255
|
value.reviewKind === 'reconciliation',
|
|
1257
1256
|
);
|
|
1258
1257
|
const expectedCount = reconciliationRequired ? 1 : 0;
|
|
1259
|
-
if (
|
|
1260
|
-
reconciliationResults.length !== expectedCount ||
|
|
1261
|
-
(reconciliationRequired &&
|
|
1262
|
-
reconciliationResults[0]?.value.id !== terminalId)
|
|
1263
|
-
) {
|
|
1258
|
+
if (reconciliationResults.length !== expectedCount) {
|
|
1264
1259
|
errors.push(
|
|
1265
1260
|
issue(
|
|
1266
1261
|
'SHADOW_RECONCILIATION',
|
|
1267
1262
|
'The packet must contain exactly its one complete terminal reconciliation',
|
|
1268
|
-
|
|
1263
|
+
declaration?.outputReview ?? '$.artifacts',
|
|
1264
|
+
),
|
|
1265
|
+
);
|
|
1266
|
+
}
|
|
1267
|
+
const entry = declaration
|
|
1268
|
+
? artifactsByPath.get(declaration.outputReview)
|
|
1269
|
+
: null;
|
|
1270
|
+
const outputLedgerEntry = declaration
|
|
1271
|
+
? artifactsByPath.get(declaration.outputLedger)
|
|
1272
|
+
: null;
|
|
1273
|
+
const reconciliation = entry?.value ?? null;
|
|
1274
|
+
if (
|
|
1275
|
+
reconciliationRequired &&
|
|
1276
|
+
(!entry ||
|
|
1277
|
+
reconciliation.reviewKind !== 'reconciliation' ||
|
|
1278
|
+
reconciliation.reviewerLane !== declaration.producer ||
|
|
1279
|
+
!sameReference(
|
|
1280
|
+
entry.reference,
|
|
1281
|
+
manifest.artifacts.find(
|
|
1282
|
+
(item) => item.path === declaration.outputReview,
|
|
1283
|
+
),
|
|
1284
|
+
))
|
|
1285
|
+
) {
|
|
1286
|
+
errors.push(
|
|
1287
|
+
issue(
|
|
1288
|
+
'INVALID_RECONCILIATION_BINDING',
|
|
1289
|
+
'Reconciliation result must match the manifest-bound controller producer and output path',
|
|
1290
|
+
declaration?.outputReview ?? '$.execution.reconciliation',
|
|
1291
|
+
),
|
|
1292
|
+
);
|
|
1293
|
+
}
|
|
1294
|
+
if (
|
|
1295
|
+
reconciliationRequired &&
|
|
1296
|
+
(!outputLedgerEntry ||
|
|
1297
|
+
outputLedgerEntry.value.kind !== 'recon.claim-ledger')
|
|
1298
|
+
) {
|
|
1299
|
+
errors.push(
|
|
1300
|
+
issue(
|
|
1301
|
+
'INVALID_RECONCILIATION_OUTPUT',
|
|
1302
|
+
'Controller reconciliation must produce its manifest-declared ledger candidate',
|
|
1303
|
+
declaration?.outputLedger ?? '$.execution.reconciliation',
|
|
1269
1304
|
),
|
|
1270
1305
|
);
|
|
1271
1306
|
}
|
|
1272
|
-
const reconciliation = artifactsById.get(terminalId)?.value ?? null;
|
|
1273
1307
|
const priorLedger = reconciliation
|
|
1274
1308
|
? ([...artifactsByPath.values()].find(
|
|
1275
1309
|
({ reference, value }) =>
|
|
@@ -1277,7 +1311,11 @@ function resolveTerminalReconciliation(
|
|
|
1277
1311
|
value.kind === 'recon.claim-ledger',
|
|
1278
1312
|
)?.value ?? null)
|
|
1279
1313
|
: null;
|
|
1280
|
-
return {
|
|
1314
|
+
return {
|
|
1315
|
+
reconciliation,
|
|
1316
|
+
priorLedger,
|
|
1317
|
+
outputLedger: outputLedgerEntry?.value ?? null,
|
|
1318
|
+
};
|
|
1281
1319
|
}
|
|
1282
1320
|
|
|
1283
1321
|
function reviewBriefBindsClaim(brief, reviewKind, claim, ledger, manifest) {
|
|
@@ -2462,12 +2500,26 @@ export async function compileValidatedRun(packetDirectory) {
|
|
|
2462
2500
|
const reconciliationRequired =
|
|
2463
2501
|
achievedProfile === 'standard' || achievedProfile === 'thorough';
|
|
2464
2502
|
const reconciliationContext = resolveTerminalReconciliation(
|
|
2503
|
+
manifest,
|
|
2465
2504
|
artifactsById,
|
|
2466
2505
|
artifactsByPath,
|
|
2467
|
-
passes,
|
|
2468
2506
|
reconciliationRequired,
|
|
2469
2507
|
errors,
|
|
2470
2508
|
);
|
|
2509
|
+
if (
|
|
2510
|
+
reconciliationRequired &&
|
|
2511
|
+
reconciliationContext.outputLedger &&
|
|
2512
|
+
hashCanonicalJson(reconciliationContext.outputLedger) !==
|
|
2513
|
+
hashCanonicalJson(ledger)
|
|
2514
|
+
) {
|
|
2515
|
+
errors.push(
|
|
2516
|
+
issue(
|
|
2517
|
+
'RECONCILIATION_PROMOTION_MISMATCH',
|
|
2518
|
+
'Canonical claims.json must exactly match the validated controller ledger candidate',
|
|
2519
|
+
'$.claims',
|
|
2520
|
+
),
|
|
2521
|
+
);
|
|
2522
|
+
}
|
|
2471
2523
|
if (
|
|
2472
2524
|
routing &&
|
|
2473
2525
|
(!reconciliationRequired || reconciliationContext.priorLedger)
|
|
@@ -2599,29 +2651,7 @@ async function main(argv) {
|
|
|
2599
2651
|
process.exitCode = result.publishable ? 0 : 1;
|
|
2600
2652
|
}
|
|
2601
2653
|
|
|
2602
|
-
|
|
2603
|
-
* Direct invocation, compared as canonical paths on both sides. Comparing a raw
|
|
2604
|
-
* `process.argv[1]` against `import.meta.url` makes this script a silent no-op
|
|
2605
|
-
* that exits 0 whenever the skill is reached through a symlinked install root,
|
|
2606
|
-
* and canonicalizing only one side has the same effect under
|
|
2607
|
-
* `--preserve-symlinks-main`, which keeps the link in `import.meta.url`.
|
|
2608
|
-
* A path that cannot be canonicalized is not a module Node loaded as the entry
|
|
2609
|
-
* point, so a thrown `realpathSync` means "not invoked directly" and returns
|
|
2610
|
-
* `false`; it never masks a direct run.
|
|
2611
|
-
*/
|
|
2612
|
-
function isDirectInvocation(invokedPath) {
|
|
2613
|
-
if (!invokedPath) return false;
|
|
2614
|
-
try {
|
|
2615
|
-
return (
|
|
2616
|
-
realpathSync(fileURLToPath(import.meta.url)) ===
|
|
2617
|
-
realpathSync(resolve(invokedPath))
|
|
2618
|
-
);
|
|
2619
|
-
} catch {
|
|
2620
|
-
return false;
|
|
2621
|
-
}
|
|
2622
|
-
}
|
|
2623
|
-
|
|
2624
|
-
if (isDirectInvocation(process.argv[1])) {
|
|
2654
|
+
if (isDirectExecution(import.meta.url)) {
|
|
2625
2655
|
main(process.argv.slice(2)).catch((error) => {
|
|
2626
2656
|
process.stderr.write(`${error instanceof Error ? error.message : error}\n`);
|
|
2627
2657
|
process.exitCode = 2;
|
package/assets/templates/plan.md
CHANGED
|
@@ -189,7 +189,7 @@ cell; never truncate a widened row back to five columns.
|
|
|
189
189
|
- `received`: review artifact exists (not yet converted into fix tasks)
|
|
190
190
|
- `fixes_added`: fix tasks were added to the plan (work queued)
|
|
191
191
|
- `fixes_completed`: fix tasks implemented, awaiting re-review
|
|
192
|
-
- `passed`: re-review run and recorded as passing (no Critical/
|
|
192
|
+
- `passed`: re-review run and recorded as passing (no Critical/High)
|
|
193
193
|
|
|
194
194
|
---
|
|
195
195
|
|
|
@@ -55,9 +55,9 @@ async function writeArtifact() {
|
|
|
55
55
|
`oat_invocation_reasoning_effort: ${promptValue('oat_invocation_reasoning_effort')}`,
|
|
56
56
|
`oat_invocation_source: ${promptValue('oat_invocation_source')}`,
|
|
57
57
|
'oat_review_critical_count: 0',
|
|
58
|
-
'
|
|
58
|
+
'oat_review_high_count: 0',
|
|
59
59
|
'oat_review_medium_count: 0',
|
|
60
|
-
'
|
|
60
|
+
'oat_review_low_count: 0',
|
|
61
61
|
'---',
|
|
62
62
|
'',
|
|
63
63
|
'# Fake runtime review',
|
|
@@ -68,7 +68,7 @@ async function writeArtifact() {
|
|
|
68
68
|
'',
|
|
69
69
|
'None',
|
|
70
70
|
'',
|
|
71
|
-
'###
|
|
71
|
+
'### High',
|
|
72
72
|
'',
|
|
73
73
|
'None',
|
|
74
74
|
'',
|
|
@@ -76,7 +76,7 @@ async function writeArtifact() {
|
|
|
76
76
|
'',
|
|
77
77
|
'None',
|
|
78
78
|
'',
|
|
79
|
-
'###
|
|
79
|
+
'### Low',
|
|
80
80
|
'',
|
|
81
81
|
'None',
|
|
82
82
|
'',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/gate/index.ts"],"names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E,qBAAqB,CAAC;IAChC,QAAQ,EAAE;QACR,KAAK,EAAE,MAAM,CAAC;QACd,UAAU,EAAE,kBAAkB,CAAC;QAC/B,UAAU,EAAE,kBAAkB,CAAC;QAC/B,MAAM,EAAE,WAAW,CAAC;QACpB,MAAM,EAAE,oBAAoB,CAAC,QAAQ,CAAC,CAAC;QACvC,aAAa,EAAE,WAAW,EAAE,CAAC;QAC7B,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;QAC9B,sBAAsB,CAAC,EAAE,MAAM,CAAC;KACjC,CAAC;IACF,QAAQ,EAAE;QACR,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,EAAE,WAAW,CAAC;QACpB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAi3CD,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,EAC9C,cAAc,EAAE,MAAM,EACtB,KAAK,EAAE,kBAAkB,EACzB,gBAAgB,CAAC,EAAE,oBAAoB,GACtC,kBAAkB,GAAG,IAAI,CAS3B;AA+xFD,wBAAgB,iBAAiB,CAC/B,SAAS,GAAE,OAAO,CAAC,uBAAuB,CAAM,GAC/C,OAAO,CAsOT"}
|
|
@@ -65,10 +65,18 @@ const VALID_CROSS_PROVIDER_AVOIDS = [
|
|
|
65
65
|
];
|
|
66
66
|
const VALID_REVIEW_GATE_THRESHOLDS = [
|
|
67
67
|
'critical',
|
|
68
|
-
'
|
|
68
|
+
'high',
|
|
69
69
|
'medium',
|
|
70
|
-
'
|
|
70
|
+
'low',
|
|
71
71
|
];
|
|
72
|
+
/**
|
|
73
|
+
* Threshold aliases accepted from configuration written before the severity
|
|
74
|
+
* rename, so an existing `exit_nonzero_on: important` keeps its meaning.
|
|
75
|
+
*/
|
|
76
|
+
const LEGACY_REVIEW_GATE_THRESHOLDS = new Map([
|
|
77
|
+
['important', 'high'],
|
|
78
|
+
['minor', 'low'],
|
|
79
|
+
]);
|
|
72
80
|
const VALID_IDENTITY_PROVENANCES = [
|
|
73
81
|
'declared',
|
|
74
82
|
'observed',
|
|
@@ -76,7 +84,7 @@ const VALID_IDENTITY_PROVENANCES = [
|
|
|
76
84
|
'unknown',
|
|
77
85
|
];
|
|
78
86
|
const REVIEW_GATE_CONTEXT_NOTE = [
|
|
79
|
-
'This review is gate-originated. If you run `oat-project-review-provide`, set `oat_review_invocation: gate` in the review artifact. Write a canonical review artifact with `### Critical`, `###
|
|
87
|
+
'This review is gate-originated. If you run `oat-project-review-provide`, set `oat_review_invocation: gate` in the review artifact. Write a canonical review artifact with `### Critical`, `### High`, `### Medium`, and `### Low` headings in that order, using `None` for empty sections.',
|
|
80
88
|
'Complete the review, artifact write, and required bookkeeping inline or through a synchronously awaited child before this headless process exits. Do not start background tasks, monitors, or waiters that outlive this turn.',
|
|
81
89
|
"Artifact hygiene contract: Before finishing or committing, format every file you created or edited. Use the concrete write/fix formatting command supplied by the governing plan, task, or brief. If none is usable, discover the repository's documented write/fix command from applicable `AGENTS.md`/`CLAUDE.md` instructions and relevant package manifests; do not infer or hardcode a formatter. Prefer a file-scoped invocation when supported, and avoid rewriting unrelated files. If no command is discoverable, warn once with `no format command discovered in repo instructions; skipping`, then continue.",
|
|
82
90
|
].join('\n\n');
|
|
@@ -349,9 +357,10 @@ function parseCrossProviderAvoid(value) {
|
|
|
349
357
|
return avoid;
|
|
350
358
|
}
|
|
351
359
|
function parseReviewGateThreshold(value) {
|
|
352
|
-
const
|
|
360
|
+
const raw = value?.trim() || 'high';
|
|
361
|
+
const threshold = LEGACY_REVIEW_GATE_THRESHOLDS.get(raw) ?? raw;
|
|
353
362
|
if (!VALID_REVIEW_GATE_THRESHOLDS.includes(threshold)) {
|
|
354
|
-
throw new Error('--exit-nonzero-on must be one of critical |
|
|
363
|
+
throw new Error('--exit-nonzero-on must be one of critical | high | medium | low.');
|
|
355
364
|
}
|
|
356
365
|
return threshold;
|
|
357
366
|
}
|
|
@@ -1421,10 +1430,10 @@ function reviewBlocksAtThreshold(verdict, threshold) {
|
|
|
1421
1430
|
if (threshold === 'critical') {
|
|
1422
1431
|
return false;
|
|
1423
1432
|
}
|
|
1424
|
-
if (verdict.counts.
|
|
1433
|
+
if (verdict.counts.high > 0) {
|
|
1425
1434
|
return true;
|
|
1426
1435
|
}
|
|
1427
|
-
if (threshold === '
|
|
1436
|
+
if (threshold === 'high') {
|
|
1428
1437
|
return false;
|
|
1429
1438
|
}
|
|
1430
1439
|
if (verdict.counts.medium > 0) {
|
|
@@ -1433,7 +1442,7 @@ function reviewBlocksAtThreshold(verdict, threshold) {
|
|
|
1433
1442
|
if (threshold === 'medium') {
|
|
1434
1443
|
return false;
|
|
1435
1444
|
}
|
|
1436
|
-
return verdict.counts.
|
|
1445
|
+
return verdict.counts.low > 0;
|
|
1437
1446
|
}
|
|
1438
1447
|
function buildReviewGateHandoff(options) {
|
|
1439
1448
|
const receiveInstruction = `Run oat-project-review-receive for ${options.artifactPath} before treating this gate review as consumed.`;
|
|
@@ -1481,7 +1490,7 @@ function writeReviewGateResult(context, payload) {
|
|
|
1481
1490
|
if (payload.normalization) {
|
|
1482
1491
|
context.logger.info(`${payload.normalization.persisted ? 'Artifact normalized' : 'Artifact snapshot normalized in memory; source file unchanged'}: inserted ${payload.normalization.insertedSeverities.map((severity) => severityDisplayName(severity)).join(', ')} empty Findings section(s).`);
|
|
1483
1492
|
}
|
|
1484
|
-
context.logger.info(`Verdict: ${payload.status} (critical=${payload.counts.critical},
|
|
1493
|
+
context.logger.info(`Verdict: ${payload.status} (critical=${payload.counts.critical}, high=${payload.counts.high}, medium=${payload.counts.medium}, low=${payload.counts.low})`);
|
|
1485
1494
|
if (payload.diversity) {
|
|
1486
1495
|
if (payload.diversity.warning) {
|
|
1487
1496
|
context.logger.warn(payload.diversity.warning);
|
|
@@ -1893,7 +1902,7 @@ async function emitGateProjectLogPartialFinalization(options) {
|
|
|
1893
1902
|
}
|
|
1894
1903
|
async function finalizeReviewGateProjectLog(context, dependencies, finalization) {
|
|
1895
1904
|
const findings = finalization.counts
|
|
1896
|
-
? ` findings=critical:${finalization.counts.critical},
|
|
1905
|
+
? ` findings=critical:${finalization.counts.critical},high:${finalization.counts.high},medium:${finalization.counts.medium},low:${finalization.counts.low}`
|
|
1897
1906
|
: '';
|
|
1898
1907
|
const artifact = finalization.artifactPath
|
|
1899
1908
|
? ` artifact=${finalization.artifactPath}`
|
|
@@ -3012,7 +3021,7 @@ export function createGateCommand(overrides = {}) {
|
|
|
3012
3021
|
.option('--project <path-or-name>', 'Project path or name to review; defaults to the active project')
|
|
3013
3022
|
.option('--review-scope <scope>', 'Review scope hint for the provider')
|
|
3014
3023
|
.option('--review-type <type>', 'Review type hint for the provider')
|
|
3015
|
-
.option('--exit-nonzero-on <severity>', 'Lowest severity that exits nonzero: critical,
|
|
3024
|
+
.option('--exit-nonzero-on <severity>', 'Lowest severity that exits nonzero: critical, high, medium, or low')
|
|
3016
3025
|
.argument('<prompt...>', 'Review prompt arguments appended to the target command')
|
|
3017
3026
|
.action(async (prompt, options, command) => {
|
|
3018
3027
|
const context = dependencies.buildCommandContext(readGlobalOptions(command));
|
|
@@ -7,9 +7,9 @@ export interface ReviewGateVerdict {
|
|
|
7
7
|
gateInvocation?: ReviewArtifactGateInvocation;
|
|
8
8
|
counts: {
|
|
9
9
|
critical: number;
|
|
10
|
-
|
|
10
|
+
high: number;
|
|
11
11
|
medium: number;
|
|
12
|
-
|
|
12
|
+
low: number;
|
|
13
13
|
};
|
|
14
14
|
blocking: boolean;
|
|
15
15
|
normalization?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"review-verdict.d.ts","sourceRoot":"","sources":["../../../src/commands/gate/review-verdict.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,iBAAiB;IAChC,YAAY,EAAE,MAAM,CAAC;IACrB,UAA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