audit-tools 0.51.7 → 0.51.9
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/clarification/blastRadius.d.ts +17 -16
- package/dist/audit/clarification/blastRadius.d.ts.map +1 -1
- package/dist/audit/clarification/blastRadius.js +48 -44
- package/dist/audit/clarification/blastRadius.js.map +1 -1
- package/dist/audit/clarification/dials.d.ts +4 -4
- package/dist/audit/clarification/dials.d.ts.map +1 -1
- package/dist/audit/clarification/dials.js +1 -0
- package/dist/audit/clarification/dials.js.map +1 -1
- package/dist/audit/clarification/partition.d.ts +12 -21
- package/dist/audit/clarification/partition.d.ts.map +1 -1
- package/dist/audit/clarification/partition.js +52 -59
- package/dist/audit/clarification/partition.js.map +1 -1
- package/dist/audit/clarification/riskGate.d.ts +2 -2
- package/dist/audit/clarification/riskGate.d.ts.map +1 -1
- package/dist/audit/clarification/riskGate.js +1 -0
- package/dist/audit/clarification/riskGate.js.map +1 -1
- package/dist/audit/clarification/voiQueue.d.ts +3 -3
- package/dist/audit/clarification/voiQueue.d.ts.map +1 -1
- package/dist/audit/clarification/voiQueue.js +1 -0
- package/dist/audit/clarification/voiQueue.js.map +1 -1
- package/dist/audit/cli/auditStep.d.ts +14 -2
- package/dist/audit/cli/auditStep.d.ts.map +1 -1
- package/dist/audit/cli/auditStep.js +13 -5
- package/dist/audit/cli/auditStep.js.map +1 -1
- package/dist/audit/cli/charterClarificationPrompt.d.ts +6 -9
- package/dist/audit/cli/charterClarificationPrompt.d.ts.map +1 -1
- package/dist/audit/cli/charterClarificationPrompt.js +35 -47
- package/dist/audit/cli/charterClarificationPrompt.js.map +1 -1
- package/dist/audit/cli/charterComparisonPrompt.d.ts +14 -0
- package/dist/audit/cli/charterComparisonPrompt.d.ts.map +1 -0
- package/dist/audit/cli/charterComparisonPrompt.js +111 -0
- package/dist/audit/cli/charterComparisonPrompt.js.map +1 -0
- package/dist/audit/cli/charterExtractionPrompt.d.ts +14 -17
- package/dist/audit/cli/charterExtractionPrompt.d.ts.map +1 -1
- package/dist/audit/cli/charterExtractionPrompt.js +81 -104
- package/dist/audit/cli/charterExtractionPrompt.js.map +1 -1
- package/dist/audit/cli/charterFidelityPrompt.d.ts +14 -0
- package/dist/audit/cli/charterFidelityPrompt.d.ts.map +1 -0
- package/dist/audit/cli/charterFidelityPrompt.js +58 -0
- package/dist/audit/cli/charterFidelityPrompt.js.map +1 -0
- package/dist/audit/cli/conceptualDispatch.d.ts +39 -6
- package/dist/audit/cli/conceptualDispatch.d.ts.map +1 -1
- package/dist/audit/cli/conceptualDispatch.js +59 -12
- package/dist/audit/cli/conceptualDispatch.js.map +1 -1
- package/dist/audit/cli/confirmIntentStep.d.ts.map +1 -1
- package/dist/audit/cli/confirmIntentStep.js +46 -2
- package/dist/audit/cli/confirmIntentStep.js.map +1 -1
- package/dist/audit/cli/dispatch/hostHandoff.d.ts +18 -6
- package/dist/audit/cli/dispatch/hostHandoff.d.ts.map +1 -1
- package/dist/audit/cli/dispatch/hostHandoff.js +525 -67
- package/dist/audit/cli/dispatch/hostHandoff.js.map +1 -1
- package/dist/audit/cli/fanoutLanes.d.ts +24 -0
- package/dist/audit/cli/fanoutLanes.d.ts.map +1 -1
- package/dist/audit/cli/fanoutLanes.js +9 -1
- package/dist/audit/cli/fanoutLanes.js.map +1 -1
- package/dist/audit/cli/foldTransaction.d.ts.map +1 -1
- package/dist/audit/cli/foldTransaction.js +14 -3
- package/dist/audit/cli/foldTransaction.js.map +1 -1
- package/dist/audit/cli/forceSynthesisCommand.d.ts.map +1 -1
- package/dist/audit/cli/forceSynthesisCommand.js +4 -1
- package/dist/audit/cli/forceSynthesisCommand.js.map +1 -1
- package/dist/audit/cli/intakeCommand.d.ts.map +1 -1
- package/dist/audit/cli/intakeCommand.js +1 -0
- package/dist/audit/cli/intakeCommand.js.map +1 -1
- package/dist/audit/cli/laneSubmissions.d.ts +18 -12
- package/dist/audit/cli/laneSubmissions.d.ts.map +1 -1
- package/dist/audit/cli/laneSubmissions.js +40 -4
- package/dist/audit/cli/laneSubmissions.js.map +1 -1
- package/dist/audit/cli/laneValidators.d.ts.map +1 -1
- package/dist/audit/cli/laneValidators.js +14 -14
- package/dist/audit/cli/laneValidators.js.map +1 -1
- package/dist/audit/cli/nextStepCommand.d.ts +7 -0
- package/dist/audit/cli/nextStepCommand.d.ts.map +1 -1
- package/dist/audit/cli/nextStepCommand.js +206 -31
- package/dist/audit/cli/nextStepCommand.js.map +1 -1
- package/dist/audit/cli/nextStepHelpers.d.ts +92 -28
- package/dist/audit/cli/nextStepHelpers.d.ts.map +1 -1
- package/dist/audit/cli/nextStepHelpers.js +363 -126
- package/dist/audit/cli/nextStepHelpers.js.map +1 -1
- package/dist/audit/cli/prompts.d.ts +10 -0
- package/dist/audit/cli/prompts.d.ts.map +1 -1
- package/dist/audit/cli/prompts.js +3 -1
- package/dist/audit/cli/prompts.js.map +1 -1
- package/dist/audit/cli/reviewRun.d.ts +12 -0
- package/dist/audit/cli/reviewRun.d.ts.map +1 -1
- package/dist/audit/cli/reviewRun.js +242 -29
- package/dist/audit/cli/reviewRun.js.map +1 -1
- package/dist/audit/cli/sampleRunCommand.d.ts +12 -4
- package/dist/audit/cli/sampleRunCommand.d.ts.map +1 -1
- package/dist/audit/cli/semanticReviewStep.d.ts +9 -0
- package/dist/audit/cli/semanticReviewStep.d.ts.map +1 -1
- package/dist/audit/cli/semanticReviewStep.js +71 -30
- package/dist/audit/cli/semanticReviewStep.js.map +1 -1
- package/dist/audit/cli/statusCommand.d.ts.map +1 -1
- package/dist/audit/cli/statusCommand.js +29 -66
- package/dist/audit/cli/statusCommand.js.map +1 -1
- package/dist/audit/cli/stepScaffold.d.ts +43 -2
- package/dist/audit/cli/stepScaffold.d.ts.map +1 -1
- package/dist/audit/cli/stepScaffold.js +24 -10
- package/dist/audit/cli/stepScaffold.js.map +1 -1
- package/dist/audit/cli/steps.d.ts +52 -29
- package/dist/audit/cli/steps.d.ts.map +1 -1
- package/dist/audit/cli/steps.js +44 -14
- package/dist/audit/cli/steps.js.map +1 -1
- package/dist/audit/cli/synthesizeCommand.d.ts.map +1 -1
- package/dist/audit/cli/synthesizeCommand.js +4 -1
- package/dist/audit/cli/synthesizeCommand.js.map +1 -1
- package/dist/audit/contracts/workerSchemas.d.ts +65 -16
- package/dist/audit/contracts/workerSchemas.d.ts.map +1 -1
- package/dist/audit/contracts/workerSchemas.js +89 -8
- package/dist/audit/contracts/workerSchemas.js.map +1 -1
- package/dist/audit/contracts/wrapperResponse.d.ts +14 -21
- package/dist/audit/contracts/wrapperResponse.d.ts.map +1 -1
- package/dist/audit/contracts/wrapperResponse.js +0 -1
- package/dist/audit/contracts/wrapperResponse.js.map +1 -1
- package/dist/audit/decompose/findings.d.ts.map +1 -1
- package/dist/audit/decompose/findings.js +10 -2
- package/dist/audit/decompose/findings.js.map +1 -1
- package/dist/audit/extractors/designAssessment.d.ts.map +1 -1
- package/dist/audit/extractors/designAssessment.js +13 -4
- package/dist/audit/extractors/designAssessment.js.map +1 -1
- package/dist/audit/extractors/disposition.d.ts.map +1 -1
- package/dist/audit/extractors/disposition.js +17 -5
- package/dist/audit/extractors/disposition.js.map +1 -1
- package/dist/audit/extractors/graph.d.ts +1 -1
- package/dist/audit/extractors/graph.js +1 -1
- package/dist/audit/extractors/graphRoutes.d.ts.map +1 -1
- package/dist/audit/extractors/graphRoutes.js +224 -17
- package/dist/audit/extractors/graphRoutes.js.map +1 -1
- package/dist/audit/extractors/leadLineage.d.ts +10 -0
- package/dist/audit/extractors/leadLineage.d.ts.map +1 -0
- package/dist/audit/extractors/leadLineage.js +44 -0
- package/dist/audit/extractors/leadLineage.js.map +1 -0
- package/dist/audit/io/artifacts.d.ts.map +1 -1
- package/dist/audit/io/artifacts.js +25 -8
- package/dist/audit/io/artifacts.js.map +1 -1
- package/dist/audit/io/runArtifacts.d.ts +76 -1
- package/dist/audit/io/runArtifacts.d.ts.map +1 -1
- package/dist/audit/io/runArtifacts.js +113 -20
- package/dist/audit/io/runArtifacts.js.map +1 -1
- package/dist/audit/io/toolingManifest.d.ts +15 -0
- package/dist/audit/io/toolingManifest.d.ts.map +1 -1
- package/dist/audit/io/toolingManifest.js +158 -11
- package/dist/audit/io/toolingManifest.js.map +1 -1
- package/dist/audit/orchestrator/advance.d.ts.map +1 -1
- package/dist/audit/orchestrator/advance.js +30 -4
- package/dist/audit/orchestrator/advance.js.map +1 -1
- package/dist/audit/orchestrator/advanceTypes.d.ts +28 -5
- package/dist/audit/orchestrator/advanceTypes.d.ts.map +1 -1
- package/dist/audit/orchestrator/artifactMetadata.d.ts.map +1 -1
- package/dist/audit/orchestrator/artifactMetadata.js +39 -1
- package/dist/audit/orchestrator/artifactMetadata.js.map +1 -1
- package/dist/audit/orchestrator/auditTaskUtils.d.ts.map +1 -1
- package/dist/audit/orchestrator/auditTaskUtils.js +4 -1
- package/dist/audit/orchestrator/auditTaskUtils.js.map +1 -1
- package/dist/audit/orchestrator/charterClarificationExecutor.d.ts +11 -17
- package/dist/audit/orchestrator/charterClarificationExecutor.d.ts.map +1 -1
- package/dist/audit/orchestrator/charterClarificationExecutor.js +61 -93
- package/dist/audit/orchestrator/charterClarificationExecutor.js.map +1 -1
- package/dist/audit/orchestrator/charterComparisonExecutor.d.ts +24 -0
- package/dist/audit/orchestrator/charterComparisonExecutor.d.ts.map +1 -0
- package/dist/audit/orchestrator/charterComparisonExecutor.js +110 -0
- package/dist/audit/orchestrator/charterComparisonExecutor.js.map +1 -0
- package/dist/audit/orchestrator/charterExtractionExecutor.d.ts +34 -20
- package/dist/audit/orchestrator/charterExtractionExecutor.d.ts.map +1 -1
- package/dist/audit/orchestrator/charterExtractionExecutor.js +80 -106
- package/dist/audit/orchestrator/charterExtractionExecutor.js.map +1 -1
- package/dist/audit/orchestrator/charterFidelityExecutor.d.ts +20 -0
- package/dist/audit/orchestrator/charterFidelityExecutor.d.ts.map +1 -0
- package/dist/audit/orchestrator/charterFidelityExecutor.js +76 -0
- package/dist/audit/orchestrator/charterFidelityExecutor.js.map +1 -0
- package/dist/audit/orchestrator/charterFidelityPacket.d.ts +7 -0
- package/dist/audit/orchestrator/charterFidelityPacket.d.ts.map +1 -0
- package/dist/audit/orchestrator/charterFidelityPacket.js +68 -0
- package/dist/audit/orchestrator/charterFidelityPacket.js.map +1 -0
- package/dist/audit/orchestrator/dependencyMap.d.ts.map +1 -1
- package/dist/audit/orchestrator/dependencyMap.js +9 -8
- package/dist/audit/orchestrator/dependencyMap.js.map +1 -1
- package/dist/audit/orchestrator/dependencySlices.d.ts.map +1 -1
- package/dist/audit/orchestrator/dependencySlices.js +7 -6
- package/dist/audit/orchestrator/dependencySlices.js.map +1 -1
- package/dist/audit/orchestrator/designReviewProjection.d.ts.map +1 -1
- package/dist/audit/orchestrator/designReviewProjection.js +7 -0
- package/dist/audit/orchestrator/designReviewProjection.js.map +1 -1
- package/dist/audit/orchestrator/designReviewPrompt.d.ts.map +1 -1
- package/dist/audit/orchestrator/designReviewPrompt.js +58 -19
- package/dist/audit/orchestrator/designReviewPrompt.js.map +1 -1
- package/dist/audit/orchestrator/executorRunners.d.ts.map +1 -1
- package/dist/audit/orchestrator/executorRunners.js +6 -2
- package/dist/audit/orchestrator/executorRunners.js.map +1 -1
- package/dist/audit/orchestrator/executors.d.ts.map +1 -1
- package/dist/audit/orchestrator/executors.js +22 -8
- package/dist/audit/orchestrator/executors.js.map +1 -1
- package/dist/audit/orchestrator/hostInputPause.js +1 -0
- package/dist/audit/orchestrator/hostInputPause.js.map +1 -1
- package/dist/audit/orchestrator/intentCheckpointExecutor.d.ts +40 -0
- package/dist/audit/orchestrator/intentCheckpointExecutor.d.ts.map +1 -1
- package/dist/audit/orchestrator/intentCheckpointExecutor.js +32 -2
- package/dist/audit/orchestrator/intentCheckpointExecutor.js.map +1 -1
- package/dist/audit/orchestrator/intentCheckpointGate.d.ts +5 -3
- package/dist/audit/orchestrator/intentCheckpointGate.d.ts.map +1 -1
- package/dist/audit/orchestrator/intentCheckpointGate.js +34 -5
- package/dist/audit/orchestrator/intentCheckpointGate.js.map +1 -1
- package/dist/audit/orchestrator/intentEquivalenceExecutor.d.ts +2 -2
- package/dist/audit/orchestrator/intentInterpreter.d.ts +1 -1
- package/dist/audit/orchestrator/intentInterpreter.js +1 -1
- package/dist/audit/orchestrator/nextStep.d.ts.map +1 -1
- package/dist/audit/orchestrator/nextStep.js +3 -1
- package/dist/audit/orchestrator/nextStep.js.map +1 -1
- package/dist/audit/orchestrator/obligationPolicy.d.ts +2 -1
- package/dist/audit/orchestrator/obligationPolicy.d.ts.map +1 -1
- package/dist/audit/orchestrator/obligationPolicy.js +19 -7
- package/dist/audit/orchestrator/obligationPolicy.js.map +1 -1
- package/dist/audit/orchestrator/partitionTaskGraph.d.ts.map +1 -1
- package/dist/audit/orchestrator/partitionTaskGraph.js +1 -0
- package/dist/audit/orchestrator/partitionTaskGraph.js.map +1 -1
- package/dist/audit/orchestrator/resultIngestion.d.ts.map +1 -1
- package/dist/audit/orchestrator/resultIngestion.js +3 -1
- package/dist/audit/orchestrator/resultIngestion.js.map +1 -1
- package/dist/audit/orchestrator/runtimeCommand.d.ts +72 -0
- package/dist/audit/orchestrator/runtimeCommand.d.ts.map +1 -1
- package/dist/audit/orchestrator/runtimeCommand.js +177 -20
- package/dist/audit/orchestrator/runtimeCommand.js.map +1 -1
- package/dist/audit/orchestrator/scopeIndexBaseline.d.ts +56 -0
- package/dist/audit/orchestrator/scopeIndexBaseline.d.ts.map +1 -0
- package/dist/audit/orchestrator/scopeIndexBaseline.js +114 -0
- package/dist/audit/orchestrator/scopeIndexBaseline.js.map +1 -0
- package/dist/audit/orchestrator/staleness.d.ts +70 -1
- package/dist/audit/orchestrator/staleness.d.ts.map +1 -1
- package/dist/audit/orchestrator/staleness.js +171 -21
- package/dist/audit/orchestrator/staleness.js.map +1 -1
- package/dist/audit/orchestrator/state.d.ts.map +1 -1
- package/dist/audit/orchestrator/state.js +49 -25
- package/dist/audit/orchestrator/state.js.map +1 -1
- package/dist/audit/orchestrator/structureExecutors.d.ts.map +1 -1
- package/dist/audit/orchestrator/structureExecutors.js +7 -5
- package/dist/audit/orchestrator/structureExecutors.js.map +1 -1
- package/dist/audit/orchestrator/syntaxResolutionExecutor.d.ts.map +1 -1
- package/dist/audit/orchestrator/syntaxResolutionExecutor.js +1 -0
- package/dist/audit/orchestrator/syntaxResolutionExecutor.js.map +1 -1
- package/dist/audit/orchestrator/systemicChallengeExecutor.d.ts +13 -2
- package/dist/audit/orchestrator/systemicChallengeExecutor.d.ts.map +1 -1
- package/dist/audit/orchestrator/systemicChallengeExecutor.js +166 -12
- package/dist/audit/orchestrator/systemicChallengeExecutor.js.map +1 -1
- package/dist/audit/reporting/mergeFindings.d.ts.map +1 -1
- package/dist/audit/reporting/mergeFindings.js +6 -5
- package/dist/audit/reporting/mergeFindings.js.map +1 -1
- package/dist/audit/reporting/synthesis.d.ts +117 -0
- package/dist/audit/reporting/synthesis.d.ts.map +1 -1
- package/dist/audit/reporting/synthesis.js +277 -10
- package/dist/audit/reporting/synthesis.js.map +1 -1
- package/dist/audit/supervisor/operatorHandoff.d.ts +0 -2
- package/dist/audit/supervisor/operatorHandoff.d.ts.map +1 -1
- package/dist/audit/supervisor/operatorHandoff.js +0 -3
- package/dist/audit/supervisor/operatorHandoff.js.map +1 -1
- package/dist/audit/systemic/coveredThemes.d.ts +28 -0
- package/dist/audit/systemic/coveredThemes.d.ts.map +1 -0
- package/dist/audit/systemic/coveredThemes.js +52 -0
- package/dist/audit/systemic/coveredThemes.js.map +1 -0
- package/dist/audit/systemic/reviewFileMap.d.ts +81 -0
- package/dist/audit/systemic/reviewFileMap.d.ts.map +1 -0
- package/dist/audit/systemic/reviewFileMap.js +169 -0
- package/dist/audit/systemic/reviewFileMap.js.map +1 -0
- package/dist/audit/systemic/secondOrderAdversaryPrompt.d.ts.map +1 -1
- package/dist/audit/systemic/secondOrderAdversaryPrompt.js +149 -26
- package/dist/audit/systemic/secondOrderAdversaryPrompt.js.map +1 -1
- package/dist/audit/systemic/systemicChallengeLoop.d.ts +44 -4
- package/dist/audit/systemic/systemicChallengeLoop.d.ts.map +1 -1
- package/dist/audit/systemic/systemicChallengeLoop.js +114 -10
- package/dist/audit/systemic/systemicChallengeLoop.js.map +1 -1
- package/dist/audit/types/auditState.d.ts +6 -6
- package/dist/audit/types/charterClarification.d.ts +9 -4
- package/dist/audit/types/charterClarification.d.ts.map +1 -1
- package/dist/audit/types/charterRegister.d.ts +48 -93
- package/dist/audit/types/charterRegister.d.ts.map +1 -1
- package/dist/audit/types/charterRegister.js +15 -26
- package/dist/audit/types/charterRegister.js.map +1 -1
- package/dist/audit/types/conceptualAdjudication.d.ts +88 -18
- package/dist/audit/types/conceptualAdjudication.d.ts.map +1 -1
- package/dist/audit/types/conceptualAdjudication.js +77 -16
- package/dist/audit/types/conceptualAdjudication.js.map +1 -1
- package/dist/audit/types/designAssessment.d.ts +8 -6
- package/dist/audit/types/designAssessment.d.ts.map +1 -1
- package/dist/audit/types/reviewPlanning.d.ts +2 -2
- package/dist/audit/types/systemicChallenge.d.ts +43 -7
- package/dist/audit/types/systemicChallenge.d.ts.map +1 -1
- package/dist/audit/types.d.ts +71 -10
- package/dist/audit/types.d.ts.map +1 -1
- package/dist/audit/types.js +23 -2
- package/dist/audit/types.js.map +1 -1
- package/dist/audit/validation/auditResults.d.ts +30 -0
- package/dist/audit/validation/auditResults.d.ts.map +1 -1
- package/dist/audit/validation/auditResults.js +50 -8
- package/dist/audit/validation/auditResults.js.map +1 -1
- package/dist/audit/validation/ingestIssueCodes.d.ts +1 -1
- package/dist/audit/validation/ingestIssueCodes.d.ts.map +1 -1
- package/dist/audit/validation/ingestIssueCodes.js +14 -0
- package/dist/audit/validation/ingestIssueCodes.js.map +1 -1
- package/dist/remediate/contractPipeline/artifactStore.d.ts +97 -2
- package/dist/remediate/contractPipeline/artifactStore.d.ts.map +1 -1
- package/dist/remediate/contractPipeline/artifactStore.js +163 -9
- package/dist/remediate/contractPipeline/artifactStore.js.map +1 -1
- package/dist/remediate/contractPipeline/changeClassification.d.ts.map +1 -1
- package/dist/remediate/contractPipeline/changeClassification.js +93 -3
- package/dist/remediate/contractPipeline/changeClassification.js.map +1 -1
- package/dist/remediate/contractPipeline/cyclicSeamResolution.d.ts.map +1 -1
- package/dist/remediate/contractPipeline/cyclicSeamResolution.js +31 -0
- package/dist/remediate/contractPipeline/cyclicSeamResolution.js.map +1 -1
- package/dist/remediate/contractPipeline/derive.d.ts +0 -14
- package/dist/remediate/contractPipeline/derive.d.ts.map +1 -1
- package/dist/remediate/contractPipeline/derive.js +52 -24
- package/dist/remediate/contractPipeline/derive.js.map +1 -1
- package/dist/remediate/contractPipeline/finalizedContractFields.d.ts +50 -0
- package/dist/remediate/contractPipeline/finalizedContractFields.d.ts.map +1 -0
- package/dist/remediate/contractPipeline/finalizedContractFields.js +77 -0
- package/dist/remediate/contractPipeline/finalizedContractFields.js.map +1 -0
- package/dist/remediate/contractPipeline/idRegistry.d.ts +85 -0
- package/dist/remediate/contractPipeline/idRegistry.d.ts.map +1 -1
- package/dist/remediate/contractPipeline/idRegistry.js +147 -0
- package/dist/remediate/contractPipeline/idRegistry.js.map +1 -1
- package/dist/remediate/contractPipeline/phaseCut.d.ts +13 -16
- package/dist/remediate/contractPipeline/phaseCut.d.ts.map +1 -1
- package/dist/remediate/contractPipeline/phaseCut.js +15 -30
- package/dist/remediate/contractPipeline/phaseCut.js.map +1 -1
- package/dist/remediate/contractPipeline/reviewSnapshot.d.ts +20 -1
- package/dist/remediate/contractPipeline/reviewSnapshot.d.ts.map +1 -1
- package/dist/remediate/contractPipeline/reviewSnapshot.js +23 -7
- package/dist/remediate/contractPipeline/reviewSnapshot.js.map +1 -1
- package/dist/remediate/contractPipeline/semanticProjection.d.ts +17 -0
- package/dist/remediate/contractPipeline/semanticProjection.d.ts.map +1 -1
- package/dist/remediate/contractPipeline/semanticProjection.js +6 -9
- package/dist/remediate/contractPipeline/semanticProjection.js.map +1 -1
- package/dist/remediate/contractPipeline/sketchSource.d.ts +183 -0
- package/dist/remediate/contractPipeline/sketchSource.d.ts.map +1 -0
- package/dist/remediate/contractPipeline/sketchSource.js +255 -0
- package/dist/remediate/contractPipeline/sketchSource.js.map +1 -0
- package/dist/remediate/findingFilter.d.ts.map +1 -1
- package/dist/remediate/findingFilter.js +1 -0
- package/dist/remediate/findingFilter.js.map +1 -1
- package/dist/remediate/index.d.ts +81 -0
- package/dist/remediate/index.d.ts.map +1 -1
- package/dist/remediate/index.js +162 -53
- package/dist/remediate/index.js.map +1 -1
- package/dist/remediate/intake.d.ts +43 -0
- package/dist/remediate/intake.d.ts.map +1 -1
- package/dist/remediate/intake.js +82 -13
- package/dist/remediate/intake.js.map +1 -1
- package/dist/remediate/phases/close.d.ts +33 -2
- package/dist/remediate/phases/close.d.ts.map +1 -1
- package/dist/remediate/phases/close.js +227 -13
- package/dist/remediate/phases/close.js.map +1 -1
- package/dist/remediate/phases/closeVerifyHeadEvidence.d.ts +154 -0
- package/dist/remediate/phases/closeVerifyHeadEvidence.d.ts.map +1 -0
- package/dist/remediate/phases/closeVerifyHeadEvidence.js +242 -0
- package/dist/remediate/phases/closeVerifyHeadEvidence.js.map +1 -0
- package/dist/remediate/state/runStatus.d.ts +35 -0
- package/dist/remediate/state/runStatus.d.ts.map +1 -0
- package/dist/remediate/state/runStatus.js +46 -0
- package/dist/remediate/state/runStatus.js.map +1 -0
- package/dist/remediate/state/store.d.ts +52 -2
- package/dist/remediate/state/store.d.ts.map +1 -1
- package/dist/remediate/state/store.js +124 -21
- package/dist/remediate/state/store.js.map +1 -1
- package/dist/remediate/state/types.d.ts +83 -13
- package/dist/remediate/state/types.d.ts.map +1 -1
- package/dist/remediate/steps/contractPipeline.d.ts +65 -1
- package/dist/remediate/steps/contractPipeline.d.ts.map +1 -1
- package/dist/remediate/steps/contractPipeline.js +302 -85
- package/dist/remediate/steps/contractPipeline.js.map +1 -1
- package/dist/remediate/steps/contractPipelinePrompts.d.ts.map +1 -1
- package/dist/remediate/steps/contractPipelinePrompts.js +58 -21
- package/dist/remediate/steps/contractPipelinePrompts.js.map +1 -1
- package/dist/remediate/steps/dispatch/hostHandoff.d.ts +87 -2
- package/dist/remediate/steps/dispatch/hostHandoff.d.ts.map +1 -1
- package/dist/remediate/steps/dispatch/hostHandoff.js +344 -44
- package/dist/remediate/steps/dispatch/hostHandoff.js.map +1 -1
- package/dist/remediate/steps/finalGate.d.ts +109 -5
- package/dist/remediate/steps/finalGate.d.ts.map +1 -1
- package/dist/remediate/steps/finalGate.js +135 -27
- package/dist/remediate/steps/finalGate.js.map +1 -1
- package/dist/remediate/steps/gateCommands.d.ts +167 -0
- package/dist/remediate/steps/gateCommands.d.ts.map +1 -1
- package/dist/remediate/steps/gateCommands.js +428 -1
- package/dist/remediate/steps/gateCommands.js.map +1 -1
- package/dist/remediate/steps/intakeResolver.d.ts +2 -13
- package/dist/remediate/steps/intakeResolver.d.ts.map +1 -1
- package/dist/remediate/steps/intakeResolver.js +22 -4
- package/dist/remediate/steps/intakeResolver.js.map +1 -1
- package/dist/remediate/steps/nextStep.d.ts +44 -40
- package/dist/remediate/steps/nextStep.d.ts.map +1 -1
- package/dist/remediate/steps/nextStep.js +501 -106
- package/dist/remediate/steps/nextStep.js.map +1 -1
- package/dist/remediate/steps/stepWriter.d.ts +1 -1
- package/dist/remediate/steps/stepWriter.d.ts.map +1 -1
- package/dist/remediate/steps/stepWriter.js +1 -0
- package/dist/remediate/steps/stepWriter.js.map +1 -1
- package/dist/remediate/steps/types.d.ts +32 -1
- package/dist/remediate/steps/types.d.ts.map +1 -1
- package/dist/remediate/steps/types.js +1 -0
- package/dist/remediate/steps/types.js.map +1 -1
- package/dist/remediate/types/options.d.ts +8 -0
- package/dist/remediate/types/options.d.ts.map +1 -1
- package/dist/remediate/utils/fileIntegrity.d.ts +8 -0
- package/dist/remediate/utils/fileIntegrity.d.ts.map +1 -1
- package/dist/remediate/utils/fileIntegrity.js +12 -1
- package/dist/remediate/utils/fileIntegrity.js.map +1 -1
- package/dist/remediate/validation/artifacts.d.ts +1 -1
- package/dist/remediate/validation/artifacts.d.ts.map +1 -1
- package/dist/remediate/validation/artifacts.js +19 -2
- 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 +26 -39
- package/dist/remediate/validation/contractPipeline.js.map +1 -1
- package/dist/remediate/validation/contractPipelineGates.d.ts +18 -1
- package/dist/remediate/validation/contractPipelineGates.d.ts.map +1 -1
- package/dist/remediate/validation/contractPipelineGates.js +33 -5
- package/dist/remediate/validation/contractPipelineGates.js.map +1 -1
- package/dist/shared/analyzers/acquisitionEngine.d.ts +83 -5
- package/dist/shared/analyzers/acquisitionEngine.d.ts.map +1 -1
- package/dist/shared/analyzers/acquisitionEngine.js +46 -14
- package/dist/shared/analyzers/acquisitionEngine.js.map +1 -1
- package/dist/shared/analyzers/binaryAcquisition.d.ts +35 -2
- package/dist/shared/analyzers/binaryAcquisition.d.ts.map +1 -1
- package/dist/shared/analyzers/binaryAcquisition.js +5 -5
- package/dist/shared/analyzers/binaryAcquisition.js.map +1 -1
- package/dist/shared/analyzers/candidates.d.ts.map +1 -1
- package/dist/shared/analyzers/candidates.js +1 -0
- package/dist/shared/analyzers/candidates.js.map +1 -1
- package/dist/shared/analyzers/clippy.d.ts +9 -1
- package/dist/shared/analyzers/clippy.d.ts.map +1 -1
- package/dist/shared/analyzers/clippy.js +10 -2
- package/dist/shared/analyzers/clippy.js.map +1 -1
- package/dist/shared/analyzers/normalizeExternal.d.ts.map +1 -1
- package/dist/shared/analyzers/normalizeExternal.js +1 -0
- package/dist/shared/analyzers/normalizeExternal.js.map +1 -1
- package/dist/shared/analyzers/rubocop.d.ts +7 -1
- package/dist/shared/analyzers/rubocop.d.ts.map +1 -1
- package/dist/shared/analyzers/rubocop.js +8 -2
- package/dist/shared/analyzers/rubocop.js.map +1 -1
- package/dist/shared/analyzers/types.d.ts +24 -24
- package/dist/shared/analyzers/types.d.ts.map +1 -1
- package/dist/shared/analyzers/types.js +15 -0
- package/dist/shared/analyzers/types.js.map +1 -1
- package/dist/shared/artifactFreshness.d.ts.map +1 -1
- package/dist/shared/artifactFreshness.js +42 -7
- package/dist/shared/artifactFreshness.js.map +1 -1
- package/dist/shared/chunkByBudget.d.ts.map +1 -1
- package/dist/shared/chunkByBudget.js.map +1 -1
- package/dist/shared/continuityScore.d.ts.map +1 -1
- package/dist/shared/continuityScore.js +12 -4
- package/dist/shared/continuityScore.js.map +1 -1
- package/dist/shared/decompose/charterClarification.d.ts +49 -45
- package/dist/shared/decompose/charterClarification.d.ts.map +1 -1
- package/dist/shared/decompose/charterClarification.js +50 -57
- package/dist/shared/decompose/charterClarification.js.map +1 -1
- package/dist/shared/decompose/charterExtraction.d.ts +616 -342
- package/dist/shared/decompose/charterExtraction.d.ts.map +1 -1
- package/dist/shared/decompose/charterExtraction.js +590 -488
- package/dist/shared/decompose/charterExtraction.js.map +1 -1
- package/dist/shared/decompose/contentCoherence.d.ts +36 -2
- package/dist/shared/decompose/contentCoherence.d.ts.map +1 -1
- package/dist/shared/decompose/contentCoherence.js +45 -5
- package/dist/shared/decompose/contentCoherence.js.map +1 -1
- package/dist/shared/decompose/modularity.d.ts +98 -1
- package/dist/shared/decompose/modularity.d.ts.map +1 -1
- package/dist/shared/decompose/modularity.js +89 -8
- package/dist/shared/decompose/modularity.js.map +1 -1
- package/dist/shared/decompose/systemicChallenge.d.ts +111 -0
- package/dist/shared/decompose/systemicChallenge.d.ts.map +1 -1
- package/dist/shared/decompose/systemicChallenge.js +28 -0
- package/dist/shared/decompose/systemicChallenge.js.map +1 -1
- package/dist/shared/engine/obligationEngine.d.ts +2 -2
- package/dist/shared/engine/obligationEngine.d.ts.map +1 -1
- package/dist/shared/engine/obligationEngine.js +8 -2
- package/dist/shared/engine/obligationEngine.js.map +1 -1
- package/dist/shared/findingSimilarity.d.ts +8 -0
- package/dist/shared/findingSimilarity.d.ts.map +1 -1
- package/dist/shared/findingSimilarity.js +10 -3
- package/dist/shared/findingSimilarity.js.map +1 -1
- package/dist/shared/findings/dedupe.d.ts +15 -0
- package/dist/shared/findings/dedupe.d.ts.map +1 -1
- package/dist/shared/findings/dedupe.js +137 -1
- package/dist/shared/findings/dedupe.js.map +1 -1
- package/dist/shared/friction/frictionRecord.d.ts.map +1 -1
- package/dist/shared/friction/frictionRecord.js +14 -1
- package/dist/shared/friction/frictionRecord.js.map +1 -1
- package/dist/shared/friction/triage.d.ts +4 -0
- package/dist/shared/friction/triage.d.ts.map +1 -1
- package/dist/shared/friction/triage.js +41 -29
- package/dist/shared/friction/triage.js.map +1 -1
- package/dist/shared/git.d.ts +14 -0
- package/dist/shared/git.d.ts.map +1 -1
- package/dist/shared/git.js +22 -0
- package/dist/shared/git.js.map +1 -1
- package/dist/shared/index.d.ts +42 -38
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/index.js +35 -23
- package/dist/shared/index.js.map +1 -1
- package/dist/shared/intent/clauseBoundaries.d.ts +75 -0
- package/dist/shared/intent/clauseBoundaries.d.ts.map +1 -0
- package/dist/shared/intent/clauseBoundaries.js +134 -0
- package/dist/shared/intent/clauseBoundaries.js.map +1 -0
- package/dist/shared/intent/clauseInterpreter.d.ts +11 -5
- package/dist/shared/intent/clauseInterpreter.d.ts.map +1 -1
- package/dist/shared/intent/clauseInterpreter.js +16 -41
- package/dist/shared/intent/clauseInterpreter.js.map +1 -1
- package/dist/shared/intent/freeFormIntentInterpreter.d.ts +11 -0
- package/dist/shared/intent/freeFormIntentInterpreter.d.ts.map +1 -1
- package/dist/shared/intent/freeFormIntentInterpreter.js +31 -17
- package/dist/shared/intent/freeFormIntentInterpreter.js.map +1 -1
- package/dist/shared/io/fileLock.d.ts.map +1 -1
- package/dist/shared/io/fileLock.js +18 -6
- package/dist/shared/io/fileLock.js.map +1 -1
- package/dist/shared/io/frictionCapture.d.ts +25 -5
- package/dist/shared/io/frictionCapture.d.ts.map +1 -1
- package/dist/shared/io/frictionCapture.js +30 -9
- package/dist/shared/io/frictionCapture.js.map +1 -1
- package/dist/shared/io/schemaVersion.d.ts +4 -3
- package/dist/shared/io/schemaVersion.d.ts.map +1 -1
- package/dist/shared/io/schemaVersion.js +27 -4
- package/dist/shared/io/schemaVersion.js.map +1 -1
- package/dist/shared/io/stepContractWriter.d.ts +38 -4
- package/dist/shared/io/stepContractWriter.d.ts.map +1 -1
- package/dist/shared/io/stepContractWriter.js +59 -1
- package/dist/shared/io/stepContractWriter.js.map +1 -1
- package/dist/shared/loopCorePaths.d.ts.map +1 -1
- package/dist/shared/loopCorePaths.js +8 -0
- package/dist/shared/loopCorePaths.js.map +1 -1
- package/dist/shared/opencodePermissions.d.ts +27 -3
- package/dist/shared/opencodePermissions.d.ts.map +1 -1
- package/dist/shared/opencodePermissions.js +77 -26
- package/dist/shared/opencodePermissions.js.map +1 -1
- package/dist/shared/prompts.d.ts +12 -1
- package/dist/shared/prompts.d.ts.map +1 -1
- package/dist/shared/prompts.js +11 -1
- package/dist/shared/prompts.js.map +1 -1
- package/dist/shared/reReview/projectionDiff.d.ts +13 -0
- package/dist/shared/reReview/projectionDiff.d.ts.map +1 -1
- package/dist/shared/reReview/projectionDiff.js +1 -1
- package/dist/shared/reReview/projectionDiff.js.map +1 -1
- package/dist/shared/reporting/findingDisplay.d.ts +7 -0
- package/dist/shared/reporting/findingDisplay.d.ts.map +1 -1
- package/dist/shared/reporting/findingDisplay.js +8 -1
- package/dist/shared/reporting/findingDisplay.js.map +1 -1
- package/dist/shared/steps/stepEmissionScaffold.d.ts +15 -3
- package/dist/shared/steps/stepEmissionScaffold.d.ts.map +1 -1
- package/dist/shared/steps/stepEmissionScaffold.js +8 -6
- package/dist/shared/steps/stepEmissionScaffold.js.map +1 -1
- package/dist/shared/submission/hostHandoffCore.d.ts +37 -12
- package/dist/shared/submission/hostHandoffCore.d.ts.map +1 -1
- package/dist/shared/submission/hostHandoffCore.js +81 -18
- package/dist/shared/submission/hostHandoffCore.js.map +1 -1
- package/dist/shared/submission/hostResultOutcomes.d.ts +70 -1
- package/dist/shared/submission/hostResultOutcomes.d.ts.map +1 -1
- package/dist/shared/submission/hostResultOutcomes.js +66 -1
- package/dist/shared/submission/hostResultOutcomes.js.map +1 -1
- package/dist/shared/submission/submissionLedger.d.ts +86 -1
- package/dist/shared/submission/submissionLedger.d.ts.map +1 -1
- package/dist/shared/submission/submissionLedger.js +108 -0
- package/dist/shared/submission/submissionLedger.js.map +1 -1
- package/dist/shared/submission/submissionScan.d.ts.map +1 -1
- package/dist/shared/submission/submissionScan.js +1 -0
- package/dist/shared/submission/submissionScan.js.map +1 -1
- package/dist/shared/tooling/analyzerDeps.d.ts +14 -0
- package/dist/shared/tooling/analyzerDeps.d.ts.map +1 -1
- package/dist/shared/tooling/analyzerDeps.js +23 -0
- package/dist/shared/tooling/analyzerDeps.js.map +1 -1
- package/dist/shared/tooling/commandShape.d.ts +35 -1
- package/dist/shared/tooling/commandShape.d.ts.map +1 -1
- package/dist/shared/tooling/commandShape.js +66 -4
- package/dist/shared/tooling/commandShape.js.map +1 -1
- package/dist/shared/tooling/exec.d.ts +62 -4
- package/dist/shared/tooling/exec.d.ts.map +1 -1
- package/dist/shared/tooling/exec.js +127 -8
- package/dist/shared/tooling/exec.js.map +1 -1
- package/dist/shared/types/charter.d.ts +674 -156
- package/dist/shared/types/charter.d.ts.map +1 -1
- package/dist/shared/types/charter.js +172 -118
- package/dist/shared/types/charter.js.map +1 -1
- package/dist/shared/types/closingActions.d.ts +25 -0
- package/dist/shared/types/closingActions.d.ts.map +1 -1
- package/dist/shared/types/closingActions.js +26 -0
- package/dist/shared/types/closingActions.js.map +1 -1
- package/dist/shared/types/contractPipeline/obligations.d.ts +63 -2
- package/dist/shared/types/contractPipeline/obligations.d.ts.map +1 -1
- package/dist/shared/types/contractPipeline/obligations.js +51 -0
- package/dist/shared/types/contractPipeline/obligations.js.map +1 -1
- package/dist/shared/types/contractPipeline.d.ts +1 -0
- package/dist/shared/types/contractPipeline.d.ts.map +1 -1
- package/dist/shared/types/contractPipeline.js +1 -0
- package/dist/shared/types/contractPipeline.js.map +1 -1
- package/dist/shared/types/contractPropertyShapes.d.ts +34 -0
- package/dist/shared/types/contractPropertyShapes.d.ts.map +1 -0
- package/dist/shared/types/contractPropertyShapes.js +255 -0
- package/dist/shared/types/contractPropertyShapes.js.map +1 -0
- package/dist/shared/types/finding.d.ts +376 -18
- package/dist/shared/types/finding.d.ts.map +1 -1
- package/dist/shared/types/finding.js +111 -0
- package/dist/shared/types/finding.js.map +1 -1
- package/dist/shared/types/intentCheckpoint.d.ts +214 -2
- package/dist/shared/types/intentCheckpoint.d.ts.map +1 -1
- package/dist/shared/types/intentCheckpoint.js +273 -0
- package/dist/shared/types/intentCheckpoint.js.map +1 -1
- package/dist/shared/types/intentInterpretation.d.ts +1 -1
- package/dist/shared/types/intentInterpretation.js +1 -1
- package/dist/shared/types/remediationOutcome.d.ts +294 -30
- package/dist/shared/types/remediationOutcome.d.ts.map +1 -1
- package/dist/shared/types/remediationOutcome.js +96 -7
- package/dist/shared/types/remediationOutcome.js.map +1 -1
- package/dist/shared/types/stepContract.d.ts +47 -0
- package/dist/shared/types/stepContract.d.ts.map +1 -1
- package/dist/shared/types/stepContract.js +113 -0
- package/dist/shared/types/stepContract.js.map +1 -1
- package/dist/shared/validation/charterGate.d.ts +13 -28
- package/dist/shared/validation/charterGate.d.ts.map +1 -1
- package/dist/shared/validation/charterGate.js +13 -35
- package/dist/shared/validation/charterGate.js.map +1 -1
- package/dist/shared/validation/contractConstructionSites.d.ts +116 -0
- package/dist/shared/validation/contractConstructionSites.d.ts.map +1 -0
- package/dist/shared/validation/contractConstructionSites.js +277 -0
- package/dist/shared/validation/contractConstructionSites.js.map +1 -0
- package/dist/shared/validation/designFindingGrounding.d.ts +33 -4
- package/dist/shared/validation/designFindingGrounding.d.ts.map +1 -1
- package/dist/shared/validation/designFindingGrounding.js +40 -6
- package/dist/shared/validation/designFindingGrounding.js.map +1 -1
- package/dist/shared/validation/findingGrounding.d.ts.map +1 -1
- package/dist/shared/validation/findingGrounding.js +11 -1
- package/dist/shared/validation/findingGrounding.js.map +1 -1
- package/dist/shared/validation/findingsReport.d.ts.map +1 -1
- package/dist/shared/validation/findingsReport.js +5 -0
- package/dist/shared/validation/findingsReport.js.map +1 -1
- package/docs/audit-pkg/contracts.md +8 -2
- package/opencode.json +29 -29
- package/package.json +16 -3
- package/schemas/audit-code-v1alpha1.schema.json +0 -4
- package/scripts/audit/postinstall.mjs +81 -96
- package/scripts/remediate/postinstall.mjs +43 -83
- package/scripts/shared/host-asset-plan.mjs +176 -0
- package/scripts/shared/install-host-assets.mjs +44 -1
- package/scripts/shared/primitives.mjs +89 -0
- package/skills/audit-code/SKILL.md +4 -4
- package/skills/audit-code/audit-code.prompt.md +14 -10
- package/skills/remediate-code/SKILL.md +9 -5
- package/skills/remediate-code/remediate-code.prompt.md +11 -4
- package/wrapper/audit-code-wrapper-build.mjs +6 -3
- package/dist/audit/cli/charterDeltaPrompt.d.ts +0 -18
- package/dist/audit/cli/charterDeltaPrompt.d.ts.map +0 -1
- package/dist/audit/cli/charterDeltaPrompt.js +0 -150
- package/dist/audit/cli/charterDeltaPrompt.js.map +0 -1
- package/dist/audit/orchestrator/charterDeltaExecutor.d.ts +0 -24
- package/dist/audit/orchestrator/charterDeltaExecutor.d.ts.map +0 -1
- package/dist/audit/orchestrator/charterDeltaExecutor.js +0 -128
- package/dist/audit/orchestrator/charterDeltaExecutor.js.map +0 -1
- package/dist/audit/supervisor/runLedger.d.ts +0 -3
- package/dist/audit/supervisor/runLedger.d.ts.map +0 -1
- package/dist/audit/supervisor/runLedger.js +0 -69
- package/dist/audit/supervisor/runLedger.js.map +0 -1
- package/dist/shared/types/executionRecord.d.ts +0 -58
- package/dist/shared/types/executionRecord.d.ts.map +0 -1
- package/dist/shared/types/executionRecord.js +0 -26
- package/dist/shared/types/executionRecord.js.map +0 -1
- package/dist/shared/types/runLedger.d.ts +0 -17
- package/dist/shared/types/runLedger.d.ts.map +0 -1
- package/dist/shared/types/runLedger.js +0 -7
- package/dist/shared/types/runLedger.js.map +0 -1
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
// The host-asset install plan — ONE declaration, two installers.
|
|
2
|
+
//
|
|
3
|
+
// WHY THIS EXISTS (backlog 2026-08-27, "Three governance vocabularies are copied
|
|
4
|
+
// per consumer"). `scripts/audit/postinstall.mjs` and
|
|
5
|
+
// `scripts/remediate/postinstall.mjs` each built their own install list, their
|
|
6
|
+
// own OpenCode command entry and their own `installAntigravityPlugin` call
|
|
7
|
+
// around the SAME shared installer (`install-host-assets.mjs`). Every one of
|
|
8
|
+
// those was near-identical code differing only by a tool token, so a change to
|
|
9
|
+
// the shared install shape had to be made twice and the two could silently
|
|
10
|
+
// drift — the V3 residual entry's migration gap is one instance of that split,
|
|
11
|
+
// not its cause.
|
|
12
|
+
//
|
|
13
|
+
// Now the per-tool differences are ROWS here and the installers execute the
|
|
14
|
+
// plan. What stays per-tool is only what is genuinely per-tool POLICY: the
|
|
15
|
+
// OpenCode permission tables (what each workflow may touch) and the two prompt
|
|
16
|
+
// renderers. Everything structural — which hosts are served, what each target
|
|
17
|
+
// path is, which source file feeds it, what the command entry says — is derived
|
|
18
|
+
// from the row.
|
|
19
|
+
//
|
|
20
|
+
// PRE-BUILD: the postinstalls run under plain node from a possibly-never-built
|
|
21
|
+
// checkout, so this module imports nothing from `audit-tools/shared`.
|
|
22
|
+
import { homedir } from "node:os";
|
|
23
|
+
import { dirname, join } from "node:path";
|
|
24
|
+
import { fileURLToPath } from "node:url";
|
|
25
|
+
|
|
26
|
+
/** The package root, from this file's location (`scripts/shared/`). */
|
|
27
|
+
export const PKG_ROOT = dirname(dirname(dirname(fileURLToPath(import.meta.url))));
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* @typedef {object} HostAssetPlan
|
|
31
|
+
* @property {string} tool the bin name / tool token (`audit-code`)
|
|
32
|
+
* @property {string} skillDir `skills/<dir>` under the package root
|
|
33
|
+
* @property {string} promptFile the canonical prompt body's filename
|
|
34
|
+
* @property {string} commandFile filename installed as the Claude command
|
|
35
|
+
* @property {string} description one line for the host's command menu
|
|
36
|
+
* @property {string} agentName the OpenCode agent the command delegates to
|
|
37
|
+
* @property {string} agentDescription one line for that agent
|
|
38
|
+
* @property {string|'packageVersion'} pluginVersion the Antigravity plugin
|
|
39
|
+
* version — a literal where the plugin has its own version, or the string
|
|
40
|
+
* 'packageVersion' where it tracks the package
|
|
41
|
+
* @property {boolean} stripFrontmatter whether the Claude command carries the
|
|
42
|
+
* prompt's body only (remediate-code) or the file verbatim (audit-code)
|
|
43
|
+
* @property {'trim'|'trimStart'} templateTrim how the OpenCode command template
|
|
44
|
+
* is trimmed. The two tools genuinely differ here — audit-code's template is a
|
|
45
|
+
* standalone `.txt` whose trailing newline must go, remediate-code's is an
|
|
46
|
+
* extracted markdown body where trailing content is significant — so the
|
|
47
|
+
* difference is a declared row rather than a behaviour invented per installer
|
|
48
|
+
*/
|
|
49
|
+
|
|
50
|
+
/** @type {Record<string, HostAssetPlan>} */
|
|
51
|
+
export const HOST_ASSET_PLANS = {
|
|
52
|
+
"audit-code": {
|
|
53
|
+
tool: "audit-code",
|
|
54
|
+
skillDir: "audit-code",
|
|
55
|
+
promptFile: "audit-code.prompt.md",
|
|
56
|
+
commandFile: "audit-code.md",
|
|
57
|
+
description: "Autonomous local loop code auditing",
|
|
58
|
+
agentName: "auditor",
|
|
59
|
+
agentDescription: "Read-heavy audit orchestration agent for the /audit-code workflow.",
|
|
60
|
+
pluginVersion: "1.0.0",
|
|
61
|
+
stripFrontmatter: false,
|
|
62
|
+
templateTrim: "trim",
|
|
63
|
+
},
|
|
64
|
+
"remediate-code": {
|
|
65
|
+
tool: "remediate-code",
|
|
66
|
+
skillDir: "remediate-code",
|
|
67
|
+
promptFile: "remediate-code.prompt.md",
|
|
68
|
+
commandFile: "remediate-code.md",
|
|
69
|
+
description: "Conversation-first code remediation",
|
|
70
|
+
agentName: "remediator",
|
|
71
|
+
agentDescription: "Bounded remediation orchestration agent for the /remediate-code workflow.",
|
|
72
|
+
pluginVersion: "packageVersion",
|
|
73
|
+
stripFrontmatter: true,
|
|
74
|
+
templateTrim: "trimStart",
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* The source files a plan reads, all under the package root.
|
|
80
|
+
* @param {HostAssetPlan} plan
|
|
81
|
+
*/
|
|
82
|
+
export function planSources(plan) {
|
|
83
|
+
const dir = join(PKG_ROOT, "skills", plan.skillDir);
|
|
84
|
+
return {
|
|
85
|
+
prompt: join(dir, plan.promptFile),
|
|
86
|
+
skill: join(dir, "SKILL.md"),
|
|
87
|
+
codexUiMetadata: join(dir, "agents", "openai.yaml"),
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* The install targets every plan serves, in install order. Each is derived —
|
|
93
|
+
* a row never names a path, so the two tools cannot disagree about WHERE a host
|
|
94
|
+
* asset lands, only about what it contains.
|
|
95
|
+
*
|
|
96
|
+
* @param {HostAssetPlan} plan
|
|
97
|
+
* @param {{homeDir?: string, promptContent: Buffer|string, skillContent: Buffer|string,
|
|
98
|
+
* codexUiMetadataContent?: Buffer|string}} content
|
|
99
|
+
* @returns {{label: string, path: string, sourcePath: string, content: Buffer|string}[]}
|
|
100
|
+
*/
|
|
101
|
+
export function planInstalls(plan, { homeDir = homedir(), promptContent, skillContent, codexUiMetadataContent }) {
|
|
102
|
+
const sources = planSources(plan);
|
|
103
|
+
const codexDir = join(homeDir, ".codex", "skills", plan.skillDir);
|
|
104
|
+
const installs = [
|
|
105
|
+
{
|
|
106
|
+
label: "Claude command",
|
|
107
|
+
path: join(homeDir, ".claude", "commands", plan.commandFile),
|
|
108
|
+
sourcePath: sources.prompt,
|
|
109
|
+
content: promptContent,
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
label: "Codex skill",
|
|
113
|
+
path: join(codexDir, "SKILL.md"),
|
|
114
|
+
sourcePath: sources.skill,
|
|
115
|
+
content: skillContent,
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
label: "Codex prompt",
|
|
119
|
+
path: join(codexDir, plan.promptFile),
|
|
120
|
+
sourcePath: sources.prompt,
|
|
121
|
+
content: promptContent,
|
|
122
|
+
},
|
|
123
|
+
];
|
|
124
|
+
if (codexUiMetadataContent !== undefined) {
|
|
125
|
+
installs.push({
|
|
126
|
+
label: "Codex skill UI metadata",
|
|
127
|
+
path: join(codexDir, "agents", "openai.yaml"),
|
|
128
|
+
sourcePath: sources.codexUiMetadata,
|
|
129
|
+
content: codexUiMetadataContent,
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
return installs;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/** The OpenCode global config path — one location, both tools. */
|
|
136
|
+
export function planOpenCodeConfigPath({ homeDir = homedir() } = {}) {
|
|
137
|
+
return join(homeDir, ".config", "opencode", "opencode.json");
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* The OpenCode command entry a plan contributes to the merged global config.
|
|
142
|
+
*
|
|
143
|
+
* The trim rule is the plan's, not this function's: audit-code's template is a
|
|
144
|
+
* standalone `.txt` (trailing newline must go), remediate-code's is a markdown
|
|
145
|
+
* body extracted from the prompt (trailing content is significant). Unifying
|
|
146
|
+
* them here would be a silent edit to one tool's deployed config.
|
|
147
|
+
*
|
|
148
|
+
* @param {HostAssetPlan} plan
|
|
149
|
+
* @param {string} commandTemplate the rendered command content
|
|
150
|
+
*/
|
|
151
|
+
export function planOpenCodeCommand(plan, commandTemplate) {
|
|
152
|
+
return {
|
|
153
|
+
template: plan.templateTrim === "trimStart" ? commandTemplate.trimStart() : commandTemplate.trim(),
|
|
154
|
+
description: plan.description,
|
|
155
|
+
agent: plan.agentName,
|
|
156
|
+
subtask: false,
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* The Claude Desktop plugin directory — the one host served by path convention
|
|
162
|
+
* rather than by a config file.
|
|
163
|
+
* @param {HostAssetPlan} plan
|
|
164
|
+
* @param {{homeDir?: string}} [options]
|
|
165
|
+
*/
|
|
166
|
+
export function planClaudePluginDir(plan, { homeDir = homedir() } = {}) {
|
|
167
|
+
return join(
|
|
168
|
+
homeDir,
|
|
169
|
+
".claude",
|
|
170
|
+
"plugins",
|
|
171
|
+
"marketplaces",
|
|
172
|
+
"claude-plugins-official",
|
|
173
|
+
"external_plugins",
|
|
174
|
+
plan.tool,
|
|
175
|
+
);
|
|
176
|
+
}
|
|
@@ -85,7 +85,8 @@ export async function resolveSharedOpenCodePermissions() {
|
|
|
85
85
|
typeof shared.mergeOpenCodeAgentPermissionRule === "function" &&
|
|
86
86
|
typeof shared.mergeOpenCodeGlobalPermissionRule === "function" &&
|
|
87
87
|
typeof shared.migrateOpenCodeGlobalExternalDirectory === "function" &&
|
|
88
|
-
typeof shared.withoutOpenCodeWildcard === "function"
|
|
88
|
+
typeof shared.withoutOpenCodeWildcard === "function" &&
|
|
89
|
+
typeof shared.orderOpenCodePermissionRule === "function"
|
|
89
90
|
) {
|
|
90
91
|
return shared;
|
|
91
92
|
}
|
|
@@ -184,6 +185,48 @@ export function installAntigravityPlugin(
|
|
|
184
185
|
}
|
|
185
186
|
}
|
|
186
187
|
|
|
188
|
+
/**
|
|
189
|
+
* Install the Claude Desktop plugin (manifest + command + skill) so the tool
|
|
190
|
+
* appears in the slash-command menu. Claude Desktop reads external plugins from
|
|
191
|
+
* `~/.claude/plugins/marketplaces/claude-plugins-official/external_plugins/`.
|
|
192
|
+
*
|
|
193
|
+
* One step, one succeeded/failed count — matching the installers' pre-extraction
|
|
194
|
+
* behaviour. `pluginDir` is derived by the PLAN (host-asset-plan.mjs), never
|
|
195
|
+
* spelled here, so the two tools cannot disagree about where it lands.
|
|
196
|
+
*
|
|
197
|
+
* @param {{toolName: string, pluginDir: string, manifest: object,
|
|
198
|
+
* commandContent: Buffer|string, skillContent: Buffer|string}} options
|
|
199
|
+
* @param {{succeeded: number, failed: number}} counts
|
|
200
|
+
*/
|
|
201
|
+
export function installClaudeDesktopPlugin(
|
|
202
|
+
{ toolName, pluginDir, manifest, commandContent, skillContent },
|
|
203
|
+
counts,
|
|
204
|
+
) {
|
|
205
|
+
const manifestPath = join(pluginDir, ".claude-plugin", "plugin.json");
|
|
206
|
+
const commandPath = join(pluginDir, "commands", `${toolName}.md`);
|
|
207
|
+
const skillPath = join(pluginDir, "skills", toolName, "SKILL.md");
|
|
208
|
+
try {
|
|
209
|
+
const manifestAction = writeGeneratedFile(
|
|
210
|
+
manifestPath,
|
|
211
|
+
Buffer.from(JSON.stringify(manifest, null, 2) + "\n"),
|
|
212
|
+
);
|
|
213
|
+
console.log(`${toolName}: ${manifestAction} Claude Desktop plugin manifest at ${manifestPath}`);
|
|
214
|
+
|
|
215
|
+
const commandAction = writeGeneratedFile(commandPath, commandContent);
|
|
216
|
+
console.log(`${toolName}: ${commandAction} Claude Desktop plugin command at ${commandPath}`);
|
|
217
|
+
|
|
218
|
+
const skillAction = writeGeneratedFile(skillPath, skillContent);
|
|
219
|
+
console.log(`${toolName}: ${skillAction} Claude Desktop plugin skill at ${skillPath}`);
|
|
220
|
+
|
|
221
|
+
console.log(`${toolName}: restart Claude Desktop for /${toolName} to appear in the slash-command menu`);
|
|
222
|
+
counts.succeeded++;
|
|
223
|
+
} catch (err) {
|
|
224
|
+
console.warn(`${toolName}: could not install Claude Desktop plugin (${/** @type {any} */ (err).message})`);
|
|
225
|
+
console.warn(` Plugin directory: ${pluginDir}`);
|
|
226
|
+
counts.failed++;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
|
|
187
230
|
/** Log the final summary line and set a non-zero exit code on any failure. */
|
|
188
231
|
export function finishPostinstall(toolName, counts, startTime) {
|
|
189
232
|
console.log(
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
// The governance tree's twin of the shared single-source primitives.
|
|
2
|
+
//
|
|
3
|
+
// WHY THIS EXISTS (ceremony review 2026-08-29, F1; forward-tracks). The
|
|
4
|
+
// repository's own single-source gate — `check:shared-primitives` — scanned
|
|
5
|
+
// `git ls-files 'src/**/*.ts'` only, so the enforcement layer was the ONE tree
|
|
6
|
+
// exempt from the rule it enforced. Widening its reach (this change) makes the
|
|
7
|
+
// governance tree obey the same rules, and these are the primitives it then
|
|
8
|
+
// needs.
|
|
9
|
+
//
|
|
10
|
+
// WHY NOT IMPORT `audit-tools/shared`. The scripts, hooks and wrappers here are
|
|
11
|
+
// PRE-BUILD: `tsconfig.scripts.json` typechecks them but nothing compiles them,
|
|
12
|
+
// and the pre-commit gate, the write-time advisories and the closeout renderer
|
|
13
|
+
// all run in checkouts that may never have been built. Importing
|
|
14
|
+
// `audit-tools/shared` resolves `dist/` and dies with ERR_MODULE_NOT_FOUND. So
|
|
15
|
+
// these are PORTABLE TWINS of the src homes, not copies of convenience:
|
|
16
|
+
//
|
|
17
|
+
// compareCodeUnits ↔ src/shared/compareCodeUnits.ts
|
|
18
|
+
// hashContent ↔ src/shared/hash.ts
|
|
19
|
+
// resolveWithinRoot ↔ src/shared/io/pathContainment.ts
|
|
20
|
+
//
|
|
21
|
+
// The gate's rule tables list BOTH homes, so a re-roll anywhere in either tree
|
|
22
|
+
// is red. Change one and change the other — the rules treat them as one home in
|
|
23
|
+
// two files, which is what makes the divergence impossible to miss.
|
|
24
|
+
import { createHash } from "node:crypto";
|
|
25
|
+
import { isAbsolute, relative, resolve, sep } from "node:path";
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Code-unit lexical comparator — the ONE ordering primitive for every sort
|
|
29
|
+
* whose result is persisted, hashed, or compared across hosts. ICU collation is
|
|
30
|
+
* banned in both trees (see check:shared-primitives' `intl-collator` and
|
|
31
|
+
* `locale-compare` rules for the two spellings): it varies with the host
|
|
32
|
+
* locale, so a persisted array ordered by it hashes differently per machine —
|
|
33
|
+
* the phantom-staleness class. The banned names are not repeated here because
|
|
34
|
+
* this file is itself inside the scan.
|
|
35
|
+
*/
|
|
36
|
+
export function compareCodeUnits(left, right) {
|
|
37
|
+
return left < right ? -1 : left > right ? 1 : 0;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Compute a hex digest of `content` (a string or raw bytes). Returns the full
|
|
42
|
+
* digest by default, or the leading `length` characters when `length` is given
|
|
43
|
+
* — callers that want a truncated digest pass it EXPLICITLY, so no call site
|
|
44
|
+
* carries a bare `.slice(0, N)` literal on a hash result.
|
|
45
|
+
*
|
|
46
|
+
* `options.algorithm` defaults to sha256. It exists for the ids whose values are
|
|
47
|
+
* ALREADY PERSISTED: the nightly `subject_key` and scope-ledger `item_hash` are
|
|
48
|
+
* sha1 and are written into a tracked artifact, so "upgrade the algorithm" is a
|
|
49
|
+
* rewrite of every id in that file, not a cleanup. Naming the algorithm here
|
|
50
|
+
* routes those sites through the one home without churning persisted state.
|
|
51
|
+
*/
|
|
52
|
+
export function hashContent(content, options = {}) {
|
|
53
|
+
const { algorithm = "sha256" } = options;
|
|
54
|
+
const digest =
|
|
55
|
+
typeof content === "string"
|
|
56
|
+
? createHash(algorithm).update(content, "utf8").digest("hex")
|
|
57
|
+
: createHash(algorithm).update(content).digest("hex");
|
|
58
|
+
|
|
59
|
+
const { length } = options;
|
|
60
|
+
if (length === undefined) return digest;
|
|
61
|
+
if (!Number.isInteger(length) || length <= 0) {
|
|
62
|
+
throw new Error(`hashContent: length must be a positive integer, got ${String(length)}`);
|
|
63
|
+
}
|
|
64
|
+
return digest.slice(0, length);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Resolve `candidate` against `root` and return the absolute path only when it
|
|
69
|
+
* stays inside that root; otherwise `null`.
|
|
70
|
+
*
|
|
71
|
+
* The escape test is SEGMENT-accurate (`".."` or a `"../"`-prefixed relative
|
|
72
|
+
* path), not a bare `startsWith("..")`: a real entry named `..cache` sits inside
|
|
73
|
+
* the root and the prefix test wrongly rejected it. `isAbsolute(rel)` catches
|
|
74
|
+
* the win32 case where the two sides share no common base at all (different
|
|
75
|
+
* drives / UNC roots), where `relative()` returns an absolute path and a
|
|
76
|
+
* `startsWith("..")` test therefore reads "contained".
|
|
77
|
+
*
|
|
78
|
+
* `options.allowRoot` (default `true`) decides whether the root itself counts.
|
|
79
|
+
*/
|
|
80
|
+
export function resolveWithinRoot(root, candidate, options = {}) {
|
|
81
|
+
if (typeof candidate !== "string" || candidate.length === 0) return null;
|
|
82
|
+
const rootPath = resolve(root);
|
|
83
|
+
const absolutePath = resolve(rootPath, candidate);
|
|
84
|
+
const rel = relative(rootPath, absolutePath);
|
|
85
|
+
if (isAbsolute(rel)) return null;
|
|
86
|
+
if (rel === "") return options.allowRoot === false ? null : absolutePath;
|
|
87
|
+
if (rel === ".." || rel.startsWith(`..${sep}`) || rel.startsWith("../")) return null;
|
|
88
|
+
return absolutePath;
|
|
89
|
+
}
|
|
@@ -43,10 +43,10 @@ node audit-code.mjs ensure --quiet
|
|
|
43
43
|
node audit-code.mjs next-step
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
-
The target-directory rule has one
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
flags.
|
|
46
|
+
The target-directory rule has one full statement in
|
|
47
|
+
`skills/audit-code/audit-code.prompt.md` (whose absolute path `audit-code
|
|
48
|
+
prompt-path` prints); follow it as written there. Do not add provider, model,
|
|
49
|
+
quota, routing, or launch flags.
|
|
50
50
|
|
|
51
51
|
Read the returned JSON only far enough to find `prompt_path`, then read and
|
|
52
52
|
follow only that prompt. Do not inspect workload, result, schema, or state files
|
|
@@ -21,14 +21,14 @@ repository root.
|
|
|
21
21
|
|
|
22
22
|
Preserve user arguments:
|
|
23
23
|
|
|
24
|
-
- run
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
from outside that repository
|
|
24
|
+
- run from inside the target repository; every command resolves that repository's
|
|
25
|
+
root from the working directory on its own, so normal usage passes no `--root`.
|
|
26
|
+
Pass the user-supplied target directory with `--root <path>` only when running
|
|
27
|
+
from outside that repository.
|
|
29
28
|
|
|
30
|
-
This is
|
|
31
|
-
|
|
29
|
+
This target-directory rule is one shared fragment, rendered into this body and
|
|
30
|
+
the `remediate-code` loader body in the same words; both skills point here
|
|
31
|
+
instead of restating it.
|
|
32
32
|
|
|
33
33
|
Ask for exactly one step:
|
|
34
34
|
|
|
@@ -51,8 +51,8 @@ source-only review for a comprehensive request. A user-chosen quick/shallow audi
|
|
|
51
51
|
may proceed with the stated limitation and the reflection required below.
|
|
52
52
|
|
|
53
53
|
Read the returned JSON only far enough to find `prompt_path`, then read and
|
|
54
|
-
follow only that prompt. Do not inspect workload, result, schema,
|
|
55
|
-
|
|
54
|
+
follow only that prompt. Do not inspect workload, result, schema, or state files
|
|
55
|
+
unless the current prompt directs you to them.
|
|
56
56
|
|
|
57
57
|
When the prompt emits semantic review items, assign them with the host's native
|
|
58
58
|
subagent facilities when available. Do not send provider, model, quota,
|
|
@@ -60,7 +60,11 @@ context-window, routing, or launch configuration to audit-tools. If the user has
|
|
|
60
60
|
chosen a degraded quick/shallow run, record one reserved AgentReflection with task_id exactly
|
|
61
61
|
`audit-capability-preflight`. Every reflection requires all three of `task_id`,
|
|
62
62
|
`instruction_clarity` (one of `clear`, `mostly_clear`, `ambiguous`, `unclear`)
|
|
63
|
-
and `severity`; a line missing any of the three is discarded whole.
|
|
63
|
+
and `severity`; a line missing any of the three is discarded whole. Append each
|
|
64
|
+
reflection as one JSON object per line to the run's agent-reflection file, whose
|
|
65
|
+
path the step contract supplies as `artifact_paths.agent_feedback` — never
|
|
66
|
+
reproduce that filename from memory, because a wrongly named file is read as
|
|
67
|
+
"no reflections" rather than reported. Use severity
|
|
64
68
|
`high` or `critical` when material to claimed coverage, with concrete
|
|
65
69
|
`tool_friction`, `ambiguities`, and `suggestions` details. A structurally incapable run must not be labelled comprehensive. Keep
|
|
66
70
|
the conversation-first flow and loader contract; do not add provider, routing,
|
|
@@ -36,13 +36,17 @@ remediate-code ensure --quiet
|
|
|
36
36
|
remediate-code next-step
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
The target-directory rule and the `--input` / `--guidance-file` rule each have
|
|
40
|
+
one full statement in `skills/remediate-code/remediate-code.prompt.md`; follow
|
|
41
|
+
them as written there.
|
|
42
|
+
|
|
43
|
+
Do not add capability, provider, model, quota, context-window, or concurrency
|
|
44
|
+
flags.
|
|
42
45
|
|
|
43
46
|
Read the returned JSON only far enough to find `prompt_path`, then read and
|
|
44
|
-
follow only that prompt.
|
|
45
|
-
|
|
47
|
+
follow only that prompt. Do not inspect workload, result, schema, or state files
|
|
48
|
+
unless the current prompt directs you to them. When it says to continue, call
|
|
49
|
+
`next-step` again. Stop when it says to stop.
|
|
46
50
|
|
|
47
51
|
When developing audit-tools itself, prefer `node remediate-code.mjs`. Use
|
|
48
52
|
`remediate-code install` for repair or forced asset refresh.
|
|
@@ -17,9 +17,16 @@ remediate-code ensure --quiet
|
|
|
17
17
|
|
|
18
18
|
Preserve user arguments:
|
|
19
19
|
|
|
20
|
-
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
- run from inside the target repository; every command resolves that repository's
|
|
21
|
+
root from the working directory on its own, so normal usage passes no `--root`.
|
|
22
|
+
Pass the user-supplied target directory with `--root <path>` only when running
|
|
23
|
+
from outside that repository.
|
|
24
|
+
- pass an existing path with `--input <path>`; write conversational feedback to a
|
|
25
|
+
temporary file and pass it with `--guidance-file <path>`.
|
|
26
|
+
|
|
27
|
+
The target-directory rule above is one shared fragment, rendered into this body
|
|
28
|
+
and the `audit-code` loader body in the same words; both skills point at the
|
|
29
|
+
loader bodies instead of restating it.
|
|
23
30
|
|
|
24
31
|
Then ask for exactly one step:
|
|
25
32
|
|
|
@@ -29,7 +36,7 @@ remediate-code next-step
|
|
|
29
36
|
|
|
30
37
|
Read the returned JSON only far enough to find `prompt_path`, then read and
|
|
31
38
|
follow only that prompt. Do not inspect workload, result, schema, or state files
|
|
32
|
-
unless the prompt directs you to them.
|
|
39
|
+
unless the current prompt directs you to them.
|
|
33
40
|
|
|
34
41
|
When the prompt emits implementation items, assign them using the host's native
|
|
35
42
|
subagent facilities when available. Do not send provider, model, quota,
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { open, stat, unlink } from 'node:fs/promises';
|
|
2
2
|
import { spawn } from 'node:child_process';
|
|
3
|
-
import { dirname,
|
|
3
|
+
import { dirname, join } from 'node:path';
|
|
4
4
|
import { fileURLToPath } from 'node:url';
|
|
5
5
|
import { fileExists, newestMtimeMs } from './audit-code-wrapper-io.mjs';
|
|
6
|
+
import { resolveWithinRoot } from '../scripts/shared/primitives.mjs';
|
|
6
7
|
|
|
7
8
|
const repoRoot = join(dirname(fileURLToPath(import.meta.url)), '..');
|
|
8
9
|
const distEntry = join(repoRoot, 'dist', 'audit', 'index.js');
|
|
@@ -151,8 +152,10 @@ export function assertWorkspaceInstalled({ checkoutRoot, sharedManifestPath }) {
|
|
|
151
152
|
);
|
|
152
153
|
}
|
|
153
154
|
|
|
154
|
-
|
|
155
|
-
|
|
155
|
+
// The containment decision, through the shared primitive: a manifest on
|
|
156
|
+
// another win32 drive / UNC root makes `relative()` return an ABSOLUTE path,
|
|
157
|
+
// where the bare prefix test read "contained".
|
|
158
|
+
if (resolveWithinRoot(checkoutRoot, sharedManifestPath) === null) {
|
|
156
159
|
throw new Error(
|
|
157
160
|
`audit-tools/shared resolved to ${sharedManifestPath}, outside this ` +
|
|
158
161
|
`checkout (${checkoutRoot}). node_modules was never installed here — ` +
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { ArtifactBundle } from "../io/artifacts.js";
|
|
2
|
-
/**
|
|
3
|
-
* Render the charter-DELTA host prompt (Phase C.2). The host here is the
|
|
4
|
-
* INDEPENDENT delta-miner — the triangulation engine: it did NOT author the
|
|
5
|
-
* charters below (three blind channel lanes did, each fed only its own
|
|
6
|
-
* evidence), so it is the first reader to see all channels together. It mines
|
|
7
|
-
* the real GAPS between channels within each subsystem, distills a TRIANGULATED
|
|
8
|
-
* TELOS per subsystem (a unified opinion the owner reacts to — a lead, never a
|
|
9
|
-
* reconciliation; the deltas stay the primary product), builds the goal DAG
|
|
10
|
-
* across subsystems, and — at the deepest ceiling only — may nominate a True
|
|
11
|
-
* charter. The tool supplies the ENFORCEMENT half at ingest (the routing table,
|
|
12
|
-
* the Phase-A gates, the deepest-rung consent check); the miner never picks
|
|
13
|
-
* routing.
|
|
14
|
-
*/
|
|
15
|
-
export declare function renderCharterDeltaPrompt(bundle: ArtifactBundle, opts: {
|
|
16
|
-
submissionPath: string;
|
|
17
|
-
}): string;
|
|
18
|
-
//# sourceMappingURL=charterDeltaPrompt.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"charterDeltaPrompt.d.ts","sourceRoot":"","sources":["../../../src/audit/cli/charterDeltaPrompt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD;;;;;;;;;;;;GAYG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,cAAc,EACtB,IAAI,EAAE;IAAE,cAAc,EAAE,MAAM,CAAA;CAAE,GAC/B,MAAM,CAkJR"}
|
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Render the charter-DELTA host prompt (Phase C.2). The host here is the
|
|
3
|
-
* INDEPENDENT delta-miner — the triangulation engine: it did NOT author the
|
|
4
|
-
* charters below (three blind channel lanes did, each fed only its own
|
|
5
|
-
* evidence), so it is the first reader to see all channels together. It mines
|
|
6
|
-
* the real GAPS between channels within each subsystem, distills a TRIANGULATED
|
|
7
|
-
* TELOS per subsystem (a unified opinion the owner reacts to — a lead, never a
|
|
8
|
-
* reconciliation; the deltas stay the primary product), builds the goal DAG
|
|
9
|
-
* across subsystems, and — at the deepest ceiling only — may nominate a True
|
|
10
|
-
* charter. The tool supplies the ENFORCEMENT half at ingest (the routing table,
|
|
11
|
-
* the Phase-A gates, the deepest-rung consent check); the miner never picks
|
|
12
|
-
* routing.
|
|
13
|
-
*/
|
|
14
|
-
export function renderCharterDeltaPrompt(bundle, opts) {
|
|
15
|
-
const register = bundle.charter_register;
|
|
16
|
-
const subsystems = register?.subsystems ?? [];
|
|
17
|
-
const deepest = register?.ceiling.rung === "deepest";
|
|
18
|
-
const subsystemBlocks = subsystems.length
|
|
19
|
-
? subsystems.flatMap((sub) => {
|
|
20
|
-
const memberPreview = sub.members.slice(0, 12).join(", ");
|
|
21
|
-
const more = sub.members.length > 12
|
|
22
|
-
? ` (+${sub.members.length - 12} more)`
|
|
23
|
-
: "";
|
|
24
|
-
const charterLines = sub.charters.length
|
|
25
|
-
? sub.charters.map((c) => ` - **${c.kind}** (confidence: ${c.confidence}) — ${c.purpose}`)
|
|
26
|
-
: [" - (no surviving charters)"];
|
|
27
|
-
const teleologyLines = Object.entries(sub.teleologies ?? {}).flatMap(([kind, nodes]) => (nodes ?? []).map((n) => ` - teleology (${kind}, L${n.premise_height}, ${n.files.length} file(s)) — ${n.purpose}`));
|
|
28
|
-
return [
|
|
29
|
-
`- **${sub.node_id}** — ${sub.members.length} file(s): ${memberPreview}${more}`,
|
|
30
|
-
...charterLines,
|
|
31
|
-
...teleologyLines,
|
|
32
|
-
];
|
|
33
|
-
})
|
|
34
|
-
: [
|
|
35
|
-
"- (no subsystems carry charters — submit `{ \"subsystems\": [], \"no_deltas\": true }`)",
|
|
36
|
-
];
|
|
37
|
-
return [
|
|
38
|
-
"# Design review — charter delta-mining + triangulation (conceptual, teleological)",
|
|
39
|
-
"",
|
|
40
|
-
"You are the **independent delta-miner**. You did NOT author the charters below",
|
|
41
|
-
"— three blind lanes did, each fed ONLY its own evidence channel (stated =",
|
|
42
|
-
"testimony from docs/comments; structural = intent frozen into the code's",
|
|
43
|
-
"organization; revealed = behavior from comment-stripped bodies). You are the",
|
|
44
|
-
"first reader to hold all channels together. For each subsystem:",
|
|
45
|
-
"",
|
|
46
|
-
"1. Mine the real **GAPS between channels** (a genuine divergence, not every",
|
|
47
|
-
" pair). Each channel pair has one meaning: stated↔revealed = the code does",
|
|
48
|
-
" not do what the testimony says; structural↔revealed = the implementation",
|
|
49
|
-
" betrays the organization's promise; stated↔structural = doc rot / naming",
|
|
50
|
-
" drift.",
|
|
51
|
-
"2. Distill a **triangulated telos** — your unified best estimate of what the",
|
|
52
|
-
" subsystem is FOR, weighing all channels. This is an OPINION the owner",
|
|
53
|
-
" reacts to, never a replacement for the channels: the deltas stay the",
|
|
54
|
-
" product, and where channels disagree, say so through deltas rather than",
|
|
55
|
-
" papering over the disagreement in the telos.",
|
|
56
|
-
"",
|
|
57
|
-
"Across the whole set, build the **goal_graph** (nodes/edges) linking the",
|
|
58
|
-
"subsystems' purposes. Give each delta a `pair` (two charter kinds) + a",
|
|
59
|
-
"`summary` of the gap. The tool ROUTES deltas (you do not): doc rot → the",
|
|
60
|
-
"remediator; stated↔revealed drift → the remediator; structural↔revealed",
|
|
61
|
-
"betrayal → a clarification; anything↔true → the human. A shaky charter",
|
|
62
|
-
"downgrades its deltas to the human channel automatically.",
|
|
63
|
-
"",
|
|
64
|
-
...(deepest
|
|
65
|
-
? [
|
|
66
|
-
"## True nominations (deepest ceiling — authorized for this run)",
|
|
67
|
-
"",
|
|
68
|
-
"Downstream of your triangulation, you MAY nominate a **true** charter",
|
|
69
|
-
'for a subsystem: the *shining city* ideal the user may be unaware of.',
|
|
70
|
-
"NOMINATABLE, NEVER ASSERTED — it MUST name a concrete alternative AND a",
|
|
71
|
-
'concrete cost the user seems to pay unaware ("Quicken exists; you\'re',
|
|
72
|
-
'rebuilding a worse one") or it is dropped as slop. Framed as a',
|
|
73
|
-
"provocation, never a verdict. Nominate only if certain.",
|
|
74
|
-
"",
|
|
75
|
-
]
|
|
76
|
-
: [
|
|
77
|
-
"This run's ceiling does NOT authorize True nominations — do not emit",
|
|
78
|
-
"`true_nominations` (they would be refused at ingest).",
|
|
79
|
-
"",
|
|
80
|
-
]),
|
|
81
|
-
"## Anti-slop discipline (do NOT emit)",
|
|
82
|
-
"- No **manufactured** deltas — a `pair` whose two charters genuinely agree is not",
|
|
83
|
-
" a gap; skip it. Only surface a real divergence.",
|
|
84
|
-
"- No delta against a charter kind a subsystem does not have below.",
|
|
85
|
-
"- No **averaged** teloses — a triangulated telos that just splices the three",
|
|
86
|
-
" purposes together is slop; commit to your best estimate and let the deltas",
|
|
87
|
-
" carry the disagreement.",
|
|
88
|
-
"- Only mine the subsystems listed — they are the assembled charter set, nothing",
|
|
89
|
-
" more. Do not add a `node_id` that is not below.",
|
|
90
|
-
"",
|
|
91
|
-
"## Assembled charters + teleologies (from the blind channel lanes)",
|
|
92
|
-
...subsystemBlocks,
|
|
93
|
-
"",
|
|
94
|
-
"## Output",
|
|
95
|
-
`Write your submission as JSON to \`${opts.submissionPath}\` with this shape:`,
|
|
96
|
-
"",
|
|
97
|
-
"```json",
|
|
98
|
-
"{",
|
|
99
|
-
' "subsystems": [',
|
|
100
|
-
" {",
|
|
101
|
-
' "node_id": "<one of the subsystems above>",',
|
|
102
|
-
' "deltas": [{ "pair": ["stated", "revealed"], "summary": "<the gap>" }]',
|
|
103
|
-
" }",
|
|
104
|
-
" ],",
|
|
105
|
-
' "triangulated": [',
|
|
106
|
-
' { "node_id": "<subsystem>", "telos": "<your unified best-estimate purpose>", "confidence": "high|medium|low" }',
|
|
107
|
-
" ],",
|
|
108
|
-
...(deepest
|
|
109
|
-
? [
|
|
110
|
-
' "true_nominations": [',
|
|
111
|
-
' { "node_id": "<subsystem>", "purpose": "<the nominated ideal>", "nominated_alternative": "...", "nominated_cost": "...", "confidence": "high|medium|low" }',
|
|
112
|
-
" ],",
|
|
113
|
-
]
|
|
114
|
-
: []),
|
|
115
|
-
' "goal_graph": {',
|
|
116
|
-
' "nodes": [',
|
|
117
|
-
' { "node_id": "auth", "premise_height": 0, "statement": "keep sessions trustworthy" },',
|
|
118
|
-
' { "node_id": "token-store", "premise_height": 1, "statement": "persist tokens durably" }',
|
|
119
|
-
" ],",
|
|
120
|
-
' "edges": [{ "from": "token-store", "to": "auth" }]',
|
|
121
|
-
" }",
|
|
122
|
-
"}",
|
|
123
|
-
"```",
|
|
124
|
-
"",
|
|
125
|
-
"Emit ONE `triangulated` entry per subsystem you examined (even a subsystem",
|
|
126
|
-
"with no deltas has a telos — agreement across channels is high-confidence",
|
|
127
|
-
"evidence for it).",
|
|
128
|
-
"",
|
|
129
|
-
"**If you genuinely found NO deltas anywhere**, affirm it explicitly:",
|
|
130
|
-
"`\"no_deltas\": true` on the submission (an empty submission WITHOUT the",
|
|
131
|
-
"affirmation is refused — a silent empty result is indistinguishable from a",
|
|
132
|
-
"miner that never ran). Never set `no_deltas` alongside deltas; the",
|
|
133
|
-
"affirmation is about DELTAS only, so your `triangulated` entries still ride",
|
|
134
|
-
"a `no_deltas` submission.",
|
|
135
|
-
"",
|
|
136
|
-
"**goal_graph schema (validated — use these exact fields, no others):**",
|
|
137
|
-
"- `nodes[]`: each is `{ node_id, premise_height, statement }`. `node_id` is a",
|
|
138
|
-
" short slug (a subsystem above, or a purpose you name); `premise_height` is an",
|
|
139
|
-
" INTEGER ≥ 0 where 0 = the root telos and larger = closer to a leaf mechanism",
|
|
140
|
-
" (emergent depth — there is no fixed L0/L1/L2 enum); `statement` is the",
|
|
141
|
-
" purpose in one telos sentence (never code/model/provider literals).",
|
|
142
|
-
"- `edges[]`: each is strictly `{ from, to }` — no `kind`/`label`/`reason`",
|
|
143
|
-
" field. **Every edge means `from` SERVES `to`** (the child purpose advances",
|
|
144
|
-
" the parent). It is a DAG, not a tree — a node may serve multiple parents.",
|
|
145
|
-
"- Do NOT use `{id,label}` nodes or `{from,to,kind}` edges — those hard-fail the",
|
|
146
|
-
" validator.",
|
|
147
|
-
"",
|
|
148
|
-
].join("\n");
|
|
149
|
-
}
|
|
150
|
-
//# sourceMappingURL=charterDeltaPrompt.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"charterDeltaPrompt.js","sourceRoot":"","sources":["../../../src/audit/cli/charterDeltaPrompt.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,wBAAwB,CACtC,MAAsB,EACtB,IAAgC;IAEhC,MAAM,QAAQ,GAAG,MAAM,CAAC,gBAAgB,CAAC;IACzC,MAAM,UAAU,GAAG,QAAQ,EAAE,UAAU,IAAI,EAAE,CAAC;IAC9C,MAAM,OAAO,GAAG,QAAQ,EAAE,OAAO,CAAC,IAAI,KAAK,SAAS,CAAC;IAErD,MAAM,eAAe,GAAG,UAAU,CAAC,MAAM;QACvC,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;YACzB,MAAM,aAAa,GAAG,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC1D,MAAM,IAAI,GACR,GAAG,CAAC,OAAO,CAAC,MAAM,GAAG,EAAE;gBACrB,CAAC,CAAC,MAAM,GAAG,CAAC,OAAO,CAAC,MAAM,GAAG,EAAE,QAAQ;gBACvC,CAAC,CAAC,EAAE,CAAC;YACT,MAAM,YAAY,GAAG,GAAG,CAAC,QAAQ,CAAC,MAAM;gBACtC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CACd,CAAC,CAAC,EAAE,EAAE,CAAC,SAAS,CAAC,CAAC,IAAI,mBAAmB,CAAC,CAAC,UAAU,OAAO,CAAC,CAAC,OAAO,EAAE,CACxE;gBACH,CAAC,CAAC,CAAC,6BAA6B,CAAC,CAAC;YACpC,MAAM,cAAc,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,EAAE,CAAC,CAAC,OAAO,CAClE,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,EAAE,CAChB,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,GAAG,CACf,CAAC,CAAC,EAAE,EAAE,CACJ,kBAAkB,IAAI,MAAM,CAAC,CAAC,cAAc,KAAK,CAAC,CAAC,KAAK,CAAC,MAAM,eAAe,CAAC,CAAC,OAAO,EAAE,CAC5F,CACJ,CAAC;YACF,OAAO;gBACL,OAAO,GAAG,CAAC,OAAO,QAAQ,GAAG,CAAC,OAAO,CAAC,MAAM,aAAa,aAAa,GAAG,IAAI,EAAE;gBAC/E,GAAG,YAAY;gBACf,GAAG,cAAc;aAClB,CAAC;QACJ,CAAC,CAAC;QACJ,CAAC,CAAC;YACE,yFAAyF;SAC1F,CAAC;IAEN,OAAO;QACL,mFAAmF;QACnF,EAAE;QACF,gFAAgF;QAChF,2EAA2E;QAC3E,0EAA0E;QAC1E,8EAA8E;QAC9E,iEAAiE;QACjE,EAAE;QACF,6EAA6E;QAC7E,8EAA8E;QAC9E,6EAA6E;QAC7E,6EAA6E;QAC7E,WAAW;QACX,8EAA8E;QAC9E,0EAA0E;QAC1E,yEAAyE;QACzE,4EAA4E;QAC5E,iDAAiD;QACjD,EAAE;QACF,0EAA0E;QAC1E,wEAAwE;QACxE,0EAA0E;QAC1E,yEAAyE;QACzE,wEAAwE;QACxE,2DAA2D;QAC3D,EAAE;QACF,GAAG,CAAC,OAAO;YACT,CAAC,CAAC;gBACE,iEAAiE;gBACjE,EAAE;gBACF,uEAAuE;gBACvE,uEAAuE;gBACvE,yEAAyE;gBACzE,uEAAuE;gBACvE,gEAAgE;gBAChE,yDAAyD;gBACzD,EAAE;aACH;YACH,CAAC,CAAC;gBACE,sEAAsE;gBACtE,uDAAuD;gBACvD,EAAE;aACH,CAAC;QACN,uCAAuC;QACvC,mFAAmF;QACnF,mDAAmD;QACnD,oEAAoE;QACpE,8EAA8E;QAC9E,8EAA8E;QAC9E,2BAA2B;QAC3B,iFAAiF;QACjF,mDAAmD;QACnD,EAAE;QACF,oEAAoE;QACpE,GAAG,eAAe;QAClB,EAAE;QACF,WAAW;QACX,sCAAsC,IAAI,CAAC,cAAc,qBAAqB;QAC9E,EAAE;QACF,SAAS;QACT,GAAG;QACH,mBAAmB;QACnB,OAAO;QACP,mDAAmD;QACnD,8EAA8E;QAC9E,OAAO;QACP,MAAM;QACN,qBAAqB;QACrB,oHAAoH;QACpH,MAAM;QACN,GAAG,CAAC,OAAO;YACT,CAAC,CAAC;gBACE,yBAAyB;gBACzB,gKAAgK;gBAChK,MAAM;aACP;YACH,CAAC,CAAC,EAAE,CAAC;QACP,mBAAmB;QACnB,gBAAgB;QAChB,6FAA6F;QAC7F,gGAAgG;QAChG,QAAQ;QACR,wDAAwD;QACxD,KAAK;QACL,GAAG;QACH,KAAK;QACL,EAAE;QACF,4EAA4E;QAC5E,2EAA2E;QAC3E,mBAAmB;QACnB,EAAE;QACF,sEAAsE;QACtE,0EAA0E;QAC1E,4EAA4E;QAC5E,oEAAoE;QACpE,6EAA6E;QAC7E,2BAA2B;QAC3B,EAAE;QACF,wEAAwE;QACxE,+EAA+E;QAC/E,iFAAiF;QACjF,gFAAgF;QAChF,0EAA0E;QAC1E,uEAAuE;QACvE,2EAA2E;QAC3E,8EAA8E;QAC9E,6EAA6E;QAC7E,iFAAiF;QACjF,cAAc;QACd,EAAE;KACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
|