Skip to content

docs: add CLAUDE.md pointer, tighten AGENTS.md, add coding conventions#596

Merged
andiwand merged 2 commits into
mainfrom
docs/claude-md-conventions
Jul 5, 2026
Merged

docs: add CLAUDE.md pointer, tighten AGENTS.md, add coding conventions#596
andiwand merged 2 commits into
mainfrom
docs/claude-md-conventions

Conversation

@andiwand

@andiwand andiwand commented Jul 5, 2026

Copy link
Copy Markdown
Member

🤖 Generated with Claude Code

Why

AGENTS.md was effectively ignored by Claude Code because the harness
auto-loads CLAUDE.md, not AGENTS.md — so agents started every session
blind to the repo's conventions.

What

  • New CLAUDE.md — auto-loaded each session; insists AGENTS.md is read
    first and points at the per-module AGENTS.md files.
  • Compressed AGENTS.md (~182 → ~150 lines): trimmed redundant prose,
    kept the architecture/directory maps, build loop, and pointers.
  • Three new conventions in AGENTS.md:
    • always prefer fixed-width integer types (std::int32_t over int)
    • prefer std::ranges algorithms / range overloads over iterator pairs
    • bind free-function definitions to their namespace via the qualified
      out-of-line form, so a signature drifting from the header fails at
      compile time rather than as an obscure linker error; keep TU-local
      helpers in an anonymous namespace

Docs only — no code or build changes.

andiwand and others added 2 commits July 5, 2026 16:15
Add a CLAUDE.md that Claude Code auto-loads every session and points to
AGENTS.md as the required-first read (AGENTS.md was not being auto-loaded).

Compress AGENTS.md (~182 → ~150 lines) by trimming redundant prose while
keeping the architecture map, directory map, build loop, and per-module
pointers.

Add three conventions:
- always prefer fixed-width integer types (std::int32_t over int)
- prefer std::ranges algorithms / range overloads over iterator pairs
- bind free-function definitions to their namespace (qualified out-of-line
  definition) so signature drift fails at compile time, not link time;
  keep TU-local helpers in an anonymous namespace

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PvSNQg6fxTXkmLj3g3RrY2
The per-module AGENTS.md files enter context whenever an agent works in
that module (the PDF one alone was ~14K tokens). They had grown to narrate
feature-by-feature what the code already says, plus per-test prose and
duplicated pipeline walkthroughs.

Cut the code-derivable narration; keep the parts the code can't tell you:
design rationale, non-obvious invariants, spec-record maps / ASCII structure
diagrams, module-layout tables, and open-work/roadmap design plans.

Net ~1875 -> ~1094 lines (119.6KB -> 63.9KB). Largest cut is pdf/AGENTS.md
(731 -> 312). All cross-links verified.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NMkMNjHrXJszdWuYAbZnHu
@andiwand andiwand merged commit 23fd8d0 into main Jul 5, 2026
9 checks passed
@andiwand andiwand deleted the docs/claude-md-conventions branch July 5, 2026 14:55
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