@zhixuan92/multi-model-agent-core 4.0.6 → 4.2.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.
Files changed (141) hide show
  1. package/dist/bounded-execution/index.d.ts +2 -0
  2. package/dist/bounded-execution/index.d.ts.map +1 -1
  3. package/dist/bounded-execution/index.js +2 -0
  4. package/dist/bounded-execution/index.js.map +1 -1
  5. package/dist/bounded-execution/safety-max-turns.d.ts +17 -0
  6. package/dist/bounded-execution/safety-max-turns.d.ts.map +1 -0
  7. package/dist/bounded-execution/safety-max-turns.js +17 -0
  8. package/dist/bounded-execution/safety-max-turns.js.map +1 -0
  9. package/dist/bounded-execution/stall-watchdog.d.ts +16 -0
  10. package/dist/bounded-execution/stall-watchdog.d.ts.map +1 -0
  11. package/dist/bounded-execution/stall-watchdog.js +69 -0
  12. package/dist/bounded-execution/stall-watchdog.js.map +1 -0
  13. package/dist/intake/brief-compiler-slots/delegate.d.ts +18 -0
  14. package/dist/intake/brief-compiler-slots/delegate.d.ts.map +1 -1
  15. package/dist/intake/brief-compiler-slots/delegate.js +36 -3
  16. package/dist/intake/brief-compiler-slots/delegate.js.map +1 -1
  17. package/dist/lifecycle/handlers/execution-context-builder.d.ts.map +1 -1
  18. package/dist/lifecycle/handlers/execution-context-builder.js +2 -1
  19. package/dist/lifecycle/handlers/execution-context-builder.js.map +1 -1
  20. package/dist/lifecycle/handlers/quality-chain-handlers.d.ts.map +1 -1
  21. package/dist/lifecycle/handlers/quality-chain-handlers.js +10 -1
  22. package/dist/lifecycle/handlers/quality-chain-handlers.js.map +1 -1
  23. package/dist/lifecycle/parallel-criteria-dispatcher.d.ts +62 -0
  24. package/dist/lifecycle/parallel-criteria-dispatcher.d.ts.map +1 -0
  25. package/dist/lifecycle/parallel-criteria-dispatcher.js +328 -0
  26. package/dist/lifecycle/parallel-criteria-dispatcher.js.map +1 -0
  27. package/dist/lifecycle/parallel-criteria-routes.d.ts +16 -0
  28. package/dist/lifecycle/parallel-criteria-routes.d.ts.map +1 -0
  29. package/dist/lifecycle/parallel-criteria-routes.js +147 -0
  30. package/dist/lifecycle/parallel-criteria-routes.js.map +1 -0
  31. package/dist/lifecycle/task-runner.d.ts.map +1 -1
  32. package/dist/lifecycle/task-runner.js +268 -97
  33. package/dist/lifecycle/task-runner.js.map +1 -1
  34. package/dist/providers/anthropic-messages-adapter.d.ts.map +1 -1
  35. package/dist/providers/anthropic-messages-adapter.js +8 -1
  36. package/dist/providers/anthropic-messages-adapter.js.map +1 -1
  37. package/dist/providers/provider-factory.d.ts.map +1 -1
  38. package/dist/providers/provider-factory.js +2 -1
  39. package/dist/providers/provider-factory.js.map +1 -1
  40. package/dist/providers/runner-adapter.d.ts +8 -0
  41. package/dist/providers/runner-adapter.d.ts.map +1 -1
  42. package/dist/providers/runner-shell-types.d.ts +7 -0
  43. package/dist/providers/runner-shell-types.d.ts.map +1 -1
  44. package/dist/providers/runner-shell.d.ts +51 -1
  45. package/dist/providers/runner-shell.d.ts.map +1 -1
  46. package/dist/providers/runner-shell.js +130 -0
  47. package/dist/providers/runner-shell.js.map +1 -1
  48. package/dist/reporting/report-parser-slots/investigate-report.d.ts.map +1 -1
  49. package/dist/reporting/report-parser-slots/investigate-report.js +41 -2
  50. package/dist/reporting/report-parser-slots/investigate-report.js.map +1 -1
  51. package/dist/review/annotator-engine.d.ts +7 -1
  52. package/dist/review/annotator-engine.d.ts.map +1 -1
  53. package/dist/review/annotator-engine.js +15 -2
  54. package/dist/review/annotator-engine.js.map +1 -1
  55. package/dist/review/annotator-prompt-builder.d.ts.map +1 -1
  56. package/dist/review/annotator-prompt-builder.js +10 -2
  57. package/dist/review/annotator-prompt-builder.js.map +1 -1
  58. package/dist/review/reviewer-engine.d.ts.map +1 -1
  59. package/dist/review/reviewer-engine.js +4 -3
  60. package/dist/review/reviewer-engine.js.map +1 -1
  61. package/dist/review/templates/annotator-audit.d.ts.map +1 -1
  62. package/dist/review/templates/annotator-audit.js +5 -3
  63. package/dist/review/templates/annotator-audit.js.map +1 -1
  64. package/dist/review/templates/annotator-debug.d.ts.map +1 -1
  65. package/dist/review/templates/annotator-debug.js +11 -7
  66. package/dist/review/templates/annotator-debug.js.map +1 -1
  67. package/dist/review/templates/annotator-investigate.d.ts.map +1 -1
  68. package/dist/review/templates/annotator-investigate.js +6 -3
  69. package/dist/review/templates/annotator-investigate.js.map +1 -1
  70. package/dist/review/templates/annotator-review.d.ts.map +1 -1
  71. package/dist/review/templates/annotator-review.js +13 -6
  72. package/dist/review/templates/annotator-review.js.map +1 -1
  73. package/dist/review/templates/annotator-shared.d.ts +8 -1
  74. package/dist/review/templates/annotator-shared.d.ts.map +1 -1
  75. package/dist/review/templates/annotator-shared.js.map +1 -1
  76. package/dist/review/templates/annotator-verify.d.ts.map +1 -1
  77. package/dist/review/templates/annotator-verify.js +11 -5
  78. package/dist/review/templates/annotator-verify.js.map +1 -1
  79. package/dist/tools/audit/implementer-criteria.d.ts +60 -4
  80. package/dist/tools/audit/implementer-criteria.d.ts.map +1 -1
  81. package/dist/tools/audit/implementer-criteria.js +118 -11
  82. package/dist/tools/audit/implementer-criteria.js.map +1 -1
  83. package/dist/tools/audit/schema.d.ts +3 -10
  84. package/dist/tools/audit/schema.d.ts.map +1 -1
  85. package/dist/tools/audit/schema.js +3 -4
  86. package/dist/tools/audit/schema.js.map +1 -1
  87. package/dist/tools/audit/tool-config.d.ts.map +1 -1
  88. package/dist/tools/audit/tool-config.js +70 -36
  89. package/dist/tools/audit/tool-config.js.map +1 -1
  90. package/dist/tools/criteria-types.d.ts +27 -0
  91. package/dist/tools/criteria-types.d.ts.map +1 -0
  92. package/dist/tools/criteria-types.js +25 -0
  93. package/dist/tools/criteria-types.js.map +1 -0
  94. package/dist/tools/debug/implementer-criteria.d.ts +47 -4
  95. package/dist/tools/debug/implementer-criteria.d.ts.map +1 -1
  96. package/dist/tools/debug/implementer-criteria.js +104 -13
  97. package/dist/tools/debug/implementer-criteria.js.map +1 -1
  98. package/dist/tools/debug/tool-config.d.ts.map +1 -1
  99. package/dist/tools/debug/tool-config.js +31 -4
  100. package/dist/tools/debug/tool-config.js.map +1 -1
  101. package/dist/tools/delegate/implementer-criteria.d.ts +62 -0
  102. package/dist/tools/delegate/implementer-criteria.d.ts.map +1 -0
  103. package/dist/tools/delegate/implementer-criteria.js +114 -0
  104. package/dist/tools/delegate/implementer-criteria.js.map +1 -0
  105. package/dist/tools/execute-plan/implementer-criteria.d.ts +52 -0
  106. package/dist/tools/execute-plan/implementer-criteria.d.ts.map +1 -0
  107. package/dist/tools/execute-plan/implementer-criteria.js +104 -0
  108. package/dist/tools/execute-plan/implementer-criteria.js.map +1 -0
  109. package/dist/tools/execute-plan/tool-config.d.ts.map +1 -1
  110. package/dist/tools/execute-plan/tool-config.js +17 -3
  111. package/dist/tools/execute-plan/tool-config.js.map +1 -1
  112. package/dist/tools/investigate/implementer-criteria.d.ts +51 -5
  113. package/dist/tools/investigate/implementer-criteria.d.ts.map +1 -1
  114. package/dist/tools/investigate/implementer-criteria.js +109 -13
  115. package/dist/tools/investigate/implementer-criteria.js.map +1 -1
  116. package/dist/tools/investigate/tool-config.d.ts.map +1 -1
  117. package/dist/tools/investigate/tool-config.js +20 -8
  118. package/dist/tools/investigate/tool-config.js.map +1 -1
  119. package/dist/tools/parallel-criteria-prompt.d.ts +106 -0
  120. package/dist/tools/parallel-criteria-prompt.d.ts.map +1 -0
  121. package/dist/tools/parallel-criteria-prompt.js +86 -0
  122. package/dist/tools/parallel-criteria-prompt.js.map +1 -0
  123. package/dist/tools/review/implementer-criteria.d.ts +50 -1
  124. package/dist/tools/review/implementer-criteria.d.ts.map +1 -1
  125. package/dist/tools/review/implementer-criteria.js +113 -9
  126. package/dist/tools/review/implementer-criteria.js.map +1 -1
  127. package/dist/tools/review/tool-config.d.ts.map +1 -1
  128. package/dist/tools/review/tool-config.js +50 -7
  129. package/dist/tools/review/tool-config.js.map +1 -1
  130. package/dist/tools/verify/implementer-criteria.d.ts +49 -0
  131. package/dist/tools/verify/implementer-criteria.d.ts.map +1 -1
  132. package/dist/tools/verify/implementer-criteria.js +104 -8
  133. package/dist/tools/verify/implementer-criteria.js.map +1 -1
  134. package/dist/tools/verify/tool-config.d.ts.map +1 -1
  135. package/dist/tools/verify/tool-config.js +22 -2
  136. package/dist/tools/verify/tool-config.js.map +1 -1
  137. package/dist/types/run-result.d.ts +18 -0
  138. package/dist/types/run-result.d.ts.map +1 -1
  139. package/dist/types/task-spec.d.ts +11 -0
  140. package/dist/types/task-spec.d.ts.map +1 -1
  141. package/package.json +1 -1
