← ClaudeAtlas

refine-ruleslisted

Compact and verify .claude/rules/*.md documentation against the real codebase — strips changelog/history/narration, verifies every checkable claim against current code instead of trusting prior wording, and rewrites every rule file into one uniform format. Use when the user asks to "clean up rules", "compact/refine .claude/rules", "audit our rule docs", says rule files are stale, bloated, or inconsistent, or after many sessions/agents have accreted conflicting or narrative content into .claude/rules/.
broneq/bdk · ★ 0 · Code & Development · score 78
Install: claude install-skill broneq/bdk
# Refine Rules > Relies on BDK foundation (STARTUP_INSTRUCTIONS.md). Assumes environment discovery has already run (language, test runner, build tool are known). Rewrite `.claude/rules/` (or the directory at `$ARGUMENTS`) into rule files that describe only the current, verified state of the code — no history, no changelog, no guesses — in one uniform voice across every file. The core problem this solves: rule files in a long-lived project were written by whichever agent or engineer was in the seat on a given day, across many sessions, often under time pressure. Wording accumulates — some of it stays true, some goes stale the moment the code it described changed, and some was never verified in the first place. Treat every existing sentence as an **unverified claim**, not a fact. Prior wording earns no trust just by being there; it earns trust by matching the code you actually read. ## Workflow ### 1. Discover Rule Files Run the discovery script instead of hand-parsing with Read/Glob: ``` python3 ${CLAUDE_SKILL_DIR}/scripts/list_rule_files.py $ARGUMENTS ``` Defaults to `.claude/rules` when no argument is given. Returns, per file: `frontmatter_paths` (the `paths:` glob list, if any), `headings`, `line_count`, `char_count`. Skip any file whose frontmatter or header explicitly marks it as auto-generated — treat those like `CHANGELOG.md`, never rewrite them. ### 2. Classify Content: Rule vs. Noise Read `references/uniform-rule-format.md`, specifically the "What is a rule