CCA Prep Studio
—

CCA-F study guide · Domain 3: Claude Code Configuration & Workflows (20%)

Task 3.3: Path-specific rules

A rule file in .claude/rules/ can carry a YAML frontmatter block with a paths list of glob patterns. The rule then loads only while Claude edits a file that matches, so conventions follow files by name or type wherever they sit in the tree, and unrelated sessions never pay for them.

Updated 10-26-2026 · Official guide §6, Task 3.3

Key points

  • The paths field in a rule file's YAML frontmatter holds glob patterns that decide when the rule activates.
  • Path-scoped rules load only when a matching file is being edited, cutting irrelevant context and token usage.
  • Globs such as **/*.test.tsx match files by naming pattern regardless of directory, which a directory-level CLAUDE.md cannot do.
  • A double star () matches any depth, so terraform//* covers every nested module under terraform/.
  • The frontmatter decides when the rule loads; the markdown body says what to do.
  • Directory-level CLAUDE.md is still the simplest choice when a convention truly belongs to one folder.

Common misconceptions

  • "A rules file applies everywhere like CLAUDE.md." With a paths field it applies only to matching files.
  • "A directory CLAUDE.md can reach files in other directories." It is bound to its own folder.
  • "Rules must be invoked like skills." They load automatically on a path match.

Watch for

  • Conventions for scattered files duplicated into many directory-level CLAUDE.md files.
  • A root CLAUDE.md that loads every area's conventions into every session.
  • Relying on Claude to infer which section of a big file applies instead of matching deterministically.

Practice Task 3.3

Start with the free 10-question check to see where you stand across all five domains. In CCA Prep Studio, 54 practice items cover this task, each tracked toward your mastery score.

CCA Prep Studio is an independent study product. It is not made, endorsed or sponsored by Anthropic. Claude is a trademark of Anthropic, PBC, and is used here only to name the exam and the technology it covers. Content is written in our own words and cites the official exam guide; no exam questions are reproduced. © 2026 NovaLinQs AI, LLC.