In the Beacon Platform monorepo the file apps/web/api/routes.ts is matched by two rule files at once: one scoped to apps/web/** carrying front-end component conventions, and one scoped to a pattern spanning any api directory carrying request-validation conventions. An engineer expects the narrower of the two to win. What happens when Claude edits that file?
- AThe rule with the longer literal prefix takes effect on its own, because path scoping resolves overlaps by specificity in the way a routing table picks a single winning route.
- BBoth patterns match the path, so both sets of conventions are loaded together and Claude works from their union unless the text of a rule narrows its own applicability. Correct
- CNeither rule takes effect, because two overlapping patterns make activation ambiguous and Claude falls back to the conventions held in the root CLAUDE.md for that edit.
- DThe rule file declared later replaces the earlier one for any path they share, so the request-validation conventions are the only guidance in context for that edit.
Why A is wrong: Tempting because specificity ordering is the norm in routers and in stylesheets, but rule files are not competing candidates for one slot and are not narrowed to a single winner.
Why B is correct: Correct: activation is evaluated independently per rule file, so a file sitting in the intersection of two globs picks up both bodies of guidance.
Why C is wrong: Plausible if you assume overlap is treated as a configuration error, but an overlap is a normal outcome of independent globs and does not disable either file.
Why D is wrong: Tempting because later-wins is a common override rule in layered configuration, but declaration order does not evict a rule whose pattern still matches the path.