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

Claude Code Configuration & Workflows

The root CLAUDE.md contains 250 lines of Terraform conventions. Most sessions are spent on application code, and those sessions load Terraform guidance they never use. What's the best way to keep the conventions while cutting the irrelevant context?

Show answer and explanation

Answer: A — Move them to a .claude/rules/ file with paths: ["terraform/**/*"] in its frontmatter

A .claude/rules/ file with a paths glob loads only when Claude edits matching files, so application-code sessions no longer carry the Terraform conventions, and Terraform sessions still get them automatically. (B) stops sharing them through version control. (C) depends on someone remembering to invoke the skill. (D) still loads them in every session and relies on Claude inferring which section applies.