Skip to content

docs: bring CLAUDE.md back under its own budget - #141

Merged
prorochestvo merged 1 commit into
alphafrom
docs/135-compress-claude-md
Aug 23, 2026
Merged

docs: bring CLAUDE.md back under its own budget#141
prorochestvo merged 1 commit into
alphafrom
docs/135-compress-claude-md

Conversation

@prorochestvo

Copy link
Copy Markdown
Owner

CLAUDE.md was at 21142 chars against the 20k it sets for itself. Measured with wc -c,
not estimated — it was already at 20526 before the long-range forecast work, which added the
607-char tripwire that pushed it further.

Now 19330, with 670 to spare.

What moved

Relocated to beacon-storage (~1400). The three connection PRAGMAs, the busy_timeout
arithmetic, the deferred-promotion explanation and the production numbers behind it. That
skill's description already names Transaction/ReadOnlyTransaction as a load trigger and it
did not carry the depth, so this is a move rather than a delete.

What stays in CLAUDE.md is the half that fails silently — a read on the write path
serialises against every other read and never says so, which is exactly the class the file's
own routing rule reserves space for. SQLITE_BUSY, by contrast, announces itself.

What was compressed

  • The deployment paragraph (1047 chars, one run-on) — the security boundary, the
    root-owned migration, the health gate with rollback and the sudoers reasoning all stay;
    the rest is in deploy/README.md, which the paragraph already pointed at.
  • The BEACON_PROXY_URL bullet — it restated the egress rule given three sections
    above. The hardcoded Proxy: nil for Telegram and "nothing here reads HTTPS_PROXY" stay,
    both being silent if got wrong.
  • "Measure, never estimate" — the procedure belongs to the compress-claude-md skill;
    the guard it exists for does not, and stays.

What was cut

The embedded-assets bullet. //go:embed static and "static lives under
cmd/web/static/" are both visible in cmd/web/main.go, and beacon-http-api already names
that path in its load triggers. Nothing about it is silent.

Nothing was dropped

Per the rule the file states for itself: every backticked span and figure was extracted from
the old text and checked against the new set.

backticked spans before: 227    absent from the new set: 0
distinct figures before:  16    absent from the new set: 0

No security contract was touched — the auth boundary, the 404-not-403 rule and the
collection-egress default are byte-for-byte unchanged.

Refs #135

21142 chars against the 20k the file sets for itself, measured with
wc -c rather than estimated. It was already over before the long-range
forecast work, which added the tripwire that pushed it further.

The SQLite connection PRAGMAs, the busy_timeout arithmetic, the
promotion explanation and the production numbers behind it move to
beacon-storage, whose description already names
Transaction/ReadOnlyTransaction as a load trigger and which did not
carry the depth. What stays in CLAUDE.md is the part that fails
silently: a read on the write path serialises against every other read
and never says so.

Compressed rather than cut: the deployment paragraph, whose detail is in
deploy/README.md; the BEACON_PROXY_URL bullet, which restated the egress
rule given three sections above; and the measure-never-estimate
paragraph, whose procedure belongs to the compress-claude-md skill. Cut
outright: the embedded-assets bullet, both halves of which are visible
in cmd/web/main.go.

Nothing was dropped. All 227 backticked spans and all 16 figures in the
old text still appear in CLAUDE.md or in a skill.

Refs: #135

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U6jNuzK5PZrhDWBxB3t2gY
@prorochestvo
prorochestvo merged commit c5753c4 into alpha Aug 23, 2026
1 check passed
prorochestvo added a commit that referenced this pull request Aug 23, 2026
#140 was opened this morning against 16ae37c and slims CLAUDE.md by
moving depth into the three project skills. It conflicts now, and much
of what it moved has since arrived by other routes — the outlook work
carried its own skill sections, and #141 relocated the SQLite PRAGMA and
write-lock depth. What did not arrive is canon written nowhere else, so
it is taken here verbatim rather than paraphrased.

beacon-collection gains the source kind and options JSON column, the
cmd/doctor operator umbrella, and the reason the Telegram bot bypasses
the proxy in code rather than by configuration: it is the channel that
reports collection failures, so it must not share a failure mode with
what it reports on. beacon-http-api gains the HMAC key/message order,
which is the way round that is easy to invert; the --api-dsn rationale;
and the PublicError contract with the three assertions a controller
error test owes. beacon-storage gains the repository pattern, the
source-deletion cascade and deploy-time schema reconciliation. All four
descriptions are replaced by #140's, whose load triggers are strictly
wider — a skill that does not load is knowledge that is lost.

CLAUDE.md is thinned only where that depth moved, and every tripwire
stays: the inner-mux bypass, the batching, the cascade warning and the
three-assertion rule keep their sentence. 19330 to 17823.

#140's own restructuring of CLAUDE.md into Architecture / Tripwires /
Configuration is not taken. It is a larger editorial change than this,
the file is already under budget, and it should be its own decision
rather than a side effect of salvage.

Nothing was dropped: all 210 backticked spans and 15 figures in the
previous CLAUDE.md still appear in it or in a skill.

Refs: #140

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U6jNuzK5PZrhDWBxB3t2gY
@prorochestvo
prorochestvo deleted the docs/135-compress-claude-md branch August 30, 2026 16:36
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