refine-ruleslisted
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