Repository navigation
docs(repo): split root agent instructions into per-package files - #1469
ruudandriessen wants to merge 1 commit into
Conversation
The root CLAUDE.md loaded about 490 lines into every agent session, most of it about apollo-react, apollo-wind and the overall architecture. Agents working in other packages, such as apollo-vertex, got all of it. - Root AGENTS.md keeps only the repo-wide working rules and git workflow, plus a map of where package instructions live. CLAUDE.md imports it. - apollo-react styling standards move to packages/apollo-react/AGENTS.md. - The Storybook copy rule moves to apps/storybook/AGENTS.md, with a short reminder in apollo-react and apollo-wind where the stories live. - The architecture overview moves to docs/architecture.md. - The DESIGN-CONTEXT.md pointer moves to packages/apollo-vertex/AGENTS.md. Co-authored-by: Ruud Andriessen <ruud.andriessen@gmail.com>
There was a problem hiding this comment.
🟢 Approval recommended
The documentation-only reorganization preserves the intended guidance and has no identified blocking issues.
No open issues 🎉
What changed in this PR
This documentation-only PR reduces default agent context by keeping shared rules at the repository root and placing package-specific guidance beside the relevant code.
Changes:
- Consolidates root rules in
AGENTS.md, withCLAUDE.mdimporting it. - Adds local guidance and Claude imports for apollo-react, apollo-wind, and Storybook.
- Moves the architecture reference into
docs/architecture.mdand scopes the design-context pointer to Apollo Vertex.
| File | Description |
|---|---|
packages/apollo-wind/CLAUDE.md |
Imports local agent guidance. |
packages/apollo-wind/AGENTS.md |
Adds package layout, commands, and Storybook copy guidance. |
packages/apollo-vertex/AGENTS.md |
Adds the root design-context reference. |
packages/apollo-react/CLAUDE.md |
Imports local agent guidance. |
packages/apollo-react/AGENTS.md |
Houses styling rules, package layout, and commands. |
docs/architecture.md |
Holds the relocated architecture reference. |
CLAUDE.md |
Replaces the lengthy root content with an AGENTS.md import. |
apps/storybook/CLAUDE.md |
Imports local agent guidance. |
apps/storybook/AGENTS.md |
Documents app layout and Storybook copy rules. |
AGENTS.md |
Centralizes shared rules and maps package guidance. |
Review effort: Balanced
Dependency License Review
License distribution
Excluded packages
|
Storybook visual diff⏭️ Skipped: the apollo-design preview deployment did not succeed, so no comparison ran. Logs Updated (PT): Oct 26, 2026, 01:56:48 AM |
📊 Coverage + size by packagePer-package bundle size on this PR (no JS/TS source changes detected under
"Coverage" is each package's own |
Why
Claude Code and Cursor load the root
CLAUDE.mdinto every session, whichever package you work in. It is about 490 lines, mostly about apollo-react, apollo-wind, Storybook and the overall architecture. A session inpackages/apollo-vertexgot all of that on top of its ownAGENTS.md.This PR keeps only the repo-wide rules at the root. Everything else moves next to the code it's about, using the
AGENTS.mdplusCLAUDE.md(@AGENTS.md) pattern already used by the vertex folders. No rule text changes.packages/apollo-vertex: about 790 linespackages/apollo-vertex: about 370 linesWhere each section went
CLAUDE.mdAGENTS.md, unchanged, plus a map of where package instructions livepackages/apollo-react/AGENTS.md, unchangedapps/storybook/AGENTS.md, with a one-line reminder inapollo-reactandapollo-wind, where the stories livedocs/architecture.md, not loaded into agent contextDESIGN-CONTEXT.mdpackages/apollo-vertex/AGENTS.md, since the file is about Apollo VertexRoot
CLAUDE.mdis now@AGENTS.md, so Claude Code and tools that readAGENTS.md(Cursor, Codex) see the same content.Review notes
apollo-coreandapollo-ui-icons, but those packages have no.stories.tsxfiles. Stories exist only inapollo-react,apollo-windandapps/storybook, so the rule now names those.docs/architecture.md. The text is otherwise moved unchanged, apart from the self-reference toCLAUDE.mdin the structure tree and five uses of "development". The local secret scanner flagged those as matching a configured environment value, so they were reworded without changing meaning ("Contributor Workflow", "Watch mode", and so on).apollo-vertex. It is moved as-is so this PR stays a move. Updating it can be a follow-up.packages/apollo-react/AGENTS.md,packages/apollo-wind/AGENTS.mdandapps/storybook/AGENTS.mdadd a short "where things live" section and commands, taken from eachpackage.jsonand the current folder layout.If you want zero root instructions locally
Claude Code users can still drop the root file entirely with
claudeMdExcludesin.claude/settings.local.json(docs).