auditor-lambda 0.1.0 → 0.2.1

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 (58) hide show
  1. package/README.md +2 -1
  2. package/audit-code-wrapper-lib.mjs +458 -380
  3. package/dist/cli.js +258 -11
  4. package/dist/coverage.d.ts +0 -1
  5. package/dist/coverage.js +3 -34
  6. package/dist/extractors/fileInventory.js +2 -0
  7. package/dist/io/artifacts.js +2 -1
  8. package/dist/orchestrator/advance.js +70 -52
  9. package/dist/orchestrator/flowCoverage.js +2 -1
  10. package/dist/orchestrator/flowPlanning.d.ts +1 -1
  11. package/dist/orchestrator/flowPlanning.js +21 -28
  12. package/dist/orchestrator/internalExecutors.js +0 -1
  13. package/dist/orchestrator/taskBuilder.d.ts +7 -2
  14. package/dist/orchestrator/taskBuilder.js +55 -47
  15. package/dist/prompts/renderWorkerPrompt.js +32 -0
  16. package/dist/providers/claudeCodeProvider.js +6 -0
  17. package/dist/providers/index.js +5 -2
  18. package/dist/providers/opencodeProvider.js +6 -1
  19. package/dist/providers/types.d.ts +1 -0
  20. package/dist/reporting/mergeFindings.js +0 -7
  21. package/dist/reporting/rootCause.d.ts +0 -1
  22. package/dist/reporting/rootCause.js +0 -6
  23. package/dist/reporting/synthesis.js +18 -0
  24. package/dist/supervisor/runLedger.js +6 -2
  25. package/dist/types/sessionConfig.d.ts +8 -0
  26. package/dist/types/workerSession.d.ts +2 -0
  27. package/dist/types.d.ts +1 -2
  28. package/dist/validation/auditResults.d.ts +11 -0
  29. package/dist/validation/auditResults.js +118 -0
  30. package/dist/validation/sessionConfig.js +15 -1
  31. package/docs/agent-integrations.md +61 -56
  32. package/docs/agent-roles.md +69 -69
  33. package/docs/architecture.md +90 -90
  34. package/docs/artifacts.md +69 -69
  35. package/docs/bootstrap-install.md +1 -1
  36. package/docs/model-selection.md +86 -86
  37. package/docs/next-steps.md +11 -9
  38. package/docs/packaging.md +3 -3
  39. package/docs/pipeline.md +152 -152
  40. package/docs/production-readiness.md +6 -5
  41. package/docs/repo-layout.md +18 -18
  42. package/docs/run-flow.md +5 -5
  43. package/docs/session-config.md +216 -210
  44. package/docs/supervisor.md +70 -70
  45. package/docs/windows-setup.md +139 -139
  46. package/package.json +56 -56
  47. package/schemas/audit-code-v1alpha1.schema.json +76 -76
  48. package/schemas/audit_result.schema.json +48 -48
  49. package/schemas/audit_task.schema.json +49 -49
  50. package/schemas/coverage_matrix.schema.json +0 -15
  51. package/schemas/file_disposition.schema.json +33 -33
  52. package/schemas/finding.schema.json +58 -62
  53. package/schemas/flow_coverage.schema.json +44 -44
  54. package/schemas/root_cause_clusters.schema.json +0 -4
  55. package/schemas/runtime_validation_report.schema.json +34 -34
  56. package/schemas/synthesis_report.schema.json +61 -61
  57. package/skills/audit-code/SKILL.md +37 -37
  58. package/skills/audit-code/audit-code.prompt.md +56 -54
@@ -71,7 +71,8 @@ function validateAgentProviderSection(value, path, issues) {
71
71
  return;
72
72
  }
