Courseiva

CCAR-F Claude Code Configuration and Workflows Practice Question

A developer working in a monorepo wants Claude Code to follow the team's TypeScript conventions only when editing files under the `packages/api` directory, while letting other directories use different conventions. What is the most appropriate way to configure this in Claude Code?

⚠ Common exam trap

The trap here is assuming that conventions must live in a single global configuration file, when Claude Code actually supports directory-scoped memory files that load based on where the session is working.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

Create a `CLAUDE.md` file inside `packages/api` containing the TypeScript conventions so Claude Code applies those instructions when working in that directory.

Claude Code discovers `CLAUDE.md` memory files by walking from the current directory up the tree, so a file placed inside `packages/api` is loaded exactly when the session operates there. This gives the API package its own TypeScript conventions while leaving sibling packages and the repository root untouched, matching the requirement for directory-scoped guidance.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✓

    Create a `CLAUDE.md` file inside `packages/api` containing the TypeScript conventions so Claude Code applies those instructions when working in that directory.

    Why this is correct

    Claude Code automatically reads `CLAUDE.md` files found in the current working directory and its subdirectories, so placing one inside `packages/api` scopes those conventions to that package. When the session touches files under that path, the nested memory file is loaded, giving directory-specific guidance without affecting other packages in the monorepo.

  • ✗

    Add the TypeScript conventions to the user-level `~/.claude/CLAUDE.md` file so they apply globally to every project the developer opens.

    Why it's wrong here

    The user-level memory file applies to all projects and sessions for that user, which is the opposite of scoping conventions to a single package. Using it here would impose the API team's TypeScript rules on unrelated repositories and other packages, defeating the requirement for directory-specific behavior within the monorepo.

  • ✗

    Set the `CLAUDE_CODE_MODEL` environment variable to a model fine-tuned on the API package's conventions before starting each session.

    Why it's wrong here

    `CLAUDE_CODE_MODEL` selects which model the CLI uses; it does not inject per-directory instructions or conventions. There is no mechanism where choosing a model causes it to learn a specific package's style, so this approach neither scopes the guidance to `packages/api` nor reliably changes how edits are produced.

  • ✗

    Add a `settings.json` entry with a `scope` field set to `packages/api` under the project's `.claude` directory to bind conventions to that path.

    Why it's wrong here

    Claude Code settings files control runtime behavior such as permissions, hooks, and environment variables, and they do not support a `scope` field that binds prose conventions to a subdirectory. Conventions expressed in natural language belong in memory files, so this configuration would not deliver the directory-specific guidance the developer needs.

About these practice questions

One of 271 original CCAR-F practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Anthropic exam blueprint

This CCAR-F practice question is part of Courseiva's free Anthropic certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CCAR-F exam.