auditor-lambda 0.2.5 → 0.2.8

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 (71) hide show
  1. package/README.md +35 -7
  2. package/audit-code-wrapper-lib.mjs +1612 -331
  3. package/dist/cli.js +397 -38
  4. package/dist/coverage.d.ts +2 -2
  5. package/dist/coverage.js +5 -5
  6. package/dist/extractors/disposition.js +10 -1
  7. package/dist/extractors/flows.js +7 -1
  8. package/dist/extractors/pathPatterns.d.ts +3 -0
  9. package/dist/extractors/pathPatterns.js +15 -0
  10. package/dist/extractors/risk.js +7 -1
  11. package/dist/io/artifacts.d.ts +6 -6
  12. package/dist/io/artifacts.js +14 -17
  13. package/dist/io/json.d.ts +2 -0
  14. package/dist/io/json.js +15 -0
  15. package/dist/io/runArtifacts.d.ts +3 -1
  16. package/dist/io/runArtifacts.js +20 -5
  17. package/dist/mcp/server.d.ts +1 -0
  18. package/dist/mcp/server.js +579 -0
  19. package/dist/orchestrator/advance.js +9 -2
  20. package/dist/orchestrator/dependencyMap.js +9 -13
  21. package/dist/orchestrator/executors.js +7 -2
  22. package/dist/orchestrator/flowRequeue.d.ts +2 -2
  23. package/dist/orchestrator/flowRequeue.js +16 -3
  24. package/dist/orchestrator/internalExecutors.d.ts +2 -1
  25. package/dist/orchestrator/internalExecutors.js +129 -48
  26. package/dist/orchestrator/requeue.js +10 -4
  27. package/dist/orchestrator/requeueCommand.js +15 -2
  28. package/dist/orchestrator/resultIngestion.d.ts +2 -1
  29. package/dist/orchestrator/resultIngestion.js +26 -6
  30. package/dist/orchestrator/runtimeValidation.d.ts +7 -2
  31. package/dist/orchestrator/runtimeValidation.js +61 -49
  32. package/dist/orchestrator/runtimeValidationUpdate.js +2 -4
  33. package/dist/orchestrator/state.js +28 -14
  34. package/dist/orchestrator/taskBuilder.js +4 -2
  35. package/dist/orchestrator/trivialAudit.d.ts +4 -0
  36. package/dist/orchestrator/trivialAudit.js +49 -0
  37. package/dist/prompts/renderWorkerPrompt.js +6 -2
  38. package/dist/providers/spawnLoggedCommand.js +17 -0
  39. package/dist/reporting/mergeFindings.js +3 -11
  40. package/dist/reporting/rootCause.js +92 -9
  41. package/dist/reporting/synthesis.d.ts +25 -22
  42. package/dist/reporting/synthesis.js +92 -59
  43. package/dist/reporting/workBlocks.d.ts +12 -3
  44. package/dist/reporting/workBlocks.js +124 -70
  45. package/dist/supervisor/sessionConfig.js +4 -2
  46. package/dist/types/flows.d.ts +2 -0
  47. package/dist/types/runtimeValidation.d.ts +2 -1
  48. package/dist/types.d.ts +8 -6
  49. package/dist/validation/auditResults.d.ts +5 -2
  50. package/dist/validation/auditResults.js +335 -43
  51. package/docs/agent-integrations.md +38 -29
  52. package/docs/artifacts.md +18 -51
  53. package/docs/bootstrap-install.md +60 -30
  54. package/docs/contract.md +25 -117
  55. package/docs/field-trial-bug-report.md +237 -0
  56. package/docs/next-steps.md +59 -44
  57. package/docs/packaging.md +13 -3
  58. package/docs/production-launch-bar.md +2 -2
  59. package/docs/production-readiness.md +9 -5
  60. package/docs/releasing.md +81 -0
  61. package/docs/session-config.md +20 -1
  62. package/docs/usage.md +22 -0
  63. package/package.json +4 -1
  64. package/schemas/audit_result.schema.json +4 -5
  65. package/schemas/audit_task.schema.json +10 -0
  66. package/schemas/runtime_validation_report.schema.json +1 -1
  67. package/skills/audit-code/SKILL.md +11 -2
  68. package/skills/audit-code/audit-code.prompt.md +11 -10
  69. package/schemas/merged_findings.schema.json +0 -19
  70. package/schemas/root_cause_clusters.schema.json +0 -28
  71. package/schemas/synthesis_report.schema.json +0 -61
