@zhixuan92/multi-model-agent-core 4.5.0 → 4.5.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.
Files changed (77) hide show
  1. package/README.md +6 -6
  2. package/dist/escalation/fallback-helpers.d.ts.map +1 -1
  3. package/dist/escalation/fallback-helpers.js +0 -1
  4. package/dist/escalation/fallback-helpers.js.map +1 -1
  5. package/dist/events/event-builder.d.ts.map +1 -1
  6. package/dist/events/event-builder.js +41 -11
  7. package/dist/events/event-builder.js.map +1 -1
  8. package/dist/index.d.ts +0 -2
  9. package/dist/index.d.ts.map +1 -1
  10. package/dist/index.js +0 -1
  11. package/dist/index.js.map +1 -1
  12. package/dist/lifecycle/lifecycle-context.d.ts +0 -2
  13. package/dist/lifecycle/lifecycle-context.d.ts.map +1 -1
  14. package/dist/lifecycle/task-executor.d.ts.map +1 -1
  15. package/dist/lifecycle/task-executor.js +5 -7
  16. package/dist/lifecycle/task-executor.js.map +1 -1
  17. package/dist/lifecycle/task-runner.d.ts +0 -2
  18. package/dist/lifecycle/task-runner.d.ts.map +1 -1
  19. package/dist/lifecycle/task-runner.js +1 -9
  20. package/dist/lifecycle/task-runner.js.map +1 -1
  21. package/dist/providers/codex-cli-session.d.ts +1 -1
  22. package/dist/providers/codex-cli-session.d.ts.map +1 -1
  23. package/dist/providers/codex-cli-session.js +6 -1
  24. package/dist/providers/codex-cli-session.js.map +1 -1
  25. package/dist/reporting/headline-templates/audit.d.ts.map +1 -1
  26. package/dist/reporting/headline-templates/audit.js +10 -14
  27. package/dist/reporting/headline-templates/audit.js.map +1 -1
  28. package/dist/reporting/headline-templates/debug.d.ts +3 -5
  29. package/dist/reporting/headline-templates/debug.d.ts.map +1 -1
  30. package/dist/reporting/headline-templates/debug.js +5 -8
  31. package/dist/reporting/headline-templates/debug.js.map +1 -1
  32. package/dist/reporting/headline-templates/review.d.ts.map +1 -1
  33. package/dist/reporting/headline-templates/review.js +6 -7
  34. package/dist/reporting/headline-templates/review.js.map +1 -1
  35. package/dist/review/default-engines.d.ts +0 -2
  36. package/dist/review/default-engines.d.ts.map +1 -1
  37. package/dist/review/default-engines.js +0 -4
  38. package/dist/review/default-engines.js.map +1 -1
  39. package/dist/review/index.d.ts +0 -4
  40. package/dist/review/index.d.ts.map +1 -1
  41. package/dist/review/index.js +0 -4
  42. package/dist/review/index.js.map +1 -1
  43. package/dist/review/review-types.d.ts +0 -16
  44. package/dist/review/review-types.d.ts.map +1 -1
  45. package/dist/review/review-types.js +4 -1
  46. package/dist/review/review-types.js.map +1 -1
  47. package/dist/tools/audit/plan-audit-criteria.d.ts.map +1 -1
  48. package/dist/tools/audit/plan-audit-criteria.js +41 -18
  49. package/dist/tools/audit/plan-audit-criteria.js.map +1 -1
  50. package/dist/tools/audit/spec-audit-criteria.d.ts.map +1 -1
  51. package/dist/tools/audit/spec-audit-criteria.js +5 -3
  52. package/dist/tools/audit/spec-audit-criteria.js.map +1 -1
  53. package/dist/tools/audit/tool-config.js +2 -2
  54. package/dist/tools/audit/tool-config.js.map +1 -1
  55. package/dist/types/run-result.d.ts +0 -11
  56. package/dist/types/run-result.d.ts.map +1 -1
  57. package/package.json +3 -1
  58. package/dist/reporting/annotate-completion-parser.d.ts +0 -39
  59. package/dist/reporting/annotate-completion-parser.d.ts.map +0 -1
  60. package/dist/reporting/annotate-completion-parser.js +0 -43
  61. package/dist/reporting/annotate-completion-parser.js.map +0 -1
  62. package/dist/review/annotator-engine.d.ts +0 -44
  63. package/dist/review/annotator-engine.d.ts.map +0 -1
  64. package/dist/review/annotator-engine.js +0 -115
  65. package/dist/review/annotator-engine.js.map +0 -1
  66. package/dist/review/annotator-output-parser.d.ts +0 -13
  67. package/dist/review/annotator-output-parser.d.ts.map +0 -1
  68. package/dist/review/annotator-output-parser.js +0 -104
  69. package/dist/review/annotator-output-parser.js.map +0 -1
  70. package/dist/review/annotator-prompt-builder.d.ts +0 -29
  71. package/dist/review/annotator-prompt-builder.d.ts.map +0 -1
  72. package/dist/review/annotator-prompt-builder.js +0 -87
  73. package/dist/review/annotator-prompt-builder.js.map +0 -1
  74. package/dist/review/review-verdict-aggregator.d.ts +0 -17
  75. package/dist/review/review-verdict-aggregator.d.ts.map +0 -1
  76. package/dist/review/review-verdict-aggregator.js +0 -30
  77. package/dist/review/review-verdict-aggregator.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"codex-cli-session.d.ts","sourceRoot":"","sources":["../../src/providers/codex-cli-session.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAS,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAK9D,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAErG,OAAO,EAAuB,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACjF,OAAO,EAAsB,KAAK,aAAa,EAAmC,MAAM,sBAAsB,CAAC;AAI/G,UAAU,OAAO;IAAG,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;CAAE;AAOhE,qBAAa,eAAgB,YAAW,OAAO;IAWjC,OAAO,CAAC,QAAQ,CAAC,IAAI;IAVjC,OAAO,CAAC,QAAQ,CAAC,CAAS;IAC1B,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,OAAO,CAAC,CAAS;IACzB,OAAO,CAAC,QAAQ,CAAC,eAAe,CAK9B;gBAE2B,IAAI,EAAE;QAAE,GAAG,EAAE,cAAc,CAAC;QAAC,IAAI,EAAE,WAAW,CAAA;KAAE;IAEvE,IAAI,CAAC,WAAW,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;IA0GpE,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAU5B,OAAO,CAAC,SAAS;IA+BjB,OAAO,CAAC,aAAa;IAsCrB,OAAO,CAAC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mB,GAAG,CAAC,EAAE,OAAO,YAAA;IAInF,OAAO,CAAC,EAAE,EAAE,aAAa,GAAG,IAAI;IAuDhC,OAAO,CAAC,UAAU;IA6BlB,OAAO,CAAC,WAAW;IAyBnB,eAAe,IAAI,UAAU;CAQ9B;AAID,eAAO,MAAM,MAAM;;;CAAkC,CAAC;AAEtD;;;yEAGyE;AACzE,wBAAsB,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAIlF"}
@@ -15,7 +15,12 @@
15
15
  // 3. Multi-turn continuity via `codex exec resume <session_id>` is
16
16
  // verified end-to-end (gpt-5.5 recalled prior-turn context across a
17
17
  // fresh process spawn).
