auditor-lambda 0.3.4 → 0.3.6

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.
@@ -3,8 +3,8 @@
3
3
  This document describes the implemented review-dispatch path for `/audit-code`.
4
4
  The original dispatch plan was one agent per audit task. The current path keeps
5
5
  the existing `AuditTask` and `AuditResult` contracts, but groups related tasks
6
- into review packets so a worker can read a coherent file set once and produce
7
- one validated result file for each assigned task.
6
+ into review packets so a worker can read a coherent file set once and submit
7
+ one validated result for each assigned task through a backend-owned write path.
8
8
 
9
9
  ## Current Workflow
10
10
 
@@ -15,15 +15,16 @@ one validated result file for each assigned task.
15
15
 
16
16
  2. audit-code prepare-dispatch --run-id <run_id> --artifacts-dir <artifacts_dir>
17
17
  -> reads pending-audit-tasks.json and review planning artifacts
18
- -> writes dispatch-plan.json
18
+ -> writes a slim dispatch-plan.json
19
+ -> writes backend-owned dispatch-result-map.json
19
20
  -> writes one packet prompt per dispatch-plan entry
20
21
  -> prints one compact JSON envelope
21
22
 
22
23
  3. Conversation orchestrator reads only dispatch-plan.json
23
24
  -> launches one subagent per packet
24
25
  -> each subagent reads its packet prompt and assigned files
25
- -> each subagent writes one task-results/<task_id>.json per underlying task
26
- -> each subagent runs the validation commands in the prompt
26
+ -> each subagent pipes AuditResult[] to the submit-packet command in the prompt
27
+ -> submit-packet validates and writes only backend-assigned result files
27
28
  -> each subagent replies: valid: <packet_id>, findings=<n>
28
29
 
29
30
  4. audit-code merge-and-ingest --run-id <run_id> --artifacts-dir <artifacts_dir>
@@ -62,6 +63,7 @@ Packet planning is deterministic and compatibility-preserving:
62
63
  - graph edges from imports, calls, and references can merge related task groups
63
64
  - heuristic container edges do not force packet expansion
64
65
  - packet chunking respects task-count and line-budget limits
66
+ - a single file that exceeds the packet target is isolated rather than split
65
67
  - high-priority packets sort ahead of lower-priority packets
66
68
 
67
69
  Generated packets include:
@@ -88,7 +90,10 @@ audit-code prepare-dispatch --run-id <run_id> --artifacts-dir <artifacts_dir>
88
90
  Artifacts:
89
91
 
90
92
  - `<artifacts_dir>/runs/<run_id>/dispatch-plan.json`
93
+ - `<artifacts_dir>/runs/<run_id>/dispatch-result-map.json`
91
94
  - `<artifacts_dir>/runs/<run_id>/task-results/<packet_id>.prompt.md`
95
+ - `<artifacts_dir>/runs/<run_id>/task-results/<packet_id>.anchors.json`,
96
+ only for isolated large-file packets
92
97
  - `<artifacts_dir>/runs/<run_id>/dispatch-warnings.json`, only when warnings
93
98
  exist
94
99
 
@@ -115,24 +120,53 @@ The command prints a compact JSON envelope:
115
120
  ```json
116
121
  {
117
122
  "packet_id": "src-auth:security-correctness:packet-1-...",
118
- "task_id": "src-auth:security-correctness:packet-1-...",
119
- "task_ids": ["src-auth:security", "src-auth:correctness"],
120
123
  "description": "Audit 2 file(s), 2 task(s), 2 lens(es) (~70 lines)",
121
- "output_paths": {
122
- "src-auth:security": ".audit-artifacts/runs/run-1/task-results/src-auth_security.json",
123
- "src-auth:correctness": ".audit-artifacts/runs/run-1/task-results/src-auth_correctness.json"
124
+ "prompt_path": ".audit-artifacts/runs/run-1/task-results/src-auth_security-correctness_packet-1_ab12cd34ef56.prompt.md",
125
+ "complexity": {
126
+ "priority": "high",
127
+ "task_count": 2,
128
+ "file_count": 2,
129
+ "total_lines": 70,
130
+ "estimated_tokens": 1180,
131
+ "lenses": ["security", "correctness"],
132
+ "tags": ["critical_flow"],
133
+ "large_file_mode": false
124
134
  },
125
- "prompt_path": ".audit-artifacts/runs/run-1/task-results/src-auth_security-correctness_packet-1.prompt.md",
126
- "lenses": ["security", "correctness"],
127
- "file_paths": ["src/api/auth.ts", "src/lib/session.ts"],
128
- "total_lines": 70,
129
- "estimated_tokens": 1180
135
+ "model_hint": {
136
+ "tier": "deep",
137
+ "reasons": ["high_priority", "critical_flow"]
138
+ }
130
139
  }
131
140
  ```