@@ -2,7 +2,7 @@
2
2
 
3
3
  This document tracks the next meaningful implementation work after the current skill-first productionization pass.
4
4
 
5
- As of April 18, 2026, this repository is not yet ready for a public production launch.
5
+ 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
6
 
7
7
  See:
8
8
 
@@ -15,43 +15,49 @@ The repository now supports:
15
15
  - `/audit-code` as the documented canonical product route
16
16
  - packaged and repository-local access to `skills/audit-code/audit-code.prompt.md`
17
17
  - `audit-code prompt-path` as a stable prompt lookup helper
18
- - `audit-code install` as a bootstrap installer for the currently automated repo-local host surfaces
18
+ - `audit-code install --host vscode|opencode|codex|claude-desktop|antigravity|all` as a bootstrap installer for the current host surfaces
19
+ - `audit-code mcp` as a first-class stdio MCP server entrypoint
20
+ - a stable MCP contract with the `start_audit`, `get_status`, `continue_audit`, `explain_task`, `validate_artifacts`, `import_results`, and `import_runtime_updates` tools
21
+ - repo-local MCP resources for current artifacts, operator handoff, install guidance, and the current audit report
22
+ - repo-local MCP prompts for `audit-code`, `review-task`, and `synthesize-report`
23
+ - generated `.audit-code/install/manifest.json` plus a shared repo-local MCP launcher script
24
+ - Codex install assets including a repo skill bundle, `AGENTS.md` support, MCP setup guidance, and an automation recipe
25
+ - Claude Desktop install assets including a project template, remote connector template, and generated local bundle artifacts
26
+ - OpenCode install assets including command, skill, prompt, and `opencode.json` support
27
+ - VS Code install assets including prompt file, Copilot instructions, custom agent, and `.vscode/mcp.json`
28
+ - Antigravity install assets including planning-mode guidance and MCP-oriented setup guidance
19
29
  - explicit failures for malformed backend config and corrupted artifact JSON
20
30
  - `audit-code validate` as a machine-readable backend operator check
21
31
  - an explicit in-repo release gate via `npm run verify:release`
22
32
  - structured operator handoff output plus `.audit-artifacts/operator-handoff.{json,md}` for blocked fallback runs
23
33
  - configured provider bridges that can continue audit-task review by writing structured results and handing control back to the bounded worker command
24
34
 
25
- That means the current release is suitable for a controlled alpha or beta skill-first workflow, but it is not yet the final public production end-state.
35
+ That means the current release is suitable for a controlled alpha or beta skill-first workflow with MCP-aware host bootstrapping, but it is not yet the final public production end-state.
26
36
 
27
37
  ## Near-term priorities
28
38
 
29
- ### 1. Reduce conversation setup friction
39
+ ### 1. Verify the shipped host integrations end to end
30
40
 
31
- The biggest remaining UX gap is that some hosts still lack a verified repo-local install surface.
41
+ The biggest remaining gap is not raw feature presence anymore. It is host-by-host proof that the generated assets work in the actual products they target.
32
42
 
33
43
  Near-term work should focus on:
34
44
 
35
- - host-specific setup guides that reduce copy-paste ambiguity
36
- - preserving `audit-code install` as the default no-guess bootstrap path
37
- - extending bootstrap coverage to hosts that still need manual prompt import
38
- - a shorter path from package install to a working `/audit-code` conversation flow
45
+ - verifying the Codex skill bundle, `AGENTS.md`, MCP setup guidance, and automation recipe against the real Codex app flow
46
+ - installing and smoke-testing the generated Claude Desktop `DXT` or bundle output in a real Desktop environment
47
+ - validating that the OpenCode `opencode.json` shape, command file, and MCP config match current OpenCode behavior
48
+ - validating the VS Code prompt, agent, and `.vscode/mcp.json` flow inside a real workspace
49
+ - validating that the Antigravity planning-mode guidance is accurate and does not over-promise a native saved-workflow surface
39
50
 
40
- Current emphasis should follow actual operator usage:
51
+ ### 2. Close the remaining host-native UX gaps
41
52
 
42
- - keep VS Code and OpenCode as the primary polished happy path
43
- - treat Claude Desktop and Antigravity as the highest-priority manual-import surfaces
44
- - avoid spending near-term effort on lower-priority editor integrations unless they materially improve the shared prompt-import path
45
-
46
- ### 2. Make the conversation route more native
47
-
48
- The product goal is still conversational first, not fallback-CLI first.
53
+ The product goal is still conversational first, not fallback-CLI first, and some shipped surfaces are still guidance-heavy rather than truly native.
49
54
 
