Make CLAUDE.md a short router, and move each topic's rules to a file under rules/ that loads when a session touches a matching file #242

Merged
lilleman merged 16 commits from claude-md-router into main 2026-10-13 00:56:29 +02:00
Owner

Item 95. CLAUDE.md keeps the rules no file path can scope. The rules for comments, the decision log, READMEs and todo.md items move to rules/*.md, which Claude Code loads when a session reads or writes a file their paths: frontmatter matches. loop-claude's judge reads them beside CLAUDE.md, and the reviewers and larv-review cite them. The design and its premise: docs/decisions.md → rules/: ….

Instructions loaded, counted as sentences (bullets and paragraphs split at sentence ends; headings, tables and frontmatter skipped):

Session Loads Sentences Words
Any session on main CLAUDE.md 254 4,204
Opens no file, such as a chat answer CLAUDE.md 181 2,597
Reads only code + comments.md 220 3,303
loop-claude worker, or the judge + all four rule files 263 4,246

A worker's topic rules now arrive with the file they govern, later in context; whether that raises adherence is unmeasured. Item 103 asks whether the saving must reach workers too.

Also sorts the imports in bin/rule_hook/override_log.py, which failed the suite on main (item 100), and files items 101 and 102 from the principles audit.

Item 95. `CLAUDE.md` keeps the rules no file path can scope. The rules for comments, the decision log, READMEs and `todo.md` items move to `rules/*.md`, which Claude Code loads when a session reads or writes a file their `paths:` frontmatter matches. loop-claude's judge reads them beside `CLAUDE.md`, and the reviewers and larv-review cite them. The design and its premise: `docs/decisions.md` → `rules/: …`. Instructions loaded, counted as sentences (bullets and paragraphs split at sentence ends; headings, tables and frontmatter skipped): | Session | Loads | Sentences | Words | |---|---|---|---| | Any session on `main` | `CLAUDE.md` | 254 | 4,204 | | Opens no file, such as a chat answer | `CLAUDE.md` | 181 | 2,597 | | Reads only code | + `comments.md` | 220 | 3,303 | | loop-claude worker, or the judge | + all four rule files | 263 | 4,246 | A worker's topic rules now arrive with the file they govern, later in context; whether that raises adherence is unmeasured. Item 103 asks whether the saving must reach workers too. Also sorts the imports in `bin/rule_hook/override_log.py`, which failed the suite on `main` (item 100), and files items 101 and 102 from the principles audit.
lilleman added 1 commit 2026-10-13 00:24:28 +02:00
lilleman added 4 commits 2026-10-13 00:32:01 +02:00
lilleman added 2 commits 2026-10-13 00:33:55 +02:00
lilleman added 2 commits 2026-10-13 00:38:50 +02:00
lilleman added 2 commits 2026-10-13 00:46:14 +02:00
lilleman added 2 commits 2026-10-13 00:49:25 +02:00
lilleman added 2 commits 2026-10-13 00:53:27 +02:00
lilleman added 1 commit 2026-10-13 00:56:21 +02:00
lilleman marked the pull request as ready for review 2026-10-13 00:56:24 +02:00
lilleman merged commit 2feda33ec6 into main 2026-10-13 00:56:29 +02:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: lilleman/claude-config#242