Audit Prompt
# Prompt doc — the four-phase audit prompt
**Source:** Chapter 4 / Appendix A1 · **File:** [`prompts/audit-prompt.md`](../../prompts/audit-prompt.md)
· **Catalog doc:** [audit](../audit.md)
## What it is
A single analysis-only prompt that points Fable at a repo and gets back a ranked,
evidence-backed backlog, with each fix pre-routed to the cheapest seat that can execute
it. No `--audit` flag exists; the structure is the power.
## Full prompt text (verbatim)
The complete prompt — the four phases, the config-audit variant, the blindspot variant,
and the monorepo Budget block — lives verbatim in
[`prompts/audit-prompt.md`](../../prompts/audit-prompt.md). The four-phase core:
1. **Phase 1 — Discovery:** entry points, data flow, external boundaries, untrusted input.
2. **Phase 2 — Audit:** each finding → WHAT · WHERE (file:line) · WHY · SEVERITY (P0–P3).
3. **Phase 3 — Improvement strategy:** group into themes; fix shape in two sentences.
4. **Phase 4 — Task plan:** each task → size (S/M/L/XL) · milestone (M0–M3) · **OWNER MODEL**.
## Expected output schema
Markdown with four labeled phases. Phase 2 is a list of findings each carrying a
`- SEVERITY: P0|P1|P2|P3` line; Phase 4 is a table `| Task | Size | Milestone | Owner model |`
where Owner model is one of Haiku / Sonnet / Opus / Fable. Worked output:
[`examples/audit.sample.md`](../../examples/audit.sample.md).
## How deterministic code consumes it
- `tools/make_figures.py` (`fig_audit`) parses the Phase-2 `SEVERITY` lines and the
Phase-4 Owner-model column to compute the findings-by-severity figure.
- The Phase-4 owner-model column *is* the input to `plan.template.md` — the plan's
per-step Owner model comes straight from here.
## Offline behavior
The prompt itself is 🔑 (needs a paid Claude account to run). The repo ships a captured
`audit.sample.md` so every downstream consumer — the figure, the plan — runs offline.
## Cost notes
Input-heavy, output-light. `estimate.cost("fable-5", 120_000, 8_000)` → **$1.60** for a
demo-repo audit; batch it and the estimator halves it to $0.80. Calibration figure
(external, attributed): Huryn's ~$4.40/catch on Fable vs $17.55 on Opus.when to use it
Community prompt sourced from the open-source GitHub repo regardo911/split-stack (MIT). A "Audit Prompt" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.
tags
roleplaycommunitygeneral
source
regardo911/split-stack · MIT