132
141
 
133
142
  The orchestrator should launch one subagent per entry with the entry
134
143
  description and a prompt that tells the subagent to read and follow
135
144
  `entry.prompt_path`.
145
+ If the host supports per-subagent model selection, it may map
146
+ `entry.model_hint.tier` (`small`, `standard`, or `deep`) to local model names.
147
+ These hints are provider-neutral; the backend does not hardcode model names or
148
+ require model selection during normal use.
149
+
150
+ ## Large File Mode
151
+
152
+ The workflow does not impose a hard single-file size limit. When a packet is
153
+ large because it contains one large file, `prepare-dispatch` keeps that file in
154
+ an isolated packet and writes a mechanical anchor summary next to the packet
155
+ prompt. The anchor summary may include:
156
+
157
+ - file boundaries
158
+ - imports and exports
159
+ - top-level symbols
160
+ - route-like declarations
161
+ - risk keywords
162
+ - graph edges
163
+ - external analyzer signals
164
+
165
+ The packet prompt points the worker at the anchor file and asks for targeted
166
+ reads/searches within the assigned file. The backend still validates and writes
167
+ results through `submit-packet`. This keeps large-file review bounded by
168
+ mechanically generated structure without slicing files into arbitrary line
169
+ ranges.
136
170
 
137
171
  ## Packet Prompt Contract
138
172
 
@@ -141,20 +175,31 @@ Each packet prompt tells the worker to:
141
175
  - review the packet once
142
176
  - read only the listed repo-relative files
143
177
  - produce one JSON object per listed task
144
- - write each object to that task's exact `output_path`
178
+ - pipe one JSON array to the prompt's `submit-packet` command
145
179
  - preserve the existing `AuditResult` fields:
146
180
  `task_id`, `unit_id`, `pass_id`, `lens`, `file_coverage`, `findings`
147
181
  - keep `file_coverage[]` as `{ path, total_lines }`
148
182
  - keep every finding lens equal to the task lens
149
- - avoid source edits, remediation, extra task results, and unrelated audits
150
- - run the generated validation command for every task result
151
- - reply exactly `valid: <packet_id>, findings=<total finding count>` after all
152
- validation commands pass
183
+ - avoid direct file writes, source edits, remediation, extra task results, and
184
+ unrelated audits
185
+ - reply exactly `valid: <packet_id>, findings=<total finding count>` after the
186
+ submit command accepts the packet
153
187
 
154
188
  This keeps packet review efficient while leaving merge and ingestion
155
189
  mechanically deterministic.
156
190
 
157
- ## Validation
191
+ ## Submission and Validation
192
+
193
+ Packet submission is exposed through:
194
+
195
+ ```bash
196
+ audit-code submit-packet --run-id <run_id> --packet-id <packet_id> --artifacts-dir <artifacts_dir>
197
+ ```
198
+
199
+ The command reads `AuditResult[]` from stdin, validates the complete assigned
200
+ packet, and writes only the backend-assigned per-task result paths from
201
+ `dispatch-result-map.json`. This keeps result writes out of the LLM prompt and
202
+ prevents swapped or unknown task result files from being ingested.
158
203
 
159
204
  Per-task validation is exposed through:
160
205
 
@@ -162,6 +207,10 @@ Per-task validation is exposed through:
162
207
  audit-code validate-result --run-id <run_id> --task-id <task_id> --artifacts-dir <artifacts_dir>