@@ -1,27 +1,131 @@
1
1
  /**
2
2
  * Review-specific implementer criteria.
3
3
  *
4
+ * REVIEW'S PURPOSE — read this before adding categories.
5
+ * mma-review is the pre-merge gate. The maintainer accepting your verdict
6
+ * will NOT re-investigate before pressing merge — your output is treated
7
+ * as authoritative. The success criterion is:
8
+ *
9
+ * "After fixes, will the merge be safe, correct, and maintainable —
10
+ * such that a regression is unlikely to ship?"
11
+ *
12
+ * That criterion makes a finding load-bearing. A nit that doesn't change
13
+ * whether the merge is safe is low-priority no matter how clean the
14
+ * suggested rewrite reads. A cross-file ripple that breaks a caller
15
+ * not in the diff is the audit-equivalent of an unimplementable fix —
16
+ * load-bearing even though the named file looks fine in isolation.
17
+ *
4
18
  * Review examines source code in named files against a focus area
5
19
  * (security/correctness/performance/style). Findings should be
6
- * line-quotable — that's the natural shape of code defects.
20
+ * line-quotable — that's the natural shape of code defects — but
21
+ * cross-file findings backed by call-site references are also valid.
22
+ */
23
+ /**
24
+ * The orientation block. Goes at the TOP of every review prompt.
25
+ *
26
+ * This is the load-bearing addition. Without an explicit purpose
27
+ * statement, workers default to "find issues in this file" — which
28
+ * produces line-by-line proofreading and misses the cross-file rippe,
29
+ * test-gap, and implicit-contract findings that actually block merges.
7
30
  */
31
+ export const REVIEW_PURPOSE_ORIENTATION = [
32
+ 'Why this review exists:',
33
+ 'mma-review is the pre-merge gate. The maintainer accepting your verdict will NOT re-investigate before merging — your verdict is treated as authoritative. A miss here ships to production.',
34
+ '',
35
+ 'Your job is to find anything that would make the merge unsafe, including issues that look fine in the named files in isolation:',
36
+ '- a changed function with no test (or with a test that does not exercise the change)',
37
+ '- a changed signature whose direct callers (visible in the named files or via grep on the symbol) were not updated',
38
+ '- a change that introduces a new edge case (null/empty/timeout/error path) the code does not handle',
39
+ '- a race or concurrency hazard the change exposes (shared state mutation, missing lock, await-after-check pattern)',
40
+ '- a resource leak the change introduces (unclosed handle, untracked promise, file descriptor not freed)',
41
+ '- a backward-compatibility break in a public API or wire schema',
42
+ '- a security regression (auth bypass, injection, untrusted input flowing to a sink, data exposure)',
43
+ '- a performance regression (N+1 query, unbounded loop, blocking I/O on a hot path, unnecessary deep clone)',
44
+ '- an implicit-contract assumption — the change relies on the caller doing X but the contract does not state X',
45
+ '- a pre-existing bug entangled with the change (NOT a finding against this diff — separate cleanly)',
46
+ '',
47
+ 'A finding that points at any of these is high-value EVEN IF the prose of the change reads cleanly. Conversely, a stylistic nit that does not change merge safety is low-priority no matter how clean the suggested rewrite reads.',
48
+ '',
49
+ 'The completion test: would a maintainer who reads only your review and the diff (not the surrounding code) understand which changes are required, why each is required, and where each lives — well enough to apply the fix and re-merge?',
50
+ ].join('\n');
8
51
  export const EVIDENCE_RULE_REVIEW = [
9
52
  'Evidence grounding (REQUIRED for every finding):',
10
53
  '- Cite `file:line` (or `file:line-line` for a span) where the issue lives.',
11
- '- Quote the exact code excerpt or command output that demonstrates the issue. Don\'t paraphrase — quote.',
12
- '- If you cannot quote evidence directly from the named files, do NOT raise the finding. Note "investigation needed" in your summary instead.',
54
+ '- Quote the exact code excerpt or command output that demonstrates the issue. Do not paraphrase — quote.',
55
+ '- For CROSS-FILE findings (a change in named file A breaks a caller B), cite both: the line in A that triggers the break, AND the call site in B that breaks. If B is not in the named files but is reachable via grep on the changed symbol, name it explicitly. Cross-file findings backed by call-site references are FULLY VALID — do not drop them as out-of-scope.',
56
+ '- For TEST-GAP findings, name the test file you would expect to cover the change AND quote the diff line that has no test coverage. If no test file exists for the changed area, that itself is the finding.',
57
+ '- For IMPLICIT-CONTRACT findings, quote the line in the named file that depends on the assumption AND name the contract source (the public docstring, the type, the README) that does not state the assumption.',
58
+ '- If you cannot quote evidence in one of these forms, do NOT raise the finding. Note "investigation needed" in your summary instead.',
13
59
  ].join('\n');
