AnthropicClaude Code Configuration and Workflows

Hooks & Guardrails — CCAR-F Practice Question

A representative Claude Certified Architect - Foundations (CCAR-F) exam question on Hooks & Guardrails. Work through it below, then read why each option is right or wrong.

This question is part of the free Claude Certified Architect - Foundations practice test.

Short answer

The correct answer is A. A deterministic pre-action hook or permission rule that rejects writes to the protected path.

A deterministic pre-action control enforces the protected-path invariant before mutation. Written guidance alone is advisory.

The Question

A team must prevent Claude Code from modifying generated migration files under any circumstances. What is the strongest control?

AA deterministic pre-action hook or permission rule that rejects writes to the protected pathCorrect
BA few examples in the prompt that show safe edits to files outside the protected path
CA reminder message posted after each commit that lists the protected path for reviewers
DA code comment above the protected files that asks Claude not to edit them

Why A is correct

A deterministic pre-action control enforces the protected-path invariant before mutation. Written guidance alone is advisory.

Why the other options are wrong

Option B: A few examples in the prompt that show safe edits to files outside the protected path

Option B does not satisfy the requirement in the scenario. Review the explanation above: the correct choice (A) is the only one that fully meets every constraint stated in the question.

Option C: A reminder message posted after each commit that lists the protected path for reviewers

Option C does not satisfy the requirement in the scenario. Review the explanation above: the correct choice (A) is the only one that fully meets every constraint stated in the question.

Option D: A code comment above the protected files that asks Claude not to edit them

Option D does not satisfy the requirement in the scenario. Review the explanation above: the correct choice (A) is the only one that fully meets every constraint stated in the question.

Key idea: Hooks & Guardrails

A deterministic pre-action control enforces the protected-path invariant before mutation. Written guidance alone is advisory. On the CCAR-F exam, questions in the "Claude Code Configuration and Workflows" domain test whether you can map a scenario's constraints to the right choice. Read the requirement carefully, eliminate options that violate any single constraint, and pick the one that satisfies all of them with the least operational overhead.

Ready to see how you'd score?

Take the free practice quiz and find out which Claude Certified Architect - Foundations domains you need to focus on. No signup required.

Practice 5 similar questions

Same cert, same or adjacent domain. Use these after reviewing the explanation.

Related Claude Certified Architect - Foundations Practice Questions

Official sources used

Verify program and exam details at the source before scheduling.