Repository navigation
Conversation
Claude Code loads CLAUDE.md automatically and this repo had none, so every
session started without any of the context below. AGENTS.md's own "Future: Repo
Split" note already anticipated one.
Every item in it is traceable to something that actually went wrong, not
general advice:
- Verification bar. A route returning 200 is not evidence a feature works,
and a test that passed on first run has proven nothing — break the code,
watch it go red, restore it. Blast radius is set by the code you touch,
not by your intent; a "diagnostic" change to a hot path earns the same QA.
- The analytics batch. Results are read positionally (batchRes[11],
batchRes[15]), so adding or removing a statement silently reassigns every
later index and country names start appearing under "Browsers". Uniform
seed data hides this — each dimension needs a distinct signature and
distinct visitor counts, since panels sort by visitors and ties reorder.
- routes/public.ts renders two different pages (public dashboard and the
/embed/:siteId widget) as separate templates in one file. A script added to
the wrong one fails silently: the page renders, the button does nothing.
- D1 bills rows scanned, not queries. COGS-REPORT.md, docs/cogs-analysis.md
and cost-ceiling.md all count queries and are wrong by orders of magnitude.
Also: MIN(fn(col)) defeats the index, D1 caps at 10 GB per database, and KV
writes are the tightest budget — never trade a D1 read for a KV write.
- A green PR is not evidence anything shipped. Typecheck & Test can pass while
the deploy job fails underneath; four merges once went undeployed that way.
CI also runs `wrangler deploy` only, so it never applies D1 migrations.
- PUBLIC_BASE_URL is unset everywhere, so `wrangler dev` and the smoke suite
write real pageviews into production analytics. The smoke suite starts its
own server on 8787, so running a dev server on another port does not
protect you. Cross-referenced from AGENTS.md's dev gotchas.
The repo-split section is rewritten as done: the extraction into scobb/beam has
happened, CI deploys from here, and CLAUDE.md now exists. The one remaining
loose end is the pre-split ralph/beam branch (last commit 2026-05-25, 6eb0f4b),
which is superseded by main.
Docs only — no source or test changes. typecheck and the 116-test suite pass
unchanged.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Claude Code loads
CLAUDE.mdautomatically, and this repo had none — so every session started with none of this context. AGENTS.md's own Future: Repo Split note already called for one.Every item is traceable to something that actually went wrong, not general advice. Generic guidance ("write tests", "follow conventions") was deliberately left out: this file loads every session, so anything not repo-specific and non-obvious just crowds out the parts that matter.
batchRes[n]public.tshas two templatesMIN(fn(col))Changes
CLAUDE.md(80 lines) — verification bar, the analytics-batch hazards, D1 cost model, deploy gotchas, and thePUBLIC_BASE_URLtrapAGENTS.md— one line added to the existing Local Dev / Wrangler Dev Gotchas forPUBLIC_BASE_URL, pointing atCLAUDE.mdrather than duplicating itAGENTS.md— Future: Repo Split rewritten as Repo Split — doneOn the repo-split note
It described a split that has already happened. It claimed Beam "currently lives in
ralph-bootstrap/beam/as a subdirectory", but the remote isscobb/beam, the repo root is standalone, and CI deployed from here successfully today.Rewritten to say what is actually true, and to record the one genuine loose end: the pre-split
ralph/beambranch still exists on the remote (last commit 2026-05-25,6eb0f4b), superseded bymain. Left for a human to confirm and delete rather than assumed safe. The original plan also called forprd.jsonandprogress.txt; neither was carried over and neither has been missed.Style note
Failures are stated as facts with their consequences ("Four merges once went undeployed this way") rather than as rules. A future session that understands why generalises correctly to situations this file doesn't anticipate; one following a checklist won't.
Test plan
npm run typecheckpassesnpm run test— 116 tests, 112 pass, 0 fail, unchanged🤖 Generated with Claude Code