A monorepo has three teams: frontend (apps/web/), backend (services/), — Daily Challenge 2026-07-24 — Claude Cert Academy

A monorepo has three teams: frontend (apps/web/), backend (services/), and infra (infra/). Each team wants their own Claude Code rules without interfering with the others. What is the correct architecture?

Answer: A CLAUDE.md in each team's directory (apps/web/, services/, infra/) plus shared rules in the repo root CLAUDE.md

The correct architecture is scoped CLAUDE.md files: each team's directory contains a CLAUDE.md with their domain-specific rules, and the root CLAUDE.md contains only universal team conventions (commit format, PR requirements, etc.). This gives each team their own rules that apply precisely to their directory tree. Multiple root files (A) are not recognized — only CLAUDE.md is the standard name. Section headers in a single file (B) are not machine-interpreted scope markers. A central .claude/ directory (D) is not a recognized scoping mechanism for subdirectory rules.

Continue to Claude Cert Academy