Question 7
Domain 1A monorepo has three packages: frontend (React), backend (Node.js), and infrastructure (Terraform). Each package has its own maintainer and separate coding standards documents. The root CLAUDE.md is growing very large as all standards are consolidated. What is the most maintainable solution?
Correct answer: B
Explanation
Using @import directives keeps each package’s CLAUDE.md focused on its own standards while reusing shared guidance from separate files. This avoids a bloated root document and matches the maintainable pattern of modular documentation, where each maintainer can update only the relevant standards without duplicating content.
Why each option is right or wrong
A. Split the root CLAUDE.md into three separate files, one per package directory
Separate files alone reduce size, but do not provide reusable shared standards across packages.
B. Use @import directives in each CLAUDE.md to reference relevant standards files
The maintainable pattern is to split the standards into separate files and pull them in where needed, rather than keeping one monolithic root document. In this setup, each package can reference its own guidance via `@import` in its local `CLAUDE.md`, so the frontend, backend, and infrastructure maintainers can update only their own standards without duplicating content across the monorepo.
C. Move all standards to .claude/rules/ with glob patterns to scope each package directory individually
Rules folders and glob scoping are a different mechanism, not the maintainable `CLAUDE.md` composition pattern here.
D. Keep a single large CLAUDE.md and rely on Claude to load relevant sections
A single large file increases maintenance burden and assumes the model will always infer relevant sections correctly.