Skip to content

docs(claude): lean CLAUDE.md index + path-scoped rules, and a standards-check skill#73

Merged
jaymeklein merged 3 commits into
mainfrom
docs/claude-rules-and-standards-check
Jul 20, 2026
Merged

docs(claude): lean CLAUDE.md index + path-scoped rules, and a standards-check skill#73
jaymeklein merged 3 commits into
mainfrom
docs/claude-rules-and-standards-check

Conversation

@jaymeklein

Copy link
Copy Markdown
Owner

What & why

CLAUDE.md had grown to ~7.4 KB of always-loaded working-agreement detail — most of it irrelevant to any given task, which bloats the model's context every session. This restructures it so the right guidance loads at the right time.

  • CLAUDE.md is now a lean, always-loaded index (~5.4 KB): the change loop, the gate, the required skills, and a table pointing at the rule files.
  • The detail moved into 11 path-scoped .claude/rules/*.md files. Each carries a paths: front-matter glob, so Claude Code loads it into context only when its code is edited, and leaves it out otherwise.
  • New /standards-check skill (.claude/skills/standards-check/) audits a change set against these rules and reports a per-standard pass/warn/fail checklist with file:line references and fixes. It reads the rules live, so it never drifts from them.
  • .gitignore hardened so .claude/{rules,skills}/ travel with the repo on any clone, while .claude/settings.local.json stays local (it was previously only excluded via a machine-global gitignore).

Rule files

code-standards, architecture, configuration, api, permissions, ingestion, mcp, database, vector-db, testing, skills. The four new subsystem docs (api, permissions, ingestion, mcp) were written from the actual code, not invented.

How it fits together

The mandate to run the skills lives in the always-loaded CLAUDE.md (§ The loop, § Required skills); the detail (when / how / order) lives in the path-scoped .claude/rules/skills.md. /standards-check reads all of .claude/rules/, so the checker is itself aware of the standards — including which skills must run.

Reviewer notes

  • No application code changedapi/, worker/, tests/ are untouched. This is docs + AI tooling only, so the ruff/mypy/pytest gate and /code-review do not apply here.
  • The rule files rely on paths: front-matter for on-demand loading; without it they would auto-load at launch and defeat the purpose — confirmed all 11 carry it, and every internal doc link resolves.
  • Commits are split docs / feat / chore for easier review.

Jayme Klein added 3 commits July 20, 2026 11:39
…/rules

CLAUDE.md becomes a lean, always-loaded index (the change loop, the gate, required skills, and a rule-file table). The detailed working agreement moves into path-scoped .claude/rules/*.md so each area loads into context only when its code is edited, keeping the always-on context small.

One rule file per area: code-standards, architecture, configuration, api, permissions, ingestion, mcp, database, vector-db, testing, and skills (the required review/verify skills).
…working agreement

The /standards-check skill maps each changed file to the rule files that govern it (via their paths: globs), reads CLAUDE.md + those rules live, and reports a per-standard pass/warn/fail checklist with file:line references and fixes. Report-first; complements /code-review (bugs) and the ruff/mypy/pytest gate (mechanical).
Ignore .claude/settings.local.json in-repo (it was only excluded via a machine-global gitignore, so a fresh clone could leak it), while CLAUDE.md and .claude/{rules,skills}/ stay committed and travel with the project.
@jaymeklein
jaymeklein merged commit 53b9767 into main Jul 20, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant