auditor-lambda 0.3.13 → 0.3.15

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.
Files changed (60) hide show
  1. package/README.md +21 -24
  2. package/audit-code-wrapper-lib.mjs +62 -104
  3. package/dist/cli.js +41 -4
  4. package/dist/coverage.js +3 -1
  5. package/dist/extractors/disposition.js +8 -1
  6. package/dist/extractors/graph.d.ts +3 -1
  7. package/dist/extractors/graph.js +1147 -67
  8. package/dist/extractors/graphManifestEdges.d.ts +14 -0
  9. package/dist/extractors/graphManifestEdges.js +1158 -0
  10. package/dist/extractors/graphPathUtils.d.ts +5 -0
  11. package/dist/extractors/graphPathUtils.js +75 -0
  12. package/dist/extractors/pathPatterns.d.ts +1 -0
  13. package/dist/extractors/pathPatterns.js +3 -0
  14. package/dist/io/artifacts.d.ts +10 -1
  15. package/dist/io/artifacts.js +23 -3
  16. package/dist/orchestrator/internalExecutors.d.ts +4 -0
  17. package/dist/orchestrator/internalExecutors.js +35 -6
  18. package/dist/orchestrator/reviewPackets.js +1003 -31
  19. package/dist/orchestrator/syntaxResolutionExecutor.js +34 -0
  20. package/dist/types/externalAnalyzer.d.ts +9 -0
  21. package/dist/types/graph.d.ts +3 -0
  22. package/dist/types/reviewPlanning.d.ts +39 -0
  23. package/docs/contracts.md +215 -0
  24. package/docs/development.md +210 -0
  25. package/docs/handoff.md +204 -0
  26. package/docs/history.md +40 -0
  27. package/docs/operator-guide.md +190 -0
  28. package/docs/product.md +185 -0
  29. package/docs/release.md +131 -0
  30. package/package.json +1 -1
  31. package/schemas/audit_plan_metrics.schema.json +347 -0
  32. package/schemas/external_analyzer_results.schema.json +35 -0
  33. package/schemas/graph_bundle.schema.json +47 -2
  34. package/schemas/review_packets.schema.json +160 -0
  35. package/scripts/postinstall.mjs +49 -0
  36. package/docs/agent-integrations.md +0 -318
  37. package/docs/agent-roles.md +0 -69
  38. package/docs/architecture.md +0 -90
  39. package/docs/artifacts.md +0 -36
  40. package/docs/bootstrap-install.md +0 -136
  41. package/docs/contract.md +0 -54
  42. package/docs/dispatch-implementation-plan.md +0 -302
  43. package/docs/field-trial-bug-report.md +0 -237
  44. package/docs/github-copilot.md +0 -66
  45. package/docs/model-selection.md +0 -97
  46. package/docs/next-steps.md +0 -202
  47. package/docs/packaging.md +0 -120
  48. package/docs/pipeline.md +0 -152
  49. package/docs/product-direction.md +0 -154
  50. package/docs/production-launch-bar.md +0 -92
  51. package/docs/production-readiness.md +0 -58
  52. package/docs/releasing.md +0 -145
  53. package/docs/remediation-baseline.md +0 -75
  54. package/docs/repo-layout.md +0 -30
  55. package/docs/run-flow.md +0 -56
  56. package/docs/session-config.md +0 -319
  57. package/docs/supervisor.md +0 -100
  58. package/docs/usage.md +0 -215
  59. package/docs/windows-setup.md +0 -146
  60. package/docs/workflow-refactor-brief.md +0 -124
@@ -0,0 +1,160 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "review_packets.schema.json",
4
+ "title": "Review Packets",
5
+ "type": "array",
6
+ "items": {
7
+ "$ref": "#/$defs/reviewPacket"
8
+ },
9
+ "$defs": {
10
+ "lens": {
11
+ "type": "string",
12
+ "enum": [
13
+ "correctness",
14
+ "architecture",
15
+ "maintainability",
16
+ "security",
17
+ "reliability",
18
+ "performance",
19
+ "data_integrity",
20
+ "tests",
21
+ "operability",
22
+ "config_deployment",
23
+ "observability"
24
+ ]
25
+ },
26
+ "priority": {
27
+ "type": "string",
28
+ "enum": ["high", "medium", "low"]
29
+ },
30
+ "graphEdge": {
31
+ "type": "object",
32
+ "required": ["from", "to", "confidence"],
33
+ "properties": {
34
+ "from": { "type": "string" },
35
+ "to": { "type": "string" },
36
+ "kind": { "type": "string" },
37
+ "confidence": {
38
+ "type": "number",
39
+ "minimum": 0,
40
+ "maximum": 1
41
+ },
42
+ "reason": { "type": "string" }
43
+ },
44
+ "additionalProperties": false
45
+ },
46
+ "quality": {
47
+ "type": "object",
48
+ "required": [
49
+ "cohesion_score",
50
+ "internal_edge_count",
51
+ "boundary_edge_count",
52
+ "unexplained_file_count"
53
+ ],
54
+ "properties": {
55
+ "cohesion_score": {
56
+ "type": "number",
57
+ "minimum": 0,
58
+ "maximum": 1
59
+ },
60
+ "internal_edge_count": {
61
+ "type": "integer",
62
+ "minimum": 0
63
+ },
64
+ "boundary_edge_count": {
65
+ "type": "integer",
66
+ "minimum": 0
67
+ },
68
+ "unexplained_file_count": {
69
+ "type": "integer",
70
+ "minimum": 0
71
+ }
72
+ },
73
+ "additionalProperties": false
74
+ },
75
+ "reviewPacket": {
76
+ "type": "object",
77
+ "required": [
78
+ "packet_id",
79
+ "task_ids",
80
+ "unit_ids",
81
+ "pass_ids",
82
+ "lenses",
83
+ "file_paths",
84
+ "file_line_counts",
85
+ "total_lines",
86
+ "priority",
87
+ "quality",
88
+ "rationale",
89
+ "estimated_tokens"
90
+ ],
91
+ "properties": {
92
+ "packet_id": { "type": "string" },
93
+ "task_ids": {
94
+ "type": "array",
95
+ "minItems": 1,
96
+ "items": { "type": "string" }
97
+ },
98
+ "unit_ids": {
99
+ "type": "array",
100
+ "minItems": 1,
101
+ "items": { "type": "string" }
102
+ },
103
+ "pass_ids": {
104
+ "type": "array",
105
+ "minItems": 1,
106
+ "items": { "type": "string" }
107
+ },
108
+ "lenses": {
109
+ "type": "array",
110
+ "minItems": 1,
111
+ "items": { "$ref": "#/$defs/lens" }
112
+ },
113
+ "file_paths": {
114
+ "type": "array",
115
+ "minItems": 1,
116
+ "items": { "type": "string" }
117
+ },
118
+ "file_line_counts": {
119
+ "type": "object",
120
+ "additionalProperties": {
121
+ "type": "integer",
122
+ "minimum": 0
123
+ }
124
+ },
125
+ "total_lines": {
126
+ "type": "integer",
127
+ "minimum": 0
128
+ },
129
+ "priority": { "$ref": "#/$defs/priority" },
130
+ "tags": {
131
+ "type": "array",
132
+ "minItems": 1,
133
+ "items": { "type": "string" }
134
+ },
135
+ "entrypoints": {
136
+ "type": "array",
137
+ "minItems": 1,
138
+ "items": { "type": "string" }
139
+ },
140
+ "key_edges": {
141
+ "type": "array",
142
+ "minItems": 1,
143
+ "items": { "$ref": "#/$defs/graphEdge" }
144
+ },
145
+ "boundary_files": {
146
+ "type": "array",
147
+ "minItems": 1,
148
+ "items": { "type": "string" }
149
+ },
150
+ "quality": { "$ref": "#/$defs/quality" },
151
+ "rationale": { "type": "string" },
152
+ "estimated_tokens": {
153
+ "type": "integer",
154
+ "minimum": 0
155
+ }
156
+ },
157
+ "additionalProperties": false
158
+ }
159
+ }
160
+ }
@@ -25,6 +25,40 @@ function writeGeneratedFile(path, content) {
25
25
  return action;
26
26
  }