18
- import { spawn } from 'node:child_process';
18
+ // cross-spawn: POSIX-passthrough on Linux/macOS (delegates to node:child_process spawn
19
+ // without behavior change), and on Windows resolves `.cmd`/`.bat`/`.ps1` shims (e.g.
20
+ // `codex.cmd`) that node's native spawn cannot find without `shell: true` — which
21
+ // would be unsafe for our args (the `-c model_providers.X={…}` block contains shell
22
+ // metacharacters that cmd.exe would mangle). Single-purpose import.
23
+ import spawn from 'cross-spawn';
19
24
  import { readFile, mkdtemp, rm, writeFile } from 'node:fs/promises';
20
25
  import { tmpdir } from 'node:os';
21
26
  import { join } from 'node:path';
@@ -1 +1 @@
1
- {"version":3,"file":"codex-cli-session.js","sourceRoot":"","sources":["../../src/providers/codex-cli-session.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,uEAAuE;AACvE,yEAAyE;AACzE,2EAA2E;AAC3E,2CAA2C;AAC3C,EAAE;AACF,+CAA+C;AAC/C,uEAAuE;AACvE,yEAAyE;AACzE,0BAA0B;AAC1B,uEAAuE;AACvE,uEAAuE;AACvE,4EAA4E;AAC5E,qDAAqD;AACrD,qEAAqE;AACrE,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,EAAE,KAAK,EAAqB,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE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,GAAG,IAAI,CAAC,GAAG,EAAE,UAAU,IAAI,CAAC,GAAG,EAAE,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC;IAC3F,MAAM,SAAS,CAAC,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC;IACnD,OAAO,CAAC,CAAC;AACX,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../../src/reporting/headline-templates/audit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAKhE,eAAO,MAAM,qBAAqB,EAAE,gBA2CnC,CAAC"}
1
+ {"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../../src/reporting/headline-templates/audit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAKhE,eAAO,MAAM,qBAAqB,EAAE,gBAuCnC,CAAC"}
@@ -4,22 +4,18 @@ export const auditHeadlineTemplate = {
4
4
  compose({ report, status, runResult, task }) {
5
5
  const r = report;
6
6
  const reportInapplicable = !r || isNotApplicable(r);
7
- // Source priority for findings (4.0.3+):
7
+ // Source priority for findings (v4.5.2+):
8
8
  // 1. Structured report's `findings` (rare — only when the worker
9
9
  // emitted proper JSON matching the audit reportSchema).
10
- // 2. runResult.annotatedFindings (canonical narrative-path source
11
- // populated by the quality-chain handler when verdict='annotated').
12
- // 3. NEW: parseNarrativeFindings(runResult.output) recovers
13
- // findings directly from the implementer's `## Finding N:`
14
- // output when the annotator errored (parse failure, exhaustion).
15
- // Without this third fallback, audits where the annotator
16
- // failed report `0 findings (0 high)` even though the
17
- // implementer's narrative carried valid findings.
10
+ // 2. parseNarrativeFindings(runResult.output) recovers findings
11
+ // directly from the implementer's `## Finding N:` output when
12
+ // no structured report was emitted. This is the load-bearing
13
+ // path for read-route audits (their workers emit narrative,
14
+ // not structured JSON).
18
15
  const reportFindings = !reportInapplicable && Array.isArray(r?.findings) ? r.findings : [];
19
- const annotated = runResult?.annotatedFindings ?? [];
20
16
  let findings = reportFindings.length > 0
21
17
  ? reportFindings
22
- : annotated;
18
+ : [];
23
19
  if (findings.length === 0 && typeof runResult?.output === 'string') {
24
20
  const narrative = parseNarrativeFindings(runResult.output);
25
21
  if (narrative.length > 0)
@@ -29,9 +25,9 @@ export const auditHeadlineTemplate = {
29
25
  return `[${status}] audit completed`;
30
26
  }
31
27
  const high = countHighOrCritical(findings);
32
- // Document path fallback (per round-2 audit F3): when we fall back
33
- // to annotatedFindings, the structured report's documentPath is
34
- // absent. Pull from the task's filePaths instead.
28
+ // Document path fallback: when narrative-parse is the active source,
29
+ // the structured report's documentPath is absent; pull from the task's
30
+ // filePaths instead.
35
31
  const path = (!reportInapplicable && typeof r?.documentPath === 'string' ? r.documentPath : '')
36
32
  || task?.filePaths?.[0]
37
33
  || '';
@@ -1 +1 @@
1
- {"version":3,"file":"audit.js","sourceRoot":"","sources":["../../../src/reporting/headline-templates/audit.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAE7E,MAAM,CAAC,MAAM,qBAAqB,GAAqB;IACrD,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE;QACzC,MAAM,CAAC,GAAG,MAAiD,CAAC;QAC5D,MAAM,kBAAkB,GAAG,CAAC,CAAC,IAAI,eAAe,CAAC,CAAC,CAAC,CAAC;QAEpD,yCAAyC;QACzC,mEAAmE;QACnE,6DAA6D;QAC7D,oEAAoE;QACpE,yEAAyE;QACzE,gEAAgE;QAChE,gEAAgE;QAChE,sEAAsE;QACtE,+DAA+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B;QACrB,MAAM,IAAI,GACR,CAAC,CAAC,kBAAkB,IAAI,OAAO,CAAC,EAAE,YAAY,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAE,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;eAC/E,IAA6C,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC;eAC9D,EAAE,CAAC;QAER,OAAO,IAAI,MAAM,WAAW,IAAI,KAAK,QAAQ,CAAC,MAAM,cAAc,IAAI,QAAQ,CAAC;IACjF,CAAC;CACF,CAAC"}
@@ -13,11 +13,9 @@ import type { HeadlineTemplate } from '../headline-composer.js';
13
13
  * and no findings count — operator could not tell ok from error and
14
14
  * had no signal about how many real findings landed.
15
15
  *
16
- * Source priority for findings (parallel to audit):
17
- * 1. runResult.annotatedFindings (canonical annotator's structured
18
- * output when verdict='annotated').
19
- * 2. parseNarrativeFindings(runResult.output) — recovers `## Finding N:`
20
- * blocks from the implementer's narrative when the annotator errored.
16
+ * Findings source (v4.5.2+): parseNarrativeFindings(runResult.output)
17
+ * recovers `## Finding N:` blocks directly from the implementer's
18
+ * narrative.
21
19
  *
22
20
  * Note: debug's reportSchema.parse is intentionally a thrower (the tool
23
21
  * doesn't emit a structured report), so `report` is always notApplicable
@@ -1 +1 @@
1
- {"version":3,"file":"debug.d.ts","sourceRoot":"","sources":["../../../src/reporting/headline-templates/debug.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAGhE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,qBAAqB,EAAE,gBAsBnC,CAAC"}
1
+ {"version":3,"file":"debug.d.ts","sourceRoot":"","sources":["../../../src/reporting/headline-templates/debug.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAGhE;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,qBAAqB,EAAE,gBAoBnC,CAAC"}
@@ -13,11 +13,9 @@ import { countHighOrCritical, parseNarrativeFindings } from '../severity.js';
13
13
  * and no findings count — operator could not tell ok from error and
14
14
  * had no signal about how many real findings landed.
15
15
  *
16
- * Source priority for findings (parallel to audit):
17
- * 1. runResult.annotatedFindings (canonical annotator's structured
18
- * output when verdict='annotated').
19
- * 2. parseNarrativeFindings(runResult.output) — recovers `## Finding N:`
20
- * blocks from the implementer's narrative when the annotator errored.
16
+ * Findings source (v4.5.2+): parseNarrativeFindings(runResult.output)
17
+ * recovers `## Finding N:` blocks directly from the implementer's
18
+ * narrative.
21
19
  *
22
20
  * Note: debug's reportSchema.parse is intentionally a thrower (the tool
23
21
  * doesn't emit a structured report), so `report` is always notApplicable
@@ -25,9 +23,8 @@ import { countHighOrCritical, parseNarrativeFindings } from '../severity.js';
25
23
  */
26
24
  export const debugHeadlineTemplate = {
27
25
  compose({ status, runResult, task }) {
28
- const annotated = runResult?.annotatedFindings ?? [];
29
- let findings = annotated;
30
- if (findings.length === 0 && typeof runResult?.output === 'string') {
26
+ let findings = [];
27
+ if (typeof runResult?.output === 'string') {
31
28
  const narrative = parseNarrativeFindings(runResult.output);
32
29
  if (narrative.length > 0)
33
30
  findings = narrative;
@@ -1 +1 @@
1
- {"version":3,"file":"debug.js","sourceRoot":"","sources":["../../../src/reporting/headline-templates/debug.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAE7E;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAqB;IACrD,OAAO,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE;QACjC,MAAM,SAAS,GAAG,SAAS,EAAE,iBAAiB,IAAI,EAAE,CAAC;QACrD,IAAI,QAAQ,GACV,SAA0C,CAAC;QAC7C,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,IAAI,OAAO,SAAS,EAAE,MAAM,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AAS,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;QAEvE,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;YACnC,OAAO,IAAI,MAAM,mBAAmB,CAAC;QACvC,CAAC;QAED,MAAM,IAAI,GAAG,mBAAmB,CAAC,QAAQ,CAAC,CAAC;QAC3C,OAAO,IAAI;YACT,CAAC,CAAC,IAAI,MAAM,WAAW,IAAI,KAAK,QAAQ,CAAC,MAAM,cAAc,IAAI,QAAQ;YACzE,CAAC,CAAC,IAAI,MAAM,YAAY,QAAQ,CAAC,MAAM,cAAc,IAAI,QAAQ,CAAC;IACtE,CAAC;CACF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"review.d.ts","sourceRoot":"","sources":["../../../src/reporting/headline-templates/review.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAKhE,eAAO,MAAM,sBAAsB,EAAE,gBAwCpC,CAAC"}
1
+ {"version":3,"file":"review.d.ts","sourceRoot":"","sources":["../../../src/reporting/headline-templates/review.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAKhE,eAAO,MAAM,sBAAsB,EAAE,gBAuCpC,CAAC"}
@@ -4,16 +4,15 @@ export const reviewHeadlineTemplate = {
4
4
  compose({ report, status, taskBrief, runResult, task }) {
5
5
  const r = report;
6
6
  const reportInapplicable = !r || isNotApplicable(r);
7
- // Source priority (4.0.3+, parallel to audit):
8
- // 1. report.findings (structured)
9
- // 2. runResult.annotatedFindings (annotator success path)
10
- // 3. parseNarrativeFindings(runResult.output) (annotator error
11
- // fallback — recover from implementer's `## Finding N:` blocks)
7
+ // Source priority (v4.5.2+):
8
+ // 1. report.findings (structured — when the worker emitted proper JSON
9
+ // matching the per-route report schema)
10
+ // 2. parseNarrativeFindings(runResult.output) (recover from the
11
+ // implementer's `## Finding N:` blocks when no structured report)
12
12
  const reportFindings = !reportInapplicable && Array.isArray(r?.findings) ? r.findings : [];
13
- const annotated = runResult?.annotatedFindings ?? [];
14
13
  let findings = reportFindings.length > 0
15
14
  ? reportFindings
16
- : annotated;
15
+ : [];
17
16
  if (findings.length === 0 && typeof runResult?.output === 'string') {
18
17
  const narrative = parseNarrativeFindings(runResult.output);
19
18
  if (narrative.length > 0)
@@ -1 +1 @@
1
- {"version":3,"file":"review.js","sourceRoot":"","sources":["../../../src/reporting/headline-templates/review.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAE7E,MAAM,CAAC,MAAM,sBAAsB,GAAqB;IACtD,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE;QACpD,MAAM,CAAC,GAAG,MAAkD,CAAC;QAC7D,MAAM,kBAAkB,GAAG,CAAC,CAAC,IAAI,eAAe,CAAC,CAAC,CAAC,CAAC;QAEpD,+CAA+C;QAC/C,oCAAoC;QACpC,4DAA4D;QAC5D,iEAAiE;QACjE,qEAAqE;QACrE,MAAM,cAAc,GAAG,CAAC,kBAAkB,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;QAC5F,MAAM,SAAS,GAAG,SAAS,EAAE,iBAAiB,IAAI,EAAE,CAAC;QACrD,IAAI,QAAQ,GACV,cAAc,CAAC,MAAM,GAAG,CAAC;YACvB,CAAC,CAAE,cAAgD;YACnD,CAAC,CAAE,SAA2C,CAAC;QACnD,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,IAAI,OAAO,SAAS,EAAE,MAAM,KAAK,QAAQ,EAAE,CAAC;YACnE,MAAM,SAAS,GAAG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
2
- import { AnnotatorEngine } from './annotator-engine.js';
3
2
  export declare function createDefaultReviewerEngine(): ReviewerEngine;
4
- export declare function createDefaultAnnotatorEngine(): AnnotatorEngine;
5
3
  //# sourceMappingURL=default-engines.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"default-engines.d.ts","sourceRoot":"","sources":["../../src/review/default-engines.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAcxD,wBAAgB,2BAA2B,IAAI,cAAc,CAY5D;AAED,wBAAgB,4BAA4B,IAAI,eAAe,CAE9D"}
1
+ {"version":3,"file":"default-engines.d.ts","sourceRoot":"","sources":["../../src/review/default-engines.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AActD,wBAAgB,2BAA2B,IAAI,cAAc,CAY5D"}
@@ -1,5 +1,4 @@
1
1
  import { ReviewerEngine } from './reviewer-engine.js';
2
- import { AnnotatorEngine } from './annotator-engine.js';
3
2
  import { ReviewerPromptBuilder } from './reviewer-prompt-builder.js';
4
3
  // Pipeline-redesign (4.3.0+): spec/quality-AP/diff templates removed.
5
4
  // Their callers (spec-chain-handlers, quality-chain-handlers, review-diff-handler)
@@ -20,7 +19,4 @@ export function createDefaultReviewerEngine() {
20
19
  investigate: qualityInvestigateTemplate,
21
20
  }));
22
21
  }
23
- export function createDefaultAnnotatorEngine() {
24
- return new AnnotatorEngine();
25
- }
26
22
  //# sourceMappingURL=default-engines.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"default-engines.js","sourceRoot":"","sources":["../../src/review/default-engines.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACr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,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,0BAA0B,EAAE,MAAM,2CAA2C,CAAC;AAEvF,MAAM,UAAU,2BAA2B;IACzC,OAAO,IAAI,cAAc,CACvB,IAAI,qBAAqB,CACvB,EAAE,IAAI,EAAE,gBAAgB,EAAE,YAAY,EAAE,mBAAmB,EAAE,EAC7D;QACE,KAAK,EAAE,oBAAoB;QAC3B,MAAM,EAAE,qBAAqB;QAC7B,KAAK,EAAE,oBAAoB;QAC3B,WAAW,EAAE,0BAA0B;KACxC,CACF,CACF,CAAC;AACJ,CAAC"}
@@ -1,8 +1,4 @@
1
1
  export * from './reviewer-engine.js';
2
- export * from './annotator-engine.js';
3
2
  export * from './reviewer-prompt-builder.js';
4
- export * from './annotator-prompt-builder.js';
5
3
  export * from './reviewer-output-parser.js';
6
- export * from './annotator-output-parser.js';
7
- export * from './review-verdict-aggregator.js';
8
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/review/index.ts"],"names":[],"mappings":"AAEA,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/review/index.ts"],"names":[],"mappings":"AAEA,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC"}
@@ -1,9 +1,5 @@
1
1
  // review/index.ts — public surface barrel; per architecture.md:262-275.
2
2
  export * from './reviewer-engine.js';
3
- export * from './annotator-engine.js';
4
3
  export * from './reviewer-prompt-builder.js';
5
- export * from './annotator-prompt-builder.js';
6
4
  export * from './reviewer-output-parser.js';
7
- export * from './annotator-output-parser.js';
8
- export * from './review-verdict-aggregator.js';
9
5
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/review/index.ts"],"names":[],"mappings":"AAAA,wEAAwE;AAExE,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/review/index.ts"],"names":[],"mappings":"AAAA,wEAAwE;AAExE,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC"}
@@ -1,18 +1,2 @@
1
- export type FindingSeverity = 'critical' | 'high' | 'medium' | 'low';
2
- export interface AnnotatedFinding {
3
- id: string;
4
- claim: string;
5
- evidence: string;
6
- evidenceGrounded: boolean;
7
- category?: string;
8
- /** Annotator's final severity judgment (replaces the worker's stated
9
- * severity). Field name matches the JSON the LLM emits per
10
- * ANNOTATOR_RUBRIC — was previously typed as `reviewerSeverity` which
11
- * didn't match the runtime shape, so type-narrowing was a lie. */
12
- severity?: FindingSeverity;
13
- annotatorConfidence: number | null;
14
- suggestion?: string;
15
- }
16
1
  export type ReviewerVerdict = 'approved' | 'changes_required';
17
- export type AnnotatorVerdict = 'annotated' | 'error';
18
2
  //# sourceMappingURL=review-types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"review-types.d.ts","sourceRoot":"","sources":["../../src/review/review-types.ts"],"names":[],"mappings":"AAOA,MAAM,MAAM,eAAe,GAAG,UAAU,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAC;AAErE,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;uEAGmE;IACnE,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,MAAM,eAAe,GAAG,UAAU,GAAG,kBAAkB,CAAC;AAC9D,MAAM,MAAM,gBAAgB,GAAG,WAAW,GAAG,OAAO,CAAC"}
1
+ {"version":3,"file":"review-types.d.ts","sourceRoot":"","sources":["../../src/review/review-types.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,eAAe,GAAG,UAAU,GAAG,kBAAkB,CAAC"}
@@ -1,3 +1,6 @@
1
- // Shared types for the v4 review surface. Replaces findings-schema.ts.
1
+ // Shared types for the v4 review surface.
2
+ //
3
+ // FindingSeverity lives in reporting/severity.ts — the live event-builder /
4
+ // bucketing path. Don't duplicate it here.
2
5
  export {};
3
6
  //# sourceMappingURL=review-types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"review-types.js","sourceRoot":"","sources":["../../src/review/review-types.ts"],"names":[],"mappings":"AAAA,uEAAuE"}
1
+ {"version":3,"file":"review-types.js","sourceRoot":"","sources":["../../src/review/review-types.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,EAAE;AACF,4EAA4E;AAC5E,2CAA2C"}
@@ -1 +1 @@
1
- {"version":3,"file":"plan-audit-criteria.d.ts","sourceRoot":"","sources":["../../../src/tools/audit/plan-audit-criteria.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE1E;;;yCAGyC;AACzC,eAAO,MAAM,8BAA8B,QAsC/B,CAAC;AAEb,eAAO,MAAM,wBAAwB,QAOzB,CAAC;AAEb,eAAO,MAAM,qBAAqB,QAKtB,CAAC;AAEb,eAAO,MAAM,8BAA8B,QAO/B,CAAC;AAGb,eAAO,MAAM,wBAAwB,QA4CzB,CAAC;AAEb;;yEAEyE;AACzE,eAAO,MAAM,mBAAmB,EAAE,SAAS,cAAc,EAA4C,CAAC"}
1
+ {"version":3,"file":"plan-audit-criteria.d.ts","sourceRoot":"","sources":["../../../src/tools/audit/plan-audit-criteria.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE1E;;;yCAGyC;AACzC,eAAO,MAAM,8BAA8B,QAyC/B,CAAC;AAEb,eAAO,MAAM,wBAAwB,QAmBzB,CAAC;AAEb,eAAO,MAAM,qBAAqB,QAMtB,CAAC;AAEb,eAAO,MAAM,8BAA8B,QAO/B,CAAC;AAGb,eAAO,MAAM,wBAAwB,QAmDzB,CAAC;AAEb;;yEAEyE;AACzE,eAAO,MAAM,mBAAmB,EAAE,SAAS,cAAc,EAA4C,CAAC"}
@@ -25,13 +25,16 @@ import { parseCriteria } from '../criteria-types.js';
25
25
  * codebase), not internal-coherence. */
26
26
  export const PLAN_AUDIT_PURPOSE_ORIENTATION = [
27
27
  'Why this audit exists:',
28
- 'You are auditing a CODE-EXECUTION PLAN against a real codebase. The plan will subsequently be dispatched to literal-following workers via mma-execute-plan; if the plan names a method, file, type, or signature that does not match the codebase as it exists today, the worker will freeze on the contradiction or produce broken code. Your job: verify every plan claim against actual codebase ground truth.',
28
+ 'You are auditing a CODE-EXECUTION PLAN against a real codebase AND (when provided) against the upstream requirement spec. The plan will subsequently be dispatched to literal-following workers via mma-execute-plan; if the plan names a method, file, type, or signature that does not match the codebase as it exists today, the worker will freeze on the contradiction or produce broken code. If the plan silently skips a spec requirement, the implementation will ship incomplete. Your job: verify every plan claim against the actual codebase, and (when the spec is available) verify every spec requirement is covered by at least one task.',
29
29
  '',
30
- 'Your job is NOT prose-quality (that is the default audit\'s job). Your job is external coherence: for every named symbol, file path, signature, or import in the plan, the codebase must contain it as described — UNLESS the plan task is the one creating it. (See "How to classify a plan\'s mention of X" below.)',
30
+ 'Your job is NOT prose-quality on the plan itself (that is the default audit\'s job). Your job splits into three groups of perspectives:',
31
+ ' • EXTERNAL CODEBASE COHERENCE (perspectives 1–8) — for every named symbol, file path, signature, or import in the plan, the codebase must contain it as described UNLESS the plan task is the one creating it. (See "How to classify a plan\'s mention of X" below.) These perspectives REQUIRE source-side evidence (file:line).',
32
+ ' • INTRA-PLAN STRUCTURE (perspectives 9, 11, 12) — task granularity, placeholder language, and required plan skeleton. These perspectives look ONLY at the plan markdown itself; no codebase grounding is needed.',
33
+ ' • SPEC ALIGNMENT (perspective 10) — every load-bearing spec requirement maps to ≥1 task in the plan, and no task implements something the spec did not ask for. This perspective requires the reference SPEC to be available in your context (registered as a context block by the caller). If no spec is in context, emit "No findings for this criterion." for perspective 10 ONLY — do NOT skip the other perspectives.',
31
34
  '',
32
- 'Tool surface: read_file / grep / glob / list_files. The plan itself is in your filePaths input (one file). Source files are NOT pre-listed — you derive them from the plan\'s "Files: Modify:" / "Test:" / "Create:" blocks and from import statements in code blocks, then grep / read them yourself under cwd.',
35
+ 'Tool surface: read_file / grep / glob / list_files. The plan itself is in your filePaths input (one file). Source files are NOT pre-listed — you derive them from the plan\'s "Files: Modify:" / "Test:" / "Create:" blocks and from import statements in code blocks, then grep / read them yourself under cwd. The reference SPEC, when provided, lives in the cached prefix above as a registered context block — read it directly from there for perspective 10.',
33
36
  '',
34
- 'A finding without an actual file-and-line reference for the source side is speculation, not a load-bearing finding. Drop it. If a perspective has no findings to flag for this plan, that is the correct outcome — say so via the standard "No findings for this criterion." string and move on.',
37
+ 'A finding without an actual file-and-line reference for the source side is speculation FOR PERSPECTIVES 1–8 ONLY. Drop those. Perspectives 9, 11, 12 are intra-plan and need only a plan-side quote. Perspective 10 needs a spec-side quote (the requirement) plus a plan-side reference (the task that does or does not cover it). If a perspective has no findings to flag for this plan, that is the correct outcome — say so via the standard "No findings for this criterion." string and move on.',
35
38
  '',
36
39
  '— BEFORE FLAGGING — How to classify a plan\'s mention of X (REQUIRED triage step):',
37
40
  '',
@@ -63,26 +66,39 @@ export const PLAN_AUDIT_PURPOSE_ORIENTATION = [
63
66
  'Heuristic for fast classification: if the plan\'s code block has a function/method declaration syntax ON THE SAME LINE as the symbol name, it\'s DEFINE intent. If the symbol appears as a callee, an imported name, a type annotation, or a property access, it\'s USE intent.',
64
67
  ].join('\n');
65
68
  export const EVIDENCE_RULE_PLAN_AUDIT = [
66
- 'Evidence grounding (REQUIRED for every finding):',
69
+ 'Evidence grounding (REQUIRED for every finding — evidence shape varies by perspective group):',
70
+ '',
71
+ 'Perspectives 1–8 (EXTERNAL CODEBASE COHERENCE) — both sides REQUIRED:',
67
72
  '- Plan side: quote the exact line from the plan, with task ID + section reference (e.g. "Plan A1.4 step 3 line: `store.registerBlock(content, opts)`").',
68
73
  '- Source side: file path + line number + actual content (e.g. "`packages/core/src/stores/file-backed-context-block-store.ts:113` defines `register(content, opts)` — no method named `registerBlock`").',
69
74
  '- For SYMBOL-EXISTENCE findings: include the nearest match (Levenshtein) the worker found in the source. Example: "did you mean `register`? (Levenshtein distance 5)".',
70
75
  '- For SIGNATURE-MATCH findings: quote BOTH the plan\'s call (with parameter names/types) AND the source\'s actual signature.',
71
- '- A finding without both sides is speculation. Drop it.',
76
+ '- A finding without both sides on perspectives 1–8 is speculation. Drop it.',
77
+ '',
78
+ 'Perspective 10 (SPEC-COVERAGE) — both sides REQUIRED:',
79
+ '- Spec side: quote the exact `shall` / `must` / `should` clause (or the acceptance-criterion line) from the registered spec context block.',
80
+ '- Plan side: name the task that does (or does NOT) cover it. For absence findings: "no task in this plan implements <spec clause>". For scope-creep findings: "task X.Y implements <plan-side claim>, which has no corresponding spec requirement".',
81
+ '',
82
+ 'Perspectives 9, 11, 12 (INTRA-PLAN STRUCTURE) — plan-side quote sufficient:',
83
+ '- Quote the exact plan line that demonstrates the issue, with task ID + section reference. No codebase or spec evidence is needed; these are intra-document checks.',
84
+ '- For absence findings (e.g. missing Goal/Architecture header, missing Files: block, missing commit step): name the section that SHOULD contain it and confirm it does not.',
85
+ '',
86
+ 'Severity binding for all perspectives: critical = task BLOCKED at dispatch; high = ambiguous artifact; medium = recoverable with reordering or one-sentence edit; low = cosmetic.',
72
87
  ].join('\n');
73
88
  export const SCOPE_RULE_PLAN_AUDIT = [
74
89
  'Scope:',
75
- '- The plan markdown (your one filePath input) plus the source files the plan directly references (in "Files: Modify:" / "Test:" / "Create:" lines, or via `import` statements in code blocks).',
90
+ '- The plan markdown (your one filePath input), plus the source files the plan directly references (in "Files: Modify:" / "Test:" / "Create:" lines, or via `import` statements in code blocks), plus the reference SPEC if it was registered as a context block in your cached prefix.',
76
91
  '- Use grep / read_file targeted at the symbols and paths the plan names. DO NOT do an enumeration of the entire codebase.',
77
- '- Out of scope: prose-quality issues in the plan (use auditType=default for that), suggestions for refactoring the plan\'s recommendations, and any source files the plan does not reference.',
92
+ '- For perspective 10 (SPEC-COVERAGE): the spec lives in the registered context block above. Walk its requirement clauses against the plan\'s tasks; do NOT grep the codebase for spec content — that is not the perspective\'s job.',
93
+ '- Out of scope: prose-quality issues in the plan beyond placeholder-language scanning (use auditType=default for general prose quality), suggestions for refactoring the plan\'s recommendations, and any source files the plan does not reference.',
78
94
  ].join('\n');
79
95
  export const ANNOTATOR_AWARENESS_PLAN_AUDIT = [
80
96
  'After your output, an annotator validates each finding against this plan-audit-specific rubric:',
81
- '- Does the finding cite both plan-side and source-side evidence (with file:line for the source)?',
82
- '- Is the finding categorized correctly by perspective (1 PATH / 2 SYMBOL / 3 SIGNATURE / 4 IMPORT / 5 TEST HARNESS / 6 STEP SEQUENCE / 7 CROSS-TASK / 8 VERIFY CMD)?',
97
+ '- Does the finding cite the right evidence shape for its perspective group? (1–8: plan-side quote + source-side file:line; 10: spec-side clause quote + plan-side task reference; 9/11/12: plan-side quote alone, no codebase grounding needed.)',
98
+ '- Is the finding categorized correctly by perspective (1 PATH / 2 SYMBOL / 3 SIGNATURE / 4 IMPORT / 5 TEST HARNESS / 6 STEP SEQUENCE / 7 CROSS-TASK / 8 VERIFY CMD / 9 TASK GRANULARITY / 10 SPEC COVERAGE / 11 PLACEHOLDER LANGUAGE / 12 PLAN SKELETON)?',
83
99
  '- Is the severity calibrated to actual dispatch impact (CRITICAL only when the task would BLOCK; HIGH for ambiguity that produces wrong artifact; MEDIUM for recoverable; LOW for cosmetic)?',
84
- '- Does the finding name a specific task ID (e.g. "A1.4") so the merge annotator can group findings by task to compute per-task verdicts?',
85
- 'Self-check before emitting. Findings missing source-side evidence are downgraded to LOW or dropped — but findings backed by file:line citations from a real file are FULLY VALID, do NOT downgrade them as "speculation."',
100
+ '- Does the finding name a specific task ID (e.g. "A1.4") so the merge annotator can group findings by task to compute per-task verdicts? For plan-level findings that do not attach to a single task (e.g. missing top-level header, spec requirement with no covering task), use the task ID "META".',
101
+ 'Self-check before emitting. Findings on perspectives 1–8 missing source-side evidence are downgraded to LOW or dropped — but findings backed by file:line citations from a real file are FULLY VALID, do NOT downgrade them as "speculation." Findings on perspectives 9, 11, 12 with only a plan-side quote are FULLY VALID — they are intra-plan checks by design.',
86
102
  ].join('\n');
87
103
  export const PLAN_AUDIT_FAILURE_MODES = [
88
104
  'Plan-audit perspectives — applicable to code-execution plans being audited against a real codebase. Each perspective is one verification dimension; emitting zero findings for a perspective means "this dimension passes for this plan." Do not invent findings to hit a quota — if a perspective has nothing to flag, stay silent for that dimension. Apply each perspective end-to-end across every task in the plan. Use read_file / grep / glob / list_files to ground every finding in actual file-and-line evidence; findings without a real source-side reference are not load-bearing and must be dropped.',
@@ -105,11 +121,17 @@ export const PLAN_AUDIT_FAILURE_MODES = [
105
121
  '',
106
122
  '9. TASK GRANULARITY — each task should be implementable in one focused sub-agent run. Flag tasks that are oversized for single-run execution. Concrete signals (any one or in combination): the task touches more than 3 distinct source files; the task\'s code blocks contain more than ~40 net lines of diff; the task mixes unrelated concerns (e.g. extending a config schema AND adding a new module AND wiring a CLI flag in one task heading); the task lists more than ~6 numbered steps. Severity HIGH when the task clearly exceeds standard-tier capacity (would force escalation to complex tier or thrash through review/rework rounds); MEDIUM when borderline. Suggested fix: split into atomic sub-tasks, one per file or one per concept, each with its own "Files:" block and numbered steps. The audit-fix loop iterates: author re-runs plan-audit, sees tasks downsized, re-audits until clean. This perspective is the upstream complement to perspective 6 (STEP SEQUENCE WITHIN TASK) — perspective 6 catches ordering bugs WITHIN a task; this one catches "task is too big to be one task at all."',
107
123
  '',
124
+ '10. SPEC COVERAGE — every load-bearing requirement in the reference SPEC maps to at least one task in this plan, and no task implements a deliverable the spec did not ask for. Requires the spec to be available in your context (registered by the caller as a context block; read it from the cached prefix above). If no spec is in context, emit "No findings for this criterion." — that is the correct outcome when the caller did not provide one. When the spec IS in context, walk each `shall` / `must` / `should` clause (and each named acceptance criterion or architecture component) against the plan\'s task list. For each unmapped requirement: severity CRITICAL when load-bearing (the feature does not work without it), HIGH when supporting (test coverage, observability hook, non-functional requirement that the spec marked as required). For scope-creep (task implements something the spec did not request): severity HIGH if the work is substantive (>1 task or new deliverable), MEDIUM if minor (extra polish that does not affect cost / risk). Implicit mapping (task plausibly covers the requirement but does not say so explicitly) is MEDIUM with the suggested fix: add an explicit "Covers spec requirement: <quote>" line to the task description. Use task ID "META" for findings that point at an uncovered requirement (the task does not exist).',
125
+ '',
126
+ '11. PLACEHOLDER LANGUAGE — scan every task\'s steps and code blocks for prose patterns that the writing-plans skill classifies as "plan failures" because they leave a literal-following worker unable to act. Concrete signals: bare phrases `TBD`, `TODO`, `implement later`, `fill in details`, `Add appropriate error handling`, `add validation`, `handle edge cases`, `Similar to Task N` (without repeating the code), `Write tests for the above` (without showing the test code); steps that describe what to do without showing how when the step changes code (missing code block); verification instructions like `make sure it works` or `run the test` with no concrete command. Severity HIGH on load-bearing steps that cannot be executed without invention (e.g. an implementation step with no code block, a "TBD" in the middle of a task\'s numbered list); MEDIUM on vague verification instructions (worker has to guess but can recover); LOW on cosmetic placeholders in non-load-bearing prose (e.g. a "TODO: link to design doc" in the plan\'s preamble). Evidence is the exact placeholder quote with task ID + step number; no codebase grounding needed.',
127
+ '',
128
+ '12. PLAN SKELETON — the plan must carry the required structural scaffolding so a worker knows what the plan is for and where each task fits. Concrete signals to flag: missing or empty top-level header (`Goal:` / `Architecture:` / `Tech Stack:` lines); missing top-level File Structure section that maps the files-to-touch with their responsibilities before the task list begins; a task that has no `Files:` block (so the worker cannot tell which files to Create / Modify / Test); a task that has no commit step at the end (frequent-commits discipline is a writing-plans hard rule). Severity MEDIUM for missing required-header fields and missing per-task `Files:` blocks (worker can still execute but loses framing or has to derive file scope from code blocks); HIGH when the missing structure forces ambiguous file-scope decisions (e.g. a task whose code blocks reference multiple files but has no `Files:` block to say which is the modify target); LOW for missing commit steps and other discipline gaps. Evidence is plan-side: name the section that should contain the structure and confirm it is absent. Use task ID "META" for plan-level skeleton findings; use the specific task ID for per-task skeleton findings.',
129
+ '',
108
130
  'Severity calibration for plan audits:',
109
- '- critical: plan claim contradicts codebase ground truth in a way that BLOCKS dispatch task cannot start as written. Examples: missing modify-target file (perspective 1), wrong method name (perspective 2), wrong signature/return type (perspective 3), missing module export (perspective 4), out-of-order task dependency (perspective 7), wrong tooling (perspective 8).',
110
- '- high: load-bearing ambiguity that risks wrong implementation. Plan signature is consistent with itself but multiple matching symbols exist in the source and the plan doesn\'t disambiguate. Test harness missing in the form claimed but the worker could synthesize. Step depends on later step in a recoverable but ambiguous way. The task may execute, but produces an ambiguous artifact.',
111
- '- medium: step ordering issue, cross-task dependency unstated but inferable, verify command vague but recoverable, missing parent dirs for create-targets. Fixable by reordering or adding a sentence; doesn\'t block dispatch.',
112
- '- low: stylistic, missing metadata, naming preference. Cosmetic.',
131
+ '- critical: plan claim contradicts codebase ground truth in a way that BLOCKS dispatch, OR a load-bearing spec requirement has zero covering tasks. Examples: missing modify-target file (perspective 1), wrong method name (perspective 2), wrong signature/return type (perspective 3), missing module export (perspective 4), out-of-order task dependency (perspective 7), wrong tooling (perspective 8), uncovered load-bearing spec requirement (perspective 10).',
132
+ '- high: load-bearing ambiguity that risks wrong implementation. Plan signature is consistent with itself but multiple matching symbols exist in the source and the plan doesn\'t disambiguate. Test harness missing in the form claimed but the worker could synthesize. Step depends on later step in a recoverable but ambiguous way. Oversized task that must be split (perspective 9). Substantive scope-creep with no spec backing (perspective 10). Placeholder language on a load-bearing step (perspective 11). Missing `Files:` block that forces ambiguous file-scope (perspective 12). The task may execute, but produces an ambiguous artifact.',
133
+ '- medium: step ordering issue, cross-task dependency unstated but inferable, verify command vague but recoverable, missing parent dirs for create-targets, implicit spec mapping (perspective 10 — task plausibly covers a requirement but does not say so), vague verification instructions (perspective 11), missing required header / Files block on a single task (perspective 12). Fixable by reordering or adding a sentence; doesn\'t block dispatch.',
134
+ '- low: stylistic, missing metadata, naming preference, cosmetic placeholder in non-load-bearing prose, missing commit step. Cosmetic.',
113
135
  '',
114
136
  'Per-task verdict (the merge-annotator computes this from all sub-worker findings):',
115
137
  '- EXECUTABLE: zero CRITICAL or HIGH findings against this task across all 8 perspectives.',
@@ -125,8 +147,9 @@ export const PLAN_AUDIT_FAILURE_MODES = [
125
147
  '- Suggested fix: concrete edit (e.g. "rename `registerBlock` → `register` in plan A1.4 step 3", or "rename source method to match plan").',
126
148
  '',
127
149
  'Anti-patterns to avoid:',
128
- '- Speculation without source-file evidence. If you can\'t open the file and find the line, drop the finding.',
129
- '- Flagging a perspective on prose-quality grounds. That\'s the default audit\'s job, not yours. You only flag external coherence (plan vs codebase).',
150
+ '- Speculation without source-file evidence ON PERSPECTIVES 1–8. If you can\'t open the file and find the line, drop the finding for those perspectives. Perspectives 9, 11, 12 are intra-plan and do not need source evidence — quoting the plan IS the evidence.',
151
+ '- Flagging general prose-quality on the plan. That\'s the default audit\'s job. You flag external coherence (perspectives 1–8), plan-vs-spec coverage (perspective 10), task granularity (perspective 9), the specific placeholder-language patterns in perspective 11, and the specific structural skeleton requirements in perspective 12. Other prose nits (sentence flow, paragraph organization, tone) are out of scope.',
152
+ '- Flagging perspective 10 (SPEC COVERAGE) without a spec in context. If no spec was registered, emit "No findings for this criterion." for perspective 10 — do not invent the spec or grep for it elsewhere.',
130
153
  '- Inventing findings to fill quota. Zero findings on a perspective is the correct outcome when the dimension passes.',
131
154
  ].join('\n');
132
155
  /** Parsed criterion array for the parallel-criteria fan-out. Eight
@@ -1 +1 @@
1
- {"version":3,"file":"plan-audit-criteria.js","sourceRoot":"","sources":["../../../src/tools/audit/plan-audit-criteria.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,aAAa,EAAuB,MAAM,sBAAsB,CAAC;AAE1E;;;yCAGyC;AACzC,MAAM,CAAC,MAAM,8BAA8B,GAAG;IAC5C,wBAAwB;IACxB,mZAAmZ;IACnZ,EAAE;IACF,uTAAuT;IACvT,EAAE;IACF,kTAAkT;IAClT,EAAE;IACF,kSAAkS;IAClS,EAAE;IACF,oFAAoF;IACpF,EAAE;IACF,kOAAkO;IAClO,EAAE;IACF,yHAAyH;IACzH,uFAAuF;IACvF,6EAA6E;IAC7E,uDAAuD;IACvD,kFAAkF;IAClF,sEAAsE;IACtE,EAAE;IACF,sFAAsF;IACtF,oGAAoG;IACpG,wGAAwG;IACxG,yEAAyE;IACzE,kFAAkF;IAClF,2FAA2F;IAC3F,6CAA6C;IAC7C,uDAAuD;IACvD,EAAE;IACF,kCAAkC;IAClC,+IAA+I;IAC/I,wLAAwL;IACxL,mJAAmJ;IACnJ,EAAE;IACF,oiBAAoiB;IACpiB,EAAE;IACF,iRAAiR;CAClR,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEb,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,kDAAkD;IAClD,yJAAyJ;IACzJ,yMAAyM;IACzM,wKAAwK;IACxK,8HAA8H;IAC9H,yDAAyD;CAC1D,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEb,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,QAAQ;IACR,gMAAgM;IAChM,2HAA2H;IAC3H,+LAA+L;CAChM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEb,MAAM,CAAC,MAAM,8BAA8B,GAAG;IAC5C,iGAAiG;IACjG,kGAAkG;IAClG,sKAAsK;IACtK,8LAA8L;IAC9L,0IAA0I;IAC1I,2NAA2N;CAC5N,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAGb,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,qlBAAqlB;IACrlB,EAAE;IACF,+mBAA+mB;IAC/mB,EAAE;IACF,o1BAAo1B;IACp1B,EAAE;IACF,kwBAAkwB;IAClwB,EAAE;IACF,skBAAskB;IACtkB,EAAE;IACF,6oBAA6oB;IAC7oB,EAAE;IACF,iZAAiZ;IACjZ,EAAE;IACF,4YAA4Y;IAC5Y,EAAE;IACF,2eAA2e;IAC3e,EAAE;IACF,+jCAA+jC;IAC/jC,EAAE;IACF,uCAAuC;IACvC,kXAAkX;IAClX,mYAAmY;IACnY,iOAAiO;IACjO,kEAAkE;IAClE,EAAE;IACF,oFAAoF;IACpF,2FAA2F;IAC3F,uGAAuG;IACvG,gHAAgH;IAChH,EAAE;IACF,iCAAiC;IACjC,oDAAoD;IACpD,sCAAsC;IACtC,mDAAmD;IACnD,6DAA6D;IAC7D,8CAA8C;IAC9C,2IAA2I;IAC3I,EAAE;IACF,yBAAyB;IACzB,8GAA8G;IAC9G,sJAAsJ;IACtJ,sHAAsH;CACvH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEb;;yEAEyE;AACzE,MAAM,CAAC,MAAM,mBAAmB,GAA8B,aAAa,CAAC,wBAAwB,CAAC,CAAC"}
1
+ {"version":3,"file":"plan-audit-criteria.js","sourceRoot":"","sources":["../../../src/tools/audit/plan-audit-criteria.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAA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,iGAAiG;IACjG,kPAAkP;IAClP,2PAA2P;IAC3P,8LAA8L;IAC9L,uSAAuS;IACvS,sWAAsW;CACvW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAGb,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,qlBAAqlB;IACrlB,EAAE;IACF,+mBAA+mB;IAC/mB,EAAE;IACF,o1BAAo1B;IACp1B,EAAE;IACF,kwBAAkwB;IAClwB,EAAE;IACF,skBAAskB;IACtkB,EAAE;IACF,6oBAA6oB;IAC7oB,EAAE;IACF,iZAAiZ;IACjZ,EAAE;IACF,4YAA4Y;IAC5Y,EAAE;IACF,2eAA2e;IAC3e,EAAE;IACF,+jCAA+jC;IAC/jC,EAAE;IACF,k0CAAk0C;IACl0C,EAAE;IACF,ynCAAynC;IACznC,EAAE;IACF,gsCAAgsC;IAChsC,EAAE;IACF,uCAAuC;IACvC,ycAAyc;IACzc,6nBAA6nB;IAC7nB,8bAA8b;IAC9b,uIAAuI;IACvI,EAAE;IACF,oFAAoF;IACpF,2FAA2F;IAC3F,uGAAuG;IACvG,gHAAgH;IAChH,EAAE;IACF,iCAAiC;IACjC,oDAAoD;IACpD,sCAAsC;IACtC,mDAAmD;IACnD,6DAA6D;IAC7D,8CAA8C;IAC9C,2IAA2I;IAC3I,EAAE;IACF,yBAAyB;IACzB,mQAAmQ;IACnQ,+ZAA+Z;IAC/Z,8MAA8M;IAC9M,sHAAsH;CACvH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEb;;yEAEyE;AACzE,MAAM,CAAC,MAAM,mBAAmB,GAA8B,aAAa,CAAC,wBAAwB,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"spec-audit-criteria.d.ts","sourceRoot":"","sources":["../../../src/tools/audit/spec-audit-criteria.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAErE,eAAO,MAAM,8BAA8B,QAS/B,CAAC;AAEb,eAAO,MAAM,wBAAwB,QAQzB,CAAC;AAEb,eAAO,MAAM,qBAAqB,QAKtB,CAAC;AAEb,eAAO,MAAM,8BAA8B,QAE/B,CAAC;AAYb,eAAO,MAAM,mBAAmB,EAAE,SAAS,cAAc,EAA4C,CAAC;AAEtG,eAAO,MAAM,oBAAoB,EAAE,cAWlC,CAAC"}
1
+ {"version":3,"file":"spec-audit-criteria.d.ts","sourceRoot":"","sources":["../../../src/tools/audit/spec-audit-criteria.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAErE,eAAO,MAAM,8BAA8B,QAS/B,CAAC;AAEb,eAAO,MAAM,wBAAwB,QAQzB,CAAC;AAEb,eAAO,MAAM,qBAAqB,QAKtB,CAAC;AAEb,eAAO,MAAM,8BAA8B,QAE/B,CAAC;AAcb,eAAO,MAAM,mBAAmB,EAAE,SAAS,cAAc,EAA4C,CAAC;AAEtG,eAAO,MAAM,oBAAoB,EAAE,cAWlC,CAAC"}
@@ -20,8 +20,8 @@ export const EVIDENCE_RULE_SPEC_AUDIT = [
20
20
  ].join('\n');
21
21
  export const SCOPE_RULE_SPEC_AUDIT = [
22
22
  'Scope:',
23
- '- In scope: requirement testability, scope explicitness, acceptance-criteria coverage, non-functional capture, requirement conflicts, decision trace, hidden assumptions.',
24
- '- Out of scope: implementation details (those belong in a plan, not a spec), stylistic prose preferences, opinions on whether the spec is "good", lens-style audits (security or performance focus belongs in free-text prompt, not in spec subtype).',
23
+ '- In scope: requirement testability, scope explicitness AND decomposability, acceptance-criteria coverage, non-functional capture, requirement conflicts, decision trace, hidden assumptions, unresolved authoring placeholders, and presence of architectural decomposition (components, data flow, error handling, testing strategy).',
24
+ '- Out of scope: implementation details (those belong in a plan, not a spec — flag scope leak into implementation as a SCOPE-EXPLICITNESS-AND-DECOMPOSABILITY finding, not a general comment), stylistic prose preferences, opinions on whether the spec is "good", lens-style audits (security or performance focus belongs in free-text prompt, not in spec subtype).',
25
25
  '- IMPLICIT requirements embedded inside a clause ARE in scope. Example: "shall validate the token" implicitly requires "what counts as valid" — if that is undefined, flag it as REQUIREMENT-TESTABILITY (do not split into two findings).',
26
26
  ].join('\n');
27
27
  export const ANNOTATOR_AWARENESS_SPEC_AUDIT = [
@@ -29,12 +29,14 @@ export const ANNOTATOR_AWARENESS_SPEC_AUDIT = [
29
29
  ].join('\n');
30
30
  const SPEC_AUDIT_FAILURE_MODES = [
31
31
  '1. REQUIREMENT-TESTABILITY — Every "shall" / "must" / "should" requirement has a concrete, observable outcome that a test can assert. Vague verbs ("supports", "handles", "is reliable") without a measurable outcome flag as findings.',
32
- '2. SCOPE-EXPLICITNESS — In-scope and out-of-scope items are explicit. Implied scope (mentioned-once-then-dropped, or referenced without definition) is a finding.',
32
+ '2. SCOPE-EXPLICITNESS-AND-DECOMPOSABILITY — In-scope and out-of-scope items are explicit AND the stated scope is sized for a single implementation plan. Two sub-checks: (a) EXPLICITNESS — implied scope (mentioned-once-then-dropped, or referenced without definition) is a finding; in-scope and out-of-scope lists should appear as a dedicated section, not be inferred from prose. (b) DECOMPOSABILITY — the spec describes ONE buildable feature, not multiple independent subsystems bundled together. Signals that decomposition is needed (severity HIGH): the spec mixes orthogonal subsystems (e.g. chat + file storage + billing); the spec has more than one top-level "Goal" or implies multiple independently releasable units; the architecture section names more than ~5 net-new modules across non-overlapping concerns. Suggested fix on a multi-subsystem spec: split into sub-project specs and brainstorm/plan each independently, citing the brainstorming-skill decomposition guidance.',
33
33
  '3. ACCEPTANCE-CRITERIA-COVERAGE — Every requirement maps to at least one acceptance criterion (or the spec calls out it is non-acceptance-testable and says why). Missing mapping is a finding.',
34
34
  '4. NON-FUNCTIONAL-CAPTURED — Non-functional constraints (latency, security, observability, accessibility, scale) are stated where load-bearing, not assumed silently. Silent assumption is a finding.',
35
35
  '5. REQUIREMENT-CONFLICT — Two requirements that cannot simultaneously hold (e.g. "respond in <50ms" + "validate against the remote registry on every call") are surfaced.',
36
36
  '6. DECISION-TRACE — Decisions that affect downstream implementation (algorithm choice, data shape, integration point) are stated with the reasoning, not just the outcome. Outcome-only is a finding.',
37
37
  '7. ASSUMPTION-EXPOSURE — Hidden assumptions about caller behaviour, environment, or pre-existing state are made explicit so the executor can verify them.',
38
+ '8. PLACEHOLDER-SCAN — The spec contains no unresolved authoring placeholders that would block planning. Flag occurrences of `TBD`, `TODO`, `[fill in]`, `[to be decided]`, `???`, empty section bodies under a heading (a heading with no content beneath it before the next heading), bulleted lists ending in `…` or "more to come", and tables with empty cells in load-bearing columns. Severity binding: HIGH when the placeholder sits on a load-bearing section (a requirement, an architecture component, an acceptance criterion); MEDIUM elsewhere; LOW on metadata-only sections (author, revision history). Suggested fix: resolve the placeholder before moving to writing-plans, or mark the section explicitly as "out of scope for this iteration" with a forward reference. Evidence is the exact placeholder quote with its section heading.',
39
+ '9. DESIGN-DECOMPOSITION-PRESENT — A spec must give the planner enough architectural information to write tasks. The brainstorming skill mandates that the spec cover architecture, components, data flow, error handling, and testing. Flag the spec when any load-bearing dimension is missing: (a) no component decomposition (the spec states requirements but never names the modules / units / services that will implement them); (b) no data flow description (request shape, response shape, or how data moves between named components is silent); (c) no error-handling treatment for failure modes that the requirements themselves imply (e.g. a "shall validate the token" requirement with no statement of what happens on invalid token); (d) no testing strategy section (silent on unit / integration / contract / manual layer). Severity HIGH when the missing dimension is load-bearing for downstream planning (the planner would have to invent the architecture); MEDIUM when the dimension is partial (named but underspecified). For each finding, name the missing dimension and the section that should contain it. This perspective is the spec-side complement to plan-audit perspective 10 (SPEC-COVERAGE) — together they enforce that the spec gives the planner enough to build, and the plan in turn covers the spec.',
38
40
  ].join('\n');
39
41
  export const SPEC_AUDIT_CRITERIA = parseCriteria(SPEC_AUDIT_FAILURE_MODES);
40
42
  export const SPEC_AUDIT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