| name | batch-api-audit |
| description | Read-only audit of a Batch API PR or PR stack against the batch layer boundary rules, streaming/memory invariants, error-handling contracts, and stack scoping. Produces a checklist report with file:line evidence for every gap. Run before requesting review on any batch PR. Sub-skill of batch-api-development. |
| user-invocable | true |
Batch API Audit
Read-only audit of batch code. It never edits code — the output is a
report; fixes land per
stacked-prs §Handling review feedback
(lowest owning PR first, then gh stack rebase + gh stack push).
Inputs
- The PR or stack under audit. Get each layer's real base from
gh pr view --json baseRefName (or
gh api repos/{owner}/{repo}/stacks), and the owned-file matrix
from the feature manifest
- The relevant READMEs, which are the source of truth for boundaries:
packages/batch/README.md, services/batch-api/README.md,
services/cfw-batch-api/README.md (if present)
Output
A Markdown report (uncommitted, e.g. /tmp/batch-audit-<pr>.md) with one
row per checklist item: PASS / FAIL / N-A, plus file:line evidence for
every FAIL. Attach conclusions (not open questions) to the PR description
or review comment.
Checklist
A. Layer boundaries
B. Error handling and results
C. Streaming / memory invariants
D. Shared helpers (no hand-rolling)
E. Status, billing, and sweep semantics
F. BYOK semantics
G. Provider files functionality
H. Skin contract correctness
I. Provider registration (new-provider PRs only)
J. Provider semantics (new-provider PRs only)
Registration can be complete while the adapter is semantically wrong.
Audit against the committed research note
(docs/batch-research/<provider>.md) as the contract:
K. Stack scoping (per layer)
L. Fixtures and tests presence
Related skills