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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auditStep.d.ts","sourceRoot":"","sources":["../../../src/audit/cli/auditStep.ts"],"names":[],"mappings":"AAGA,OAAO,EAIL,SAAS,
|
|
1
|
+
{"version":3,"file":"auditStep.d.ts","sourceRoot":"","sources":["../../../src/audit/cli/auditStep.ts"],"names":[],"mappings":"AAGA,OAAO,EAIL,SAAS,EAUV,MAAM,oBAAoB,CAAC;AAQ5B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAW7E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,EAAE,eAAe,EAA2D,MAAM,oB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cAAc,CAAC;CACjC;AAED,wBAAsB,YAAY,CAChC,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,kBAAkB,CAAC,CAU7B;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,6BAA6B,SAAU,CAAC;AAErD;;;;;;;;;;;;;GAaG;AACH,wBAAsB,oBAAoB,CAAC,CAAC,EAC1C,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,SAAS,GAAG,SAAS,EAChC,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GACnB,OAAO,CAAC,CAAC,CAAC,CAOZ;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,mBAAmB,EAC5B,MAAM,EAAE,cAAc,EACtB,SAAS,CAAC,EAAE,SAAS,GACpB,OAAO,CAAC,kBAAkB,CAAC,CAO7B;AA2LD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,0BAA0B,CAC9C,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,SAAS,OAAO,EAAE,GAC1B,OAAO,CAAC,IAAI,CAAC,CAYf;AAED,wBAAsB,uBAAuB,CAAC,OAAO,EAAE;IACrD,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;CAClB;;;;;;;;;;;;;;;;;;;;GA8CA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// sites-pinned: tests/audit/next-step-helpers.test.ts, tests/audit/charter-emit-order.test.ts, tests/audit/executor-registry-sync.test.ts, tests/audit/pipeline-integration.test.ts
|
|
2
2
|
import { access } from "node:fs/promises";
|
|
3
3
|
import { basename, join } from "node:path";
|
|
4
|
-
import { artifactTreeLockPath, createMemoizedSourceReader, readJsonFile, RunLogger, verifyFindingGrounding, withFileLock, CharterExtractionMergedSchema, CharterComparisonSubmissionSchema, CharterFidelitySubmissionSchema, ClarificationAnswersSubmissionSchema,
|
|
4
|
+
import { artifactTreeLockPath, createMemoizedSourceReader, readJsonFile, RunLogger, verifyFindingGrounding, withFileLock, CharterExtractionMergedSchema, CharterComparisonSubmissionSchema, CharterFidelitySubmissionSchema, ClarificationAnswersSubmissionSchema, repoPathUniverse, systemicChallengeSchema, } from "audit-tools/shared";
|
|
5
5
|
import { loadArtifactBundle, writeCoreArtifacts, } from "../io/artifacts.js";
|
|
6
6
|
import { advanceAudit } from "../orchestrator/advance.js";
|
|
7
7
|
import { decideNextStep } from "../orchestrator/nextStep.js";
|
|
@@ -175,7 +175,7 @@ async function executeAdvance(options, bundle, runLogger) {
|
|
|
175
175
|
? ClarificationAnswersSubmissionSchema.parse(await readJsonFile(options.clarificationAnswersPath))
|
|
176
176
|
: undefined;
|
|
177
177
|
const systemicChallenge = options.systemicChallengePath
|
|
178
|
-
?
|
|
178
|
+
? systemicChallengeSchema(repoPathUniverse(bundle.repo_manifest)).parse(await readJsonFile(options.systemicChallengePath))
|
|
179
179
|
: undefined;
|
|
180
180
|
const result = await advanceAudit(bundle, {
|
|
181
181
|
root: options.root,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auditStep.js","sourceRoot":"","sources":["../../../src/audit/cli/auditStep.ts"],"names":[],"mappings":"AAAA,oLAAoL;AACpL,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EACL,oBAAoB,EACpB,0BAA0B,EAC1B,YAAY,EACZ,SAAS,EACT,sBAAsB,EACtB,YAAY,EACZ,6BAA6B,EAC7B,iCAAiC,EACjC,+BAA+B,EAC/B,oCAAoC,EACpC,
|
|
1
|
+
{"version":3,"file":"auditStep.js","sourceRoot":"","sources":["../../../src/audit/cli/auditStep.ts"],"names":[],"mappings":"AAAA,oLAAoL;AACpL,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,QAAQ,EA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,iBAAiB,IAAI,EAAE;QAChD,gBAAgB,EACd,YAAY,UAAU,CAAC,MAAM,qBAAqB,UAAU,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,SAAS,OAAO,CAAC,QAAQ,GAAG;YAChH,CAAC,IAAI;gBACH,CAAC,CAAC,KAAK,UAAU,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,gBAAgB,EAAE;gBACtF,CAAC,CAAC,EAAE,CAAC;QACT,gBAAgB,EACd,KAAK,CAAC,MAAM,KAAK,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,mBAAmB;KACpE,CAAC;AACJ,CAAC"}
|
|
@@ -1,16 +1,24 @@
|
|
|
1
1
|
import type { ArtifactBundle } from "../io/artifacts.js";
|
|
2
|
-
import type { Ceiling } from "audit-tools/shared";
|
|
3
2
|
/**
|
|
4
|
-
* Render the charter-clarification host prompt (Phase D;
|
|
5
|
-
* docs/reviews/prompt-refinement-2026-09-13.md
|
|
6
|
-
* deterministic loop and surfaces the top of
|
|
7
|
-
* n-ary question — every account in the
|
|
8
|
-
*
|
|
9
|
-
*
|
|
3
|
+
* Render the charter-clarification host prompt (Phase D; host text reviewed by the
|
|
4
|
+
* owner on 2026-09-17, recorded in docs/reviews/prompt-refinement-2026-09-13.md
|
|
5
|
+
* §10). The tool has already run the deterministic loop and surfaces the top of
|
|
6
|
+
* the VOI queue. The host relays each n-ary question — every account in the
|
|
7
|
+
* correspondence, side by side, with every citation it rests on — and records one
|
|
8
|
+
* answer: the governing channel, a rewrite of all, or leave open. Only reached at
|
|
9
|
+
* a `deep`+ ceiling WITH attention > 0.
|
|
10
|
+
*
|
|
11
|
+
* The prompt states the three answer SHAPES outright, and its worked example is
|
|
12
|
+
* built from the real queue below it. Both are the same repair: the example used
|
|
13
|
+
* to write the three channel names into the value as a menu
|
|
14
|
+
* (`"governs": "stated | structural | revealed"`), which the strict enum refuses,
|
|
15
|
+
* and it used to key every entry on a `<one of the request_ids above>`
|
|
16
|
+
* placeholder, which the gate ACCEPTS and the executor then discards in silence
|
|
17
|
+
* (measured 2026-09-17 — the third prompt in this family carrying an example its
|
|
18
|
+
* own validator rejects).
|
|
10
19
|
*/
|
|
11
20
|
export declare function renderCharterClarificationPrompt(bundle: ArtifactBundle, opts: {
|
|
12
21
|
answersPath: string;
|
|
13
22
|
continueCommand: string;
|
|
14
|
-
ceiling: Ceiling;
|
|
15
23
|
}): string;
|
|
16
24
|
//# sourceMappingURL=charterClarificationPrompt.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"charterClarificationPrompt.d.ts","sourceRoot":"","sources":["../../../src/audit/cli/charterClarificationPrompt.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"charterClarificationPrompt.d.ts","sourceRoot":"","sources":["../../../src/audit/cli/charterClarificationPrompt.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAIzD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,gCAAgC,CAC9C,MAAM,EAAE,cAAc,EACtB,IAAI,EAAE;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,eAAe,EAAE,MAAM,CAAA;CAAE,GACrD,MAAM,CA8DR"}
|
|
@@ -1,35 +1,41 @@
|
|
|
1
|
+
import { CharterLaneKindSchema } from "audit-tools/shared";
|
|
1
2
|
/**
|
|
2
|
-
* Render the charter-clarification host prompt (Phase D;
|
|
3
|
-
* docs/reviews/prompt-refinement-2026-09-13.md
|
|
4
|
-
* deterministic loop and surfaces the top of
|
|
5
|
-
* n-ary question — every account in the
|
|
6
|
-
*
|
|
7
|
-
*
|
|
3
|
+
* Render the charter-clarification host prompt (Phase D; host text reviewed by the
|
|
4
|
+
* owner on 2026-09-17, recorded in docs/reviews/prompt-refinement-2026-09-13.md
|
|
5
|
+
* §10). The tool has already run the deterministic loop and surfaces the top of
|
|
6
|
+
* the VOI queue. The host relays each n-ary question — every account in the
|
|
7
|
+
* correspondence, side by side, with every citation it rests on — and records one
|
|
8
|
+
* answer: the governing channel, a rewrite of all, or leave open. Only reached at
|
|
9
|
+
* a `deep`+ ceiling WITH attention > 0.
|
|
10
|
+
*
|
|
11
|
+
* The prompt states the three answer SHAPES outright, and its worked example is
|
|
12
|
+
* built from the real queue below it. Both are the same repair: the example used
|
|
13
|
+
* to write the three channel names into the value as a menu
|
|
14
|
+
* (`"governs": "stated | structural | revealed"`), which the strict enum refuses,
|
|
15
|
+
* and it used to key every entry on a `<one of the request_ids above>`
|
|
16
|
+
* placeholder, which the gate ACCEPTS and the executor then discards in silence
|
|
17
|
+
* (measured 2026-09-17 — the third prompt in this family carrying an example its
|
|
18
|
+
* own validator rejects).
|
|
8
19
|
*/
|
|
9
20
|
export function renderCharterClarificationPrompt(bundle, opts) {
|
|
10
21
|
const asked = bundle.charter_clarification?.asked ?? [];
|
|
11
22
|
const questionBlocks = asked.length
|
|
12
|
-
? asked.flatMap((q, i) =>
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
"",
|
|
29
|
-
q.question,
|
|
30
|
-
"",
|
|
31
|
-
];
|
|
32
|
-
})
|
|
23
|
+
? asked.flatMap((q, i) => [
|
|
24
|
+
`### Q${i + 1} — ${headingFor(q)}`,
|
|
25
|
+
`- request_id: \`${q.request_id}\``,
|
|
26
|
+
`- blast radius: ${q.value.blast_radius}; cascade: ${q.value.cascade_count}`,
|
|
27
|
+
...silentChannelsLine(q),
|
|
28
|
+
...q.accounts.flatMap((a) => [
|
|
29
|
+
`- **${a.kind}** says: ${a.claim}`,
|
|
30
|
+
// EVERY citation, one per line. Rendering `provenance[0]` alone showed
|
|
31
|
+
// one line of a multi-line account and dropped the rest, so the reader
|
|
32
|
+
// decided which account governs from a partial account.
|
|
33
|
+
...a.provenance.map((p) => ` - \`${p.ref}\`${p.quote ? ` — "${p.quote}"` : ""}`),
|
|
34
|
+
]),
|
|
35
|
+
"",
|
|
36
|
+
q.question,
|
|
37
|
+
"",
|
|
38
|
+
])
|
|
33
39
|
: ["- (no interactive questions this round — nothing to ask)"];
|
|
34
40
|
return [
|
|
35
41
|
"# Design review — charter clarification",
|
|
@@ -38,34 +44,81 @@ export function renderCharterClarificationPrompt(bundle, opts) {
|
|
|
38
44
|
"difference between accounts of the same goal. Any account may move — including what the docs",
|
|
39
45
|
"state — so never frame a question as \"your code violates your intent, shall we fix the code?\"",
|
|
40
46
|
"",
|
|
41
|
-
"Relay each question to the user
|
|
42
|
-
"",
|
|
43
|
-
"- `governs: <channel>` — that channel's account governs; the others move to match.",
|
|
44
|
-
"- `rewrite_all` — none as-is; the accounts rewrite to a third thing.",
|
|
45
|
-
"- `leave_open` — a deliberate held tension (a decision, not a failure).",
|
|
47
|
+
"Relay each question to the user. Record ONE answer per question. You may leave a question",
|
|
48
|
+
"unanswered; you may not invent one.",
|
|
46
49
|
"",
|
|
47
50
|
"## Questions",
|
|
48
51
|
"",
|
|
49
52
|
...questionBlocks,
|
|
50
53
|
"## Output",
|
|
51
54
|
"",
|
|
52
|
-
`Write the answers as JSON to \`${opts.answersPath}
|
|
55
|
+
`Write the answers as JSON to \`${opts.answersPath}\`.`,
|
|
56
|
+
"",
|
|
57
|
+
"An answer takes exactly one of three shapes, and the shapes differ — the first is an object, the",
|
|
58
|
+
"other two are bare strings:",
|
|
59
|
+
"",
|
|
60
|
+
`- \`{ "governs": "<channel>" }\` — that channel's account governs; the others move to match. The channel is one of \`${CharterLaneKindSchema.options.join("`, `")}\`, and it must be a channel the question shows.`,
|
|
61
|
+
'- `"rewrite_all"` — none of the accounts stands as-is; they rewrite to a third thing.',
|
|
62
|
+
'- `"leave_open"` — a deliberate held tension. This is a decision, not a failure.',
|
|
53
63
|
"",
|
|
54
64
|
"```json",
|
|
55
|
-
|
|
56
|
-
' "answers": [',
|
|
57
|
-
' { "request_id": "<one of the request_ids above>", "answer": { "governs": "stated | structural | revealed" } },',
|
|
58
|
-
' { "request_id": "<one of the request_ids above>", "answer": "rewrite_all" },',
|
|
59
|
-
' { "request_id": "<one of the request_ids above>", "answer": "leave_open" }',
|
|
60
|
-
" ]",
|
|
61
|
-
"}",
|
|
65
|
+
...exampleLines(asked),
|
|
62
66
|
"```",
|
|
63
67
|
"",
|
|
64
|
-
"
|
|
65
|
-
"
|
|
68
|
+
"Copy each `request_id` character for character from the question block above. The tool refuses an",
|
|
69
|
+
"id it did not ask, because an id it cannot match is an answer it would discard in silence — and",
|
|
70
|
+
"the questions you did answer would then record as left open.",
|
|
71
|
+
"",
|
|
72
|
+
"If the user stops mid-loop, write the answers you have and omit the rest. An omitted question",
|
|
73
|
+
"records as `leave_open`. When the answers are written, run:",
|
|
66
74
|
"",
|
|
67
75
|
` ${opts.continueCommand}`,
|
|
68
76
|
"",
|
|
69
77
|
].join("\n");
|
|
70
78
|
}
|
|
79
|
+
/**
|
|
80
|
+
* The question heading: dimension, relation, and the SPLIT when one is recorded.
|
|
81
|
+
*
|
|
82
|
+
* An absent split is omitted rather than filled in. Falling back to the relation
|
|
83
|
+
* printed it twice (`presence · complementary · complementary`), which reads as a
|
|
84
|
+
* repeated word instead of as an absent fact.
|
|
85
|
+
*/
|
|
86
|
+
function headingFor(q) {
|
|
87
|
+
const subsystem = q.subsystem_id ? `subsystem \`${q.subsystem_id}\` · ` : "";
|
|
88
|
+
const split = !q.split
|
|
89
|
+
? ""
|
|
90
|
+
: q.split.kind === "three_way"
|
|
91
|
+
? " · split: three ways, no two accounts agree"
|
|
92
|
+
: ` · split: two against one, \`${q.split.odd}\` the odd account`;
|
|
93
|
+
return `${subsystem}${q.dimension} · ${q.relation}${split}`;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* The channels that hold NO account of this goal — the other half of a `presence`
|
|
97
|
+
* difference, and unstated everywhere else. A reader deciding which account
|
|
98
|
+
* governs needs to know that a channel is silent, not absent from the render.
|
|
99
|
+
*/
|
|
100
|
+
function silentChannelsLine(q) {
|
|
101
|
+
const spoke = new Set(q.accounts.map((a) => a.kind));
|
|
102
|
+
const silent = CharterLaneKindSchema.options.filter((k) => !spoke.has(k));
|
|
103
|
+
return silent.length === 0
|
|
104
|
+
? []
|
|
105
|
+
: [`- silent (no account of this goal at all): ${silent.map((k) => `**${k}**`).join(", ")}`];
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* The worked example, built from the REAL queue. Every `request_id` is one the
|
|
109
|
+
* tool asked, and every `governs` channel is one its question shows, so the
|
|
110
|
+
* example is a submission the gate accepts — and a host that copies it cannot
|
|
111
|
+
* copy a placeholder into a value.
|
|
112
|
+
*/
|
|
113
|
+
function exampleLines(asked) {
|
|
114
|
+
if (asked.length === 0)
|
|
115
|
+
return ["{", ' "answers": []', "}"];
|
|
116
|
+
const entries = [
|
|
117
|
+
` { "request_id": ${JSON.stringify(asked[0].request_id)}, "answer": { "governs": ${JSON.stringify(asked[0].accounts[0].kind)} } }`,
|
|
118
|
+
...(asked.length > 1
|
|
119
|
+
? [` { "request_id": ${JSON.stringify(asked[1].request_id)}, "answer": "leave_open" }`]
|
|
120
|
+
: []),
|
|
121
|
+
];
|
|
122
|
+
return ["{", ' "answers": [', entries.join(",\n"), " ]", "}"];
|
|
123
|
+
}
|
|
71
124
|
//# sourceMappingURL=charterClarificationPrompt.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"charterClarificationPrompt.js","sourceRoot":"","sources":["../../../src/audit/cli/charterClarificationPrompt.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"charterClarificationPrompt.js","sourceRoot":"","sources":["../../../src/audit/cli/charterClarificationPrompt.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAE3D;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,gCAAgC,CAC9C,MAAsB,EACtB,IAAsD;IAEtD,MAAM,KAAK,GAAgC,MAAM,CAAC,qBAAqB,EAAE,KAAK,IAAI,EAAE,CAAC;IAErF,MAAM,cAAc,GAAG,KAAK,CAAC,MAAM;QACjC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;YACtB,QAAQ,CAAC,GAAG,CAAC,MAAM,UAAU,CAAC,CAAC,CAAC,EAAE;YAClC,mBAAmB,CAAC,CAAC,UAAU,IAAI;YACnC,mBAAmB,CAAC,CAAC,KAAK,CAAC,YAAY,cAAc,CAAC,CAAC,KAAK,CAAC,aAAa,EAAE;YAC5E,GAAG,kBAAkB,CAAC,CAAC,CAAC;YACxB,GAAG,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;gBAC3B,OAAO,CAAC,CAAC,IAAI,YAAY,CAAC,CAAC,KAAK,EAAE;gBAClC,uEAAuE;gBACvE,uEAAuE;gBACvE,wDAAwD;gBACxD,GAAG,CAAC,CAAC,UAAU,CAAC,GAAG,CACjB,CAAC,CAAC,EAAE,EAAE,CAAC,SAAS,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAC7D;aACF,CAAC;YACF,EAAE;YACF,CAAC,CAAC,QAAQ;YACV,EAAE;SACH,CAAC;QACJ,CAAC,CAAC,CAAC,0DAA0D,CAAC,CAAC;IAEjE,OAAO;QACL,yCAAyC;QAC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
|
import type { ArtifactBundle } from "../io/artifacts.js";
|
|
2
2
|
/**
|
|
3
|
-
* Render the charter-COMPARISON host prompt (steps 2–3;
|
|
4
|
-
* docs/reviews/prompt-refinement-2026-09-13.md §9
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
3
|
+
* Render the charter-COMPARISON host prompt (steps 2–3; host text reviewed by the
|
|
4
|
+
* owner on 2026-09-17, recorded in docs/reviews/prompt-refinement-2026-09-13.md §9
|
|
5
|
+
* — the earlier "approved" label was DERIVED from the approved charter design,
|
|
6
|
+
* never given to this text). The host is the comparison reader: it authored none of
|
|
7
|
+
* the three lane DAGs; it confirms, rejects, widens or adds correspondences over the
|
|
8
|
+
* tool's candidates and records the typed differences. Routing, severity and
|
|
9
|
+
* finding-ness are never mentioned — the tool routes by the fixed table and the
|
|
10
|
+
* fidelity lane gates findings.
|
|
11
|
+
*
|
|
12
|
+
* Every rule the ingest validator enforces is STATED here, because obedience has to
|
|
13
|
+
* be sufficient: a reader that follows this prompt must produce a submission the
|
|
14
|
+
* tool accepts. Two rules were previously unstated — the silent-channel omission a
|
|
15
|
+
* `presence` difference needs, and the two-different-sides evidence test an added
|
|
16
|
+
* correspondence must pass. The first was also unsatisfiable on a two-channel
|
|
17
|
+
* correspondence until the account minimum became conditional on the dimension
|
|
18
|
+
* (`DifferenceInputSchema`, owner 2026-09-17).
|
|
9
19
|
*/
|
|
10
20
|
export declare function renderCharterComparisonPrompt(bundle: ArtifactBundle, opts: {
|
|
11
21
|
submissionPath: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"charterComparisonPrompt.d.ts","sourceRoot":"","sources":["../../../src/audit/cli/charterComparisonPrompt.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"charterComparisonPrompt.d.ts","sourceRoot":"","sources":["../../../src/audit/cli/charterComparisonPrompt.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AASzD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,6BAA6B,CAC3C,MAAM,EAAE,cAAc,EACtB,IAAI,EAAE;IACJ,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC,QAAQ,GAAG,YAAY,GAAG,UAAU,EAAE,MAAM,CAAC,CAAC;CACtE,GACA,MAAM,CAuIR"}
|
|
@@ -1,10 +1,25 @@
|
|
|
1
|
+
import { CharterProvenanceSchema } from "audit-tools/shared";
|
|
2
|
+
/** The provenance-kind alternation, DERIVED from the schema at render time. */
|
|
3
|
+
const PROVENANCE_KINDS = CharterProvenanceSchema.shape.kind.options
|
|
4
|
+
.map((k) => `\`${k}\``)
|
|
5
|
+
.join(", ");
|
|
1
6
|
/**
|
|
2
|
-
* Render the charter-COMPARISON host prompt (steps 2–3;
|
|
3
|
-
* docs/reviews/prompt-refinement-2026-09-13.md §9
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
7
|
+
* Render the charter-COMPARISON host prompt (steps 2–3; host text reviewed by the
|
|
8
|
+
* owner on 2026-09-17, recorded in docs/reviews/prompt-refinement-2026-09-13.md §9
|
|
9
|
+
* — the earlier "approved" label was DERIVED from the approved charter design,
|
|
10
|
+
* never given to this text). The host is the comparison reader: it authored none of
|
|
11
|
+
* the three lane DAGs; it confirms, rejects, widens or adds correspondences over the
|
|
12
|
+
* tool's candidates and records the typed differences. Routing, severity and
|
|
13
|
+
* finding-ness are never mentioned — the tool routes by the fixed table and the
|
|
14
|
+
* fidelity lane gates findings.
|
|
15
|
+
*
|
|
16
|
+
* Every rule the ingest validator enforces is STATED here, because obedience has to
|
|
17
|
+
* be sufficient: a reader that follows this prompt must produce a submission the
|
|
18
|
+
* tool accepts. Two rules were previously unstated — the silent-channel omission a
|
|
19
|
+
* `presence` difference needs, and the two-different-sides evidence test an added
|
|
20
|
+
* correspondence must pass. The first was also unsatisfiable on a two-channel
|
|
21
|
+
* correspondence until the account minimum became conditional on the dimension
|
|
22
|
+
* (`DifferenceInputSchema`, owner 2026-09-17).
|
|
8
23
|
*/
|
|
9
24
|
export function renderCharterComparisonPrompt(bundle, opts) {
|
|
10
25
|
const candidates = bundle.charter_register?.candidates ?? [];
|
|
@@ -16,9 +31,9 @@ export function renderCharterComparisonPrompt(bundle, opts) {
|
|
|
16
31
|
: `cross-ref: ${c.evidence_paths.join(", ")}`;
|
|
17
32
|
return `- \`${c.candidate_id}\` — ${a.kind}:\`${a.node_ids.join(",")}\` ↔ ${b.kind}:\`${b.node_ids.join(",")}\` (basis: ${basis})`;
|
|
18
33
|
})
|
|
19
|
-
: ["- (the tool found no candidates — add any correspondence you can evidence, or affirm
|
|
34
|
+
: ["- (the tool found no candidates — add any correspondence you can evidence, or affirm the empty result described under **Output**)"];
|
|
20
35
|
return [
|
|
21
|
-
"# Design review — charter comparison
|
|
36
|
+
"# Design review — charter comparison",
|
|
22
37
|
"",
|
|
23
38
|
"Three readers each built a goal graph of this repository from one evidence channel:",
|
|
24
39
|
"**stated** (docs and comments), **structural** (file tree, declarations, imports), **revealed**",
|
|
@@ -33,6 +48,10 @@ export function renderCharterComparisonPrompt(bundle, opts) {
|
|
|
33
48
|
`- structural: \`${opts.laneGraphPaths.structural}\``,
|
|
34
49
|
`- revealed: \`${opts.laneGraphPaths.revealed}\``,
|
|
35
50
|
"",
|
|
51
|
+
"Each node carries a `premise_height` the tool DERIVED from that lane's edges: 0 is the top",
|
|
52
|
+
"purpose, and a higher number is closer to a mechanism. Where a rule below says *the same level*,",
|
|
53
|
+
"it means the same `premise_height`. Never recompute one.",
|
|
54
|
+
"",
|
|
36
55
|
"## Candidate correspondences (tool-proposed)",
|
|
37
56
|
"",
|
|
38
57
|
"Each candidate pairs regions the tool found related by file overlap or by a provenance",
|
|
@@ -40,9 +59,21 @@ export function renderCharterComparisonPrompt(bundle, opts) {
|
|
|
40
59
|
"",
|
|
41
60
|
...candidateLines,
|
|
42
61
|
"",
|
|
62
|
+
"One verdict per candidate:",
|
|
63
|
+
"- `confirm` — the pairing is right as proposed.",
|
|
64
|
+
"- `reject` — the pairing is wrong. The tool drops it and records nothing.",
|
|
65
|
+
"- `widen` — the pairing is right but incomplete. List the FULL member set you mean, including the",
|
|
66
|
+
" nodes the candidate already named: the tool builds the correspondence from your `members` and",
|
|
67
|
+
" never from the candidate, so a member you leave out is a member you drop.",
|
|
68
|
+
"",
|
|
43
69
|
"Rules:",
|
|
44
70
|
"- A correspondence may join one node to one node, several nodes, or a connected subgraph on the other side.",
|
|
45
|
-
"- A correspondence
|
|
71
|
+
"- A correspondence must span at least two channels. Every `node_id` must exist in the graph of the channel you name it under.",
|
|
72
|
+
"- A correspondence you ADD (one with no `candidate_id`) must carry at least two evidence refs that",
|
|
73
|
+
" reach two DIFFERENT sides. A ref reaches a channel's side when its path appears in the `files`",
|
|
74
|
+
" scope of one of that channel's named nodes; a ref whose path no named node scopes counts as its",
|
|
75
|
+
" own side. Two refs inside one node's scope are ONE side. Every ref's path must exist in the",
|
|
76
|
+
" repository. The tool re-checks all of this and drops a correspondence with fewer than two sides.",
|
|
46
77
|
"- A node that matches nothing stays uncorresponded. Do not force a match.",
|
|
47
78
|
"",
|
|
48
79
|
"## Differences",
|
|
@@ -53,19 +84,26 @@ export function renderCharterComparisonPrompt(bundle, opts) {
|
|
|
53
84
|
"| Dimension | File here when |",
|
|
54
85
|
"|---|---|",
|
|
55
86
|
"| `purpose` | Holding the subsystem fixed, the goal labels still contradict (an explicit non-goal against a pursued goal files here) |",
|
|
56
|
-
"| `presence` |
|
|
87
|
+
"| `presence` | One channel of the correspondence has no node for the goal at that `premise_height`, and it should have |",
|
|
57
88
|
"| `responsibility` | Goal labels match, owner or location differs |",
|
|
58
89
|
"| `hierarchy` | The node matches, the parents or subgoals differ |",
|
|
59
90
|
"| `scope` | Adding a when / for-whom / to-what-extent qualifier reconciles the claims |",
|
|
60
91
|
"| `standing` | The claims reconcile once versioned in time: planned, active, deprecated, removed |",
|
|
61
92
|
"| `standard` | Both agree on what and where, disagree on how well |",
|
|
62
93
|
"",
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
94
|
+
"Give each difference one `accounts` entry per channel that HAS an account, and one `relation`",
|
|
95
|
+
"judged across all of them: `equivalent` (same claim, other words), `complementary` (no account",
|
|
96
|
+
"contradicts another), or `incompatible` (some two cannot both hold). An `incompatible` difference",
|
|
97
|
+
"also carries a `split`: `two_against_one` naming the odd channel, or `three_way`. Any other",
|
|
98
|
+
"relation carries no `split` at all. Every dimension except `presence` needs an account from at",
|
|
99
|
+
"least two channels: one account contradicts nothing, so it is not a difference.",
|
|
100
|
+
"",
|
|
101
|
+
"A `presence` difference is the ONE case where a channel of the correspondence gets no account:",
|
|
102
|
+
"leave the silent channel out of `accounts` entirely — its absence is how the tool identifies it,",
|
|
103
|
+
"and the route depends on which channel it is. Leave out exactly ONE channel. An account for every",
|
|
104
|
+
"channel says nothing is absent, and two omissions leave the tool nothing to route on; the tool",
|
|
105
|
+
"refuses both. Then set `covered_channel_gap` to `true` when the silent channel's own evidence",
|
|
106
|
+
"should have covered this goal, and `false` when its silence is expected.",
|
|
69
107
|
"",
|
|
70
108
|
"## Output",
|
|
71
109
|
"",
|
|
@@ -75,36 +113,45 @@ export function renderCharterComparisonPrompt(bundle, opts) {
|
|
|
75
113
|
"{",
|
|
76
114
|
' "correspondences": [',
|
|
77
115
|
" {",
|
|
78
|
-
' "
|
|
79
|
-
' "verdict": "confirm | reject | widen",',
|
|
116
|
+
' "verdict": "confirm",',
|
|
80
117
|
' "members": [',
|
|
81
|
-
' { "kind": "stated", "node_ids": ["
|
|
82
|
-
' { "kind": "
|
|
118
|
+
' { "kind": "stated", "node_ids": ["keepable-delivery-windows"] },',
|
|
119
|
+
' { "kind": "structural", "node_ids": ["window-module"] },',
|
|
120
|
+
' { "kind": "revealed", "node_ids": ["window-solver", "fleet-capacity"] }',
|
|
83
121
|
" ],",
|
|
84
|
-
' "evidence": [
|
|
122
|
+
' "evidence": [',
|
|
123
|
+
' { "kind": "doc", "ref": "docs/scheduling.md#Goals", "quote": "never promise a window the fleet cannot keep" },',
|
|
124
|
+
' { "kind": "code", "ref": "src/scheduling/window.ts#DeliveryWindow", "quote": "class DeliveryWindow {" },',
|
|
125
|
+
' { "kind": "code", "ref": "src/scheduling/fleet.ts#capacityFor", "quote": "export function capacityFor" }',
|
|
126
|
+
" ]",
|
|
85
127
|
" }",
|
|
86
128
|
" ],",
|
|
87
129
|
' "differences": [',
|
|
88
130
|
" {",
|
|
89
|
-
' "correspondence":
|
|
131
|
+
' "correspondence": 0,',
|
|
90
132
|
' "dimension": "standing",',
|
|
91
133
|
' "relation": "incompatible",',
|
|
92
134
|
' "split": { "kind": "two_against_one", "odd": "stated" },',
|
|
93
135
|
' "accounts": [',
|
|
94
|
-
' { "kind": "stated", "claim": "
|
|
95
|
-
' { "kind": "structural", "claim": "
|
|
96
|
-
' { "kind": "revealed", "claim": "
|
|
136
|
+
' { "kind": "stated", "claim": "Same-day windows are planned", "provenance": [{ "kind": "doc", "ref": "docs/roadmap.md:40", "quote": "same-day windows planned" }] },',
|
|
137
|
+
' { "kind": "structural", "claim": "Same-day windows are a shipped module", "provenance": [{ "kind": "code", "ref": "src/scheduling/sameDay.ts#sameDayWindow", "quote": "export { sameDayWindow }" }] },',
|
|
138
|
+
' { "kind": "revealed", "claim": "Same-day windows are computed and served", "provenance": [{ "kind": "code", "ref": "src/scheduling/sameDay.ts#solve", "quote": "export function solve" }] }',
|
|
97
139
|
" ],",
|
|
98
|
-
' "gap": "The roadmap describes as planned what the code already ships."
|
|
99
|
-
' "covered_channel_gap": false',
|
|
140
|
+
' "gap": "The roadmap describes as planned what the code already ships."',
|
|
100
141
|
" }",
|
|
101
142
|
" ]",
|
|
102
143
|
"}",
|
|
103
144
|
"```",
|
|
104
145
|
"",
|
|
105
|
-
"
|
|
146
|
+
"The example is drawn from an UNRELATED codebase — a delivery-scheduling service — so that you do",
|
|
147
|
+
"not pattern-match it onto the graphs you are reading. It ADDS a correspondence, so it carries no",
|
|
148
|
+
"`candidate_id`; for a tool candidate, copy the `candidate_id` verbatim from the list above.",
|
|
149
|
+
"",
|
|
150
|
+
"- `correspondence`: the `candidate_id` when the correspondence carries one, otherwise its 0-based position in your `correspondences` array.",
|
|
151
|
+
`- \`kind\` on an evidence or provenance entry: one of ${PROVENANCE_KINDS}.`,
|
|
152
|
+
"- Every `kind` on a member or an account is one of `stated`, `structural`, `revealed`, and an account's channel must belong to its correspondence.",
|
|
106
153
|
"- `equivalent` differences are welcome: they corroborate the match.",
|
|
107
|
-
'- If no candidate and no addition corresponds anywhere, write `"correspondences": []` and `"differences": []` and set `"no_correspondences": true`.',
|
|
154
|
+
'- If no candidate and no addition corresponds anywhere, write `"correspondences": []` and `"differences": []` and set `"no_correspondences": true`. Set that flag ONLY then — alongside a confirmed correspondence it contradicts itself and the tool refuses the submission.',
|
|
108
155
|
"",
|
|
109
156
|
].join("\n");
|
|
110
157
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"charterComparisonPrompt.js","sourceRoot":"","sources":["../../../src/audit/cli/charterComparisonPrompt.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"charterComparisonPrompt.js","sourceRoot":"","sources":["../../../src/audit/cli/charterComparisonPrompt.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAG7D,+EAA+E;AAC/E,MAAM,gBAAgB,GAAG,uBAAuB,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO;KAChE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC;KACtB,IAAI,CAAC,IAAI,CAAC,CAAC;AAEd;;;;;;;;;;;;;;;;;GAiBG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kG;QAClG,kGAAkG;QAClG,6FAA6F;QAC7F,EAAE;QACF,6IAA6I;QAC7I,yDAAyD,gBAAgB,GAAG;QAC5E,oJAAoJ;QACpJ,qEAAqE;QACrE,+QAA+Q;QAC/Q,EAAE;KACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import type { ArtifactBundle } from "../io/artifacts.js";
|
|
2
1
|
import type { Ceiling, CharterLaneKind } from "audit-tools/shared";
|
|
3
2
|
/**
|
|
4
|
-
* Per-kind charter-extraction LANE prompts (step 1 of the charter layer;
|
|
5
|
-
*
|
|
3
|
+
* Per-kind charter-extraction LANE prompts (step 1 of the charter layer; host text
|
|
4
|
+
* reviewed by the owner on 2026-09-17, recorded in
|
|
5
|
+
* docs/reviews/prompt-refinement-2026-09-13.md §8 — the earlier "approved" label
|
|
6
|
+
* was DERIVED from the approved charter design, never given to this text). The host supplies
|
|
6
7
|
* JUDGMENT — one goal DAG per lane, purposes in TELOS terms, edges meaning
|
|
7
8
|
* `from` SERVES `to`, evidence on nodes and edges — while the tool supplies
|
|
8
9
|
* ENFORCEMENT at ingest (packet feeding, universe grounding, cycle refusal, level
|
|
@@ -26,7 +27,7 @@ export declare function charterExtractionKindsForCeiling(_ceiling: Ceiling): Est
|
|
|
26
27
|
* only its own kind's perspective, its materialized evidence packet, and its
|
|
27
28
|
* submission path.
|
|
28
29
|
*/
|
|
29
|
-
export declare function renderCharterKindLanePrompt(
|
|
30
|
+
export declare function renderCharterKindLanePrompt(opts: {
|
|
30
31
|
kind: EstimatorCharterKind;
|
|
31
32
|
submissionPath: string;
|
|
32
33
|
packetPath: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"charterExtractionPrompt.d.ts","sourceRoot":"","sources":["../../../src/audit/cli/charterExtractionPrompt.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"charterExtractionPrompt.d.ts","sourceRoot":"","sources":["../../../src/audit/cli/charterExtractionPrompt.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAKnE;;;;;;;;;;;;;;GAcG;AAEH,uEAAuE;AACvE,MAAM,MAAM,oBAAoB,GAAG,eAAe,CAAC;AAEnD;;;;GAIG;AACH,wBAAgB,gCAAgC,CAC9C,QAAQ,EAAE,OAAO,GAChB,oBAAoB,EAAE,CAExB;AAkDD;;;;GAIG;AACH,wBAAgB,2BAA2B,CAAC,IAAI,EAAE;IAChD,IAAI,EAAE,oBAAoB,CAAC;IAC3B,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;CACpB,GAAG,MAAM,CA0GT"}
|