@zhixuan92/multi-model-agent-core 4.0.6 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/intake/brief-compiler-slots/delegate.d.ts +18 -0
- package/dist/intake/brief-compiler-slots/delegate.d.ts.map +1 -1
- package/dist/intake/brief-compiler-slots/delegate.js +36 -3
- package/dist/intake/brief-compiler-slots/delegate.js.map +1 -1
- package/dist/reporting/report-parser-slots/investigate-report.d.ts.map +1 -1
- package/dist/reporting/report-parser-slots/investigate-report.js +41 -2
- package/dist/reporting/report-parser-slots/investigate-report.js.map +1 -1
- package/dist/review/templates/annotator-audit.d.ts.map +1 -1
- package/dist/review/templates/annotator-audit.js +5 -3
- package/dist/review/templates/annotator-audit.js.map +1 -1
- package/dist/review/templates/annotator-debug.d.ts.map +1 -1
- package/dist/review/templates/annotator-debug.js +11 -7
- package/dist/review/templates/annotator-debug.js.map +1 -1
- package/dist/review/templates/annotator-investigate.d.ts.map +1 -1
- package/dist/review/templates/annotator-investigate.js +6 -3
- package/dist/review/templates/annotator-investigate.js.map +1 -1
- package/dist/review/templates/annotator-review.d.ts.map +1 -1
- package/dist/review/templates/annotator-review.js +13 -6
- package/dist/review/templates/annotator-review.js.map +1 -1
- package/dist/review/templates/annotator-verify.d.ts.map +1 -1
- package/dist/review/templates/annotator-verify.js +11 -5
- package/dist/review/templates/annotator-verify.js.map +1 -1
- package/dist/tools/audit/implementer-criteria.d.ts +55 -4
- package/dist/tools/audit/implementer-criteria.d.ts.map +1 -1
- package/dist/tools/audit/implementer-criteria.js +113 -11
- package/dist/tools/audit/implementer-criteria.js.map +1 -1
- package/dist/tools/audit/schema.d.ts +3 -10
- package/dist/tools/audit/schema.d.ts.map +1 -1
- package/dist/tools/audit/schema.js +3 -4
- package/dist/tools/audit/schema.js.map +1 -1
- package/dist/tools/audit/tool-config.d.ts.map +1 -1
- package/dist/tools/audit/tool-config.js +42 -21
- package/dist/tools/audit/tool-config.js.map +1 -1
- package/dist/tools/debug/implementer-criteria.d.ts +44 -4
- package/dist/tools/debug/implementer-criteria.d.ts.map +1 -1
- package/dist/tools/debug/implementer-criteria.js +105 -13
- package/dist/tools/debug/implementer-criteria.js.map +1 -1
- package/dist/tools/debug/tool-config.d.ts.map +1 -1
- package/dist/tools/debug/tool-config.js +22 -4
- package/dist/tools/debug/tool-config.js.map +1 -1
- package/dist/tools/delegate/implementer-criteria.d.ts +62 -0
- package/dist/tools/delegate/implementer-criteria.d.ts.map +1 -0
- package/dist/tools/delegate/implementer-criteria.js +114 -0
- package/dist/tools/delegate/implementer-criteria.js.map +1 -0
- package/dist/tools/execute-plan/implementer-criteria.d.ts +52 -0
- package/dist/tools/execute-plan/implementer-criteria.d.ts.map +1 -0
- package/dist/tools/execute-plan/implementer-criteria.js +104 -0
- package/dist/tools/execute-plan/implementer-criteria.js.map +1 -0
- package/dist/tools/execute-plan/tool-config.d.ts.map +1 -1
- package/dist/tools/execute-plan/tool-config.js +17 -3
- package/dist/tools/execute-plan/tool-config.js.map +1 -1
- package/dist/tools/investigate/implementer-criteria.d.ts +48 -5
- package/dist/tools/investigate/implementer-criteria.d.ts.map +1 -1
- package/dist/tools/investigate/implementer-criteria.js +103 -13
- package/dist/tools/investigate/implementer-criteria.js.map +1 -1
- package/dist/tools/investigate/tool-config.d.ts.map +1 -1
- package/dist/tools/investigate/tool-config.js +15 -8
- package/dist/tools/investigate/tool-config.js.map +1 -1
- package/dist/tools/review/implementer-criteria.d.ts +47 -1
- package/dist/tools/review/implementer-criteria.d.ts.map +1 -1
- package/dist/tools/review/implementer-criteria.js +110 -9
- package/dist/tools/review/implementer-criteria.js.map +1 -1
- package/dist/tools/review/tool-config.d.ts.map +1 -1
- package/dist/tools/review/tool-config.js +39 -7
- package/dist/tools/review/tool-config.js.map +1 -1
- package/dist/tools/verify/implementer-criteria.d.ts +46 -0
- package/dist/tools/verify/implementer-criteria.d.ts.map +1 -1
- package/dist/tools/verify/implementer-criteria.js +103 -8
- package/dist/tools/verify/implementer-criteria.js.map +1 -1
- package/dist/tools/verify/tool-config.d.ts.map +1 -1
- package/dist/tools/verify/tool-config.js +18 -2
- package/dist/tools/verify/tool-config.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,22 @@
|
|
|
1
1
|
export type ReviewPolicy = 'full' | 'quality_only' | 'diff_only' | 'none';
|
|
2
|
+
/**
|
|
3
|
+
* Compile a delegate worker prompt.
|
|
4
|
+
*
|
|
5
|
+
* Structure (top-down):
|
|
6
|
+
* 1. Orientation (why this exists, success criterion)
|
|
7
|
+
* 2. The caller's brief (`prompt`)
|
|
8
|
+
* 3. File constraint (when filePaths is set)
|
|
9
|
+
* 4. Scope rule
|
|
10
|
+
* 5. Failure-mode taxonomy
|
|
11
|
+
* 6. Completeness reminder + brief-vs-diff walk + worked example
|
|
12
|
+
* 7. Reviewer awareness (spec + quality self-check)
|
|
13
|
+
*
|
|
14
|
+
* Without (1), (4)-(6), workers calibrated on "implement something
|
|
15
|
+
* good" tend to over-deliver (scope creep) or under-deliver (silent
|
|
16
|
+
* partial fix). The orientation + taxonomy + completeness reminder
|
|
17
|
+
* shifts the calibration to "smallest complete change" — minimal AND
|
|
18
|
+
* complete simultaneously.
|
|
19
|
+
*/
|
|
2
20
|
export declare function compileDelegatePrompt(input: {
|
|
3
21
|
prompt: string;
|
|
4
22
|
filePaths?: string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delegate.d.ts","sourceRoot":"","sources":["../../../src/intake/brief-compiler-slots/delegate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"delegate.d.ts","sourceRoot":"","sources":["../../../src/intake/brief-compiler-slots/delegate.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,cAAc,GAAG,WAAW,GAAG,MAAM,CAAC;AAE1E;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE,GAAG,MAAM,CAoB7F"}
|
|
@@ -1,9 +1,42 @@
|
|
|
1
1
|
import { REVIEWER_AWARENESS_AP } from '../../review/templates/finding-criteria.js';
|
|
2
|
-
|
|
2
|
+
import { DELEGATE_PURPOSE_ORIENTATION, DELEGATE_SCOPE_RULE, DELEGATE_FAILURE_MODES, COMPLETENESS_REMINDER_DELEGATE, } from '../../tools/delegate/implementer-criteria.js';
|
|
3
|
+
/**
|
|
4
|
+
* Compile a delegate worker prompt.
|
|
5
|
+
*
|
|
6
|
+
* Structure (top-down):
|
|
7
|
+
* 1. Orientation (why this exists, success criterion)
|
|
8
|
+
* 2. The caller's brief (`prompt`)
|
|
9
|
+
* 3. File constraint (when filePaths is set)
|
|
10
|
+
* 4. Scope rule
|
|
11
|
+
* 5. Failure-mode taxonomy
|
|
12
|
+
* 6. Completeness reminder + brief-vs-diff walk + worked example
|
|
13
|
+
* 7. Reviewer awareness (spec + quality self-check)
|
|
14
|
+
*
|
|
15
|
+
* Without (1), (4)-(6), workers calibrated on "implement something
|
|
16
|
+
* good" tend to over-deliver (scope creep) or under-deliver (silent
|
|
17
|
+
* partial fix). The orientation + taxonomy + completeness reminder
|
|
18
|
+
* shifts the calibration to "smallest complete change" — minimal AND
|
|
19
|
+
* complete simultaneously.
|
|
20
|
+
*/
|
|
3
21
|
export function compileDelegatePrompt(input) {
|
|
4
22
|
const filePathsClause = input.filePaths && input.filePaths.length > 0
|
|
5
|
-
? `\n\nFILE CONSTRAINT: write
|
|
23
|
+
? `\n\nFILE CONSTRAINT: write to exactly these path(s), no others, no renames: ${input.filePaths.map((p) => `\`${p}\``).join(', ')}.\n- Existing files in this list are pre-verified to read and modify.\n- Non-existent paths in this list are explicit OUTPUT TARGETS — create them.\n- Files NOT in this list are off-limits to write unless the brief\'s task genuinely requires touching them (call out the deviation in your summary).`
|
|
6
24
|
: '';
|
|
7
|
-
return
|
|
25
|
+
return [
|
|
26
|
+
DELEGATE_PURPOSE_ORIENTATION,
|
|
27
|
+
'',
|
|
28
|
+
'Brief from the caller (this is the contract — implement exactly what it says):',
|
|
29
|
+
'',
|
|
30
|
+
input.prompt,
|
|
31
|
+
filePathsClause,
|
|
32
|
+
'',
|
|
33
|
+
DELEGATE_SCOPE_RULE,
|
|
34
|
+
'',
|
|
35
|
+
DELEGATE_FAILURE_MODES,
|
|
36
|
+
'',
|
|
37
|
+
COMPLETENESS_REMINDER_DELEGATE,
|
|
38
|
+
'',
|
|
39
|
+
REVIEWER_AWARENESS_AP,
|
|
40
|
+
].join('\n');
|
|
8
41
|
}
|
|
9
42
|
//# sourceMappingURL=delegate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delegate.js","sourceRoot":"","sources":["../../../src/intake/brief-compiler-slots/delegate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;
|
|
1
|
+
{"version":3,"file":"delegate.js","sourceRoot":"","sources":["../../../src/intake/brief-compiler-slots/delegate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AACnF,OAAO,EACL,4BAA4B,EAC5B,mBAAmB,EACnB,sBAAsB,EACtB,8BAA8B,GAC/B,MAAM,8CAA8C,CAAC;AAItD;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,qBAAqB,CAAC,KAA+C;IACnF,MAAM,eAAe,GAAG,KAAK,CAAC,SAAS,IAAI,KAAK,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC;QACnE,CAAC,CAAC,+EAA+E,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,2SAA2S;QAC7a,CAAC,CAAC,EAAE,CAAC;IACP,OAAO;QACL,4BAA4B;QAC5B,EAAE;QACF,gFAAgF;QAChF,EAAE;QACF,KAAK,CAAC,MAAM;QACZ,eAAe;QACf,EAAE;QACF,mBAAmB;QACnB,EAAE;QACF,sBAAsB;QACtB,EAAE;QACF,8BAA8B;QAC9B,EAAE;QACF,qBAAqB;KACtB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"investigate-report.d.ts","sourceRoot":"","sources":["../../../src/reporting/report-parser-slots/investigate-report.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAKnE,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,sBAAsB,EAAE,MAAM,CAAC;CAChC;
|
|
1
|
+
{"version":3,"file":"investigate-report.d.ts","sourceRoot":"","sources":["../../../src/reporting/report-parser-slots/investigate-report.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAKnE,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,sBAAsB,EAAE,MAAM,CAAC;CAChC;AAiDD,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,oBAAoB,CAwBvE;AAID,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAC;IACjC,SAAS,EAAE,MAAM,CAAC;CACnB;AAID,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,UAAU,GAAG,IAAI,CAyBrE;AAID,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,UAAU,EAAE,UAAU,GAAG,IAAI,CAAC;IAC9B,wBAAwB,EAAE,OAAO,CAAC;IAClC,WAAW,EAAE;QACX,sBAAsB,EAAE,MAAM,CAAC;QAC/B,uBAAuB,EAAE,MAAM,EAAE,CAAC;QAClC,uBAAuB,EAAE,MAAM,EAAE,CAAC;KACnC,CAAC;CACH;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS,CAAC;IACvC,SAAS,EAAE,OAAO,GAAG,kBAAkB,GAAG,eAAe,GAAG,SAAS,CAAC;IACtE,UAAU,EAAE,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC;CAC7C;AAED,MAAM,MAAM,wBAAwB,GAChC;IAAE,IAAI,EAAE,sBAAsB,CAAA;CAAE,GAChC;IAAE,IAAI,EAAE,mBAAmB,CAAC;IAAC,aAAa,EAAE,mBAAmB,CAAC;IAAC,eAAe,EAAE,eAAe,CAAA;CAAE,CAAC;AAkBxG,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,MAAM,GAAG,wBAAwB,CAgEpF;AAID,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,mBAAmB,CAAC;IAC1B,aAAa,EAAE,mBAAmB,CAAC;IACnC,eAAe,EAAE,eAAe,CAAC;CAClC;AAED,eAAO,MAAM,uBAAuB,EAAE,YAAY,CAAC,uBAAuB,CAQzE,CAAC"}
|
|
@@ -18,6 +18,34 @@ function isValidLineToken(token) {
|
|
|
18
18
|
}
|
|
19
19
|
return true;
|
|
20
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* Strip leading/trailing backticks from a `file:line` token.
|
|
23
|
+
*
|
|
24
|
+
* Workers commonly wrap the file:line portion in backticks for visual
|
|
25
|
+
* styling (e.g. `` `src/foo.ts:42` ``). The CITATION_RE matches the raw
|
|
26
|
+
* pattern, so strip the backticks before matching. Without this, every
|
|
27
|
+
* backtick-wrapped citation would be flagged as malformed even though
|
|
28
|
+
* the content is correct.
|
|
29
|
+
*/
|
|
30
|
+
function stripBacktickWrap(s) {
|
|
31
|
+
// Strip a leading backtick if it exists, and a trailing backtick at the
|
|
32
|
+
// end of the file:line portion (just before the em-dash separator). We
|
|
33
|
+
// do this conservatively: only strip when both ends actually have a
|
|
34
|
+
// backtick at expected positions, to avoid mangling claims that
|
|
35
|
+
// legitimately contain backticks (e.g. `` `auditType` is a parameter ``).
|
|
36
|
+
let out = s;
|
|
37
|
+
// Leading backtick: `path:line` ...
|
|
38
|
+
if (out.startsWith('`')) {
|
|
39
|
+
const closeIdx = out.indexOf('`', 1);
|
|
40
|
+
// Only strip if the closing backtick comes BEFORE the em-dash separator
|
|
41
|
+
// (i.e. it wraps just the path:line portion, not the whole line).
|
|
42
|
+
const sepIdx = out.search(/\s+(?:—|--)\s+/);
|
|
43
|
+
if (closeIdx !== -1 && (sepIdx === -1 || closeIdx < sepIdx)) {
|
|
44
|
+
out = out.slice(1, closeIdx) + out.slice(closeIdx + 1);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return out;
|
|
48
|
+
}
|
|
21
49
|
export function parseCitations(rawLines) {
|
|
22
50
|
const citations = [];
|
|
23
51
|
let malformed = 0;
|
|
@@ -25,7 +53,7 @@ export function parseCitations(rawLines) {
|
|
|
25
53
|
const trimmed = raw.trim();
|
|
26
54
|
if (!trimmed)
|
|
27
55
|
continue;
|
|
28
|
-
const stripped = trimmed.replace(BULLET_RE, '');
|
|
56
|
+
const stripped = stripBacktickWrap(trimmed.replace(BULLET_RE, ''));
|
|
29
57
|
const match = stripped.match(CITATION_RE);
|
|
30
58
|
if (!match || !match.groups) {
|
|
31
59
|
malformed++;
|
|
@@ -49,7 +77,18 @@ export function parseConfidence(rawLines) {
|
|
|
49
77
|
const firstIdx = rawLines.findIndex(l => l.trim());
|
|
50
78
|
if (firstIdx === -1)
|
|
51
79
|
return null;
|
|
52
|
-
|
|
80
|
+
// Strip a leading wrapping backtick if the worker styled the level
|
|
81
|
+
// (e.g. "`high` — rationale"). This mirrors stripBacktickWrap in the
|
|
82
|
+
// citation parser; without it, a backtick-styled level token is
|
|
83
|
+
// flagged as malformed even though the content is correct.
|
|
84
|
+
let head = rawLines[firstIdx].trim();
|
|
85
|
+
if (head.startsWith('`')) {
|
|
86
|
+
const closeIdx = head.indexOf('`', 1);
|
|
87
|
+
const sepIdx = head.search(/\s+(?:—|--)\s+/);
|
|
88
|
+
if (closeIdx !== -1 && (sepIdx === -1 || closeIdx < sepIdx)) {
|
|
89
|
+
head = head.slice(1, closeIdx) + head.slice(closeIdx + 1);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
53
92
|
const m = head.match(CONFIDENCE_HEAD_RE);
|
|
54
93
|
if (!m)
|
|
55
94
|
return null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"investigate-report.js","sourceRoot":"","sources":["../../../src/reporting/report-parser-slots/investigate-report.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAehE,MAAM,aAAa,GAAG,oCAAoC,CAAC;AAC3D,MAAM,WAAW,GAAG,gEAAgE,CAAC;AACrF,MAAM,SAAS,GAAG,sBAAsB,CAAC;AAEzC,SAAS,gBAAgB,CAAC,KAAa;IACrC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IAC7C,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC/B,KAAK,MAAM,CAAC,IAAI,KAAK,EAAE,CAAC;QACtB,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;QACpB,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC;YAAE,OAAO,KAAK,CAAC;IAC7C,CAAC;IACD,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvB,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QACvC,IAAI,KAAM,GAAG,GAAI;YAAE,OAAO,KAAK,CAAC;IAClC,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,QAAkB;IAC/C,MAAM,SAAS,GAAe,EAAE,CAAC;IACjC,IAAI,SAAS,GAAG,CAAC,CAAC;IAClB,KAAK,MAAM,GAAG,IAAI,QAAQ,EAAE,CAAC;QAC3B,MAAM,OAAO,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC;QAC3B,IAAI,CAAC,OAAO;YAAE,SAAS;QACvB,MAAM,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"investigate-report.js","sourceRoot":"","sources":["../../../src/reporting/report-parser-slots/investigate-report.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAehE,MAAM,aAAa,GAAG,oCAAoC,CAAC;AAC3D,MAAM,WAAW,GAAG,gEAAgE,CAAC;AACrF,MAAM,SAAS,GAAG,sBAAsB,CAAC;AAEzC,SAAS,gBAAgB,CAAC,KAAa;IACrC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IAC7C,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC/B,KAAK,MAAM,CAAC,IAAI,KAAK,EAAE,CAAC;QACtB,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;QACpB,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC;YAAE,OAAO,KAAK,CAAC;IAC7C,CAAC;IACD,IAAI,KAAK,CAAC,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AAC;AACJ,CAAC;AAUD,MAAM,CAAC,MAAM,uBAAuB,GAA0C;IAC5E,KAAK,CAAC,IAAY;QAChB,MAAM,MAAM,GAAG,wBAAwB,CAAC,IAAI,CAAC,CAAC;QAC9C,IAAI,MAAM,CAAC,IAAI,KAAK,mBAAmB,EAAE,CAAC;YACxC,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;QACjE,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"annotator-audit.d.ts","sourceRoot":"","sources":["../../../src/review/templates/annotator-audit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,eAAO,MAAM,sBAAsB,EAAE,
|
|
1
|
+
{"version":3,"file":"annotator-audit.d.ts","sourceRoot":"","sources":["../../../src/review/templates/annotator-audit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,eAAO,MAAM,sBAAsB,EAAE,iBAkBpC,CAAC"}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
export const annotatorAuditTemplate = {
|
|
2
2
|
role: 'audit',
|
|
3
|
-
onBriefCheck: 'For each finding, ask: is this the kind of issue the audit asked for? A security audit should produce security findings, not style nits.',
|
|
3
|
+
onBriefCheck: 'For each finding, ask: is this the kind of issue the audit asked for? A security audit should produce security findings, not style nits. AND: is this finding consistent with the doc-audit failure-mode taxonomy (recommendation-coherence, internal contradiction, cross-item duplication, independence-claimed-without-evidence, argument soundness, completeness against constraints, fix actionability, drift, scope-creep)? Findings that match the taxonomy and are backed by section references are valid even when they are reasoning-based rather than direct quotes — do NOT downgrade them as "speculation".',
|
|
4
4
|
evidenceRule: [
|
|
5
|
-
'- Audit findings come in
|
|
5
|
+
'- Audit findings come in FOUR valid shapes:',
|
|
6
6
|
' 1. Doc quote: a verbatim passage from the document showing the issue.',
|
|
7
7
|
' 2. Absence-reference: a precise pointer to where the doc *should* address something but doesn\'t (e.g. "Section 3.2 lists failure modes but is silent on queue overflow").',
|
|
8
8
|
' 3. Claim + contradiction: the doc\'s claim plus a quote from the source it contradicts.',
|
|
9
|
-
'-
|
|
9
|
+
' 4. Internal-coherence: a precise reference to two sections of the document that conflict — quote both, OR quote one and name the section ID of the other (e.g. "A8 fix says \'optionally auto-cancel\' but the next sentence says \'do NOT auto-escalate — that crosses into replacing caller judgment\'"). This shape is fully valid for recommendation-coherence, internal-contradiction, argument-soundness, and completeness-against-constraints findings.',
|
|
10
|
+
'- A finding without one of these four forms is speculation; downgrade to low or drop.',
|
|
11
|
+
'- Reasoning-based findings (e.g. "this fix relies on persistence which the doc forbids in Principle #6") are VALID when they cite both the recommendation and the constraint. Do NOT downgrade these as speculation — they are the highest-value kind of audit finding.',
|
|
10
12
|
].join('\n'),
|
|
11
13
|
scopeRule: [
|
|
12
14
|
'- The document and what it directly references are in scope.',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"annotator-audit.js","sourceRoot":"","sources":["../../../src/review/templates/annotator-audit.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,sBAAsB,GAAsB;IACvD,IAAI,EAAE,OAAO;IACb,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"annotator-audit.js","sourceRoot":"","sources":["../../../src/review/templates/annotator-audit.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,sBAAsB,GAAsB;IACvD,IAAI,EAAE,OAAO;IACb,YAAY,EAAE,0lBAA0lB;IACxmB,YAAY,EAAE;QACZ,6CAA6C;QAC7C,yEAAyE;QACzE,8KAA8K;QAC9K,2FAA2F;QAC3F,kcAAkc;QAClc,uFAAuF;QACvF,yQAAyQ;KAC1Q,CAAC,IAAI,CAAC,IAAI,CAAC;IACZ,SAAS,EAAE;QACT,8DAA8D;QAC9D,kGAAkG;QAClG,sHAAsH;QACtH,kGAAkG;KACnG,CAAC,IAAI,CAAC,IAAI,CAAC;CACb,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"annotator-debug.d.ts","sourceRoot":"","sources":["../../../src/review/templates/annotator-debug.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,eAAO,MAAM,sBAAsB,EAAE,
|
|
1
|
+
{"version":3,"file":"annotator-debug.d.ts","sourceRoot":"","sources":["../../../src/review/templates/annotator-debug.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,eAAO,MAAM,sBAAsB,EAAE,iBAiBpC,CAAC"}
|
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
export const annotatorDebugTemplate = {
|
|
2
2
|
role: 'debugging hypothesis',
|
|
3
|
-
onBriefCheck: 'Each finding should be a hypothesis,
|
|
3
|
+
onBriefCheck: 'Each finding should be a hypothesis with a complete trace from symptom to cause, not a point observation at the symptom. AND: the cited cause must come UPSTREAM of the cited symptom in the call/data flow — a finding that names a symptom location as the cause is misdirection (SYMPTOM-NOT-CAUSE failure mode). Findings consistent with the debug failure-mode taxonomy (symptom-not-cause, scapegoat file, incomplete trace, untested hypothesis, parallel causes, pre-existing-vs-new entanglement, wrong fix scope, missing reproduction, confidence overstatement) and backed by file:line citations at each step are valid even when the chain has marked gaps — partial-evidence hypotheses with explicit "the gap is here, verify by X" notes are FULLY VALID, do NOT downgrade them as "speculation".',
|
|
4
4
|
evidenceRule: [
|
|
5
|
-
'- Debug findings are hypotheses with
|
|
6
|
-
'-
|
|
7
|
-
'-
|
|
8
|
-
'-
|
|
5
|
+
'- Debug findings are hypotheses with REASONING CHAINS, not point observations.',
|
|
6
|
+
'- Each finding must have at least three citations: SYMPTOM (where the failure surfaces) → INTERMEDIATE STATE (the wrong value, the unexpected branch) → CAUSE (the file:line that, if changed, would prevent the failure).',
|
|
7
|
+
'- Evidence forms accepted: reproducer commands, captured logs / stack traces, observed values, code-path traces with file:line per step.',
|
|
8
|
+
'- A finding with NO falsifier (no way to verify the proposed fix worked) is a guess, not a finding.',
|
|
9
|
+
'- Cross-file tracing (symptom in one file, cause in another reachable via call/data flow) is REQUIRED and FULLY VALID — not "speculation about untouched files".',
|
|
10
|
+
'- Severity reflects evidence strength AND impact: confirmed root cause that ships a wrong fix = critical; confirmed root cause with full chain = high; plausible candidate with most of the chain = medium; partial trace / multiple plausible explanations = low.',
|
|
9
11
|
].join('\n'),
|
|
10
12
|
scopeRule: [
|
|
11
|
-
'- Cross-file tracing is in scope and
|
|
12
|
-
'-
|
|
13
|
+
'- Cross-file tracing is in scope and REQUIRED to follow the failure path. Cross-file findings are not out-of-scope just because the named files do not include the cause file.',
|
|
14
|
+
'- Reproduction discovery is in scope: if no reproduction was provided, the worker should infer one and state it explicitly.',
|
|
15
|
+
'- Pre-existing-vs-new separation is in scope: multiple bugs in one failure should be separated, with the answered one as the primary finding and others noted separately.',
|
|
16
|
+
'- Out of scope: applied fixes (the worker should propose, not apply); unrelated code-review remarks; broadening into general code review of files not on the failure path.',
|
|
13
17
|
].join('\n'),
|
|
14
18
|
};
|
|
15
19
|
//# sourceMappingURL=annotator-debug.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"annotator-debug.js","sourceRoot":"","sources":["../../../src/review/templates/annotator-debug.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,sBAAsB,GAAsB;IACvD,IAAI,EAAE,sBAAsB;IAC5B,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"annotator-debug.js","sourceRoot":"","sources":["../../../src/review/templates/annotator-debug.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,sBAAsB,GAAsB;IACvD,IAAI,EAAE,sBAAsB;IAC5B,YAAY,EAAE,qxBAAqxB;IACnyB,YAAY,EAAE;QACZ,gFAAgF;QAChF,4NAA4N;QAC5N,0IAA0I;QAC1I,qGAAqG;QACrG,kKAAkK;QAClK,oQAAoQ;KACrQ,CAAC,IAAI,CAAC,IAAI,CAAC;IACZ,SAAS,EAAE;QACT,gLAAgL;QAChL,6HAA6H;QAC7H,2KAA2K;QAC3K,4KAA4K;KAC7K,CAAC,IAAI,CAAC,IAAI,CAAC;CACb,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"annotator-investigate.d.ts","sourceRoot":"","sources":["../../../src/review/templates/annotator-investigate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,eAAO,MAAM,4BAA4B,EAAE,
|
|
1
|
+
{"version":3,"file":"annotator-investigate.d.ts","sourceRoot":"","sources":["../../../src/review/templates/annotator-investigate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,eAAO,MAAM,4BAA4B,EAAE,iBAe1C,CAAC"}
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
export const annotatorInvestigateTemplate = {
|
|
2
2
|
role: 'codebase investigation',
|
|
3
|
-
onBriefCheck: 'Each finding should be relevant to the question.',
|
|
3
|
+
onBriefCheck: 'Each finding should be relevant to the question (not an adjacent question — QUESTION SHIFT failure mode). AND: each load-bearing claim must have a file:line citation OR an explicit "searched X in Y, not found" negative. Findings consistent with the investigate failure-mode taxonomy (wrong file, stale quote, hallucinated citation, confidence overstatement, citation gap, question shift, synthesis without grounding, assumed-current-state) should be filed as the appropriate verdict — do NOT downgrade negative findings for lacking a code quote, and do NOT downgrade inference-with-citations as "speculation" if the cited links are real.',
|
|
4
4
|
evidenceRule: [
|
|
5
|
-
'- Present-thing citations: real `file:line` from files actually read, with a quote or summary.',
|
|
5
|
+
'- Present-thing citations: real `file:line` from files actually read THIS SESSION, with a quote or summary. Citations from training-data memory are hallucinations — flag any cited line that does not currently contain the cited content.',
|
|
6
6
|
'- Absent-thing citations: explicit "searched <pattern> in <path>, no matches" — negative findings are legitimate answers and must NOT be downgraded for lacking a code quote.',
|
|
7
|
-
'- Synthesis findings: cite each link in the reasoning chain by file:line.',
|
|
7
|
+
'- Synthesis findings: cite each link in the reasoning chain by file:line. A synthesis with even one un-cited link is a hand-wave; downgrade confidence or drop the un-cited link.',
|
|
8
|
+
'- Inference-with-citations ("I infer X from Y:42, Z:18") is FULLY VALID and should not be downgraded as "speculation" when the cited links are real. The distinction: inference-with-citations names what is inferred and what is cited; speculation makes a claim without naming the gap.',
|
|
8
9
|
].join('\n'),
|
|
9
10
|
scopeRule: [
|
|
10
11
|
'- Wherever the question leads is in scope; the question may not name files.',
|
|
12
|
+
'- Negative answers ("X is not used", "Y does not exist") ARE in scope when backed by an explicit search; they are not "unable to find" excuses.',
|
|
11
13
|
'- Drift into unrelated code-review remarks is out of scope.',
|
|
14
|
+
'- Fix proposals / suggestions / improvements are out of scope (this is a read-only Q&A).',
|
|
12
15
|
].join('\n'),
|
|
13
16
|
};
|
|
14
17
|
//# sourceMappingURL=annotator-investigate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"annotator-investigate.js","sourceRoot":"","sources":["../../../src/review/templates/annotator-investigate.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,4BAA4B,GAAsB;IAC7D,IAAI,EAAE,wBAAwB;IAC9B,YAAY,EAAE
|
|
1
|
+
{"version":3,"file":"annotator-investigate.js","sourceRoot":"","sources":["../../../src/review/templates/annotator-investigate.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,4BAA4B,GAAsB;IAC7D,IAAI,EAAE,wBAAwB;IAC9B,YAAY,EAAE,+nBAA+nB;IAC7oB,YAAY,EAAE;QACZ,6OAA6O;QAC7O,+KAA+K;QAC/K,mLAAmL;QACnL,4RAA4R;KAC7R,CAAC,IAAI,CAAC,IAAI,CAAC;IACZ,SAAS,EAAE;QACT,6EAA6E;QAC7E,iJAAiJ;QACjJ,6DAA6D;QAC7D,0FAA0F;KAC3F,CAAC,IAAI,CAAC,IAAI,CAAC;CACb,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"annotator-review.d.ts","sourceRoot":"","sources":["../../../src/review/templates/annotator-review.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,eAAO,MAAM,uBAAuB,EAAE,
|
|
1
|
+
{"version":3,"file":"annotator-review.d.ts","sourceRoot":"","sources":["../../../src/review/templates/annotator-review.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,eAAO,MAAM,uBAAuB,EAAE,iBAoBrC,CAAC"}
|
|
@@ -1,15 +1,22 @@
|
|
|
1
1
|
export const annotatorReviewTemplate = {
|
|
2
2
|
role: 'code review',
|
|
3
|
-
onBriefCheck: 'For each finding, ask: is this within the requested focus area
|
|
3
|
+
onBriefCheck: 'For each finding, ask: is this within the requested focus area (or universally applicable: security, correctness, performance apply to every code change)? AND: is this finding consistent with the code-review failure-mode taxonomy (test gap, cross-file ripple, pre-existing-bug-vs-new-regression, missing edge case, race, resource leak, backward-compat break, security regression, performance regression, implicit-contract assumption)? Findings that match the taxonomy and are backed by call-site references or sibling-test-file references are valid even when the cited code is not in the named files — do NOT downgrade them as "speculation about untouched files".',
|
|
4
4
|
evidenceRule: [
|
|
5
|
-
'- Code-review findings
|
|
6
|
-
'-
|
|
7
|
-
'-
|
|
5
|
+
'- Code-review findings come in three valid shapes:',
|
|
6
|
+
' 1. In-file quote: a verbatim code excerpt from the named files at `file:line`.',
|
|
7
|
+
' 2. Cross-file ripple: a quote in the named file at `fileA:lineA` PLUS a call-site reference at `fileB:lineB` reachable via grep on the changed symbol. Both lines must be cited.',
|
|
8
|
+
' 3. Test-gap reference: a quote of the changed line in the named file PLUS the natural-sibling test file path (e.g. `tests/foo.test.ts` for `src/foo.ts`). If no test file exists, that itself is the finding.',
|
|
9
|
+
'- Implicit-contract findings are valid when they cite the changed line AND name the contract source (docstring, type, README) that does not state the assumption.',
|
|
10
|
+
'- Findings without one of these forms are speculation; downgrade or drop.',
|
|
11
|
+
'- Reasoning-based findings backed by call-site references (e.g. "this signature change breaks src/handlers/auth.ts:42") are FULLY VALID and the highest-value kind of code-review finding. Do NOT downgrade them as "speculation about untouched files."',
|
|
8
12
|
].join('\n'),
|
|
9
13
|
scopeRule: [
|
|
10
|
-
'-
|
|
11
|
-
'-
|
|
14
|
+
'- Named files are in scope. Behavior of direct callers/callees may be referenced when visible in the named files.',
|
|
15
|
+
'- Cross-file ripples on changed public symbols ARE in scope when backed by a grep-able symbol reference. Do not penalize as out-of-scope.',
|
|
16
|
+
'- Test-gap findings citing a sibling test file ARE in scope. Do not penalize as out-of-scope.',
|
|
17
|
+
'- Speculation about unrelated untouched files is out of scope.',
|
|
12
18
|
'- Doc/spec issues belong in an audit, not a review — flag as off-brief.',
|
|
19
|
+
'- Pre-existing bugs (the diff did not introduce them) belong in a separate "Pre-existing — out of scope" section, not in the merge-blocking findings.',
|
|
13
20
|
].join('\n'),
|
|
14
21
|
};
|
|
15
22
|
//# sourceMappingURL=annotator-review.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"annotator-review.js","sourceRoot":"","sources":["../../../src/review/templates/annotator-review.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,uBAAuB,GAAsB;IACxD,IAAI,EAAE,aAAa;IACnB,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"annotator-review.js","sourceRoot":"","sources":["../../../src/review/templates/annotator-review.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,uBAAuB,GAAsB;IACxD,IAAI,EAAE,aAAa;IACnB,YAAY,EAAE,ypBAAypB;IACvqB,YAAY,EAAE;QACZ,oDAAoD;QACpD,kFAAkF;QAClF,oLAAoL;QACpL,iNAAiN;QACjN,mKAAmK;QACnK,2EAA2E;QAC3E,0PAA0P;KAC3P,CAAC,IAAI,CAAC,IAAI,CAAC;IACZ,SAAS,EAAE;QACT,mHAAmH;QACnH,2IAA2I;QAC3I,+FAA+F;QAC/F,gEAAgE;QAChE,yEAAyE;QACzE,uJAAuJ;KACxJ,CAAC,IAAI,CAAC,IAAI,CAAC;CACb,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"annotator-verify.d.ts","sourceRoot":"","sources":["../../../src/review/templates/annotator-verify.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,eAAO,MAAM,uBAAuB,EAAE,
|
|
1
|
+
{"version":3,"file":"annotator-verify.d.ts","sourceRoot":"","sources":["../../../src/review/templates/annotator-verify.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,eAAO,MAAM,uBAAuB,EAAE,iBAmBrC,CAAC"}
|
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
export const annotatorVerifyTemplate = {
|
|
2
2
|
role: 'verification report',
|
|
3
|
-
onBriefCheck: 'Each finding should map to
|
|
3
|
+
onBriefCheck: 'Each finding should map 1:1 to a checklist item with evidence in one of three valid shapes (EXECUTION command+output, FILE-LEVEL file:line+quote, or NEGATIVE "cannot verify"). AND: a PASS that rests on a prose claim from the work product alone — without execution output or file:line citation — is a rubber stamp; downgrade to FAIL with NEGATIVE evidence. Findings consistent with the verify failure-mode taxonomy (claim-without-evidence, stale evidence, implicit-criterion gap, partial coverage, conflated criteria, wrong-artifact evidence, assumed-PASS-on-untested) should be filed as the appropriate verdict — do NOT silently exclude implicit sub-criteria from PASS verdicts.',
|
|
4
4
|
evidenceRule: [
|
|
5
5
|
'- Each Finding must map 1:1 to a checklist item.',
|
|
6
|
-
'- Evidence is
|
|
7
|
-
'
|
|
8
|
-
'-
|
|
6
|
+
'- Evidence is one of three valid shapes:',
|
|
7
|
+
' 1. EXECUTION: a command + its observed output (test name + pass/fail line, build output, lint result), with the relevant output line quoted.',
|
|
8
|
+
' 2. FILE-LEVEL: `file:line` citation showing the implementation that satisfies (or fails) the criterion, with the relevant code excerpt quoted.',
|
|
9
|
+
' 3. NEGATIVE: an explicit "cannot verify from this artifact" plus what would be needed to verify (a test run, a different file, a runtime check).',
|
|
10
|
+
'- A claimed PASS without one of the three shapes is a rubber stamp; downgrade to FAIL with NEGATIVE evidence.',
|
|
11
|
+
'- A "the work product says it is done" claim is NOT valid evidence — only execution output or file:line citations count for PASS.',
|
|
12
|
+
'- Severity binding: PASS = low; FAIL = medium or high based on impact; FAIL on a release-blocking criterion = critical.',
|
|
13
|
+
'- FAIL with NEGATIVE evidence ("cannot verify") is FULLY VALID and the correct verdict when the artifact is insufficient. Do NOT downgrade NEGATIVE-evidence FAILs to "cannot determine" or assumed-PASS.',
|
|
9
14
|
].join('\n'),
|
|
10
15
|
scopeRule: [
|
|
11
16
|
'- Only checklist items are in scope. Findings not tied to a checklist item are off-brief.',
|
|
12
|
-
'- All checklist items should be covered (one Finding per item, in order).',
|
|
17
|
+
'- All checklist items should be covered (one Finding per item, in order, no skips).',
|
|
18
|
+
'- IMPLICIT criteria embedded in a checklist item (e.g. "fix the bug" implies "regression test added") ARE in scope. A PASS verdict that silently excludes an implicit sub-criterion is a partial-coverage failure.',
|
|
13
19
|
].join('\n'),
|
|
14
20
|
};
|
|
15
21
|
//# sourceMappingURL=annotator-verify.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"annotator-verify.js","sourceRoot":"","sources":["../../../src/review/templates/annotator-verify.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,uBAAuB,GAAsB;IACxD,IAAI,EAAE,qBAAqB;IAC3B,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"annotator-verify.js","sourceRoot":"","sources":["../../../src/review/templates/annotator-verify.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,uBAAuB,GAAsB;IACxD,IAAI,EAAE,qBAAqB;IAC3B,YAAY,EAAE,wqBAAwqB;IACtrB,YAAY,EAAE;QACZ,kDAAkD;QAClD,0CAA0C;QAC1C,gJAAgJ;QAChJ,kJAAkJ;QAClJ,oJAAoJ;QACpJ,+GAA+G;QAC/G,mIAAmI;QACnI,yHAAyH;QACzH,2MAA2M;KAC5M,CAAC,IAAI,CAAC,IAAI,CAAC;IACZ,SAAS,EAAE;QACT,2FAA2F;QAC3F,qFAAqF;QACrF,oNAAoN;KACrN,CAAC,IAAI,CAAC,IAAI,CAAC;CACb,CAAC"}
|
|
@@ -1,17 +1,68 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Audit-specific implementer criteria.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* AUDIT'S PURPOSE — read this before adding categories.
|
|
5
|
+
* Most audit targets are spec / plan / design / recommendation files that
|
|
6
|
+
* will subsequently be EXECUTED BY A LOW-JUDGMENT WORKER (a sub-agent that
|
|
7
|
+
* follows the spec literally, with little ability to disambiguate or
|
|
8
|
+
* choose between alternatives). The audit's success criterion is:
|
|
9
|
+
*
|
|
10
|
+
* "After audit + fixes, can a literal-following worker execute this
|
|
11
|
+
* artifact without failing, picking wrong, or getting stuck?"
|
|
12
|
+
*
|
|
13
|
+
* That criterion is what makes a finding load-bearing. Stylistic nits
|
|
14
|
+
* don't block execution; ambiguity, contradictions, missing verification,
|
|
15
|
+
* unspecified branches, out-of-order steps, and overloaded terms do.
|
|
16
|
+
*
|
|
17
|
+
* EVIDENCE & SCOPE for prose artifacts.
|
|
18
|
+
* Audit examines a prose artifact (spec, design doc, plan, recommendation
|
|
19
|
+
* doc, API contract, config, brief). The "thing being examined" is text —
|
|
20
|
+
* not source code — so evidence and scope rules differ from review/debug:
|
|
7
21
|
*
|
|
8
22
|
* - Evidence is a doc quote, OR a precise reference to a section/item
|
|
9
23
|
* that *should* address the issue but doesn't (absence-finding), OR
|
|
10
|
-
* a doc-claim + contradicting source (wrong-claim finding)
|
|
24
|
+
* a doc-claim + contradicting source (wrong-claim finding), OR
|
|
25
|
+
* two sections of the doc that contradict each other (internal-
|
|
26
|
+
* coherence finding).
|
|
11
27
|
* - Scope is the document and what it directly references; cross-section
|
|
12
28
|
* reasoning IS the value of an audit.
|
|
29
|
+
*
|
|
30
|
+
* The failure-mode rubric below tells the worker WHAT KINDS of issues to
|
|
31
|
+
* look for in a prose artifact. Without it, workers calibrated on code
|
|
32
|
+
* audits collapse to surface-level proofreading on documents.
|
|
33
|
+
*/
|
|
34
|
+
/**
|
|
35
|
+
* The orientation block. Goes at the TOP of every audit prompt.
|
|
36
|
+
*
|
|
37
|
+
* This is the load-bearing addition. Without an explicit purpose statement,
|
|
38
|
+
* workers default to "find issues in this doc" — which produces stylistic
|
|
39
|
+
* proofreading. With this orientation, they look for issues that would
|
|
40
|
+
* BLOCK EXECUTION by a literal-following worker, which is what the caller
|
|
41
|
+
* actually needs.
|
|
13
42
|
*/
|
|
43
|
+
export declare const AUDIT_PURPOSE_ORIENTATION: string;
|
|
14
44
|
export declare const EVIDENCE_RULE_AUDIT: string;
|
|
15
45
|
export declare const SCOPE_RULE_AUDIT: string;
|
|
46
|
+
/**
|
|
47
|
+
* The failure-mode rubric for prose-document audits.
|
|
48
|
+
*
|
|
49
|
+
* This is the load-bearing addition. Without an explicit taxonomy, workers
|
|
50
|
+
* calibrated on source-code rubrics (off-by-one, type mismatches, dead code)
|
|
51
|
+
* have nothing to look for in a spec/plan/recommendation doc and emit only
|
|
52
|
+
* surface nits. The 11 categories below cover what actually goes wrong in
|
|
53
|
+
* non-trivial prose artifacts and are independent of the audit-type label.
|
|
54
|
+
*/
|
|
55
|
+
export declare const DOC_AUDIT_FAILURE_MODES: string;
|
|
56
|
+
/**
|
|
57
|
+
* Counter-balance to the SEVERITY_LADDER's anti-inflation hint.
|
|
58
|
+
*
|
|
59
|
+
* The shared severity ladder ends with "Workers commonly inflate — resist
|
|
60
|
+
* the urge." That bias is correct for code reviews, where over-flagging
|
|
61
|
+
* stylistic preferences is the common failure. For prose-document audits
|
|
62
|
+
* the opposite is true: workers UNDER-find because they have nothing to
|
|
63
|
+
* pattern-match against in their training. This block tells the worker
|
|
64
|
+
* the doc-audit failure mode is silence, not noise.
|
|
65
|
+
*/
|
|
66
|
+
export declare const THOROUGHNESS_REMINDER_AUDIT: string;
|
|
16
67
|
export declare const ANNOTATOR_AWARENESS_AUDIT: string;
|
|
17
68
|
//# sourceMappingURL=implementer-criteria.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"implementer-criteria.d.ts","sourceRoot":"","sources":["../../../src/tools/audit/implementer-criteria.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"implementer-criteria.d.ts","sourceRoot":"","sources":["../../../src/tools/audit/implementer-criteria.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,yBAAyB,QAmB1B,CAAC;AAEb,eAAO,MAAM,mBAAmB,QAOpB,CAAC;AAEb,eAAO,MAAM,gBAAgB,QAMjB,CAAC;AAEb;;;;;;;;GAQG;AACH,eAAO,MAAM,uBAAuB,QAoBxB,CAAC;AAEb;;;;;;;;;GASG;AACH,eAAO,MAAM,2BAA2B,QAW5B,CAAC;AAEb,eAAO,MAAM,yBAAyB,QAO1B,CAAC"}
|