CCAR-F practice › Claude Code Configuration & Workflows · Question 55 of 105

Claude Code Configuration & Workflows

Each of a platform's 14 services keeps its SQL migrations in its own db/migrations/ directory, for example services/billing/db/migrations/. You want migration conventions to apply automatically to every one of them. Which configuration is most appropriate?

Show answer and explanation

Answer: D — A rule file in .claude/rules/ with paths: ["**/db/migrations/*.sql"]

The leading **/ matches db/migrations/ at any depth, so one rule file covers all 14 services. (A) is anchored at the repository root, where no db/migrations/ directory exists. (B) covers only the billing service. (C) works but creates 14 copies to keep in sync, which is what path-scoped rules avoid.