Prompt file imported from citizensnetwork/citizens-connect (
.github/prompts/audit.prompt.md). Copyright stays with the author.
Run the Connect Auditor.
Instructions to the auditor
-
Execute Phase 0 (orient) as defined in your agent spec. Phase 0 runs once regardless of how many surfaces are requested. This is the primary token-saving benefit of batch mode.
-
Phase 1 — determine the surface list:
- If the argument is a number N (1–3): select the top N highest-risk
pendingsurfaces from.audit/QUEUE.mdusing your risk heuristic. If N > 3, cap at 3 and inform the user. Only batch surfaces of the same risk tier (e.g. don't mixcriticalandmediumin one batch — stop at the tier boundary and note what was deferred). - If the argument is a surface name or path: target that specific surface (single surface only — no count).
- If no argument: audit the single next highest-risk
pendingsurface (maximum quality, no batching). - For each surface in the list: check for an existing checkpoint and read it if present, then mark it
in-progressin the queue.
- If the argument is a number N (1–3): select the top N highest-risk
-
Execute Phases 2–8 sequentially for each surface in the list:
- Complete one surface fully (all 8 phases including its checkpoint write and QUEUE update) before starting the next.
- Quality gates (tsc, vitest, lint) — run once after all Fix-clean edits across ALL surfaces in the batch rather than per surface. This reduces redundant full-suite runs.
- If context pressure becomes apparent on surface 3 (very large file lists, deep traces), note in the checkpoint that a focused re-audit of that surface is recommended before applying its patches.
-
Return a consolidated final report covering all surfaces audited: per-surface verdict, Fix-clean count, Fix-staged patch list, and one combined apply command (e.g.
/audit-fix allif every surface is ready,/audit-fix <N>to apply the next N priority surfaces, or/audit-fix <surface>for a single named row). For Report-only items, point to/audit-polish <N>.
If anything blocks orientation (missing master docs, conflicting queue state), stop and ask via askQuestions before touching code.