Question 1 · choose 1
Database migration files named *.migration.sql live inside each of 25 service folders in your repository. They must follow the same naming and rollback conventions, which matter only when Claude is working on those files. What is the most maintainable way to apply the conventions?
- AA reminder in the pull request template asking reviewers to check migration conventions
- BA .claude/rules/migrations.md rule file whose YAML frontmatter sets paths to "**/*.migration.sql"
- CA migrations section in the root CLAUDE.md, so that Claude always knows the conventions in every session
- DA CLAUDE.md file in each of the 25 service folders that repeats the migration conventions
Show the answer and why
AA reminder in the pull request template asking reviewers to check migration conventions
Incorrect
Review catches problems after the code is written; the conventions should guide Claude while it writes the files.
BA .claude/rules/migrations.md rule file whose YAML frontmatter sets paths to "**/*.migration.sql"
Correct
A path-scoped rule loads only when Claude works on matching files, wherever they are in the tree.
CA migrations section in the root CLAUDE.md, so that Claude always knows the conventions in every session
Incorrect
Always-loaded text spends context in every session, including the many that never touch a migration.
DA CLAUDE.md file in each of the 25 service folders that repeats the migration conventions
Incorrect
Directory-bound files have to be duplicated in every folder and loaded for unrelated work in those folders too.
For conventions that follow a file type across many directories, use a .claude/rules/ file with a paths glob. It loads only when matching files are read or edited, so it costs nothing elsewhere.
Anthropic documentation