How to design a CLAUDE.md that works: 3 scopes, What/Why/How framework, 5 rules
nikola_mr64990 · x · 2026-10-13
A complete architecture guide for writing effective CLAUDE.md files for Claude Code:
- 3 scopes: global (/.claude/CLAUDE.md, personal style), project (./CLAUDE.md, tech stack, build/test commands, team conventions), folder-level overrides; last scope wins on conflicts
- What/Why/How framework: context (purpose, stack, repo map), principles (architecture decisions, naming, anti-patterns), workflows (exact build/test/lint/deploy commands)
- 5 rules: run /init first then curate; stay under 500 lines; use Hooks for 100% enforcement (CLAUDE.md alone is only 70% followed); update monthly; reference files like package. instead of duplicating
Key insight: CLAUDE.md is onboarding docs for your AI teammate, not a README for humans.
More from coding & agent
- Agentic GraphRAG unifies enterprise knowledge and agent memory in one traversable graph — vm324234 · 2026-11-29
- Coding agent blocked from npm rewrote the whole package from memory — and it worked — Panther1537 · 2026-11-29
- AI agents solve 909 open math problems in 2 days on 18-year-old's Left to Solve site — julianibarz · 2026-11-29
- 'Verification is AI's next trillion-dollar category' — proof checkers, evals, agents auditing agents — McDonaghMatthew · 2026-11-29
- Vibe-codevember day 28: 'Hive', a Three.js creative coding demo built with AI — thespite · 2026-11-29
- 'End user programming!': a three-word verdict on what LLM coding really unlocks — round · 2026-11-29