50
55
  Near-term work should focus on:
51
56
 
52
- - first-class integrations for the most important editor or agent hosts
53
- - removing host-specific manual prompt wiring where practical
54
- - keeping the active conversation model and attached repo context as the default operating mode
57
+ - turning the Codex automation recipe into a proven, documented automation flow after real operator validation
58
+ - polishing Claude Desktop one-click install so the generated bundle is a clearly supported path instead of a mostly technical artifact
59
+ - deciding whether OpenCode and VS Code need any smaller UX refinements after smoke-testing, rather than assuming the first generated surfaces are final
60
+ - keeping Antigravity framed as a workflow-and-artifacts host until Google documents a stable project-local config surface
55
61
 
56
62
  ### 3. Polish continuation through assisted review
57
63
 
@@ -70,25 +76,28 @@ The packaged install story is in place, but release operations still need finish
70
76
  Near-term work should focus on:
71
77
 
72
78
  - npm package-name availability and ownership
73
- - final publication automation and secret management
79
+ - one-time npm Trusted Publisher setup for `.github/workflows/publish-package.yml`
80
+ - the first GitHub Actions dry run and live publish through that workflow
81
+ - keeping prerelease publication off the `latest` dist-tag unless intentionally requested
74
82
  - keeping linked-install and packaged-install smoke checks as release gates
75
83
 
76
84
  ## Frictionless-ready checklist
77
85
 
78
86
  The repository should not be described as frictionless and production-ready until this checklist is substantially true:
79
87
 
80
- ### VS Code, OpenCode, and Claude Code
88
+ ### Codex, Claude Desktop, OpenCode, and VS Code
81
89
 
82
90
  - `audit-code install` remains the default bootstrap path
83
91
  - the generated repo-local surfaces are obvious in installer output and in `.audit-code/install/GETTING-STARTED.md`
84
92
  - a new user can invoke `/audit-code` without guessing where prompts or commands were written
93
+ - the generated MCP setup path works in the real host, not only in unit tests
85
94
  - smoke coverage continues to verify the exact repo-local files these hosts consume
86
95
 
87
- ### Claude Desktop and Antigravity
96
+ ### Antigravity
88
97
 
89
- - the installed prompt-import path is explicit, repo-local, and easy to discover
90
- - `.audit-code/install/GETTING-STARTED.md` gives host-specific steps instead of generic manual-import advice
91
- - docs avoid implying native repo-local slash-command support that is not actually shipped
98
+ - the planning-mode guidance is explicit, repo-local, and easy to discover
99
+ - `.audit-code/install/GETTING-STARTED.md` gives Antigravity-specific steps instead of generic prompt-import advice
100
+ - docs avoid implying native repo-local saved-workflow support that is not actually shipped
92
101
  - the backend fallback remains a clearly secondary path instead of the default recommendation
93
102
 
94
103
  ### Assisted review continuation
@@ -99,27 +108,28 @@ The repository should not be described as frictionless and production-ready unti
99
108
  ### Release operations
100
109
 
101
110
  - `npm run verify:release` remains green and authoritative
102
- - the real publish path is proven with npm ownership, `NPM_TOKEN`, and a real dry-run or pre-release publish
111
+ - the real publish path is proven with npm ownership, npm Trusted Publishing, and a real GitHub Actions dry run or prerelease publish
103
112
 
104
113
  ## Probable next steps
105
114
 
106
115
  These are the most likely next implementation steps based on the current codebase state, but they should still be treated as provisional rather than guaranteed:
107
116
 
108
- ### 1. Ship a real bootstrap installer instead of making users pick a host first
117
+ ### 1. Prove the host installers in real products
109
118
 
110
119
  Status:
111
120
 
112
- - completed for the currently automated repo-local hosts via `audit-code install`
121
+ - partially completed in code, not yet fully validated operationally
113
122
 
114
- Practical success bar now met:
123
+ Most likely shape:
115
124
 
116
- - a new user can run one install command and get repo-local `/audit-code` surfaces for VS Code / Copilot, OpenCode, and Claude Code without guessing where the prompt belongs
125
+ - run fresh-repo smoke checks inside Codex, Claude Desktop, OpenCode, and VS Code
126
+ - confirm that the generated files are both syntactically valid and actually discovered by each host
127
+ - tighten generated docs wherever operator confusion appears during those checks
128
+ - keep Antigravity as a documented planning-mode path unless a stable project config contract is published
117
129
 
118
- Follow-on shape:
130
+ Practical success bar:
119
131
 
120
- - keep the shared bootstrap path well-supported instead of growing one-off host installers
121
- - document the exact install and verification path for hosts that still need extra handling
122
- - only claim native support for a host once its install surface is equally concrete and testable
132
+ - a new operator can run one install command and reach a working `/audit-code` or MCP-backed flow in each claimed host without guesswork
123
133
 
124
134
  ### 2. Harden configured interactive-provider continuation
125
135
 
@@ -134,25 +144,30 @@ Practical success bar:
134
144
 
135
145
  - a configured provider can continue through audit-task review with good diagnostics and low operator guesswork when something goes wrong
136
146
 
137
- ### 3. Prove the release path outside the repository
147
+ ### 3. Finish the Claude Desktop and Antigravity follow-through
138
148
 
139
149
  Most likely shape:
140
150
 
141
- - confirm npm package-name ownership and `NPM_TOKEN` availability
142
- - run a real pre-release or dry-run publish
143
- - keep `npm run verify:release` as the minimum in-repo gate before publish
151
+ - prove the generated Claude Desktop local bundle in a real Desktop install flow
152
+ - decide whether to check in or generate the final desktop-extension packaging metadata more explicitly
153
+ - add remote connector deployment guidance that is specific enough for Team or Enterprise rollout
154
+ - document exactly how Antigravity-produced artifacts should flow back through `import_results` and `import_runtime_updates`
144
155
 
145
156
  Practical success bar:
146
157
 
147
- - the release workflow is demonstrated end to end instead of only being inferred from configuration
158
+ - Claude Desktop and Antigravity guidance is operational, specific, and consistent with what the products really support
148
159
 
149
- ### 4. Expand host-specific setup guidance after the first integration lands
160
+ ### 4. Prove the release path outside the repository
150
161
 
151
162
  Most likely shape:
152
163
 
153
- - keep the generated repo-local guide aligned with the real bootstrap surfaces for VS Code, OpenCode, and Claude Code
154
- - keep Claude Desktop and Antigravity guidance explicit about prompt import and terminal fallback rather than pretending native repo-local slash-command support
155
- - avoid broad host promises that the codebase does not yet verify
164
+ - confirm npm package-name ownership and npm Trusted Publisher configuration
165
+ - run a real GitHub Actions pre-release or dry-run publish
166
+ - keep `npm run verify:release` as the minimum in-repo gate before publish
167
+
168
+ Practical success bar:
169
+
170
+ - the release workflow is demonstrated end to end instead of only being inferred from configuration
156
171
 
157
172
  ## Non-goals for the next phase
158
173
 
package/docs/packaging.md CHANGED
@@ -61,22 +61,32 @@ The release publish gate also runs both installed-entrypoint smoke paths before
61
61
  The repository now includes packaging metadata and lifecycle hooks intended for registry publication:
62
62
 
63
63
  - `package.json` is no longer marked private
64
+ - `publishConfig.access` defaults publication to the public npm access level
64
65
  - package contents are curated with a `files` allowlist that includes the canonical prompt asset
65
66
  - `prepack` and `prepare` build the runtime artifact
66
67
  - `verify:release` codifies the minimum in-repo release gate
67
68
  - `prepublishOnly` now runs that full release gate, including both linked-install and packaged-install smoke validation
68
69
  - 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
69
70
  - the GitHub publish workflow uses the same release gate before `npm publish`
71
+ - the GitHub publish workflow uses npm Trusted Publishing with GitHub OIDC instead of a long-lived publish token
72
+ - prerelease versions now default to the `next` dist-tag in the publish workflow unless an explicit tag override is chosen on manual dispatch
70
73
 
71
- ## Remaining external dependency
74
+ ## Remaining external release steps
72
75
 
73
- Actual publication still depends on confirmed npm package-name availability and ownership, plus a configured `NPM_TOKEN` secret for automated publishing.
76
+ Actual publication still depends on npm-side configuration outside the repository:
77
+
78
+ 1. confirm package ownership and intended publish target for `auditor-lambda`
79
+ 2. configure npm Trusted Publishing for `.github/workflows/publish-package.yml`
80
+ 3. run the first GitHub Actions dry run or live prerelease from that workflow path
81
+
82
+ The repository-side workflow already pins Node `22.14.0` and upgrades npm to `>=11.5.1`, which is the current minimum combination npm documents for GitHub Actions Trusted Publishing.
74
83
 