14
60
  export const SCOPE_RULE_REVIEW = [
15
61
  'Scope:',
16
62
  '- The named files. Behavior of direct callers/callees can be referenced when visible in those files.',
17
- '- Out of scope: speculation about untouched files; doc/spec issues (those belong in an audit, not a review); style nits when the focus area is security/correctness/performance.',
63
+ '- Cross-file ripples ARE in scope when the changed symbol is searchable: if the named files change a public function, look for its call sites in the rest of the repo and flag any caller that would break. This is the highest-value cross-file work for a code review.',
64
+ '- Test gaps ARE in scope: if the named files change behavior and a test file is the natural sibling (e.g. `foo.ts` → `tests/foo.test.ts`), check whether the test exercises the change.',
65
+ '- Out of scope: speculation about untouched files unrelated to the diff; doc/spec issues (those belong in an audit, not a review); style nits when the focus area is security/correctness/performance.',
66
+ '- Pre-existing bugs (the diff did not introduce them) belong in their own backlog item, not in this review. Note them in a "Pre-existing — out of scope" section if you spot them, but DO NOT mix them into the merge-blocking findings.',
67
+ ].join('\n');
68
+ /**
69
+ * The failure-mode taxonomy for code reviews.
70
+ *
71
+ * Without this block, workers default to line-by-line proofreading of
72
+ * the named file and miss cross-file ripples, test gaps, and
73
+ * implicit-contract regressions — the findings that actually block
74
+ * merges. The 10 categories below are what a careful maintainer would
75
+ * scan for before pressing merge.
76
+ */
77
+ export const CODE_REVIEW_FAILURE_MODES = [
78
+ 'Look for these kinds of issues — applicable to ALL code reviews regardless of focus. The focus area (security/correctness/performance/style) tells you which lens to weight, but every code review should sweep the full taxonomy:',
79
+ '',
80
+ '1. TEST GAP — the diff changes behavior, but no test exercises the change. Either: no test file exists, OR the test file exists but the changed branch is not covered. **Always check for the natural sibling test file when reviewing source-code changes.**',
81
+ '2. CROSS-FILE RIPPLE — a changed signature, return shape, public type, or wire schema is referenced from another file that was not updated. **If the named files change a public symbol, grep for the symbol and flag any unupdated caller.**',
82
+ '3. PRE-EXISTING-BUG-VS-NEW-REGRESSION — a defect exists in the named files but the diff did not introduce it. Do NOT blame the diff for prior bugs; note them in a separate "Pre-existing — out of scope" section. Conversely, if the diff DID introduce or worsen a defect, flag it as a regression.',
83
+ '4. MISSING EDGE CASE — the change adds a code path but does not handle null/undefined/empty/timeout/error/zero/negative inputs the path could see. Walk the change against each natural boundary value.',
84
+ '5. RACE / CONCURRENCY — the change introduces shared state mutation, removes a lock, splits a previously-atomic operation, or adds an await between a check and an action (TOCTOU). Flag these even when no test reproduces.',
85
+ '6. RESOURCE LEAK — the change opens a handle (file, socket, lock, transaction, AbortController) without a guaranteed close path; or introduces an untracked promise that may reject silently.',
86
+ '7. BACKWARD-COMPAT BREAK — the change modifies a public API, exported type, wire schema, environment variable, or CLI flag in a way that breaks existing callers. Flag and require a migration note.',
87
+ '8. SECURITY REGRESSION — the change introduces or worsens auth bypass, injection (SQL/command/prompt), untrusted input flowing to a sink (eval/exec/HTML/SQL), data exposure, or weakened sandboxing. Apply the security lens to every change, not just security-flagged ones.',
88
+ '9. PERFORMANCE REGRESSION — the change adds N+1 queries, unbounded loops, blocking I/O on a hot path, unnecessary deep clones, or shifts work from build/init time to request time. Apply the performance lens to every change, not just performance-flagged ones.',
89
+ '10. IMPLICIT-CONTRACT ASSUMPTION — the changed code relies on the caller (or environment) doing X but the contract (docstring, type, README) does not state X. The change works for in-repo callers but will silently break when the contract is read literally.',
90
+ '',
91
+ 'Severity calibration for code reviews:',
92
+ '- critical: the merge would corrupt data, expose credentials, allow auth bypass, break a public API in production, or cause production outage. A reader who applied the fix incorrectly could ship the regression.',
93
+ '- high: the merge would introduce a real bug, security gap, or substantial regression that blocks release. Cross-file ripple where a caller is broken. Missing edge case in a code path that production traffic will hit.',
94
+ '- medium: a real issue worth fixing soon: test gap on a non-trivial change, race condition with low contention, performance regression on a non-hot path, missing edge case on an unlikely input.',
95
+ '- low: stylistic / naming / dead-code / minor-refactor opportunity. Does not change merge safety.',
96
+ ].join('\n');
97
+ /**
98
+ * Counter-balance to the SEVERITY_LADDER's anti-inflation hint.
99
+ *
100
+ * The shared severity ladder ends with "Workers commonly inflate —
101
+ * resist the urge." That bias is correct in the limit (no, the missing
102
+ * comma is not critical) but produces UNDER-finding when combined with
103
+ * a thin per-tool rubric. For code review specifically, the typical
104
+ * failure is missing the cross-file ripple or test gap because the
105
+ * worker only looked at the diff in the named file. This block tells
106
+ * the worker that under-finding is the more common review failure.
107
+ */
108
+ export const THOROUGHNESS_REMINDER_REVIEW = [
109
+ 'Thoroughness expectation for code reviews:',
110
+ '- For non-trivial diffs (>30 changed lines OR a public symbol changed), zero or 1-2 findings is unusual and usually indicates the rubric was applied too narrowly. Sweep the full failure-mode taxonomy above before declaring "no findings."',
111
+ '- The SEVERITY_LADDER warns against inflation. That warning is calibrated — but the typical UNDER-finding in code review is missing the cross-file ripple or test gap because the worker only looked at the diff in the named file. Apply the failure-mode taxonomy thoroughly first; THEN calibrate severity downward where the impact is small.',
112
+ '- Do not invent findings to hit a quota. But if you have applied all 10 failure modes and still have only stylistic nits, double-check categories 1, 2, 4, and 10 (test gap, cross-file ripple, missing edge case, implicit-contract assumption) — these are the ones reviewers most often miss on first pass and the ones most likely to ship a regression.',
113
+ '',
114
+ 'Cross-file pass (REQUIRED when the named files change a public symbol — exported function, exported type, route handler, or wire-schema field):',
115
+ '- Make ONE explicit pass: identify the changed public symbols, grep for their call sites in the rest of the repo, and check whether each call site is consistent with the new signature/return-shape/contract.',
116
+ '- For each (changed symbol, call site) pair, ask: does the call site as currently written still work after this change?',
117
+ '- Worked example. A diff in `src/foo.ts` renames `getUserById(id)` to `getUserById(id, opts)` and makes `opts` required. The grep finds 3 call sites in `src/handlers/auth.ts`, `src/handlers/billing.ts`, `tests/integration/users.test.ts`. None pass `opts`. Flag this as HIGH (or CRITICAL if `auth.ts` would no-op silently rather than error). The fact that `src/foo.ts` looks clean in isolation is exactly the kind of false-clean that ships regressions.',
118
+ '- Most reviewers miss findings of this shape on first pass because they only read the named files. The cross-file pass forces the grep.',
18
119
  ].join('\n');
