Courseiva
Claude Code →mediumMultiple Choice

CCDV-F Claude Code Practice Question

A developer wants Claude Code to remember a project-specific convention: all new database migration files must be placed in the `db/migrations` directory and named with a `YYYYMMDDHHMMSS_` prefix. The developer wants this rule applied automatically in every future Claude Code session for this repository, without having to repeat the instruction each time. What is the most appropriate way to achieve this?

⚠ Common exam trap

The trap here is assuming there is a dedicated config command for every project convention, when the supported mechanism for durable project instructions is the CLAUDE.md memory file.

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

✓

Add the convention to a CLAUDE.md file at the repository root.

Persistent, repository-scoped instructions belong in CLAUDE.md, which Claude Code reads automatically at session start. That file can be committed so every developer and every future session inherits the naming and placement rule without manual repetition. Ad-hoc pasting or non-existent config keys do not satisfy the requirement of automatic, durable application across sessions.

Answer analysis

Option-by-option breakdown

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

  • ✓

    Add the convention to a CLAUDE.md file at the repository root.

    Why this is correct

    CLAUDE.md at the repository root is automatically loaded into context at the start of every Claude Code session in that repository, making it the correct place for persistent project conventions. It requires no per-session action and is version-controlled alongside the code, so all developers and all future sessions inherit the rule consistently.

  • ✗

    Run `claude config set migration.dir db/migrations` before each session.

    Why it's wrong here

    Claude Code does not expose a `claude config set migration.dir` key for arbitrary project conventions, so this command would fail or be ignored. Configuration keys are limited to specific settings such as model or permission behavior, not free-form naming rules. Even if it existed, it would not apply the filename prefix rule described in the scenario.

  • ✗

    Create a `.claudeignore` file listing `db/migrations` to protect the directory.

    Why it's wrong here

    `.claudeignore` excludes files from being read or modified by Claude Code; it does not teach naming or placement conventions. Adding `db/migrations` there would actually prevent Claude Code from creating or editing migration files in that directory, which is the opposite of the desired behavior. This option confuses access control with instruction persistence.

  • ✗

    Paste the convention into the first message of every new session.

    Why it's wrong here

    Pasting the rule manually each session does work within that session, but it directly contradicts the requirement that the rule apply automatically without repetition. It is also error-prone because a developer who forgets to paste it will get migrations in the wrong location or with the wrong name, silently breaking the project's migration tooling.

About these practice questions

One of 257 original CCDV-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 CCDV-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 CCDV-F exam.