@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.
- package/dist/bounded-execution/index.d.ts +2 -0
- package/dist/bounded-execution/index.d.ts.map +1 -1
- package/dist/bounded-execution/index.js +2 -0
- package/dist/bounded-execution/index.js.map +1 -1
- package/dist/bounded-execution/safety-max-turns.d.ts +17 -0
- package/dist/bounded-execution/safety-max-turns.d.ts.map +1 -0
- package/dist/bounded-execution/safety-max-turns.js +17 -0
- package/dist/bounded-execution/safety-max-turns.js.map +1 -0
- package/dist/bounded-execution/stall-watchdog.d.ts +16 -0
- package/dist/bounded-execution/stall-watchdog.d.ts.map +1 -0
- package/dist/bounded-execution/stall-watchdog.js +69 -0
- package/dist/bounded-execution/stall-watchdog.js.map +1 -0
- 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/lifecycle/handlers/execution-context-builder.d.ts.map +1 -1
- package/dist/lifecycle/handlers/execution-context-builder.js +2 -1
- package/dist/lifecycle/handlers/execution-context-builder.js.map +1 -1
- package/dist/lifecycle/handlers/quality-chain-handlers.d.ts.map +1 -1
- package/dist/lifecycle/handlers/quality-chain-handlers.js +10 -1
- package/dist/lifecycle/handlers/quality-chain-handlers.js.map +1 -1
- package/dist/lifecycle/parallel-criteria-dispatcher.d.ts +62 -0
- package/dist/lifecycle/parallel-criteria-dispatcher.d.ts.map +1 -0
- package/dist/lifecycle/parallel-criteria-dispatcher.js +328 -0
- package/dist/lifecycle/parallel-criteria-dispatcher.js.map +1 -0
- package/dist/lifecycle/parallel-criteria-routes.d.ts +16 -0
- package/dist/lifecycle/parallel-criteria-routes.d.ts.map +1 -0
- package/dist/lifecycle/parallel-criteria-routes.js +147 -0
- package/dist/lifecycle/parallel-criteria-routes.js.map +1 -0
- package/dist/lifecycle/task-runner.d.ts.map +1 -1
- package/dist/lifecycle/task-runner.js +268 -97
- package/dist/lifecycle/task-runner.js.map +1 -1
- package/dist/providers/anthropic-messages-adapter.d.ts.map +1 -1
- package/dist/providers/anthropic-messages-adapter.js +8 -1
- package/dist/providers/anthropic-messages-adapter.js.map +1 -1
- package/dist/providers/provider-factory.d.ts.map +1 -1
- package/dist/providers/provider-factory.js +2 -1
- package/dist/providers/provider-factory.js.map +1 -1
- package/dist/providers/runner-adapter.d.ts +8 -0
- package/dist/providers/runner-adapter.d.ts.map +1 -1
- package/dist/providers/runner-shell-types.d.ts +7 -0
- package/dist/providers/runner-shell-types.d.ts.map +1 -1
- package/dist/providers/runner-shell.d.ts +51 -1
- package/dist/providers/runner-shell.d.ts.map +1 -1
- package/dist/providers/runner-shell.js +130 -0
- package/dist/providers/runner-shell.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/annotator-engine.d.ts +7 -1
- package/dist/review/annotator-engine.d.ts.map +1 -1
- package/dist/review/annotator-engine.js +15 -2
- package/dist/review/annotator-engine.js.map +1 -1
- package/dist/review/annotator-prompt-builder.d.ts.map +1 -1
- package/dist/review/annotator-prompt-builder.js +10 -2
- package/dist/review/annotator-prompt-builder.js.map +1 -1
- package/dist/review/reviewer-engine.d.ts.map +1 -1
- package/dist/review/reviewer-engine.js +4 -3
- package/dist/review/reviewer-engine.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-shared.d.ts +8 -1
- package/dist/review/templates/annotator-shared.d.ts.map +1 -1
- 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 -5
- package/dist/review/templates/annotator-verify.js.map +1 -1
- package/dist/tools/audit/implementer-criteria.d.ts +60 -4
- package/dist/tools/audit/implementer-criteria.d.ts.map +1 -1
- package/dist/tools/audit/implementer-criteria.js +118 -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 +70 -36
- package/dist/tools/audit/tool-config.js.map +1 -1
- package/dist/tools/criteria-types.d.ts +27 -0
- package/dist/tools/criteria-types.d.ts.map +1 -0
- package/dist/tools/criteria-types.js +25 -0
- package/dist/tools/criteria-types.js.map +1 -0
- package/dist/tools/debug/implementer-criteria.d.ts +47 -4
- package/dist/tools/debug/implementer-criteria.d.ts.map +1 -1
- package/dist/tools/debug/implementer-criteria.js +104 -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 +31 -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 +51 -5
- package/dist/tools/investigate/implementer-criteria.d.ts.map +1 -1
- package/dist/tools/investigate/implementer-criteria.js +109 -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 +20 -8
- package/dist/tools/investigate/tool-config.js.map +1 -1
- package/dist/tools/parallel-criteria-prompt.d.ts +106 -0
- package/dist/tools/parallel-criteria-prompt.d.ts.map +1 -0
- package/dist/tools/parallel-criteria-prompt.js +86 -0
- package/dist/tools/parallel-criteria-prompt.js.map +1 -0
- package/dist/tools/review/implementer-criteria.d.ts +50 -1
- package/dist/tools/review/implementer-criteria.d.ts.map +1 -1
- package/dist/tools/review/implementer-criteria.js +113 -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 +50 -7
- package/dist/tools/review/tool-config.js.map +1 -1
- package/dist/tools/verify/implementer-criteria.d.ts +49 -0
- package/dist/tools/verify/implementer-criteria.d.ts.map +1 -1
- package/dist/tools/verify/implementer-criteria.js +104 -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 +22 -2
- package/dist/tools/verify/tool-config.js.map +1 -1
- package/dist/types/run-result.d.ts +18 -0
- package/dist/types/run-result.d.ts.map +1 -1
- package/dist/types/task-spec.d.ts +11 -0
- package/dist/types/task-spec.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ import { auditReportSchema } from '../../reporting/report-parser-slots/audit-rep
|
|
|
4
4
|
import { auditHeadlineTemplate } from '../../reporting/headline-templates/audit.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_AUDIT, SCOPE_RULE_AUDIT, ANNOTATOR_AWARENESS_AUDIT, } from './implementer-criteria.js';
|
|
7
|
+
import { AUDIT_PURPOSE_ORIENTATION, EVIDENCE_RULE_AUDIT, SCOPE_RULE_AUDIT, ANNOTATOR_AWARENESS_AUDIT, DOC_AUDIT_FAILURE_MODES, THOROUGHNESS_REMINDER_AUDIT, } from './implementer-criteria.js';
|
|
8
8
|
export function registerAudit(registry) {
|
|
9
9
|
registry.register({
|
|
10
10
|
routeName: 'audit',
|
|
@@ -18,32 +18,37 @@ export function registerAudit(registry) {
|
|
|
18
18
|
responseShapeName: 'BatchResponse',
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* Per-audit-type "done" conditions.
|
|
23
|
+
*
|
|
24
|
+
* The audit tool's primary target is prose artifacts: specs, plans,
|
|
25
|
+
* recommendation docs, design docs, briefs, API contracts, configs.
|
|
26
|
+
* A secondary target is source code (when filePaths point at .ts/.py/etc.).
|
|
27
|
+
*
|
|
28
|
+
* `default` is the comprehensive sweep — what 90%+ of audit calls should
|
|
29
|
+
* use. `security` and `performance` are narrow opt-in lenses for cases
|
|
30
|
+
* where the caller specifically wants ONE dimension (a threat model, a
|
|
31
|
+
* scaling design). The full failure-mode taxonomy applies regardless;
|
|
32
|
+
* the lens just tells the worker which dimension to weight slightly more.
|
|
33
|
+
*/
|
|
21
34
|
const AUDIT_DONE_CONDITIONS = {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
style: 'Identify all style issues (naming, formatting, dead code, inconsistent patterns). Each finding has location and recommended fix.',
|
|
26
|
-
general: 'Identify issues across security, performance, correctness, and style. Each finding has category, severity, location, and remediation.',
|
|
35
|
+
default: 'Comprehensive audit. Apply the full failure-mode taxonomy through the executability lens (the orientation block above). For prose artifacts (specs, plans, recommendation docs, designs, post-mortems, audits, briefs): emphasize RECOMMENDATION-COHERENCE, INTERNAL CONTRADICTION, ARGUMENT SOUNDNESS, COMPLETENESS AGAINST CONSTRAINTS, FIX ACTIONABILITY, DRIFT, and SCOPE-CREEP — i.e., would a literal-following worker who reads this artifact and follows it without judgment produce the right outcome? Are sections internally consistent? Does each recommendation actually solve its stated problem given the doc\'s own constraints? Sweep style/clarity issues only when they would cause a worker to misinterpret. For source code: logic errors, contract violations, off-by-one bugs, type mismatches, unhandled edge cases. Each finding has severity (critical/high/medium/low), location, and remediation.',
|
|
36
|
+
security: 'Narrow lens: security ONLY. Use this only when the caller specifically wants security findings and not general audit findings. For prose artifacts (threat models, security designs, auth specs): identify missing controls, ambiguous trust boundaries, undeclared attack surfaces, leaked-secret patterns in examples, recommendations that introduce new attack surface without mitigation, and threat-model gaps. For source code: injection, auth bypass, data exposure, OWASP top 10. Apply the full failure-mode taxonomy through the security lens. Skip non-security findings. Each finding has severity, location, and remediation.',
|
|
37
|
+
performance: 'Narrow lens: performance ONLY. Use this only when the caller specifically wants performance findings and not general audit findings. For prose artifacts (designs, scaling plans, latency-sensitive specs): identify unstated complexity, missing hot-path consideration, unbounded loops in proposed designs, omitted scaling story, recommendations that mandate work that does not scale, and missing latency/throughput targets. For source code: O(n²) loops, unnecessary allocations, missing caching, blocking I/O. Apply the full failure-mode taxonomy through the performance lens. Skip non-performance findings. Each finding has impact level, location, and fix recommendation.',
|
|
27
38
|
};
|
|
28
39
|
const DELTA_AUDIT_SUFFIX = ' Perform a full audit (do not reduce thoroughness). Verify each prior finding as fixed or unfixed. Omit fixed prior findings from the main report. Include unfixed prior findings and new findings. End with a summary of which prior findings were resolved.';
|
|
29
40
|
function resolveAuditTypeText(auditType) {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
41
|
+
// Defensive: at the HTTP layer Zod's `.default('default')` fires, but
|
|
42
|
+
// internal callers may still construct Input directly without going
|
|
43
|
+
// through the schema. Treat undefined as the same as `'default'`.
|
|
44
|
+
const t = auditType ?? 'default';
|
|
45
|
+
if (t === 'default')
|
|
46
|
+
return 'comprehensive (executability + correctness + clarity, with security and performance lenses applied)';
|
|
47
|
+
return `narrow (${t} only)`;
|
|
35
48
|
}
|
|
36
49
|
function resolveDoneCondition(auditType, hasContextBlocks) {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
base = AUDIT_DONE_CONDITIONS.general;
|
|
40
|
-
}
|
|
41
|
-
else if (Array.isArray(auditType)) {
|
|
42
|
-
base = auditType.map(t => AUDIT_DONE_CONDITIONS[t]).join(' ');
|
|
43
|
-
}
|
|
44
|
-
else {
|
|
45
|
-
base = AUDIT_DONE_CONDITIONS[auditType] ?? AUDIT_DONE_CONDITIONS.general;
|
|
46
|
-
}
|
|
50
|
+
const t = auditType ?? 'default';
|
|
51
|
+
const base = AUDIT_DONE_CONDITIONS[t] ?? AUDIT_DONE_CONDITIONS.default;
|
|
47
52
|
return hasContextBlocks ? base + DELTA_AUDIT_SUFFIX : base;
|
|
48
53
|
}
|
|
49
54
|
function hasContent(value) {
|
|
@@ -75,6 +80,12 @@ export function auditBriefSlot(input) {
|
|
|
75
80
|
}];
|
|
76
81
|
}
|
|
77
82
|
const FINDING_FORMAT_INSTRUCTIONS = [
|
|
83
|
+
// Orientation goes FIRST — the worker needs to know why this audit
|
|
84
|
+
// exists before reading the format spec / taxonomy / evidence rules.
|
|
85
|
+
// Without it, workers calibrated on "find issues in this doc" produce
|
|
86
|
+
// stylistic proofreading; with it, they target executability blockers.
|
|
87
|
+
AUDIT_PURPOSE_ORIENTATION,
|
|
88
|
+
'',
|
|
78
89
|
'Produce a narrative audit report. Use this EXACT per-finding format — both the structured reviewer and the deterministic fallback extract from this same format:',
|
|
79
90
|
'',
|
|
80
91
|
'## Finding 1: <one-line title>',
|
|
@@ -97,6 +108,16 @@ const FINDING_FORMAT_INSTRUCTIONS = [
|
|
|
97
108
|
// Result: fewer downgraded findings, fewer missed criticals.
|
|
98
109
|
SEVERITY_LADDER,
|
|
99
110
|
'',
|
|
111
|
+
// Doc-audit failure-mode taxonomy. Without this block, workers calibrated
|
|
112
|
+
// on code-audit rubrics produce only surface-level proofreading nits on
|
|
113
|
+
// prose artifacts. The 11 categories below are what actually goes wrong
|
|
114
|
+
// in non-trivial specs/plans/recommendation docs.
|
|
115
|
+
DOC_AUDIT_FAILURE_MODES,
|
|
116
|
+
'',
|
|
117
|
+
// Counter-balances the SEVERITY_LADDER's anti-inflation hint for the
|
|
118
|
+
// prose-document case, where the typical failure is under-finding.
|
|
119
|
+
THOROUGHNESS_REMINDER_AUDIT,
|
|
120
|
+
'',
|
|
100
121
|
EVIDENCE_RULE_AUDIT,
|
|
101
122
|
'',
|
|
102
123
|
SCOPE_RULE_AUDIT,
|
|
@@ -138,21 +159,34 @@ export const toolConfig = {
|
|
|
138
159
|
category: 'read_only',
|
|
139
160
|
agentType: 'complex',
|
|
140
161
|
briefSlot: auditBriefSlot,
|
|
141
|
-
buildTaskSpec: (brief, ctx) =>
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
162
|
+
buildTaskSpec: (brief, ctx) => {
|
|
163
|
+
// For the parallel-criteria dispatcher's cached prefix, hand it the
|
|
164
|
+
// pure document/file targets — not buildPrompt's full spec which
|
|
165
|
+
// embeds the legacy ## Finding format and would compete with the
|
|
166
|
+
// dispatcher's own format spec.
|
|
167
|
+
const targetParts = [`Audit for ${brief.auditTypeText} issues.`];
|
|
168
|
+
if (brief.document)
|
|
169
|
+
targetParts.push(`Document:\n\n${brief.document}`);
|
|
170
|
+
if (brief.filePaths.length > 0) {
|
|
171
|
+
targetParts.push(`Target files:\n${brief.filePaths.map(p => `- ${p}`).join('\n')}`);
|
|
172
|
+
}
|
|
173
|
+
return {
|
|
174
|
+
prompt: buildPrompt(brief),
|
|
175
|
+
parallelTarget: targetParts.join('\n\n'),
|
|
176
|
+
agentType: 'complex',
|
|
177
|
+
reviewPolicy: 'quality_only',
|
|
178
|
+
briefQualityPolicy: 'off',
|
|
179
|
+
done: brief.done,
|
|
180
|
+
tools: ctx.config.defaults?.tools ?? 'full',
|
|
181
|
+
timeoutMs: ctx.config.defaults?.timeoutMs ?? DEFAULT_TASK_TIMEOUT_MS,
|
|
182
|
+
maxCostUSD: ctx.config.defaults?.maxCostUSD ?? 10,
|
|
183
|
+
sandboxPolicy: ctx.config.defaults?.sandboxPolicy ?? 'cwd-only',
|
|
184
|
+
cwd: ctx.projectContext?.cwd ?? ctx.cwd,
|
|
185
|
+
contextBlockIds: brief.contextBlockIds,
|
|
186
|
+
filePaths: brief.filePaths.length > 0 ? brief.filePaths : undefined,
|
|
187
|
+
mainModel: ctx.mainModel,
|
|
188
|
+
};
|
|
189
|
+
},
|
|
156
190
|
reportSchema: auditReportSchema,
|
|
157
191
|
headlineTemplate: auditHeadlineTemplate,
|
|
158
192
|
reviewTemplates: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-config.js","sourceRoot":"","sources":["../../../src/tools/audit/tool-config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAc,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,gDAAgD,CAAC;AACtF,OAAO,EAAE,iBAAiB,EAAoB,MAAM,qDAAqD,CAAC;AAC1G,OAAO,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AAGpF,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAC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oB;KAChC;CACF,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Structured criterion shape used by all five read-only routes for
|
|
3
|
+
* parallel-criteria fan-out. Each entry in the route's *_CRITERIA constant
|
|
4
|
+
* becomes one sub-worker; the per-criterion description is the variable
|
|
5
|
+
* suffix in the sub-worker's user message (the cached prefix carries
|
|
6
|
+
* everything else).
|
|
7
|
+
*/
|
|
8
|
+
export interface CriterionEntry {
|
|
9
|
+
/** "1", "2", ..., matches the position in the existing *_FAILURE_MODES list. */
|
|
10
|
+
id: string;
|
|
11
|
+
/** Short label, e.g. "RECOMMENDATION-COHERENCE". */
|
|
12
|
+
title: string;
|
|
13
|
+
/** Verbatim prose from the existing failure-mode description, sans the
|
|
14
|
+
* leading "N. TITLE — " prefix. */
|
|
15
|
+
description: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Parses a `*_FAILURE_MODES` joined string back into structured criterion
|
|
19
|
+
* entries. Each route's implementer-criteria.ts already authors its
|
|
20
|
+
* taxonomy as a numbered list (`'1. TITLE — description...'`); this lets
|
|
21
|
+
* the parallel-criteria dispatcher iterate without duplicating the prose.
|
|
22
|
+
*
|
|
23
|
+
* Expected line shape per criterion: `^N. TITLE — description$`
|
|
24
|
+
* (em-dash with surrounding spaces; title may contain hyphens or slashes).
|
|
25
|
+
*/
|
|
26
|
+
export declare function parseCriteria(failureModesText: string): CriterionEntry[];
|
|
27
|
+
//# sourceMappingURL=criteria-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"criteria-types.d.ts","sourceRoot":"","sources":["../../src/tools/criteria-types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,WAAW,cAAc;IAC7B,gFAAgF;IAChF,EAAE,EAAE,MAAM,CAAC;IACX,oDAAoD;IACpD,KAAK,EAAE,MAAM,CAAC;IACd;wCACoC;IACpC,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,gBAAgB,EAAE,MAAM,GAAG,cAAc,EAAE,CAaxE"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parses a `*_FAILURE_MODES` joined string back into structured criterion
|
|
3
|
+
* entries. Each route's implementer-criteria.ts already authors its
|
|
4
|
+
* taxonomy as a numbered list (`'1. TITLE — description...'`); this lets
|
|
5
|
+
* the parallel-criteria dispatcher iterate without duplicating the prose.
|
|
6
|
+
*
|
|
7
|
+
* Expected line shape per criterion: `^N. TITLE — description$`
|
|
8
|
+
* (em-dash with surrounding spaces; title may contain hyphens or slashes).
|
|
9
|
+
*/
|
|
10
|
+
export function parseCriteria(failureModesText) {
|
|
11
|
+
const out = [];
|
|
12
|
+
const lines = failureModesText.split('\n');
|
|
13
|
+
// Regex: leading digits + dot + space, capture title up to ' — ' separator,
|
|
14
|
+
// then capture rest of line as description.
|
|
15
|
+
const re = /^(\d+)\.\s+([^—]+?)\s+—\s+(.+)$/;
|
|
16
|
+
for (const line of lines) {
|
|
17
|
+
const m = re.exec(line);
|
|
18
|
+
if (!m)
|
|
19
|
+
continue;
|
|
20
|
+
const [, id, title, description] = m;
|
|
21
|
+
out.push({ id, title: title.trim(), description: description.trim() });
|
|
22
|
+
}
|
|
23
|
+
return out;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=criteria-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"criteria-types.js","sourceRoot":"","sources":["../../src/tools/criteria-types.ts"],"names":[],"mappings":"AAiBA;;;;;;;;GAQG;AACH,MAAM,UAAU,aAAa,CAAC,gBAAwB;IACpD,MAAM,GAAG,GAAqB,EAAE,CAAC;IACjC,MAAM,KAAK,GAAG,gBAAgB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC3C,4EAA4E;IAC5E,4CAA4C;IAC5C,MAAM,EAAE,GAAG,iCAAiC,CAAC;IAC7C,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,MAAM,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACxB,IAAI,CAAC,CAAC;YAAE,SAAS;QACjB,MAAM,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC;QACrC,GAAG,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,EAAE,WAAW,EAAE,WAAW,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IACzE,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -1,12 +1,55 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Debug-specific implementer criteria.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* DEBUG'S PURPOSE — read this before adding categories.
|
|
5
|
+
* mma-debug is hypothesis-driven root-cause investigation. The output is
|
|
6
|
+
* a fix specification, not a hint. The success criterion is:
|
|
7
|
+
*
|
|
8
|
+
* "Could a maintainer who reads ONLY your debug report apply the fix,
|
|
9
|
+
* reproduce the original failure, verify the fix, and re-merge —
|
|
10
|
+
* without redoing the investigation?"
|
|
11
|
+
*
|
|
12
|
+
* That criterion is what makes a finding load-bearing. A correctly-
|
|
13
|
+
* identified line that is just a SYMPTOM (the real cause is upstream)
|
|
14
|
+
* is the debug-equivalent of an unimplementable fix — it sends the
|
|
15
|
+
* maintainer down the wrong path. A hypothesis with no falsifier is a
|
|
16
|
+
* guess dressed up as a finding.
|
|
17
|
+
*
|
|
18
|
+
* Debug is hypothesis-driven; cross-file tracing is required, not
|
|
19
|
+
* forbidden. Findings are evidence chains, not point observations.
|
|
20
|
+
*/
|
|
21
|
+
/**
|
|
22
|
+
* The orientation block. Goes at the TOP of every debug prompt.
|
|
23
|
+
*
|
|
24
|
+
* Without an explicit purpose statement, workers default to "find a
|
|
25
|
+
* suspicious line" — which often points at the symptom, not the cause.
|
|
26
|
+
* With this orientation, they trace from the failure point upstream
|
|
27
|
+
* until they hit something that, if changed, would prevent the failure.
|
|
8
28
|
*/
|
|
29
|
+
export declare const DEBUG_PURPOSE_ORIENTATION: string;
|
|
9
30
|
export declare const EVIDENCE_RULE_DEBUG: string;
|
|
10
31
|
export declare const SCOPE_RULE_DEBUG: string;
|
|
32
|
+
/**
|
|
33
|
+
* The failure-mode taxonomy for debug investigations.
|
|
34
|
+
*
|
|
35
|
+
* Without this block, workers default to "find a suspicious line" —
|
|
36
|
+
* which catches surface symptoms but misses the chain upstream that
|
|
37
|
+
* actually caused the failure. The 9 categories below are the patterns
|
|
38
|
+
* a careful debugger would consciously check for.
|
|
39
|
+
*/
|
|
40
|
+
export declare const DEBUG_FAILURE_MODES: string;
|
|
41
|
+
/**
|
|
42
|
+
* Counter-balance to the SEVERITY_LADDER's anti-inflation hint.
|
|
43
|
+
*
|
|
44
|
+
* The shared severity ladder warns against inflation. For debug, the
|
|
45
|
+
* common failure is the OPPOSITE — workers stop at the first plausible
|
|
46
|
+
* explanation (over-confidence on a shallow trace) rather than tracing
|
|
47
|
+
* to the actual cause. This block tells the worker the typical debug
|
|
48
|
+
* failure is shallow root-cause, not noisy hypothesis lists.
|
|
49
|
+
*/
|
|
50
|
+
export declare const THOROUGHNESS_REMINDER_DEBUG: string;
|
|
11
51
|
export declare const ANNOTATOR_AWARENESS_DEBUG: string;
|
|
52
|
+
import { type CriterionEntry } from '../criteria-types.js';
|
|
53
|
+
/** Structured per-criterion array for parallel-criteria fan-out. */
|
|
54
|
+
export declare const DEBUG_CRITERIA: readonly CriterionEntry[];
|
|
12
55
|
//# sourceMappingURL=implementer-criteria.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"implementer-criteria.d.ts","sourceRoot":"","sources":["../../../src/tools/debug/implementer-criteria.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;
|
|
1
|
+
{"version":3,"file":"implementer-criteria.d.ts","sourceRoot":"","sources":["../../../src/tools/debug/implementer-criteria.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,yBAAyB,QAe1B,CAAC;AAEb,eAAO,MAAM,mBAAmB,QAQpB,CAAC;AAEb,eAAO,MAAM,gBAAgB,QAMjB,CAAC;AAEb;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,QAcpB,CAAC;AAEb;;;;;;;;GAQG;AACH,eAAO,MAAM,2BAA2B,QAa5B,CAAC;AAEb,eAAO,MAAM,yBAAyB,QAS1B,CAAC;AAEb,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE1E,oEAAoE;AACpE,eAAO,MAAM,cAAc,EAAE,SAAS,cAAc,EAAuC,CAAC"}
|
|
@@ -1,29 +1,120 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Debug-specific implementer criteria.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* DEBUG'S PURPOSE — read this before adding categories.
|
|
5
|
+
* mma-debug is hypothesis-driven root-cause investigation. The output is
|
|
6
|
+
* a fix specification, not a hint. The success criterion is:
|
|
7
|
+
*
|
|
8
|
+
* "Could a maintainer who reads ONLY your debug report apply the fix,
|
|
9
|
+
* reproduce the original failure, verify the fix, and re-merge —
|
|
10
|
+
* without redoing the investigation?"
|
|
11
|
+
*
|
|
12
|
+
* That criterion is what makes a finding load-bearing. A correctly-
|
|
13
|
+
* identified line that is just a SYMPTOM (the real cause is upstream)
|
|
14
|
+
* is the debug-equivalent of an unimplementable fix — it sends the
|
|
15
|
+
* maintainer down the wrong path. A hypothesis with no falsifier is a
|
|
16
|
+
* guess dressed up as a finding.
|
|
17
|
+
*
|
|
18
|
+
* Debug is hypothesis-driven; cross-file tracing is required, not
|
|
19
|
+
* forbidden. Findings are evidence chains, not point observations.
|
|
20
|
+
*/
|
|
21
|
+
/**
|
|
22
|
+
* The orientation block. Goes at the TOP of every debug prompt.
|
|
23
|
+
*
|
|
24
|
+
* Without an explicit purpose statement, workers default to "find a
|
|
25
|
+
* suspicious line" — which often points at the symptom, not the cause.
|
|
26
|
+
* With this orientation, they trace from the failure point upstream
|
|
27
|
+
* until they hit something that, if changed, would prevent the failure.
|
|
8
28
|
*/
|
|
29
|
+
export const DEBUG_PURPOSE_ORIENTATION = [
|
|
30
|
+
'Why this debug investigation exists:',
|
|
31
|
+
'mma-debug produces a fix specification a maintainer can apply WITHOUT redoing the investigation. Your output replaces the maintainer\'s own root-cause work — not augments it.',
|
|
32
|
+
'',
|
|
33
|
+
'For your output to clear that bar, every finding must answer:',
|
|
34
|
+
'- Reproduction: how does the maintainer trigger the failure (command, input, state)?',
|
|
35
|
+
'- Symptom: where does the failure surface (file:line of the error, the failing assertion, the wrong output)?',
|
|
36
|
+
'- Cause: where is the actual defect (file:line that, if changed, would prevent the failure)?',
|
|
37
|
+
'- Trace: the evidence chain that links symptom to cause — each step a file:line citation or an observed value.',
|
|
38
|
+
'- Fix: the specific change to make at the cause (PROPOSE only — read-only contract; the caller applies).',
|
|
39
|
+
'- Falsifier: how the maintainer can verify the fix works (the assertion that should now pass, the wrong output that should now be right).',
|
|
40
|
+
'',
|
|
41
|
+
'A finding missing the trace from symptom to cause is a guess. A finding that names a symptom location as the cause is misdirection. Both are worse than no finding because they send the maintainer down the wrong path.',
|
|
42
|
+
'',
|
|
43
|
+
'The completion test: would a maintainer who reads only your report and the source code reproduce the failure, find the cited cause, apply the proposed fix, and confirm the falsifier — all without doing the investigation a second time?',
|
|
44
|
+
].join('\n');
|
|
9
45
|
export const EVIDENCE_RULE_DEBUG = [
|
|
10
46
|
'Evidence grounding (REQUIRED for every finding):',
|
|
11
|
-
'- Each finding is a hypothesis with a supporting evidence chain.',
|
|
12
|
-
'-
|
|
13
|
-
'-
|
|
14
|
-
'-
|
|
47
|
+
'- Each finding is a hypothesis with a supporting evidence chain. Cite `file:line` at every step of the chain.',
|
|
48
|
+
'- The chain has at least three points: SYMPTOM (where the failure surfaces) → INTERMEDIATE STATE (the wrong value, the unexpected branch, the missing call) → CAUSE (the file:line that, if changed, would prevent the failure).',
|
|
49
|
+
'- Evidence forms accepted: reproducer commands, captured logs / stack traces, observed values, and code-path traces with file:line per step.',
|
|
50
|
+
'- Hypothesis-level findings with PARTIAL evidence are valid — that is how root-causing works. Show the reasoning chain. State which step is firm and which is conjecture.',
|
|
51
|
+
'- A hypothesis with NO falsifier (no way to check if the proposed cause is right) is a guess, not a finding. Always state how the maintainer can verify the fix.',
|
|
52
|
+
'- Severity reflects evidence strength AND impact: confirmed root cause that ships a wrong fix = `critical`; confirmed root cause = `high`; plausible candidate with most of the chain = `medium`; partial trace / multiple plausible explanations = `low` (or note in summary).',
|
|
15
53
|
].join('\n');
|
|
16
54
|
export const SCOPE_RULE_DEBUG = [
|
|
17
55
|
'Scope:',
|
|
18
56
|
'- Follow the failure path wherever it leads. Cross-file tracing is required.',
|
|
57
|
+
'- Reproduction discovery IS in scope: if the caller did not provide reproduction steps, infer them from test files, error messages, or recent commits and state your inferred reproduction explicitly.',
|
|
58
|
+
'- Pre-existing-vs-new separation: if multiple bugs are entangled in the same failure, separate them. Identify which is the one the caller asked about; note the others under "Other defects observed (out of scope for this investigation)".',
|
|
19
59
|
'- Out of scope: applying fixes (debug is read-only — propose, do not apply); rewriting code; auditing unrelated subsystems; broadening into general code review.',
|
|
20
60
|
].join('\n');
|
|
61
|
+
/**
|
|
62
|
+
* The failure-mode taxonomy for debug investigations.
|
|
63
|
+
*
|
|
64
|
+
* Without this block, workers default to "find a suspicious line" —
|
|
65
|
+
* which catches surface symptoms but misses the chain upstream that
|
|
66
|
+
* actually caused the failure. The 9 categories below are the patterns
|
|
67
|
+
* a careful debugger would consciously check for.
|
|
68
|
+
*/
|
|
69
|
+
export const DEBUG_FAILURE_MODES = [
|
|
70
|
+
'Five parallel angles for finding the root cause. EACH angle is a distinct perspective; from your assigned angle, propose one or more candidate root-cause hypotheses (or contributing factors). Severity = strength of the evidence chain from THIS angle.',
|
|
71
|
+
'',
|
|
72
|
+
'1. SYMPTOM-LOCATION ANGLE — start from where the failure surfaces (the throwing line, the failing assertion, the visible bad output). Trace UPSTREAM through the call/data path until you find a state that, if changed, prevents the failure. Each step must be a file:line citation or an observed value. Your candidate cause is the upstream state-change site you identify.',
|
|
73
|
+
'2. RECENT-CHANGE ANGLE — read git log / recent diffs on the involved files. Which lines changed in the last N commits? Which changes plausibly altered the behavior under question? Your candidate cause is a specific recent change that could have introduced the bug; cite the commit + the line.',
|
|
74
|
+
'3. TEST-FAILURE ANGLE — read the failing test (or the test that would fail). What assertion fires, with what expected vs actual? Read the implementation it exercises and identify where the contract is broken. Your candidate cause is "the implementation does X but the test contract requires Y at <file:line>".',
|
|
75
|
+
'4. REPRODUCTION ANGLE — what minimum input / state / config triggers the failure? If no reproduction exists in the bug report, infer one from the code: which entry point + arguments would land in the failing path? Your candidate cause is "the failure requires <state>; the bug is the code path that handles that state at <file:line>".',
|
|
76
|
+
'5. CONCURRENCY / CONFIGURATION ANGLE — does the failure depend on timing, ordering, async-ness, env vars, feature flags, or runtime config? Look for shared state, locks, awaits between check-and-act, conditional code gated on env. Your candidate cause is the race / config dependency, or "no concurrency/config dependency suspected" with reasoning.',
|
|
77
|
+
'',
|
|
78
|
+
'Severity calibration for each candidate root cause:',
|
|
79
|
+
'- critical: confirmed root cause + reproducible evidence + concrete fix is implied. The maintainer can act now without re-investigation.',
|
|
80
|
+
'- high: strong root-cause hypothesis with traced upstream evidence (file:line citations along the call/data path), single chain, no inferred steps.',
|
|
81
|
+
'- medium: likely candidate cause with most of the chain; 1-2 inferred steps; mark gaps explicitly with "verify by reading <file>" or "verify by running <cmd>".',
|
|
82
|
+
'- low: possible contributing factor or partial trace; weak evidence but worth surfacing for the maintainer to consider against other angles\' candidates.',
|
|
83
|
+
].join('\n');
|
|
84
|
+
/**
|
|
85
|
+
* Counter-balance to the SEVERITY_LADDER's anti-inflation hint.
|
|
86
|
+
*
|
|
87
|
+
* The shared severity ladder warns against inflation. For debug, the
|
|
88
|
+
* common failure is the OPPOSITE — workers stop at the first plausible
|
|
89
|
+
* explanation (over-confidence on a shallow trace) rather than tracing
|
|
90
|
+
* to the actual cause. This block tells the worker the typical debug
|
|
91
|
+
* failure is shallow root-cause, not noisy hypothesis lists.
|
|
92
|
+
*/
|
|
93
|
+
export const THOROUGHNESS_REMINDER_DEBUG = [
|
|
94
|
+
'Thoroughness expectation for debug investigations:',
|
|
95
|
+
'- For non-trivial failures (test failure, runtime error, unexpected behavior), stopping at the first plausible explanation is the typical debug failure mode. Always check for SYMPTOM-NOT-CAUSE before filing a finding: ask "if I changed this line, would the failure still happen via a different path?"',
|
|
96
|
+
'- The SEVERITY_LADDER warns against inflation. That warning is calibrated for code reviews — for debug, the common failure is OVER-CONFIDENCE on a shallow trace (calling a symptom location the cause). Apply the failure-mode taxonomy first; THEN calibrate severity.',
|
|
97
|
+
'- Do not invent hypotheses to hit a quota. But if you have only one finding and the failure is non-trivial, double-check categories 1, 2, 3, and 5 (symptom-not-cause, scapegoat file, incomplete trace, parallel causes) — these are the ones investigators most often miss on first pass.',
|
|
98
|
+
'- Limit yourself to 3-5 most-likely hypotheses. Do NOT enumerate implausible ones to pad the list.',
|
|
99
|
+
'',
|
|
100
|
+
'Symptom → cause walk (REQUIRED on every investigation):',
|
|
101
|
+
'- Start at the SYMPTOM (where the failure surfaces — the error message, the failing assertion, the wrong output).',
|
|
102
|
+
'- Walk UPSTREAM in the call/data flow. At each step, check whether the state at that point is consistent with the failure or already wrong. The point where the state first becomes wrong is the cause.',
|
|
103
|
+
'- For each step in the walk, cite a file:line. If the walk crosses a function boundary, cite both sides (caller line + callee line).',
|
|
104
|
+
'- Worked example. A test fails with `TypeError: cannot read property "id" of undefined` at `tests/users.test.ts:42` (assertion on the response). The walk: assertion sees `response.user === undefined`; the route handler at `src/handlers/getUser.ts:18` returns `{ user: rows[0] }` from a DB call; the DB call at `src/db/users.ts:34` returns `[]` for the test fixture id; the fixture loader at `tests/fixtures/users.ts:12` writes to a different table than the handler reads. → CAUSE is `tests/fixtures/users.ts:12` (wrong table). The TypeError at `tests/users.test.ts:42` is the SYMPTOM. A finding that named `getUser.ts:18` as the cause would have shipped a fix that adds null-checking — masking the bug instead of fixing it.',
|
|
105
|
+
'- Most investigators miss findings of this shape on first pass because the failing line is loud and the upstream cause is quiet. The symptom → cause walk forces the trace.',
|
|
106
|
+
].join('\n');
|
|
21
107
|
export const ANNOTATOR_AWARENESS_DEBUG = [
|
|
22
108
|
'After your output, an annotator validates each finding against this debug rubric:',
|
|
23
|
-
'- Is each finding a hypothesis
|
|
24
|
-
'- Does the
|
|
25
|
-
'-
|
|
26
|
-
'- Is
|
|
27
|
-
'
|
|
109
|
+
'- Is each finding a hypothesis with a complete trace from symptom to cause (not a point observation at the symptom)?',
|
|
110
|
+
'- Does the cited cause come UPSTREAM of the cited symptom in the call/data flow?',
|
|
111
|
+
'- Is there a reproduction step the maintainer can use to trigger the failure?',
|
|
112
|
+
'- Is there a falsifier the maintainer can use to verify the fix?',
|
|
113
|
+
'- Did you propose fixes WITHOUT applying them (read-only contract)?',
|
|
114
|
+
'- Is severity calibrated to evidence strength (gaps in chain = lower severity, not the same severity with hand-waving)?',
|
|
115
|
+
'Self-check before emitting. Findings that fail any check are downgraded or dropped — but partial-evidence hypotheses with explicit "the gap is here, verify by X" notes are FULLY VALID, do NOT downgrade them as "speculation". Debug is speculation narrowed by evidence; hand-waving is the failure mode, not careful gap-marking.',
|
|
28
116
|
].join('\n');
|
|
117
|
+
import { parseCriteria } from '../criteria-types.js';
|
|
118
|
+
/** Structured per-criterion array for parallel-criteria fan-out. */
|
|
119
|
+
export const DEBUG_CRITERIA = parseCriteria(DEBUG_FAILURE_MODES);
|
|
29
120
|
//# sourceMappingURL=implementer-criteria.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"implementer-criteria.js","sourceRoot":"","sources":["../../../src/tools/debug/implementer-criteria.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;
|
|
1
|
+
{"version":3,"file":"implementer-criteria.js","sourceRoot":"","sources":["../../../src/tools/debug/implementer-criteria.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,sCAAsC;IACtC,gLAAgL;IAChL,EAAE;IACF,+DAA+D;IAC/D,sFAAsF;IACtF,8GAA8G;IAC9G,8FAA8F;IAC9F,gHAAgH;IAChH,0GAA0G;IAC1G,2IAA2I;IAC3I,EAAE;IACF,0NAA0N;IAC1N,EAAE;IACF,4OAA4O;CAC7O,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEb,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,kDAAkD;IAClD,+GAA+G;IAC/G,kOAAkO;IAClO,8IAA8I;IAC9I,2KAA2K;IAC3K,kKAAkK;IAClK,iRAAiR;CAClR,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEb,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,QAAQ;IACR,8EAA8E;IAC9E,wMAAwM;IACxM,8OAA8O;IAC9O,kKAAkK;CACnK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEb;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,4PAA4P;IAC5P,EAAE;IACF,kXAAkX;IAClX,sSAAsS;IACtS,uTAAuT;IACvT,gVAAgV;IAChV,8VAA8V;IAC9V,EAAE;IACF,qDAAqD;IACrD,0IAA0I;IAC1I,qJAAqJ;IACrJ,iKAAiK;IACjK,2JAA2J;CAC5J,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEb;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,oDAAoD;IACpD,8SAA8S;IAC9S,0QAA0Q;IAC1Q,6RAA6R;IAC7R,oGAAoG;IACpG,EAAE;IACF,yDAAyD;IACzD,mHAAmH;IACnH,yMAAyM;IACzM,sIAAsI;IACtI,qtBAAqtB;IACrtB,6KAA6K;CAC9K,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEb,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,mFAAmF;IACnF,sHAAsH;IACtH,kFAAkF;IAClF,+EAA+E;IAC/E,kEAAkE;IAClE,qEAAqE;IACrE,yHAAyH;IACzH,uUAAuU;CACxU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEb,OAAO,EAAE,aAAa,EAAuB,MAAM,sBAAsB,CAAC;AAE1E,oEAAoE;AACpE,MAAM,CAAC,MAAM,cAAc,GAA8B,aAAa,CAAC,mBAAmB,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-config.d.ts","sourceRoot":"","sources":["../../../src/tools/debug/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,EAAkB,KAAK,cAAc,EAAE,MAAM,4CAA4C,CAAC;
|
|
1
|
+
{"version":3,"file":"tool-config.d.ts","sourceRoot":"","sources":["../../../src/tools/debug/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,EAAkB,KAAK,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAajG,wBAAgB,aAAa,CAAC,QAAQ,EAAE,mBAAmB,GAAG,IAAI,CAYjE;AAsDD,eAAO,MAAM,UAAU,EAAE,UAAU,CAAC,KAAK,EAAE,cAAc,EAAE,OAAO,CA2CjE,CAAC"}
|
|
@@ -4,7 +4,7 @@ import { debugBriefSlot } from '../../intake/brief-compiler-slots/debug.js';
|
|
|
4
4
|
import { debugHeadlineTemplate } from '../../reporting/headline-templates/debug.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_DEBUG, SCOPE_RULE_DEBUG, ANNOTATOR_AWARENESS_DEBUG, } from './implementer-criteria.js';
|
|
7
|
+
import { DEBUG_PURPOSE_ORIENTATION, EVIDENCE_RULE_DEBUG, SCOPE_RULE_DEBUG, ANNOTATOR_AWARENESS_DEBUG, DEBUG_FAILURE_MODES, THOROUGHNESS_REMINDER_DEBUG, } from './implementer-criteria.js';
|
|
8
8
|
export function registerDebug(registry) {
|
|
9
9
|
registry.register({
|
|
10
10
|
routeName: 'debug',
|
|
@@ -19,13 +19,22 @@ export function registerDebug(registry) {
|
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
const FINDING_FORMAT_INSTRUCTIONS = [
|
|
22
|
+
// Orientation goes FIRST — the worker needs to know why this debug
|
|
23
|
+
// exists (fix specification, not a hint; symptom-vs-cause matters)
|
|
24
|
+
// before reading the format spec / taxonomy / evidence rules.
|
|
25
|
+
// Without it, workers point at the failing line and call it the cause.
|
|
26
|
+
DEBUG_PURPOSE_ORIENTATION,
|
|
27
|
+
'',
|
|
22
28
|
'Use hypothesis-driven debugging. Use this EXACT per-finding format — both the structured reviewer and the deterministic fallback extract from this same format:',
|
|
23
29
|
'',
|
|
24
30
|
'## Finding 1: <one-line title>',
|
|
25
31
|
'- Severity: critical | high | medium | low',
|
|
26
|
-
'-
|
|
27
|
-
'-
|
|
32
|
+
'- Reproduction: command/input/state to trigger the failure',
|
|
33
|
+
'- Symptom: file:line where the failure surfaces',
|
|
34
|
+
'- Trace: each step file:line + observed value, ending at the cause',
|
|
35
|
+
'- Cause: file:line that, if changed, would prevent the failure',
|
|
28
36
|
'- Fix: proposed change (PROPOSE only — do NOT apply the fix)',
|
|
37
|
+
'- Falsifier: how the maintainer verifies the fix works',
|
|
29
38
|
'',
|
|
30
39
|
'## Finding 2: <one-line title>',
|
|
31
40
|
'- Severity: ...',
|
|
@@ -33,13 +42,22 @@ const FINDING_FORMAT_INSTRUCTIONS = [
|
|
|
33
42
|
'',
|
|
34
43
|
'Rules:',
|
|
35
44
|
'- Each finding heading MUST start with "## Finding N: " (h2, "Finding ", number, colon, title) — number sequentially from 1.',
|
|
36
|
-
'-
|
|
45
|
+
'- Reproduction / Symptom / Trace / Cause / Fix / Falsifier bullets are on their own lines with the labels exactly as shown.',
|
|
37
46
|
'- This is a read-only diagnostic — do NOT edit any file. Propose fixes; the caller applies them.',
|
|
38
47
|
'- Limit yourself to 3-5 most-likely hypotheses. Do not enumerate implausible ones to pad the list.',
|
|
39
48
|
'',
|
|
40
49
|
// Tool sweep #12: shared rubric so worker self-aligns with the annotator.
|
|
41
50
|
SEVERITY_LADDER,
|
|
42
51
|
'',
|
|
52
|
+
// Debug failure-mode taxonomy. Without this block, workers stop at
|
|
53
|
+
// the first plausible explanation (often the symptom) instead of
|
|
54
|
+
// tracing upstream to the actual cause.
|
|
55
|
+
DEBUG_FAILURE_MODES,
|
|
56
|
+
'',
|
|
57
|
+
// Counter-balances the SEVERITY_LADDER's anti-inflation hint and
|
|
58
|
+
// includes the symptom→cause walk with worked example.
|
|
59
|
+
THOROUGHNESS_REMINDER_DEBUG,
|
|
60
|
+
'',
|
|
43
61
|
EVIDENCE_RULE_DEBUG,
|
|
44
62
|
'',
|
|
45
63
|
SCOPE_RULE_DEBUG,
|
|
@@ -67,8 +85,17 @@ export const toolConfig = {
|
|
|
67
85
|
parts.push(fileSection);
|
|
68
86
|
parts.push(FINDING_FORMAT_INSTRUCTIONS);
|
|
69
87
|
const prompt = parts.join('\n\n');
|
|
88
|
+
const targetParts = [`Problem to debug:\n\n${brief.problem}`];
|
|
89
|
+
if (brief.context)
|
|
90
|
+
targetParts.push(`Context: ${brief.context}`);
|
|
91
|
+
if (brief.hypothesis)
|
|
92
|
+
targetParts.push(`Initial hypothesis: ${brief.hypothesis}`);
|
|
70
93
|
return {
|
|
71
94
|
prompt,
|
|
95
|
+
// Pure user problem statement for the parallel-criteria dispatcher's
|
|
96
|
+
// cached prefix; bypasses the legacy ## Finding format spec from
|
|
97
|
+
// FINDING_FORMAT_INSTRUCTIONS that's already embedded in `prompt`.
|
|
98
|
+
parallelTarget: targetParts.join('\n\n'),
|
|
72
99
|
agentType: 'complex',
|
|
73
100
|
reviewPolicy: 'quality_only',
|
|
74
101
|
briefQualityPolicy: 'off',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-config.js","sourceRoot":"","sources":["../../../src/tools/debug/tool-config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAGvE,OAAO,EAAE,cAAc,EAAuB,MAAM,4CAA4C,CAAC;AACjG,OAAO,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AACpF,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,4CAA4C,CAAC;AAC7E,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAChB,yBAAyB,
|
|
1
|
+
{"version":3,"file":"tool-config.js","sourceRoot":"","sources":["../../../src/tools/debug/tool-config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAGvE,OAAO,EAAE,cAA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