Q9 · Domain 3 · Claude Code Configuration & Workflows
SQL migration conventions should apply to db/migrations/**/*.sql and services/*/migrations/*.sql and nowhere else. The root CLAUDE.md is already long. What keeps these conventions out of unrelated sessions?
- A. Move the conventions into migrations.md and pull it into CLAUDE.md with an @migrations.md import.
- B. Create .claude/rules/migrations.md with a paths: list in its frontmatter holding both globs.
- C. Put a copy of the conventions in a CLAUDE.md file inside every migrations folder in the repo.
- D. Move the conventions out of the project and into your personal ~/.claude/CLAUDE.md file.
Answer and explanation
Answer: B. A rule with paths: frontmatter loads when Claude reads, writes or edits a matching file. Imported files load together with the CLAUDE.md that imports them, so an import tidies the file but saves no context. Per-folder copies duplicate the rule and drift. The personal file loads in every project and isn't shared with the team.
- A. An imported file loads together with the CLAUDE.md that imports it. The file gets tidier but no context is saved.
- B. Right. A rule with paths: frontmatter loads when Claude reads, writes or edits a matching file, and both globs fit in one list.
- C. Per-folder copies duplicate the rule, and copies drift apart.
- D. The personal file loads in every project and isn't shared with the team.