75
84
  ## Next packaging steps
76
85
 
77
86
  The next implementation phase should focus on:
78
87
 
79
- - completing npm publication prerequisites
88
+ - completing the one-time npm Trusted Publisher setup
89
+ - proving the GitHub Actions dry-run and live publish path end to end
80
90
  - preserving the packaged prompt asset and `audit-code prompt-path` as stable release guarantees
81
91
  - preserving `audit-code install` as a packaged-install compatibility guarantee
82
92
  - keeping linked-install and packaged-install smoke coverage in the publish gate
@@ -61,8 +61,8 @@ npm run verify:release
61
61
  In addition to the in-repo gate, production readiness still requires these external checks:
62
62
 
63
63
  1. confirm npm package-name ownership and intended publish target
64
- 2. confirm `NPM_TOKEN` availability for the publish workflow
65
- 3. run a real pre-release or dry-run publish from the release path you intend to use
64
+ 2. configure npm Trusted Publishing for `.github/workflows/publish-package.yml`
65
+ 3. run a real GitHub Actions dry run or prerelease publish from that workflow path
66
66
 
67
67
  ## Operator validation expectations
68
68
 
@@ -2,26 +2,30 @@
2
2
 
3
3
  ## Verdict
4
4
 
5
- As of April 18, 2026, this repository is not yet ready for a public production launch.
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.
6
6
 
7
- It is in good shape for a controlled alpha or beta release:
7
+ What is already true:
8
8
 
9
9
  - TypeScript build passes
10
10
  - automated test suite passes
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
17
  - malformed config and corrupted artifact handling are explicit
15
18
  - blocked fallback runs now emit structured operator handoff guidance
16
19
  - supported repo-local hosts now share a bootstrap install path via `audit-code install`
17
20
  - configured provider-assisted review can now continue to completion in a single wrapper invocation
21
+ - the GitHub publish workflow is configured for Trusted Publishing through GitHub OIDC rather than a long-lived npm token
18
22
 
19
- ## Why It Is Not Yet Production-Ready
23
+ ## Why It Is Not Yet A Broad Production Claim
20
24
 
21
25
  The biggest remaining gaps are product and release-operational, not core wrapper correctness:
22
26
 
23
27
  1. npm publication is not fully proven end to end.
24
- The repo has publish automation, but package-name ownership and registry credentials still need to be confirmed outside the codebase.
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.
25
29
  2. The primary conversation-first product still has setup friction on hosts without a verified repo-local slash-command surface.
26
30
  VS Code / Copilot, OpenCode, and Claude Code now share a bootstrap path, but Claude Desktop, Antigravity, and other hosts still need more work.
27
31
  3. Provider-assisted continuation still needs polish outside the happy path.
@@ -32,7 +36,7 @@ The explicit launch bar is now documented in `docs/production-launch-bar.md`, an
32
36
  ## Required Next Steps
33
37
 
34
38
  1. Confirm release operations externally.
35
- Validate npm package-name availability and ownership for `auditor-lambda`, confirm `NPM_TOKEN` access in GitHub Actions, and run a real pre-release or dry-run publish from the release workflow path.
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.
36
40
  2. Extend bootstrap coverage beyond the currently automated hosts.
37
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.
38
42
  3. Polish provider-assisted UX.