73
73
  if (value.command !== undefined) {
74
- if (typeof value.command !== "string" || value.command.trim().length === 0) {
74
+ if (typeof value.command !== "string" ||
75
+ value.command.trim().length === 0) {
75
76
  pushIssue(issues, `${path}.command`, "command must be a non-empty string when provided.");
76
77
  }
77
78
  }
@@ -117,6 +118,19 @@ export function validateSessionConfig(value) {
117
118
  validateTemplateProviderSection(value.vscode_task, "vscode_task", issues, provider === "vscode-task");
118
119
  validateAgentProviderSection(value.claude_code, "claude_code", issues);
119
120
  validateAgentProviderSection(value.opencode, "opencode", issues);
121
+ if (value.model_tiers !== undefined) {
122
+ if (!isRecord(value.model_tiers)) {
123
+ pushIssue(issues, "model_tiers", "model_tiers must be a JSON object.");
124
+ }
125
+ else {
126
+ for (const tier of ["fast", "balanced", "capable"]) {
127
+ const v = value.model_tiers[tier];
128
+ if (v !== undefined && (typeof v !== "string" || v.trim().length === 0)) {
129
+ pushIssue(issues, `model_tiers.${tier}`, `model_tiers.${tier} must be a non-empty string when provided.`);
130
+ }
131
+ }
132
+ }
133
+ }
120
134
  return issues;
121
135
  }
122
136
  export function validateConfiguredProviderEnvironment(sessionConfig, options = {}) {
@@ -80,7 +80,7 @@ Run `audit-code install` from the target repository root, then open `.audit-code
80
80
 
81
81
  There is no verified project-local slash-command install surface for Claude Desktop in this repository today, so the intended path is:
82
82
 
83
- 1. import `.audit-code/install/audit-code.prompt.md` into Claude Desktop's prompt or instruction surface
83
+ 1. import `.audit-code/install/audit-code.import.md` into Claude Desktop's prompt or instruction surface
84
84
  2. invoke `/audit-code` conversationally inside Claude Desktop
85
85
 
86
86
  ### Antigravity
@@ -89,7 +89,7 @@ Run `audit-code install` from the target repository root, then open `.audit-code
89
89
 
90
90
  There is no verified repo-local slash-command install surface for Antigravity in this repository today, so the intended path is:
91
91
 
92
- 1. import `.audit-code/install/audit-code.prompt.md` into Antigravity's prompt or instruction surface when available
92
+ 1. import `.audit-code/install/audit-code.import.md` into Antigravity's prompt or instruction surface when available
93
93
  2. invoke `/audit-code` conversationally inside Antigravity
94
94
  3. fall back to `audit-code` from an Antigravity-managed terminal only when you intentionally need the repo-local backend wrapper
95
95
 
@@ -116,19 +116,19 @@ Use the backend wrapper only when you intentionally need the repo-local fallback
116
116
  It:
117
117
 
118
118
  - defaults artifacts to `<repo-root>/.audit-artifacts`
119
- - persists audit continuity there
120
- - calls `run-to-completion` by default
121
- - creates fresh worker runs behind the scenes
119
+ - persists audit continuity there
120
+ - calls `run-to-completion` by default
121
+ - creates fresh worker runs behind the scenes
122
122
  - returns a stable top-level JSON contract with `contract_version: "audit-code/v1alpha1"`
123
123
 
124
124
  ## Minimal repo-local flow
125
125
 
126
126
  From the target repository root:
127
-
128
- ```bash
129
- audit-code
130
- ```
131
-
127
+
128
+ ```bash
129
+ audit-code
130
+ ```
131
+
132
132
  Inspect the returned JSON and continue invoking the same entrypoint until either:
133
133
 
134
134
  - `next_likely_step === null`
@@ -136,8 +136,10 @@ Inspect the returned JSON and continue invoking the same entrypoint until either
136
136
  Terminal interpretation:
137
137
 
138
138
  - `audit_state.status === "complete"` means the audit finished end to end.
139
- - `audit_state.status === "blocked"` means the wrapper exhausted automatic work and the remaining review needs imported results or an interactive provider.
140
-
139
+ - `audit_state.status === "blocked"` means the wrapper exhausted automatic work and the remaining review still needs imported results or a provider-capable continuation path.
140
+
141
+ When `provider` is configured as `claude-code`, `opencode`, `subprocess-template`, or `vscode-task`, the wrapper can now continue through audit-task review in the same invocation as long as that provider can write structured `AuditResult[]` output and hand control back to the bounded worker command.
142
+
141
143
  When additional evidence exists, pass it into the same wrapper:
142
144
 
143
145
  ```bash
@@ -159,31 +161,34 @@ Use when you want the supervisor to stay entirely local.
159
161
  This requires no external agent CLI. The supervisor launches fresh worker subprocesses that call the bounded `worker-run` entrypoint for deterministic stages.
160
162
 
161
163
  When the remaining work is genuinely audit-task review, `local-subprocess` stops in a terminal blocked handoff instead of pretending more automatic progress is available.
162
-
163
- This is the safest default backend when the repository is already available locally.
164
-
165
- ### claude-code
166
-
167
- Use when Claude Code is installed and authenticated on the machine.
168
-
169
- The built-in adapter launches a fresh Claude Code print-mode session for each worker run.
170
-
171
- Recommended when you want the audit supervisor to delegate bounded tasks into Claude Code without manually driving each step.
172
-
173
- ### opencode
174
-
175
- Use when OpenCode is installed and authenticated on the machine.
176
-
177
- The built-in adapter launches a fresh `opencode run ...` session for each worker run.
178
-
179
- Recommended when OpenCode is the preferred local agent surface.
180
-
181
- ### subprocess-template
182
-
183
- Use when you need a generic bridge.
184
-
185
- 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.
186
-
164
+
165
+ This is the safest default backend when the repository is already available locally.
166
+
167
+ ### claude-code
168
+
169
+ Use when Claude Code is installed and authenticated on the machine.
170
+
171
+ The built-in adapter launches a fresh Claude Code print-mode session for each worker run.
172
+ When audit-task review is pending, the provider prompt now asks Claude Code to write structured audit results and then hand back to the bounded worker command so the same wrapper invocation can continue.
173
+
174
+ Recommended when you want the audit supervisor to delegate bounded tasks into Claude Code without manually driving each step.
175
+
176
+ ### opencode
177
+
178
+ Use when OpenCode is installed and authenticated on the machine.
179
+
180
+ The built-in adapter launches a fresh `opencode run ...` session for each worker run.
181
+ When audit-task review is pending, the provider prompt now asks OpenCode to write structured audit results and then hand back to the bounded worker command so the same wrapper invocation can continue.
182
+
183
+ Recommended when OpenCode is the preferred local agent surface.
184
+
185
+ ### subprocess-template
186
+
187
+ Use when you need a generic bridge.
188
+
189
+ 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.
190
+ For provider-assisted review stages, that bridge should write `task.audit_results_path` and then execute `task.worker_command`.
191
+
187
192
  ### vscode-task
188
193
 
189
194
  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.
@@ -193,11 +198,11 @@ Treat this as an advanced backend adapter rather than the default path.
193
198
  ### Claude Code
194
199
 
195
200
  Use the repo-local `audit-code` wrapper from the target repository root, or set `provider` to `claude-code` in `.audit-artifacts/session-config.json` so the supervisor delegates bounded worker runs into Claude Code.
196
-
197
- ### OpenCode
198
-
199
- Use the same repo-local `audit-code` wrapper, or set `provider` to `opencode` so the supervisor delegates bounded worker runs into OpenCode.
200
-
201
+
202
+ ### OpenCode
203
+
204
+ Use the same repo-local `audit-code` wrapper, or set `provider` to `opencode` so the supervisor delegates bounded worker runs into OpenCode.
205
+
201
206
  ### VS Code
202
207
 
203
208
  Run `audit-code install` once from the target repository root, then use `/audit-code` from chat.
@@ -205,11 +210,11 @@ Run `audit-code install` once from the target repository root, then use `/audit-
205
210
  The backend fallback is still available from the integrated terminal and should keep `local-subprocess` unless you specifically need a task bridge.
206
211
 
207
212
  If you already have a launcher or task surface that should own fresh worker windows, use `vscode-task` or `subprocess-template`.
208
-
209
- ### Google Antigravity
210
-
211
- No dedicated Antigravity provider adapter is shipped today.
212
-
213
+
214
+ ### Google Antigravity
215
+
216
+ No dedicated Antigravity provider adapter is shipped today.
217
+
213
218
  Current recommended usage is one of these:
214
219
 
215
220
  - use the skill-first conversational contract as the primary surface
@@ -218,14 +223,14 @@ Current recommended usage is one of these:
218
223
  - use `subprocess-template` if you have a reliable Antigravity-side launcher bridge
219
224
 
220
225
  That keeps the product usable in Antigravity now without pretending that a native adapter already exists.
221
-
222
- ## Model-selection rule
223
-
224
- The product direction remains skill-first:
225
-
226
- - in conversation, use the active conversation model by default
227
- - for backend CLI delegation, let the chosen provider own its own model-selection behavior unless explicitly configured otherwise
228
-
226
+
227
+ ## Model-selection rule
228
+
229
+ The product direction remains skill-first:
230
+
231
+ - in conversation, use the active conversation model by default
232
+ - for backend CLI delegation, let the chosen provider own its own model-selection behavior unless explicitly configured otherwise
233
+
229
234
  ## Practical recommendation
230
235
 
231
236
  For a polished operator experience today:
@@ -233,5 +238,5 @@ For a polished operator experience today:
233
238
  1. treat `/audit-code` as the canonical user-facing contract
234
239
  2. use `audit-code install` first, and fall back to `audit-code prompt-path` only for hosts that still require manual prompt import
235
240
  3. use `audit-code` as the repo-local backend fallback
236
- 4. prefer `local-subprocess` unless you need interactive review to continue through agent tasks
241
+ 4. prefer `local-subprocess` unless you want interactive review to continue automatically through agent tasks
237
242
  5. use `subprocess-template` only when integrating a non-native editor or launcher surface
@@ -1,69 +1,69 @@
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
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
@@ -1,90 +1,90 @@
1
- # Architecture
2
-
3
- ## Objective
4
-
5
- `auditor-lambda` is a portable code-auditing framework for arbitrary repositories. It separates deterministic extraction from bounded LLM judgment so that large or mixed-language codebases can be audited systematically.
6
-
7
- ## Design principles
8
-
9
- 1. Tool outputs first
10
- 2. Artifact-driven orchestration
11
- 3. Bounded LLM tasks
12
- 4. Explicit coverage accounting
13
- 5. Multi-pass review for critical code
14
- 6. Strict schemas for interoperability
15
-
16
- ## System layers
17
-
18
- ### 1. Intake
19
-
20
- - file discovery
21
- - stack detection
22
- - ignore handling
23
- - normalization
24
-
25
- ### 2. Extractors
26
-
27
- - service and package detection
28
- - route, job, command, workflow extraction
29
- - file bucketing
30
- - graph extraction
31
-
32
- ### 3. Mechanical analyzers
33
-
34
- - lint
35
- - typecheck
36
- - tests
37
- - test coverage
38
- - secret scanning
39
- - dependency scanning
40
- - static security scanning
41
- - complexity and duplication metrics
42
-
43
- ### 4. Orchestrator
44
-
45
- - builds audit units
46
- - assigns passes and lenses
47
- - chunks large files
48
- - tracks line coverage and pass overlap
49
- - requeues uncovered ranges
50
-
51
- ### 5. LLM agents
52
-
53
- - ambiguous classification
54
- - blind-spot mapping
55
- - per-lens audits
56
- - cross-cutting audits
57
- - synthesis
58
-
59
- ### 6. Validation
60
-
61
- - targeted runtime checks
62
- - startup/config probes
63
- - adversarial repros
64
-
65
- ### 7. Reporting
66
-
67
- - normalized findings
68
- - coverage matrices
69
- - root-cause clustering
70
- - remediation planning
71
-
72
- ## Core pipeline
73
-
74
- 1. Intake and normalize repository
75
- 2. Extract structure and graph artifacts
76
- 3. Run mechanical analyzers
77
- 4. Build audit units and risk register
78
- 5. Run blind-spot mapping
79
- 6. Run lens-based unit audits
80
- 7. Run cross-cutting audits
81
- 8. Run dynamic validation on targeted cases
82
- 9. Verify file and line coverage
83
- 10. Synthesize findings and remediation plan
84
-
85
- ## Portability rules
86
-
87
- - Tool-specific collectors should write into tool-agnostic JSON artifacts.
88
- - LLM prompts should consume artifacts, not raw repos by default.
89
- - All review work should be attributable to files, line ranges, lenses, and passes.
90
- - Coverage gaps should be machine-detectable.
1
+ # Architecture
2
+
3
+ ## Objective
4
+
5
+ `auditor-lambda` is a portable code-auditing framework for arbitrary repositories. It separates deterministic extraction from bounded LLM judgment so that large or mixed-language codebases can be audited systematically.
6
+
7
+ ## Design principles
8
+
9
+ 1. Tool outputs first
10
+ 2. Artifact-driven orchestration
11
+ 3. Bounded LLM tasks
12
+ 4. Explicit coverage accounting
13
+ 5. Multi-pass review for critical code
14
+ 6. Strict schemas for interoperability
15
+
16
+ ## System layers
17
+
18
+ ### 1. Intake
19
+
20
+ - file discovery
21
+ - stack detection
22
+ - ignore handling
23
+ - normalization
24
+
25
+ ### 2. Extractors
26
+
27
+ - service and package detection
28
+ - route, job, command, workflow extraction
29
+ - file bucketing
30
+ - graph extraction
31
+
32
+ ### 3. Mechanical analyzers
33
+
34
+ - lint
35
+ - typecheck
36
+ - tests
37
+ - test coverage
38
+ - secret scanning
39
+ - dependency scanning
40
+ - static security scanning
41
+ - complexity and duplication metrics
42
+
43
+ ### 4. Orchestrator
44
+
45
+ - builds audit units
46
+ - assigns passes and lenses
47
+ - chunks large files
48
+ - tracks line coverage and pass overlap
49
+ - requeues uncovered ranges
50
+
51
+ ### 5. LLM agents
52
+
53
+ - ambiguous classification
54
+ - blind-spot mapping
55
+ - per-lens audits
56
+ - cross-cutting audits
57
+ - synthesis
58
+
59
+ ### 6. Validation
60
+
61
+ - targeted runtime checks
62
+ - startup/config probes
63
+ - adversarial repros
64
+
65
+ ### 7. Reporting
66
+
67
+ - normalized findings
68
+ - coverage matrices
69
+ - root-cause clustering
70
+ - remediation planning
71
+
72
+ ## Core pipeline
73
+
74
+ 1. Intake and normalize repository
75
+ 2. Extract structure and graph artifacts
76
+ 3. Run mechanical analyzers
77
+ 4. Build audit units and risk register
78
+ 5. Run blind-spot mapping
79
+ 6. Run lens-based unit audits
80
+ 7. Run cross-cutting audits
81
+ 8. Run dynamic validation on targeted cases
82
+ 9. Verify file and line coverage
83
+ 10. Synthesize findings and remediation plan
84
+
85
+ ## Portability rules
86
+
87
+ - Tool-specific collectors should write into tool-agnostic JSON artifacts.
88
+ - LLM prompts should consume artifacts, not raw repos by default.
89
+ - All review work should be attributable to files, line ranges, lenses, and passes.
90
+ - Coverage gaps should be machine-detectable.
package/docs/artifacts.md CHANGED
@@ -1,69 +1,69 @@
1
- # Core artifacts
2
-
3
- These JSON artifacts are the stable contract between deterministic tooling and LLM audit passes.
4
-
5
- ## Core files
6
-
7
- - `repo_manifest.json`
8
- - `file_disposition.json`
9
- - `unit_manifest.json`
10
- - `graph_bundle.json`
11
- - `surface_manifest.json`
12
- - `critical_flows.json`
13
- - `flow_coverage.json`
14
- - `risk_register.json`
15
- - `coverage_matrix.json`
16
- - `runtime_validation_tasks.json`
17
- - `runtime_validation_report.json`
18
- - `external_analyzer_results.json`
19
- - `audit_results.json`
20
- - `requeue_tasks.json`
21
- - `merged_findings.json`
22
- - `root_cause_clusters.json`
23
- - `synthesis_report.json`
24
-
25
- ## Design rule
26
-
27
- Tool-specific collectors should write into these normalized formats so that the agent layer can remain portable across runtimes.
28
-
29
- ## Coverage rule
30
-
31
- Coverage is not based only on test instrumentation. It is based on explicit audit accounting:
32
-
33
- - file classification
34
- - file disposition
35
- - unit assignment
36
- - required lenses
37
- - reviewed source ranges
38
- - completed passes
39
- - requeue targets for missing review
40
- - critical-flow coverage state
41
-
42
- ## Excluded artifact behavior
43
-
44
- Files marked as generated, vendor, binary, doc-only, or explicitly excluded should remain visible in manifests and disposition tracking, but should not receive normal audit-unit assignment or requeue tasks.
45
-
46
- ## Critical flow role
47
-
48
- `critical_flows.json` is intended to bridge deterministic planning and higher-order semantic review. It gives LLM agents a bounded way to inspect important end-to-end paths without reading the entire repository at once.
49
-
50
- `flow_coverage.json` tracks whether those important paths have received the intended lenses, which allows the planner to treat critical-flow review as a first-class coverage requirement rather than a loose advisory layer.
51
-
52
- ## Runtime validation role
53
-
54
- `runtime_validation_tasks.json` turns unresolved high-risk units and incomplete critical flows into explicit dynamic follow-up work.
55
-
56
- `runtime_validation_report.json` is where evidence from those checks should land so that later synthesis can distinguish confirmed, not-confirmed, and inconclusive concerns.
57
-
58
- ## External analyzer role
59
-
60
- `external_analyzer_results.json` is the normalized landing zone for third-party tools such as SAST analyzers, coverage summaries, lint diagnostics, dependency scanners, and similar sources. Downstream prompts should prefer this normalized form over raw tool-native payloads.
61
-
62
- External analyzer results now also influence:
63
-
64
- - risk scoring
65
- - required lenses in coverage
66
- - task priority
67
- - dedicated analyzer follow-up tasks
68
- - requeue priority
69
- - synthesis evidence and summaries
1
+ # Core artifacts
2
+
3
+ These JSON artifacts are the stable contract between deterministic tooling and LLM audit passes.
4
+
5
+ ## Core files
6
+
7
+ - `repo_manifest.json`
8
+ - `file_disposition.json`
9
+ - `unit_manifest.json`
10
+ - `graph_bundle.json`
11
+ - `surface_manifest.json`
12
+ - `critical_flows.json`
13
+ - `flow_coverage.json`
14
+ - `risk_register.json`
15
+ - `coverage_matrix.json`
16
+ - `runtime_validation_tasks.json`
17
+ - `runtime_validation_report.json`
18
+ - `external_analyzer_results.json`
19
+ - `audit_results.json`
20
+ - `requeue_tasks.json`
21
+ - `merged_findings.json`
22
+ - `root_cause_clusters.json`
23
+ - `synthesis_report.json`
24
+
25
+ ## Design rule
26
+
27
+ Tool-specific collectors should write into these normalized formats so that the agent layer can remain portable across runtimes.
28
+
29
+ ## Coverage rule
30
+
31
+ Coverage is not based only on test instrumentation. It is based on explicit audit accounting:
32
+
33
+ - file classification
34
+ - file disposition
35
+ - unit assignment
36
+ - required lenses
37
+ - reviewed source ranges
38
+ - completed passes
39
+ - requeue targets for missing review
40
+ - critical-flow coverage state
41
+
42
+ ## Excluded artifact behavior
43
+
44
+ Files marked as generated, vendor, binary, doc-only, or explicitly excluded should remain visible in manifests and disposition tracking, but should not receive normal audit-unit assignment or requeue tasks.
45
+
46
+ ## Critical flow role
47
+
48
+ `critical_flows.json` is intended to bridge deterministic planning and higher-order semantic review. It gives LLM agents a bounded way to inspect important end-to-end paths without reading the entire repository at once.
49
+
50
+ `flow_coverage.json` tracks whether those important paths have received the intended lenses, which allows the planner to treat critical-flow review as a first-class coverage requirement rather than a loose advisory layer.
51
+
52
+ ## Runtime validation role
53
+
54
+ `runtime_validation_tasks.json` turns unresolved high-risk units and incomplete critical flows into explicit dynamic follow-up work.
55
+
56
+ `runtime_validation_report.json` is where evidence from those checks should land so that later synthesis can distinguish confirmed, not-confirmed, and inconclusive concerns.
57
+
58
+ ## External analyzer role
59
+
60
+ `external_analyzer_results.json` is the normalized landing zone for third-party tools such as SAST analyzers, coverage summaries, lint diagnostics, dependency scanners, and similar sources. Downstream prompts should prefer this normalized form over raw tool-native payloads.
61
+
62
+ External analyzer results now also influence:
63
+
64
+ - risk scoring
65
+ - required lenses in coverage
66
+ - task priority
67
+ - dedicated analyzer follow-up tasks
68
+ - requeue priority
69
+ - synthesis evidence and summaries