27
27
 
28
+ function splitFrontmatter(text) {
29
+ const normalized = text.replace(/\r\n/g, '\n');
30
+ const match = normalized.match(/^---\n([\s\S]*?)\n---\n?/u);
31
+ if (!match) return { body: normalized };
32
+ return { body: normalized.slice(match[0].length) };
33
+ }
34
+
35
+ function mergeOpenCodeGlobalConfig(existing, promptBody) {
36
+ const parsed = existing ? JSON.parse(existing) : {};
37
+ return {
38
+ ...parsed,
39
+ command: {
40
+ ...(parsed.command && typeof parsed.command === 'object' && !Array.isArray(parsed.command)
41
+ ? parsed.command
42
+ : {}),
43
+ 'audit-code': {
44
+ template: promptBody.trimStart(),
45
+ description: 'Autonomous local loop code auditing',
46
+ agent: 'auditor',
47
+ subtask: false,
48
+ },
49
+ },
50
+ };
51
+ }
52
+
53
+ function installMergedJson(path, buildMerged) {
54
+ const existing = existsSync(path) ? readFileSync(path, 'utf8') : null;
55
+ const merged = buildMerged(existing);
56
+ const action = existing ? 'updated' : 'installed';
57
+ mkdirSync(dirname(path), { recursive: true });
58
+ writeFileSync(path, JSON.stringify(merged, null, 2) + '\n', 'utf8');
59
+ return action;
60
+ }
61
+
28
62
  const promptSource = readRequiredSource(promptSourceFile, 'prompt');
29
63
  const skillSource = readRequiredSource(skillSourceFile, 'skill');
30
64
 
@@ -32,6 +66,8 @@ if (!promptSource || !skillSource) {
32
66
  process.exit(0);
33
67
  }
34
68
 
