docs: split CLAUDE.md into per-directory guides#1846
Conversation
Add nested CLAUDE.md files that load automatically when working under each language directory, keeping the root file to cross-cutting rules. - rs/CLAUDE.md: crate map, Producer/Consumer model, poll_* plumbing, error handling, config/TOML merge, Version matching, testing. Folds in the root "Version Matching Convention" and "Rust Conventions" sections. - js/CLAUDE.md: package map, signals + Effect reactivity lifecycle, Web Components UI, bun/Biome tooling. Folds in the JS-specific Tooling bullets (TypeScript/bun, Biome, UI, JS async patterns). - py/CLAUDE.md: the moq-ffi vs moq-rs split and the moq public surface. Root CLAUDE.md gains a "Per-Directory Guides" section pointing at each nested file and now holds only universal rules. swift/kt/go are thin wrappers and defer to their READMEs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TSWQ8HdasmrvfCcR9P2QiA
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✅ Files skipped from review due to trivial changes (3)
WalkthroughThe root 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@rs/CLAUDE.md`:
- Around line 72-79: The docstring comment containing "see `CLAUDE.md`" in
relation to TOML/CLI merge guidance needs to be updated after the documentation
reorganization. Find the comment that references CLAUDE.md for TOML merge/CLI
interaction rules and update it to reference rs/CLAUDE.md instead, ensuring the
external documentation link points to the correct location of the configuration
conventions.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: b7b598ac-a70e-40a6-b94c-ead8fbf097bf
📒 Files selected for processing (4)
CLAUDE.mdjs/CLAUDE.mdpy/CLAUDE.mdrs/CLAUDE.md
The "Config flags + TOML merge" guidance moved from the root CLAUDE.md into rs/CLAUDE.md, so update the three doc comments that reference it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TSWQ8HdasmrvfCcR9P2QiA
The previous run died on an sccache "Connection reset by peer" while compiling a third-party crate, unrelated to this docs-only change. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TSWQ8HdasmrvfCcR9P2QiA
Summary
Splits the monolithic root
CLAUDE.mdinto per-directory guides that load automatically when an agent works under each language directory. The root file now holds only cross-cutting rules; language-specific detail (and a richer module map than the root previously had) lives next to the code it describes.Why nested files, not
@imports or skills: nestedCLAUDE.mdis the only mechanism that loads conditionally by location, so a Rust-only session no longer carries JS reactivity rules and vice versa.@importwould load eagerly (no savings); skills are for actions (a pre-PR self-review skill is a sensible follow-up, but that is a separate concern from this reference knowledge).New nested guides
rs/CLAUDE.md- Cargo workspace: crate map (includingkio,moq-json,moq-loc,moq-msf,moq-videothat the root tree omitted), Producer/Consumer model,poll_*plumbing, error handling, config/TOML merge, Version matching, binary setup, testing.js/CLAUDE.md- bun workspace: package map (including@moq/json,@moq/loc,@moq/msfthat the root tree omitted), the signals + Effect reactivity model and its lifecycle/cleanup rules, the Web Components UI pattern, bun/Biome tooling.py/CLAUDE.md- themoq-ffi(generated bindings) vsmoq-rs(ergonomic wrapper) split and themoqpublic surface. Kept deliberately light per the wrappers-are-thin steer.Root
CLAUDE.mdchangesrs/CLAUDE.md).js/CLAUDE.md); kept the cross-cutting ones (just, Nix, Local-first, CI).swift/,kt/,go/are thin wrappers mirrored to external repos, so they defer to their existingREADME.mds rather than getting a dedicated guide.No behavioral or public-API changes; documentation only.
AGENTS.mdis a symlink toCLAUDE.md, so it reflects the root automatically.Public API changes
None.
Test plan
#per-directory-guidesanchor exists).—is the literal one inside the "no em dashes" rule).Follow-up (not in this PR)
A
pre-submit self-reviewskill that leans on the Cross-Package Sync table and public-API/breaking-change rules. Better as a skill (invoked per action) than a memory file, and worth reviewing on its own.(Written by Claude)
🤖 Generated with Claude Code
Generated by Claude Code