audit-tools 0.35.3 → 0.35.6
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/audit/cli/charterDeltaPrompt.d.ts +1 -2
- package/dist/audit/cli/charterDeltaPrompt.d.ts.map +1 -1
- package/dist/audit/cli/charterDeltaPrompt.js +1 -5
- package/dist/audit/cli/charterDeltaPrompt.js.map +1 -1
- package/dist/audit/cli/charterExtractionPrompt.d.ts +21 -14
- package/dist/audit/cli/charterExtractionPrompt.d.ts.map +1 -1
- package/dist/audit/cli/charterExtractionPrompt.js +89 -73
- package/dist/audit/cli/charterExtractionPrompt.js.map +1 -1
- package/dist/audit/cli/conceptualDispatch.d.ts +0 -6
- package/dist/audit/cli/conceptualDispatch.d.ts.map +1 -1
- package/dist/audit/cli/conceptualDispatch.js +8 -9
- package/dist/audit/cli/conceptualDispatch.js.map +1 -1
- package/dist/audit/cli/dispatch/hostFanoutGate.d.ts +1 -1
- package/dist/audit/cli/dispatch/hostFanoutGate.d.ts.map +1 -1
- package/dist/audit/cli/dispatch/hostFanoutGate.js.map +1 -1
- package/dist/audit/cli/dispatch/quotaPool.d.ts +4 -1
- package/dist/audit/cli/dispatch/quotaPool.d.ts.map +1 -1
- package/dist/audit/cli/dispatch/quotaPool.js +9 -1
- package/dist/audit/cli/dispatch/quotaPool.js.map +1 -1
- package/dist/audit/cli/dispatch.d.ts.map +1 -1
- package/dist/audit/cli/dispatch.js +14 -0
- package/dist/audit/cli/dispatch.js.map +1 -1
- package/dist/audit/cli/fanoutLanes.d.ts +54 -0
- package/dist/audit/cli/fanoutLanes.d.ts.map +1 -0
- package/dist/audit/cli/fanoutLanes.js +51 -0
- package/dist/audit/cli/fanoutLanes.js.map +1 -0
- package/dist/audit/cli/nextStepCommand.d.ts.map +1 -1
- package/dist/audit/cli/nextStepCommand.js +332 -107
- package/dist/audit/cli/nextStepCommand.js.map +1 -1
- package/dist/audit/cli/nextStepHelpers.d.ts.map +1 -1
- package/dist/audit/cli/nextStepHelpers.js +83 -15
- package/dist/audit/cli/nextStepHelpers.js.map +1 -1
- package/dist/audit/cli/prompts.d.ts +8 -16
- package/dist/audit/cli/prompts.d.ts.map +1 -1
- package/dist/audit/cli/prompts.js +25 -60
- package/dist/audit/cli/prompts.js.map +1 -1
- package/dist/audit/cli/semanticReviewStep.d.ts +0 -3
- package/dist/audit/cli/semanticReviewStep.d.ts.map +1 -1
- package/dist/audit/cli/semanticReviewStep.js +14 -38
- package/dist/audit/cli/semanticReviewStep.js.map +1 -1
- package/dist/audit/cli/steps.d.ts +4 -4
- package/dist/audit/cli/steps.d.ts.map +1 -1
- package/dist/audit/cli/steps.js +0 -2
- package/dist/audit/cli/steps.js.map +1 -1
- package/dist/audit/orchestrator/designReviewPrompt.d.ts +6 -14
- package/dist/audit/orchestrator/designReviewPrompt.d.ts.map +1 -1
- package/dist/audit/orchestrator/designReviewPrompt.js +9 -23
- package/dist/audit/orchestrator/designReviewPrompt.js.map +1 -1
- package/dist/audit/orchestrator/hostInputPause.d.ts +2 -2
- package/dist/audit/orchestrator/hostInputPause.js +1 -1
- package/dist/audit/orchestrator/partitionTaskGraph.d.ts +12 -2
- package/dist/audit/orchestrator/partitionTaskGraph.d.ts.map +1 -1
- package/dist/audit/orchestrator/partitionTaskGraph.js +31 -23
- package/dist/audit/orchestrator/partitionTaskGraph.js.map +1 -1
- package/dist/audit/orchestrator/reviewPackets.d.ts +6 -2
- package/dist/audit/orchestrator/reviewPackets.d.ts.map +1 -1
- package/dist/audit/orchestrator/reviewPackets.js.map +1 -1
- package/dist/audit/reporting/synthesis.d.ts +8 -5
- package/dist/audit/reporting/synthesis.d.ts.map +1 -1
- package/dist/audit/reporting/synthesis.js +21 -10
- package/dist/audit/reporting/synthesis.js.map +1 -1
- package/dist/audit/reporting/synthesisNarrativePrompt.js +1 -1
- package/dist/audit/reporting/synthesisNarrativePrompt.js.map +1 -1
- package/dist/audit/systemic/secondOrderAdversaryPrompt.d.ts +5 -2
- package/dist/audit/systemic/secondOrderAdversaryPrompt.d.ts.map +1 -1
- package/dist/audit/systemic/secondOrderAdversaryPrompt.js +5 -5
- package/dist/audit/systemic/secondOrderAdversaryPrompt.js.map +1 -1
- package/dist/remediate/intake.d.ts +1 -1
- package/dist/remediate/intake.d.ts.map +1 -1
- package/dist/remediate/intake.js +11 -1
- package/dist/remediate/intake.js.map +1 -1
- package/dist/remediate/phases/triage.d.ts.map +1 -1
- package/dist/remediate/phases/triage.js +1 -1
- package/dist/remediate/phases/triage.js.map +1 -1
- package/dist/remediate/review/reviewGate.d.ts +14 -0
- package/dist/remediate/review/reviewGate.d.ts.map +1 -1
- package/dist/remediate/review/reviewGate.js +37 -0
- package/dist/remediate/review/reviewGate.js.map +1 -1
- package/dist/remediate/steps/contractPipeline.d.ts +0 -8
- package/dist/remediate/steps/contractPipeline.d.ts.map +1 -1
- package/dist/remediate/steps/contractPipeline.js +0 -2
- package/dist/remediate/steps/contractPipeline.js.map +1 -1
- package/dist/remediate/steps/contractPipelinePrompts.d.ts +0 -10
- package/dist/remediate/steps/contractPipelinePrompts.d.ts.map +1 -1
- package/dist/remediate/steps/contractPipelinePrompts.js +9 -24
- package/dist/remediate/steps/contractPipelinePrompts.js.map +1 -1
- package/dist/remediate/steps/dispatch/implementPrompt.d.ts.map +1 -1
- package/dist/remediate/steps/dispatch/implementPrompt.js +3 -1
- package/dist/remediate/steps/dispatch/implementPrompt.js.map +1 -1
- package/dist/remediate/steps/dispatch/marshal.d.ts.map +1 -1
- package/dist/remediate/steps/dispatch/marshal.js +65 -31
- package/dist/remediate/steps/dispatch/marshal.js.map +1 -1
- package/dist/remediate/steps/dispatch/writeScope.d.ts +10 -17
- package/dist/remediate/steps/dispatch/writeScope.d.ts.map +1 -1
- package/dist/remediate/steps/dispatch/writeScope.js +16 -57
- package/dist/remediate/steps/dispatch/writeScope.js.map +1 -1
- package/dist/remediate/steps/dispatch.d.ts +1 -1
- package/dist/remediate/steps/dispatch.d.ts.map +1 -1
- package/dist/remediate/steps/dispatch.js +1 -1
- package/dist/remediate/steps/dispatch.js.map +1 -1
- package/dist/remediate/steps/intakeResolver.d.ts.map +1 -1
- package/dist/remediate/steps/intakeResolver.js +1 -1
- package/dist/remediate/steps/intakeResolver.js.map +1 -1
- package/dist/remediate/steps/nextStep.d.ts.map +1 -1
- package/dist/remediate/steps/nextStep.js +89 -22
- package/dist/remediate/steps/nextStep.js.map +1 -1
- package/dist/remediate/steps/prompts.d.ts +3 -3
- package/dist/remediate/steps/prompts.d.ts.map +1 -1
- package/dist/remediate/steps/prompts.js +43 -9
- package/dist/remediate/steps/prompts.js.map +1 -1
- package/dist/remediate/validation/remediationState.d.ts +1 -1
- package/dist/remediate/validation/remediationState.d.ts.map +1 -1
- package/dist/remediate/validation/remediationState.js +8 -1
- package/dist/remediate/validation/remediationState.js.map +1 -1
- package/dist/shared/index.d.ts +1 -1
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/index.js +1 -1
- package/dist/shared/index.js.map +1 -1
- package/dist/shared/prompts.d.ts +34 -0
- package/dist/shared/prompts.d.ts.map +1 -1
- package/dist/shared/prompts.js +62 -0
- package/dist/shared/prompts.js.map +1 -1
- package/docs/audit-pkg/contracts.md +13 -7
- package/package.json +1 -1
|
@@ -19,24 +19,18 @@ export declare function renderDispatchReviewPrompt(params: {
|
|
|
19
19
|
activeReviewRun: ActiveReviewRun;
|
|
20
20
|
dispatchPlanPath: string;
|
|
21
21
|
dispatchQuotaPath: string | null;
|
|
22
|
-
hostCanRestrictSubagentTools: boolean;
|
|
23
|
-
hostCanSelectSubagentModel: boolean;
|
|
24
22
|
driverInstruction?: string;
|
|
25
23
|
/** The current driver's handshake, re-emitted onto the continue-command. */
|
|
26
24
|
hostDescriptor?: AuditorDescriptor;
|
|
27
25
|
}): string;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
contentHash: string;
|
|
37
|
-
/** Notice for a prior quarantined submission (shape error + quarantine path). */
|
|
38
|
-
rejectionNotice?: string;
|
|
39
|
-
}): string;
|
|
26
|
+
/**
|
|
27
|
+
* Capability-neutral hint lines (design resolution 2, 2026-08-05): identical
|
|
28
|
+
* text on every host — "if your harness supports…" phrasing lets a host without
|
|
29
|
+
* the facility skip the hint instead of receiving a different artifact, so the
|
|
30
|
+
* rendered step never branches on the capability handshake.
|
|
31
|
+
*/
|
|
32
|
+
export declare const CAPABILITY_NEUTRAL_MODEL_HINT_LINE = "If your harness supports selecting a subagent model, map `entry.model_hint.tier` (`small`, `standard`, `deep`) to an available host model without asking the user for model names; otherwise `model_hint` is inert plan metadata \u2014 ignore it.";
|
|
33
|
+
export declare const CAPABILITY_NEUTRAL_TOOL_RESTRICTION_LINE = "If your harness supports per-subagent tool restriction, restrict review subagents to read/search plus the packet submit command named in their prompt (no source edit/write tools); otherwise proceed without restrictions and do not ask the user about them.";
|
|
40
34
|
export declare function renderEdgeReasoningDispatchPrompt(params: {
|
|
41
35
|
promptPath: string;
|
|
42
36
|
resultsPath: string;
|
|
@@ -57,8 +51,6 @@ export declare function renderRollingDispatchPrompt(params: {
|
|
|
57
51
|
runId: string;
|
|
58
52
|
dispatchPlanPath: string;
|
|
59
53
|
dispatchQuotaPath: string | null;
|
|
60
|
-
hostCanRestrictSubagentTools: boolean;
|
|
61
|
-
hostCanSelectSubagentModel: boolean;
|
|
62
54
|
driverInstruction?: string;
|
|
63
55
|
/** The current driver's handshake, re-emitted onto the continue-command. */
|
|
64
56
|
hostDescriptor?: AuditorDescriptor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../../src/audit/cli/prompts.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,sBAAsB,EAC3B,KAAK,iBAAiB,EACvB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,k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11 @@ function buildDispatchDataLines(dispatchPlanPath, dispatchQuotaPath, sessionLimi
|
|
|
103
103
|
export function renderDispatchReviewPrompt(params) {
|
|
104
104
|
const mergeCommand = mergeAndIngestCommand(params.artifactsDir, params.activeReviewRun.run_id);
|
|
105
105
|
const continueCommand = nextStepCommand(params.root, params.artifactsDir, params.hostDescriptor);
|
|
106
|
-
//
|
|
107
|
-
//
|
|
108
|
-
//
|
|
109
|
-
const modelLine =
|
|
110
|
-
|
|
111
|
-
: null;
|
|
112
|
-
const toolsLine = params.hostCanRestrictSubagentTools
|
|
113
|
-
? "Restrict review subagents to read/search plus the packet submit command named in their prompt. Do not give them source edit/write tools."
|
|
114
|
-
: "Do not ask the user about per-subagent tool restrictions; this host did not report a callable restriction facility.";
|
|
106
|
+
// Capability-neutral (design resolution 2): the same prompt renders on every
|
|
107
|
+
// host — hints are phrased "if your harness supports…", so a host without the
|
|
108
|
+
// facility ignores them instead of receiving a different artifact.
|
|
109
|
+
const modelLine = CAPABILITY_NEUTRAL_MODEL_HINT_LINE;
|
|
110
|
+
const toolsLine = CAPABILITY_NEUTRAL_TOOL_RESTRICTION_LINE;
|
|
115
111
|
const dispatchDataLines = buildDispatchDataLines(params.dispatchPlanPath, params.dispatchQuotaPath, 'If a subagent reports a host session/usage limit (e.g. "hit your session limit · resets <time>") instead of submitting its result, do not immediately re-dispatch it: run merge-and-ingest with the results you did get, then wait until the stated reset time before running next-step to re-dispatch the remaining packets.', params.driverInstruction);
|
|
116
112
|
const quotaCoverageNudge = renderQuotaCoverageNudge(params.dispatchQuotaPath, params.artifactsDir);
|
|
117
113
|
const tokenBudgetView = renderTokenBudgetView(params.dispatchQuotaPath);
|
|
@@ -126,14 +122,16 @@ export function renderDispatchReviewPrompt(params) {
|
|
|
126
122
|
"",
|
|
127
123
|
renderHostScratchNote(hostScratchDir(params.artifactsDir, params.activeReviewRun.run_id)),
|
|
128
124
|
"",
|
|
125
|
+
"Execute every entry in the dispatch plan: dispatch one subagent per entry if a subagent facility exists, else read and follow each entry's `prompt_path` sequentially yourself. The same packet files and result contract apply either way.",
|
|
126
|
+
"",
|
|
129
127
|
"Subagent prompt shape:",
|
|
130
128
|
"",
|
|
131
129
|
' Read and follow the audit instructions in: <entry.prompt_path>',
|
|
132
130
|
"",
|
|
133
|
-
|
|
131
|
+
modelLine,
|
|
134
132
|
toolsLine,
|
|
135
133
|
"",
|
|
136
|
-
"Each
|
|
134
|
+
"Each packet's executor must submit through the submit command printed in its packet prompt and stop after successful submission.",
|
|
137
135
|
"",
|
|
138
136
|
"**File access pre-approval:** Each dispatch plan entry includes an `access` object with `read_paths`, `write_paths`, and `forbidden_patterns`. If your host supports per-subagent file access restrictions, pre-approve exactly `entry.access.read_paths` and `entry.access.write_paths` for each subagent. Do not grant broad workspace or task-results directory write access. Workers should not access files outside their declared paths.",
|
|
139
137
|
"",
|
|
@@ -153,46 +151,14 @@ export function renderDispatchReviewPrompt(params) {
|
|
|
153
151
|
"",
|
|
154
152
|
].join("\n");
|
|
155
153
|
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
` ${params.singleTaskPromptPath}`,
|
|
165
|
-
"",
|
|
166
|
-
"Complete exactly one AuditResult for the task named there, write the JSON array to the prompt's audit_results_path, run the exact worker_command from that prompt, then stop.",
|
|
167
|
-
"",
|
|
168
|
-
"Do not run dispatch commands, do not prepare packets, do not run next-step again in this turn, and do not read a report after the worker command.",
|
|
169
|
-
"",
|
|
170
|
-
"The only backend command allowed after writing the result is:",
|
|
171
|
-
"",
|
|
172
|
-
` ${renderCommand(params.activeReviewRun.worker_command)}`,
|
|
173
|
-
"",
|
|
174
|
-
].join("\n");
|
|
175
|
-
}
|
|
176
|
-
export function renderEdgeReasoningStepPrompt(params) {
|
|
177
|
-
return [
|
|
178
|
-
params.basePrompt,
|
|
179
|
-
...(params.rejectionNotice ? ["", params.rejectionNotice] : []),
|
|
180
|
-
"",
|
|
181
|
-
"## Results path",
|
|
182
|
-
"",
|
|
183
|
-
'Write the JSON object ({"rewrites":[{"from":"...","to":"...","kind":"...","reason":"..."}]}) to:',
|
|
184
|
-
"",
|
|
185
|
-
` ${params.resultsPath}`,
|
|
186
|
-
"",
|
|
187
|
-
`Cache key (edge-set content hash): ${params.contentHash}.`,
|
|
188
|
-
"If you already produced rewrites for this exact key, you may reuse them instead of regenerating.",
|
|
189
|
-
"",
|
|
190
|
-
`Then run: ${params.continueCommand}`,
|
|
191
|
-
"",
|
|
192
|
-
"Read and follow only the new step prompt returned by that command.",
|
|
193
|
-
"",
|
|
194
|
-
].join("\n");
|
|
195
|
-
}
|
|
154
|
+
/**
|
|
155
|
+
* Capability-neutral hint lines (design resolution 2, 2026-08-05): identical
|
|
156
|
+
* text on every host — "if your harness supports…" phrasing lets a host without
|
|
157
|
+
* the facility skip the hint instead of receiving a different artifact, so the
|
|
158
|
+
* rendered step never branches on the capability handshake.
|
|
159
|
+
*/
|
|
160
|
+
export const CAPABILITY_NEUTRAL_MODEL_HINT_LINE = "If your harness supports selecting a subagent model, map `entry.model_hint.tier` (`small`, `standard`, `deep`) to an available host model without asking the user for model names; otherwise `model_hint` is inert plan metadata — ignore it.";
|
|
161
|
+
export const CAPABILITY_NEUTRAL_TOOL_RESTRICTION_LINE = "If your harness supports per-subagent tool restriction, restrict review subagents to read/search plus the packet submit command named in their prompt (no source edit/write tools); otherwise proceed without restrictions and do not ask the user about them.";
|
|
196
162
|
export function renderEdgeReasoningDispatchPrompt(params) {
|
|
197
163
|
return [
|
|
198
164
|
"# audit-code edge reasoning (subagent dispatch)",
|
|
@@ -202,7 +168,7 @@ export function renderEdgeReasoningDispatchPrompt(params) {
|
|
|
202
168
|
"optional pass: it only rewrites the `reason` string of those edges — it never",
|
|
203
169
|
"adds, removes, re-targets, or re-weights an edge.",
|
|
204
170
|
"",
|
|
205
|
-
"
|
|
171
|
+
"Execute the ONE lane prompt file below: dispatch one subagent to read and follow it if a subagent facility exists, else read and follow it yourself. The same file and result path apply either way.",
|
|
206
172
|
"",
|
|
207
173
|
DISPATCH_PROMPT_HANDOFF_NOTE,
|
|
208
174
|
"",
|
|
@@ -212,7 +178,7 @@ export function renderEdgeReasoningDispatchPrompt(params) {
|
|
|
212
178
|
"",
|
|
213
179
|
" Read and follow the edge-reasoning instructions in: <prompt path above>",
|
|
214
180
|
"",
|
|
215
|
-
'The
|
|
181
|
+
'The executor must write its JSON result ({"rewrites":[...]}) to:',
|
|
216
182
|
"",
|
|
217
183
|
` ${params.resultsPath}`,
|
|
218
184
|
"",
|
|
@@ -241,18 +207,17 @@ export function renderEdgeReasoningDispatchPrompt(params) {
|
|
|
241
207
|
export function renderRollingDispatchPrompt(params) {
|
|
242
208
|
const mergeCommand = mergeAndIngestCommand(params.artifactsDir, params.runId);
|
|
243
209
|
const continueCommand = nextStepCommand(params.root, params.artifactsDir, params.hostDescriptor);
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
const toolsLine = params.hostCanRestrictSubagentTools
|
|
248
|
-
? "Restrict review subagents to read/search tools plus a Write tool scoped to their own `entry.result_path` (they write exactly that one results file and run no shell commands). Do not give them source edit tools."
|
|
249
|
-
: "Do not ask the user about per-subagent tool restrictions; this host did not report a callable restriction facility.";
|
|
210
|
+
// Capability-neutral (design resolution 2): identical text on every host.
|
|
211
|
+
const modelLine = CAPABILITY_NEUTRAL_MODEL_HINT_LINE;
|
|
212
|
+
const toolsLine = "If your harness supports per-subagent tool restriction, restrict review subagents to read/search tools plus a Write tool scoped to their own `entry.result_path` (they write exactly that one results file and run no shell commands; no source edit tools); otherwise proceed without restrictions and do not ask the user about them.";
|
|
250
213
|
const dispatchDataLines = buildDispatchDataLines(params.dispatchPlanPath, params.dispatchQuotaPath, 'If a subagent reports a host session/usage limit instead of emitting its result, run merge-and-ingest with the results you did get, then wait until the stated reset time before running next-step to re-dispatch the remaining packets.', params.driverInstruction);
|
|
251
214
|
return [
|
|
252
215
|
"# audit-code rolling dispatch",
|
|
253
216
|
"",
|
|
254
217
|
...dispatchDataLines,
|
|
255
218
|
"",
|
|
219
|
+
"Execute every entry in the dispatch plan: dispatch one subagent per entry if a subagent facility exists, else read and follow each entry's `prompt_path` sequentially yourself. The same packet files and result contract apply either way.",
|
|
220
|
+
"",
|
|
256
221
|
DISPATCH_PROMPT_HANDOFF_NOTE,
|
|
257
222
|
"",
|
|
258
223
|
renderHostScratchNote(hostScratchDir(params.artifactsDir, params.runId)),
|
|
@@ -281,7 +246,7 @@ export function renderRollingDispatchPrompt(params) {
|
|
|
281
246
|
"capped at a conservative cold-start batch. Skip it if your host reports no",
|
|
282
247
|
"per-dispatch usage figure.",
|
|
283
248
|
"",
|
|
284
|
-
|
|
249
|
+
modelLine,
|
|
285
250
|
toolsLine,
|
|
286
251
|
"",
|
|
287
252
|
"**File access pre-approval:** Each dispatch plan entry includes an `access` object. If your host supports per-subagent file access restrictions, pre-approve exactly `entry.access.read_paths` for reading and grant write access to that subagent's `entry.result_path` (the one file it writes). Do not grant broader workspace or task-results directory write access.",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompts.js","sourceRoot":"","sources":["../../../src/audit/cli/prompts.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,4BAA4B,EAC5B,qBAAqB,EACrB,cAAc,EACd,wBAAwB,EACxB,qBAAqB,EACrB,wBAAwB,GAGzB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE1C;;;;;;;GAOG;AACH,SAAS,mBAAmB;IAC1B,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC;IAC9C,IAAI,GAAG,EAAE,CAAC;QACR,IAAI,CAAC;YACH,MAAM,MAAM,GAAY,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACxC,IACE,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;gBACrB,MAAM,CA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activeReviewRun: ActiveReviewRun;
|
|
8
|
-
hostCanDispatch: boolean;
|
|
9
8
|
hostMaxActiveSubagents: number | null;
|
|
10
9
|
/** Context window the host reports for its dispatch model (handshake). */
|
|
11
10
|
hostContextTokens?: number | null;
|
|
@@ -25,8 +24,6 @@ export declare function renderSemanticReviewStep(params: {
|
|
|
25
24
|
* (spec/unified-dispatch-worker-model.md, [[capability-is-per-auditor-not-per-audit]]).
|
|
26
25
|
*/
|
|
27
26
|
descriptor: AuditorDescriptor;
|
|
28
|
-
hostCanRestrictSubagentTools: boolean;
|
|
29
|
-
hostCanSelectSubagentModel: boolean;
|
|
30
27
|
/** Which executor selected this step; controls prompt variant. */
|
|
31
28
|
selectedExecutor?: string | null;
|
|
32
29
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"semanticReviewStep.d.ts","sourceRoot":"","sources":["../../../src/audit/cli/semanticReviewStep.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"semanticReviewStep.d.ts","sourceRoot":"","sources":["../../../src/audit/cli/semanticReviewStep.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAElF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAExE,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAyB9C,wBAAsB,wBAAwB,CAAC,MAAM,EAAE;IACrD,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,eAAe,CAAC;IACjC,sBAAsB,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,0EAA0E;IAC1E,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,sEAAsE;IACtE,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,0EAA0E;IAC1E,eAAe,CAAC,EAAE,oBAAoB,EAAE,GAAG,IAAI,CAAC;IAChD,2EAA2E;IAC3E,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B;;;;;;;;OAQG;IACH,UAAU,EAAE,iBAAiB,CAAC;IAC9B,kEAAkE;IAClE,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC,GAAG,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,CAAC,CAoLxD"}
|
|
@@ -1,49 +1,27 @@
|
|
|
1
|
-
import { join } from "node:path";
|
|
2
1
|
import { resolveSessionConfig, renderHostWallExplanation } from "audit-tools/shared";
|
|
3
2
|
import { loadSessionConfig } from "../supervisor/sessionConfig.js";
|
|
4
|
-
import { renderCommand } from "./args.js";
|
|
5
3
|
import { writeCurrentStep } from "./steps.js";
|
|
6
|
-
import { mergeAndIngestCommand, nextStepCommand, renderDispatchReviewPrompt,
|
|
4
|
+
import { mergeAndIngestCommand, nextStepCommand, renderDispatchReviewPrompt, } from "./prompts.js";
|
|
7
5
|
import { prepareDispatchArtifacts } from "./dispatch.js";
|
|
8
6
|
import { packageRoot } from "./paths.js";
|
|
9
|
-
// Renders the actionable semantic-review step
|
|
10
|
-
//
|
|
11
|
-
//
|
|
12
|
-
//
|
|
13
|
-
//
|
|
7
|
+
// Renders the actionable semantic-review step and writes
|
|
8
|
+
// steps/current-step.json, so the backend produces the actionable step itself
|
|
9
|
+
// rather than handing the host a second command.
|
|
10
|
+
//
|
|
11
|
+
// ALWAYS-MATERIALIZED (design resolution 2, 2026-08-05): there is no capability
|
|
12
|
+
// branch here. Every host — subagent-capable or not — receives the SAME
|
|
13
|
+
// materialized dispatch step (packet prompt files on disk, dispatch plan in
|
|
14
|
+
// artifact_paths) with a capability-neutral prompt; a host with no subagent
|
|
15
|
+
// facility executes the packets sequentially itself. A handshake-less host is
|
|
16
|
+
// sized degenerately (one task per packet, no fit claim) rather than refused —
|
|
17
|
+
// see `buildDispatchPool`. The retired `single_task_fallback` step kind was
|
|
18
|
+
// this branch's other arm; the smoke-flow ambiguity it caused (a capable host
|
|
19
|
+
// silently landing on the fallback) is structurally gone with it.
|
|
14
20
|
//
|
|
15
21
|
// When selectedExecutor is 'rolling_dispatch_executor', uses the rolling
|
|
16
22
|
// dispatch prompt (inline AuditResult[] emit, no submit-packet shell command).
|
|
17
23
|
export async function renderSemanticReviewStep(params) {
|
|
18
24
|
const { root, artifactsDir, activeReviewRun } = params;
|
|
19
|
-
if (!params.hostCanDispatch) {
|
|
20
|
-
const singleTaskPromptPath = join(artifactsDir, "dispatch", "current-single-task-prompt.md");
|
|
21
|
-
const workerCommand = renderCommand(activeReviewRun.worker_command);
|
|
22
|
-
return writeCurrentStep({
|
|
23
|
-
artifactsDir,
|
|
24
|
-
stepKind: "single_task_fallback",
|
|
25
|
-
status: "ready",
|
|
26
|
-
runId: activeReviewRun.run_id,
|
|
27
|
-
allowedCommands: [workerCommand],
|
|
28
|
-
stopCondition: "Run the exact worker_command after one result, then stop without looping.",
|
|
29
|
-
repoRoot: root,
|
|
30
|
-
artifactPaths: {
|
|
31
|
-
active_review_task: activeReviewRun.task_path,
|
|
32
|
-
active_review_prompt: activeReviewRun.prompt_path,
|
|
33
|
-
pending_audit_tasks: activeReviewRun.pending_audit_tasks_path ?? null,
|
|
34
|
-
audit_results: activeReviewRun.audit_results_path,
|
|
35
|
-
single_task_prompt: singleTaskPromptPath,
|
|
36
|
-
},
|
|
37
|
-
prompt: renderSingleTaskFallbackStepPrompt({
|
|
38
|
-
singleTaskPromptPath,
|
|
39
|
-
activeReviewRun,
|
|
40
|
-
}),
|
|
41
|
-
access: {
|
|
42
|
-
read_paths: [singleTaskPromptPath],
|
|
43
|
-
write_paths: [activeReviewRun.audit_results_path],
|
|
44
|
-
},
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
25
|
// Fail closed: an invalid/tampered session-config must abort the step, never
|
|
48
26
|
// silently degrade to an empty (permissive) default. `loadSessionConfig`
|
|
49
27
|
// throws on a config that fails validation (e.g. a spoofed provider or a
|
|
@@ -201,8 +179,6 @@ export async function renderSemanticReviewStep(params) {
|
|
|
201
179
|
// The quota artifact remains diagnostic, but its admission subset is not
|
|
202
180
|
// an instruction: host/relay own the complete packet fan-out.
|
|
203
181
|
dispatchQuotaPath: null,
|
|
204
|
-
hostCanRestrictSubagentTools: params.hostCanRestrictSubagentTools,
|
|
205
|
-
hostCanSelectSubagentModel: params.hostCanSelectSubagentModel,
|
|
206
182
|
hostDescriptor,
|
|
207
183
|
}),
|
|
208
184
|
access: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"semanticReviewStep.js","sourceRoot":"","sources":["../../../src/audit/cli/semanticReviewStep.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"semanticReviewStep.js","sourceRoot":"","sources":["../../../src/audit/cli/semanticReviewStep.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAErF,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EACL,qBAAqB,EACrB,eAAe,EACf,0BAA0B,GAC3B,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,yDAAyD;AACzD,8EAA8E;AAC9E,iDAAiD;AACjD,EAAE;AACF,gFAAgF;AAChF,wEAAwE;AACxE,4EAA4E;AAC5E,4EAA4E;AAC5E,8EAA8E;AAC9E,+EAA+E;AAC/E,4EAA4E;AAC5E,8EAA8E;AAC9E,kEAAkE;AAClE,EAAE;AACF,yEAAyE;AACzE,+EAA+E;AAC/E,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAAC,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AG,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;aACxE;YACD,WAAW,EAAE,EAAE;SAChB;KACF,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -2,7 +2,7 @@ import { z } from "zod";
|
|
|
2
2
|
import type { StepStatus } from "audit-tools/shared";
|
|
3
3
|
import type { AccessDeclaration } from "../types/workerSession.js";
|
|
4
4
|
export declare const STEP_CONTRACT_VERSION = "audit-code-step/v1alpha1";
|
|
5
|
-
export declare const StepKindSchema: z.ZodEnum<["dispatch_review", "
|
|
5
|
+
export declare const StepKindSchema: z.ZodEnum<["dispatch_review", "design_review", "design_review_parallel", "design_review_contract", "design_review_conceptual", "charter_extraction", "charter_delta", "charter_clarification", "systemic_challenge", "confirm_intent", "intent_equivalence", "analyzer_install", "edge_reasoning_dispatch", "critical_flow_fallback", "synthesis_narrative", "present_report", "blocked"]>;
|
|
6
6
|
export type StepKind = z.infer<typeof StepKindSchema>;
|
|
7
7
|
/**
|
|
8
8
|
* Lightweight run-level orientation surfaced in the step contract so a host
|
|
@@ -54,7 +54,7 @@ export declare const StepProgressSchema: z.ZodObject<{
|
|
|
54
54
|
export type StepProgress = z.infer<typeof StepProgressSchema>;
|
|
55
55
|
export declare const StepArtifactSchema: z.ZodObject<{
|
|
56
56
|
contract_version: z.ZodLiteral<"audit-code-step/v1alpha1">;
|
|
57
|
-
step_kind: z.ZodEnum<["dispatch_review", "
|
|
57
|
+
step_kind: z.ZodEnum<["dispatch_review", "design_review", "design_review_parallel", "design_review_contract", "design_review_conceptual", "charter_extraction", "charter_delta", "charter_clarification", "systemic_challenge", "confirm_intent", "intent_equivalence", "analyzer_install", "edge_reasoning_dispatch", "critical_flow_fallback", "synthesis_narrative", "present_report", "blocked"]>;
|
|
58
58
|
prompt_path: z.ZodString;
|
|
59
59
|
status: z.ZodEnum<["ready", "blocked", "complete"]>;
|
|
60
60
|
run_id: z.ZodNullable<z.ZodString>;
|
|
@@ -135,7 +135,7 @@ export declare const StepArtifactSchema: z.ZodObject<{
|
|
|
135
135
|
repo_root: string;
|
|
136
136
|
artifacts_dir: string;
|
|
137
137
|
prompt_path: string;
|
|
138
|
-
step_kind: "blocked" | "design_review" | "charter_clarification" | "systemic_challenge" | "critical_flow_fallback" | "synthesis_narrative" | "
|
|
138
|
+
step_kind: "blocked" | "design_review" | "charter_clarification" | "systemic_challenge" | "critical_flow_fallback" | "synthesis_narrative" | "charter_extraction" | "charter_delta" | "dispatch_review" | "design_review_parallel" | "design_review_contract" | "design_review_conceptual" | "confirm_intent" | "intent_equivalence" | "analyzer_install" | "edge_reasoning_dispatch" | "present_report";
|
|
139
139
|
allowed_commands: string[];
|
|
140
140
|
stop_condition: string;
|
|
141
141
|
artifact_paths: Record<string, string | null>;
|
|
@@ -163,7 +163,7 @@ export declare const StepArtifactSchema: z.ZodObject<{
|
|
|
163
163
|
repo_root: string;
|
|
164
164
|
artifacts_dir: string;
|
|
165
165
|
prompt_path: string;
|
|
166
|
-
step_kind: "blocked" | "design_review" | "charter_clarification" | "systemic_challenge" | "critical_flow_fallback" | "synthesis_narrative" | "
|
|
166
|
+
step_kind: "blocked" | "design_review" | "charter_clarification" | "systemic_challenge" | "critical_flow_fallback" | "synthesis_narrative" | "charter_extraction" | "charter_delta" | "dispatch_review" | "design_review_parallel" | "design_review_contract" | "design_review_conceptual" | "confirm_intent" | "intent_equivalence" | "analyzer_install" | "edge_reasoning_dispatch" | "present_report";
|
|
167
167
|
allowed_commands: string[];
|
|
168
168
|
stop_condition: string;
|
|
169
169
|
artifact_paths: Record<string, string | null>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"steps.d.ts","sourceRoot":"","sources":["../../../src/audit/cli/steps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,o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,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D;;;;;;;;;;GAUG;AACH,wBAAsB,gBAAgB,CAAC,MAAM,EAAE;IAC7C,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,QAAQ,CAAC;IACnB,MAAM,EAAE,UAAU,CAAC;IACnB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,CAAC;IAC7C,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,iBAAiB,CAAC;CAC5B,GAAG,OAAO,CAAC,YAAY,CAAC,CAsBxB"}
|
package/dist/audit/cli/steps.js
CHANGED
|
@@ -3,7 +3,6 @@ import { writeStepContract, StepStatusSchema, AccessDeclarationSchema, } from "a
|
|
|
3
3
|
export const STEP_CONTRACT_VERSION = "audit-code-step/v1alpha1";
|
|
4
4
|
export const StepKindSchema = z.enum([
|
|
5
5
|
"dispatch_review",
|
|
6
|
-
"single_task_fallback",
|
|
7
6
|
"design_review",
|
|
8
7
|
"design_review_parallel",
|
|
9
8
|
"design_review_contract",
|
|
@@ -15,7 +14,6 @@ export const StepKindSchema = z.enum([
|
|
|
15
14
|
"confirm_intent",
|
|
16
15
|
"intent_equivalence",
|
|
17
16
|
"analyzer_install",
|
|
18
|
-
"edge_reasoning",
|
|
19
17
|
"edge_reasoning_dispatch",
|
|
20
18
|
"critical_flow_fallback",
|
|
21
19
|
"synthesis_narrative",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"steps.js","sourceRoot":"","sources":["../../../src/audit/cli/steps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,uBAAuB,GACxB,MAAM,oBAAoB,CAAC;AAI5B,MAAM,CAAC,MAAM,qBAAqB,GAAG,0BAA0B,CAAC;AAEhE,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,IAAI,CAAC;IACnC,iBAAiB;IACjB,
|
|
1
|
+
{"version":3,"file":"steps.js","sourceRoot":"","sources":["../../../src/audit/cli/steps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,uBAAuB,GACxB,MAAM,oBAAoB,CAAC;AAI5B,MAAM,CAAC,MAAM,qBAAqB,GAAG,0BAA0B,CAAC;AAEhE,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,IAAI,CAAC;IACnC,iBAAiB;IACjB,eAAe;IACf,wBAAwB;IACxB,wBAAwB;IACxB,0BAA0B;IAC1B,oBAAoB;IACpB,eAAe;IACf,uBAAuB;IACvB,oBAAoB;IACpB,gBAAgB;IAChB,oBAAoB;IACpB,kBAAkB;IAClB,yBAAyB;IACzB,wBAAwB;IACxB,qBAAqB;IACrB,gBAAgB;IAChB,SAAS;CACV,CAAC,CAAC;AAGH;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC;KAChC,MAAM,CAAC;IACN,qEAAqE;IACrE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,0EAA0E;IAC1E,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IAC5C,kDAAkD;IAClD,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IAC1C,uEAAuE;IACvE,eAAe,EAAE,CAAC,CAAC,MAAM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ignReviewOptions {
|
|
5
5
|
max_units?: number;
|
|
6
6
|
conceptual_depth?: "shallow" | "deep";
|
|
7
|
-
/**
|
|
8
|
-
* Whether the host can dispatch independent sub-agents. Threaded from the
|
|
9
|
-
* resolved `host_can_dispatch_subagents` handshake (`resolveHostDispatchCapability`),
|
|
10
|
-
* NOT a manual flag. Parity with the remediate contract pipeline: the
|
|
11
|
-
* adversarial design-review passes (contract-assessment / conceptual-critique)
|
|
12
|
-
* MANDATE an independent sub-agent reviewer when true and degrade to an
|
|
13
|
-
* explicit inline self-review instruction when false. Fail-safe: when omitted,
|
|
14
|
-
* the mandate is rendered.
|
|
15
|
-
*/
|
|
16
|
-
hostCanDispatchSubagents?: boolean;
|
|
17
7
|
}
|
|
18
8
|
/**
|
|
19
9
|
* Render the independent-reviewer directive shared by the audit-side adversarial
|
|
20
|
-
* review prompts,
|
|
21
|
-
*
|
|
22
|
-
*
|
|
10
|
+
* review prompts. LANE-CLASS-conditional, never capability-conditional (design
|
|
11
|
+
* resolution 2, gate-resolved 2026-08-05): one capability-neutral text carries
|
|
12
|
+
* both the mandate and the explicitly-degraded no-subagent fallback — the
|
|
13
|
+
* shared `renderIndependentReviewMandate`, single-sourced with the remediate
|
|
14
|
+
* contract pipeline's adversarial phases.
|
|
23
15
|
*/
|
|
24
|
-
export declare function renderIndependentReviewerDirective(
|
|
16
|
+
export declare function renderIndependentReviewerDirective(): string[];
|
|
25
17
|
/**
|
|
26
18
|
* A conceptual-review perspective: a deliberately narrow value system one
|
|
27
19
|
* independent reviewer adopts. The deep conceptual pass fans these out to real
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"designReviewPrompt.d.ts","sourceRoot":"","sources":["../../../src/audit/orchestrator/designReviewPrompt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"designReviewPrompt.d.ts","sourceRoot":"","sources":["../../../src/audit/orchestrator/designRe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wB,GAChC,MAAM,CAkBR;AAED;;;;;;GAMG;AACH,wBAAgB,iCAAiC,CAC/C,MAAM,EAAE,cAAc,EACtB,WAAW,EAAE,qBAAqB,EAClC,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,OAAO,GAAE,mBAAwB,GAChC,MAAM,CAwBR;AAED;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CACzC,kBAAkB,EAAE,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,GACxD,MAAM,CA8BR;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,cAAc,EACtB,OAAO,GAAE,mBAAwB,GAChC,MAAM,CA6CR"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { charterReviewDisposition } from "audit-tools/shared";
|
|
1
|
+
import { charterReviewDisposition, renderIndependentReviewMandate, } from "audit-tools/shared";
|
|
2
2
|
import { deriveUnitScopeDisposition, } from "./intentScopeDisposition.js";
|
|
3
3
|
export { deriveUnitScopeDisposition };
|
|
4
4
|
/** Render the `[in scope]` / `[excluded: reason]` tag for a unit disposition. */
|
|
@@ -134,28 +134,14 @@ function formatDeterministicFindings(findings, max = 20) {
|
|
|
134
134
|
}
|
|
135
135
|
/**
|
|
136
136
|
* Render the independent-reviewer directive shared by the audit-side adversarial
|
|
137
|
-
* review prompts,
|
|
138
|
-
*
|
|
139
|
-
*
|
|
137
|
+
* review prompts. LANE-CLASS-conditional, never capability-conditional (design
|
|
138
|
+
* resolution 2, gate-resolved 2026-08-05): one capability-neutral text carries
|
|
139
|
+
* both the mandate and the explicitly-degraded no-subagent fallback — the
|
|
140
|
+
* shared `renderIndependentReviewMandate`, single-sourced with the remediate
|
|
141
|
+
* contract pipeline's adversarial phases.
|
|
140
142
|
*/
|
|
141
|
-
export function renderIndependentReviewerDirective(
|
|
142
|
-
|
|
143
|
-
// dispatch opts out by passing false explicitly.
|
|
144
|
-
const mandate = hostCanDispatchSubagents !== false;
|
|
145
|
-
if (mandate) {
|
|
146
|
-
return [
|
|
147
|
-
"## Independent review — MANDATORY",
|
|
148
|
-
"",
|
|
149
|
-
"This is an adversarial review: its value comes from a reviewer who is **not** the author of the design under review. You MUST dispatch this review to a fresh, independent sub-agent that did not author the work and does not see the author's reasoning. An author grading their own work systematically misses the gaps this pass exists to catch. Do NOT perform this review inline yourself.",
|
|
150
|
-
"",
|
|
151
|
-
];
|
|
152
|
-
}
|
|
153
|
-
return [
|
|
154
|
-
"## Independent review — degraded to inline self-review",
|
|
155
|
-
"",
|
|
156
|
-
"This host reported it cannot dispatch an independent sub-agent, so this adversarial review runs inline. Compensate deliberately: adopt a fresh adversarial stance, set aside the author's reasoning, and attack the design as a hostile outside reviewer would. (When sub-agent dispatch is available this review is MANDATED to an independent agent — inline self-review is the degraded fallback, not the intended path.)",
|
|
157
|
-
"",
|
|
158
|
-
];
|
|
143
|
+
export function renderIndependentReviewerDirective() {
|
|
144
|
+
return [renderIndependentReviewMandate().trim(), ""];
|
|
159
145
|
}
|
|
160
146
|
/**
|
|
161
147
|
* Built-in conceptual perspectives, ordered most-to-least commonly useful. The
|
|
@@ -521,7 +507,7 @@ export function renderDesignReviewPrompt(bundle, options = {}) {
|
|
|
521
507
|
"You are reviewing the overall design of this project. The deterministic audit pipeline has already analyzed the codebase structure. Your job is to provide qualitative observations in two distinct modes: contract assessment for inferred or existing project contracts, and conceptual design critique for broader architecture ideas that static analysis cannot produce.",
|
|
522
508
|
"",
|
|
523
509
|
renderSharedStructuralContext(bundle, maxUnits),
|
|
524
|
-
...renderIndependentReviewerDirective(
|
|
510
|
+
...renderIndependentReviewerDirective(),
|
|
525
511
|
"## What to assess",
|
|
526
512
|
"",
|
|
527
513
|
`Focus on the ${maxUnits} highest-risk units listed above; you need not read the entire repository, though you may follow any thread that demands more context. Produce findings about:`,
|