163
208
  ```
164
209
 
210
+ Generated packet prompts may pass run ids, packet ids, task ids, and artifact paths through
211
+ base64url flags such as `--run-id-b64`, `--packet-id-b64`, `--task-id-b64`, and
212
+ `--artifacts-dir-b64` when raw values could contain shell-sensitive characters.
213
+
165
214
  The validator checks the result against the assigned task set and enforces the
166
215
  mechanical constraints that matter for ingestion:
167
216
 
@@ -171,7 +220,7 @@ mechanical constraints that matter for ingestion:
171
220
  - line spans do not exceed known `total_lines`
172
221
  - result fields conform to the shipped schemas
173
222
 
174
- Workers should retry invalid JSON up to the bounded retry count in the prompt.
223
+ Workers should retry rejected submissions up to the bounded retry count in the prompt.
175
224
 
176
225
  ## `merge-and-ingest` Output
177
226
 
@@ -183,7 +232,9 @@ audit-code merge-and-ingest --run-id <run_id> --artifacts-dir <artifacts_dir>
183
232
 
184
233
  Merge behavior:
185
234
 
186
- - validates every JSON file under `task-results/`
235
+ - validates every backend-assigned result-map path
236
+ - rejects unexpected JSON files under `task-results/`
237
+ - rejects task IDs that appear in the wrong assigned result path
187
238
  - rejects duplicate task results
188
239
  - rejects unknown task IDs
189
240
  - rejects missing assigned task results
@@ -30,7 +30,7 @@ audit-code install --host vscode
30
30
  ## Behavior
31
31
 
32
32
  - the command copies the canonical prompt payload from `skills/audit-code/audit-code.prompt.md`
33
- - the generated prompt file explicitly sets `agent: agent` so Copilot Chat runs `/audit-code` with tool-capable agent mode
33
+ - the generated prompt file explicitly sets `agent: auditor` so Copilot Chat uses the generated auditor custom agent
34
34
  - the installer upserts its managed compatibility block into `.github/copilot-instructions.md` instead of clobbering unrelated instructions
35
35
  - it prints machine-readable JSON describing the installed targets
36
36
 
@@ -13,6 +13,17 @@ For that surface, the default model rule is:
13
13
 
14
14
  That is the intended product contract.
15
15
 
16
+ When packet dispatch is prepared, `dispatch-plan.json` includes
17
+ provider-neutral complexity metadata and a `model_hint.tier` value:
18
+
19
+ - `small` for tiny, low-priority packets without sensitive lenses or risk tags
20
+ - `standard` for ordinary bounded review packets
21
+ - `deep` for high-priority, large, critical-flow, or external-signal packets
22
+
23
+ Hosts that support per-subagent model choice may map those tiers to their own
24
+ available models. Hosts that do not support model choice can ignore the fields.
25
+ The backend still does not prescribe concrete model names.
26
+
16
27
  ## 2. Backend provider rule
17
28
 
18
29
  When the local backend delegates bounded worker runs into an external provider, model selection becomes provider-specific.
@@ -3,7 +3,7 @@
3
3
  This document tracks the next meaningful implementation work after the packet
4
4
  review-dispatch refactor and the current skill-first productionization pass.
5
5
 
6
- As of April 22, 2026, the shared MCP substrate and the first host-native installer pass have landed, but this repository is not yet ready for a public production launch.
6
+ As of April 30, 2026, the shared MCP substrate and the host-native installer pass have landed, but this repository is not yet ready for a public production launch.
7
7
 
8
8
  See:
9
9
 
@@ -144,7 +144,7 @@ Status:
144
144
 
145
145
  Most likely shape:
146
146
 
147
- - run fresh-repo smoke checks inside Codex, Claude Desktop, OpenCode, and VS Code
147
+ - run fresh-repo smoke checks inside Codex, Claude Desktop, OpenCode, and VS Code, with Antigravity validated against its planning-mode path
148
148
  - confirm that the generated files are both syntactically valid and actually discovered by each host
149
149
  - tighten generated docs wherever operator confusion appears during those checks
150
150
  - keep Antigravity as a documented planning-mode path unless a stable project config contract is published
package/docs/packaging.md CHANGED
@@ -17,6 +17,8 @@ The primary product surface is `/audit-code` in conversation.
17
17
  That means the package needs to ship:
18
18
 
19
19
  - the canonical prompt asset at `skills/audit-code/audit-code.prompt.md`
20
+ - the companion Codex/OpenCode skill asset at `skills/audit-code/SKILL.md`
21
+ - packet-dispatch support data such as `dispatch/lens-definitions.json`
20
22
  - the backend fallback wrapper exposed as `audit-code`
21
23
 
22
24
  A linked-command smoke test proves the installed wrapper and prompt lookup work from the working tree.
@@ -76,11 +78,11 @@ The repository now includes packaging metadata and lifecycle hooks intended for
76
78
 
77
79
  - `package.json` is no longer marked private
78
80
  - `publishConfig.access` defaults publication to the public npm access level
79
- - package contents are curated with a `files` allowlist that includes the canonical prompt asset
81
+ - package contents are curated with a `files` allowlist that includes the canonical prompt, skill, dispatch, schema, and runtime assets
80
82
  - `prepack` and `prepare` build the runtime artifact
81
83
  - `verify:release` codifies the minimum in-repo release gate
82
84
  - `prepublishOnly` now runs that full release gate, including both linked-install and packaged-install smoke validation
83
- - packaged smoke now verifies the tarball includes `audit-code-wrapper-lib.mjs`, the prompt asset, the response schema, and `dist/` entrypoints before install-time smoke runs
85
+ - packaged smoke now verifies the tarball includes `audit-code-wrapper-lib.mjs`, the prompt and skill assets, dispatch lens definitions, the response schema, and `dist/` entrypoints before install-time smoke runs
84
86
  - the GitHub publish workflow uses the same release gate before `npm publish`
85
87
  - the GitHub publish workflow uses npm Trusted Publishing with GitHub OIDC instead of a long-lived publish token
86
88
  - prerelease versions now default to the `next` dist-tag in the publish workflow unless an explicit tag override is chosen on manual dispatch
@@ -25,6 +25,8 @@ Anything below `dist/index.js` remains a backend or development interface rather
25
25
  - packaged installs must include:
26
26
  - `audit-code`
27
27
  - `audit-code-wrapper-lib.mjs`
28
+ - `dispatch/lens-definitions.json`
29
+ - `skills/audit-code/SKILL.md`
28
30
  - `skills/audit-code/audit-code.prompt.md`
29
31
  - `schemas/audit-code-v1alpha1.schema.json`
30
32
  - the checked-in `dist/` output is part of the shipped runtime contract for installed usage
@@ -38,7 +40,7 @@ Anything below `dist/index.js` remains a backend or development interface rather
38
40
  ### Host surfaces
39
41
 
40
42
  - ChatGPT-style project conversations are the intended `/audit-code` product surface
41
- - VS Code / GitHub Copilot, OpenCode, and Claude Code repositories are supported through `audit-code install`
43
+ - Codex, Claude Desktop, OpenCode, VS Code / GitHub Copilot, and Antigravity repository surfaces are generated through `audit-code install`
42
44
  - editor integrations that import `skills/audit-code/audit-code.prompt.md` are supported as prompt-based integrations
43
45
  - no editor-specific native install surface should be called production-ready until it has explicit documentation and a repeatable verification path
44
46
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Verdict
4
4
 
5
- As of April 22, 2026, the package release path is ready for a public npm release candidate, but the broader host experience still has follow-through work before it should be described as a frictionless production launch.
5
+ As of April 30, 2026, the package release path has a strong in-repo release gate, but the broader host experience still has follow-through work before it should be described as a frictionless production launch.
6
6
 
7
7
  What is already true:
8
8
 
@@ -11,9 +11,9 @@ What is already true:
11
11
  - linked-install smoke coverage passes
12
12
  - packaged-install smoke coverage passes
13
13
  - packaged tarball contract verification passes
14
- - `npm run verify:release` passes for the current `0.2.8` worktree
15
- - local `npm publish --dry-run` passes for `auditor-lambda@0.2.8`
16
- - npm currently reports `auditor-lambda@0.2.6` as `latest`, so the checked-in release version is still unpublished
14
+ - `npm run verify:release` is the authoritative local release gate for the current worktree
15
+ - local `npm publish --dry-run` should be run before any release candidate publish
16
+ - npm registry state should be verified at release time rather than inferred from checked-in docs
17
17
  - malformed config and corrupted artifact handling are explicit
18
18
  - blocked fallback runs now emit structured operator handoff guidance
19
19
  - supported repo-local hosts now share a bootstrap install path via `audit-code install`
@@ -27,7 +27,7 @@ The biggest remaining gaps are product and release-operational, not core wrapper
27
27
  1. npm publication is not fully proven end to end.
28
28
  The repo now has a Trusted Publishing workflow and a passing local dry run, but npm-side trusted publisher setup plus the first GitHub Actions dry run still need to be completed outside the codebase.
29
29
  2. The primary conversation-first product still has setup friction on hosts without a verified repo-local slash-command surface.
30
- VS Code / Copilot, OpenCode, and Claude Code now share a bootstrap path, but Claude Desktop, Antigravity, and other hosts still need more work.
30
+ Codex, Claude Desktop, OpenCode, VS Code / Copilot, and Antigravity now share the same bootstrap command, but each generated host surface still needs real-product verification before it can be called frictionless.
31
31
  3. Provider-assisted continuation still needs polish outside the happy path.
32
32
  Configured interactive bridges can now continue through audit-task review, but operator guidance and host-specific ergonomics still need refinement when a provider cannot produce results cleanly.
33
33
 
@@ -38,7 +38,7 @@ The explicit launch bar is now documented in `docs/production-launch-bar.md`, an
38
38
  1. Confirm release operations externally.
39
39
  Validate npm package-name ownership for `auditor-lambda`, configure npm Trusted Publishing for `.github/workflows/publish-package.yml`, and run a real GitHub Actions dry run or prerelease publish from that workflow path.
40
40
  2. Extend bootstrap coverage beyond the currently automated hosts.
41
- Keep `audit-code install` stable for VS Code / Copilot, OpenCode, and Claude Code, and close the remaining friction gap for hosts that still lack a verified repo-local install surface.
41
+ Keep `audit-code install` stable for Codex, Claude Desktop, OpenCode, VS Code / Copilot, and Antigravity, and close the remaining friction gap for hosts that still lack a verified repo-local install surface.
42
42
  3. Polish provider-assisted UX.
43
43
  Keep the new continuation path explicit and inspectable while improving failure hints, host guidance, and operator recovery when a provider bridge misbehaves.
44
44
 
package/docs/run-flow.md CHANGED
@@ -14,11 +14,13 @@ This document describes the backend execution flow that supports that conversati
14
14
  4. Build `review_packets.json` and `audit_plan_metrics.json` from those tasks.
15
15
  5. Stop at semantic review with an active run handoff.
16
16
  6. `prepare-dispatch` writes a small run-scoped `dispatch-plan.json` and one
17
- prompt per review packet.
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.
18
20
  7. The active conversation orchestrator launches one bounded subagent per
19
21
  packet when the host supports subagents.
20
- 8. Each subagent writes one validated `AuditResult` JSON object per underlying
21
- task.
22
+ 8. Each subagent pipes `AuditResult[]` to the packet's `submit-packet` command;
23
+ the backend validates and writes assigned result files.
22
24
  9. `merge-and-ingest` validates the full assigned task set and ingests the
23
25
  existing `AuditResult[]` shape.
24
26
  10. Result ingestion updates coverage, requeue, runtime-validation state, and
@@ -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, re-run the wrapper with an explicit `--provider <name>` flag
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 appended before the built-in permission-skipping flag
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 review into an external Claude Code process, together with `audit-code --provider claude-code`.
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
 
@@ -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 the explicit bridge handoff point.
67
- Without an explicit `--provider` flag, the backend stops at the semantic-review
68
- boundary and exposes scoped task artifacts for the slash-command orchestrator.
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
- - write one validated result file per underlying task
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 outputs to one worker
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 143 tests.
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,6 +1,6 @@
1
1
  {
2
2
  "name": "auditor-lambda",
3
- "version": "0.3.4",
3
+ "version": "0.3.6",
4
4
  "private": false,
5
5
  "description": "Portable hybrid code-auditing framework for arbitrary repositories.",
6
6
  "type": "module",
@@ -28,6 +28,10 @@ command, then stop so the user can rerun `/audit-code` from fresh context.
28
28
  Subagent fan-out belongs to the host agent runtime rather than to repo-local
29
29
  backend provider settings.
30
30
 
31
+ When dispatch-plan entries include provider-neutral complexity and
32
+ `model_hint.tier` metadata, a capable host may map those tiers to its own
33
+ subagent models. The backend should not prescribe concrete model names.
34
+
31
35
  Bounded steps are a backend implementation detail, not the intended user experience.
32
36
 
33
37
  ## Embedded Prompt Payload
@@ -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, Write, Bash, Glob, Grep, Agent]
4
+ allowed-tools: [Read, Bash, Glob, Grep, Agent]
5
5
  ---
6
6
 
7
7
  # `/audit-code` Execution Directive
@@ -81,14 +81,24 @@ 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 model selection, use `entry.model_hint.tier`
85
+ as a provider-neutral routing hint (`small`, `standard`, or `deep`). Map it to
86
+ available host models without asking the user to choose model names. If model
87
+ selection is unavailable, ignore the hint and dispatch normally.
88
+
89
+ If the host supports per-subagent tool restrictions, give review subagents no
90
+ Write tool and allow shell access only for the `audit-code submit-packet`
91
+ command printed in their prompt.
92
+
84
93
  All subagent calls should be launched together. Wait for them to finish.
85
94
 
86
95
  Subagents own bounded semantic review. They must read only their prompt and
87
- assigned files, write exactly the requested audit result JSON to `output_path`,
88
- run the validation command in their prompt, retry up to 3 times if validation
89
- fails, and stop. They must not edit source files, remediate findings, create
90
- extra task results, run unrelated audits, or write the worker `result.json`
91
- control envelope.
96
+ assigned files, produce the requested `AuditResult[]`, pipe it to the
97
+ `submit-packet` command in their prompt, retry up to 3 times if submission
98
+ fails, and stop. The backend command validates and writes the packet-owned
99
+ result artifacts. They must not use direct file writes, edit source files,
100
+ remediate findings, create extra task results, run unrelated audits, or write
101
+ the worker `result.json` control envelope.
92
102
 
93
103
  Then run:
94
104