19
120
  export const ANNOTATOR_AWARENESS_REVIEW = [
20
121
  'After your output, an annotator validates each finding against this code-review rubric:',
21
- '- Is the finding within the requested focus area?',
22
- '- Does the evidence quote real code from the named files?',
23
- '- Is the severity calibrated to actual impact?',
24
- '- Is the finding within the requested scope, or is it about untouched code?',
25
- 'Self-check before emitting. Findings that fail any check are downgraded or dropped.',
122
+ '- Is the finding within the requested focus area (or universally applicable: security, performance, correctness apply to every review)?',
123
+ '- Does the evidence quote real code from the named files OR cite a real call site reachable via grep on the changed symbol?',
124
+ '- Is the severity calibrated to actual merge-safety impact (would a reader who applied the fix incorrectly ship a regression)?',
125
+ '- Is the finding within scope (named files + cross-file ripples on changed symbols + sibling test files), or is it speculation about unrelated code?',
126
+ 'Self-check before emitting. Findings that fail any check are downgraded or dropped — but cross-file ripple findings backed by call-site references and test-gap findings backed by sibling-test-file references are FULLY VALID, do NOT downgrade them as "speculation about untouched files."',
26
127
  ].join('\n');
128
+ import { parseCriteria } from '../criteria-types.js';
129
+ /** Structured per-criterion array for parallel-criteria fan-out. */
130
+ export const REVIEW_CRITERIA = parseCriteria(CODE_REVIEW_FAILURE_MODES);
27
131
  //# sourceMappingURL=implementer-criteria.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"implementer-criteria.js","sourceRoot":"","sources":["../../../src/tools/review/implementer-criteria.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,kDAAkD;IAClD,4EAA4E;IAC5E,0GAA0G;IAC1G,8IAA8I;CAC/I,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEb,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,QAAQ;IACR,sGAAsG;IACtG,kLAAkL;CACnL,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEb,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,yFAAyF;IACzF,mDAAmD;IACnD,2DAA2D;IAC3D,gDAAgD;IAChD,6EAA6E;IAC7E,qFAAqF;CACtF,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC"}
