Skip to content
CCAR-F Prep

Domain 3 · 20% of exam · 12 of 60 items

Claude Code Configuration & Workflows practice questions

79 questions drawn from this domain’s 6 task statements, untimed and in order. Every option carries its own explanation, so a question you get right for the wrong reason still tells you something.

Worked exampleOne question, solved step by stepShow

Code Generation with Claude Code · Task 3.1

Your project CLAUDE.md says "Never edit files under migrations/applied/; create a new migration instead." In 2 of about 40 sessions last month, Claude edited an applied migration anyway, and one edit reached staging. What change would most effectively prevent this?

  1. A.Rewrite the CLAUDE.md line in capitals with MUST NOT, and add the staging incident as an example of the consequence.
  2. B.Move the instruction into a .claude/rules/ file scoped to migrations/applied/**, so it loads whenever those files are opened.
  3. C.Add a deny rule for Edit(migrations/applied/**) to the project's committed .claude/settings.json file.
  4. D.Copy the instruction into each developer's ~/.claude/CLAUDE.md as well, so it reaches Claude from two separate places.

Working it through

  1. 1. What is being asked. A way to make sure applied migrations are not edited, after an instruction has already failed.
  2. 2. The constraint that decides it. "Never", plus a real failure that reached staging. CLAUDE.md is guidance the model usually follows, and the evidence shows usually is not enough here. The requirement calls for a guarantee.
  3. 3. Predict before reading the options. Move the rule from instructions to enforcement: a permission rule or a hook that blocks the edit whatever the model decides.
  4. 4. Rule out the near-misses.
    • A — Stronger wording is still guidance. It may reduce the rate but cannot make it zero, and zero is the requirement.
    • B — A good way to scope guidance, but it is still guidance. It changes when the instruction loads, not whether it is obeyed.
    • D — Repeating a probabilistic instruction leaves it probabilistic, and user-level files can't be relied on to exist on every machine.
  5. 5. Answer: C. If the stem says never or always and a failure has consequences, look for the option that enforces, not the one that asks more firmly.

Read the Task 3.1 lesson →

Domain 3 drill

Question 1 of 79

Scenario · Claude Code for Continuous Integration

Your CI review job posts comments that ignore the team's rule against swallowing exceptions, yet reviews the tech lead runs on their laptop always flag it. The runner clones the repository fresh under a service account. The rule was agreed six weeks ago, and git log shows the project CLAUDE.md has not changed since March. What change would most effectively fix this?

Getting value out of these

Read every explanation, including on the questions you answered correctly. The exam is a judgement test: the distractors are all things a working engineer has actually tried, and the reason each one fails is the material. A right answer picked for the wrong reason will not survive a differently worded question.

When you get one wrong, the useful question is not what the right answer was but whether you reached for a workaround over a mechanism — a bigger context window instead of less context, an instruction in the prompt instead of a constraint in the orchestration layer. That pattern repeats across the whole exam, and noticing it is worth more than memorising any single item.

These are untimed on purpose. Pace is a separate skill and belongs in the timed mock exam, where 60 items in 120 minutes gives you roughly two minutes each on questions that take real reading.

Where these questions come from

Each task statement’s lesson explains the material the questions test.

  1. 3.1CLAUDE.md Hierarchy, Scoping, and Modular Organisation13 questions
  2. 3.2Custom Slash Commands and Skills13 questions
  3. 3.3Path-Specific Rules for Conditional Convention Loading13 questions
  4. 3.4Plan Mode vs Direct Execution13 questions
  5. 3.5Iterative Refinement Techniques13 questions
  6. 3.6CI/CD Integration14 questions

All 79 questions in this set

The scenarios and decisions this drill covers. Answers and explanations appear only when you work through the questions above.

Show the question list
  1. Your CI review job posts comments that ignore the team's rule against swallowing exceptions, yet reviews the tech lead runs on their laptop always flag it. The runner clones the repository fresh under a service account. The rule was agreed six weeks ago, and git log shows the project CLAUDE.md has not changed since March. What change would most effectively fix this?
  2. Your platform team maintains twelve standards files under docs/standards/, and each package's CLAUDE.md imports all twelve with @ lines "to be safe". In the mobile package, Claude now applies the server team's database retry policy to client-side network calls, and a session's memory files total about 18,000 tokens before any work starts. What change would most effectively address this?
  3. Claude follows your team's structured-logging convention in some sessions and ignores it in others, for the same developer in the same repository. Nobody has edited the convention for a month, and the sessions that ignore it show no error. Before you change any configuration, which step should you take first?
  4. Five teams edit one 900-line root CLAUDE.md. Pull requests that touch it hit merge conflicts most weeks, and nobody is sure who owns the deployment section. You want each team to own its conventions in a separate file, enforced through CODEOWNERS, without a central list that must be edited whenever a team adds a file. Which approach should you take?
  5. A developer added "Before every edit, explain your reasoning in detail and list the alternatives you rejected" to the root CLAUDE.md, because they like reviewing Claude's thinking. Three teammates now complain that sessions are slow and verbose. The developer wants to keep this behaviour in every repository they work on. What change would most effectively resolve this?
  6. Your packages/legacy-billing/ code must keep its callback style until a planned rewrite, while the rest of the repository uses async/await. Claude keeps "modernising" files there. The package's two maintainers want the rule kept beside the code they own, and it applies to no other directory. Where should the rule live?
  7. Three package teams each pasted the same 80-line error-handling standard into their own package CLAUDE.md. Over six months the copies drifted, and one still allows bare excepts, which the platform team banned in March. What change would most effectively prevent this drift?
  8. Your project CLAUDE.md ends with "Naming rules: see docs/standards/naming.md". Claude follows the rest of CLAUDE.md but ignores the naming rules, and /memory lists only CLAUDE.md as loaded. The team wants the naming rules kept in their own file. What change would most effectively fix this?
  9. Your team's CLAUDE.md is 60 lines covering naming, tests and builds, and one tech lead maintains it. An engineer proposes splitting it into ten files under .claude/rules/, each with its own owner in CODEOWNERS, "to follow best practice". Nobody reports problems with the current file. What should you recommend?
  10. Your CI review job runs on fresh runners under a service account, and must apply the same review standards developers use locally, without anyone rebuilding runner images when the standards change. Which two placements meet this? (Select two.)
  11. Your API conventions live in src/api/CLAUDE.md. In new sessions, Claude ignores them while planning an endpoint, but applies them once it has opened a file under src/api/. Developers want the conventions in force from the first message of any API work. What should you do?
  12. You have three instructions to place: the team's commit-message format, the infrastructure team's Terraform conventions for files under infra/, and one developer's preference for very short explanations. Which placement is correct?
  13. Your root CLAUDE.md grew to 400 lines, so the team moved most of it into six files pulled in with @ imports, expecting smaller sessions. /context shows memory usage unchanged, and Terraform and SQL conventions still load when developers edit React components. What change would most effectively address this?
  14. You copied your team's /review skill into ~/.claude/skills/review/ and made it much stricter. During a pairing session, you and a teammate ran /review on the same diff and got very different results, and it took an hour to work out why. You still want the stricter checks for your own work. What change would most effectively prevent this?
  15. Your /alternatives skill asks Claude to sketch five designs for a feature and argue against each before you pick one. After you choose the event-sourcing design, Claude keeps reintroducing pieces of the rejected polling design in later edits, and the session's context is half full of the discarded sketches. What change would most effectively address this?
  16. Your team's /release-notes skill needs two git tags, a start and an end. Developers often invoke it with no arguments, and Claude then guesses a range from recent tags; about one run in five covers the wrong release. The skill is otherwise reliable. What change would most effectively reduce these wrong-range runs?
  17. Your root CLAUDE.md includes a 250-line runbook for zero-downtime schema changes: generate the migration, dry-run it against a snapshot, backfill, then switch reads. Engineers run it about twice a month, usually before any migration file exists, yet it loads into every session. What change would most effectively address this?
  18. Your nightly CI job invokes a /dependency-audit skill. It reads hundreds of manifests and lockfiles, and its raw output was flooding the rest of the job's session. Last week a run also rewrote a lockfile while "tidying" it. The skill takes no parameters. Which two frontmatter settings should you add? (Select two.)
  19. A /new-endpoint command that scaffolds a route, handler, schema and test exists only in one developer's ~/.claude/commands/. The team now wants every developer to have it on clone, and it must stay identical for everyone. What should you do?
  20. Developers start sessions with /explain-codebase, which lists directories, dependency graphs and dozens of file excerpts. Afterwards about 40% of the context is used, and coding answers later in the session become noticeably vaguer. What change would most effectively address this?
  21. Your /explain-function skill uses context: fork. Developers run it, then ask follow-up questions such as "why does this branch return early?", but the main session only has a three-line summary of the explanation and cannot answer without re-reading the code. What change would most effectively fix this?
  22. Your team turned its naming and error-handling conventions into a /conventions skill, so that CLAUDE.md stays short. Code review now finds that about half of new code ignores the conventions, because developers forget to run /conventions before starting. What change would most effectively fix this?
  23. Your CI job runs claude -p "/summarise-pr", and the skill needs a pull-request number. Developers see the skill's argument-hint while typing it locally, but in CI about one run in ten summarises the wrong PR, because the number was never passed. What change would most effectively fix this?
  24. Two problems surfaced in the same repository: new teammates don't have the /scaffold-service command a senior developer built in ~/.claude/commands/, and everyone now sees a /my-standup command that another developer committed to .claude/commands/ for personal notes. Which two changes should you make? (Select two.)
  25. Your CI pipeline runs a /triage-failures skill that should only read test logs and write a triage report. Last week it ran git reset while "cleaning up" a flaky test, discarding a generated fixture another stage needed. You want the skill limited to what triage requires. What change would most effectively achieve this?
  26. Your team added a /map-dependencies skill whose frontmatter description reads "Helper skill." Developers asking "what depends on the billing module?" get answers from slow manual Grep sessions instead, and Claude never chooses the skill on its own. What change would most effectively help Claude use it when relevant?
  27. Your Storybook conventions sit in the root CLAUDE.md and load into every session, although only story files need them. Story files (*.stories.tsx) live beside their components in about forty directories across apps/web, apps/admin and packages/ui, and new component folders appear most sprints. What change would most effectively scope these conventions?
  28. Your CI review job should enforce SQL migration conventions: reversible steps and no column drops in the same release. The conventions sit in db/migrations/CLAUDE.md, and reviews apply them there. But three services keep their own migrations in services/<name>/migrations/, and reviews of those files miss every convention. What change would most effectively fix this?
  29. Your team's only universal convention is that comments and commit messages use British spelling. It sits in a five-line root CLAUDE.md. A teammate proposes moving it to .claude/rules/spelling.md with paths: ["**/*"] so the repository "uses the modern rules system". What should you recommend?
  30. You are moving Kubernetes manifest conventions into a path-scoped rule. Manifests live in deploy/, nested by environment (for example deploy/prod/eu/), and in charts/<chart>/templates/. Other YAML, including .github/workflows/ and openapi/, must not trigger the rule. Which paths value should the rule use?
  31. Your monorepo has apps/web, apps/admin, packages/ui, a payments/ service and a docs/ site. You are deciding where five convention sets belong. Which two would gain most from path-scoped .claude/rules/ files rather than a subdirectory CLAUDE.md? (Select two.)
  32. Each feature folder in your app has its own locales/ subfolder of translation JSON files, about 30 in all. Translators' conventions sit in the root CLAUDE.md and load in every session, although only those files need them, and new features add new locales/ folders every sprint. What change would most effectively scope these conventions?
  33. Your rule for JavaScript conventions uses paths: ["**/*.js"]. It now loads whenever Claude touches vendored libraries under vendor/ or generated bundles under dist/, and Claude has started "fixing" style in those files. Your own source lives under src/ and scripts/. What change would most effectively fix this?
  34. Your TypeScript team and your Go team each own testing conventions for their own test files, *.test.ts and *_test.go, spread across the monorepo. Today both sets sit in one rule file scoped to both patterns, so Go conventions load when CI reviews TypeScript tests, and both teams edit the same file. Which arrangement should you use?
  35. A rule file meant for all TypeScript source sets paths: ["src/**/*.ts"]. It applies when Claude edits utils.ts files but never when it edits React components, which are .tsx files in the same folders, and component reviews keep missing its conventions. What change would most effectively fix this?
  36. In your polyglot monorepo, SQL style conventions for migration files across several services and Python docstring rules both sit in the root CLAUDE.md, so they load even when developers work only on Go or TypeScript. Which two changes should you make? (Select two.)
  37. Two rule files both match src/api/orders.test.ts: testing.md (paths: ["**/.test.ts"]) says to mock the database, and api.md (paths: ["src/api/*/*"]) says API tests must use the real test database. Claude's API tests flip between the two approaches. What change would most effectively fix this?
  38. You created .claude/rules/terraform.md for Terraform conventions, expecting it to load only when Terraform files are involved. /memory shows it loaded in every session, including front-end work. The file starts directly with its heading and content. What change would most effectively fix this?
  39. Every package in your monorepo shares one set of testing conventions, and packages/payments adds strict rules of its own for its tests, which must not leak into other packages. Test files sit beside the source in every package. Which arrangement should you use?
  40. A config key, retryLimit, is being renamed to maxRetries across 30 files. The mapping is exact, nothing else changes, and the test suite covers every call site. A colleague insists on plan mode because the change touches more than ten files. Which approach should you take?
  41. Product wants live order-status updates in your web app. The team could use WebSockets, which need sticky sessions at the load balancer; server-sent events, which need a longer proxy timeout; or polling the existing status endpoint. Nobody has checked how the current gateway and auth middleware would cope with each. Which approach should you take with Claude Code?
  42. Your task has three phases: map how 90 handlers use the legacy auth client, design a replacement, then migrate them. In the main session the mapping phase read file after file; by the design phase the context was nearly full, and Claude had dropped a constraint you stated at the start. What change would most effectively prevent this next time?
  43. You are upgrading a GraphQL client across 60 files. Most call sites change mechanically, but some use a batching option the new version removed, and a few wrap the client in custom retry logic. You want one consistent approach applied everywhere, without approving every file separately. Which workflow should you use?
  44. You have one afternoon and five backlog items, and you want to start on the ones Claude can safely implement without a planning phase. Which two should go straight to direct execution? (Select two.)
  45. A developer is in plan mode, investigating a refactor, when a production alert points to an off-by-one error in one pagination function, with a failing test that reproduces it. They ask Claude to fix it, and Claude produces another plan instead of a fix. The developer concludes plan mode is broken. What should they do?
  46. Before estimating a deprecation, a developer needs a list of every service that calls the legacy auth client and roughly how. No design decision is needed yet, but the codebase is large and the developer will continue other work in this session afterwards. Which approach should they use?
  47. A weekly CI job upgrades a logging library across 50 files. This release renames several methods and removes one option, and last week the job edited files directly and produced three different replacements for the removed option, which reviewers rejected. What change would most effectively improve the job?
  48. You approved a plan for migrating 40 services' HTTP clients and switched to direct execution. Twelve services in, Claude finds five that wrap the client in custom retry logic the plan never covered, and it has started handling each one differently. What should you do?
  49. You must replace a legacy auth client used across a large codebase. Nobody knows where all the call sites are, and the team must choose between an adapter layer and a full rewrite before anything changes. Which two practices fit this work best? (Select two.)
  50. You are asked to rename a field in a public API response from cust_id to customer_id. The code change is one line, but the team doesn't know which internal services and partner integrations read that field. Which approach should you take?
  51. In plan mode, Claude proposes a plan for splitting a payments module: move files, update imports, adjust configuration. It says nothing about tests or how to roll back. A reviewer approves it, planning to "add tests while it runs", and midway the module is half moved with no safe way back. What should happen differently next time?
  52. You started a logging migration across 40 files in direct execution. Ten files in, you notice Claude has used three different patterns for structured fields, because the right pattern was never decided. What should you do now?
  53. You asked Claude, in two paragraphs of prose, to convert print-style log calls to structured logging. Across three runs the field names drift (userId, user_id, uid), and error objects are sometimes stringified and sometimes nested. Your written description has not changed between runs. What change would most effectively make the output consistent?
  54. You need a token-bucket rate limiter for an API gateway: bursts of up to 50 requests, a refill rate of 10 per second, correct behaviour under clock skew between nodes, and under 1 ms per check at p99. Previous attempts looked correct in review but failed in production on edge cases. Which approach should you take with Claude Code?
  55. You must add webhook handling for a payment provider you have never integrated. You know which events matter to the business, but not how the provider retries, orders or duplicates deliveries, or what should happen when your database is briefly down. Which approach should you take before implementation begins?
  56. Claude's migration script converts legacy order rows correctly, except that amounts stored with a thousands separator, such as "1,234.50", become 1.0. You have described the problem in words twice, and each fix broke a different case. What change would most effectively fix the handling?
  57. After a dependency upgrade, CI shows five unrelated failures: a date format in reports, a renamed CLI flag, a flaky test fixture, a deprecated hash call and a lint error. You sent all five in one long message; the diff touched 23 files, two fixes were wrong, and you couldn't tell which change broke what. What should you do instead?
  58. After a refactor, cache keys include a tenant prefix but invalidation events still publish keys without it, so stale data persists. Separately, a README example uses an old function name. You fixed the cache key first, then the events in a later message, and each fix broke the other. What should you do?
  59. You want Claude to convert raw SQL to your ORM consistently. A teammate assembled ten before-and-after examples, all simple single-table selects. Outputs for joins and for filters on joined tables are still inconsistent. What change would most effectively improve the conversions?
  60. Your CI auto-fix job re-prompts Claude with "Tests failed, please fix" whenever the suite fails after its change. The fixes now look random, and some attempts touch files unrelated to the failure. What change would most effectively improve the iterations?
  61. A developer has an agreed specification for a CSV export: every column, format and edge case is written down. They ask Claude to interview them first "to surface anything missed", and spend 25 minutes answering questions the spec already settles. What should they have done?
  62. Claude's data-migration script handles most rows, but rows where middle_name is null come out as the literal text "None". You have described the problem in words twice without success, and each attempt changed other rows too. What change is most likely to fix it?
  63. Claude's deduplication function passes all your functional tests, but in production it takes 40 seconds on 100,000 records, because it compares every pair. The requirement, under two seconds, was stated in the prompt but never tested. What change would most effectively keep this from recurring?
  64. Your CI job writes tests for a new module first, then has Claude implement until they pass. When a test fails, the job re-prompts "make the tests pass", and reviewers find Claude sometimes weakens an assertion instead of fixing the code. What change would most effectively address this?
  65. A developer must prototype a recommendation feature in two days to find out whether the idea works at all. Requirements are unknown and will change daily. A teammate insists on writing a full test suite first, as the team does for production code. What should you recommend?
  66. Your pipeline runs claude "Summarise the risk in this diff" < diff.txt. Locally it works, but in CI the job sits idle until the runner's timeout kills it. A teammate proposes wrapping the step in a 10-minute timeout and retrying once. What change would most effectively fix the job?
  67. Your review job asks Claude, in the prompt, to return findings as JSON with file, line and message, and a script posts each one as an inline PR comment. On about 4% of runs posting fails: line arrives as "L42" or "40-44", or the JSON is wrapped in explanatory prose. What change would most effectively fix this?
  68. Your pipeline already reviews generated code in a separate session from the one that wrote it. To "give the reviewer context", it also passes the generator's full reasoning and design notes along with the diff. Reviews still approve flawed code, often repeating the generator's own justifications. What change would most effectively improve the reviews?
  69. Each push to a pull request triggers a fresh review, and developers complained about repeated comments. A script now drops any finding whose text matches an earlier comment, but Claude rewords findings on each run, so duplicates still appear, and the script cannot tell when an earlier issue has been fixed. What change would most effectively address this?
  70. Your test-generation step proposes about 20 tests per changed module, and reviewers find that roughly half repeat scenarios already in the module's existing test file. The step currently receives the changed source file and the instruction "Do not duplicate existing tests." What change would most effectively reduce the duplicates?
  71. Tests that Claude Code generates, both locally and in the nightly CI job, compile and pass, but reviewers reject most of them: they assert on getters, snapshot entire responses, and build data by hand instead of using the fixtures in tests/fixtures/. The CI job's prompt is a single line. What change would most effectively raise the quality of the generated tests?
  72. Your CI review job builds its prompt from a script containing the team's review criteria, while developers' local reviews rely on CLAUDE.md, which holds a newer version of the same criteria. CI and local reviews now disagree on what to flag. What change would most effectively fix this?
  73. A CI job reviews several pull requests in parallel on one runner. For each, it runs claude -p for the review, then a second claude -p --continue to ask a follow-up that needs the files and tool results the review already examined. The follow-ups often answer about a different pull request. The first call uses --output-format json. What change would most effectively fix this?
  74. To save time, a teammate proposes that your pipeline's review step resume the code-generation session instead of starting a new one, "since it already understands the change". Reviews currently come from a fresh instance given the diff and criteria. What should you recommend?
  75. When a new commit lands on a pull request, your script marks every earlier review comment as resolved and posts a fresh review. Issues that were never fixed vanish from the PR, and reviewers have merged code with known problems. What change would most effectively fix this?
  76. Your team added a git pre-commit hook that runs claude "summarise this diff for the commit message". From the terminal it works, but in GUI git clients the commit hangs indefinitely, and developers have started bypassing the hook. What change would most effectively fix this?
  77. Your CI script runs claude -p --output-format json and then parses the response's result text as JSON. About 3% of runs fail to parse, because the result is prose or JSON wrapped in commentary. The script needs findings with file, line and severity. What change would most effectively fix this?
  78. Your CI job runs claude -p to fix failing tests and verify the fix by running npm test. It never prompts and never hangs, but its summary often says "I was unable to run the tests", and it then guesses whether its fix worked. What change would most effectively fix this?
  79. Developers say your CI reviewer's comments are mostly noise: formatting nits, preferences about local patterns, and style debates. The real bugs it finds get lost among them. The review criteria have never been written down anywhere the CI run can see. What change would most effectively improve the reviews?