Skip to content

docs: slim CLAUDE.md under the 40k char prompt budget#337

Merged
dep0we merged 3 commits into
mainfrom
docs/slim-claude-md
Jun 5, 2026
Merged

docs: slim CLAUDE.md under the 40k char prompt budget#337
dep0we merged 3 commits into
mainfrom
docs/slim-claude-md

Conversation

@dep0we
Copy link
Copy Markdown
Owner

@dep0we dep0we commented Jun 5, 2026

Summary

CLAUDE.md had grown to 88,265 chars — over Claude Code's 40k-char prompt budget. Slimmed to 29,887 chars (66% smaller) by extracting per-protocol detail into a new docs/protocols-shipped.md.

  • CLAUDE.md keeps the design ethos: principles, architecture, methodology, conventions, "When in doubt" — all preserved verbatim.
  • docs/protocols-shipped.md (new, 43k chars) owns the full per-protocol summary for all twelve shipped backends — reference impls, capabilities, operator overrides, doctor checks, Implementer Contracts, and the cliff each closes.
  • Compact Status table in CLAUDE.md lists 12 backends in 16 lines instead of 12 multi-paragraph bullets, with a one-line pointer to the new doc.

Matches rule 6 (progressive disclosure — the prompt carries metadata; content lazy-loads).

What survived

  • All design principles (rules 1-14) — verbatim
  • Aesthetic / Conventions / Working methods / Where things live — verbatim, plus one new row for the protocols doc
  • Status section — replaced the bullet-per-backend block with a compact 12-row table; preamble + closing tagline intact

What got fixed inline

While editing the "Where things live" table, the adjacent line claimed "36 docs today, 32 locked + 3 drafts." Verified — actual is 35 docs (spec/23 was never assigned). 32 locked + 3 drafts = 35 ✓. One-line correction. Rest of the line was already accurate.

What was filed out-of-band (scope discipline)

Review trail

  • Pre-landing review (Sonnet): cleared factual fidelity across all 12 backends, cross-link integrity, status table issue/PR numbers, CHANGELOG honesty (88,265 → 29,887 confirmed), preservation of principles/methodology/conventions sections, no orphan "see below" references. Surfaced two P2 stale claims — one fixed inline, one filed as docs: refresh CLAUDE.md methodology track-record line (v0.13.0 → v1.0.0) #336.
  • Adversarial review (Opus): independently verified the inline spec-count fix arithmetic (35 docs, 32 locked + 3 drafts = 35 ✓), confirmed closing tagline preserved verbatim (CLAUDE.md:364), confirmed no backend-detail residue snuck back in (19 "PR 4"/"PR 5" mentions are all legitimate). Final verdict: CLEAR.

Test plan

  • uv run pytest --collect-only -q | tail -1 → 3,326 tests collected cleanly. Full suite NOT re-run: this is a markdown-only diff, no test loads or parses the changed files (verified via grep -rn "CLAUDE.md\|CHANGELOG.md\|protocols-shipped" tests/). Honest accounting per [feedback_ship_end_to_end_no_shortcuts]: structural sanity check substituted for full re-run on a docs-only diff.
  • wc -c CLAUDE.md → 29,887 chars (under 40k budget)
  • Cross-link check: docs/protocols-shipped.md exists and the in-CLAUDE.md pointer resolves
  • Adversarial round 1 (Opus): CLEAR

File-by-file

File Change
CLAUDE.md -14 lines / +19 lines net; 88,265 → 29,887 chars
docs/protocols-shipped.md +309 lines (new file)
CHANGELOG.md +1 bullet under [Unreleased] → Documentation

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.7 noreply@anthropic.com

Dan Powers and others added 3 commits June 5, 2026 13:45
New 43k reference doc owns the full per-protocol summary for all twelve
shipped backends (reference impls, capabilities, operator overrides, doctor
checks, Implementer Contracts, and the cliff each closes). Will be linked
from CLAUDE.md in the follow-up commit so the session prompt can clear the
40k-char budget.
Replaces (a) the wall-of-text "What this is" paragraph and (b) the
bullet-per-backend Status block with a one-line pointer to
docs/protocols-shipped.md and a compact 12-row Status table. Adds a
"Where things live" row for the new reference doc. Also corrects an
inline-adjacent stale claim: spec count is 35 docs today, not 36
(spec/23 was never assigned).

CLAUDE.md goes from 88,265 → 29,887 chars (66% smaller, well under
the 40k char Claude Code prompt budget). Principles, methodology,
conventions, and "When in doubt" sections are preserved verbatim.

Matches rule 6 (progressive disclosure — the prompt carries metadata;
content lazy-loads). Future stale-claim drift on the spec-count line
is tracked at #336.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@dep0we dep0we merged commit 4334d7b into main Jun 5, 2026
5 checks passed
@dep0we dep0we deleted the docs/slim-claude-md branch June 5, 2026 18:52
dep0we added a commit that referenced this pull request Jun 5, 2026
…336) (#338)

The "Working methods" section claimed "4 published tags through v0.13.0,
~55 merged PRs, ~2.4k tests" — drifted out of sync with reality after the
v1.0.0 release. Current counts verified empirically:

  git tag --list | grep ^v       → 7 tags (v0.1, v0.9, v0.10-13, v1.0)
  gh pr list --state merged       → 159 merged
  uv run pytest --collect-only    → 3,326 tests

Refreshed parenthetical to "7 published tags through v1.0.0, ~160 merged
PRs, ~3.3k tests". The "no production rollback events" claim is preserved
verbatim. Surfaced by the /ship pre-landing review on PR #337 (docs slim)
and filed as #336 to keep that PR's scope narrow.

Co-authored-by: Dan Powers <dep0we@gmail.com>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
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