plugins/beaver/skills/beaver-audit/SKILL.md
Audit the decomposition of a size/L Beaver issue into sub-tasks. Checks coverage, atomicity (200 LOC limit), and test definitions. Trigger when the user wants to review task decomposition quality.
npx skillsauth add primatrix/skills beaver-auditInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Audit the decomposition quality of a size/L parent Issue's sub-tasks. Checks three dimensions: coverage, atomicity, and test definitions.
References beaver-engine for: guardrails (Section 3), label ops (Section 4), transition execution (Section 6).
gh auth status must succeedsize/L with sub-issuesgh api repos/{owner}/{repo}/issues/{number} \
--jq '{title, body, labels: [.labels[].name], milestone: (.milestone.title // null)}'
Verify it has size/L label. If not, inform the user this skill is for size/L issues only.
gh api repos/{owner}/{repo}/issues/{number}/sub_issues \
-H "X-GitHub-Api-Version: 2026-03-10" \
--jq '.[] | {number, title, body, labels: [.labels[].name]}'
If no sub-issues found, inform user and exit.
For each sub-issue, evaluate:
Compare the parent Issue's Objective and Acceptance Criteria against the combined scope of all sub-issues. Identify:
For each sub-issue, estimate whether the implementation can fit within 200 lines of core code (excluding tests, docs, generated files). Flag sub-issues that appear too large.
Criteria for "too large":
Check each sub-issue's body for a testing section. Look for:
Present as a table:
## Beaver Audit Report: #{parent_number} {parent_title}
### Coverage Analysis
- Covered: {list of covered requirements}
- Gaps: {list of uncovered requirements, or "None"}
### Sub-task Details
| # | Title | Atomicity | Test Def | Issues |
|---|-------|-----------|----------|--------|
| {n} | {title} | pass/warn | pass/fail | {details} |
### Summary
- Total sub-tasks: {count}
- Passing all checks: {count}
- Needing attention: {count}
For each sub-issue with missing test definition:
gh api repos/{owner}/{repo}/issues/{sub_number}/labels --method POST -f "labels[]=beaver/missing-test"
For each sub-issue flagged as too large:
gh api repos/{owner}/{repo}/issues/{sub_number}/labels --method POST -f "labels[]=beaver/needs-split"
If coverage gaps found, add to parent:
gh api repos/{owner}/{repo}/issues/{number}/labels --method POST -f "labels[]=beaver/missing-context"
Write the generated report to a temporary file first, then post it:
AUDIT_REPORT_FILE=$(mktemp)
cat > "$AUDIT_REPORT_FILE" << 'BEAVEREOF'
{rendered_audit_report}
BEAVEREOF
gh api repos/{owner}/{repo}/issues/{number}/comments --method POST \
--raw-field body=@"$AUDIT_REPORT_FILE"
rm "$AUDIT_REPORT_FILE"
If ALL checks pass (no gaps, all atomic, all have test defs):
status/ready-to-develop?"If ANY check fails:
size/L issues with sub-issuesdevelopment
Use when analyzing TPU pretraining HBM occupancy from a profile directory — locates the static HBM peak (the same number TensorBoard's Memory Viewer shows), enumerates every buffer alive at the peak schedule moment with size / HLO instruction / opcode / op_name, and rolls the alive set up by opcode and op_name. Reads compile-time `*.hlo_proto.pb` (BufferAssignmentProto) as the primary source; runtime `*.xplane.pb` allocator events are a secondary, often-truncated signal.
testing
Use when analyzing TPU pretraining compute efficiency from xplane.pb — produces source-line-aggregated HLO duration tables, layer-scoped breakdowns, non-compute (padding/cast/copy) audits, and v7x roofline shortfall vs theoretical peak. Reads schema documented by profile-anatomy.
tools
--- name: comm-analysis description: Use when analyzing communication on a TPU pretraining profile — extracts every comm primitive (async + sync, TC + SparseCore), attributes axes via HLO replica_groups, computes per-row NCCL bus BW vs per-axis peak ICI BW (peak_link × k_torus_dims × directions_per_dim; TPUv7x: 200 GB/s bidir per link on a 3D torus; util% requires `--mesh-spec` with topology), and reports per-step compute/comm overlap. Builds on profile-anatomy. --- # Communication Analysis **
documentation
Use when reading TPU pretraining profiles (xplane.pb, trace.json.gz) — describes the on-disk layout, the XSpace/XPlane/XLine/XEvent/XStat hierarchy, and provides reference scripts that future tpu-perf skills can read as schema documentation.