@@ -0,0 +1,81 @@
1
+ # Releasing
2
+
3
+ This repository publishes to npm through GitHub Actions Trusted Publishing.
4
+
5
+ The canonical workflow is:
6
+
7
+ `/.github/workflows/publish-package.yml`
8
+
9
+ That workflow already:
10
+
11
+ - runs on GitHub-hosted runners
12
+ - requests `id-token: write` for npm OIDC exchange
13
+ - pins Node `22.14.0`
14
+ - upgrades npm to `>=11.5.1`
15
+ - runs `npm run verify:release` before any publish attempt
16
+ - defaults semver prerelease versions to the `next` dist-tag unless manual dispatch overrides it
17
+
18
+ ## One-time npm setup
19
+
20
+ Before the first live publish, configure npm itself to trust this repository:
21
+
22
+ 1. confirm the intended npm owner already controls `auditor-lambda`
23
+ 2. in the npm package settings, add a GitHub Actions trusted publisher for:
24
+ - owner or organization: `OhOkThisIsFine`
25
+ - repository: `auditor-lambda`
26
+ - workflow filename: `publish-package.yml`
27
+ 3. keep the workflow filename stable after that, or update the npm trusted publisher entry before renaming it
28
+ 4. after the first successful trusted publish, consider enabling npm's setting that requires 2FA and disallows legacy publish tokens
29
+
30
+ ## Release preflight
31
+
32
+ From the repository root:
33
+
34
+ ```bash
35
+ npm ci
36
+ npm run verify:release
37
+ npm publish --dry-run
38
+ ```
39
+
40
+ The local dry run is still valuable even though the real publish happens in GitHub Actions. It proves the packed artifact, lifecycle hooks, and publish metadata before you spend a release on a broken workflow run.
41
+
42
+ ## GitHub release paths
43
+
44
+ ### Manual dry run
45
+
46
+ Use GitHub Actions `workflow_dispatch` when you want to prove the exact publish workflow without uploading a package.
47
+
48
+ Recommended inputs:
49
+
50
+ - `dry_run=true`
51
+ - `publish_tag=auto`
52
+
53
+ `publish_tag=auto` resolves like this:
54
+
55
+ - stable versions publish to `latest`
56
+ - semver prerelease versions publish to `next`
57
+
58
+ ### Manual live publish
59
+
60
+ Use `workflow_dispatch` with:
61
+
62
+ - `dry_run=false`
63
+ - `publish_tag=auto` unless you intentionally need a different dist-tag
64
+
65
+ This is the safest path for the first trusted-publishing release because it lets you prove the workflow before tying it to a GitHub Release event.
66
+
67
+ ### Release-driven publish
68
+
69
+ After the manual path is proven, publishing a GitHub Release will trigger the same workflow and publish the package.
70
+
71
+ ## Post-publish checks
72
+
73
+ After a live publish, verify the result from a clean shell:
74
+
75
+ ```bash
76
+ npm view auditor-lambda version
77
+ npm view auditor-lambda dist-tags --json
78
+ npm audit signatures
79
+ ```
80
+
81
+ Also confirm that the npm package page shows the expected version and provenance information.
@@ -13,6 +13,13 @@ Backend provider configuration lives at:
13
13
  This file is optional.
14
14
 
15
15
  If it does not exist, the backend defaults to its built-in behavior.
16
+ On first backend run, `audit-code` now writes a repo-local default file automatically:
17
+
18
+ ```json
19
+ {
20
+ "provider": "local-subprocess"
21
+ }
22
+ ```
16
23
 
17
24
  If it exists but contains invalid values, the backend now fails loudly before starting worker runs.
18
25
  You can also check it explicitly with:
@@ -27,7 +34,9 @@ audit-code validate
27
34
  {
28
35
  "provider": "local-subprocess",
29
36
  "timeout_ms": 1800000,
30
- "ui_mode": "headless"
37
+ "ui_mode": "headless",
38
+ "agent_task_batch_size": 4,
39
+ "parallel_workers": 2
31
40
  }
32
41
  ```
33
42
 
@@ -55,6 +64,16 @@ Supported values:
55
64
 
56
65
  Use `visible` when you want stdout and stderr mirrored into the current terminal while the provider runs.
57
66
 
67
+ ### `agent_task_batch_size`
68
+
69
+ How many audit tasks to include in one provider-assisted review batch.
70
+
71
+ When this is greater than `1`, the generated worker prompt points at `current-tasks.json` / `pending-audit-tasks.json` and expects one `AuditResult` per assigned task.
72
+
73
+ ### `parallel_workers`
74
+
75
+ How many provider-assisted review batches to launch in parallel when the selected provider supports it.
76
+
58
77
  ## Auto provider mode
59
78
 
60
79
  `auto` is an explicit opt-in mode.
package/docs/usage.md CHANGED
@@ -36,10 +36,17 @@ Pass additional evidence back into the same fallback wrapper when needed:
36
36
 
37
37
  ```bash
38
38
  audit-code --results /path/to/audit_results.json
39
+ audit-code --batch-results /path/to/audit-results-dir
39
40
  audit-code --updates /path/to/runtime_validation_update.json
40
41
  audit-code --external-analyzer-results /path/to/external_analyzer_results.json
41
42
  ```
42
43
 
44
+ Inspect the resolved scope of a task id without reverse-engineering `coverage_matrix.json` manually:
45
+
46
+ ```bash
47
+ audit-code explain-task src-api-auth:security
48
+ ```
49
+
43
50
  Each wrapper run also refreshes:
44
51
 
45
52
  - `.audit-artifacts/operator-handoff.json`
@@ -70,6 +77,7 @@ Optional inputs for the same bounded step:
70
77
 
71
78
  ```bash
