@zhixuan92/multi-model-agent-core 4.0.4 → 4.0.5
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/README.md +11 -15
- package/dist/events/cloud-events.d.ts +1 -3
- package/dist/events/cloud-events.d.ts.map +1 -1
- package/dist/events/event-builder.d.ts +1 -1
- package/dist/events/event-builder.d.ts.map +1 -1
- package/dist/events/observability-events.d.ts +3 -111
- package/dist/events/observability-events.d.ts.map +1 -1
- package/dist/events/observability-events.js +0 -58
- package/dist/events/observability-events.js.map +1 -1
- package/dist/events/telemetry-types.d.ts +3 -3
- package/dist/events/telemetry-types.js +1 -1
- package/dist/events/telemetry-types.js.map +1 -1
- package/dist/index.d.ts +2 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -7
- package/dist/index.js.map +1 -1
- package/dist/intake/brief-compiler-slots/debug.d.ts +0 -26
- package/dist/intake/brief-compiler-slots/debug.d.ts.map +1 -1
- package/dist/intake/brief-compiler-slots/debug.js +5 -44
- package/dist/intake/brief-compiler-slots/debug.js.map +1 -1
- package/dist/intake/brief-compiler-slots/delegate.d.ts +0 -24
- package/dist/intake/brief-compiler-slots/delegate.d.ts.map +1 -1
- package/dist/intake/brief-compiler-slots/delegate.js +0 -50
- package/dist/intake/brief-compiler-slots/delegate.js.map +1 -1
- package/dist/intake/brief-compiler-slots/research.d.ts +18 -0
- package/dist/intake/brief-compiler-slots/research.d.ts.map +1 -0
- package/dist/intake/brief-compiler-slots/research.js +43 -0
- package/dist/intake/brief-compiler-slots/research.js.map +1 -0
- package/dist/intake/brief-compiler-slots/review.d.ts +0 -23
- package/dist/intake/brief-compiler-slots/review.d.ts.map +1 -1
- package/dist/intake/brief-compiler-slots/review.js +0 -62
- package/dist/intake/brief-compiler-slots/review.js.map +1 -1
- package/dist/lifecycle/handlers/terminal-handlers.d.ts.map +1 -1
- package/dist/lifecycle/handlers/terminal-handlers.js +17 -2
- package/dist/lifecycle/handlers/terminal-handlers.js.map +1 -1
- package/dist/lifecycle/stage-progression.d.ts.map +1 -1
- package/dist/lifecycle/stage-progression.js +1 -0
- package/dist/lifecycle/stage-progression.js.map +1 -1
- package/dist/lifecycle/task-runner.js +1 -1
- package/dist/lifecycle/task-runner.js.map +1 -1
- package/dist/reporting/headline-templates/research.d.ts +3 -0
- package/dist/reporting/headline-templates/research.d.ts.map +1 -0
- package/dist/reporting/headline-templates/research.js +23 -0
- package/dist/reporting/headline-templates/research.js.map +1 -0
- package/dist/reporting/report-parser-slots/research-report.d.ts +30 -0
- package/dist/reporting/report-parser-slots/research-report.d.ts.map +1 -0
- package/dist/reporting/report-parser-slots/research-report.js +94 -0
- package/dist/reporting/report-parser-slots/research-report.js.map +1 -0
- package/dist/review/annotator-prompt-builder.d.ts +1 -1
- package/dist/review/annotator-prompt-builder.d.ts.map +1 -1
- package/dist/review/annotator-prompt-builder.js +4 -4
- package/dist/review/annotator-prompt-builder.js.map +1 -1
- package/dist/review/reviewer-engine.d.ts +1 -1
- package/dist/review/reviewer-engine.d.ts.map +1 -1
- package/dist/review/reviewer-prompt-builder.d.ts +1 -1
- package/dist/review/reviewer-prompt-builder.d.ts.map +1 -1
- package/dist/review/templates/annotator-audit.d.ts.map +1 -1
- package/dist/review/templates/annotator-audit.js +13 -0
- 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 -1
- 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 +10 -1
- 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 +10 -0
- package/dist/review/templates/annotator-review.js.map +1 -1
- package/dist/review/templates/annotator-shared.d.ts +7 -1
- package/dist/review/templates/annotator-shared.d.ts.map +1 -1
- package/dist/review/templates/annotator-shared.js +18 -29
- package/dist/review/templates/annotator-shared.js.map +1 -1
- package/dist/review/templates/annotator-verify.d.ts.map +1 -1
- package/dist/review/templates/annotator-verify.js +11 -1
- package/dist/review/templates/annotator-verify.js.map +1 -1
- package/dist/review/templates/finding-criteria.d.ts +8 -32
- package/dist/review/templates/finding-criteria.d.ts.map +1 -1
- package/dist/review/templates/finding-criteria.js +10 -51
- package/dist/review/templates/finding-criteria.js.map +1 -1
- package/dist/review/templates/quality-review-audit.d.ts.map +1 -1
- package/dist/review/templates/quality-review-audit.js +3 -2
- package/dist/review/templates/quality-review-audit.js.map +1 -1
- package/dist/review/templates/quality-review-debug.d.ts.map +1 -1
- package/dist/review/templates/quality-review-debug.js +3 -2
- package/dist/review/templates/quality-review-debug.js.map +1 -1
- package/dist/review/templates/quality-review-investigate.d.ts.map +1 -1
- package/dist/review/templates/quality-review-investigate.js +3 -2
- package/dist/review/templates/quality-review-investigate.js.map +1 -1
- package/dist/review/templates/quality-review-review.d.ts.map +1 -1
- package/dist/review/templates/quality-review-review.js +3 -2
- package/dist/review/templates/quality-review-review.js.map +1 -1
- package/dist/review/templates/quality-review-verify.d.ts.map +1 -1
- package/dist/review/templates/quality-review-verify.js +3 -2
- package/dist/review/templates/quality-review-verify.js.map +1 -1
- package/dist/stores/file-backed-context-block-store.d.ts +5 -1
- package/dist/stores/file-backed-context-block-store.d.ts.map +1 -1
- package/dist/stores/file-backed-context-block-store.js +16 -19
- package/dist/stores/file-backed-context-block-store.js.map +1 -1
- package/dist/stores/project-context-registry.d.ts +5 -3
- package/dist/stores/project-context-registry.d.ts.map +1 -1
- package/dist/stores/project-context-registry.js.map +1 -1
- package/dist/tool-surface/openapi-generator.d.ts.map +1 -1
- package/dist/tool-surface/openapi-generator.js +4 -4
- package/dist/tool-surface/openapi-generator.js.map +1 -1
- package/dist/tool-surface/register-all-tools.js +3 -3
- package/dist/tool-surface/register-all-tools.js.map +1 -1
- package/dist/tools/audit/implementer-criteria.d.ts +17 -0
- package/dist/tools/audit/implementer-criteria.d.ts.map +1 -0
- package/dist/tools/audit/implementer-criteria.js +36 -0
- package/dist/tools/audit/implementer-criteria.js.map +1 -0
- package/dist/tools/audit/tool-config.js +5 -4
- package/dist/tools/audit/tool-config.js.map +1 -1
- package/dist/tools/debug/implementer-criteria.d.ts +12 -0
- package/dist/tools/debug/implementer-criteria.d.ts.map +1 -0
- package/dist/tools/debug/implementer-criteria.js +29 -0
- package/dist/tools/debug/implementer-criteria.js.map +1 -0
- package/dist/tools/debug/tool-config.js +5 -4
- package/dist/tools/debug/tool-config.js.map +1 -1
- package/dist/tools/index.d.ts +0 -1
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +0 -1
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/investigate/implementer-criteria.d.ts +17 -0
- package/dist/tools/investigate/implementer-criteria.d.ts.map +1 -0
- package/dist/tools/investigate/implementer-criteria.js +33 -0
- package/dist/tools/investigate/implementer-criteria.js.map +1 -0
- package/dist/tools/investigate/tool-config.js +2 -2
- package/dist/tools/investigate/tool-config.js.map +1 -1
- package/dist/tools/research/implementer-criteria.d.ts +15 -0
- package/dist/tools/research/implementer-criteria.d.ts.map +1 -0
- package/dist/tools/research/implementer-criteria.js +37 -0
- package/dist/tools/research/implementer-criteria.js.map +1 -0
- package/dist/tools/{explore → research}/schema.d.ts +2 -3
- package/dist/tools/research/schema.d.ts.map +1 -0
- package/dist/tools/{explore → research}/schema.js +10 -16
- package/dist/tools/research/schema.js.map +1 -0
- package/dist/tools/research/tool-config.d.ts +20 -0
- package/dist/tools/research/tool-config.d.ts.map +1 -0
- package/dist/tools/research/tool-config.js +51 -0
- package/dist/tools/research/tool-config.js.map +1 -0
- package/dist/tools/review/implementer-criteria.d.ts +11 -0
- package/dist/tools/review/implementer-criteria.d.ts.map +1 -0
- package/dist/tools/review/implementer-criteria.js +27 -0
- package/dist/tools/review/implementer-criteria.js.map +1 -0
- package/dist/tools/review/tool-config.d.ts.map +1 -1
- package/dist/tools/review/tool-config.js +29 -5
- package/dist/tools/review/tool-config.js.map +1 -1
- package/dist/tools/verify/implementer-criteria.d.ts +12 -0
- package/dist/tools/verify/implementer-criteria.d.ts.map +1 -0
- package/dist/tools/verify/implementer-criteria.js +29 -0
- package/dist/tools/verify/implementer-criteria.js.map +1 -0
- package/dist/tools/verify/tool-config.js +5 -4
- package/dist/tools/verify/tool-config.js.map +1 -1
- package/dist/types/enums.d.ts +1 -11
- package/dist/types/enums.d.ts.map +1 -1
- package/dist/types/enums.js +2 -4
- package/dist/types/enums.js.map +1 -1
- package/package.json +12 -40
- package/dist/intake/brief-compiler-slots/audit.d.ts +0 -23
- package/dist/intake/brief-compiler-slots/audit.d.ts.map +0 -1
- package/dist/intake/brief-compiler-slots/audit.js +0 -61
- package/dist/intake/brief-compiler-slots/audit.js.map +0 -1
- package/dist/intake/brief-compiler-slots/explore.d.ts +0 -43
- package/dist/intake/brief-compiler-slots/explore.d.ts.map +0 -1
- package/dist/intake/brief-compiler-slots/explore.js +0 -116
- package/dist/intake/brief-compiler-slots/explore.js.map +0 -1
- package/dist/intake/brief-compiler-slots/verify.d.ts +0 -21
- package/dist/intake/brief-compiler-slots/verify.d.ts.map +0 -1
- package/dist/intake/brief-compiler-slots/verify.js +0 -62
- package/dist/intake/brief-compiler-slots/verify.js.map +0 -1
- package/dist/reporting/compose-explore-headline.d.ts +0 -14
- package/dist/reporting/compose-explore-headline.d.ts.map +0 -1
- package/dist/reporting/compose-explore-headline.js +0 -14
- package/dist/reporting/compose-explore-headline.js.map +0 -1
- package/dist/reporting/derive-explore-status.d.ts +0 -18
- package/dist/reporting/derive-explore-status.d.ts.map +0 -1
- package/dist/reporting/derive-explore-status.js +0 -15
- package/dist/reporting/derive-explore-status.js.map +0 -1
- package/dist/reporting/headline-templates/explore.d.ts +0 -3
- package/dist/reporting/headline-templates/explore.d.ts.map +0 -1
- package/dist/reporting/headline-templates/explore.js +0 -13
- package/dist/reporting/headline-templates/explore.js.map +0 -1
- package/dist/reporting/parse-explore-report.d.ts +0 -38
- package/dist/reporting/parse-explore-report.d.ts.map +0 -1
- package/dist/reporting/parse-explore-report.js +0 -185
- package/dist/reporting/parse-explore-report.js.map +0 -1
- package/dist/reporting/report-parser-slots/explore-report.d.ts +0 -17
- package/dist/reporting/report-parser-slots/explore-report.d.ts.map +0 -1
- package/dist/reporting/report-parser-slots/explore-report.js +0 -9
- package/dist/reporting/report-parser-slots/explore-report.js.map +0 -1
- package/dist/research/explore-orchestrator.d.ts +0 -14
- package/dist/research/explore-orchestrator.d.ts.map +0 -1
- package/dist/research/explore-orchestrator.js +0 -362
- package/dist/research/explore-orchestrator.js.map +0 -1
- package/dist/tools/explore/schema.d.ts.map +0 -1
- package/dist/tools/explore/schema.js.map +0 -1
- package/dist/tools/explore/tool-config.d.ts +0 -7
- package/dist/tools/explore/tool-config.d.ts.map +0 -1
- package/dist/tools/explore/tool-config.js +0 -36
- package/dist/tools/explore/tool-config.js.map +0 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const REASON_TEXT = {
|
|
2
|
+
cost_cap: 'cost cap reached',
|
|
3
|
+
timeout: 'timed out',
|
|
4
|
+
turn_cap: 'turn cap reached',
|
|
5
|
+
};
|
|
6
|
+
export const researchHeadlineTemplate = {
|
|
7
|
+
compose({ report, status, runResult }) {
|
|
8
|
+
const r = report;
|
|
9
|
+
const findings = Array.isArray(r?.findings) ? r.findings : [];
|
|
10
|
+
const sources = Array.isArray(r?.sourcesUsed) ? r.sourcesUsed : [];
|
|
11
|
+
if (status === 'incomplete') {
|
|
12
|
+
const reasonKey = runResult?.incompleteReason ?? '';
|
|
13
|
+
const reason = REASON_TEXT[reasonKey] ?? reasonKey ?? 'incomplete';
|
|
14
|
+
return `[incomplete] research: ${reason}`;
|
|
15
|
+
}
|
|
16
|
+
if (status === 'error') {
|
|
17
|
+
const msg = runResult?.error ?? 'runner crash';
|
|
18
|
+
return `[error] research: ${msg}`;
|
|
19
|
+
}
|
|
20
|
+
return `[ok] research: ${sources.length} sources, ${findings.length} findings`;
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=research.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"research.js","sourceRoot":"","sources":["../../../src/reporting/headline-templates/research.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,GAA2B;IAC1C,QAAQ,EAAE,kBAAkB;IAC5B,OAAO,EAAE,WAAW;IACpB,QAAQ,EAAE,kBAAkB;CAC7B,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAqB;IACxD,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE;QACnC,MAAM,CAAC,GAAG,MAAoD,CAAC;QAC/D,MAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;QAC/D,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,CAAE,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC;QAEpE,IAAI,MAAM,KAAK,YAAY,EAAE,CAAC;YAC5B,MAAM,SAAS,GAAI,SAAuD,EAAE,gBAAgB,IAAI,EAAE,CAAC;YACnG,MAAM,MAAM,GAAG,WAAW,CAAC,SAAS,CAAC,IAAI,SAAS,IAAI,YAAY,CAAC;YACnE,OAAO,0BAA0B,MAAM,EAAE,CAAC;QAC5C,CAAC;QACD,IAAI,MAAM,KAAK,OAAO,EAAE,CAAC;YACvB,MAAM,GAAG,GAAI,SAA4C,EAAE,KAAK,IAAI,cAAc,CAAC;YACnF,OAAO,qBAAqB,GAAG,EAAE,CAAC;QACpC,CAAC;QACD,OAAO,kBAAkB,OAAO,CAAC,MAAM,aAAa,QAAQ,CAAC,MAAM,WAAW,CAAC;IACjF,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { ReportSchema } from '../structured-report-parser.js';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
declare const researchReportZod: z.ZodObject<{
|
|
4
|
+
findings: z.ZodArray<z.ZodObject<{
|
|
5
|
+
index: z.ZodNumber;
|
|
6
|
+
body: z.ZodString;
|
|
7
|
+
citations: z.ZodArray<z.ZodObject<{
|
|
8
|
+
kind: z.ZodEnum<{
|
|
9
|
+
url: "url";
|
|
10
|
+
file_line: "file_line";
|
|
11
|
+
source: "source";
|
|
12
|
+
}>;
|
|
13
|
+
label: z.ZodOptional<z.ZodString>;
|
|
14
|
+
target: z.ZodOptional<z.ZodString>;
|
|
15
|
+
}, z.core.$strip>>;
|
|
16
|
+
}, z.core.$strip>>;
|
|
17
|
+
sourcesUsed: z.ZodArray<z.ZodObject<{
|
|
18
|
+
source: z.ZodString;
|
|
19
|
+
attempted: z.ZodBoolean;
|
|
20
|
+
used: z.ZodBoolean;
|
|
21
|
+
note: z.ZodOptional<z.ZodString>;
|
|
22
|
+
}, z.core.$strip>>;
|
|
23
|
+
}, z.core.$strip>;
|
|
24
|
+
export type ResearchReport = z.infer<typeof researchReportZod>;
|
|
25
|
+
/** ReportSchema that parses worker narrative text (numbered findings +
|
|
26
|
+
* `## Sources used` table) into a structured ResearchReport. */
|
|
27
|
+
export declare const researchReportSchema: ReportSchema<ResearchReport>;
|
|
28
|
+
export declare function parseResearchReport(output: string): ResearchReport;
|
|
29
|
+
export {};
|
|
30
|
+
//# sourceMappingURL=research-report.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"research-report.d.ts","sourceRoot":"","sources":["../../../src/reporting/report-parser-slots/research-report.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,QAAA,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;iBAgBrB,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE/D;iEACiE;AACjE,eAAO,MAAM,oBAAoB,EAAE,YAAY,CAAC,cAAc,CAI7D,CAAC;AAuDF,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,cAAc,CAclE"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
const researchReportZod = z.object({
|
|
3
|
+
findings: z.array(z.object({
|
|
4
|
+
index: z.number().int().nonnegative(),
|
|
5
|
+
body: z.string(),
|
|
6
|
+
citations: z.array(z.object({
|
|
7
|
+
kind: z.enum(['url', 'file_line', 'source']),
|
|
8
|
+
label: z.string().optional(),
|
|
9
|
+
target: z.string().optional(),
|
|
10
|
+
})),
|
|
11
|
+
})),
|
|
12
|
+
sourcesUsed: z.array(z.object({
|
|
13
|
+
source: z.string(),
|
|
14
|
+
attempted: z.boolean(),
|
|
15
|
+
used: z.boolean(),
|
|
16
|
+
note: z.string().optional(),
|
|
17
|
+
})),
|
|
18
|
+
});
|
|
19
|
+
/** ReportSchema that parses worker narrative text (numbered findings +
|
|
20
|
+
* `## Sources used` table) into a structured ResearchReport. */
|
|
21
|
+
export const researchReportSchema = {
|
|
22
|
+
parse(text) {
|
|
23
|
+
return parseResearchReport(text);
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
const NUMBERED_FINDING_RE = /^\s*(\d+)\.\s+([\s\S]*?)(?=^\s*\d+\.\s+|\n##\s|\n#\s|$)/gmu;
|
|
27
|
+
const URL_RE = /https?:\/\/[^\s)]+/g;
|
|
28
|
+
const FILE_LINE_RE = /([A-Za-z0-9_./-]+):(\d+(?:-\d+)?)/g;
|
|
29
|
+
function parseSourcesUsed(text) {
|
|
30
|
+
const m = text.match(/##\s+Sources used\s*([\s\S]*?)(?:\n##\s|$)/i);
|
|
31
|
+
if (!m)
|
|
32
|
+
return [];
|
|
33
|
+
const lines = m[1].split('\n').map(l => l.trim()).filter(Boolean);
|
|
34
|
+
const rows = [];
|
|
35
|
+
for (const line of lines) {
|
|
36
|
+
if (!line.startsWith('|') || /^\|\s*-/.test(line) || /^\|\s*source\s*\|/i.test(line))
|
|
37
|
+
continue;
|
|
38
|
+
const cells = line.split('|').slice(1, -1).map(c => c.trim());
|
|
39
|
+
if (cells.length < 3)
|
|
40
|
+
continue;
|
|
41
|
+
const [source, attemptedRaw, usedRaw, note] = cells;
|
|
42
|
+
rows.push({
|
|
43
|
+
source,
|
|
44
|
+
attempted: /^yes$/i.test(attemptedRaw),
|
|
45
|
+
used: /^yes$/i.test(usedRaw),
|
|
46
|
+
...(note ? { note } : {}),
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
return rows;
|
|
50
|
+
}
|
|
51
|
+
function extractCitations(body, sources) {
|
|
52
|
+
const citations = [];
|
|
53
|
+
for (const m of body.matchAll(URL_RE)) {
|
|
54
|
+
citations.push({ kind: 'url', label: extractDomain(m[0]), target: m[0] });
|
|
55
|
+
}
|
|
56
|
+
for (const m of body.matchAll(FILE_LINE_RE)) {
|
|
57
|
+
if (URL_RE.test(m[0]))
|
|
58
|
+
continue; // skip if it's part of a URL
|
|
59
|
+
citations.push({ kind: 'file_line', label: m[1], target: `${m[1]}:${m[2]}` });
|
|
60
|
+
}
|
|
61
|
+
// Pass 2: source-name match against the Sources Used table.
|
|
62
|
+
const lower = body.toLowerCase();
|
|
63
|
+
for (const row of sources) {
|
|
64
|
+
if (lower.includes(row.source.toLowerCase())) {
|
|
65
|
+
citations.push({ kind: 'source', label: row.source });
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return citations;
|
|
69
|
+
}
|
|
70
|
+
function extractDomain(url) {
|
|
71
|
+
try {
|
|
72
|
+
return new URL(url).hostname;
|
|
73
|
+
}
|
|
74
|
+
catch {
|
|
75
|
+
return url;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
export function parseResearchReport(output) {
|
|
79
|
+
const sourcesUsed = parseSourcesUsed(output);
|
|
80
|
+
const findings = [];
|
|
81
|
+
for (const m of output.matchAll(NUMBERED_FINDING_RE)) {
|
|
82
|
+
const idx = Number(m[1]);
|
|
83
|
+
const body = m[2].trim();
|
|
84
|
+
if (!body)
|
|
85
|
+
continue;
|
|
86
|
+
findings.push({
|
|
87
|
+
index: idx,
|
|
88
|
+
body,
|
|
89
|
+
citations: extractCitations(body, sourcesUsed),
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
return { findings, sourcesUsed };
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=research-report.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"research-report.js","sourceRoot":"","sources":["../../../src/reporting/report-parser-slots/research-report.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACjC,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC;QACzB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;QACrC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;QAChB,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC;YAC1B,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,WAAW,EAAE,QAAQ,CAAC,CAAC;YAC5C,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;YAC5B,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;SAC9B,CAAC,CAAC;KACJ,CAAC,CAAC;IACH,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC;QAC5B,MAAM,EAAE,CAAC,CAAC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,CAAC;IACjC,KAAK,MAAM,GAAG,IAAI,OAAO,EAAE,CAAC;QAC1B,IAAI,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,EAAE,CAAC;YAC7C,SAAS,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC;QACxD,CAAC;IACH,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAS,aAAa,CAAC,GAAW;IAChC,IAAI,CAAC;QACH,OAAO,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC;IAC/B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,GAAG,CAAC;IACb,CAAC;AACH,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,MAAc;IAChD,MAAM,WAAW,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAC;IAC7C,MAAM,QAAQ,GAA+B,EAAE,CAAC;IAChD,KAAK,MAAM,CAAC,IAAI,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CAAC,EAAE,CAAC;QACrD,MAAM,GAAG,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACzB,MAAM,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;QACzB,IAAI,CAAC,IAAI;YAAE,SAAS;QACpB,QAAQ,CAAC,IAAI,CAAC;YACZ,KAAK,EAAE,GAAG;YACV,IAAI;YACJ,SAAS,EAAE,gBAAgB,CAAC,IAAI,EAAE,WAAW,CAAC;SAC/C,CAAC,CAAC;IACL,CAAC;IACD,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC;AACnC,CAAC"}
|
|
@@ -8,7 +8,7 @@ export declare class AnnotatorPromptBuilder {
|
|
|
8
8
|
/**
|
|
9
9
|
* Trim the implementer brief down to the "what was asked" essentials
|
|
10
10
|
* before sending to the annotator. The annotator does NOT need the
|
|
11
|
-
* finding-format spec (it has its own format spec via
|
|
11
|
+
* finding-format spec (it has its own format spec via buildAnnotatorRubric)
|
|
12
12
|
* or the delta-mode instructions. Sending the full brief wastes
|
|
13
13
|
* 1-3KB context per call and mildly distracts the model.
|
|
14
14
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"annotator-prompt-builder.d.ts","sourceRoot":"","sources":["../../src/review/annotator-prompt-builder.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"annotator-prompt-builder.d.ts","sourceRoot":"","sources":["../../src/review/annotator-prompt-builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,KAAK,sBAAsB,EAAE,KAAK,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAE5H,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,GAAG,aAAa,CAAC;AAErF,qBAAa,sBAAsB;IAE/B,OAAO,CAAC,SAAS;gBAAT,SAAS,EAAE,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC;IAG9D,KAAK,CAAC,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,sBAAsB,GAAG,MAAM;CAGlE;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CA2B3D;AAED,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,iBAAiB,EAAE,GAAG,EAAE,sBAAsB,GAAG,MAAM,CAoBxG"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { buildAnnotatorRubric } from './templates/annotator-shared.js';
|
|
2
2
|
export class AnnotatorPromptBuilder {
|
|
3
3
|
templates;
|
|
4
4
|
constructor(templates) {
|
|
@@ -11,7 +11,7 @@ export class AnnotatorPromptBuilder {
|
|
|
11
11
|
/**
|
|
12
12
|
* Trim the implementer brief down to the "what was asked" essentials
|
|
13
13
|
* before sending to the annotator. The annotator does NOT need the
|
|
14
|
-
* finding-format spec (it has its own format spec via
|
|
14
|
+
* finding-format spec (it has its own format spec via buildAnnotatorRubric)
|
|
15
15
|
* or the delta-mode instructions. Sending the full brief wastes
|
|
16
16
|
* 1-3KB context per call and mildly distracts the model.
|
|
17
17
|
*
|
|
@@ -57,7 +57,7 @@ export function trimBriefForAnnotator(brief) {
|
|
|
57
57
|
}
|
|
58
58
|
export function assembleAnnotatorPrompt(template, ctx) {
|
|
59
59
|
// Tool sweep #11: trim the brief — the format-spec section is
|
|
60
|
-
// duplicated by
|
|
60
|
+
// duplicated by buildAnnotatorRubric below, so sending it again is
|
|
61
61
|
// redundant + costly.
|
|
62
62
|
const compactBrief = trimBriefForAnnotator(ctx.brief);
|
|
63
63
|
return `You are reviewing a ${template.role} produced by a worker.
|
|
@@ -74,6 +74,6 @@ ${template.onBriefCheck}
|
|
|
74
74
|
|
|
75
75
|
${ctx.workerOutput}
|
|
76
76
|
|
|
77
|
-
${
|
|
77
|
+
${buildAnnotatorRubric(template)}`;
|
|
78
78
|
}
|
|
79
79
|
//# sourceMappingURL=annotator-prompt-builder.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"annotator-prompt-builder.js","sourceRoot":"","sources":["../../src/review/annotator-prompt-builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"annotator-prompt-builder.js","sourceRoot":"","sources":["../../src/review/annotator-prompt-builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAuD,MAAM,iCAAiC,CAAC;AAI5H,MAAM,OAAO,sBAAsB;IAEvB;IADV,YACU,SAAoD;QAApD,cAAS,GAAT,SAAS,CAA2C;IAC3D,CAAC;IAEJ,KAAK,CAAC,KAAqB,EAAE,GAA2B;QACtD,OAAO,uBAAuB,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,GAAG,CA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AY;;EAEhB,oBAAoB,CAAC,QAAQ,CAAC,EAAE,CAAC;AACnC,CAAC"}
|
|
@@ -12,7 +12,7 @@ export { qualityDebugTemplate } from './templates/quality-review-debug.js';
|
|
|
12
12
|
export { qualityInvestigateTemplate } from './templates/quality-review-investigate.js';
|
|
13
13
|
export { ReviewerPromptBuilder } from './reviewer-prompt-builder.js';
|
|
14
14
|
export type { QualityReviewRoute } from './reviewer-prompt-builder.js';
|
|
15
|
-
export type ReviewRoute = 'delegate' | 'execute-plan' | 'audit' | 'review' | 'verify' | 'investigate' | 'debug' | '
|
|
15
|
+
export type ReviewRoute = 'delegate' | 'execute-plan' | 'audit' | 'review' | 'verify' | 'investigate' | 'debug' | 'research';
|
|
16
16
|
export interface ReviewerInput {
|
|
17
17
|
workerOutput: string;
|
|
18
18
|
brief: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reviewer-engine.d.ts","sourceRoot":"","sources":["../../src/review/reviewer-engine.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAwB,KAAK,mBAAmB,EAAE,KAAK,uBAAuB,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAM/I,YAAY,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,oBAAoB,EAA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,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC;CAClJ;AAED,qBAAa,cAAc;IAEb,OAAO,CAAC,OAAO;IAD3B,OAAO,CAAC,MAAM,CAA8B;gBACxB,OAAO,EAAE,qBAAqB;IAE5C,OAAO,CAAC,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,aAAa,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAgB9E,YAAY,CAAC,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,aAAa,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAgBnF,OAAO,CAAC,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,aAAa,GAAG,OAAO,CAAC,sBAAsB,CAAC;CAezF;AAcD,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReviewTemplate, ReviewTemplateContext } from './templates/shared.js';
|
|
2
|
-
export type QualityReviewRoute = 'delegate' | 'execute-plan' | 'audit' | 'review' | 'verify' | 'investigate' | 'debug' | '
|
|
2
|
+
export type QualityReviewRoute = 'delegate' | 'execute-plan' | 'audit' | 'review' | 'verify' | 'investigate' | 'debug' | 'research';
|
|
3
3
|
export declare class ReviewerPromptBuilder {
|
|
4
4
|
private templates;
|
|
5
5
|
private qualityTemplates;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reviewer-prompt-builder.d.ts","sourceRoot":"","sources":["../../src/review/reviewer-prompt-builder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAEnF,MAAM,MAAM,kBAAkB,GAAG,UAAU,GAAG,cAAc,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,aAAa,GAAG,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"reviewer-prompt-builder.d.ts","sourceRoot":"","sources":["../../src/review/reviewer-prompt-builder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAEnF,MAAM,MAAM,kBAAkB,GAAG,UAAU,GAAG,cAAc,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,aAAa,GAAG,OAAO,GAAG,UAAU,CAAC;AAEpI,qBAAa,qBAAqB;IAE9B,OAAO,CAAC,SAAS;IAKjB,OAAO,CAAC,gBAAgB;gBALhB,SAAS,EAAE;QACjB,IAAI,EAAE,cAAc,CAAC;QACrB,YAAY,EAAE,cAAc,CAAC;QAC7B,IAAI,EAAE,cAAc,CAAC;KACtB,EACO,gBAAgB,GAAE,OAAO,CAAC,MAAM,CAAC,kBAAkB,EAAE,cAAc,CAAC,CAAM;IAGpF,SAAS,CAAC,GAAG,EAAE,qBAAqB,GAAG;QAAE,YAAY,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE;IAOnF,cAAc,CAAC,GAAG,EAAE,qBAAqB,GAAG;QAAE,KAAK,CAAC,EAAE,kBAAkB,CAAA;KAAE,GAAG;QAAE,YAAY,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE;IAQzH,SAAS,CAAC,GAAG,EAAE,qBAAqB,GAAG;QAAE,YAAY,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE;CAMpF"}
|
|
@@ -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,iBAgBpC,CAAC"}
|
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
export const annotatorAuditTemplate = {
|
|
2
2
|
role: 'audit',
|
|
3
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.',
|
|
4
|
+
evidenceRule: [
|
|
5
|
+
'- Audit findings come in three valid shapes:',
|
|
6
|
+
' 1. Doc quote: a verbatim passage from the document showing the issue.',
|
|
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
|
+
' 3. Claim + contradiction: the doc\'s claim plus a quote from the source it contradicts.',
|
|
9
|
+
'- A finding without one of these three forms is speculation; downgrade to low or drop.',
|
|
10
|
+
].join('\n'),
|
|
11
|
+
scopeRule: [
|
|
12
|
+
'- The document and what it directly references are in scope.',
|
|
13
|
+
'- Cross-section / cross-doc reasoning IS the value of an audit — do not penalize as speculation.',
|
|
14
|
+
'- Repository-wide enumeration / globbing is out of scope; flag findings whose evidence depends on broad enumeration.',
|
|
15
|
+
'- Coding-style nits on inline examples belong in a code review, not an audit; flag as off-brief.',
|
|
16
|
+
].join('\n'),
|
|
4
17
|
};
|
|
5
18
|
//# sourceMappingURL=annotator-audit.js.map
|
|
@@ -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,0IAA0I;
|
|
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,0IAA0I;IACxJ,YAAY,EAAE;QACZ,8CAA8C;QAC9C,yEAAyE;QACzE,8KAA8K;QAC9K,2FAA2F;QAC3F,wFAAwF;KACzF,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,iBAapC,CAAC"}
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
export const annotatorDebugTemplate = {
|
|
2
2
|
role: 'debugging hypothesis',
|
|
3
|
-
onBriefCheck: 'Each finding should be a hypothesis, root-cause claim, or evidence (reproducer, error pattern, code path).
|
|
3
|
+
onBriefCheck: 'Each finding should be a hypothesis, root-cause claim, or evidence (reproducer, error pattern, code path).',
|
|
4
|
+
evidenceRule: [
|
|
5
|
+
'- Debug findings are hypotheses with reasoning chains.',
|
|
6
|
+
'- Evidence: reproducer + traced code path (file:line) + observed output.',
|
|
7
|
+
'- Hypothesis-level findings with PARTIAL evidence are valid — that is debugging.',
|
|
8
|
+
'- Severity reflects evidence strength: confirmed root cause = high; plausible = medium; ruled out = low or drop.',
|
|
9
|
+
].join('\n'),
|
|
10
|
+
scopeRule: [
|
|
11
|
+
'- Cross-file tracing is in scope and required to follow the failure path.',
|
|
12
|
+
'- Out of scope: applied fixes (the worker should propose, not apply); unrelated code-review remarks.',
|
|
13
|
+
].join('\n'),
|
|
4
14
|
};
|
|
5
15
|
//# 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,4GAA4G;IAC1H,YAAY,EAAE;QACZ,wDAAwD;QACxD,0EAA0E;QAC1E,kFAAkF;QAClF,kHAAkH;KACnH,CAAC,IAAI,CAAC,IAAI,CAAC;IACZ,SAAS,EAAE;QACT,2EAA2E;QAC3E,sGAAsG;KACvG,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,iBAY1C,CAAC"}
|
|
@@ -1,5 +1,14 @@
|
|
|
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.',
|
|
4
|
+
evidenceRule: [
|
|
5
|
+
'- Present-thing citations: real `file:line` from files actually read, with a quote or summary.',
|
|
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.',
|
|
8
|
+
].join('\n'),
|
|
9
|
+
scopeRule: [
|
|
10
|
+
'- Wherever the question leads is in scope; the question may not name files.',
|
|
11
|
+
'- Drift into unrelated code-review remarks is out of scope.',
|
|
12
|
+
].join('\n'),
|
|
4
13
|
};
|
|
5
14
|
//# 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,kDAAkD;IAChE,YAAY,EAAE;QACZ,gGAAgG;QAChG,+KAA+K;QAC/K,2EAA2E;KAC5E,CAAC,IAAI,CAAC,IAAI,CAAC;IACZ,SAAS,EAAE;QACT,6EAA6E;QAC7E,6DAA6D;KAC9D,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,iBAarC,CAAC"}
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
export const annotatorReviewTemplate = {
|
|
2
2
|
role: 'code review',
|
|
3
3
|
onBriefCheck: 'For each finding, ask: is this within the requested focus area? A security review should produce security findings, not formatting nits.',
|
|
4
|
+
evidenceRule: [
|
|
5
|
+
'- Code-review findings must cite `file:line` from the named files.',
|
|
6
|
+
'- Evidence must include a verbatim code quote, not paraphrase.',
|
|
7
|
+
'- Findings without a quotable code excerpt are speculation; downgrade or drop.',
|
|
8
|
+
].join('\n'),
|
|
9
|
+
scopeRule: [
|
|
10
|
+
'- Only the named files are in scope. Behavior of direct callers/callees may be referenced when visible in the named files.',
|
|
11
|
+
'- Speculation about untouched files is out of scope.',
|
|
12
|
+
'- Doc/spec issues belong in an audit, not a review — flag as off-brief.',
|
|
13
|
+
].join('\n'),
|
|
4
14
|
};
|
|
5
15
|
//# 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,0IAA0I;
|
|
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,0IAA0I;IACxJ,YAAY,EAAE;QACZ,oEAAoE;QACpE,gEAAgE;QAChE,gFAAgF;KACjF,CAAC,IAAI,CAAC,IAAI,CAAC;IACZ,SAAS,EAAE;QACT,4HAA4H;QAC5H,sDAAsD;QACtD,yEAAyE;KAC1E,CAAC,IAAI,CAAC,IAAI,CAAC;CACb,CAAC"}
|
|
@@ -5,6 +5,12 @@ export interface AnnotatorPromptContext {
|
|
|
5
5
|
export interface AnnotatorTemplate {
|
|
6
6
|
role: string;
|
|
7
7
|
onBriefCheck: string;
|
|
8
|
+
/** Per-tool evidence rule. Tells the annotator what counts as
|
|
9
|
+
* grounded evidence for findings from this tool. */
|
|
10
|
+
evidenceRule: string;
|
|
11
|
+
/** Per-tool scope rule. Tells the annotator what is in/out of scope
|
|
12
|
+
* for findings from this tool. */
|
|
13
|
+
scopeRule: string;
|
|
8
14
|
}
|
|
9
|
-
export declare
|
|
15
|
+
export declare function buildAnnotatorRubric(template: AnnotatorTemplate): string;
|
|
10
16
|
//# sourceMappingURL=annotator-shared.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"annotator-shared.d.ts","sourceRoot":"","sources":["../../../src/review/templates/annotator-shared.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,sBAAsB;IACrC,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"annotator-shared.d.ts","sourceRoot":"","sources":["../../../src/review/templates/annotator-shared.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,sBAAsB;IACrC,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB;yDACqD;IACrD,YAAY,EAAE,MAAM,CAAC;IACrB;uCACmC;IACnC,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,iBAAiB,GAAG,MAAM,CA+CxE"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// Data shared by all 5 annotator templates. The actual prompt assembly
|
|
2
2
|
// happens in review/annotator-prompt-builder.ts.
|
|
3
|
-
export
|
|
3
|
+
export function buildAnnotatorRubric(template) {
|
|
4
|
+
return String.raw `
|
|
4
5
|
## Output format (REQUIRED)
|
|
5
6
|
|
|
6
7
|
Respond with exactly one fenced JSON code block AS THE LAST BLOCK in your
|
|
@@ -16,47 +17,35 @@ the worker presented them. Example:
|
|
|
16
17
|
"suggestion": "Use a parameterized API or escape input",
|
|
17
18
|
"annotatorConfidence": 90,
|
|
18
19
|
"category": "security"
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
"id": "F2",
|
|
22
|
-
"severity": "medium",
|
|
23
|
-
"claim": "Auth check missing on /admin endpoint",
|
|
24
|
-
"evidence": "router.get('/admin', adminHandler) — no auth middleware applied",
|
|
25
|
-
"annotatorConfidence": 60,
|
|
26
|
-
"category": "security"
|
|
27
20
|
}
|
|
28
21
|
]
|
|
29
22
|
` + '```' + `
|
|
30
23
|
|
|
31
24
|
Field rules:
|
|
32
|
-
- ` + '`id`' + `: assign sequentially F1, F2, F3, ... (
|
|
25
|
+
- ` + '`id`' + `: assign sequentially F1, F2, F3, ... (must be unique).
|
|
33
26
|
- ` + '`severity`' + `: one of "critical" | "high" | "medium" | "low" — YOUR
|
|
34
|
-
final judgment
|
|
35
|
-
dial it up or down based on actual impact (workers tend to inflate).
|
|
36
|
-
- critical: must fix before any other work (RCE, auth bypass, data loss)
|
|
37
|
-
- high: serious bug / security issue, blocks release
|
|
38
|
-
- medium: real issue, should fix soon
|
|
39
|
-
- low: minor issue, nice to fix
|
|
40
|
-
Map worker-said "mid" -> "medium". When the worker omitted severity, judge.
|
|
27
|
+
final judgment. The worker's value is a hint; calibrate to actual impact.
|
|
41
28
|
- ` + '`claim`' + `: one-sentence summary.
|
|
42
29
|
- ` + '`evidence`' + `: REQUIRED, ≥20 chars, MUST be a verbatim quote from the
|
|
43
|
-
worker's output.
|
|
30
|
+
worker's output.
|
|
44
31
|
- ` + '`suggestion`' + `: optional; quote or paraphrase the worker's recommended fix.
|
|
45
|
-
- ` + '`annotatorConfidence`' + `: integer 0-100. How confident YOU
|
|
46
|
-
that the finding is correct, on-brief, and well-grounded
|
|
47
|
-
80-100: defend without hesitation
|
|
48
|
-
60-79: plausible, minor gaps
|
|
49
|
-
40-59: thin evidence
|
|
50
|
-
20-39: weak / off-brief
|
|
51
|
-
0-19: unsupported / fabricated
|
|
32
|
+
- ` + '`annotatorConfidence`' + `: integer 0-100. How confident YOU are
|
|
33
|
+
that the finding is correct, on-brief, and well-grounded.
|
|
52
34
|
- ` + '`category`' + `: optional, one of: "missing_test" | "scope_creep" |
|
|
53
35
|
"incomplete_impl" | "style_lint" | "security" | "performance" |
|
|
54
36
|
"maintainability" | "doc_gap" | "doc_drift" | "contract_violation" |
|
|
55
37
|
"coverage_gap" | "dead_code" | "queue_hygiene" | "other".
|
|
56
|
-
When omitted, the parser will infer from the claim text. Prefer to emit
|
|
57
|
-
it when the category is unambiguous from your reading.
|
|
58
38
|
|
|
59
|
-
|
|
60
|
-
|
|
39
|
+
## Tool-specific evidence rule (apply when judging "well-grounded")
|
|
40
|
+
|
|
41
|
+
` + template.evidenceRule + `
|
|
42
|
+
|
|
43
|
+
## Tool-specific scope rule (apply when judging "on-brief")
|
|
44
|
+
|
|
45
|
+
` + template.scopeRule + `
|
|
46
|
+
|
|
47
|
+
If the worker raised NO issues, return ` + '`[]`' + `. Surrounding prose is
|
|
48
|
+
allowed but ignored by the parser — only the LAST ` + '```json' + ` block is read.
|
|
61
49
|
`.trim();
|
|
50
|
+
}
|
|
62
51
|
//# sourceMappingURL=annotator-shared.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"annotator-shared.js","sourceRoot":"","sources":["../../../src/review/templates/annotator-shared.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,iDAAiD;
|
|
1
|
+
{"version":3,"file":"annotator-shared.js","sourceRoot":"","sources":["../../../src/review/templates/annotator-shared.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,iDAAiD;AAkBjD,MAAM,UAAU,oBAAoB,CAAC,QAA2B;IAC9D,OAAO,MAAM,CAAC,GAAG,CAAA;;;;;;;CAOlB,GAAG,WAAW,GAAG;;;;;;;;;;;CAWjB,GAAG,KAAK,GAAG;;;GAGT,GAAG,MAAM,GAAG;GACZ,GAAG,YAAY,GAAG;;GAElB,GAAG,SAAS,GAAG;GACf,GAAG,YAAY,GAAG;;GAElB,GAAG,cAAc,GAAG;GACpB,GAAG,uBAAuB,GAAG;;GAE7B,GAAG,YAAY,GAAG;;;;;;;CAOpB,GAAG,QAAQ,CAAC,YAAY,GAAG;;;;CAI3B,GAAG,QAAQ,CAAC,SAAS,GAAG;;wCAEe,GAAG,MAAM,GAAG;mDACD,GAAG,SAAS,GAAG;CACjE,CAAC,IAAI,EAAE,CAAC;AACT,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,iBAarC,CAAC"}
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
export const annotatorVerifyTemplate = {
|
|
2
2
|
role: 'verification report',
|
|
3
|
-
onBriefCheck: 'Each finding should map to one checklist item with evidence the criterion was met or unmet.
|
|
3
|
+
onBriefCheck: 'Each finding should map to one checklist item with evidence the criterion was met or unmet.',
|
|
4
|
+
evidenceRule: [
|
|
5
|
+
'- Each Finding must map 1:1 to a checklist item.',
|
|
6
|
+
'- Evidence is execution output (test/build/command output) OR a code reference (`file:line`).',
|
|
7
|
+
'- A claimed PASS without evidence is speculation; downgrade or drop.',
|
|
8
|
+
'- Severity binding: PASS = low; FAIL = medium or high based on impact.',
|
|
9
|
+
].join('\n'),
|
|
10
|
+
scopeRule: [
|
|
11
|
+
'- 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).',
|
|
13
|
+
].join('\n'),
|
|
4
14
|
};
|
|
5
15
|
//# 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,6FAA6F;IAC3G,YAAY,EAAE;QACZ,kDAAkD;QAClD,+FAA+F;QAC/F,sEAAsE;QACtE,wEAAwE;KACzE,CAAC,IAAI,CAAC,IAAI,CAAC;IACZ,SAAS,EAAE;QACT,2FAA2F;QAC3F,2EAA2E;KAC5E,CAAC,IAAI,CAAC,IAAI,CAAC;CACb,CAAC"}
|
|
@@ -1,39 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
2
|
+
* Truly-shared finding criteria — the constants that apply *identically*
|
|
3
|
+
* across every consumer. Per-tool blocks live next to each tool, not here.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* implementer prompts the SAME calibration the annotator uses, so the
|
|
10
|
-
* two stages converge:
|
|
5
|
+
* - SEVERITY_LADDER: same severity ladder, same anti-inflation hint, same
|
|
6
|
+
* impact-anchored definitions for all 5 read-only tools.
|
|
7
|
+
* - REVIEWER_AWARENESS_AP: same spec+quality reviewer expectation across
|
|
8
|
+
* delegate / execute-plan / retry implementer prompts.
|
|
11
9
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* - Annotator validates the worker emitted them properly (its rubric
|
|
15
|
-
* in `annotator-shared.ts` references the same definitions).
|
|
16
|
-
*
|
|
17
|
-
* Result: fewer false positives, fewer missed criticals, less rework
|
|
18
|
-
* (the worker self-aligned with what the reviewer will check). No
|
|
19
|
-
* heuristic short-circuits — both stages run, they just spend less
|
|
20
|
-
* time correcting each other.
|
|
10
|
+
* Evidence + scope + annotator-awareness are calibrated per-tool; see
|
|
11
|
+
* tools/<tool>/implementer-criteria.ts for each tool's blocks.
|
|
21
12
|
*/
|
|
22
|
-
/** Severity ladder for read-only finding emission AND annotator
|
|
23
|
-
* validation. Same words, same meaning across stages. */
|
|
24
13
|
export declare const SEVERITY_LADDER: string;
|
|
25
|
-
/** Evidence-grounding rule. Required for every finding the worker
|
|
26
|
-
* emits. The annotator rejects findings without quotable evidence. */
|
|
27
|
-
export declare const EVIDENCE_GROUNDING: string;
|
|
28
|
-
/** Scope discipline. Workers commonly hallucinate citations into files
|
|
29
|
-
* they didn't open; this rule blocks the most common failure mode. */
|
|
30
|
-
export declare const SCOPE_DISCIPLINE: string;
|
|
31
|
-
/** What the annotator (which doubles as the read-only quality reviewer)
|
|
32
|
-
* will check the worker's output against. Pre-fix the worker had no
|
|
33
|
-
* visibility into this; now it can self-align. */
|
|
34
|
-
export declare const ANNOTATOR_CHECK_AWARENESS_RO: string;
|
|
35
|
-
/** Awareness block for delegate / execute-plan / retry implementers.
|
|
36
|
-
* Tells the worker what spec_review and quality_review will judge,
|
|
37
|
-
* so the worker self-aligns. */
|
|
38
14
|
export declare const REVIEWER_AWARENESS_AP: string;
|
|
39
15
|
//# sourceMappingURL=finding-criteria.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"finding-criteria.d.ts","sourceRoot":"","sources":["../../../src/review/templates/finding-criteria.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"finding-criteria.d.ts","sourceRoot":"","sources":["../../../src/review/templates/finding-criteria.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,eAAO,MAAM,eAAe,QAOhB,CAAC;AAEb,eAAO,MAAM,qBAAqB,QAiBtB,CAAC"}
|