auditor-lambda 0.3.4 → 0.3.5
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/audit-code-wrapper-lib.mjs +9 -2
- package/dist/cli.js +359 -53
- package/dist/orchestrator/fileAnchors.d.ts +32 -0
- package/dist/orchestrator/fileAnchors.js +217 -0
- package/dist/orchestrator/reviewPackets.js +10 -0
- package/dist/providers/claudeCodeProvider.js +3 -1
- package/dist/providers/index.js +2 -1
- package/dist/supervisor/operatorHandoff.js +22 -11
- package/dist/types/sessionConfig.d.ts +1 -0
- package/dist/validation/auditResults.js +50 -2
- package/dist/validation/sessionConfig.js +5 -0
- package/docs/agent-integrations.md +4 -1
- package/docs/contract.md +3 -0
- package/docs/dispatch-implementation-plan.md +57 -24
- package/docs/run-flow.md +5 -3
- package/docs/session-config.md +11 -3
- package/docs/supervisor.md +5 -3
- package/docs/workflow-refactor-brief.md +14 -5
- package/package.json +1 -1
- package/skills/audit-code/audit-code.prompt.md +11 -6
package/docs/session-config.md
CHANGED
|
@@ -59,7 +59,9 @@ Current implementation note:
|
|
|
59
59
|
|
|
60
60
|
- `claude-code`, `opencode`, `subprocess-template`, and `vscode-task` are backend compatibility bridges
|
|
61
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,
|
|
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
|
|
63
65
|
|
|
64
66
|
### `timeout_ms`
|
|
65
67
|
|
|
@@ -141,11 +143,17 @@ This remains the safest fallback default while the semantic-review workflow is b
|
|
|
141
143
|
Fields:
|
|
142
144
|
|
|
143
145
|
- `command`: optional override for the Claude Code executable
|
|
144
|
-
- `extra_args`: optional extra arguments
|
|
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.
|
|
145
150
|
|
|
146
151
|
Current implementation support only.
|
|
147
152
|
|
|
148
|
-
Use this only when you intentionally want the backend fallback CLI to bridge
|
|
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`.
|
|
149
157
|
|
|
150
158
|
### `opencode`
|
|
151
159
|
|
package/docs/supervisor.md
CHANGED
|
@@ -63,9 +63,11 @@ audit-code --provider subprocess-template
|
|
|
63
63
|
audit-code --provider vscode-task
|
|
64
64
|
```
|
|
65
65
|
|
|
66
|
-
Those `--provider` invocations are
|
|
67
|
-
Without an explicit `--provider` flag
|
|
68
|
-
|
|
66
|
+
Those `--provider` invocations are an explicit bridge handoff point.
|
|
67
|
+
Without an explicit `--provider` flag or a non-local provider in
|
|
68
|
+
`.audit-artifacts/session-config.json`, the backend stops at the
|
|
69
|
+
semantic-review boundary and exposes scoped task artifacts for the
|
|
70
|
+
slash-command orchestrator.
|
|
69
71
|
|
|
70
72
|
## Auto resolution rule
|
|
71
73
|
|
|
@@ -15,7 +15,8 @@ The implemented design is a compatibility-preserving packet layer:
|
|
|
15
15
|
- group related task records into worker-facing review packets
|
|
16
16
|
- make each worker read a coherent file set once and review multiple lenses in
|
|
17
17
|
one pass
|
|
18
|
-
-
|
|
18
|
+
- submit packet results through the backend so only assigned result files are
|
|
19
|
+
written
|
|
19
20
|
|
|
20
21
|
## Current Product Model
|
|
21
22
|
|
|
@@ -42,9 +43,11 @@ The refactor now includes:
|
|
|
42
43
|
- packet-first pending-task ordering for provider-assisted batches
|
|
43
44
|
- tiny homogeneous test-file batching before dispatch
|
|
44
45
|
- graph-edge expansion from import, call, and reference edges
|
|
45
|
-
- packet prompts that assign multiple task
|
|
46
|
+
- packet prompts that assign multiple task results to one worker
|
|
47
|
+
- backend-owned packet submission that validates before writing result files
|
|
48
|
+
- isolated large-file packet mode with mechanical anchors for targeted review
|
|
46
49
|
- validation and merge checks for missing, duplicate, unknown, malformed, or
|
|
47
|
-
out-of-scope task results
|
|
50
|
+
out-of-scope task results, including swapped result files
|
|
48
51
|
- compact `prepare-dispatch` and `merge-and-ingest` JSON envelopes
|
|
49
52
|
- terse worker completion convention:
|
|
50
53
|
`valid: <packet_id>, findings=<n>`
|
|
@@ -75,7 +78,10 @@ Packet mode adds or updates these artifacts:
|
|
|
75
78
|
- `review_packets.json`
|
|
76
79
|
- `audit_plan_metrics.json`
|
|
77
80
|
- `<artifacts_dir>/runs/<run_id>/dispatch-plan.json`
|
|
81
|
+
- `<artifacts_dir>/runs/<run_id>/dispatch-result-map.json`
|
|
78
82
|
- `<artifacts_dir>/runs/<run_id>/task-results/*.prompt.md`
|
|
83
|
+
- `<artifacts_dir>/runs/<run_id>/task-results/*.anchors.json`, only for
|
|
84
|
+
isolated large-file packets
|
|
79
85
|
- `<artifacts_dir>/runs/<run_id>/task-results/*.json`
|
|
80
86
|
- `<artifacts_dir>/runs/<run_id>/dispatch-warnings.json`, only when needed
|
|
81
87
|
|
|
@@ -86,7 +92,7 @@ remain backend-owned.
|
|
|
86
92
|
|
|
87
93
|
Current in-repo verification:
|
|
88
94
|
|
|
89
|
-
- `npm test` passes with
|
|
95
|
+
- `npm test` passes with 148 tests.
|
|
90
96
|
|
|
91
97
|
Relevant test coverage:
|
|
92
98
|
|
|
@@ -95,8 +101,11 @@ Relevant test coverage:
|
|
|
95
101
|
- graph-connected packet merging
|
|
96
102
|
- tiny test-file batching
|
|
97
103
|
- packet prompt generation
|
|
98
|
-
- packet merge compatibility with the legacy result array
|
|
104
|
+
- packet submission and merge compatibility with the legacy result array
|
|
99
105
|
- missing-result blocking
|
|
106
|
+
- swapped-result blocking
|
|
107
|
+
- collision-proof assigned result paths
|
|
108
|
+
- isolated large-file anchor generation
|
|
100
109
|
- path-heuristic regressions
|
|
101
110
|
- graph extraction from source contents
|
|
102
111
|
- selective deepening triggers and packet refresh
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Autonomous local loop code auditing - advances deterministic audit state, delegates bounded review tasks, and ingests validated results
|
|
3
3
|
argument-hint: [target-dir]
|
|
4
|
-
allowed-tools: [Read,
|
|
4
|
+
allowed-tools: [Read, Bash, Glob, Grep, Agent]
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# `/audit-code` Execution Directive
|
|
@@ -81,14 +81,19 @@ In a single message, launch one Agent/subagent call per dispatch-plan entry:
|
|
|
81
81
|
Agent({ description: entry.description, prompt: "Read and follow the audit instructions in: " + entry.prompt_path })
|
|
82
82
|
```
|
|
83
83
|
|
|
84
|
+
If the host supports per-subagent tool restrictions, give review subagents no
|
|
85
|
+
Write tool and allow shell access only for the `audit-code submit-packet`
|
|
86
|
+
command printed in their prompt.
|
|
87
|
+
|
|
84
88
|
All subagent calls should be launched together. Wait for them to finish.
|
|
85
89
|
|
|
86
90
|
Subagents own bounded semantic review. They must read only their prompt and
|
|
87
|
-
assigned files,
|
|
88
|
-
|
|
89
|
-
fails, and stop.
|
|
90
|
-
|
|
91
|
-
|
|
91
|
+
assigned files, produce the requested `AuditResult[]`, pipe it to the
|
|
92
|
+
`submit-packet` command in their prompt, retry up to 3 times if submission
|
|
93
|
+
fails, and stop. The backend command validates and writes the packet-owned
|
|
94
|
+
result artifacts. They must not use direct file writes, edit source files,
|
|
95
|
+
remediate findings, create extra task results, run unrelated audits, or write
|
|
96
|
+
the worker `result.json` control envelope.
|
|
92
97
|
|
|
93
98
|
Then run:
|
|
94
99
|
|