auditor-lambda 0.1.0 → 0.2.2
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 +2 -1
- package/audit-code-wrapper-lib.mjs +205 -187
- package/dist/adapters/eslint.js +4 -2
- package/dist/adapters/npmAudit.js +1 -1
- package/dist/cli.js +296 -12
- package/dist/coverage.d.ts +0 -1
- package/dist/coverage.js +3 -34
- package/dist/extractors/bucketing.js +14 -35
- package/dist/extractors/disposition.js +8 -9
- package/dist/extractors/flows.js +14 -23
- package/dist/extractors/pathPatterns.d.ts +19 -0
- package/dist/extractors/pathPatterns.js +87 -0
- package/dist/extractors/surfaces.js +2 -7
- package/dist/io/artifacts.d.ts +23 -1
- package/dist/io/artifacts.js +3 -1
- package/dist/io/runArtifacts.js +1 -1
- package/dist/orchestrator/advance.js +1 -1
- package/dist/orchestrator/flowPlanning.d.ts +1 -1
- package/dist/orchestrator/flowPlanning.js +21 -28
- package/dist/orchestrator/internalExecutors.js +4 -7
- package/dist/orchestrator/planning.js +12 -20
- package/dist/orchestrator/resultIngestion.js +3 -2
- package/dist/orchestrator/runtimeValidation.js +5 -0
- package/dist/orchestrator/syntaxResolutionExecutor.js +10 -2
- package/dist/orchestrator/taskBuilder.d.ts +7 -2
- package/dist/orchestrator/taskBuilder.js +47 -52
- package/dist/prompts/renderWorkerPrompt.js +33 -0
- package/dist/providers/claudeCodeProvider.js +5 -0
- package/dist/providers/constants.d.ts +1 -0
- package/dist/providers/constants.js +1 -0
- package/dist/providers/index.js +9 -2
- package/dist/providers/spawnLoggedCommand.js +4 -0
- package/dist/reporting/mergeFindings.js +0 -7
- package/dist/reporting/rootCause.d.ts +0 -1
- package/dist/reporting/rootCause.js +0 -6
- package/dist/reporting/synthesis.js +18 -0
- package/dist/supervisor/operatorHandoff.d.ts +2 -0
- package/dist/supervisor/operatorHandoff.js +21 -9
- package/dist/supervisor/runLedger.js +6 -3
- package/dist/supervisor/sessionConfig.js +1 -0
- package/dist/types/flowCoverage.d.ts +1 -1
- package/dist/types/runLedger.d.ts +1 -1
- package/dist/types/runtimeValidation.d.ts +2 -1
- package/dist/types/sessionConfig.d.ts +2 -0
- package/dist/types/surfaces.d.ts +2 -1
- package/dist/types/workerSession.d.ts +4 -0
- package/dist/types.d.ts +0 -2
- package/dist/validation/auditResults.d.ts +11 -0
- package/dist/validation/auditResults.js +118 -0
- package/docs/agent-integrations.md +61 -56
- package/docs/agent-roles.md +69 -69
- package/docs/architecture.md +90 -90
- package/docs/artifacts.md +69 -69
- package/docs/bootstrap-install.md +1 -1
- package/docs/model-selection.md +86 -86
- package/docs/next-steps.md +11 -9
- package/docs/packaging.md +3 -3
- package/docs/pipeline.md +152 -152
- package/docs/production-readiness.md +6 -5
- package/docs/repo-layout.md +18 -18
- package/docs/run-flow.md +5 -5
- package/docs/session-config.md +216 -210
- package/docs/supervisor.md +70 -70
- package/docs/windows-setup.md +139 -139
- package/package.json +56 -56
- package/schemas/audit-code-v1alpha1.schema.json +80 -76
- package/schemas/audit_result.schema.json +54 -48
- package/schemas/audit_state.schema.json +2 -2
- package/schemas/audit_task.schema.json +60 -49
- package/schemas/blind_spot_register.schema.json +13 -3
- package/schemas/coverage_matrix.schema.json +14 -17
- package/schemas/critical_flows.schema.json +6 -3
- package/schemas/external_analyzer_results.schema.json +10 -4
- package/schemas/file_disposition.schema.json +33 -33
- package/schemas/finding.schema.json +86 -62
- package/schemas/flow_coverage.schema.json +53 -44
- package/schemas/graph_bundle.schema.json +12 -6
- package/schemas/merged_findings.schema.json +7 -2
- package/schemas/risk_register.schema.json +5 -1
- package/schemas/root_cause_clusters.schema.json +2 -5
- package/schemas/runtime_validation_report.schema.json +34 -34
- package/schemas/runtime_validation_tasks.schema.json +4 -1
- package/schemas/surface_manifest.schema.json +4 -1
- package/schemas/synthesis_report.schema.json +61 -61
- package/schemas/unit_manifest.schema.json +10 -3
- package/skills/audit-code/SKILL.md +37 -37
- package/skills/audit-code/audit-code.prompt.md +54 -54
package/docs/session-config.md
CHANGED
|
@@ -5,11 +5,11 @@ This file only applies to the backend fallback CLI.
|
|
|
5
5
|
The canonical `/audit-code` conversation route should not require users to touch it.
|
|
6
6
|
|
|
7
7
|
Backend provider configuration lives at:
|
|
8
|
-
|
|
9
|
-
```text
|
|
10
|
-
.audit-artifacts/session-config.json
|
|
11
|
-
```
|
|
12
|
-
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
.audit-artifacts/session-config.json
|
|
11
|
+
```
|
|
12
|
+
|
|
13
13
|
This file is optional.
|
|
14
14
|
|
|
15
15
|
If it does not exist, the backend defaults to its built-in behavior.
|
|
@@ -20,213 +20,219 @@ You can also check it explicitly with:
|
|
|
20
20
|
```bash
|
|
21
21
|
audit-code validate
|
|
22
22
|
```
|
|
23
|
-
|
|
24
|
-
## Supported fields
|
|
25
|
-
|
|
26
|
-
```json
|
|
27
|
-
{
|
|
28
|
-
"provider": "local-subprocess",
|
|
29
|
-
"timeout_ms": 1800000,
|
|
30
|
-
"ui_mode": "headless"
|
|
31
|
-
}
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
### `provider`
|
|
35
|
-
|
|
36
|
-
Supported values:
|
|
37
|
-
|
|
38
|
-
- `auto`
|
|
39
|
-
- `local-subprocess`
|
|
40
|
-
- `subprocess-template`
|
|
41
|
-
- `claude-code`
|
|
42
|
-
- `opencode`
|
|
43
|
-
- `vscode-task`
|
|
44
|
-
|
|
45
|
-
### `timeout_ms`
|
|
46
|
-
|
|
47
|
-
Worker-run timeout in milliseconds.
|
|
48
|
-
|
|
49
|
-
### `ui_mode`
|
|
50
|
-
|
|
51
|
-
Supported values:
|
|
52
|
-
|
|
53
|
-
- `headless`
|
|
54
|
-
- `visible`
|
|
55
|
-
|
|
56
|
-
Use `visible` when you want stdout and stderr mirrored into the current terminal while the provider runs.
|
|
57
|
-
|
|
58
|
-
## Auto provider mode
|
|
59
|
-
|
|
60
|
-
`auto` is an explicit opt-in mode.
|
|
61
|
-
|
|
62
|
-
If `provider` is omitted entirely, the backend still defaults to `local-subprocess`.
|
|
63
|
-
|
|
64
|
-
When `provider` is set to `auto`, resolution works like this:
|
|
65
|
-
|
|
66
|
-
1. use `vscode-task` when running under VS Code and a `vscode_task.command_template` is configured
|
|
67
|
-
2. otherwise use `subprocess-template` when `subprocess_template.command_template` is configured
|
|
68
|
-
3. otherwise use `claude-code` when Claude Code is available and preferred by config or when it is the only detected external CLI
|
|
69
|
-
4. otherwise use `opencode` when OpenCode is available and preferred by config or when it is the only detected external CLI
|
|
70
|
-
5. otherwise fall back to `local-subprocess`
|
|
71
|
-
|
|
72
|
-
This keeps the current default stable while still allowing best-effort cross-editor/provider routing when you explicitly want it.
|
|
73
|
-
|
|
74
|
-
## Provider-specific sections
|
|
75
|
-
|
|
23
|
+
|
|
24
|
+
## Supported fields
|
|
25
|
+
|
|
26
|
+
```json
|
|
27
|
+
{
|
|
28
|
+
"provider": "local-subprocess",
|
|
29
|
+
"timeout_ms": 1800000,
|
|
30
|
+
"ui_mode": "headless"
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### `provider`
|
|
35
|
+
|
|
36
|
+
Supported values:
|
|
37
|
+
|
|
38
|
+
- `auto`
|
|
39
|
+
- `local-subprocess`
|
|
40
|
+
- `subprocess-template`
|
|
41
|
+
- `claude-code`
|
|
42
|
+
- `opencode`
|
|
43
|
+
- `vscode-task`
|
|
44
|
+
|
|
45
|
+
### `timeout_ms`
|
|
46
|
+
|
|
47
|
+
Worker-run timeout in milliseconds.
|
|
48
|
+
|
|
49
|
+
### `ui_mode`
|
|
50
|
+
|
|
51
|
+
Supported values:
|
|
52
|
+
|
|
53
|
+
- `headless`
|
|
54
|
+
- `visible`
|
|
55
|
+
|
|
56
|
+
Use `visible` when you want stdout and stderr mirrored into the current terminal while the provider runs.
|
|
57
|
+
|
|
58
|
+
## Auto provider mode
|
|
59
|
+
|
|
60
|
+
`auto` is an explicit opt-in mode.
|
|
61
|
+
|
|
62
|
+
If `provider` is omitted entirely, the backend still defaults to `local-subprocess`.
|
|
63
|
+
|
|
64
|
+
When `provider` is set to `auto`, resolution works like this:
|
|
65
|
+
|
|
66
|
+
1. use `vscode-task` when running under VS Code and a `vscode_task.command_template` is configured
|
|
67
|
+
2. otherwise use `subprocess-template` when `subprocess_template.command_template` is configured
|
|
68
|
+
3. otherwise use `claude-code` when Claude Code is available and preferred by config or when it is the only detected external CLI
|
|
69
|
+
4. otherwise use `opencode` when OpenCode is available and preferred by config or when it is the only detected external CLI
|
|
70
|
+
5. otherwise fall back to `local-subprocess`
|
|
71
|
+
|
|
72
|
+
This keeps the current default stable while still allowing best-effort cross-editor/provider routing when you explicitly want it.
|
|
73
|
+
|
|
74
|
+
## Provider-specific sections
|
|
75
|
+
|
|
76
76
|
### `local-subprocess`
|
|
77
77
|
|
|
78
78
|
No extra config is required.
|
|
79
79
|
|
|
80
80
|
This mode covers deterministic worker runs locally and stops in a terminal blocked state once the remaining work requires imported audit results or an interactive provider.
|
|
81
|
-
|
|
82
|
-
### `claude_code`
|
|
83
|
-
|
|
84
|
-
```json
|
|
85
|
-
{
|
|
86
|
-
"provider": "claude-code",
|
|
87
|
-
"ui_mode": "visible",
|
|
88
|
-
"claude_code": {
|
|
89
|
-
"command": "claude",
|
|
90
|
-
"extra_args": []
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
Fields:
|
|
96
|
-
|
|
97
|
-
- `command`: optional override for the Claude Code executable
|
|
98
|
-
- `extra_args`: optional extra arguments appended before the built-in permission-skipping flag
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
"
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
- `
|
|
160
|
-
|
|
161
|
-
- `{
|
|
162
|
-
- `{
|
|
163
|
-
- `{
|
|
164
|
-
- `{
|
|
165
|
-
- `{
|
|
166
|
-
- `{
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
-
|
|
171
|
-
-
|
|
172
|
-
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
81
|
+
|
|
82
|
+
### `claude_code`
|
|
83
|
+
|
|
84
|
+
```json
|
|
85
|
+
{
|
|
86
|
+
"provider": "claude-code",
|
|
87
|
+
"ui_mode": "visible",
|
|
88
|
+
"claude_code": {
|
|
89
|
+
"command": "claude",
|
|
90
|
+
"extra_args": []
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Fields:
|
|
96
|
+
|
|
97
|
+
- `command`: optional override for the Claude Code executable
|
|
98
|
+
- `extra_args`: optional extra arguments appended before the built-in permission-skipping flag
|
|
99
|
+
|
|
100
|
+
When audit-task review is pending, the generated provider prompt now asks Claude Code to write structured `AuditResult[]` output and then run the bounded worker command so the same `audit-code` invocation can keep advancing.
|
|
101
|
+
|
|
102
|
+
### `opencode`
|
|
103
|
+
|
|
104
|
+
```json
|
|
105
|
+
{
|
|
106
|
+
"provider": "opencode",
|
|
107
|
+
"ui_mode": "visible",
|
|
108
|
+
"opencode": {
|
|
109
|
+
"command": "opencode",
|
|
110
|
+
"extra_args": []
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Fields:
|
|
116
|
+
|
|
117
|
+
- `command`: optional override for the OpenCode executable
|
|
118
|
+
- `extra_args`: optional additional arguments for `opencode run ...`
|
|
119
|
+
|
|
120
|
+
When audit-task review is pending, the generated provider prompt now asks OpenCode to write structured `AuditResult[]` output and then run the bounded worker command so the same `audit-code` invocation can keep advancing.
|
|
121
|
+
|
|
122
|
+
### `subprocess_template`
|
|
123
|
+
|
|
124
|
+
```json
|
|
125
|
+
{
|
|
126
|
+
"provider": "subprocess-template",
|
|
127
|
+
"ui_mode": "visible",
|
|
128
|
+
"subprocess_template": {
|
|
129
|
+
"command_template": ["bash", "-lc", "{workerCommandShell}"],
|
|
130
|
+
"env": {}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Fields:
|
|
136
|
+
|
|
137
|
+
- `command_template`: required command array
|
|
138
|
+
- `env`: optional environment-variable overlay
|
|
139
|
+
|
|
140
|
+
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`.
|
|
141
|
+
|
|
142
|
+
### `vscode_task`
|
|
143
|
+
|
|
144
|
+
```json
|
|
145
|
+
{
|
|
146
|
+
"provider": "vscode-task",
|
|
147
|
+
"ui_mode": "visible",
|
|
148
|
+
"vscode_task": {
|
|
149
|
+
"command_template": ["bash", "-lc", "{workerCommandShell}"],
|
|
150
|
+
"env": {}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
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.
|
|
156
|
+
|
|
157
|
+
## Template placeholders
|
|
158
|
+
|
|
159
|
+
`subprocess-template` and `vscode-task` support these placeholders inside each `command_template` entry:
|
|
160
|
+
|
|
161
|
+
- `{repoRoot}`
|
|
162
|
+
- `{runId}`
|
|
163
|
+
- `{obligationId}`
|
|
164
|
+
- `{promptPath}`
|
|
165
|
+
- `{taskPath}`
|
|
166
|
+
- `{resultPath}`
|
|
167
|
+
- `{stdoutPath}`
|
|
168
|
+
- `{stderrPath}`
|
|
169
|
+
- `{workerCommandShell}`
|
|
170
|
+
- `{workerCommandJson}`
|
|
171
|
+
- `{uiMode}`
|
|
172
|
+
- `{timeoutMs}`
|
|
173
|
+
|
|
174
|
+
### Placeholder guidance
|
|
175
|
+
|
|
176
|
+
- Use `{workerCommandShell}` when your launcher can execute a fully rendered shell command directly.
|
|
177
|
+
- Use `{workerCommandJson}` when your launcher wants the worker command as structured data.
|
|
178
|
+
- Use `{promptPath}` and `{taskPath}` when an external tool should read the generated worker instructions instead of directly executing the worker command.
|
|
179
|
+
|
|
180
|
+
## Suggested starting points
|
|
181
|
+
|
|
182
|
+
### Safest default
|
|
183
|
+
|
|
184
|
+
```json
|
|
185
|
+
{
|
|
186
|
+
"provider": "local-subprocess"
|
|
187
|
+
}
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
### Best-effort automatic routing
|
|
191
|
+
|
|
192
|
+
```json
|
|
193
|
+
{
|
|
194
|
+
"provider": "auto",
|
|
195
|
+
"ui_mode": "visible"
|
|
196
|
+
}
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
### Delegate worker runs into Claude Code
|
|
200
|
+
|
|
201
|
+
```json
|
|
202
|
+
{
|
|
203
|
+
"provider": "claude-code",
|
|
204
|
+
"ui_mode": "visible"
|
|
205
|
+
}
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
### Delegate worker runs into OpenCode
|
|
209
|
+
|
|
210
|
+
```json
|
|
211
|
+
{
|
|
212
|
+
"provider": "opencode",
|
|
213
|
+
"ui_mode": "visible"
|
|
214
|
+
}
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
### Use a generic bash launcher bridge
|
|
218
|
+
|
|
219
|
+
```json
|
|
220
|
+
{
|
|
221
|
+
"provider": "subprocess-template",
|
|
222
|
+
"ui_mode": "visible",
|
|
223
|
+
"subprocess_template": {
|
|
224
|
+
"command_template": ["bash", "-lc", "{workerCommandShell}"]
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
## Antigravity note
|
|
230
|
+
|
|
231
|
+
A dedicated Antigravity adapter is not currently shipped.
|
|
232
|
+
|
|
233
|
+
Until one exists, the practical options are:
|
|
234
|
+
|
|
235
|
+
- run `audit-code` from an Antigravity terminal with `local-subprocess`
|
|
236
|
+
- use `provider: "auto"` when you want best-effort routing without forcing a specific backend
|
|
237
|
+
- use `subprocess-template` with a launcher that Antigravity can reliably invoke
|
|
238
|
+
- treat the conversation-level `/audit-code` contract as primary and the backend CLI as fallback
|
package/docs/supervisor.md
CHANGED
|
@@ -7,77 +7,77 @@ The primary product contract is `/audit-code` in conversation.
|
|
|
7
7
|
Everything here is fallback and implementation detail guidance for the repo-local backend surface.
|
|
8
8
|
|
|
9
9
|
## Repo-local backend surface
|
|
10
|
-
|
|
11
|
-
From the target repository root:
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
audit-code
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
Debug one-step mode:
|
|
18
|
-
|
|
19
|
-
```bash
|
|
20
|
-
audit-code --single-step
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
Explicit root override:
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
audit-code --root /path/to/repo
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
## Provider mode summary
|
|
30
|
-
|
|
31
|
-
If provider is omitted entirely, the backend defaults to the safest mode:
|
|
32
|
-
|
|
33
|
-
```json
|
|
34
|
-
{
|
|
35
|
-
"provider": "local-subprocess"
|
|
36
|
-
}
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
If you want best-effort routing across available or configured backends, opt into:
|
|
40
|
-
|
|
41
|
-
```json
|
|
42
|
-
{
|
|
43
|
-
"provider": "auto",
|
|
44
|
-
"ui_mode": "visible"
|
|
45
|
-
}
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
Explicit backend selection remains available:
|
|
49
|
-
|
|
50
|
-
```bash
|
|
51
|
-
audit-code --provider local-subprocess
|
|
52
|
-
audit-code --provider claude-code
|
|
53
|
-
audit-code --provider opencode
|
|
54
|
-
audit-code --provider subprocess-template
|
|
55
|
-
audit-code --provider vscode-task
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
## Auto resolution rule
|
|
59
|
-
|
|
60
|
-
When `provider` is set to `auto`, the backend resolves in this order:
|
|
61
|
-
|
|
62
|
-
1. `vscode-task` when running under VS Code and a `vscode_task.command_template` is configured
|
|
63
|
-
2. `subprocess-template` when a generic template bridge is configured
|
|
64
|
-
3. `claude-code` when Claude Code is available and preferred by config or when it is the only detected external CLI
|
|
65
|
-
4. `opencode` when OpenCode is available and preferred by config or when it is the only detected external CLI
|
|
66
|
-
5. `local-subprocess` otherwise
|
|
67
|
-
|
|
68
|
-
## Session config
|
|
69
|
-
|
|
70
|
-
Optional backend config file:
|
|
71
|
-
|
|
72
|
-
`.audit-artifacts/session-config.json`
|
|
73
|
-
|
|
74
|
-
See:
|
|
75
|
-
|
|
10
|
+
|
|
11
|
+
From the target repository root:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
audit-code
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Debug one-step mode:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
audit-code --single-step
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Explicit root override:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
audit-code --root /path/to/repo
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Provider mode summary
|
|
30
|
+
|
|
31
|
+
If provider is omitted entirely, the backend defaults to the safest mode:
|
|
32
|
+
|
|
33
|
+
```json
|
|
34
|
+
{
|
|
35
|
+
"provider": "local-subprocess"
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
If you want best-effort routing across available or configured backends, opt into:
|
|
40
|
+
|
|
41
|
+
```json
|
|
42
|
+
{
|
|
43
|
+
"provider": "auto",
|
|
44
|
+
"ui_mode": "visible"
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Explicit backend selection remains available:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
audit-code --provider local-subprocess
|
|
52
|
+
audit-code --provider claude-code
|
|
53
|
+
audit-code --provider opencode
|
|
54
|
+
audit-code --provider subprocess-template
|
|
55
|
+
audit-code --provider vscode-task
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Auto resolution rule
|
|
59
|
+
|
|
60
|
+
When `provider` is set to `auto`, the backend resolves in this order:
|
|
61
|
+
|
|
62
|
+
1. `vscode-task` when running under VS Code and a `vscode_task.command_template` is configured
|
|
63
|
+
2. `subprocess-template` when a generic template bridge is configured
|
|
64
|
+
3. `claude-code` when Claude Code is available and preferred by config or when it is the only detected external CLI
|
|
65
|
+
4. `opencode` when OpenCode is available and preferred by config or when it is the only detected external CLI
|
|
66
|
+
5. `local-subprocess` otherwise
|
|
67
|
+
|
|
68
|
+
## Session config
|
|
69
|
+
|
|
70
|
+
Optional backend config file:
|
|
71
|
+
|
|
72
|
+
`.audit-artifacts/session-config.json`
|
|
73
|
+
|
|
74
|
+
See:
|
|
75
|
+
|
|
76
76
|
- `docs/session-config.md`
|
|
77
77
|
- `docs/agent-integrations.md`
|
|
78
78
|
- `docs/model-selection.md`
|
|
79
79
|
- `docs/windows-setup.md`
|
|
80
|
-
|
|
81
|
-
## Note
|
|
82
|
-
|
|
83
|
-
Provider adapters are backend integrations, not the primary product concept.
|
|
80
|
+
|
|
81
|
+
## Note
|
|
82
|
+
|
|
83
|
+
Provider adapters are backend integrations, not the primary product concept.
|