Flashcardsfor IT Certifications

Path-Specific Rules

Claude Certified Architect – Foundations (CCAR-F) exam practice questions · 10 flashcards

Question
How do you scope a rule to certain files?
1 / 10

Tip: Space flips the card, ← / → navigate.

Last updated: · Report an error on this page

Show all 10 Path-Specific Rules practice questions and answers
  1. How do you scope a rule to certain files?
    YAML frontmatter in a .claude/rules/ file with a paths field of glob patterns.
  2. Example path pattern for test files?
    "**/*.test.tsx".
  3. When do path-scoped rules load?
    Only when editing files matching the pattern.
  4. Why use path rules instead of directory CLAUDE.md?
    They apply to files spread across many directories (like all test files).
  5. What are the benefits of conditional loading?
    Relevant conventions only, less irrelevant context and fewer tokens.
  6. Test files are scattered across the codebase and need shared conventions. Best approach?
    A .claude/rules/ file with a paths glob matching test files.
  7. Example rule for Terraform files?
    paths: ["terraform/**/*"] with infrastructure conventions.
  8. When is a directory CLAUDE.md enough?
    When conventions apply to one directory tree.
  9. Can one rule file cover several patterns?
    Yes, list multiple globs in paths.
  10. Why not rely on Claude to infer which section applies?
    Inference is unreliable; explicit path matching is deterministic.