Skip to content

docs: add CLAUDE.md as token-efficient navigation map - #84

Merged
5uck1ess merged 1 commit into
mainfrom
docs/claude-md-map
Apr 11, 2026
Merged

docs: add CLAUDE.md as token-efficient navigation map#84
5uck1ess merged 1 commit into
mainfrom
docs/claude-md-map

Conversation

@5uck1ess

Copy link
Copy Markdown
Owner

Summary

Adds a 59-line anchor-style CLAUDE.md at repo root. Purpose: eliminate the 3-5 exploration turns per session Claude currently spends rediscovering devkit layout, the engine's parallel/branch/loop semantics, file locations for hooks/runners/MCP tools, and repo conventions.

This is an AI-instruction file, not human documentation — closer in spirit to .editorconfig or .gitignore than to CONTRIBUTING.md. It does not duplicate README.md, ROADMAP.md, or CONTRIBUTING.md.

Cost / savings math

  • Cost: ~1000 tokens loaded per session (~0.5% of a 200k context, ~0.1% of a 1M context). Noise.
  • Savings on a structural session (session touching the engine, skills, workflows, or layout): ~1500-2000 tokens and 3-5 eliminated tool-call turns. Net positive.
  • Lose case (narrow one-file edit where the map isn't consulted): pays the ~1000 token load cost for zero savings. Still noise.

Over a realistic mix of devkit work the file is strongly net positive, and the lose case is small in absolute terms.

Content (verified, not speculative)

Every row in the layout table points to a file or directory I read or listed while authoring. Nothing aspirational.

  • Layout table (26 rows)skills/, workflows/, each relevant src/ subdir down to specific files, hooks/, agents/, mcpb/, bin/, resources/, .claude-plugin/plugin.json, src/Makefile, commands/ (marked legacy).
  • 5 architectural invariants — deterministic workflow execution, the parallel: [ids] skip-then-fan-out pattern (references parallelChildren in src/engine/engine.go), enforce: soft|hard gating in src/cmd/guard.go, engine-binary-vs-wrapper split, skills-vs-commands legacy status (PR refactor(plugin): migrate commands/ to skills/ #77).
  • 7 conventions pulled from existing memory — no direct push to main, no amend, no hook-skipping, conventional commit prefixes, automated version bump, changelog managed by release pipeline, claude-shared OneDrive primacy.
  • "Fixing this file" note — tells future Claude how to keep anchors from rotting.

Rot protection

Staleness is the dominant failure mode for a navigation map — a wrong anchor is worse than no anchor. pr-ready's doc-check step already targets CLAUDE.md by name (see skills/pr-ready/SKILL.md step 6), so stale entries get mechanically caught and updated on every PR. That safety net is load-bearing for this file's long-term value.

Not in this PR

  • No code changes.
  • No workflow YAML changes.
  • No other doc edits.
  • README.md, ROADMAP.md, CONTRIBUTING.md are untouched.

Test plan

  • Next structural session naturally consults CLAUDE.md and saves exploration turns (observed in practice)
  • pr-ready's doc-check correctly flags CLAUDE.md as needing updates on a future PR that changes any referenced file path
  • No CI breakage (no code touched; layout/plugin/version paths unchanged)

Anchor-style repo map — not human documentation. Purpose is to eliminate
the 3-5 exploration turns per session that Claude currently spends
rediscovering devkit layout, the engine's parallel/branch/loop semantics,
file locations for hooks/runners/MCP tools, and repo conventions.

Rough cost/savings on a structural session:
- Cost: ~1000 tokens loaded per session (~0.5% of 200k, ~0.1% of 1M)
- Savings: ~1500-2000 tokens + 3-5 tool call turns eliminated
- Lose case (narrow one-file edit): pays cost for zero savings — still noise

Content is 100% grounded in files verified during authoring — no
speculative anchors. Covers layout (26 rows), architectural invariants
(5 bullets on deterministic execution, parallel fan-out, enforce gating,
engine-vs-wrapper split, skills-vs-commands legacy), conventions pulled
from memory (no direct push, no amend, version bump auto, etc.), and a
"fixing this file" note.

Rot protection: pr-ready's doc-check already targets CLAUDE.md, so
stale entries get caught at PR time. A stale map would be worse than
no map, so this safety net is load-bearing.

Adds one file; zero code or workflow changes.
@5uck1ess
5uck1ess merged commit 0fa82b9 into main Apr 11, 2026
6 checks passed
@5uck1ess
5uck1ess deleted the docs/claude-md-map branch April 11, 2026 17:57
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