72
79
  node dist/index.js advance-audit --root /path/to/repo --artifacts-dir .artifacts --results /path/to/audit_results.json
80
+ node dist/index.js advance-audit --root /path/to/repo --artifacts-dir .artifacts --batch-results /path/to/audit-results-dir
73
81
  node dist/index.js advance-audit --root /path/to/repo --artifacts-dir .artifacts --updates /path/to/runtime_validation_update.json
74
82
  node dist/index.js advance-audit --root /path/to/repo --artifacts-dir .artifacts --external-analyzer-results /path/to/external_analyzer_results.json
75
83
  ```
@@ -110,6 +118,7 @@ It invokes the current bounded advance logic and reports the next backend step.
110
118
 
111
119
  ```bash
112
120
  node dist/index.js ingest-results --artifacts-dir .artifacts --results /path/to/audit_results.json
121
+ node dist/index.js ingest-results --artifacts-dir .artifacts --batch-results /path/to/audit-results-dir
113
122
  ```
114
123
 
115
124
  This updates:
@@ -119,9 +128,22 @@ This updates:
119
128
  - `runtime_validation_tasks.json`
120
129
  - `runtime_validation_report.json`
121
130
  - `audit_results.jsonl`
131
+ - `audit_tasks.json`
122
132
  - `requeue_tasks.json`
133
+ - `merged_findings.json`
134
+ - `root_cause_clusters.json`
123
135
  - `synthesis_report.json`
124
136
 
137
+ The batch form processes every `*.json` file in the target directory in lexical order.
138
+
139
+ ## Explain a task id
140
+
141
+ ```bash
142
+ node dist/index.js explain-task src-api-auth:security --artifacts-dir .artifacts
143
+ ```
144
+
145
+ This prints the resolved task payload, matching `coverage_matrix.json` entries, pending coverage by file, and any already-ingested matching findings.
146
+
125
147
  ## Update runtime validation report with real evidence
126
148
 
127
149
  Prepare a JSON file shaped like `examples/runtime_validation_update.example.json`, then run:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "auditor-lambda",
3
- "version": "0.2.5",
3
+ "version": "0.2.8",
4
4
  "private": false,
5
5
  "description": "Portable hybrid code-auditing framework for arbitrary repositories.",
6
6
  "type": "module",
@@ -39,6 +39,9 @@
39
39
  "type": "git",
40
40
  "url": "git+https://github.com/OhOkThisIsFine/auditor-lambda.git"
41
41
  },
42
+ "publishConfig": {
43
+ "access": "public"
44
+ },
42
45
  "homepage": "https://github.com/OhOkThisIsFine/auditor-lambda#readme",
43
46
  "bugs": {
44
47
  "url": "https://github.com/OhOkThisIsFine/auditor-lambda/issues"
@@ -8,7 +8,7 @@
8
8
  "unit_id",
9
9
  "pass_id",
10
10
  "lens",
11
- "reviewed_ranges",
11
+ "file_coverage",
12
12
  "findings"
13
13
  ],
14
14
  "$defs": {
@@ -22,16 +22,15 @@
22
22
  "pass_id": { "type": "string" },
23
23
  "lens": { "type": "string" },
24
24
  "agent_role": { "type": "string" },
25
- "reviewed_ranges": {
25
+ "file_coverage": {
26
26
  "type": "array",
27
27
  "minItems": 1,
28
28
  "items": {
29
29
  "type": "object",
30
- "required": ["path", "start", "end"],
30
+ "required": ["path", "total_lines"],
31
31
  "properties": {
32
32
  "path": { "type": "string" },
33
- "start": { "type": "integer" },
34
- "end": { "type": "integer" }
33
+ "total_lines": { "type": "integer", "minimum": 1 }
35
34
  },
36
35
  "additionalProperties": false
37
36
  }
@@ -54,6 +54,16 @@
54
54
  "tags": {
55
55
  "type": "array",
56
56
  "items": { "type": "string" }
57
+ },
58
+ "status": {
59
+ "type": "string",
60
+ "enum": ["pending", "complete"]
61
+ },
62
+ "completed_at": {
63
+ "type": "string"
64
+ },
65
+ "completion_reason": {
66
+ "type": "string"
57
67
  }
58
68
  },
59
69
  "additionalProperties": false
@@ -14,7 +14,7 @@
14
14
  "task_id": { "type": "string" },
15
15
  "status": {
16
16
  "type": "string",
17
- "enum": ["pending", "confirmed", "not_confirmed", "inconclusive"]
17
+ "enum": ["pending", "confirmed", "not_confirmed", "inconclusive", "not_required"]
18
18
  },
19
19
  "summary": { "type": "string" },
20
20
  "evidence": {
@@ -21,8 +21,17 @@ Bounded steps are a backend implementation detail, not the intended user experie
21
21
 
22
22
  ## Embedded Prompt Payload
23
23
 
24
- For IDE-based LLMs (Antigravity, Copilot, Cursor), you can initialize the skill natively by importing the prompt payload defined in `audit-code.prompt.md`.
25
- This provides the LLM an exact instruction set required to natively intercept the state machine blocking phases securely and assume the responsibilities of the execution "worker".
24
+ The prompt payload in `audit-code.prompt.md` remains the canonical instruction asset.
25
+
26
+ The preferred setup path is:
27
+
28
+ ```bash
29
+ audit-code install
30
+ ```
31
+
32
+ That bootstrap writes repo-local host assets for Codex, Claude Desktop, OpenCode, VS Code, and Antigravity plus shared MCP setup guidance.
33
+
34
+ Use direct prompt import only when the target host still needs it after bootstrap.
26
35
 
27
36
  ## Repo-local fallback
28
37
 
@@ -28,6 +28,7 @@ If the top-level status is `"blocked"`, it means the orchestrator needs your LLM
28
28
  To determine what task you have been assigned, use your file-reading tool to inspect:
29
29
 
30
30
  - `.audit-artifacts/dispatch/current-task.json`
31
+ - `.audit-artifacts/dispatch/current-tasks.json` when present
31
32
  - `.audit-artifacts/dispatch/current-prompt.md`
32
33
 
33
34
  ## Step 3: Audit the Code natively
@@ -39,16 +40,13 @@ To determine what task you have been assigned, use your file-reading tool to ins
39
40
  ## Step 4: Write the Findings
40
41
 
41
42
  Produce your findings array matching exactly the `AuditResult` JSON schema described in the prompt.
42
- Do not use `echo` or generic terminal shell strings for large JSON structures to avoid breaking JSON escaping. Instead, use your raw **File Edit Tool** to reliably save your results entirely to:
43
- `.audit-artifacts/worker_results_pending.json`
43
+ Do not use `echo` or generic terminal shell strings for large JSON structures to avoid breaking JSON escaping.
44
+ Instead, use your raw **File Edit Tool** to reliably save your results to the exact `audit_results_path` named in `.audit-artifacts/dispatch/current-task.json`.
45
+ If `current-tasks.json` exists, emit one `AuditResult` per assigned task in that batch.
44
46
 
45
47
  ## Step 5: Feed the Loop
46
48
 
47
- Return your results to the state machine by running the ingestion command in the terminal:
48
-
49
- ```bash
50
- audit-code --results .audit-artifacts/worker_results_pending.json
51
- ```
49
+ Return your results to the state machine by running the exact `worker_command` from `.audit-artifacts/dispatch/current-task.json`.
52
50
 
53
51
  ## Step 6: Loop or Terminate
54
52
 
@@ -59,8 +57,11 @@ Continue repeating Steps 1 through 5 as necessary. The state machine will iterat
59
57
  ## Step 7: Presentation
60
58
 
61
59
  Once the audit is officially complete, DO NOT run the orchestrator again.
62
- Instead, use your file reading tool to consume:
60
+ Instead, read the final deterministic report at:
61
+
62
+ - `audit-report.md`
63
63
 
64
- - `.audit-artifacts/synthesis_report.json`
64
+ Present the completed audit back to the user with the work blocks first, since
65
+ they are the primary remediation handoff units.
65
66
 
66
- Finally, read these synthesis findings and present them back to the user in a polished, highly readable **Markdown Summary Table** directly in the chat panel. Wait for the user to ask you to begin resolving or patching the root_cause_clusters you discovered.
67
+ Wait for the user to ask you to begin resolving one or more work blocks.
@@ -1,19 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "merged_findings.schema.json",
4
- "title": "Merged Findings",
5
- "type": "object",
6
- "required": ["findings"],
7
- "$defs": {
8
- "Finding": {
9
- "$ref": "finding.schema.json"
10
- }
11
- },
12
- "properties": {
13
- "findings": {
14
- "type": "array",
15
- "items": { "$ref": "#/$defs/Finding" }
16
- }
17
- },
18
- "additionalProperties": false
19
- }