audit-tools 0.45.0 → 0.48.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +51 -18
- package/dispatch/merge-results.mjs +3 -3
- package/dispatch/validate-result.mjs +3 -3
- package/dist/audit/cli/charterExtractionPrompt.d.ts.map +1 -1
- package/dist/audit/cli/charterExtractionPrompt.js +11 -1
- package/dist/audit/cli/charterExtractionPrompt.js.map +1 -1
- package/dist/audit/cli/cleanupCommand.d.ts +25 -0
- package/dist/audit/cli/cleanupCommand.d.ts.map +1 -1
- package/dist/audit/cli/cleanupCommand.js +76 -1
- package/dist/audit/cli/cleanupCommand.js.map +1 -1
- package/dist/audit/cli/dispatch/hostHandoff.d.ts.map +1 -1
- package/dist/audit/cli/dispatch/hostHandoff.js +52 -76
- package/dist/audit/cli/dispatch/hostHandoff.js.map +1 -1
- package/dist/audit/cli/dispatch/packetFilter.d.ts +1 -1
- package/dist/audit/cli/fanoutLanes.d.ts.map +1 -1
- package/dist/audit/cli/fanoutLanes.js +6 -1
- package/dist/audit/cli/fanoutLanes.js.map +1 -1
- package/dist/audit/cli/laneSubmissions.d.ts +13 -0
- package/dist/audit/cli/laneSubmissions.d.ts.map +1 -1
- package/dist/audit/cli/laneSubmissions.js +38 -27
- package/dist/audit/cli/laneSubmissions.js.map +1 -1
- package/dist/audit/cli/nextStepCommand.d.ts +12 -0
- package/dist/audit/cli/nextStepCommand.d.ts.map +1 -1
- package/dist/audit/cli/nextStepCommand.js +23 -12
- package/dist/audit/cli/nextStepCommand.js.map +1 -1
- package/dist/audit/cli/nextStepHelpers.d.ts +3 -2
- package/dist/audit/cli/nextStepHelpers.d.ts.map +1 -1
- package/dist/audit/cli/nextStepHelpers.js +65 -37
- package/dist/audit/cli/nextStepHelpers.js.map +1 -1
- package/dist/audit/cli/reviewRun.d.ts +1 -1
- package/dist/audit/cli/reviewRun.d.ts.map +1 -1
- package/dist/audit/cli/reviewRun.js +2 -9
- package/dist/audit/cli/reviewRun.js.map +1 -1
- package/dist/audit/cli/sampleRunCommand.d.ts +215 -0
- package/dist/audit/cli/sampleRunCommand.d.ts.map +1 -1
- package/dist/audit/cli/sampleRunCommand.js +60 -3
- package/dist/audit/cli/sampleRunCommand.js.map +1 -1
- package/dist/audit/cli/semanticReviewStep.d.ts.map +1 -1
- package/dist/audit/cli/semanticReviewStep.js +9 -1
- package/dist/audit/cli/semanticReviewStep.js.map +1 -1
- package/dist/audit/cli/steps.d.ts +6 -6
- package/dist/audit/contracts/workerSchemas.d.ts +36 -26
- package/dist/audit/contracts/workerSchemas.d.ts.map +1 -1
- package/dist/audit/contracts/workerSchemas.js +11 -1
- package/dist/audit/contracts/workerSchemas.js.map +1 -1
- package/dist/audit/contracts/wrapperResponse.d.ts +52 -28
- package/dist/audit/contracts/wrapperResponse.d.ts.map +1 -1
- package/dist/audit/contracts/wrapperResponse.js +8 -5
- package/dist/audit/contracts/wrapperResponse.js.map +1 -1
- package/dist/audit/decompose/sources.d.ts.map +1 -1
- package/dist/audit/decompose/sources.js +21 -5
- package/dist/audit/decompose/sources.js.map +1 -1
- package/dist/audit/extractors/analyzers/registry.d.ts +8 -5
- package/dist/audit/extractors/analyzers/registry.d.ts.map +1 -1
- package/dist/audit/extractors/analyzers/registry.js +28 -7
- package/dist/audit/extractors/analyzers/registry.js.map +1 -1
- package/dist/audit/extractors/designAssessment.js +1 -1
- package/dist/audit/extractors/gitHistory.d.ts +1 -1
- package/dist/audit/extractors/gitHistory.js +1 -1
- package/dist/audit/extractors/graph.d.ts +1 -1
- package/dist/audit/extractors/graph.js +1 -1
- package/dist/audit/extractors/risk.d.ts +1 -1
- package/dist/audit/extractors/risk.js +1 -1
- package/dist/audit/io/artifacts.d.ts.map +1 -1
- package/dist/audit/io/artifacts.js +5 -5
- package/dist/audit/io/artifacts.js.map +1 -1
- package/dist/audit/orchestrator/acquisitionExecutor.d.ts +12 -7
- package/dist/audit/orchestrator/acquisitionExecutor.d.ts.map +1 -1
- package/dist/audit/orchestrator/acquisitionExecutor.js +1 -1
- package/dist/audit/orchestrator/acquisitionExecutor.js.map +1 -1
- package/dist/audit/orchestrator/advance.d.ts +14 -10
- package/dist/audit/orchestrator/advance.d.ts.map +1 -1
- package/dist/audit/orchestrator/advance.js +49 -24
- package/dist/audit/orchestrator/advance.js.map +1 -1
- package/dist/audit/orchestrator/advanceTypes.d.ts +14 -0
- package/dist/audit/orchestrator/advanceTypes.d.ts.map +1 -1
- package/dist/audit/orchestrator/autoFixExecutor.d.ts +20 -1
- package/dist/audit/orchestrator/autoFixExecutor.d.ts.map +1 -1
- package/dist/audit/orchestrator/autoFixExecutor.js +77 -15
- package/dist/audit/orchestrator/autoFixExecutor.js.map +1 -1
- package/dist/audit/orchestrator/dependencyMap.js +1 -1
- package/dist/audit/orchestrator/dependencyMap.js.map +1 -1
- package/dist/audit/orchestrator/designReviewPrompt.d.ts.map +1 -1
- package/dist/audit/orchestrator/designReviewPrompt.js +7 -0
- 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 +18 -4
- package/dist/audit/orchestrator/executorRunners.js.map +1 -1
- package/dist/audit/orchestrator/executors.d.ts +54 -0
- package/dist/audit/orchestrator/executors.d.ts.map +1 -1
- package/dist/audit/orchestrator/executors.js +352 -0
- package/dist/audit/orchestrator/executors.js.map +1 -1
- package/dist/audit/orchestrator/hostInputPause.d.ts +28 -13
- package/dist/audit/orchestrator/hostInputPause.d.ts.map +1 -1
- package/dist/audit/orchestrator/hostInputPause.js +17 -11
- package/dist/audit/orchestrator/hostInputPause.js.map +1 -1
- package/dist/audit/orchestrator/intentInterpreter.d.ts +15 -18
- package/dist/audit/orchestrator/intentInterpreter.d.ts.map +1 -1
- package/dist/audit/orchestrator/intentInterpreter.js +12 -26
- package/dist/audit/orchestrator/intentInterpreter.js.map +1 -1
- package/dist/audit/orchestrator/localCommands.d.ts +24 -1
- package/dist/audit/orchestrator/localCommands.d.ts.map +1 -1
- package/dist/audit/orchestrator/localCommands.js +44 -9
- package/dist/audit/orchestrator/localCommands.js.map +1 -1
- package/dist/audit/orchestrator/nextStep.d.ts +13 -0
- package/dist/audit/orchestrator/nextStep.d.ts.map +1 -1
- package/dist/audit/orchestrator/nextStep.js +13 -0
- package/dist/audit/orchestrator/nextStep.js.map +1 -1
- package/dist/audit/orchestrator/requeueCommand.d.ts +1 -1
- package/dist/audit/orchestrator/runtimeCommand.d.ts +32 -1
- package/dist/audit/orchestrator/runtimeCommand.d.ts.map +1 -1
- package/dist/audit/orchestrator/runtimeCommand.js +90 -3
- package/dist/audit/orchestrator/runtimeCommand.js.map +1 -1
- package/dist/audit/orchestrator/structureExecutors.js +1 -1
- package/dist/audit/orchestrator/structureExecutors.js.map +1 -1
- package/dist/audit/orchestrator/syntaxResolutionExecutor.d.ts +11 -1
- package/dist/audit/orchestrator/syntaxResolutionExecutor.d.ts.map +1 -1
- package/dist/audit/orchestrator/syntaxResolutionExecutor.js +25 -9
- package/dist/audit/orchestrator/syntaxResolutionExecutor.js.map +1 -1
- package/dist/audit/supervisor/operatorHandoff.d.ts +0 -1
- package/dist/audit/supervisor/operatorHandoff.d.ts.map +1 -1
- package/dist/audit/supervisor/operatorHandoff.js +2 -1
- package/dist/audit/supervisor/operatorHandoff.js.map +1 -1
- package/dist/audit/types.d.ts +18 -18
- package/dist/remediate/contractPipeline/derive.d.ts.map +1 -1
- package/dist/remediate/contractPipeline/derive.js +1 -0
- package/dist/remediate/contractPipeline/derive.js.map +1 -1
- package/dist/remediate/contractPipeline/semanticProjection.d.ts +5 -4
- package/dist/remediate/contractPipeline/semanticProjection.d.ts.map +1 -1
- package/dist/remediate/contractPipeline/semanticProjection.js +34 -19
- package/dist/remediate/contractPipeline/semanticProjection.js.map +1 -1
- package/dist/remediate/index.d.ts.map +1 -1
- package/dist/remediate/index.js +3 -2
- package/dist/remediate/index.js.map +1 -1
- package/dist/remediate/intake.js +1 -1
- package/dist/remediate/intake.js.map +1 -1
- package/dist/remediate/phases/close.d.ts +45 -2
- package/dist/remediate/phases/close.d.ts.map +1 -1
- package/dist/remediate/phases/close.js +111 -43
- package/dist/remediate/phases/close.js.map +1 -1
- package/dist/remediate/phases/closeVerifyAnalyzerLeads.js +2 -2
- package/dist/remediate/phases/closeVerifyAnalyzerLeads.js.map +1 -1
- package/dist/remediate/phases/triage.d.ts.map +1 -1
- package/dist/remediate/phases/triage.js +61 -19
- package/dist/remediate/phases/triage.js.map +1 -1
- package/dist/remediate/review/autonomousGate.d.ts +3 -7
- package/dist/remediate/review/autonomousGate.d.ts.map +1 -1
- package/dist/remediate/review/autonomousGate.js +10 -24
- package/dist/remediate/review/autonomousGate.js.map +1 -1
- package/dist/remediate/riskSignal.d.ts +8 -20
- package/dist/remediate/riskSignal.d.ts.map +1 -1
- package/dist/remediate/riskSignal.js +21 -76
- package/dist/remediate/riskSignal.js.map +1 -1
- package/dist/remediate/state/accessMemory.d.ts +2 -3
- package/dist/remediate/state/accessMemory.d.ts.map +1 -1
- package/dist/remediate/state/accessMemory.js +3 -6
- package/dist/remediate/state/accessMemory.js.map +1 -1
- package/dist/remediate/state/store.d.ts +6 -7
- package/dist/remediate/state/store.d.ts.map +1 -1
- package/dist/remediate/state/store.js.map +1 -1
- package/dist/remediate/state/types.d.ts +2 -84
- package/dist/remediate/state/types.d.ts.map +1 -1
- package/dist/remediate/state/types.js +1 -39
- package/dist/remediate/state/types.js.map +1 -1
- package/dist/remediate/steps/contractPipeline.d.ts +13 -19
- package/dist/remediate/steps/contractPipeline.d.ts.map +1 -1
- package/dist/remediate/steps/contractPipeline.js +157 -66
- package/dist/remediate/steps/contractPipeline.js.map +1 -1
- package/dist/remediate/steps/dispatch/hostHandoff.d.ts +1 -1
- package/dist/remediate/steps/dispatch/hostHandoff.d.ts.map +1 -1
- package/dist/remediate/steps/dispatch/hostHandoff.js +297 -141
- package/dist/remediate/steps/dispatch/hostHandoff.js.map +1 -1
- package/dist/remediate/steps/nextStep.d.ts +16 -7
- package/dist/remediate/steps/nextStep.d.ts.map +1 -1
- package/dist/remediate/steps/nextStep.js +207 -216
- package/dist/remediate/steps/nextStep.js.map +1 -1
- package/dist/remediate/steps/stepUtils.d.ts +10 -2
- package/dist/remediate/steps/stepUtils.d.ts.map +1 -1
- package/dist/remediate/steps/stepUtils.js +13 -3
- package/dist/remediate/steps/stepUtils.js.map +1 -1
- package/dist/remediate/steps/types.d.ts +1 -1
- package/dist/remediate/steps/types.d.ts.map +1 -1
- package/dist/remediate/steps/types.js.map +1 -1
- package/dist/remediate/types/options.d.ts +1 -1
- package/dist/remediate/validation/artifacts.d.ts.map +1 -1
- package/dist/remediate/validation/artifacts.js +1 -16
- package/dist/remediate/validation/artifacts.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 +0 -51
- package/dist/remediate/validation/remediationState.js.map +1 -1
- package/dist/shared/analyzerPolicy.d.ts +18 -6
- package/dist/shared/analyzerPolicy.d.ts.map +1 -1
- package/dist/shared/analyzerPolicy.js +15 -3
- package/dist/shared/analyzerPolicy.js.map +1 -1
- package/dist/shared/analyzers/acquisitionEngine.d.ts +71 -32
- package/dist/shared/analyzers/acquisitionEngine.d.ts.map +1 -1
- package/dist/shared/analyzers/acquisitionEngine.js +86 -28
- package/dist/shared/analyzers/acquisitionEngine.js.map +1 -1
- package/dist/shared/analyzers/binaryAcquisition.d.ts +8 -2
- package/dist/shared/analyzers/binaryAcquisition.d.ts.map +1 -1
- package/dist/shared/analyzers/binaryAcquisition.js +4 -4
- package/dist/shared/analyzers/binaryAcquisition.js.map +1 -1
- package/dist/shared/constitutionalDocPaths.d.ts.map +1 -1
- package/dist/shared/constitutionalDocPaths.js +7 -0
- package/dist/shared/constitutionalDocPaths.js.map +1 -1
- package/dist/shared/engine/obligationEngine.d.ts +44 -3
- package/dist/shared/engine/obligationEngine.d.ts.map +1 -1
- package/dist/shared/engine/obligationEngine.js +53 -7
- package/dist/shared/engine/obligationEngine.js.map +1 -1
- package/dist/shared/findings/dedupe.d.ts.map +1 -1
- package/dist/shared/findings/dedupe.js +8 -0
- package/dist/shared/findings/dedupe.js.map +1 -1
- package/dist/shared/friction/frictionRecord.d.ts +42 -2
- package/dist/shared/friction/frictionRecord.d.ts.map +1 -1
- package/dist/shared/friction/frictionRecord.js +111 -3
- package/dist/shared/friction/frictionRecord.js.map +1 -1
- package/dist/shared/friction/triage.d.ts +15 -0
- package/dist/shared/friction/triage.d.ts.map +1 -1
- package/dist/shared/friction/triage.js +33 -2
- package/dist/shared/friction/triage.js.map +1 -1
- package/dist/shared/index.d.ts +15 -9
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/index.js +15 -7
- package/dist/shared/index.js.map +1 -1
- package/dist/shared/intent/constraintClauses.d.ts +31 -0
- package/dist/shared/intent/constraintClauses.d.ts.map +1 -0
- package/dist/shared/intent/constraintClauses.js +37 -0
- package/dist/shared/intent/constraintClauses.js.map +1 -0
- package/dist/shared/io/fileLock.d.ts.map +1 -1
- package/dist/shared/io/fileLock.js +22 -3
- package/dist/shared/io/fileLock.js.map +1 -1
- package/dist/shared/io/frictionCapture.d.ts +73 -19
- package/dist/shared/io/frictionCapture.d.ts.map +1 -1
- package/dist/shared/io/frictionCapture.js +21 -30
- package/dist/shared/io/frictionCapture.js.map +1 -1
- package/dist/shared/io/lockedJsonStore.d.ts +24 -3
- package/dist/shared/io/lockedJsonStore.d.ts.map +1 -1
- package/dist/shared/io/lockedJsonStore.js +35 -7
- package/dist/shared/io/lockedJsonStore.js.map +1 -1
- package/dist/shared/io/stepContractWriter.d.ts +3 -3
- package/dist/shared/io/stepContractWriter.d.ts.map +1 -1
- package/dist/shared/io/stepContractWriter.js +97 -13
- package/dist/shared/io/stepContractWriter.js.map +1 -1
- package/dist/shared/submission/expectedSubmissions.d.ts +18 -0
- package/dist/shared/submission/expectedSubmissions.d.ts.map +1 -1
- package/dist/shared/submission/expectedSubmissions.js +17 -0
- package/dist/shared/submission/expectedSubmissions.js.map +1 -1
- package/dist/shared/submission/handRecovery.d.ts.map +1 -1
- package/dist/shared/submission/handRecovery.js +9 -11
- package/dist/shared/submission/handRecovery.js.map +1 -1
- package/dist/shared/submission/hostHandoffCore.d.ts +155 -0
- package/dist/shared/submission/hostHandoffCore.d.ts.map +1 -0
- package/dist/shared/submission/hostHandoffCore.js +210 -0
- package/dist/shared/submission/hostHandoffCore.js.map +1 -0
- package/dist/shared/submission/submissionLedger.d.ts +5 -1
- package/dist/shared/submission/submissionLedger.d.ts.map +1 -1
- package/dist/shared/submission/submissionLedger.js +33 -3
- package/dist/shared/submission/submissionLedger.js.map +1 -1
- package/dist/shared/tooling/commandShape.d.ts +29 -0
- package/dist/shared/tooling/commandShape.d.ts.map +1 -1
- package/dist/shared/tooling/commandShape.js +82 -10
- package/dist/shared/tooling/commandShape.js.map +1 -1
- package/dist/shared/tooling/exec.d.ts +32 -0
- package/dist/shared/tooling/exec.d.ts.map +1 -1
- package/dist/shared/tooling/exec.js +189 -0
- package/dist/shared/tooling/exec.js.map +1 -1
- package/docs/audit-pkg/contracts.md +2 -1
- package/docs/audit-pkg/operator-guide.md +12 -6
- package/docs/audit-pkg/product.md +22 -6
- package/package.json +13 -6
- package/schemas/audit-code-v1alpha1.schema.json +297 -0
- package/schemas/audit_result.schema.json +4 -0
- package/schemas/audit_results.schema.json +4 -0
- package/scripts/audit/postinstall.mjs +4 -2
- package/scripts/postinstall.mjs +1 -1
- package/scripts/remediate/postinstall.mjs +3 -1
- package/scripts/shared/install-host-assets.mjs +15 -8
- package/skills/audit-code/SKILL.md +4 -2
- package/skills/audit-code/audit-code.prompt.md +5 -2
- package/skills/audit-code/opencode-command-template.txt +1 -1
- package/wrapper/audit-code-wrapper-build.mjs +3 -3
- package/wrapper/audit-code-wrapper-install-hosts.mjs +3 -3
- package/wrapper/audit-code-wrapper-lib.mjs +82 -16
- package/wrapper/installer-verb-help.mjs +14 -4
- package/wrapper/remediate-code-wrapper-install-hosts.mjs +3 -3
- package/docs/audit-pkg/development.md +0 -113
- package/docs/audit-pkg/release.md +0 -140
|
@@ -52,6 +52,18 @@ const VERB_DETAIL = Object.freeze({
|
|
|
52
52
|
],
|
|
53
53
|
});
|
|
54
54
|
|
|
55
|
+
/**
|
|
56
|
+
* One verb's one-line summary, with `{product}` bound to the slash-command the
|
|
57
|
+
* bin installs. The accessor exists so the surface can be RENDERED — the docs
|
|
58
|
+
* that list these verbs read this module rather than restating it, which is how
|
|
59
|
+
* `docs/audit-pkg/product.md` came to omit two of the four.
|
|
60
|
+
*/
|
|
61
|
+
export function installerVerbSummary(verb, product) {
|
|
62
|
+
const summary = VERB_SUMMARY[verb];
|
|
63
|
+
if (summary === undefined) throw new Error(`unknown installer verb: ${verb}`);
|
|
64
|
+
return summary.replace('{product}', product);
|
|
65
|
+
}
|
|
66
|
+
|
|
55
67
|
/** True when `verb` is one of the wrapper-intercepted installer verbs. */
|
|
56
68
|
export function isInstallerVerb(verb) {
|
|
57
69
|
return typeof verb === 'string' && INSTALLER_VERBS.includes(verb);
|
|
@@ -76,7 +88,7 @@ export function wantsInstallerVerbHelp(argv) {
|
|
|
76
88
|
* installs (e.g. `/audit-code`); `usageName` is the bin as the caller invoked it.
|
|
77
89
|
*/
|
|
78
90
|
export function installerVerbHelp(verb, { usageName, product }) {
|
|
79
|
-
const summary =
|
|
91
|
+
const summary = installerVerbSummary(verb, product);
|
|
80
92
|
return [
|
|
81
93
|
`Usage: node ${usageName} ${verb} [--root PATH] [--quiet]`,
|
|
82
94
|
'',
|
|
@@ -92,7 +104,5 @@ export function installerVerbHelp(verb, { usageName, product }) {
|
|
|
92
104
|
|
|
93
105
|
/** The one-line summaries, for a bin's top-level help listing. */
|
|
94
106
|
export function installerVerbSummaries(product) {
|
|
95
|
-
return INSTALLER_VERBS.map(
|
|
96
|
-
(verb) => `- ${verb} ${VERB_SUMMARY[verb].replace('{product}', product)}`,
|
|
97
|
-
);
|
|
107
|
+
return INSTALLER_VERBS.map((verb) => `- ${verb} ${installerVerbSummary(verb, product)}`);
|
|
98
108
|
}
|
|
@@ -406,7 +406,7 @@ export function buildHostCatalog({ root, host, assets }) {
|
|
|
406
406
|
steps: definition.steps,
|
|
407
407
|
};
|
|
408
408
|
})
|
|
409
|
-
.filter(
|
|
409
|
+
.filter((entry) => entry !== null)
|
|
410
410
|
.map((entry) => ({
|
|
411
411
|
...entry,
|
|
412
412
|
primary_path: entry.primary_path,
|
|
@@ -918,9 +918,9 @@ export async function verifyInstalledBootstrap(argv) {
|
|
|
918
918
|
return;
|
|
919
919
|
}
|
|
920
920
|
|
|
921
|
-
const assetPaths = installManifest.asset_paths ?? {};
|
|
921
|
+
const assetPaths = /** @type {any} */ (installManifest).asset_paths ?? {};
|
|
922
922
|
const hostCatalog = new Map(
|
|
923
|
-
(installManifest.hosts ?? []).map((entry) => [entry.host, entry]),
|
|
923
|
+
(/** @type {any} */ (installManifest).hosts ?? []).map((entry) => [entry.host, entry]),
|
|
924
924
|
);
|
|
925
925
|
const selectedHosts = requestedHost && requestedHost !== 'all'
|
|
926
926
|
? getInstallHostKeys(requestedHost)
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
# Development
|
|
2
|
-
|
|
3
|
-
## Repository layout
|
|
4
|
-
|
|
5
|
-
- `src/`: implementation code
|
|
6
|
-
- `schemas/`: JSON schemas for public and internal artifacts
|
|
7
|
-
- `examples/`: validated artifact examples
|
|
8
|
-
- `skills/audit-code/`: canonical prompt and skill-facing instructions
|
|
9
|
-
- `dispatch/`: standalone result validation and merge helpers
|
|
10
|
-
- `tests/`: vitest-based test suite and regression coverage
|
|
11
|
-
- `dist/`: build output (gitignored, not checked in) produced by `npm run build` / the `prepack` script;
|
|
12
|
-
shipped only in the packed npm tarball
|
|
13
|
-
|
|
14
|
-
## Agent handoff
|
|
15
|
-
|
|
16
|
-
Long-term product direction lives in [`product.md`](product.md). Current state + immediate next steps are in
|
|
17
|
-
[`HANDOFF.md`](../HANDOFF.md); open work in [`backlog.md`](../backlog.md). There is no
|
|
18
|
-
shipped-sprint archive — that history lives in git + project memory.
|
|
19
|
-
|
|
20
|
-
## Build and test
|
|
21
|
-
|
|
22
|
-
```bash
|
|
23
|
-
npm install
|
|
24
|
-
npm run check
|
|
25
|
-
npm test
|
|
26
|
-
npx vitest run tests/audit/host-handoff.test.ts
|
|
27
|
-
npm run verify:release
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
Run `npm install` from the repository root before running build, check, test, or
|
|
31
|
-
package-scoped workflows in a fresh clone or git worktree. Missing
|
|
32
|
-
`node_modules` can surface as misleading `audit-tools/shared` export or type
|
|
33
|
-
errors because dependents may resolve stale compiled `dist/` output.
|
|
34
|
-
|
|
35
|
-
The test suite is intentionally contract-heavy. Update tests when changing
|
|
36
|
-
schema shape, prompt contracts, host-handoff behavior, installer output, or release
|
|
37
|
-
workflow semantics.
|
|
38
|
-
|
|
39
|
-
## Architecture
|
|
40
|
-
|
|
41
|
-
The system separates deterministic extraction from bounded LLM judgment: intake, analysis artifacts,
|
|
42
|
-
task planning, provider-neutral host workloads, strict result ingestion, and synthesis into
|
|
43
|
-
`audit-report.md`. Backend/model selection, concurrency, retries, and transport belong to the host and
|
|
44
|
-
are not audit-tools configuration.
|
|
45
|
-
|
|
46
|
-
**The ordering has one home** — the `PRIORITY` array in `src/audit/orchestrator/nextStep.ts`, walked by
|
|
47
|
-
`decideNextStep`. `src/audit/README.md` carries the conceptual grouping with the disclaimer that `PRIORITY` is
|
|
48
|
-
authoritative; read the array for the real sequence. Copies of it have drifted before, which is why
|
|
49
|
-
neither this file nor any other keeps a second one.
|
|
50
|
-
|
|
51
|
-
Portability rules:
|
|
52
|
-
|
|
53
|
-
- tool-specific collectors write tool-agnostic JSON
|
|
54
|
-
- prompts consume artifacts and bounded source context
|
|
55
|
-
- review work is attributable to files, lenses, passes, and tasks
|
|
56
|
-
- coverage gaps are machine-detectable
|
|
57
|
-
|
|
58
|
-
`AuditTask` is the coverage identity; `AuditResult[]` is the ingestion contract.
|
|
59
|
-
|
|
60
|
-
## Adding language analyzers
|
|
61
|
-
|
|
62
|
-
Language support should be adapter-based. A new analyzer should enrich shared
|
|
63
|
-
artifacts instead of inventing a language-specific planning path.
|
|
64
|
-
|
|
65
|
-
Avoid adding another bespoke manifest or project-file parser by default. First
|
|
66
|
-
ask whether the signal is common in expected repositories, whether it provides
|
|
67
|
-
direction or ownership that path heuristics cannot, and whether the same value
|
|
68
|
-
could come from a generic analyzer-supplied ownership hint.
|
|
69
|
-
|
|
70
|
-
Preferred outputs:
|
|
71
|
-
|
|
72
|
-
- graph edges with kind, direction, confidence, and reason
|
|
73
|
-
- entrypoints and surfaces
|
|
74
|
-
- test-to-source links
|
|
75
|
-
- package/module ownership hints, including analyzer-supplied `ownership_roots`
|
|
76
|
-
that become `analyzer-ownership-root-link` graph references
|
|
77
|
-
- contract-suite links for small JSON Schema, workflow, package-script, or
|
|
78
|
-
TypeScript type suites when planner metrics show otherwise weak packets
|
|
79
|
-
- external boundary hints
|
|
80
|
-
- line counts and anchor summaries for large files
|
|
81
|
-
|
|
82
|
-
Keep deep analyzers optional: a repository should still produce useful packets
|
|
83
|
-
from manifests, paths, tests, and external analyzer results when a language has
|
|
84
|
-
only fallback support. Command-backed analyzers should prove project intent
|
|
85
|
-
before running — prefer repo-local config checks (`eslint.config.*`, `.eslintrc*`,
|
|
86
|
-
`package.json` `eslintConfig`) over executing a globally installed tool and
|
|
87
|
-
parsing its no-config failure.
|
|
88
|
-
|
|
89
|
-
Language-agnostic semantic affinity is useful for ranking adjacent context but
|
|
90
|
-
should stay low-authority: don't let shared token frequency alone force packet
|
|
91
|
-
merges; use it for `boundary_files` or candidate explanations unless a
|
|
92
|
-
deterministic edge corroborates the relationship.
|
|
93
|
-
|
|
94
|
-
## Production readiness
|
|
95
|
-
|
|
96
|
-
Drive priorities from field trials, not speculation: run representative
|
|
97
|
-
repositories through planning, validate the bundle (`audit-code validate`), and
|
|
98
|
-
compare `audit_plan_metrics.json` (packet count, weak-packet count, cohesion,
|
|
99
|
-
merge/boundary edge kinds) across runs. Promote an extractor or planner change
|
|
100
|
-
when those metrics expose a deterministic gap — and prefer improving shared
|
|
101
|
-
graph resolution or generic analyzer ownership roots before adding another
|
|
102
|
-
ecosystem-specific parser.
|
|
103
|
-
|
|
104
|
-
Before treating a build as production-ready, verify the full review loop in one
|
|
105
|
-
real host (`next-step` emits the complete workload → the host writes each bound
|
|
106
|
-
result → `next-step` ingests them → `validate`), then run the release gate from a clean
|
|
107
|
-
checkout (see [`release.md`](release.md) for what `npm run verify:release`
|
|
108
|
-
covers and when to run it). Keep runtime command execution covered when
|
|
109
|
-
changing it — including the Windows package-manager-shim path (see the Windows
|
|
110
|
-
notes in [`operator-guide.md`](operator-guide.md)). If the
|
|
111
|
-
final `audit-report.md` cannot be promoted from `.audit-tools/audit/` to
|
|
112
|
-
`.audit-tools/audit-report.md` due to local permissions, completion still succeeds and the
|
|
113
|
-
pre-promotion copy under `.audit-tools/audit/` is authoritative.
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
# Release
|
|
2
|
-
|
|
3
|
-
The maintainer land-and-publish flow — release gate, publication, version bumps —
|
|
4
|
-
is owned by the ship skill (`.claude/skills/ship/SKILL.md`), including the
|
|
5
|
-
generated gate-step list. `npm run release:patch` bumps + tags;
|
|
6
|
-
`npm run release:patch:publish` runs the full flow (`release:minor` /
|
|
7
|
-
`release:major` variants likewise). Routine CI exercises the
|
|
8
|
-
Node majors matrixed in `.github/workflows/*.yml` (the matrix there is
|
|
9
|
-
self-describing).
|
|
10
|
-
|
|
11
|
-
This page keeps what the skill does not carry: manual host validation, manual
|
|
12
|
-
workflow dispatch, trusted-publisher configuration, and troubleshooting.
|
|
13
|
-
|
|
14
|
-
## Host validation — the manual half of the release gate
|
|
15
|
-
|
|
16
|
-
The automated half of multi-host validation lives in `npm run verify:hosts`
|
|
17
|
-
(wired into `verify:release`): it deploys every host surface into an isolated
|
|
18
|
-
temp `$HOME` and re-runs each host's own `verify()` handler from the same
|
|
19
|
-
`INSTALL_HOST_DEFINITIONS` table the postinstall deploy uses. That gate catches
|
|
20
|
-
*our* drift — a missing, unparseable, or canonical-body-diverged asset — before
|
|
21
|
-
publish.
|
|
22
|
-
|
|
23
|
-
This checklist covers only what CI **cannot** reach: actually invoking
|
|
24
|
-
`/audit-code` inside a GUI host and confirming a host handoff round-trips. A GUI
|
|
25
|
-
host can change its asset format or command-rendering out from under us; the
|
|
26
|
-
no-drift guard does not see that, so a human runs these rows at release. A failed
|
|
27
|
-
row becomes a backlog item.
|
|
28
|
-
|
|
29
|
-
Concrete semantic execution is outside the package boundary, so release
|
|
30
|
-
validation covers workload emission and result ingestion rather than a matrix
|
|
31
|
-
of execution backends.
|
|
32
|
-
|
|
33
|
-
### How to run a row
|
|
34
|
-
|
|
35
|
-
For each GUI host below:
|
|
36
|
-
|
|
37
|
-
1. **Install** — from a clean repo, run `npm install -g audit-tools` (or the
|
|
38
|
-
local equivalent) so postinstall deploys the host surface, then open the
|
|
39
|
-
repository in the host.
|
|
40
|
-
2. **Command appears** — confirm the host registers/offers `/audit-code` (slash
|
|
41
|
-
command, skill, or agent, per the host's setup kind).
|
|
42
|
-
3. **One live handoff** — invoke `/audit-code` and let it run one bounded audit
|
|
43
|
-
step (a single `audit-code next-step` round-trip). If semantic work is
|
|
44
|
-
reached, complete one emitted host work item.
|
|
45
|
-
4. **Result lands** — confirm the step's result artifact is written under
|
|
46
|
-
`.audit-tools/audit/` (e.g. `steps/current-step.json` advances and the
|
|
47
|
-
expected artifact for that step appears).
|
|
48
|
-
|
|
49
|
-
Mark each cell pass / fail; record the release version and date **in the release's own
|
|
50
|
-
notes or a `docs/reviews/` record — never by committing a filled copy of the grids below.**
|
|
51
|
-
They are a timeless template, like `docs/end-of-sprint-report-template.md`.
|
|
52
|
-
|
|
53
|
-
### Checklist (one row per GUI host)
|
|
54
|
-
|
|
55
|
-
| Host | Surface deployed | 1. Install + open | 2. `/audit-code` visible | 3. One live handoff | 4. Result lands under `.audit-tools/audit/` |
|
|
56
|
-
|---|---|---|---|---|---|
|
|
57
|
-
| Antigravity | `.agent/skills/audit-code/SKILL.md` skill, `.gemini/commands/audit-code.toml` slash command, planning guide, AGENTS instructions | ☐ | ☐ | ☐ | ☐ |
|
|
58
|
-
| OpenCode | global `/audit-code` command (npm-installed) + generated `opencode.json` project permissions | ☐ | ☐ | ☐ | ☐ |
|
|
59
|
-
| VS Code | generated prompt file + custom agent + Copilot instructions (`INSTALL_HOST_DEFINITIONS.vscode`, `setup_kind: 'prompt+agent'`) | ☐ | ☐ | ☐ | ☐ |
|
|
60
|
-
|
|
61
|
-
Notes / failures (file each as a backlog item):
|
|
62
|
-
|
|
63
|
-
-
|
|
64
|
-
|
|
65
|
-
### remediate-code checklist (one row per GUI host)
|
|
66
|
-
|
|
67
|
-
`remediate-code` has its own automated half — `npm run verify:remediate-hosts`
|
|
68
|
-
(`scripts/remediate/verify-hosts.mjs`, wired into `verify:release`), the mirror of
|
|
69
|
-
the audit gate: it deploys every remediate host surface into an isolated temp
|
|
70
|
-
`$HOME` and re-runs each host's `verify()` handler from the same
|
|
71
|
-
`INSTALL_HOST_DEFINITIONS` table. As with audit, that gate catches *our* drift but
|
|
72
|
-
cannot invoke `/remediate-code` inside a live GUI host — a human runs the rows
|
|
73
|
-
below at release, using the same GUI-host set.
|
|
74
|
-
|
|
75
|
-
| Host | Surface deployed | 1. Install + open | 2. `/remediate-code` visible | 3. One live handoff | 4. Result lands under `.audit-tools/remediation/` |
|
|
76
|
-
|---|---|---|---|---|---|
|
|
77
|
-
| Antigravity | `.agent/skills/remediate-code/SKILL.md` skill, `.gemini/commands/remediate-code.toml` slash command, planning guide, AGENTS instructions | ☐ | ☐ | ☐ | ☐ |
|
|
78
|
-
| OpenCode | global `/remediate-code` command (npm-installed) + generated `opencode.json` project permissions | ☐ | ☐ | ☐ | ☐ |
|
|
79
|
-
| VS Code | generated prompt file + custom agent + Copilot instructions (`INSTALL_HOST_DEFINITIONS.vscode`, `setup_kind: 'prompt+agent'`) | ☐ | ☐ | ☐ | ☐ |
|
|
80
|
-
|
|
81
|
-
Notes / failures (file each as a backlog item):
|
|
82
|
-
|
|
83
|
-
-
|
|
84
|
-
|
|
85
|
-
## Manual workflow dispatch
|
|
86
|
-
|
|
87
|
-
Use GitHub Actions `workflow_dispatch` to exercise or run the publish workflow.
|
|
88
|
-
|
|
89
|
-
Dry run:
|
|
90
|
-
|
|
91
|
-
- `dry_run=true`
|
|
92
|
-
- `publish_tag=auto`
|
|
93
|
-
|
|
94
|
-
Live publish:
|
|
95
|
-
|
|
96
|
-
- `dry_run=false`
|
|
97
|
-
- `publish_tag=auto` unless intentionally overriding the dist-tag
|
|
98
|
-
|
|
99
|
-
`publish_tag=auto` resolves stable versions to `latest` and prerelease versions
|
|
100
|
-
to `next`.
|
|
101
|
-
|
|
102
|
-
Publishing a GitHub Release triggers the same workflow.
|
|
103
|
-
|
|
104
|
-
## Trusted publisher setup
|
|
105
|
-
|
|
106
|
-
npm Trusted Publishing is configured for this repository. If repository,
|
|
107
|
-
workflow, or ownership details change, keep the npm trusted publisher entry
|
|
108
|
-
aligned with:
|
|
109
|
-
|
|
110
|
-
- owner or organization: `OhOkThisIsFine`
|
|
111
|
-
- repository: `audit-tools`
|
|
112
|
-
- workflow filename: `publish-package.yml`
|
|
113
|
-
|
|
114
|
-
## Troubleshooting
|
|
115
|
-
|
|
116
|
-
If a GitHub Actions run fails:
|
|
117
|
-
|
|
118
|
-
1. download the uploaded `*-npm-logs` artifact
|
|
119
|
-
2. rerun `npm ci` and `npm run verify:release` locally from the same commit
|
|
120
|
-
3. for publish failures, rerun `publish-package.yml` with `dry_run=true`
|
|
121
|
-
4. confirm npm Trusted Publishing still targets `publish-package.yml`
|
|
122
|
-
|
|
123
|
-
For live child-process output while debugging the packaged/linked smokes:
|
|
124
|
-
|
|
125
|
-
```bash
|
|
126
|
-
AUDIT_CODE_VERBOSE=1 npm run smoke:packaged-audit-code
|
|
127
|
-
AUDIT_CODE_VERBOSE=1 npm run smoke:linked-audit-code
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
The packaged smoke path strips inherited `npm_config_*`, `NODE_AUTH_TOKEN`, and
|
|
131
|
-
`NPM_TOKEN` values before nested npm operations so dry runs and smoke installs
|
|
132
|
-
do not accidentally inherit publish credentials or suppress tarball generation.
|
|
133
|
-
|
|
134
|
-
Post-publish checks:
|
|
135
|
-
|
|
136
|
-
```bash
|
|
137
|
-
npm view audit-tools version
|
|
138
|
-
npm view audit-tools dist-tags --json
|
|
139
|
-
npm audit signatures
|
|
140
|
-
```
|