A transit monorepo needs shared Claude guidance plus service-specific rules. What configuration approach fits?
Select an answer to reveal the explanation.
Short Explanation
Monorepos are apartment buildings—shared lobby rules plus floor-specific notes. You don't want engineers digging through a README or juggling slash commands every time; layer CLAUDE.md so shared and service-specific guidance both stick automatically.
Full Explanation
Transit monorepos need shared Claude standards without asking engineers to consult repository README files on demand, since READMEs are human-facing documentation and not durable Claude configuration. Maintaining a CLAUDE.md hierarchy for shared versus service-specific guidance works because root guidance can cover org-wide coding, security, and GTFS conventions while nested files add fare, planning, or vehicle-service rules without constant merge conflict in a single mega-file. Engineers inherit shared practice and still see local constraints. Referencing shared standards from repository README files on demand fails because READMEs are not machine-readable Claude configuration, and on-demand references cannot guarantee consistent layering or clean local exceptions. Managing shared defaults through user-level settings across checkouts fails because settings live outside the repository, so they aren't version-controlled, reviewable, or reliably shared by every engineer checking out the code. Loading service-specific context using manually invoked slash commands per task fails because it depends on engineers remembering to run commands each time, so guidance is inconsistently applied and not durable. Exam caveat: hierarchy requires clear precedence—teams must know whether nested files extend or override root rules, or Claude may receive conflicting instructions. Operational check: document the CLAUDE.md layering model in the monorepo README, keep shared rules at root and service rules beside services, and periodically search for duplicated contradictory directives across packages.