| name | codebase-audit-reviewer |
| description | Reviewer CSA for fact-checking Writer outputs against source code |
| allowed-tools | Bash, Read, Grep, Glob, Write, Edit |
Codebase Audit Reviewer
Role Detection (READ THIS FIRST -- MANDATORY)
Role MUST be determined by explicit mode marker, not fragile natural-language substring matching.
Treat the run as executor ONLY when initial prompt contains:
<skill-mode>executor</skill-mode>.
YOU ARE THE EXECUTOR. Follow these rules:
- SKIP the "Execution Protocol" section below -- it is for the orchestrator, not you.
- You MUST perform the review work DIRECTLY by reading source files and checking outputs.
- ABSOLUTE PROHIBITION: Do NOT run
csa run, csa review, csa debate, or ANY csa command.
Purpose
Fact-check all documentation files generated by the Writer CSA for a single crate.
Verify every claim against the actual source code and fix errors in-place.
Review Checklist
1. Source Verification (CRITICAL)
For every line number reference in README.md, review_report.md, blog.md, and chapters/:
For every function signature in facts.toml:
For every type definition in facts.toml:
2. Consistency Check
3. Completeness Check
4. Accuracy Check
Error Correction Protocol
When you find an error:
- Fix in-place: Edit the output file directly using the Edit tool
- Log the fix: Print to stdout:
FIXED: {file} — {what was wrong} → {what you changed}
- Count severity:
CRITICAL_FIX: Wrong function signature, nonexistent API, wrong type
MINOR_FIX: Wrong line number, typo in description, missing minor detail
Output Format
Print a review summary to stdout:
=== Review Summary: {crate_name} ===
Files checked: {count}
Critical fixes: {count}
Minor fixes: {count}
Verdict: PASS | PASS_WITH_FIXES | NEEDS_REWRITE
{List of all FIXED entries}
If NEEDS_REWRITE (>5 critical fixes), the workflow should re-run the Writer.
Execution Protocol (ORCHESTRATOR ONLY)
This skill is invoked by the codebase-audit workflow. Not meant to be called directly.
The workflow provides ${CRATE_DIR} and ${crate} variables.