audit-tools 0.52.0 → 0.52.1
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/auditStep.d.ts.map +1 -1
- package/dist/audit/cli/auditStep.js +2 -2
- package/dist/audit/cli/auditStep.js.map +1 -1
- package/dist/audit/cli/charterClarificationPrompt.d.ts +16 -8
- package/dist/audit/cli/charterClarificationPrompt.d.ts.map +1 -1
- package/dist/audit/cli/charterClarificationPrompt.js +95 -42
- package/dist/audit/cli/charterClarificationPrompt.js.map +1 -1
- package/dist/audit/cli/charterComparisonPrompt.d.ts +16 -6
- package/dist/audit/cli/charterComparisonPrompt.d.ts.map +1 -1
- package/dist/audit/cli/charterComparisonPrompt.js +76 -29
- package/dist/audit/cli/charterComparisonPrompt.js.map +1 -1
- package/dist/audit/cli/charterExtractionPrompt.d.ts +5 -4
- package/dist/audit/cli/charterExtractionPrompt.d.ts.map +1 -1
- package/dist/audit/cli/charterExtractionPrompt.js +64 -42
- package/dist/audit/cli/charterExtractionPrompt.js.map +1 -1
- package/dist/audit/cli/charterFidelityPrompt.d.ts +17 -4
- package/dist/audit/cli/charterFidelityPrompt.d.ts.map +1 -1
- package/dist/audit/cli/charterFidelityPrompt.js +72 -21
- package/dist/audit/cli/charterFidelityPrompt.js.map +1 -1
- package/dist/audit/cli/dispatch/hostHandoff.d.ts +23 -1
- package/dist/audit/cli/dispatch/hostHandoff.d.ts.map +1 -1
- package/dist/audit/cli/dispatch/hostHandoff.js +204 -41
- package/dist/audit/cli/dispatch/hostHandoff.js.map +1 -1
- package/dist/audit/cli/dispatch/packetFilter.d.ts +8 -0
- package/dist/audit/cli/dispatch/packetFilter.d.ts.map +1 -1
- package/dist/audit/cli/fanoutLanes.d.ts.map +1 -1
- package/dist/audit/cli/fanoutLanes.js +20 -4
- package/dist/audit/cli/fanoutLanes.js.map +1 -1
- package/dist/audit/cli/laneValidators.d.ts +19 -7
- package/dist/audit/cli/laneValidators.d.ts.map +1 -1
- package/dist/audit/cli/laneValidators.js +73 -18
- package/dist/audit/cli/laneValidators.js.map +1 -1
- package/dist/audit/cli/nextStepCommand.d.ts.map +1 -1
- package/dist/audit/cli/nextStepCommand.js +13 -6
- package/dist/audit/cli/nextStepCommand.js.map +1 -1
- package/dist/audit/cli/nextStepHelpers.d.ts +25 -2
- package/dist/audit/cli/nextStepHelpers.d.ts.map +1 -1
- package/dist/audit/cli/nextStepHelpers.js +105 -35
- package/dist/audit/cli/nextStepHelpers.js.map +1 -1
- package/dist/audit/cli/recoverSubmissionCommand.d.ts.map +1 -1
- package/dist/audit/cli/recoverSubmissionCommand.js +89 -4
- package/dist/audit/cli/recoverSubmissionCommand.js.map +1 -1
- package/dist/audit/cli/sampleRunCommand.d.ts +10 -0
- package/dist/audit/cli/sampleRunCommand.d.ts.map +1 -1
- package/dist/audit/cli/semanticReviewStep.d.ts +4 -4
- package/dist/audit/cli/semanticReviewStep.d.ts.map +1 -1
- package/dist/audit/cli/semanticReviewStep.js +35 -71
- package/dist/audit/cli/semanticReviewStep.js.map +1 -1
- package/dist/audit/contracts/findingContractPrompt.d.ts.map +1 -1
- package/dist/audit/contracts/findingContractPrompt.js +7 -1
- package/dist/audit/contracts/findingContractPrompt.js.map +1 -1
- package/dist/audit/contracts/workerSchemas.d.ts +280 -4
- package/dist/audit/contracts/workerSchemas.d.ts.map +1 -1
- package/dist/audit/contracts/workerSchemas.js +24 -2
- package/dist/audit/contracts/workerSchemas.js.map +1 -1
- package/dist/audit/orchestrator/charterClarificationExecutor.d.ts.map +1 -1
- package/dist/audit/orchestrator/charterClarificationExecutor.js +39 -0
- package/dist/audit/orchestrator/charterClarificationExecutor.js.map +1 -1
- package/dist/audit/orchestrator/charterExtractionExecutor.d.ts +12 -5
- package/dist/audit/orchestrator/charterExtractionExecutor.d.ts.map +1 -1
- package/dist/audit/orchestrator/charterExtractionExecutor.js +39 -9
- package/dist/audit/orchestrator/charterExtractionExecutor.js.map +1 -1
- package/dist/audit/orchestrator/designReviewPrompt.d.ts +7 -0
- package/dist/audit/orchestrator/designReviewPrompt.d.ts.map +1 -1
- package/dist/audit/orchestrator/designReviewPrompt.js +174 -19
- package/dist/audit/orchestrator/designReviewPrompt.js.map +1 -1
- package/dist/audit/orchestrator/intentCheckpointGate.d.ts.map +1 -1
- package/dist/audit/orchestrator/intentCheckpointGate.js +1 -5
- package/dist/audit/orchestrator/intentCheckpointGate.js.map +1 -1
- package/dist/audit/orchestrator/requeueCommand.d.ts +8 -0
- package/dist/audit/orchestrator/requeueCommand.d.ts.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/lensVerification.d.ts.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/lensVerification.js +94 -71
- package/dist/audit/orchestrator/selectiveDeepening/lensVerification.js.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/shared.d.ts +0 -2
- package/dist/audit/orchestrator/selectiveDeepening/shared.d.ts.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/shared.js +9 -2
- package/dist/audit/orchestrator/selectiveDeepening/shared.js.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/stewardFollowup.d.ts.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/stewardFollowup.js +28 -4
- package/dist/audit/orchestrator/selectiveDeepening/stewardFollowup.js.map +1 -1
- package/dist/audit/reporting/synthesis.d.ts +16 -3
- package/dist/audit/reporting/synthesis.d.ts.map +1 -1
- package/dist/audit/reporting/synthesis.js +40 -11
- package/dist/audit/reporting/synthesis.js.map +1 -1
- package/dist/audit/reporting/synthesisNarrativePrompt.d.ts +26 -1
- package/dist/audit/reporting/synthesisNarrativePrompt.d.ts.map +1 -1
- package/dist/audit/reporting/synthesisNarrativePrompt.js +53 -13
- package/dist/audit/reporting/synthesisNarrativePrompt.js.map +1 -1
- package/dist/audit/systemic/secondOrderAdversaryPrompt.d.ts.map +1 -1
- package/dist/audit/systemic/secondOrderAdversaryPrompt.js +67 -40
- package/dist/audit/systemic/secondOrderAdversaryPrompt.js.map +1 -1
- package/dist/audit/systemic/systemicChallengeLoop.d.ts.map +1 -1
- package/dist/audit/systemic/systemicChallengeLoop.js +13 -1
- package/dist/audit/systemic/systemicChallengeLoop.js.map +1 -1
- package/dist/audit/types/conceptualAdjudication.d.ts +26 -2
- package/dist/audit/types/conceptualAdjudication.d.ts.map +1 -1
- package/dist/audit/types/conceptualAdjudication.js +26 -7
- package/dist/audit/types/conceptualAdjudication.js.map +1 -1
- package/dist/audit/types.d.ts +279 -0
- package/dist/audit/types.d.ts.map +1 -1
- package/dist/audit/types.js +52 -0
- package/dist/audit/types.js.map +1 -1
- package/dist/audit/validation/auditResults.d.ts.map +1 -1
- package/dist/audit/validation/auditResults.js +51 -6
- package/dist/audit/validation/auditResults.js.map +1 -1
- package/dist/audit/validation/ingestIssueCodes.d.ts +3 -1
- package/dist/audit/validation/ingestIssueCodes.d.ts.map +1 -1
- package/dist/audit/validation/ingestIssueCodes.js +27 -15
- package/dist/audit/validation/ingestIssueCodes.js.map +1 -1
- package/dist/remediate/contractPipeline/sketchSource.d.ts +13 -3
- package/dist/remediate/contractPipeline/sketchSource.d.ts.map +1 -1
- package/dist/remediate/contractPipeline/sketchSource.js +14 -8
- package/dist/remediate/contractPipeline/sketchSource.js.map +1 -1
- package/dist/remediate/intake.d.ts +140 -36
- package/dist/remediate/intake.d.ts.map +1 -1
- package/dist/remediate/intake.js +159 -38
- package/dist/remediate/intake.js.map +1 -1
- package/dist/remediate/intent/checkpointFilter.d.ts +1 -2
- package/dist/remediate/intent/checkpointFilter.d.ts.map +1 -1
- package/dist/remediate/intent/checkpointFilter.js +1 -5
- package/dist/remediate/intent/checkpointFilter.js.map +1 -1
- package/dist/remediate/phases/close.d.ts.map +1 -1
- package/dist/remediate/phases/close.js +2 -2
- package/dist/remediate/phases/close.js.map +1 -1
- package/dist/remediate/phases/plan.d.ts +1 -1
- package/dist/remediate/review/reviewGate.d.ts +68 -39
- package/dist/remediate/review/reviewGate.d.ts.map +1 -1
- package/dist/remediate/review/reviewGate.js +133 -50
- package/dist/remediate/review/reviewGate.js.map +1 -1
- package/dist/remediate/state/store.d.ts +1 -2
- package/dist/remediate/state/store.d.ts.map +1 -1
- package/dist/remediate/state/store.js +124 -3
- package/dist/remediate/state/store.js.map +1 -1
- package/dist/remediate/state/types.d.ts +28 -4
- package/dist/remediate/state/types.d.ts.map +1 -1
- package/dist/remediate/state/types.js.map +1 -1
- package/dist/remediate/steps/contractPipeline.d.ts +17 -1
- package/dist/remediate/steps/contractPipeline.d.ts.map +1 -1
- package/dist/remediate/steps/contractPipeline.js +100 -52
- package/dist/remediate/steps/contractPipeline.js.map +1 -1
- package/dist/remediate/steps/contractPipelinePrompts.d.ts +32 -8
- package/dist/remediate/steps/contractPipelinePrompts.d.ts.map +1 -1
- package/dist/remediate/steps/contractPipelinePrompts.js +145 -131
- package/dist/remediate/steps/contractPipelinePrompts.js.map +1 -1
- package/dist/remediate/steps/dispatch/hostHandoff.d.ts +6 -4
- package/dist/remediate/steps/dispatch/hostHandoff.d.ts.map +1 -1
- package/dist/remediate/steps/dispatch/hostHandoff.js +291 -155
- package/dist/remediate/steps/dispatch/hostHandoff.js.map +1 -1
- package/dist/remediate/steps/intakeResolver.d.ts +1 -1
- package/dist/remediate/steps/intakeResolver.d.ts.map +1 -1
- package/dist/remediate/steps/intakeResolver.js +50 -49
- 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 +315 -288
- package/dist/remediate/steps/nextStep.js.map +1 -1
- package/dist/remediate/steps/prompts.d.ts +10 -3
- package/dist/remediate/steps/prompts.d.ts.map +1 -1
- package/dist/remediate/steps/prompts.js +191 -228
- package/dist/remediate/steps/prompts.js.map +1 -1
- package/dist/remediate/steps/types.d.ts +2 -2
- package/dist/remediate/steps/types.d.ts.map +1 -1
- package/dist/remediate/steps/types.js +10 -3
- package/dist/remediate/steps/types.js.map +1 -1
- package/dist/remediate/validation/artifacts.d.ts.map +1 -1
- package/dist/remediate/validation/artifacts.js +5 -22
- package/dist/remediate/validation/artifacts.js.map +1 -1
- package/dist/remediate/validation/contractPipeline.d.ts.map +1 -1
- package/dist/remediate/validation/contractPipeline.js +25 -8
- package/dist/remediate/validation/contractPipeline.js.map +1 -1
- package/dist/remediate/validation/remediationState.d.ts +0 -1
- package/dist/remediate/validation/remediationState.d.ts.map +1 -1
- package/dist/remediate/validation/remediationState.js +1 -20
- package/dist/remediate/validation/remediationState.js.map +1 -1
- package/dist/shared/decompose/charterClarification.d.ts +7 -0
- package/dist/shared/decompose/charterClarification.d.ts.map +1 -1
- package/dist/shared/decompose/charterClarification.js +8 -1
- package/dist/shared/decompose/charterClarification.js.map +1 -1
- package/dist/shared/decompose/charterExtraction.d.ts +204 -16
- package/dist/shared/decompose/charterExtraction.d.ts.map +1 -1
- package/dist/shared/decompose/charterExtraction.js +70 -13
- package/dist/shared/decompose/charterExtraction.js.map +1 -1
- package/dist/shared/decompose/systemicChallenge.d.ts +42 -1
- package/dist/shared/decompose/systemicChallenge.d.ts.map +1 -1
- package/dist/shared/decompose/systemicChallenge.js +51 -0
- package/dist/shared/decompose/systemicChallenge.js.map +1 -1
- package/dist/shared/index.d.ts +14 -11
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/index.js +16 -9
- package/dist/shared/index.js.map +1 -1
- package/dist/shared/io/stepContractWriter.d.ts.map +1 -1
- package/dist/shared/io/stepContractWriter.js +13 -4
- package/dist/shared/io/stepContractWriter.js.map +1 -1
- package/dist/shared/submission/hostHandoffCore.d.ts +7 -0
- package/dist/shared/submission/hostHandoffCore.d.ts.map +1 -1
- package/dist/shared/submission/hostHandoffCore.js +15 -2
- package/dist/shared/submission/hostHandoffCore.js.map +1 -1
- package/dist/shared/submission/hostResultOutcomes.d.ts +60 -10
- package/dist/shared/submission/hostResultOutcomes.d.ts.map +1 -1
- package/dist/shared/submission/hostResultOutcomes.js +42 -10
- package/dist/shared/submission/hostResultOutcomes.js.map +1 -1
- package/dist/shared/submission/ingestReport.d.ts +54 -0
- package/dist/shared/submission/ingestReport.d.ts.map +1 -0
- package/dist/shared/submission/ingestReport.js +44 -0
- package/dist/shared/submission/ingestReport.js.map +1 -0
- package/dist/shared/submission/ingestionChecks.d.ts +8 -13
- package/dist/shared/submission/ingestionChecks.d.ts.map +1 -1
- package/dist/shared/submission/ingestionChecks.js +9 -14
- package/dist/shared/submission/ingestionChecks.js.map +1 -1
- package/dist/shared/submission/submissionClassifier.d.ts +6 -0
- package/dist/shared/submission/submissionClassifier.d.ts.map +1 -1
- package/dist/shared/submission/submissionClassifier.js +16 -0
- package/dist/shared/submission/submissionClassifier.js.map +1 -1
- package/dist/shared/submission/workerPromptBinding.d.ts +18 -0
- package/dist/shared/submission/workerPromptBinding.d.ts.map +1 -0
- package/dist/shared/submission/workerPromptBinding.js +38 -0
- package/dist/shared/submission/workerPromptBinding.js.map +1 -0
- package/dist/shared/tooling/exec.d.ts +24 -0
- package/dist/shared/tooling/exec.d.ts.map +1 -1
- package/dist/shared/tooling/exec.js +30 -0
- package/dist/shared/tooling/exec.js.map +1 -1
- package/dist/shared/types/charter.d.ts +143 -7
- package/dist/shared/types/charter.d.ts.map +1 -1
- package/dist/shared/types/charter.js +63 -7
- package/dist/shared/types/charter.js.map +1 -1
- package/dist/shared/types/charterPacket.d.ts +13 -0
- package/dist/shared/types/charterPacket.d.ts.map +1 -1
- package/dist/shared/types/charterPacket.js.map +1 -1
- package/dist/shared/types/contractPipeline/obligations.d.ts +30 -11
- package/dist/shared/types/contractPipeline/obligations.d.ts.map +1 -1
- package/dist/shared/types/contractPipeline/obligations.js +6 -1
- package/dist/shared/types/contractPipeline/obligations.js.map +1 -1
- package/dist/shared/types/contractPropertyShapes.d.ts.map +1 -1
- package/dist/shared/types/contractPropertyShapes.js +13 -0
- package/dist/shared/types/contractPropertyShapes.js.map +1 -1
- package/dist/shared/types/finding.d.ts +154 -15
- package/dist/shared/types/finding.d.ts.map +1 -1
- package/dist/shared/types/finding.js +41 -5
- package/dist/shared/types/finding.js.map +1 -1
- package/dist/shared/types/intentCheckpoint.d.ts +26 -40
- package/dist/shared/types/intentCheckpoint.d.ts.map +1 -1
- package/dist/shared/types/intentCheckpoint.js +30 -33
- package/dist/shared/types/intentCheckpoint.js.map +1 -1
- package/dist/shared/types/remediationOutcome.d.ts +8 -8
- package/dist/shared/validation/citationGrounding.d.ts +29 -5
- package/dist/shared/validation/citationGrounding.d.ts.map +1 -1
- package/dist/shared/validation/citationGrounding.js +56 -9
- package/dist/shared/validation/citationGrounding.js.map +1 -1
- package/dist/shared/validation/designFindingGrounding.d.ts +30 -9
- package/dist/shared/validation/designFindingGrounding.d.ts.map +1 -1
- package/dist/shared/validation/designFindingGrounding.js +32 -12
- package/dist/shared/validation/designFindingGrounding.js.map +1 -1
- package/docs/audit-pkg/contracts.md +4 -5
- package/package.json +1 -1
- package/schemas/audit_result.schema.json +51 -0
- package/schemas/audit_results.schema.json +51 -0
- package/schemas/audit_task.schema.json +44 -0
- package/schemas/finding.schema.json +4 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// sites-pinned: tests/shared/prompt-renders-its-contract.test.ts, tests/audit/charter-emit-order.test.ts
|
|
1
2
|
import { CharterProvenanceSchema } from "audit-tools/shared";
|
|
2
3
|
/** The provenance-kind alternation, DERIVED from the schema at render time. */
|
|
3
4
|
const PROVENANCE_KINDS = CharterProvenanceSchema.shape.kind.options.join("|");
|
|
@@ -9,6 +10,21 @@ const PROVENANCE_KINDS = CharterProvenanceSchema.shape.kind.options.join("|");
|
|
|
9
10
|
export function charterExtractionKindsForCeiling(_ceiling) {
|
|
10
11
|
return ["stated", "structural", "revealed"];
|
|
11
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* The ONE provenance kind a lane's worked example carries. An example must be a
|
|
15
|
+
* VALID submission: rendering the whole alternation into the example's `kind`
|
|
16
|
+
* value taught the host a value the strict enum rejects. The literal is checked
|
|
17
|
+
* against the schema here rather than trusted, so an enum rename cannot leave a
|
|
18
|
+
* stale example behind.
|
|
19
|
+
*/
|
|
20
|
+
function exampleProvenanceKind(kind) {
|
|
21
|
+
const literal = kind === "stated" ? "doc" : "code";
|
|
22
|
+
const allowed = CharterProvenanceSchema.shape.kind.options;
|
|
23
|
+
if (!allowed.includes(literal)) {
|
|
24
|
+
throw new Error(`charter prompt example provenance kind "${literal}" is absent from CharterProvenanceSchema (${PROVENANCE_KINDS})`);
|
|
25
|
+
}
|
|
26
|
+
return literal;
|
|
27
|
+
}
|
|
12
28
|
/** Per-kind perspective line, packet description, and the `files` rule (scope follows the evidence). */
|
|
13
29
|
const KIND_LANE_TEXT = {
|
|
14
30
|
stated: {
|
|
@@ -32,21 +48,15 @@ const KIND_LANE_TEXT = {
|
|
|
32
48
|
* only its own kind's perspective, its materialized evidence packet, and its
|
|
33
49
|
* submission path.
|
|
34
50
|
*/
|
|
35
|
-
export function renderCharterKindLanePrompt(
|
|
36
|
-
const consensus = bundle.structure_decomposition?.consensus ?? [];
|
|
51
|
+
export function renderCharterKindLanePrompt(opts) {
|
|
37
52
|
const lane = KIND_LANE_TEXT[opts.kind];
|
|
38
|
-
const
|
|
39
|
-
? consensus.map((node) => {
|
|
40
|
-
const preview = node.members.slice(0, 12).join(", ");
|
|
41
|
-
const more = node.members.length > 12 ? ` (+${node.members.length - 12} more)` : "";
|
|
42
|
-
return `- ${node.members.length} file(s): ${preview}${more}`;
|
|
43
|
-
})
|
|
44
|
-
: ["- (no confident subsystems were found — organize the goal graph yourself)"];
|
|
53
|
+
const exampleKind = exampleProvenanceKind(opts.kind);
|
|
45
54
|
return [
|
|
46
|
-
`# Design review — charter extraction, **${opts.kind}** lane
|
|
55
|
+
`# Design review — charter extraction, the **${opts.kind}** lane`,
|
|
47
56
|
"",
|
|
48
|
-
"You are authoring a high-level
|
|
49
|
-
"*\"what is this code FOR, and does it serve that purpose as well as a better design
|
|
57
|
+
"You are authoring a high-level design review. The question is not \"is this module correct or",
|
|
58
|
+
"clean\" but *\"what is this code FOR, and does it serve that purpose as well as a better design",
|
|
59
|
+
"could.\"* You author purpose only. Do not review code correctness.",
|
|
50
60
|
"",
|
|
51
61
|
"Three independent, blind lanes each build their own goal graph from ONE evidence channel:",
|
|
52
62
|
"**stated** (docs and comments), **structural** (file tree, declarations, imports), **revealed**",
|
|
@@ -55,23 +65,28 @@ export function renderCharterKindLanePrompt(bundle, opts) {
|
|
|
55
65
|
"Your review perspective:",
|
|
56
66
|
lane.perspective,
|
|
57
67
|
"",
|
|
58
|
-
"##
|
|
68
|
+
"## Purpose against mechanism",
|
|
69
|
+
"",
|
|
70
|
+
"- **Purpose (the WHY)**: the problem this code exists to solve for its users or for the system.",
|
|
71
|
+
"- **Mechanism (the WHAT and the HOW)**: the technical implementation that solves it.",
|
|
59
72
|
"",
|
|
60
|
-
"
|
|
61
|
-
"
|
|
73
|
+
"Every example in this prompt is drawn from an UNRELATED codebase — a delivery-scheduling",
|
|
74
|
+
"service — so that you do not pattern-match it onto the code you are reviewing.",
|
|
62
75
|
"",
|
|
63
|
-
"- *
|
|
64
|
-
"- *Mechanism (do NOT emit)*: *\"
|
|
76
|
+
"- *Purpose (DO emit)*: *\"Lets a dispatcher promise a delivery window the fleet can actually keep.\"*",
|
|
77
|
+
"- *Mechanism (do NOT emit)*: *\"Keeps delivery windows in a sorted set keyed by driver id.\"* A purpose that restates the code cannot show an architectural gap.",
|
|
65
78
|
"",
|
|
66
79
|
"## Your evidence packet",
|
|
67
80
|
"",
|
|
68
|
-
`Read \`${opts.packetPath}
|
|
81
|
+
`Read \`${opts.packetPath}\`. It holds all the evidence for this review, and it is the only material you may use. Do not open a file outside it: the limited view is deliberate, and it is what makes your lane independent of the other two.`,
|
|
69
82
|
"",
|
|
70
83
|
lane.packet,
|
|
71
84
|
"",
|
|
72
|
-
"Its `## Provenance manifest` block names every excerpt
|
|
73
|
-
"
|
|
74
|
-
"
|
|
85
|
+
"Its `## Provenance manifest` block names every excerpt the packet delivered, and every content line",
|
|
86
|
+
"carries its source line number as a prefix (` 12| class DeliveryWindow {`). That prefix is the",
|
|
87
|
+
"packet's own formatting, not part of the file: STRIP it before you copy a quote, and never cite a",
|
|
88
|
+
"line number. Cite only material the packet shows you. The packet is SUFFICIENT — you never leave it",
|
|
89
|
+
"to cite correctly.",
|
|
75
90
|
"",
|
|
76
91
|
"## Build your goal graph",
|
|
77
92
|
"",
|
|
@@ -79,23 +94,17 @@ export function renderCharterKindLanePrompt(bundle, opts) {
|
|
|
79
94
|
"",
|
|
80
95
|
"Each node carries:",
|
|
81
96
|
"- `node_id` — a short slug you choose; it is local to this submission.",
|
|
82
|
-
"- `purpose` — the
|
|
83
|
-
"- `provenance` — evidence citations
|
|
97
|
+
"- `purpose` — the purpose statement (the WHY, not the WHAT).",
|
|
98
|
+
"- `provenance` — evidence citations. Each one names a SYMBOL or a file, and carries the literal text you copied. Never a line number.",
|
|
84
99
|
"- `confidence` — `\"high\"` | `\"medium\"` | `\"low\"`.",
|
|
85
100
|
lane.filesRule,
|
|
86
101
|
"",
|
|
87
102
|
"Each edge carries `from`, `to`, and `provenance` for the relationship itself.",
|
|
88
103
|
"",
|
|
89
|
-
"
|
|
90
|
-
...hintLines,
|
|
104
|
+
"## Do not emit",
|
|
91
105
|
"",
|
|
92
|
-
"
|
|
93
|
-
"",
|
|
94
|
-
"## Anti-slop discipline (do NOT emit)",
|
|
95
|
-
"- No **restated-mechanism** purposes; describe the WHY, not the WHAT.",
|
|
96
|
-
"- No **generic** telos any subsystem could claim; be specific to THIS code.",
|
|
97
|
-
"- No **fabricated profundity**; every node and edge cites provenance from your packet.",
|
|
98
|
-
"- No files outside your packet; the limited view is intentional.",
|
|
106
|
+
"- No **restated mechanism**: describe the WHY, not the WHAT.",
|
|
107
|
+
"- No **generic purpose** that any subsystem could claim: be specific to THIS code.",
|
|
99
108
|
"",
|
|
100
109
|
"## Output",
|
|
101
110
|
"",
|
|
@@ -103,31 +112,44 @@ export function renderCharterKindLanePrompt(bundle, opts) {
|
|
|
103
112
|
"",
|
|
104
113
|
"```json",
|
|
105
114
|
"{",
|
|
106
|
-
` "kind": "${opts.kind}",`,
|
|
107
115
|
' "nodes": [',
|
|
108
116
|
" {",
|
|
109
|
-
' "node_id": "
|
|
110
|
-
' "purpose": "
|
|
117
|
+
' "node_id": "promises-the-customer-can-trust",',
|
|
118
|
+
' "purpose": "Makes every commitment the service gives a customer one it can honour",',
|
|
119
|
+
...(opts.kind === "stated"
|
|
120
|
+
? []
|
|
121
|
+
: [' "files": ["src/scheduling/promise.ts"],']),
|
|
122
|
+
` "provenance": [{ "kind": "${exampleKind}", "ref": "src/scheduling/promise.ts#Promise", "quote": "class Promise {" }],`,
|
|
123
|
+
' "confidence": "medium"',
|
|
124
|
+
" },",
|
|
125
|
+
" {",
|
|
126
|
+
' "node_id": "keepable-delivery-windows",',
|
|
127
|
+
' "purpose": "Lets a dispatcher promise a delivery window the fleet can actually keep",',
|
|
111
128
|
...(opts.kind === "stated"
|
|
112
129
|
? []
|
|
113
|
-
: [
|
|
114
|
-
|
|
130
|
+
: [
|
|
131
|
+
' "files": ["src/scheduling/window.ts", "src/scheduling/fleet.ts"],',
|
|
132
|
+
]),
|
|
133
|
+
` "provenance": [{ "kind": "${exampleKind}", "ref": "src/scheduling/window.ts#DeliveryWindow", "quote": "class DeliveryWindow {" }],`,
|
|
115
134
|
' "confidence": "high"',
|
|
116
135
|
" }",
|
|
117
136
|
" ],",
|
|
118
137
|
' "edges": [',
|
|
119
138
|
" {",
|
|
120
|
-
' "from": "
|
|
121
|
-
' "to": "
|
|
122
|
-
` "provenance": [{ "kind": "${
|
|
139
|
+
' "from": "keepable-delivery-windows",',
|
|
140
|
+
' "to": "promises-the-customer-can-trust",',
|
|
141
|
+
` "provenance": [{ "kind": "${exampleKind}", "ref": "src/scheduling/window.ts", "quote": "canFleetKeep(window)" }]`,
|
|
123
142
|
" }",
|
|
124
143
|
" ]",
|
|
125
144
|
"}",
|
|
126
145
|
"```",
|
|
127
146
|
"",
|
|
128
|
-
|
|
147
|
+
"- `nodes` and `edges` are the whole submission. Do not add a field the example does not show. The tool knows which lane you are from the path it gave you.",
|
|
129
148
|
`- \`provenance[].kind\`: one of \`${PROVENANCE_KINDS.split("|").join("`, `")}\`.`,
|
|
130
|
-
"- `provenance[].ref`
|
|
149
|
+
"- `provenance[].ref` names a SYMBOL — `<path>#<symbol>`, the form to prefer — or, when no symbol names your claim, the bare `<path>`. A non-path source is its own bare id. NEVER a line number: a line number drifts as the file changes, and a drifted number cannot be repaired, only deleted.",
|
|
150
|
+
"- `provenance[].quote` is the literal text you COPIED from your packet, character for character, without the packet's line-number prefix. The tool re-reads that text from the file, so the quote — not the reference — is what makes your citation checkable. Never paraphrase it. Never write a quote you did not copy.",
|
|
151
|
+
"- QUOTE whenever your packet gave you text to quote. Two cases are refused: a `ref` naming a symbol (`<path>#<symbol>`) with no quote, and a citation of any file your `## Provenance manifest` lists as an excerpt with no quote. In both, the packet handed you the text and the claim is unverifiable without it.",
|
|
152
|
+
"- The ONE case that takes no quote: a file your packet names in its file tree and excerpts nowhere. You were shown its path only, so cite the bare `<path>` and write no quote. Do not invent one — an invented quote is the worst thing you can submit here.",
|
|
131
153
|
"- Every `from` and `to` names a `node_id` in this submission.",
|
|
132
154
|
"",
|
|
133
155
|
].join("\n");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"charterExtractionPrompt.js","sourceRoot":"","sources":["../../../src/audit/cli/charterExtractionPrompt.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"charterExtractionPrompt.js","sourceRoot":"","sources":["../../../src/audit/cli/charterExtractionPrompt.ts"],"names":[],"mappings":"AAAA,yGAAyG;AACzG,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAG7D,+EAA+E;AAC/E,MAAM,gBAAgB,GAAG,uBAAuB,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,C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B;QAC5B,OAAO;QACP,MAAM;QACN,cAAc;QACd,OAAO;QACP,4CAA4C;QAC5C,gDAAgD;QAChD,mCAAmC,WAAW,0EAA0E;QACxH,OAAO;QACP,KAAK;QACL,GAAG;QACH,KAAK;QACL,EAAE;QACF,4JAA4J;QAC5J,qCAAqC,gBAAgB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK;QAClF,mSAAmS;QACnS,2TAA2T;QAC3T,sTAAsT;QACtT,+PAA+P;QAC/P,+DAA+D;QAC/D,EAAE;KACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
|
|
@@ -1,11 +1,24 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Render the charter-FIDELITY host prompt (step 4, judgment half;
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
2
|
+
* Render the charter-FIDELITY host prompt (step 4, judgment half; owner-reviewed
|
|
3
|
+
* 2026-09-17 — the earlier "approved host text §9b" label was DERIVED from the
|
|
4
|
+
* owner's approval of the charter design, never given to this text). A separate
|
|
5
|
+
* lane sees only the packet the tool materialized — per open finding candidate,
|
|
6
|
+
* the accounts, their cited provenance, and the exact source slices at those
|
|
6
7
|
* citations — and returns one verdict per difference. Separation from the
|
|
7
8
|
* comparison reader is enforced by dispatch, so the prompt carries no identity
|
|
8
9
|
* plea (owner amendment 2026-09-15).
|
|
10
|
+
*
|
|
11
|
+
* Every rule the ingest applies is STATED here, because obedience has to be
|
|
12
|
+
* sufficient: a lane that follows this text exactly must produce a submission
|
|
13
|
+
* `CharterFidelitySubmissionSchema` accepts and `applyFidelity` stamps. Three
|
|
14
|
+
* rules were previously unstated or wrong — the example carried `over_read_side`
|
|
15
|
+
* beside a non-`interpretation` verdict, which the schema refuses outright; the
|
|
16
|
+
* text promised "the two accounts" where a block holds one, two or three (a
|
|
17
|
+
* `presence` finding candidate names its silent channel by ABSENCE, so it
|
|
18
|
+
* reaches the packet with a single account); and it promised every quote was
|
|
19
|
+
* checked against disk, which is true of QUOTES only — a ref with no quote is
|
|
20
|
+
* never pre-checked, and `buildCharterFidelityPacket` can emit an unreadable-source
|
|
21
|
+
* marker in place of a slice (owner 2026-09-17).
|
|
9
22
|
*/
|
|
10
23
|
export declare function renderCharterFidelityPrompt(opts: {
|
|
11
24
|
submissionPath: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"charterFidelityPrompt.d.ts","sourceRoot":"","sources":["../../../src/audit/cli/charterFidelityPrompt.ts"],"names":[],"mappings":"AACA
|
|
1
|
+
{"version":3,"file":"charterFidelityPrompt.d.ts","sourceRoot":"","sources":["../../../src/audit/cli/charterFidelityPrompt.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,2BAA2B,CAAC,IAAI,EAAE;IAChD,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;CACpB,GAAG,MAAM,CAoFT"}
|
|
@@ -1,12 +1,25 @@
|
|
|
1
1
|
// sites-pinned: tests/shared/prompt-renders-its-contract.test.ts, tests/audit/charter-emit-order.test.ts
|
|
2
2
|
/**
|
|
3
|
-
* Render the charter-FIDELITY host prompt (step 4, judgment half;
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
3
|
+
* Render the charter-FIDELITY host prompt (step 4, judgment half; owner-reviewed
|
|
4
|
+
* 2026-09-17 — the earlier "approved host text §9b" label was DERIVED from the
|
|
5
|
+
* owner's approval of the charter design, never given to this text). A separate
|
|
6
|
+
* lane sees only the packet the tool materialized — per open finding candidate,
|
|
7
|
+
* the accounts, their cited provenance, and the exact source slices at those
|
|
7
8
|
* citations — and returns one verdict per difference. Separation from the
|
|
8
9
|
* comparison reader is enforced by dispatch, so the prompt carries no identity
|
|
9
10
|
* plea (owner amendment 2026-09-15).
|
|
11
|
+
*
|
|
12
|
+
* Every rule the ingest applies is STATED here, because obedience has to be
|
|
13
|
+
* sufficient: a lane that follows this text exactly must produce a submission
|
|
14
|
+
* `CharterFidelitySubmissionSchema` accepts and `applyFidelity` stamps. Three
|
|
15
|
+
* rules were previously unstated or wrong — the example carried `over_read_side`
|
|
16
|
+
* beside a non-`interpretation` verdict, which the schema refuses outright; the
|
|
17
|
+
* text promised "the two accounts" where a block holds one, two or three (a
|
|
18
|
+
* `presence` finding candidate names its silent channel by ABSENCE, so it
|
|
19
|
+
* reaches the packet with a single account); and it promised every quote was
|
|
20
|
+
* checked against disk, which is true of QUOTES only — a ref with no quote is
|
|
21
|
+
* never pre-checked, and `buildCharterFidelityPacket` can emit an unreadable-source
|
|
22
|
+
* marker in place of a slice (owner 2026-09-17).
|
|
10
23
|
*/
|
|
11
24
|
export function renderCharterFidelityPrompt(opts) {
|
|
12
25
|
return [
|
|
@@ -14,24 +27,45 @@ export function renderCharterFidelityPrompt(opts) {
|
|
|
14
27
|
"",
|
|
15
28
|
"A comparison pass recorded differences between three accounts of this repository's goals: what",
|
|
16
29
|
"the docs say (**stated**), what the code's organization promises (**structural**), and what the",
|
|
17
|
-
"code does (**revealed**).
|
|
18
|
-
"
|
|
30
|
+
"code does (**revealed**). Your job is narrower than that pass: for each difference, decide",
|
|
31
|
+
"whether each account's claim is really carried by the source that account cites.",
|
|
19
32
|
"",
|
|
20
33
|
"## Your packet",
|
|
21
34
|
"",
|
|
22
|
-
`Read \`${opts.packetPath}\`.
|
|
23
|
-
"
|
|
24
|
-
"
|
|
35
|
+
`Read \`${opts.packetPath}\`. Each block holds one difference — its dimension and relation, the gap`,
|
|
36
|
+
"in one sentence, and then every account the comparison recorded: the claim, its cited refs, and a",
|
|
37
|
+
"source slice at each ref.",
|
|
38
|
+
"",
|
|
39
|
+
"A block holds ONE, TWO or THREE accounts. Three means all three channels spoke; two means the",
|
|
40
|
+
"correspondence had two channels. One means the difference is a `presence` gap: the silent channel",
|
|
41
|
+
"is named by its ABSENCE from the block, so no slice can exist for it.",
|
|
42
|
+
"",
|
|
43
|
+
"Judge from the slices only. Do not open other files, and do not judge the design itself.",
|
|
44
|
+
"",
|
|
45
|
+
"Two markers say the evidence is not there:",
|
|
46
|
+
"- `(source <path> could not be read)` in place of a slice — the cited file is gone or unreadable.",
|
|
47
|
+
"- `(no provenance cited)` under an account — that account cited nothing at all.",
|
|
48
|
+
"",
|
|
49
|
+
"A cited QUOTE was re-read from disk before the block was built, so a quote shown in a block was",
|
|
50
|
+
"present at its ref. A ref with no quote was never checked, and neither marker above was.",
|
|
25
51
|
"",
|
|
26
52
|
"## Verdicts",
|
|
27
53
|
"",
|
|
28
|
-
"Give each difference exactly one verdict:",
|
|
29
|
-
"- `supported` —
|
|
30
|
-
"- `interpretation` — one
|
|
31
|
-
"
|
|
54
|
+
"Give each difference in the packet exactly one verdict:",
|
|
55
|
+
"- `supported` — every account's claim is carried by that account's own cited slices.",
|
|
56
|
+
"- `interpretation` — one account's claim goes beyond what its own slices say. Name that account's",
|
|
57
|
+
" channel in `over_read_side`.",
|
|
58
|
+
"- `unverifiable` — the slices cannot settle it: a marker above, a slice that does not contain the",
|
|
59
|
+
" cited matter, or a claim the slices neither carry nor contradict.",
|
|
32
60
|
"",
|
|
33
|
-
"Judge
|
|
34
|
-
"well
|
|
61
|
+
"Judge each claim against its OWN cited source, never against another account's claim. Two",
|
|
62
|
+
"accounts can both be well supported and still contradict each other — the contradiction is the",
|
|
63
|
+
"comparison's finding, and `supported` is how you confirm the evidence under it. A claim can also",
|
|
64
|
+
"be well supported and wrong about the code; that is not your question either.",
|
|
65
|
+
"",
|
|
66
|
+
"On a one-account `presence` block, judge that one account the same way: does its own slice carry",
|
|
67
|
+
"the goal it claims? The silence of the other channel is the tool's own record, not a claim you",
|
|
68
|
+
"check.",
|
|
35
69
|
"",
|
|
36
70
|
"## Output",
|
|
37
71
|
"",
|
|
@@ -41,17 +75,34 @@ export function renderCharterFidelityPrompt(opts) {
|
|
|
41
75
|
"{",
|
|
42
76
|
' "verdicts": [',
|
|
43
77
|
" {",
|
|
44
|
-
' "difference_id": "
|
|
45
|
-
' "verdict": "supported
|
|
46
|
-
' "
|
|
47
|
-
|
|
78
|
+
' "difference_id": "D-0003",',
|
|
79
|
+
' "verdict": "supported",',
|
|
80
|
+
' "rationale": "the stated slice at docs/goals.md:12 promises every driver sees the schedule, and the revealed slice at src/scheduling/roster.ts:40 restricts it to admins."',
|
|
81
|
+
" },",
|
|
82
|
+
" {",
|
|
83
|
+
' "difference_id": "D-0007",',
|
|
84
|
+
' "verdict": "interpretation",',
|
|
85
|
+
' "over_read_side": "structural",',
|
|
86
|
+
' "rationale": "the structural account claims a retry policy, but its slice only declares a RetryOptions type and never applies it."',
|
|
87
|
+
" },",
|
|
88
|
+
" {",
|
|
89
|
+
' "difference_id": "D-0011",',
|
|
90
|
+
' "verdict": "unverifiable",',
|
|
91
|
+
' "rationale": "the revealed account cites one ref, and its slice reads (source src/legacy/queue.ts could not be read)."',
|
|
48
92
|
" }",
|
|
49
93
|
" ]",
|
|
50
94
|
"}",
|
|
51
95
|
"```",
|
|
52
96
|
"",
|
|
53
|
-
"- One entry per difference in the packet
|
|
54
|
-
"
|
|
97
|
+
"- One entry per difference block in the packet, and no more. A second verdict for the same",
|
|
98
|
+
" `difference_id` is dropped, and so is a `difference_id` the tool does not recognize or has",
|
|
99
|
+
" already settled itself.",
|
|
100
|
+
"- A difference you leave out stays unjudged. The tool never assumes `supported` for you.",
|
|
101
|
+
"- `over_read_side` goes with `interpretation` and with nothing else: the tool refuses an",
|
|
102
|
+
" `interpretation` that omits it, and refuses any other verdict that carries it. Its value is",
|
|
103
|
+
" `stated`, `structural` or `revealed`, and it names a channel with an account in that block.",
|
|
104
|
+
"- `rationale` is required on every verdict. Write one or two sentences, and cite the slice that",
|
|
105
|
+
" decides it.",
|
|
55
106
|
"",
|
|
56
107
|
].join("\n");
|
|
57
108
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"charterFidelityPrompt.js","sourceRoot":"","sources":["../../../src/audit/cli/charterFidelityPrompt.ts"],"names":[],"mappings":"AAAA,yGAAyG;AACzG
|
|
1
|
+
{"version":3,"file":"charterFidelityPrompt.js","sourceRoot":"","sources":["../../../src/audit/cli/charterFidelityPrompt.ts"],"names":[],"mappings":"AAAA,yGAAyG;AACzG;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,2BAA2B,CAAC,IAG3C;IACC,OAAO;QACL,0CAA0C;QAC1C,EAAE;QACF,gGAAgG;QAChG,iGAAiG;QACjG,4FAA4F;QAC5F,kFAAkF;QAClF,EAAE;QACF,gBAAgB;QAChB,EAAE;QACF,UAAU,IAAI,CAAC,UAAU,2EAA2E;QACpG,mGAAmG;QACnG,2BAA2B;QAC3B,EAAE;QACF,+FAA+F;QAC/F,mGAAmG;QACnG,uEAAuE;QACvE,EAAE;QACF,0FAA0F;QAC1F,EAAE;QACF,4CAA4C;QAC5C,mGAAmG;QACnG,iFAAiF;QACjF,EAAE;QACF,iGAAiG;QACjG,0FAA0F;QAC1F,EAAE;QACF,aAAa;QACb,EAAE;QACF,yDAAyD;QACzD,sFAAsF;QACtF,mGAAmG;QACnG,gCAAgC;QAChC,mGAAmG;QACnG,qEAAqE;QACrE,EAAE;QACF,2FAA2F;QAC3F,gGAAgG;QAChG,kGAAkG;QAClG,+EAA+E;QAC/E,EAAE;QACF,kGAAkG;QAClG,gGAAgG;QAChG,QAAQ;QACR,EAAE;QACF,WAAW;QACX,EAAE;QACF,sCAAsC,IAAI,CAAC,cAAc,KAAK;QAC9D,EAAE;QACF,SAAS;QACT,GAAG;QACH,iBAAiB;QACjB,OAAO;QACP,kCAAkC;QAClC,+BAA+B;QAC/B,kLAAkL;QAClL,QAAQ;QACR,OAAO;QACP,kCAAkC;QAClC,oCAAoC;QACpC,uCAAuC;QACvC,0IAA0I;QAC1I,QAAQ;QACR,OAAO;QACP,kCAAkC;QAClC,kCAAkC;QAClC,8HAA8H;QAC9H,OAAO;QACP,KAAK;QACL,GAAG;QACH,KAAK;QACL,EAAE;QACF,4FAA4F;QAC5F,8FAA8F;QAC9F,2BAA2B;QAC3B,0FAA0F;QAC1F,0FAA0F;QAC1F,+FAA+F;QAC/F,+FAA+F;QAC/F,iGAAiG;QACjG,eAAe;QACf,EAAE;KACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type LaneDemand, type RunLogger } from "audit-tools/shared";
|
|
2
2
|
import { type AuditResult, type AuditTask } from "../../types.js";
|
|
3
3
|
import type { AuditHostIngestIssue } from "../../validation/ingestIssueCodes.js";
|
|
4
|
-
declare const WORKLOAD_CONTRACT_VERSION: "audit-host-workload/
|
|
4
|
+
declare const WORKLOAD_CONTRACT_VERSION: "audit-host-workload/v1alpha4";
|
|
5
5
|
declare const RESULT_MAP_CONTRACT_VERSION: "audit-host-result-map/v1alpha1";
|
|
6
6
|
export interface AuditHostTask {
|
|
7
7
|
readonly task_id: string;
|
|
@@ -28,7 +28,16 @@ export interface AuditHostTask {
|
|
|
28
28
|
*/
|
|
29
29
|
readonly demand: LaneDemand;
|
|
30
30
|
readonly token_estimate: number;
|
|
31
|
+
/**
|
|
32
|
+
* How much of `file_paths` this lane must cover — see `coverage_policy` on
|
|
33
|
+
* `AuditTask`. Absent means `"complete"`, which is the base per-file lane.
|
|
34
|
+
*/
|
|
35
|
+
readonly coverage_policy?: AuditTask["coverage_policy"];
|
|
36
|
+
/** Per-surface-file metrics, on a `"selective"` lane only. */
|
|
37
|
+
readonly file_metrics?: readonly LensSurfaceFileMetric[];
|
|
31
38
|
}
|
|
39
|
+
/** One surface file's metrics, exactly as `AuditTask.file_metrics` declares them. */
|
|
40
|
+
type LensSurfaceFileMetric = NonNullable<AuditTask["file_metrics"]>[number];
|
|
32
41
|
export interface AuditHostWorkItem {
|
|
33
42
|
readonly id: string;
|
|
34
43
|
readonly lens: string;
|
|
@@ -43,6 +52,19 @@ export interface AuditHostWorkItem {
|
|
|
43
52
|
readonly scope: {
|
|
44
53
|
readonly files: readonly string[];
|
|
45
54
|
readonly unit_ids: readonly string[];
|
|
55
|
+
/**
|
|
56
|
+
* One entry per file in `files`, ordered by prior signal, strongest first —
|
|
57
|
+
* present on a `"selective"` item only, and absent on the base per-file
|
|
58
|
+
* lane, whose reviewer covers every file and so chooses nothing.
|
|
59
|
+
*
|
|
60
|
+
* This is what makes a whole-surface assignment reviewable. The steward is
|
|
61
|
+
* granted every file its lens was applied to, so it needs each file's size
|
|
62
|
+
* and each file's prior signal to decide what to open, and both belong
|
|
63
|
+
* beside the file list rather than in the prompt: the prompt is digested,
|
|
64
|
+
* and a digest that moves with a 137-entry metric table binds the host to a
|
|
65
|
+
* table it cannot act on from prose anyway.
|
|
66
|
+
*/
|
|
67
|
+
readonly file_metrics?: readonly LensSurfaceFileMetric[];
|
|
46
68
|
};
|
|
47
69
|
readonly result_path: string;
|
|
48
70
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hostHandoff.d.ts","sourceRoot":"","sources":["../../../../src/audit/cli/dispatch/hostHandoff.ts"],"names":[],"mappings":"AAQA,OAAO,
|
|
1
|
+
{"version":3,"file":"hostHandoff.d.ts","sourceRoot":"","sources":["../../../../src/audit/cli/dispatch/hostHandoff.ts"],"names":[],"mappings":"AAQA,OAAO,EAqCL,KAAK,UAAU,EACf,KAAK,SAAS,EAEf,MAAM,oBAAoB,CAAC;AAO5B,OAAO,EAGL,KAAK,WAAW,EAChB,KAAK,SAAS,EACf,MAAM,gBAAgB,CAAC;AAUxB,OAAO,KAAK,EACV,oBAAoB,EAErB,MAAM,sCAAsC,CAAC;AAkC9C,QAAA,MAAM,yBAAyB,EAAG,8BAAuC,CAAC;AAC1E,QAAA,MAAM,2BAA2B,EAAG,gCAAyC,CAAC;AA0E9E,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,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