A civic monorepo's test conventions cut across many packages. Why choose path-specific rules over many subdirectory CLAUDE.md files?
Select an answer to reveal the explanation.
Short Explanation
Cross-cutting test rules are like citywide snow-route signs—one pattern, many streets. Path-specific rules beat photocopying the same CLAUDE.md into every subdirectory.
Full Explanation
In a civic monorepo, test conventions often cut across many packages. Path-specific rules fit those cross-cutting conventions without scattering duplicate CLAUDE.md files into every subdirectory. One rules file with a test-path glob expresses the shared pattern once and applies wherever matching tests are edited.
That approach works because cross-cutting concerns—test naming, coverage expectations, fixture layout—are not owned by a single package directory. Duplicating the same CLAUDE.md into dozens of package folders creates drift, merge noise, and inconsistent updates when the parks or permits team revises testing policy. Path-specific rules keep one source of truth for monorepo-wide test guidance.
Subdirectory CLAUDE.md files do not automatically merge into a single binary asset; that distractor invents a nonexistent merge behavior. Path rules do not disable testing so CI never needs conventions; they supply conventions when test files are in focus. It is false that only user-level CLAUDE.md can express test naming patterns—project rules and CLAUDE.md both can, and user-only placement would hide standards from teammates.
Exam caveat: choose path-specific rules for cross-cutting, multi-package patterns; use subdirectory CLAUDE.md when guidance is truly local to one package tree. Operational check: change a monorepo test convention in one rules file and verify it applies across packages without updating many CLAUDE.md copies.