1
+ {"version":3,"file":"implementer-criteria.js","sourceRoot":"","sources":["../../../src/tools/review/implementer-criteria.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,yBAAyB;IACzB,6LAA6L;IAC7L,EAAE;IACF,iIAAiI;IACjI,sFAAsF;IACtF,oHAAoH;IACpH,qGAAqG;IACrG,oHAAoH;IACpH,yGAAyG;IACzG,iEAAiE;IACjE,oGAAoG;IACpG,4GAA4G;IAC5G,+GAA+G;IAC/G,qGAAqG;IACrG,EAAE;IACF,mOAAmO;IACnO,EAAE;IACF,2OAA2O;CAC5O,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEb,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,kDAAkD;IAClD,4EAA4E;IAC5E,0GAA0G;IAC1G,0WAA0W;IAC1W,8MAA8M;IAC9M,iNAAiN;IACjN,sIAAsI;CACvI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEb,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,QAAQ;IACR,sGAAsG;IACtG,0QAA0Q;IAC1Q,yLAAyL;IACzL,wMAAwM;IACxM,0OAA0O;CAC3O,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEb;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,oOAAoO;IACpO,EAAE;IACF,+PAA+P;IAC/P,+OAA+O;IAC/O,uSAAuS;IACvS,yMAAyM;IACzM,8NAA8N;IAC9N,+LAA+L;IAC/L,sMAAsM;IACtM,gRAAgR;IAChR,oQAAoQ;IACpQ,kQAAkQ;IAClQ,EAAE;IACF,wCAAwC;IACxC,oNAAoN;IACpN,2NAA2N;IAC3N,mMAAmM;IACnM,mGAAmG;CACpG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEb;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG;IAC1C,4CAA4C;IAC5C,+OAA+O;IAC/O,mVAAmV;IACnV,8VAA8V;IAC9V,EAAE;IACF,iJAAiJ;IACjJ,gNAAgN;IAChN,yHAAyH;IACzH,qcAAqc;IACrc,yIAAyI;CAC1I,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEb,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,yFAAyF;IACzF,yIAAyI;IACzI,6HAA6H;IAC7H,gIAAgI;IAChI,sJAAsJ;IACtJ,gSAAgS;CACjS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEb,OAAO,EAAE,aAAa,EAAuB,MAAM,sBAAsB,CAAC;AAE1E,oEAAoE;AACpE,MAAM,CAAC,MAAM,eAAe,GAA8B,aAAa,CAAC,yBAAyB,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"tool-config.d.ts","sourceRoot":"","sources":["../../../src/tools/review/tool-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,6CAA6C,CAAC;AAElF,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAEvE,OAAO,EAAmB,KAAK,WAAW,EAAE,MAAM,6CAA6C,CAAC;AAWhG,wBAAgB,cAAc,CAAC,QAAQ,EAAE,mBAAmB,GAAG,IAAI,CAYlE;AAwED,eAAO,MAAM,UAAU,EAAE,UAAU,CAAC,KAAK,EAAE,WAAW,EAAE,OAAO,CAsC9D,CAAC"}
1
+ {"version":3,"file":"tool-config.d.ts","sourceRoot":"","sources":["../../../src/tools/review/tool-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,6CAA6C,CAAC;AAElF,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAEvE,OAAO,EAAmB,KAAK,WAAW,EAAE,MAAM,6CAA6C,CAAC;AAchG,wBAAgB,cAAc,CAAC,QAAQ,EAAE,mBAAmB,GAAG,IAAI,CAYlE;AA2GD,eAAO,MAAM,UAAU,EAAE,UAAU,CAAC,KAAK,EAAE,WAAW,EAAE,OAAO,CA+C9D,CAAC"}
@@ -5,7 +5,7 @@ import { reviewReportSchema } from '../../reporting/report-parser-slots/review-r
5
5
  import { reviewHeadlineTemplate } from '../../reporting/headline-templates/review.js';
6
6
  import { DEFAULT_TASK_TIMEOUT_MS } from '../../config/schema.js';
7
7
  import { SEVERITY_LADDER } from '../../review/templates/finding-criteria.js';
8
- import { EVIDENCE_RULE_REVIEW, SCOPE_RULE_REVIEW, ANNOTATOR_AWARENESS_REVIEW, } from './implementer-criteria.js';
8
+ import { REVIEW_PURPOSE_ORIENTATION, EVIDENCE_RULE_REVIEW, SCOPE_RULE_REVIEW, ANNOTATOR_AWARENESS_REVIEW, CODE_REVIEW_FAILURE_MODES, THOROUGHNESS_REMINDER_REVIEW, } from './implementer-criteria.js';
9
9
  export function registerReview(registry) {
10
10
  registry.register({
11
11
  routeName: 'review',
@@ -19,18 +19,34 @@ export function registerReview(registry) {
19
19
  responseShapeName: 'BatchResponse',
20
20
  });
21
21
  }
22
+ /**
23
+ * Per-focus "done" conditions.
24
+ *
25
+ * The full failure-mode taxonomy in CODE_REVIEW_FAILURE_MODES applies to
26
+ * all reviews regardless of focus. These per-focus conditions tell the
27
+ * worker which lens to weight, not which categories to skip. Security,
28
+ * performance, and correctness lenses are universally applicable to
29
+ * every code change — the focus array picks emphasis, not gating.
30
+ *
31
+ * When focus is empty/missing, the worker performs a comprehensive sweep
32
+ * applying all four lenses with the executability/merge-safety
33
+ * orientation block at the top of the prompt.
34
+ */
22
35
  const REVIEW_DONE_CONDITIONS = {
23
- security: 'Identify security vulnerabilities with severity, location, and remediation.',
24
- performance: 'Identify performance issues with impact level, location, and fix recommendation.',
25
- correctness: 'Identify logic errors, edge cases, and contract violations with severity and location.',
26
- style: 'Identify style issues, naming inconsistencies, and dead code with location and fix.',
36
+ security: 'Lens emphasis: security. Apply the full failure-mode taxonomy through the security lens: auth bypass, injection (SQL/command/prompt), untrusted input flowing to a sink (eval/exec/HTML), data exposure, weakened sandboxing, and hardcoded secrets. Each finding has severity, location, and remediation.',
37
+ performance: 'Lens emphasis: performance. Apply the full failure-mode taxonomy through the performance lens: N+1 queries, unbounded loops, blocking I/O on hot paths, unnecessary deep clones, work shifted from build/init time to request time, and missing caching where the same value is recomputed. Each finding has impact level, location, and fix recommendation.',
38
+ correctness: 'Lens emphasis: correctness. Apply the full failure-mode taxonomy through the correctness lens: logic errors, off-by-one, unhandled edge cases (null/undefined/empty/timeout/error/zero/negative), type mismatches, contract violations, race conditions, and resource leaks. Each finding has severity, location, and correct behavior.',
39
+ style: 'Lens emphasis: style. Apply the full failure-mode taxonomy through the style lens: naming, formatting, dead code, inconsistent patterns, deprecated APIs, and missing types. Note: style is rarely the highest-value review lens for a non-trivial diff — sweep the correctness, security, and performance categories too.',
27
40
  };
28
41
  const DELTA_REVIEW_SUFFIX = ' Perform a full review (do not reduce thoroughness). Verify each prior finding as addressed or unaddressed. Omit addressed prior findings. Include unaddressed prior findings and new findings. End with a summary of which prior findings were resolved.';
29
42
  function resolveReviewDoneCondition(focus, hasContextBlocks) {
43
+ let base;
30
44
  if (!focus || focus.length === 0) {
31
- return `Review code for correctness, security, performance, and style. Each finding has category, severity, location, and recommendation.${hasContextBlocks ? DELTA_REVIEW_SUFFIX : ''}`;
45
+ base = 'Comprehensive code review. Apply the full failure-mode taxonomy (the orientation block above) through all four lenses (correctness, security, performance, style). Emphasize TEST GAP, CROSS-FILE RIPPLE, MISSING EDGE CASE, and IMPLICIT-CONTRACT ASSUMPTION — these are the categories most often missed and most likely to ship regressions. Each finding has category, severity, location, and recommendation.';
46
+ }
47
+ else {
48
+ base = focus.map(f => REVIEW_DONE_CONDITIONS[f] ?? '').filter(Boolean).join(' ');
32
49
  }
33
- const base = focus.map(f => REVIEW_DONE_CONDITIONS[f] ?? '').filter(Boolean).join(' ');
34
50
  return hasContextBlocks ? base + DELTA_REVIEW_SUFFIX : base;
35
51
  }
36
52
  function buildReviewPrompt(brief) {
@@ -57,6 +73,13 @@ function buildReviewPrompt(brief) {
57
73
  return parts.join('\n\n');
58
74
  }
59
75
  const FINDING_FORMAT_INSTRUCTIONS = [
76
+ // Orientation goes FIRST — the worker needs to know why this review
77
+ // exists (pre-merge gate, your verdict is authoritative, missing a
78
+ // regression here ships) before reading the format spec / taxonomy /
79
+ // evidence rules. Without it, workers do line-by-line proofreading and
80
+ // miss cross-file ripples and test gaps.
81
+ REVIEW_PURPOSE_ORIENTATION,
82
+ '',
60
83
  'Produce a narrative code review. Use this EXACT per-finding format — both the structured reviewer and the deterministic fallback extract from this same format:',
61
84
  '',
62
85
  '## Finding 1: <one-line title>',
@@ -76,6 +99,15 @@ const FINDING_FORMAT_INSTRUCTIONS = [
76
99
  '',
77
100
  SEVERITY_LADDER,
78
101
  '',
102
+ // Code-review failure-mode taxonomy. Without this block, workers
103
+ // calibrated on line-by-line proofreading miss the cross-file ripple,
104
+ // test gap, and implicit-contract findings that actually block merges.
105
+ CODE_REVIEW_FAILURE_MODES,
106
+ '',
107
+ // Counter-balances the SEVERITY_LADDER's anti-inflation hint and
108
+ // includes the cross-file pass with worked example.
109
+ THOROUGHNESS_REMINDER_REVIEW,
110
+ '',
79
111
  EVIDENCE_RULE_REVIEW,
80
112
  '',
81
113
  SCOPE_RULE_REVIEW,
@@ -98,8 +130,19 @@ export const toolConfig = {
98
130
  const filePaths = brief.filePath
99
131
  ? [brief.filePath]
100
132
  : (brief.filePaths && brief.filePaths.length > 0 ? brief.filePaths : undefined);
133
+ const targetParts = ['Review this code:'];
134
+ if (brief.code)
135
+ targetParts.push('```\n' + brief.code + '\n```');
136
+ if (filePaths && filePaths.length > 0) {
137
+ targetParts.push(`Target files:\n${filePaths.map(p => `- ${p}`).join('\n')}`);
138
+ }
139
+ if (brief.focus)
140
+ targetParts.push(`Focus: ${Array.isArray(brief.focus) ? brief.focus.join(', ') : brief.focus}`);
101
141
  return {
102
142
  prompt,
143
+ // Pure user code/files for the parallel-criteria dispatcher's cached
144
+ // prefix; bypasses the legacy ## Finding format spec embedded in `prompt`.
145
+ parallelTarget: targetParts.join('\n\n'),
103
146
  agentType: 'complex',
104
147
  reviewPolicy: 'quality_only',
105
148
  briefQualityPolicy: 'off',
@@ -1 +1 @@
1
- {"version":3,"file":"tool-config.js","sourceRoot":"","sources":["../../../src/tools/review/tool-config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,EAAE,qBAAqB,EAAE,MAAM,iDAAiD,CAAC;AAGxF,OAAO,EAAE,eAAe,EAAoB,MAAM,6CAA6C,CAAC;AAChG,OAAO,EAAE,kBAAkB,EAAE,MAAM,sDAAsD,CAAC;AAC1F,OAAO,EAAE,sBAAsB,EAAE,MAAM,8CAA8C,CAAC;AACtF,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,4CAA4C,CAAC;AAC7E,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,0BAA0B,GAC3B,MAAM,2BAA2B,CAAC;AAEnC,MAAM,UAAU,cAAc,CAAC,QAA6B;IAC1D,QAAQ,CAAC,QAAQ,CAAC;QAChB,SAAS,EAAE,QAAQ;QACnB,UAAU,EAAE,MAAM;QAClB,QAAQ,EAAE,SAAS;QACnB,OAAO,EAAE,MAAM;QACf,MAAM,EAAE,WAA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,QAAQ,EAAE,aAAa,IAAI,UAAU;YAC/D,GAAG,EAAE,GAAG,CAAC,cAAc,EAAE,GAAG,IAAI,GAAG,CAAC,GAAG;YACvC,eAAe,EAAE,KAAK,CAAC,eAAe;YACtC,SAAS;YACT,SAAS,EAAE,GAAG,CAAC,SAAS,IAAI,SAAS;YACrC,UAAU,EAAE,KAAK;SAClB,CAAC;IACJ,CAAC;IACD,YAAY,EAAE,kBAAkB;IAChC,gBAAgB,EAAE,sBAAsB;IACxC,eAAe,EAAE;QACf,SAAS,EAAE,qBAAqB;KACjC;CACF,CAAC"}
@@ -1,12 +1,61 @@
1
1
  /**
2
2
  * Verify-specific implementer criteria.
3
3
  *
4
+ * VERIFY'S PURPOSE — read this before adding categories.
5
+ * mma-verify is the "are we lying when we say it's done?" gate. The
6
+ * caller is about to claim work is complete to a stakeholder; the
7
+ * verify output is the evidence trail for that claim. The success
8
+ * criterion is:
9
+ *
10
+ * "If you mark every item PASS, the caller can claim the work is
11
+ * done to a stakeholder without lying — and the stakeholder, given
12
+ * your evidence, can re-verify each item without re-doing the work."
13
+ *
14
+ * That criterion is what makes a finding load-bearing. A PASS marked
15
+ * on the basis of a prose claim ("the bug is fixed") rather than
16
+ * execution output or a file:line citation is a rubber stamp — the
17
+ * verify-equivalent of an unimplementable fix. A criterion that the
18
+ * worker could not actually verify from the supplied artifact must be
19
+ * marked FAIL with "cannot verify from this artifact" — not assumed-
20
+ * PASS or skipped.
21
+ *
4
22
  * Verify walks an explicit checklist; each Finding maps 1:1 to one
5
23
  * checklist item. Severity is bound to the result (PASS = low,
6
24
  * FAIL = medium/high based on impact). Anything outside the checklist
7
25
  * is out of scope, no exceptions.
8
26
  */
27
+ /**
28
+ * The orientation block. Goes at the TOP of every verify prompt.
29
+ *
30
+ * Without an explicit purpose statement, workers default to "rubber-
31
+ * stamp the checklist" — marking PASS based on prose claims in the
32
+ * work product instead of demanding execution-level evidence. With
33
+ * this orientation, every PASS comes with evidence a stakeholder
34
+ * could re-verify.
35
+ */
36
+ export declare const VERIFY_PURPOSE_ORIENTATION: string;
9
37
  export declare const EVIDENCE_RULE_VERIFY: string;
10
38
  export declare const SCOPE_RULE_VERIFY: string;
39
+ /**
40
+ * The failure-mode taxonomy for verify.
41
+ *
42
+ * Without this block, workers tend to rubber-stamp PASS based on prose
43
+ * claims in the work product. The 7 categories below are the patterns
44
+ * a careful verifier would consciously check for.
45
+ */
46
+ export declare const VERIFY_FAILURE_MODES: string;
47
+ /**
48
+ * Counter-balance to the SEVERITY_LADDER's anti-inflation hint.
49
+ *
50
+ * The shared severity ladder warns against inflation. For verify, the
51
+ * common failure is the OPPOSITE — workers UNDER-flag because they
52
+ * accept prose claims at face value (rubber stamp). This block tells
53
+ * the worker the typical verify failure is rubber-stamping, not
54
+ * over-skeptical FAIL marking.
55
+ */
56
+ export declare const THOROUGHNESS_REMINDER_VERIFY: string;
11
57
  export declare const ANNOTATOR_AWARENESS_VERIFY: string;
58
+ import { type CriterionEntry } from '../criteria-types.js';
59
+ /** Structured per-criterion array for parallel-criteria fan-out. */
60
+ export declare const VERIFY_CRITERIA: readonly CriterionEntry[];
12
61
  //# sourceMappingURL=implementer-criteria.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"implementer-criteria.d.ts","sourceRoot":"","sources":["../../../src/tools/verify/implementer-criteria.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,eAAO,MAAM,oBAAoB,QAMrB,CAAC;AAEb,eAAO,MAAM,iBAAiB,QAIlB,CAAC;AAEb,eAAO,MAAM,0BAA0B,QAO3B,CAAC"}
1
+ {"version":3,"file":"implementer-criteria.d.ts","sourceRoot":"","sources":["../../../src/tools/verify/implementer-criteria.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,0BAA0B,QAe3B,CAAC;AAEb,eAAO,MAAM,oBAAoB,QAUrB,CAAC;AAEb,eAAO,MAAM,iBAAiB,QAKlB,CAAC;AAEb;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,QAcrB,CAAC;AAEb;;;;;;;;GAQG;AACH,eAAO,MAAM,4BAA4B,QAW7B,CAAC;AAEb,eAAO,MAAM,0BAA0B,QAS3B,CAAC;AAEb,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE1E,oEAAoE;AACpE,eAAO,MAAM,eAAe,EAAE,SAAS,cAAc,EAAwC,CAAC"}
@@ -1,29 +1,125 @@
1
1
  /**
2
2
  * Verify-specific implementer criteria.
3
3
  *
4
+ * VERIFY'S PURPOSE — read this before adding categories.
5
+ * mma-verify is the "are we lying when we say it's done?" gate. The
6
+ * caller is about to claim work is complete to a stakeholder; the
7
+ * verify output is the evidence trail for that claim. The success
8
+ * criterion is:
9
+ *
10
+ * "If you mark every item PASS, the caller can claim the work is
11
+ * done to a stakeholder without lying — and the stakeholder, given
12
+ * your evidence, can re-verify each item without re-doing the work."
13
+ *
14
+ * That criterion is what makes a finding load-bearing. A PASS marked
15
+ * on the basis of a prose claim ("the bug is fixed") rather than
16
+ * execution output or a file:line citation is a rubber stamp — the
17
+ * verify-equivalent of an unimplementable fix. A criterion that the
18
+ * worker could not actually verify from the supplied artifact must be
19
+ * marked FAIL with "cannot verify from this artifact" — not assumed-
20
+ * PASS or skipped.
21
+ *
4
22
  * Verify walks an explicit checklist; each Finding maps 1:1 to one
5
23
  * checklist item. Severity is bound to the result (PASS = low,
6
24
  * FAIL = medium/high based on impact). Anything outside the checklist
7
25
  * is out of scope, no exceptions.
8
26
  */
27
+ /**
28
+ * The orientation block. Goes at the TOP of every verify prompt.
29
+ *
30
+ * Without an explicit purpose statement, workers default to "rubber-
31
+ * stamp the checklist" — marking PASS based on prose claims in the
32
+ * work product instead of demanding execution-level evidence. With
33
+ * this orientation, every PASS comes with evidence a stakeholder
34
+ * could re-verify.
35
+ */
36
+ export const VERIFY_PURPOSE_ORIENTATION = [
37
+ 'Why this verify exists:',
38
+ 'mma-verify is the "are we lying when we say it is done?" gate. Your output becomes the evidence trail behind a claim of completeness to a stakeholder. A wrong PASS here ships a false claim.',
39
+ '',
40
+ 'For your output to clear that bar, every Finding must answer:',
41
+ '- Item: the exact criterion text (preserve the caller\'s wording).',
42
+ '- Result: PASS or FAIL — never "partial", "mostly", "in progress" — only PASS or FAIL.',
43
+ '- Evidence: how the stakeholder could re-verify this PASS or FAIL themselves. Acceptable evidence shapes:',
44
+ ' 1. EXECUTION: a command + its observed output (test name + pass/fail line, build output, lint result).',
45
+ ' 2. FILE-LEVEL: `file:line` citation showing the implementation that satisfies (or fails to satisfy) the criterion.',
46
+ ' 3. NEGATIVE: an explicit "cannot verify from this artifact" with what would be needed to verify.',
47
+ '',
48
+ 'A PASS without evidence is a rubber stamp — the worst possible verify failure mode. If you cannot demonstrate PASS, the result is FAIL, NOT assumed-PASS or skipped.',
49
+ '',
50
+ 'The completion test: would a stakeholder who reads only your verification report and the named artifacts be able to re-verify each PASS themselves — and end up agreeing with each verdict?',
51
+ ].join('\n');
9
52
  export const EVIDENCE_RULE_VERIFY = [
10
53
  'Evidence grounding (REQUIRED for every finding):',
11
54
  '- Each Finding maps 1:1 to a checklist item (same count, same order).',
12
- '- Evidence is execution output (test/build/command output) OR a code reference (`file:line`) that demonstrates the criterion\'s status.',
13
- '- If you cannot demonstrate PASS, the result is FAIL explain why in the Evidence field. Do NOT mark PASS without evidence.',
14
- '- Severity binding: PASS items are `low`. FAIL items are `medium` or `high` based on impact. Reserve `critical` for FAIL items that block the next step entirely.',
55
+ '- Evidence is one of three shapes:',
56
+ ' 1. EXECUTION: a command + its observed output. Quote the relevant line of the output (e.g. "12 passed, 0 failed", "✓ tests/foo.test.ts").',
57
+ ' 2. FILE-LEVEL: `file:line` citation showing the implementation that satisfies (or fails) the criterion. Include the quoted excerpt.',
58
+ ' 3. NEGATIVE: explicitly state "cannot verify from this artifact" plus what would be needed (a test run, a different file, a runtime check).',
59
+ '- A "the work product says it is done" claim is NOT evidence — that is a rubber stamp. Only execution output or file:line citations count.',
60
+ '- If you cannot demonstrate PASS, the result is FAIL — explain why in the Evidence field. Do NOT mark PASS without evidence and do NOT skip the item.',
61
+ '- Severity binding: PASS items are `low`. FAIL items are `medium` or `high` based on impact. Reserve `critical` for FAIL items that block the next step entirely (a release-blocking criterion failed, an acceptance test failed, etc.).',
15
62
  ].join('\n');
16
63
  export const SCOPE_RULE_VERIFY = [
17
64
  'Scope:',
18
65
  '- Strictly the checklist items. One Finding per item, in checklist order, no skips.',
66
+ '- IMPLICIT criteria embedded in a checklist item ARE in scope. Example: a checklist item "fix the off-by-one bug in pagination" has an implicit sub-criterion "regression test added". If the implicit sub-criterion is not met, mark FAIL — do NOT split the item into two findings.',
19
67
  '- Out of scope: any issue not tied to a checklist item, however interesting. Such observations may be noted in your summary section, but do NOT emit them as Findings.',
20
68
  ].join('\n');
69
+ /**
70
+ * The failure-mode taxonomy for verify.
71
+ *
72
+ * Without this block, workers tend to rubber-stamp PASS based on prose
73
+ * claims in the work product. The 7 categories below are the patterns
74
+ * a careful verifier would consciously check for.
75
+ */
76
+ export const VERIFY_FAILURE_MODES = [
77
+ 'Five parallel evidence sources for verifying the user\'s checklist. From your assigned source, examine EVERY applicable checklist item and emit a finding (PASS / FAIL / cannot-verify) per item, with the evidence quoted. Severity = how decisive the verdict is.',
78
+ '',
79
+ '1. TEST-SUITE EVIDENCE — read the test files exercising the work product. Does an existing or newly-added test cover the criterion? Did the test pass on the most recent run? Cite the test name + file:line + the assertion. If no test exists for the criterion, that is itself a finding (FAIL: "no test exercises this criterion").',
80
+ '2. SOURCE-CODE DIRECT-READ — read the implementation files directly. Does the code actually do what the criterion requires? Trace the relevant function / class / module, cite file:line for the lines that satisfy (or fail to satisfy) the criterion. This is the highest-fidelity evidence — no second-hand claims.',
81
+ '3. DOCUMENTATION EVIDENCE — read README, docstrings, design docs, commit messages, CHANGELOG. Does the docs corroborate the criterion is met? Quote the docs passage + cite source. Doc-only evidence is medium-confidence (docs can be stale); always cross-check with TEST or SOURCE evidence when possible.',
82
+ '4. RUN-OUTPUT EVIDENCE — read recent test-run logs, build output, CI artifacts, shell-command output that the work-product author cited. Does the output demonstrate the criterion? Verify timestamps to ensure evidence post-dates the change. Run-output evidence is the strongest "it actually worked" signal.',
83
+ '5. DIFF EVIDENCE — read the recent diff (git log / git diff). Is the change actually in the diff for the relevant files/lines? A claim of "implemented X in module Y" must show up in the diff for module Y. If the diff is empty or unrelated, FAIL the criterion regardless of other claims.',
84
+ '',
85
+ 'Severity calibration for each verification finding:',
86
+ '- critical: FAIL on a release-blocking criterion with rock-solid contradicting evidence from THIS source — the user must NOT claim done.',
87
+ '- high: FAIL on a substantial criterion with strong evidence from THIS source; OR a strong PASS on a load-bearing criterion with rock-solid evidence from THIS source.',
88
+ '- medium: PARTIAL coverage / cannot-verify-from-this-source / a clear PASS on a non-load-bearing criterion. Mark "verify by also checking <other source>" so the user knows where to triangulate.',
89
+ '- low: minor stylistic gap in the verification narrative; a low-confidence PASS or absence-of-counter-evidence; defer to other angles\' findings.',
90
+ ].join('\n');
91
+ /**
92
+ * Counter-balance to the SEVERITY_LADDER's anti-inflation hint.
93
+ *
94
+ * The shared severity ladder warns against inflation. For verify, the
95
+ * common failure is the OPPOSITE — workers UNDER-flag because they
96
+ * accept prose claims at face value (rubber stamp). This block tells
97
+ * the worker the typical verify failure is rubber-stamping, not
98
+ * over-skeptical FAIL marking.
99
+ */
100
+ export const THOROUGHNESS_REMINDER_VERIFY = [
101
+ 'Thoroughness expectation for verify:',
102
+ '- The SEVERITY_LADDER warns against inflation. That warning is calibrated for code reviews — for verify, the common failure is the OPPOSITE: rubber-stamping PASS based on a prose claim instead of demanding execution-level evidence. Apply the failure-mode taxonomy first; THEN calibrate severity.',
103
+ '- For each checklist item, ASK: "could a stakeholder reading my evidence re-verify this PASS themselves and reach the same conclusion?" If no — even if you believe the criterion is met — the verdict is FAIL with "cannot verify from this artifact".',
104
+ '- Do not invent FAILs to hit a quota. But if every item is PASS and the artifact is non-trivial, double-check categories 1, 3, 4, and 7 (claim-without-evidence, implicit-criterion gap, partial coverage, assumed-PASS-on-untested) — these are the ones verifiers most often miss on first pass and the ones most likely to ship a false claim.',
105
+ '',
106
+ 'Evidence-shape walk (REQUIRED on every checklist item):',
107
+ '- For each item, before writing the Finding, ask: which of the three evidence shapes do I have? EXECUTION, FILE-LEVEL, or NEGATIVE?',
108
+ '- If you cannot place your verdict in one of the three shapes, your evidence is insufficient — the verdict is FAIL with NEGATIVE evidence ("cannot verify from this artifact, would need X").',
109
+ '- Worked example. Checklist item: "Bug #123 is fixed (the off-by-one in pagination)." Work product says "fixed in commit abc123 — added a guard at the loop boundary." Naive verdict: PASS based on the work product\'s claim. Correct verdict: read commit abc123, find the changed lines, cite `src/pagination.ts:48` with the actual changed expression, AND check for a regression test (implicit sub-criterion of "fix the bug"). If no test exists, mark FAIL with explicit note "fix is in place but no regression test was added — implicit sub-criterion not met". Do NOT mark PASS on the work-product claim alone, and do NOT silently exclude the implicit sub-criterion.',
110
+ '- Most verifiers miss findings of this shape on first pass because the work product\'s prose is persuasive. The evidence-shape walk forces the demand for execution or file:line.',
111
+ ].join('\n');
21
112
  export const ANNOTATOR_AWARENESS_VERIFY = [
22
113
  'After your output, an annotator validates each finding against this verify rubric:',
23
- '- Does each Finding map to exactly one checklist item?',
24
- '- Does the evidence actually demonstrate the claimed PASS or FAIL?',
25
- '- Is the severity bound (PASS = low; FAIL = medium/high)?',
26
- '- Are all checklist items covered?',
27
- 'Self-check before emitting. Findings that fail any check are downgraded or dropped.',
114
+ '- Does each Finding map to exactly one checklist item, in checklist order, with the criterion text preserved?',
115
+ '- Does the evidence actually demonstrate the claimed PASS or FAIL — and is it one of the three valid shapes (EXECUTION, FILE-LEVEL, or NEGATIVE)?',
116
+ '- Is the severity bound (PASS = low; FAIL = medium/high based on impact)?',
117
+ '- Are all checklist items covered, including ones the worker thought were trivial?',
118
+ '- For PASS items: could a stakeholder re-verify the PASS from the cited evidence alone?',
119
+ '- For FAIL items: is the FAIL backed by a specific shortfall (which sub-criterion missed, which test failed, which file does not implement what the criterion requires)?',
120
+ 'Self-check before emitting. Findings that fail any check are downgraded or dropped — but FAIL with NEGATIVE evidence ("cannot verify from this artifact") is FULLY VALID and the correct verdict when the artifact is insufficient. Do NOT downgrade NEGATIVE-evidence FAILs to "cannot determine" or assumed-PASS.',
28
121
  ].join('\n');
122
+ import { parseCriteria } from '../criteria-types.js';
123
+ /** Structured per-criterion array for parallel-criteria fan-out. */
124
+ export const VERIFY_CRITERIA = parseCriteria(VERIFY_FAILURE_MODES);
29
125
  //# sourceMappingURL=implementer-criteria.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"implementer-criteria.js","sourceRoot":"","sources":["../../../src/tools/verify/implementer-criteria.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,kDAAkD;IAClD,uEAAuE;IACvE,yIAAyI;IACzI,8HAA8H;IAC9H,mKAAmK;CACpK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEb,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,QAAQ;IACR,qFAAqF;IACrF,wKAAwK;CACzK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEb,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,oFAAoF;IACpF,wDAAwD;IACxD,oEAAoE;IACpE,2DAA2D;IAC3D,oCAAoC;IACpC,qFAAqF;CACtF,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC"}
1
+ {"version":3,"file":"implementer-criteria.js","sourceRoot":"","sources":["../../../src/tools/verify/implementer-criteria.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,yBAAyB;IACzB,+LAA+L;IAC/L,EAAE;IACF,+DAA+D;IAC/D,oEAAoE;IAC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C,IAAI,CAAC,CAAC;AAEb,OAAO,EAAE,aAAa,EAAuB,MAAM,sBAAsB,CAAC;AAE1E,oEAAoE;AACpE,MAAM,CAAC,MAAM,eAAe,GAA8B,aAAa,CAAC,oBAAoB,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"tool-config.d.ts","sourceRoot":"","sources":["../../../src/tools/verify/tool-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,6CAA6C,CAAC;AAElF,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAYvE,wBAAgB,cAAc,CAAC,QAAQ,EAAE,mBAAmB,GAAG,IAAI,CAYlE;AAID,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,0EAA0E;IAC1E,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAgED,eAAO,MAAM,UAAU,EAAE,UAAU,CAAC,KAAK,EAAE,WAAW,EAAE,OAAO,CAqD9D,CAAC"}
1
+ {"version":3,"file":"tool-config.d.ts","sourceRoot":"","sources":["../../../src/tools/verify/tool-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,6CAA6C,CAAC;AAElF,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAevE,wBAAgB,cAAc,CAAC,QAAQ,EAAE,mBAAmB,GAAG,IAAI,CAYlE;AAID,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,0EAA0E;IAC1E,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAgFD,eAAO,MAAM,UAAU,EAAE,UAAU,CAAC,KAAK,EAAE,WAAW,EAAE,OAAO,CAyD9D,CAAC"}
@@ -4,7 +4,7 @@ import { verifyReportSchema } from '../../reporting/report-parser-slots/verify-r
4
4
  import { verifyHeadlineTemplate } from '../../reporting/headline-templates/verify.js';
5
5
  import { DEFAULT_TASK_TIMEOUT_MS } from '../../config/schema.js';
6
6
  import { SEVERITY_LADDER } from '../../review/templates/finding-criteria.js';
7
- import { EVIDENCE_RULE_VERIFY, SCOPE_RULE_VERIFY, ANNOTATOR_AWARENESS_VERIFY, } from './implementer-criteria.js';
7
+ import { VERIFY_PURPOSE_ORIENTATION, EVIDENCE_RULE_VERIFY, SCOPE_RULE_VERIFY, ANNOTATOR_AWARENESS_VERIFY, VERIFY_FAILURE_MODES, THOROUGHNESS_REMINDER_VERIFY, } from './implementer-criteria.js';
8
8
  export function registerVerify(registry) {
9
9
  registry.register({
10
10
  routeName: 'verify',
@@ -20,13 +20,19 @@ export function registerVerify(registry) {
20
20
  }
21
21
  // ── Prompt builders (lifted from legacy executor) ──
22
22
  const FINDING_FORMAT_INSTRUCTIONS = [
23
+ // Orientation goes FIRST — the worker needs to know why this verify
24
+ // exists (false-claim gate, every PASS must be re-verifiable) before
25
+ // reading the format spec / taxonomy / evidence rules. Without it,
26
+ // workers default to rubber-stamping based on prose claims.
27
+ VERIFY_PURPOSE_ORIENTATION,
28
+ '',
23
29
  'For each checklist item, use this EXACT per-finding format — both the structured reviewer and the deterministic fallback extract from this same format:',
24
30
  '',
25
31
  '## Finding 1: <one-line title (the criterion summary)>',
26
32
  '- Severity: critical | high | medium | low (use `low` for PASS items; `medium` or `high` for FAIL items per impact)',
27
33
  '- Item: the criterion text',
28
34
  '- Result: PASS or FAIL',
29
- '- Evidence: file:line + what it shows, OR command + output',
35
+ '- Evidence: EXECUTION (command + observed output), FILE-LEVEL (file:line + quoted excerpt), or NEGATIVE ("cannot verify from this artifact, would need X")',
30
36
  '',
31
37
  '## Finding 2: <one-line title>',
32
38
  '- Severity: ...',
@@ -42,6 +48,16 @@ const FINDING_FORMAT_INSTRUCTIONS = [
42
48
  // PASS -> low, FAIL -> medium/high based on impact.
43
49
  SEVERITY_LADDER,
44
50
  '',
51
+ // Verify failure-mode taxonomy. Without this block, workers tend to
52
+ // rubber-stamp PASS based on prose claims instead of demanding
53
+ // execution-level evidence. The 7 categories enumerate the ways a
54
+ // verifier can ship a false claim.
55
+ VERIFY_FAILURE_MODES,
56
+ '',
57
+ // Counter-balances the SEVERITY_LADDER's anti-inflation hint and
58
+ // includes the evidence-shape walk with worked example.
59
+ THOROUGHNESS_REMINDER_VERIFY,
60
+ '',
45
61
  EVIDENCE_RULE_VERIFY,
46
62
  '',
47
63
  SCOPE_RULE_VERIFY,
@@ -101,8 +117,12 @@ export const toolConfig = {
101
117
  const prompt = brief.promptTemplate
102
118
  ? buildPerFilePrompt(brief.filePaths[0], brief.promptTemplate)
103
119
  : buildVerifyPrompt(brief.work, brief.filePaths.length > 0 ? brief.filePaths : undefined, brief.checklist);
120
+ const checklistFmt = brief.checklist.map((c, i) => `${i + 1}. ${c}`).join('\n');
104
121
  return {
105
122
  prompt,
123
+ // Pure user work + checklist for the parallel-criteria dispatcher's
124
+ // cached prefix; bypasses the legacy verify format spec.
125
+ parallelTarget: `Work to verify:\n${brief.work}\n\nChecklist (verify each item):\n${checklistFmt}`,
106
126
  agentType: 'complex',
107
127
  reviewPolicy: 'quality_only',
108
128
  briefQualityPolicy: 'off',
@@ -1 +1 @@
1
- {"version":3,"file":"tool-config.js","sourceRoot":"","sources":["../../../src/tools/verify/tool-config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;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