docs: split CLAUDE.md into per-directory guidance #14
Reference in New Issue
Block a user
Delete Branch "docs/split-claude-md"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Split monolithic CLAUDE.md into root + backend/CLAUDE.md + userscript/CLAUDE.md, add .opencode/agent configs.
All Go files lived flat in backend/ as one package main. Move store, latest-chapter polling, sessions, HTTP middleware, the JSON API, the userscript handler, and the web UI (with its templates/static assets) into backend/internal/{store,latest,session,httpmw,api,userscript,web}, each with an exported API. main.go becomes the composition root wiring them into newRouter; root-level tests cover the assembled router while package-local tests cover unit behavior. Update Dockerfile/.dockerignore for the new internal/ tree and CLAUDE.md to describe the layout. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>Extend the test harness's document stub with a querySelectorAll("img[alt]") fake (module-level pageImages fixture, mirroring metaTags), then assert on p.cover for a matching alt and for no match. Previously the guard in coverFromPage() always short-circuited under test since querySelectorAll didn't exist on the stub, so the alt-matching loop had zero coverage.