auditor-lambda 0.3.12 → 0.3.14
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 +20 -24
- package/audit-code-wrapper-lib.mjs +52 -53
- package/dist/cli.js +43 -6
- package/dist/coverage.js +3 -1
- package/dist/extractors/disposition.js +8 -1
- package/dist/extractors/graph.d.ts +3 -1
- package/dist/extractors/graph.js +1147 -67
- package/dist/extractors/graphManifestEdges.d.ts +14 -0
- package/dist/extractors/graphManifestEdges.js +1158 -0
- package/dist/extractors/graphPathUtils.d.ts +5 -0
- package/dist/extractors/graphPathUtils.js +75 -0
- package/dist/extractors/pathPatterns.d.ts +1 -0
- package/dist/extractors/pathPatterns.js +3 -0
- package/dist/io/artifacts.d.ts +10 -1
- package/dist/io/artifacts.js +23 -3
- package/dist/orchestrator/internalExecutors.d.ts +4 -0
- package/dist/orchestrator/internalExecutors.js +35 -6
- package/dist/orchestrator/reviewPackets.js +1003 -31
- package/dist/orchestrator/syntaxResolutionExecutor.js +34 -0
- package/dist/types/externalAnalyzer.d.ts +9 -0
- package/dist/types/graph.d.ts +3 -0
- package/dist/types/reviewPlanning.d.ts +39 -0
- package/docs/contracts.md +215 -0
- package/docs/development.md +210 -0
- package/docs/handoff.md +204 -0
- package/docs/history.md +40 -0
- package/docs/operator-guide.md +189 -0
- package/docs/product.md +185 -0
- package/docs/release.md +131 -0
- package/package.json +1 -1
- package/schemas/audit_plan_metrics.schema.json +347 -0
- package/schemas/external_analyzer_results.schema.json +35 -0
- package/schemas/graph_bundle.schema.json +47 -2
- package/schemas/review_packets.schema.json +160 -0
- package/skills/audit-code/SKILL.md +7 -3
- package/skills/audit-code/audit-code.prompt.md +4 -1
- package/docs/agent-integrations.md +0 -317
- package/docs/agent-roles.md +0 -69
- package/docs/architecture.md +0 -90
- package/docs/artifacts.md +0 -36
- package/docs/bootstrap-install.md +0 -139
- package/docs/contract.md +0 -54
- package/docs/dispatch-implementation-plan.md +0 -302
- package/docs/field-trial-bug-report.md +0 -237
- package/docs/github-copilot.md +0 -66
- package/docs/model-selection.md +0 -97
- package/docs/next-steps.md +0 -202
- package/docs/packaging.md +0 -120
- package/docs/pipeline.md +0 -152
- package/docs/product-direction.md +0 -154
- package/docs/production-launch-bar.md +0 -92
- package/docs/production-readiness.md +0 -58
- package/docs/releasing.md +0 -145
- package/docs/remediation-baseline.md +0 -75
- package/docs/repo-layout.md +0 -30
- package/docs/run-flow.md +0 -56
- package/docs/session-config.md +0 -319
- package/docs/supervisor.md +0 -100
- package/docs/usage.md +0 -215
- package/docs/windows-setup.md +0 -146
- package/docs/workflow-refactor-brief.md +0 -124
package/docs/releasing.md
DELETED
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
# Releasing
|
|
2
|
-
|
|
3
|
-
This repository publishes to npm through GitHub Actions Trusted Publishing.
|
|
4
|
-
|
|
5
|
-
The canonical workflow is:
|
|
6
|
-
|
|
7
|
-
`/.github/workflows/publish-package.yml`
|
|
8
|
-
|
|
9
|
-
That workflow already:
|
|
10
|
-
|
|
11
|
-
- runs on GitHub-hosted runners
|
|
12
|
-
- requests `id-token: write` for npm OIDC exchange
|
|
13
|
-
- pins Node `22.14.0`
|
|
14
|
-
- upgrades npm to `>=11.5.1`
|
|
15
|
-
- runs `npm run verify:release` before any publish attempt
|
|
16
|
-
- previews the packed tarball with `npm pack --dry-run` before any live publish attempt
|
|
17
|
-
- defaults semver prerelease versions to the `next` dist-tag unless manual dispatch overrides it
|
|
18
|
-
- uploads npm debug logs when a publish-path step fails
|
|
19
|
-
|
|
20
|
-
## One-time npm setup
|
|
21
|
-
|
|
22
|
-
Before the first live publish, configure npm itself to trust this repository:
|
|
23
|
-
|
|
24
|
-
1. confirm the intended npm owner already controls `auditor-lambda`
|
|
25
|
-
2. in the npm package settings, add a GitHub Actions trusted publisher for:
|
|
26
|
-
- owner or organization: `OhOkThisIsFine`
|
|
27
|
-
- repository: `auditor-lambda`
|
|
28
|
-
- workflow filename: `publish-package.yml`
|
|
29
|
-
3. keep the workflow filename stable after that, or update the npm trusted publisher entry before renaming it
|
|
30
|
-
4. after the first successful trusted publish, consider enabling npm's setting that requires 2FA and disallows legacy publish tokens
|
|
31
|
-
|
|
32
|
-
## Release preflight
|
|
33
|
-
|
|
34
|
-
From the repository root:
|
|
35
|
-
|
|
36
|
-
```bash
|
|
37
|
-
npm ci
|
|
38
|
-
npm run verify:release
|
|
39
|
-
npm publish --dry-run
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
The local dry run is still valuable even though the real publish happens in GitHub Actions. It proves the packed artifact, lifecycle hooks, and publish metadata before you spend a release on a broken workflow run.
|
|
43
|
-
|
|
44
|
-
## Version bump helpers
|
|
45
|
-
|
|
46
|
-
You do not need to look up the current version before cutting a release bump.
|
|
47
|
-
|
|
48
|
-
From the repository root:
|
|
49
|
-
|
|
50
|
-
```bash
|
|
51
|
-
npm run release:patch
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
That delegates the increment to `npm version patch`, updates `package.json` and `package-lock.json`, and creates the matching release commit and git tag in the existing repository format:
|
|
55
|
-
|
|
56
|
-
Under the hood, the helper uses `npm version patch --no-git-tag-version` and then creates the release commit and annotated git tag explicitly so the workflow stays compatible with current npm CLI behavior.
|
|
57
|
-
|
|
58
|
-
- commit: `release: vX.Y.Z`
|
|
59
|
-
- tag: `vX.Y.Z`
|
|
60
|
-
|
|
61
|
-
The repository also exposes:
|
|
62
|
-
|
|
63
|
-
- `npm run release:minor`
|
|
64
|
-
- `npm run release:major`
|
|
65
|
-
|
|
66
|
-
After the version bump, push `main` and the new tag, then publish through the GitHub Actions trusted publishing flow.
|
|
67
|
-
|
|
68
|
-
## One-command release publish
|
|
69
|
-
|
|
70
|
-
When you want the repository to do the full maintainer flow in one command, use:
|
|
71
|
-
|
|
72
|
-
```bash
|
|
73
|
-
npm run release:patch:publish
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
That command:
|
|
77
|
-
|
|
78
|
-
1. verifies the git worktree is clean and you are on `main`
|
|
79
|
-
2. runs `npm run verify:release`
|
|
80
|
-
3. bumps the version, commits `package.json` and `package-lock.json`, and creates the annotated release tag
|
|
81
|
-
4. pushes `main` and the new release tag
|
|
82
|
-
5. creates the matching GitHub Release
|
|
83
|
-
6. waits for `publish-package.yml` to publish through Trusted Publishing
|
|
84
|
-
7. confirms the new npm version resolves from the registry before exiting
|
|
85
|
-
|
|
86
|
-
Minor and major variants are also available:
|
|
87
|
-
|
|
88
|
-
- `npm run release:minor:publish`
|
|
89
|
-
- `npm run release:major:publish`
|
|
90
|
-
|
|
91
|
-
## Supported Node lines
|
|
92
|
-
|
|
93
|
-
Routine CI currently exercises the repository on Node `20` and Node `22`.
|
|
94
|
-
|
|
95
|
-
Release and publish workflows stay pinned to Node `22.14.0` because that is the line this repository uses for npm Trusted Publishing and release smoke verification.
|
|
96
|
-
|
|
97
|
-
## GitHub release paths
|
|
98
|
-
|
|
99
|
-
### Manual dry run
|
|
100
|
-
|
|
101
|
-
Use GitHub Actions `workflow_dispatch` when you want to prove the exact publish workflow without uploading a package.
|
|
102
|
-
|
|
103
|
-
Recommended inputs:
|
|
104
|
-
|
|
105
|
-
- `dry_run=true`
|
|
106
|
-
- `publish_tag=auto`
|
|
107
|
-
|
|
108
|
-
`publish_tag=auto` resolves like this:
|
|
109
|
-
|
|
110
|
-
- stable versions publish to `latest`
|
|
111
|
-
- semver prerelease versions publish to `next`
|
|
112
|
-
|
|
113
|
-
### Manual live publish
|
|
114
|
-
|
|
115
|
-
Use `workflow_dispatch` with:
|
|
116
|
-
|
|
117
|
-
- `dry_run=false`
|
|
118
|
-
- `publish_tag=auto` unless you intentionally need a different dist-tag
|
|
119
|
-
|
|
120
|
-
This is the safest path for the first trusted-publishing release because it lets you prove the workflow before tying it to a GitHub Release event.
|
|
121
|
-
|
|
122
|
-
### Release-driven publish
|
|
123
|
-
|
|
124
|
-
After the manual path is proven, publishing a GitHub Release will trigger the same workflow and publish the package.
|
|
125
|
-
|
|
126
|
-
## Workflow troubleshooting
|
|
127
|
-
|
|
128
|
-
If a GitHub Actions run fails:
|
|
129
|
-
|
|
130
|
-
1. download the uploaded `*-npm-logs` artifact from the failed run
|
|
131
|
-
2. rerun `npm ci` and `npm run verify:release` locally from the same commit
|
|
132
|
-
3. for publish failures, rerun `publish-package.yml` with `dry_run=true` before retrying a live publish
|
|
133
|
-
4. if publish still fails, confirm npm Trusted Publishing is still configured for `publish-package.yml`
|
|
134
|
-
|
|
135
|
-
## Post-publish checks
|
|
136
|
-
|
|
137
|
-
After a live publish, verify the result from a clean shell:
|
|
138
|
-
|
|
139
|
-
```bash
|
|
140
|
-
npm view auditor-lambda version
|
|
141
|
-
npm view auditor-lambda dist-tags --json
|
|
142
|
-
npm audit signatures
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
Also confirm that the npm package page shows the expected version and provenance information.
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
# Remediation Baseline
|
|
2
|
-
|
|
3
|
-
This document preserves the remediation work that is already in the source tree so the stale audit state can be discarded safely before a fresh rerun.
|
|
4
|
-
|
|
5
|
-
## Safe reset boundary
|
|
6
|
-
|
|
7
|
-
After reviewing this document and [docs/workflow-refactor-brief.md](/C:/Code/auditor-lambda/docs/workflow-refactor-brief.md), it is safe to delete:
|
|
8
|
-
|
|
9
|
-
- `.audit-artifacts/`
|
|
10
|
-
- `audit-report.md`
|
|
11
|
-
|
|
12
|
-
Those files describe a stale audit run and should not be used as the primary workflow driver for the next implementation pass.
|
|
13
|
-
|
|
14
|
-
The source tree and tests are the durable baseline to keep.
|
|
15
|
-
|
|
16
|
-
## Remediation already landed in the source tree
|
|
17
|
-
|
|
18
|
-
The current worktree already includes substantial remediation across the main audited areas.
|
|
19
|
-
|
|
20
|
-
- Fixtures and workflows were hardened across `tests/fixtures/simple-app/...`, `.github/workflows/...`, `scripts/smoke-linked-audit-code.mjs`, `scripts/smoke-packaged-audit-code.mjs`, and the related release/operator docs.
|
|
21
|
-
- Extractor path handling and classification behavior were tightened in `src/extractors/...` with dedicated regressions in `tests/extractors-remediation.test.mjs`.
|
|
22
|
-
- Schema-contract and validation coverage were improved across `schemas/...`, `tests/helpers/jsonSchemaAssert.mjs`, `src/validation/...`, `tests/schema-contracts.test.mjs`, and `tests/validation-remediation.test.mjs`.
|
|
23
|
-
- Orchestrator behavior was hardened in `src/orchestrator/...` with focused regressions in `tests/orchestrator-remediation.test.mjs` and `tests/orchestration.test.mjs`.
|
|
24
|
-
- Supervisor and provider behavior were improved in `src/supervisor/...`, `src/providers/...`, and their companion tests.
|
|
25
|
-
- CLI and IO behavior were tightened in `src/cli.ts`, `src/index.ts`, `src/io/...`, and the related remediation tests.
|
|
26
|
-
- Reporting and synthesis behavior were improved in `src/reporting/...` with `tests/reporting-remediation.test.mjs`.
|
|
27
|
-
- The generated repo-local install payload was refreshed so `.audit-code/install/claude-desktop/...` now matches the current `dist/`, `schemas/`, and `skills/audit-code` source of truth, and `.audit-code/install/manifest.json` now points `source_prompt_path` at the repo-local prompt asset instead of a machine-specific global npm path.
|
|
28
|
-
|
|
29
|
-
## Verification already performed
|
|
30
|
-
|
|
31
|
-
The following verification was already recorded against the current remediation tree.
|
|
32
|
-
|
|
33
|
-
- `npm test` passed on 2026-04-22 with 106 passing tests.
|
|
34
|
-
- `npm run build` passed in the targeted remediation passes below.
|
|
35
|
-
- `node --test --test-isolation=none tests/validation-remediation.test.mjs tests/validate-command.test.mjs tests/field-trial-remediation.test.mjs tests/provider-auto-resolution.test.mjs tests/supervisor-remediation.test.mjs` passed.
|
|
36
|
-
- `node --test --test-isolation=none tests/cli-remediation.test.mjs tests/validate-command.test.mjs` passed.
|
|
37
|
-
- `node --test --test-isolation=none tests/extractors-remediation.test.mjs` passed.
|
|
38
|
-
- `node --test --test-isolation=none tests/io-remediation.test.mjs tests/cli-remediation.test.mjs tests/validate-command.test.mjs tests/staleness.test.mjs` passed.
|
|
39
|
-
- `node --test --test-isolation=none tests/adapters-remediation.test.mjs tests/reporting-remediation.test.mjs tests/field-trial-remediation.test.mjs` passed.
|
|
40
|
-
- `node --test --test-isolation=none tests/orchestration.test.mjs tests/orchestrator-remediation.test.mjs tests/reporting-remediation.test.mjs` passed.
|
|
41
|
-
- The manually repaired install payload now has hash parity between the committed Claude Desktop bundle and the canonical repo `dist/`, `schemas/`, and `skills/audit-code` files.
|
|
42
|
-
|
|
43
|
-
## Environment limits observed during verification
|
|
44
|
-
|
|
45
|
-
The current sandbox still hits `spawn EPERM` for subprocess-heavy wrapper/provider coverage.
|
|
46
|
-
|
|
47
|
-
That means:
|
|
48
|
-
|
|
49
|
-
- broader wrapper/provider integration checks remain environment-limited here
|
|
50
|
-
- the stale audit rerun should not be treated as authoritative
|
|
51
|
-
- the workflow refactor should be completed before a fresh audit is attempted
|
|
52
|
-
|
|
53
|
-
## Release status
|
|
54
|
-
|
|
55
|
-
Do not cut a release tag, push a release branch, or publish from the current stale audit state.
|
|
56
|
-
|
|
57
|
-
The correct order is:
|
|
58
|
-
|
|
59
|
-
1. preserve the source changes already made
|
|
60
|
-
2. refactor the workflow
|
|
61
|
-
3. delete the stale audit state
|
|
62
|
-
4. rerun the audit from a clean slate
|
|
63
|
-
5. only then decide whether a release is ready
|
|
64
|
-
|
|
65
|
-
## Fresh rerun checklist
|
|
66
|
-
|
|
67
|
-
When the workflow refactor is complete, the next context should:
|
|
68
|
-
|
|
69
|
-
1. keep the current source and doc changes
|
|
70
|
-
2. delete `.audit-artifacts/`
|
|
71
|
-
3. delete `audit-report.md`
|
|
72
|
-
4. run `npm run build`
|
|
73
|
-
5. run the most relevant regression tests for the refactor
|
|
74
|
-
6. start a fresh `/audit-code` run
|
|
75
|
-
7. treat the new audit output as the release gate
|
package/docs/repo-layout.md
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
# Repository layout
|
|
2
|
-
|
|
3
|
-
## Top-level purpose
|
|
4
|
-
|
|
5
|
-
- `docs/`: architecture, pipeline, layout, and design notes
|
|
6
|
-
- `schemas/`: JSON schemas for stable intermediate artifacts
|
|
7
|
-
- `skills/audit-code/`: portable prompt assets and skill-facing product instructions
|
|
8
|
-
- `src/`: implementation code for extraction, orchestration, coverage, and reporting
|
|
9
|
-
- `examples/`: example artifacts demonstrating expected shapes
|
|
10
|
-
- `.audit-artifacts/`: runtime-generated local artifact bundle for fallback wrapper runs; do not commit it
|
|
11
|
-
- `dist/`: checked-in compiled runtime output used by the packaged entrypoint
|
|
12
|
-
- `docs/next-steps.md`: current roadmap and next implementation notes
|
|
13
|
-
- `docs/production-launch-bar.md`: explicit minimum launch criteria and release verification bar
|
|
14
|
-
- `docs/production-readiness.md`: current production-readiness verdict and launch blockers
|
|
15
|
-
|
|
16
|
-
## Near-term code layout
|
|
17
|
-
|
|
18
|
-
- `src/extractors/`: deterministic collectors and heuristic classifiers
|
|
19
|
-
- `src/orchestrator/`: task construction, chunking, pass logic, and requeue support
|
|
20
|
-
- `src/coverage/` or `src/coverage.ts`: coverage accounting helpers
|
|
21
|
-
- `src/reporting/`: result merging and remediation views
|
|
22
|
-
- `src/types.ts`: shared TypeScript interfaces mirroring the JSON schemas as closely as practical
|
|
23
|
-
|
|
24
|
-
## Skill portability rule
|
|
25
|
-
|
|
26
|
-
The repo should be usable even when the host environment changes. For that reason:
|
|
27
|
-
|
|
28
|
-
- prompts should remain plain markdown
|
|
29
|
-
- artifacts should remain plain JSON
|
|
30
|
-
- orchestration logic should not depend on one editor or one agent runtime
|
package/docs/run-flow.md
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
# Run flow
|
|
2
|
-
|
|
3
|
-
The canonical product route is `/audit-code` in conversation.
|
|
4
|
-
|
|
5
|
-
This document describes the backend execution flow that supports that conversational route and the repo-local fallback wrapper.
|
|
6
|
-
|
|
7
|
-
## Packet review-dispatch path
|
|
8
|
-
|
|
9
|
-
1. Build or import a repository manifest.
|
|
10
|
-
2. Build units, graph edges, flows, risk, and other deterministic structure
|
|
11
|
-
artifacts.
|
|
12
|
-
3. Determine which files require which lenses and create compatible
|
|
13
|
-
`AuditTask` records.
|
|
14
|
-
4. Build `review_packets.json` and `audit_plan_metrics.json` from those tasks.
|
|
15
|
-
5. Stop at semantic review with an active run handoff.
|
|
16
|
-
6. `prepare-dispatch` writes a small run-scoped `dispatch-plan.json` and one
|
|
17
|
-
prompt per review packet, plus a backend-owned result map.
|
|
18
|
-
Isolated large-file packets also get mechanical anchor summaries for
|
|
19
|
-
targeted review.
|
|
20
|
-
7. The active conversation orchestrator launches one bounded subagent per
|
|
21
|
-
packet when the host supports subagents.
|
|
22
|
-
8. Each subagent pipes `AuditResult[]` to the packet's `submit-packet` command;
|
|
23
|
-
the backend validates and writes assigned result files.
|
|
24
|
-
9. `merge-and-ingest` validates the full assigned task set and ingests the
|
|
25
|
-
existing `AuditResult[]` shape.
|
|
26
|
-
10. Result ingestion updates coverage, requeue, runtime-validation state, and
|
|
27
|
-
any selective-deepening follow-up tasks.
|
|
28
|
-
11. Repeat until coverage and runtime rules are satisfied.
|
|
29
|
-
12. Synthesize findings into merged outputs.
|
|
30
|
-
|
|
31
|
-
## Current backend capability
|
|
32
|
-
|
|
33
|
-
The current TypeScript implementation already covers:
|
|
34
|
-
|
|
35
|
-
- repo intake and ignore handling
|
|
36
|
-
- structure and planning artifact generation
|
|
37
|
-
- graph-first packet review planning
|
|
38
|
-
- compact packet dispatch and merge envelopes
|
|
39
|
-
- reviewed-range ingestion from audit results
|
|
40
|
-
- bounded selective deepening
|
|
41
|
-
- runtime validation update ingestion
|
|
42
|
-
- synthesis and completion tracking
|
|
43
|
-
- backend provider handoff for fallback or compatibility review flows
|
|
44
|
-
|
|
45
|
-
## Product interpretation
|
|
46
|
-
|
|
47
|
-
- the conversation route should hide this state machine behind `/audit-code`
|
|
48
|
-
- the repo-local `audit-code` wrapper is fallback infrastructure for operators and local harnesses
|
|
49
|
-
- provider adapters and artifact plumbing are backend details, not the primary product story
|
|
50
|
-
- the active conversation agent should own semantic packet dispatch by default
|
|
51
|
-
- when fallback execution blocks, the wrapper should still leave behind explicit operator handoff files and suggested evidence-import paths
|
|
52
|
-
|
|
53
|
-
Broader product priorities are tracked in:
|
|
54
|
-
|
|
55
|
-
- `docs/workflow-refactor-brief.md`
|
|
56
|
-
- `docs/next-steps.md`
|
package/docs/session-config.md
DELETED
|
@@ -1,319 +0,0 @@
|
|
|
1
|
-
# session-config
|
|
2
|
-
|
|
3
|
-
This file only applies to explicit backend fallback workflows.
|
|
4
|
-
|
|
5
|
-
The canonical `/audit-code` conversation route should not require users to touch it.
|
|
6
|
-
|
|
7
|
-
It does not define who owns semantic review in the canonical conversation flow, and it is not enough by itself to transfer semantic review away from the active conversation agent.
|
|
8
|
-
|
|
9
|
-
In the intended product workflow, the active conversation agent owns review tasks and any subagent fan-out.
|
|
10
|
-
Use this file only when you intentionally need backend fallback behavior or an explicit compatibility bridge.
|
|
11
|
-
|
|
12
|
-
Backend provider configuration lives at:
|
|
13
|
-
|
|
14
|
-
```text
|
|
15
|
-
.audit-artifacts/session-config.json
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
This file is optional.
|
|
19
|
-
|
|
20
|
-
If it does not exist, the backend defaults to its built-in behavior.
|
|
21
|
-
On first backend run, `audit-code` now writes a repo-local default file automatically:
|
|
22
|
-
|
|
23
|
-
```json
|
|
24
|
-
{
|
|
25
|
-
"provider": "local-subprocess"
|
|
26
|
-
}
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
If it exists but contains invalid values, the backend now fails loudly before starting worker runs.
|
|
30
|
-
You can also check it explicitly with:
|
|
31
|
-
|
|
32
|
-
```bash
|
|
33
|
-
audit-code validate
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
## Supported fields
|
|
37
|
-
|
|
38
|
-
```json
|
|
39
|
-
{
|
|
40
|
-
"provider": "local-subprocess",
|
|
41
|
-
"timeout_ms": 1800000,
|
|
42
|
-
"ui_mode": "headless",
|
|
43
|
-
"agent_task_batch_size": 1
|
|
44
|
-
}
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
### `provider`
|
|
48
|
-
|
|
49
|
-
Supported values:
|
|
50
|
-
|
|
51
|
-
- `auto`
|
|
52
|
-
- `local-subprocess`
|
|
53
|
-
- `subprocess-template`
|
|
54
|
-
- `claude-code`
|
|
55
|
-
- `opencode`
|
|
56
|
-
- `vscode-task`
|
|
57
|
-
|
|
58
|
-
Current implementation note:
|
|
59
|
-
|
|
60
|
-
- `claude-code`, `opencode`, `subprocess-template`, and `vscode-task` are backend compatibility bridges
|
|
61
|
-
- they are not the intended default owner of semantic review when the active conversation agent can handle the work directly
|
|
62
|
-
- to activate one of those bridges for semantic review, either set `provider`
|
|
63
|
-
in this file intentionally or re-run the wrapper with an explicit
|
|
64
|
-
`--provider <name>` flag
|
|
65
|
-
|
|
66
|
-
### `timeout_ms`
|
|
67
|
-
|
|
68
|
-
Worker-run timeout in milliseconds.
|
|
69
|
-
|
|
70
|
-
### `ui_mode`
|
|
71
|
-
|
|
72
|
-
Supported values:
|
|
73
|
-
|
|
74
|
-
- `headless`
|
|
75
|
-
- `visible`
|
|
76
|
-
|
|
77
|
-
Use `visible` when you want stdout and stderr mirrored into the current terminal while the provider runs.
|
|
78
|
-
|
|
79
|
-
### `agent_task_batch_size`
|
|
80
|
-
|
|
81
|
-
How many audit tasks to include in one provider-assisted review batch.
|
|
82
|
-
|
|
83
|
-
When this is greater than `1`, the generated worker prompt points at `current-tasks.json` / `pending-audit-tasks.json` and expects one `AuditResult` per assigned task.
|
|
84
|
-
|
|
85
|
-
This setting only affects explicit backend provider-assisted fallback batches.
|
|
86
|
-
The canonical conversation route uses run-scoped review packets from
|
|
87
|
-
`prepare-dispatch` while still preserving one validated `AuditResult` per
|
|
88
|
-
underlying task.
|
|
89
|
-
|
|
90
|
-
### `parallel_workers`
|
|
91
|
-
|
|
92
|
-
How many provider-assisted review batches to launch in parallel when the selected provider supports it.
|
|
93
|
-
|
|
94
|
-
This setting only applies to explicit backend bridge launches.
|
|
95
|
-
|
|
96
|
-
It should not be treated as the source of truth for slash-command subagent
|
|
97
|
-
parallelism, which belongs to the host runtime.
|
|
98
|
-
|
|
99
|
-
## Auto provider mode
|
|
100
|
-
|
|
101
|
-
`auto` is an explicit opt-in mode.
|
|
102
|
-
|
|
103
|
-
If `provider` is omitted entirely, the backend still defaults to `local-subprocess`.
|
|
104
|
-
|
|
105
|
-
When `provider` is set to `auto`, resolution works like this:
|
|
106
|
-
|
|
107
|
-
1. use `vscode-task` when running under VS Code and a `vscode_task.command_template` is configured
|
|
108
|
-
2. otherwise use `subprocess-template` when `subprocess_template.command_template` is configured
|
|
109
|
-
3. otherwise use `claude-code` when Claude Code is available and preferred by config or when it is the only detected external CLI
|
|
110
|
-
4. otherwise use `opencode` when OpenCode is available and preferred by config or when it is the only detected external CLI
|
|
111
|
-
5. otherwise fall back to `local-subprocess`
|
|
112
|
-
|
|
113
|
-
This keeps the current default stable while still allowing best-effort cross-editor/provider routing when you explicitly want it.
|
|
114
|
-
|
|
115
|
-
## Provider-specific sections
|
|
116
|
-
|
|
117
|
-
### `local-subprocess`
|
|
118
|
-
|
|
119
|
-
No extra config is required.
|
|
120
|
-
|
|
121
|
-
This mode covers deterministic audit execution locally and stops in a terminal
|
|
122
|
-
blocked state once the remaining work requires semantic review. The
|
|
123
|
-
slash-command orchestrator should then dispatch bounded subagents when the host
|
|
124
|
-
supports them, or complete one assigned task and stop when it does not.
|
|
125
|
-
|
|
126
|
-
When the active conversation agent reviews multiple task batches before ingestion, prefer `audit-code --batch-results <dir>` over ad hoc artifact edits.
|
|
127
|
-
|
|
128
|
-
This remains the safest fallback default while the semantic-review workflow is being realigned.
|
|
129
|
-
|
|
130
|
-
### `claude_code`
|
|
131
|
-
|
|
132
|
-
```json
|
|
133
|
-
{
|
|
134
|
-
"provider": "claude-code",
|
|
135
|
-
"ui_mode": "visible",
|
|
136
|
-
"claude_code": {
|
|
137
|
-
"command": "claude",
|
|
138
|
-
"extra_args": []
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
Fields:
|
|
144
|
-
|
|
145
|
-
- `command`: optional override for the Claude Code executable
|
|
146
|
-
- `extra_args`: optional extra arguments for Claude Code
|
|
147
|
-
- `dangerously_skip_permissions`: optional trusted-automation opt-in. When
|
|
148
|
-
`true`, the bridge appends `--dangerously-skip-permissions`. Leave this
|
|
149
|
-
unset for the safer default.
|
|
150
|
-
|
|
151
|
-
Current implementation support only.
|
|
152
|
-
|
|
153
|
-
Use this only when you intentionally want the backend fallback CLI to bridge
|
|
154
|
-
review into an external Claude Code process, either by setting
|
|
155
|
-
`provider: "claude-code"` in this file or by running
|
|
156
|
-
`audit-code --provider claude-code`.
|
|
157
|
-
|
|
158
|
-
### `opencode`
|
|
159
|
-
|
|
160
|
-
```json
|
|
161
|
-
{
|
|
162
|
-
"provider": "opencode",
|
|
163
|
-
"ui_mode": "visible",
|
|
164
|
-
"opencode": {
|
|
165
|
-
"command": "opencode",
|
|
166
|
-
"extra_args": []
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
Fields:
|
|
172
|
-
|
|
173
|
-
- `command`: optional override for the OpenCode executable
|
|
174
|
-
- `extra_args`: optional additional arguments for `opencode run ...`
|
|
175
|
-
|
|
176
|
-
Current implementation support only.
|
|
177
|
-
|
|
178
|
-
Use this only when you intentionally want the backend fallback CLI to bridge review into an external OpenCode process, together with `audit-code --provider opencode`.
|
|
179
|
-
|
|
180
|
-
### `subprocess_template`
|
|
181
|
-
|
|
182
|
-
```json
|
|
183
|
-
{
|
|
184
|
-
"provider": "subprocess-template",
|
|
185
|
-
"ui_mode": "visible",
|
|
186
|
-
"subprocess_template": {
|
|
187
|
-
"command_template": ["bash", "-lc", "{workerCommandShell}"],
|
|
188
|
-
"env": {}
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
```
|
|
192
|
-
|
|
193
|
-
Fields:
|
|
194
|
-
|
|
195
|
-
- `command_template`: required command array
|
|
196
|
-
- `env`: optional environment-variable overlay
|
|
197
|
-
|
|
198
|
-
When you use this bridge for provider-assisted review, the launched process should write structured audit results to `task.audit_results_path` and then execute `task.worker_command`.
|
|
199
|
-
Activate it explicitly with `audit-code --provider subprocess-template`.
|
|
200
|
-
|
|
201
|
-
### `vscode_task`
|
|
202
|
-
|
|
203
|
-
```json
|
|
204
|
-
{
|
|
205
|
-
"provider": "vscode-task",
|
|
206
|
-
"ui_mode": "visible",
|
|
207
|
-
"vscode_task": {
|
|
208
|
-
"command_template": ["bash", "-lc", "{workerCommandShell}"],
|
|
209
|
-
"env": {}
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
```
|
|
213
|
-
|
|
214
|
-
This adapter is intentionally thin. It uses the same template expansion model as `subprocess-template`, but is named separately so the operator intent is explicit.
|
|
215
|
-
Activate it explicitly with `audit-code --provider vscode-task`.
|
|
216
|
-
|
|
217
|
-
## Template placeholders
|
|
218
|
-
|
|
219
|
-
`subprocess-template` and `vscode-task` support these placeholders inside each `command_template` entry:
|
|
220
|
-
|
|
221
|
-
- `{repoRoot}`
|
|
222
|
-
- `{runId}`
|
|
223
|
-
- `{obligationId}`
|
|
224
|
-
- `{promptPath}`
|
|
225
|
-
- `{taskPath}`
|
|
226
|
-
- `{resultPath}`
|
|
227
|
-
- `{stdoutPath}`
|
|
228
|
-
- `{stderrPath}`
|
|
229
|
-
- `{workerCommandShell}`
|
|
230
|
-
- `{workerCommandJson}`
|
|
231
|
-
- `{uiMode}`
|
|
232
|
-
- `{timeoutMs}`
|
|
233
|
-
|
|
234
|
-
### Placeholder guidance
|
|
235
|
-
|
|
236
|
-
- Use `{workerCommandShell}` when your launcher can execute a fully rendered shell command directly.
|
|
237
|
-
- Use `{workerCommandJson}` when your launcher wants the worker command as structured data.
|
|
238
|
-
- Use `{promptPath}` and `{taskPath}` when an external tool should read the generated worker instructions instead of directly executing the worker command.
|
|
239
|
-
|
|
240
|
-
## Suggested starting points
|
|
241
|
-
|
|
242
|
-
### Safest default
|
|
243
|
-
|
|
244
|
-
```json
|
|
245
|
-
{
|
|
246
|
-
"provider": "local-subprocess"
|
|
247
|
-
}
|
|
248
|
-
```
|
|
249
|
-
|
|
250
|
-
### Best-effort automatic routing
|
|
251
|
-
|
|
252
|
-
```json
|
|
253
|
-
{
|
|
254
|
-
"provider": "auto",
|
|
255
|
-
"ui_mode": "visible"
|
|
256
|
-
}
|
|
257
|
-
```
|
|
258
|
-
|
|
259
|
-
Use this only when you intentionally want backend fallback routing.
|
|
260
|
-
It is not the canonical semantic-review path.
|
|
261
|
-
|
|
262
|
-
### Delegate worker runs into Claude Code
|
|
263
|
-
|
|
264
|
-
```json
|
|
265
|
-
{
|
|
266
|
-
"provider": "claude-code",
|
|
267
|
-
"ui_mode": "visible"
|
|
268
|
-
}
|
|
269
|
-
```
|
|
270
|
-
|
|
271
|
-
Then start the backend bridge explicitly:
|
|
272
|
-
|
|
273
|
-
```bash
|
|
274
|
-
audit-code --provider claude-code
|
|
275
|
-
```
|
|
276
|
-
|
|
277
|
-
### Delegate worker runs into OpenCode
|
|
278
|
-
|
|
279
|
-
```json
|
|
280
|
-
{
|
|
281
|
-
"provider": "opencode",
|
|
282
|
-
"ui_mode": "visible"
|
|
283
|
-
}
|
|
284
|
-
```
|
|
285
|
-
|
|
286
|
-
Then start the backend bridge explicitly:
|
|
287
|
-
|
|
288
|
-
```bash
|
|
289
|
-
audit-code --provider opencode
|
|
290
|
-
```
|
|
291
|
-
|
|
292
|
-
### Use a generic bash launcher bridge
|
|
293
|
-
|
|
294
|
-
```json
|
|
295
|
-
{
|
|
296
|
-
"provider": "subprocess-template",
|
|
297
|
-
"ui_mode": "visible",
|
|
298
|
-
"subprocess_template": {
|
|
299
|
-
"command_template": ["bash", "-lc", "{workerCommandShell}"]
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
```
|
|
303
|
-
|
|
304
|
-
Then start the backend bridge explicitly:
|
|
305
|
-
|
|
306
|
-
```bash
|
|
307
|
-
audit-code --provider subprocess-template
|
|
308
|
-
```
|
|
309
|
-
|
|
310
|
-
## Antigravity note
|
|
311
|
-
|
|
312
|
-
A dedicated Antigravity adapter is not currently shipped.
|
|
313
|
-
|
|
314
|
-
Until one exists, the practical options are:
|
|
315
|
-
|
|
316
|
-
- run `audit-code` from an Antigravity terminal with `local-subprocess`
|
|
317
|
-
- use `provider: "auto"` when you want best-effort routing without forcing a specific backend
|
|
318
|
-
- use `subprocess-template` with a launcher that Antigravity can reliably invoke
|
|
319
|
-
- treat the conversation-level `/audit-code` contract as primary and the backend CLI as fallback
|