69
+ const promptBody = splitFrontmatter(promptSource.toString('utf8')).body;
70
+
35
71
  const installs = [
36
72
  {
37
73
  label: 'Claude command',
@@ -62,3 +98,16 @@ for (const install of installs) {
62
98
  console.warn(` ${install.path}`);
63
99
  }
64
100
  }
101
+
102
+ // Install OpenCode global command via merged config
103
+ const opencodeGlobalConfig = join(homedir(), '.config', 'opencode', 'opencode.json');
104
+ try {
105
+ const action = installMergedJson(opencodeGlobalConfig, (existing) =>
106
+ mergeOpenCodeGlobalConfig(existing, promptBody),
107
+ );
108
+ console.log(`audit-code: ${action} global OpenCode command in ${opencodeGlobalConfig}`);
109
+ } catch (err) {
110
+ console.warn(`audit-code: could not install global OpenCode command (${err.message})`);
111
+ console.warn(` To install manually, add "command": { "audit-code": { "template": "...", "agent": "auditor" } } to:`);
112
+ console.warn(` ${opencodeGlobalConfig}`);
113
+ }
@@ -1,318 +0,0 @@
1
- # Agent integrations
2
-
3
- This document explains how `auditor-lambda` fits into AI coding agent workflows across editors and provider surfaces.
4
-
5
- ## Primary product contract
6
-
7
- The canonical product surface is the in-conversation `/audit-code` skill.
8
-
9
- The repo-local backend fallback is the zero-argument wrapper:
10
-
11
- Normal product usage should:
12
-
13
- - use the current conversation or editor context as the working context
14
- - avoid manual `--root`, provider flags, and model selection in normal use
15
- - let the supervisor advance the audit automatically until it completes or no further automatic progress is possible
16
-
17
- ## Review ownership rule
18
-
19
- Semantic review should stay with the active conversation agent by default.
20
-
21
- That means:
22
-
23
- - use the current host conversation as the normal owner of review work
24
- - if the host agent can delegate to subagents in parallel, let the host runtime make that decision
25
- - do not treat `.audit-artifacts/session-config.json` as the normal way to choose a second LLM for review
26
- - treat backend provider adapters as compatibility bridges for fallback CLI usage only
27
-
28
- ## Conversation-first setup
29
-
30
- The canonical prompt asset is:
31
-
32
- `skills/audit-code/audit-code.prompt.md`
33
-
34
- The preferred install path for users is:
35
-
36
- ```bash
37
- npm install -g auditor-lambda
38
- ```
39
-
40
- That makes `audit-code` available on `PATH` and seeds user-level command/skill
41
- assets for hosts we can safely update during package installation. Once the
42
- slash command is available, `/audit-code` self-bootstraps the current repository
43
- with:
44
-
45
- ```bash
46
- audit-code ensure --quiet
47
- ```
48
-
49
- `ensure` writes repo-local `/audit-code` surfaces and MCP-oriented support assets
50
- for Codex, Claude Desktop, OpenCode, VS Code, and Antigravity only when they are
51
- missing or stale. It also writes `.audit-code/install/GETTING-STARTED.md` with
52
- dedicated quick-start sections for each host plus `.audit-code/install/manifest.json`
53
- and a shared repo-local MCP launcher.
54
-
55
- Use the explicit installer when you want to repair or force-refresh those
56
- repo-local assets:
57
-
58
- ```bash
59
- audit-code install
60
- ```
61
-
62
- Use one of these supported ways to obtain the raw prompt asset directly when you need prompt import instead:
63
-
64
- 1. install the package and run `audit-code prompt-path`
65
- 2. check out the repository and read the file directly from `skills/audit-code/audit-code.prompt.md`
66
-
67
- Import that prompt into your editor or conversation environment, or use the bootstrap installer above, then use `/audit-code` in conversation.
68
-
69
- ## Editor guidance
70
-
71
- ### ChatGPT project conversations
72
-
73
- This is the intended product surface.
74
-
75
- Use `/audit-code` in conversation, treat the active conversation model as the default model, and treat project files plus attached repository context as the default context.
76
-
77
- ### Codex
78
-
79
- The global npm install seeds `~/.codex/skills/audit-code/` so the command can be
80
- available before a repository is bootstrapped. The first `/audit-code` run then
81
- uses `audit-code ensure --quiet` to create or refresh only repo-local fallback
82
- instructions and shared launcher assets.
83
-
84
- Use `audit-code install --host codex` only when you want to repair or force-refresh
85
- the Codex fallback files from the target repository root.
86
-
87
- That updates `AGENTS.md` through a managed fallback block when needed. It does
88
- not write a repo-local Codex skill bundle, so Codex should expose only the
89
- global `/audit-code` command surface.
90
- The intended operator flow is still conversational first, with the global skill and AGENTS guidance steering the active Codex session toward `/audit-code` and the MCP-backed workflow.
91
-
92
- ### Claude Desktop
93
-
94
- Use `audit-code install --host claude-desktop` or the default `audit-code install` from the target repository root.
95
-
96
- This repository now treats Claude Desktop as an MCP-first host. The installer writes:
97
-
98
- - `.audit-code/install/claude-desktop/PROJECT-TEMPLATE.md`
99
- - `.audit-code/install/claude-desktop/remote-mcp-connector.json`
100
- - generated local bundle artifacts including `auditor-lambda.dxt` and `auditor-lambda.mcpb`
101
-
102
- The intended path is to install or reference the generated local MCP bundle, then use the shared prompt and project-template guidance to run `/audit-code` conversationally.
103
- Manual prompt import remains a fallback, not the primary documented path.
104
-
105
- ### OpenCode
106
-
107
- OpenCode currently relies on repo-local command and MCP config files for the
108
- cleanest experience. A global `/audit-code` prompt can run `audit-code ensure --quiet`
109
- first; otherwise run `audit-code install` from the target repository root once.
110
-
111
- That writes `.opencode/commands/audit-code.md`, a repo-local OpenCode skill bundle, and `opencode.json` so `/audit-code` is available in the repository with no extra provider flags.
112
- The generated OpenCode assets also point OpenCode toward the shared auditor MCP server instead of rebuilding backend state ad hoc.
113
-
114
- ### VS Code
115
-
116
- VS Code currently relies on workspace prompt and MCP config files for the
117
- cleanest experience. A global `/audit-code` prompt can run `audit-code ensure --quiet`
118
- first; otherwise run `audit-code install` from the target repository root, then
119
- open `.audit-code/install/GETTING-STARTED.md` if you want the exact repo-local
120
- path that bootstrap created for VS Code chat surfaces.
121
-
122
- That writes `.github/prompts/audit-code.prompt.md`, `.github/copilot-instructions.md`, `.github/agents/auditor.agent.md`, and `.vscode/mcp.json`.
123
- The expected happy path is still to invoke `/audit-code` from chat, not to start from the backend CLI.
124
-
125
- ### Antigravity
126
-
127
- Run `/audit-code` from a global prompt-capable host and let `audit-code ensure --quiet`
128
- create the repo-local guidance, or run `audit-code install` from the target
129
- repository root, then open `.audit-code/install/GETTING-STARTED.md`.
130
-
131
- There is still no documented native repo-local saved-workflow surface for Antigravity in this repository today, so the intended path is:
132
-
133
- 1. use the generated planning-mode and MCP setup guidance
134
- 2. invoke `/audit-code` conversationally inside Antigravity when the host surface allows it
135
- 3. use the shared MCP tools and resources when structured state exchange is needed
136
- 4. fall back to `audit-code` from an Antigravity-managed terminal only when you intentionally need the repo-local backend wrapper
137
-
138
- ### Similar manual-import hosts
139
-
140
- Use the same installed prompt asset and repo-local guide pattern as Antigravity, or the same MCP-first bundle pattern as Claude Desktop, depending on what the host actually supports.
141
-
142
- The backend CLI remains optional fallback infrastructure.
143
-
144
- ## Repo-local backend fallback
145
-
146
- From the target repository root:
147
-
148
- ```bash
149
- audit-code
150
- ```
151
-
152
- Use the backend wrapper only when you intentionally need the repo-local fallback, automation harness, or provider-adapter workflow.
153
-
154
- ## What the wrapper actually does
155
-
156
- `audit-code` is the stable backend entrypoint behind the slash command.
157
-
158
- It:
159
-
160
- - defaults artifacts to `<repo-root>/.audit-artifacts`
161
- - persists audit continuity there
162
- - calls `run-to-completion` by default for deterministic work
163
- - creates fresh worker runs behind the scenes
164
- - returns a stable top-level JSON contract with `contract_version: "audit-code/v1alpha1"`
165
-
166
- ## Minimal repo-local flow
167
-
168
- From the target repository root:
169
-
170
- ```bash
171
- audit-code
172
- ```
173
-
174
- Inspect the returned JSON and continue invoking the same entrypoint until either:
175
-
176
- - `next_likely_step === null`
177
-
178
- Terminal interpretation:
179
-
180
- - `audit_state.status === "complete"` means the audit finished end to end.
181
- - `audit_state.status === "blocked"` means the wrapper exhausted deterministic
182
- work and exposed scoped semantic-review task artifacts for the slash-command
183
- orchestrator.
184
-
185
- Current implementation note:
186
-
187
- - the backend fallback still supports explicit provider bridges such as `claude-code`, `opencode`, `subprocess-template`, and `vscode-task`
188
- - those bridges are compatibility modes, not the intended default review owner
189
- - the intended workflow is documented in [docs/workflow-refactor-brief.md](/C:/Code/auditor-lambda/docs/workflow-refactor-brief.md)
190
-
191
- When additional evidence exists, pass it into the same wrapper:
192
-
193
- ```bash
194
- audit-code --results /path/to/audit_results.json
195
- audit-code --updates /path/to/runtime_validation_report.json
196
- audit-code --external-analyzer-results /path/to/external_analyzer_results.json
197
- ```
198
-
199
- Each response also refreshes `.audit-artifacts/operator-handoff.json` and `.audit-artifacts/operator-handoff.md` so operators can see the pending obligations, suggested import paths, and session-config continuation hint without reconstructing the state manually.
200
-
201
- Everything below is backend fallback guidance, not the primary product path.
202
- Use it when the current host cannot keep review inside the active conversation, not as the first choice for semantic-review ownership.
203
-
204
- ## Provider matrix
205
-
206
- ### local-subprocess
207
-
208
- Use when you want the supervisor to stay entirely local.
209
-
210
- This requires no external agent CLI. Deterministic executors run in-process
211
- during normal wrapper runs, and the supervisor only stops once the remaining
212
- work is genuinely semantic review.
213
-
214
- When that review boundary is reached, `local-subprocess` stops in a terminal
215
- blocked handoff instead of pretending more automatic progress is available.
216
- The slash-command orchestrator should dispatch subagents from the handoff when
217
- available; otherwise it should review exactly one task, write results, run the
218
- provided worker command, and stop.
219
-
220
- This is the safest default backend when the repository is already available locally.
221
-
222
- ### claude-code
223
-
224
- Use when Claude Code is installed and authenticated on the machine.
225
-
226
- The current implementation can launch a fresh Claude Code print-mode session for each worker run.
227
-
228
- Treat this as a compatibility bridge only, not as the intended default review owner.
229
-
230
- ### opencode
231
-
232
- Use when OpenCode is installed and authenticated on the machine.
233
-
234
- The current implementation can launch a fresh `opencode run ...` session for each worker run.
235
-
236
- Treat this as a compatibility bridge only, not as the intended default review owner.
237
-
238
- ### subprocess-template
239
-
240
- Use when you need a generic bridge.
241
-
242
- This is the escape hatch for editors, launchers, or agent shells that do not yet have a dedicated provider adapter. The supervisor renders a templated command and executes it as a fresh worker run.
243
- For provider-assisted review stages, that bridge should write `task.audit_results_path` and then execute `task.worker_command`.
244
-
245
- ### vscode-task
246
-
247
- Use when you already have a repository-local or machine-local task bridge and want the supervisor to call that bridge through a command template.
248
-
249
- Treat this as an advanced backend adapter rather than the default path.
250
-
251
- ### Claude Code
252
-
253
- Use `/audit-code` in the active conversation as the primary path.
254
-
255
- Only use the repo-local `audit-code` wrapper with `provider: "claude-code"` in `.audit-artifacts/session-config.json` when you intentionally want backend fallback bridging into Claude Code.
256
-
257
- ### OpenCode
258
-
259
- Use `/audit-code` in the active conversation as the primary path.
260
-
261
- Only use the repo-local `audit-code` wrapper with `provider: "opencode"` when you intentionally want backend fallback bridging into OpenCode.
262
-
263
- ### VS Code
264
-
265
- Use `/audit-code` from chat and let the prompt run `audit-code ensure --quiet`.
266
- Run `audit-code install` manually only when VS Code has not yet discovered the
267
- workspace prompt/MCP files or you want to force-refresh them.
268
-
269
- The backend fallback is still available from the integrated terminal and should keep `local-subprocess` unless you specifically need a task bridge.
270
-
271
- If you already have a launcher or task surface that should own fresh worker windows, use `vscode-task` or `subprocess-template`.
272
-
273
- ### Google Antigravity
274
-
275
- No dedicated Antigravity provider adapter is shipped today.
276
-
277
- Current recommended usage is one of these:
278
-
279
- - use the skill-first conversational contract as the primary surface (note: do NOT use `browser_subagent` for semantic review of code unless explicitly required by the task)
280
- - let `/audit-code` run `audit-code ensure --quiet`, or run `audit-code install` manually so compatibility files are present
281
- - run `audit-code` from an Antigravity-managed terminal with `local-subprocess`
282
- - use `subprocess-template` if you have a reliable Antigravity-side launcher bridge
283
-
284
- That keeps the product usable in Antigravity now without pretending that a native adapter already exists.
285
-
286
- ## Remaining steps
287
-
288
- The current implementation shipped the shared installer and MCP substrate. The remaining work is operational validation and fit-and-finish, not a fresh redesign.
289
-
290
- Highest-value follow-through:
291
-
292
- 1. validate the generated Codex, Claude Desktop, OpenCode, VS Code, and Antigravity assets inside the real products they target
293
- 2. tighten generated quick-start guidance anywhere those host smoke tests expose ambiguity
294
- 3. document exactly how Antigravity artifacts should map into `import_results` and `import_runtime_updates`
295
- 4. keep host claims conservative until those end-to-end product checks are complete
296
-
297
- ## Model-selection rule
298
-
299
- The product direction remains skill-first:
300
-
301
- - in conversation, keep orchestration in the active model and delegate semantic
302
- review to bounded subagents when the host supports them
303
- - for backend CLI delegation, let the chosen provider own its own model-selection behavior unless explicitly configured otherwise
304
-
305
- ## Practical recommendation
306
-
307
- For a polished operator experience today:
308
-
309
- 1. treat `/audit-code` as the canonical user-facing contract
310
- 2. install once with `npm install -g auditor-lambda`, then let `/audit-code` run `audit-code ensure --quiet` in each repository
311
- 3. use `audit-code` as the repo-local backend fallback
312
- 4. prefer `local-subprocess` unless you explicitly want a backend provider bridge
313
- 5. use `subprocess-template` only when integrating a non-native editor or launcher surface
314
-
315
- If you intentionally want the backend fallback to bridge semantic review into
316
- another process, set the matching provider in
317
- `.audit-artifacts/session-config.json` or re-run with an explicit `--provider`
318
- flag after configuring the matching provider section.
@@ -1,69 +0,0 @@
1
- # Agent roles
2
-
3
- ## Principles
4
-
5
- Each agent should consume bounded artifacts and return structured outputs. Agents should not invent process rules.
6
-
7
- ## Roles
8
-
9
- ### intake-normalizer
10
-
11
- - validates repository intake artifacts
12
- - flags suspicious exclusions
13
- - confirms stack profile
14
-
15
- ### structural-mapper
16
-
17
- - reviews extracted units, surfaces, and graph artifacts
18
- - resolves ambiguous file classifications
19
- - flags missing boundaries
20
-
21
- ### blind-spot-mapper
22
-
23
- - identifies repo-specific blind spots tools may miss
24
- - flags hidden operational or security-critical surfaces
25
- - proposes additional lenses or dynamic checks
26
-
27
- ### correctness-auditor
28
-
29
- - checks whether code behavior appears to match intent
30
- - focuses on edge cases, defaults, assumptions, and branch handling
31
-
32
- ### architecture-auditor
33
-
34
- - inspects layering, boundaries, coupling, abstraction fit, and dependency direction
35
-
36
- ### security-auditor
37
-
38
- - inspects trust boundaries, auth/authz, validation, secret handling, risky sinks, and exploitability
39
-
40
- ### reliability-auditor
41
-
42
- - inspects retries, timeouts, idempotency, partial failures, crash consistency, and concurrency risk
43
-
44
- ### performance-auditor
45
-
46
- - inspects hot paths, repeated work, query inefficiency, algorithmic issues, memory pressure, and scalability risk
47
-
48
- ### data-integrity-auditor
49
-
50
- - inspects invariants, migrations, transactional boundaries, schema drift, consistency, and race conditions
51
-
52
- ### test-auditor
53
-
54
- - inspects test adequacy, missing negative-path coverage, brittle tests, and false confidence
55
-
56
- ### operability-auditor
57
-
58
- - inspects logging, metrics, tracing, debuggability, startup validation, and runtime observability
59
-
60
- ### cross-cutting-auditor
61
-
62
- - audits repo-wide themes such as auth, retries, migrations, config validation, feature flags, and secrets flow
63
-
64
- ### synthesizer
65
-
66
- - merges duplicate findings
67
- - clusters root causes
68
- - prioritizes fixes
69
- - identifies quick wins vs structural work