docs: give CLAUDE.md a codebase orientation layer - #1379
Conversation
CLAUDE.md was a bare `@AGENTS.md` import, so Claude Code sessions loaded the full rule corpus with no orientation to the system those rules govern — stack, layout, and the two flows had to be rediscovered from docs/codebase-index.md every session. Keep the `@AGENTS.md` import (no policy is moved or duplicated) and add an orientation layer above it: what the product is, the instruction-file division of responsibility, the rules most easily violated by accident, stack/runtime, repository layout, the answer and ingestion flows, the verification pyramid, the conventions the gates enforce, and the repo-specific skills and subagents. AGENTS.md stays the single source of truth for rules; CLAUDE.md points at it rather than restating it, so the two cannot drift. Update the AI tooling map row in docs/agents-guide.md that described CLAUDE.md as a one-line import. Verified: prettier --check, docs:check-links, docs:check-scripts, docs:check-index all pass; every repo path and npm script referenced from CLAUDE.md resolves (it is outside the doc gates' scan set, so checked by hand). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PjFvJmVn1xb9QTtmuxcn7y
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 46 minutes Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
Comment |
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
|
@cursoragent Inspect the PR and repository state, identify the root cause of every failing CI check, unresolved review comment, merge conflict, and related defect. Apply the smallest robust fix using existing project patterns and best practices, without unrelated changes. Run Bugbot and all relevant lint, type-check, test, build, and CI-equivalent commands, fix any issues found, then resolve only the review comments that are fully addressed. Summarise the root causes, changes made, validation results, and any remaining blockers. |
|
PR #1379 is already merged and clean — nothing to fix. Inspected PR #1379 after the Root causes / defects
Changes madeNo product/doc fixes. Appended a ledger closeout row and opened draft PR #1382 so this HEAD isn’t re-reviewed. Validation
Remaining blockersNone for #1379 — it has already landed. |
|
@codex review PR |
|
@CodeRabbit review PR |
|
✅ Action performedReview finished.
|
|
Codex Review: Didn't find any major issues. What shall we delve into next? Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Babysit closeout — no action requiredInspected PR #1379 after Findings
Local validation (on
|


Summary
CLAUDE.mdwas a bare@AGENTS.mdimport, so a Claude Code session loaded the full rule corpus with no orientation to the system those rules govern. Stack, layout, and the core data flows had to be rediscovered fromdocs/codebase-index.mdevery session.@AGENTS.mdimport unchanged — no policy is moved, removed, or duplicated — and adds an orientation layer above it: what the product is, how the instruction files divide up, the rules most easily violated by accident, stack/runtime, repository layout, the answer and ingestion flows, the verification pyramid, the conventions the gates enforce, and the repo-specific skills/subagents.AGENTS.mdremains the single source of truth for rules.CLAUDE.mdpoints at it rather than restating it, and states explicitly thatAGENTS.mdwins on any disagreement, so the two cannot drift.docs/agents-guide.md— updated the one AI-tooling-map row that describedCLAUDE.mdas "a one-line@AGENTS.mdimport", which this change would otherwise leave stale.Note on the deliberate design: the maturity audit records
CLAUDE.mdas a "non-dup import" on purpose, to stop five overlapping AI systems from drifting. That intent is preserved — the new content is orientation (structure, flows, commands), which is the layerAGENTS.mddoes not carry, and the file documents its own scope boundary so it does not grow into a second policy file.CLAUDE.mdsits outside the scan set fordocs:check-links/docs:check-scripts(those coverREADME.md,AGENTS.md, anddocs/**), so every repo path and npm script it references was verified by hand — all 15 script references and all module paths resolve.Verification
npm run verify:pr-localAlso run directly during iteration:
UI verification not run: documentation-only change, no UI, routing, styling, browser, reduced-motion, or forced-colors behaviour touched.
npm run verify:releasenot run: no release or handoff-confidence claim is being made, and it is provider-backed.Retrieval/answer evals not run: no retrieval, ranking, selection, chunking, scoring, source/citation rendering, or answer-contract code is touched.
verify:pr-localindependently classified this diff as docs-only and skipped offline RAG fixture validation on that basis.Risk and rollout
docs/codebase-index.mdfor deep structure rather than duplicating it, and by stating its own scope boundary.Clinical Governance Preflight
Not applicable — this change touches no ingestion, answer generation, search/ranking, source rendering, document access, privacy, production env, or clinical output surface. Confirmed programmatically against
scripts/pr-policy.mjs:RAG impact: no retrieval behaviour change — documentation-only diff; no file under any RAG ranking surface is modified, and
pr-policyclassifiesragRanking: false.Notes
Clinical KB Database/sjrfecxgysukkwxsowpy), the stale-ref warning, the provider-confirmation boundary, and the RAG-surface flagging rule are all summarised in the new "Highest-consequence rules" section as pointers intoAGENTS.md, not as restatements that could diverge from it.🤖 Generated with Claude Code
https://claude.ai/code/session_01PjFvJmVn1xb9QTtmuxcn7y
Generated by Claude Code