Skip to content

Audit a repo against its own documented conventions

Documented rules and undocumented-but-real patterns are audited by different plugins on purpose -- blurring that line double-reports the same finding.

Also usesclaude-plugins-official

Documented rules and undocumented-but-real patterns are audited by different plugins on purpose. Run the documented half first against the repo's own house rules, then hand the undocumented half to codebase-consistency to find and canonize, and only simplify once both halves have settled -- blurring that line is how the same finding gets reported twice.

Start here

One prompt to start
Extract the discrete, checkable rules this repo's own documentation states and audit the code against them first, then separately find any undocumented conventions the code has converged on and decide which variant should become canonical, get a second, adversarial judge on that canonization, and only simplify the code once both the documented and undocumented halves have actually settled.

Needsself-assess, codebase-consistency, pr-review-toolkit

Beats

Run these in order. Each prompt is copy-pasteable straight into Claude Code.

  1. self-assess:self-assess-lint-auditalso in 1 other recipe

    Extracts discrete rules from .claude/house-rules.md, falling back to CLAUDE.md, capped at lint_max_rules -- the documented half of the audit.

    Run this beat on its own
    prompt
    extract the discrete, checkable rules this repo's own documentation states, and audit the code against them
  2. self-assess:convention-auditor

    Find plus Verify over the extracted rules -- a documented rule with no verified violation is not the same claim as a followed rule.

  3. codebase-consistency:pattern-extractor

    Handles the undocumented half explicitly, refusing to force a pick when the signal between competing patterns is genuinely tied.

    Run this beat on its own
    prompt
    find any undocumented conventions this codebase has converged on inconsistently, and tell me which variant should become canonical
  4. codebase-consistency:consistency-critic

    Second judge -- catches forced consistency and a PASS verdict that was rubber-stamped rather than re-derived from the evidence.

  5. pr-review-toolkit:code-simplifier

    Runs last, on the now-aligned code only -- simplifying before the convention is settled means simplifying twice.

Worked example

Grounded in — why this beat order is trustworthy

plugins/codebase-consistency/README.md's own scope section routes documented conventions and version-deprecated idioms out of codebase-consistency and into self-assess -- beats 1-2 and 3-4 above sit on opposite sides of that line by design, and a recipe that blurs it double-reports the same finding from both plugins.

Do / Don't

  • Audit the documented half first -- extract discrete rules from the repo's own documentation and verify real violations, not just their presence.
  • Handle undocumented conventions as a separate pass, and refuse to force a canonical pick when the signal between variants is genuinely tied.
  • Get a second judge on any canonization to catch forced consistency or a rubber-stamped verdict.
  • Simplify last, only once the convention question is actually settled -- simplifying before that means simplifying twice.
  • Don't audit documented and undocumented conventions with the same pass -- they're handled by different plugins on purpose, and blurring the line double-reports the same finding.
  • Don't force a canonical pick when two variants are genuinely tied on frequency, maturity, and recency.
  • Don't simplify the code before the convention question is settled -- that means doing the simplification twice.