CCARF Practice Question
Correct answer: B
A: Prompt instructions with examples improve consistency but still have a non-zero failure rate. Package naming is a deterministic rule that must be enforced 100% of the time to avoid broken imports across services.
B: A PostToolUse hook on file write operations can inspect the output and normalise package names deterministically. This provides a 100% enforcement guarantee regardless of what the model generates, which is the correct approach for structural consistency rules.
C: A validation subagent is still probabilistic — it may miss violations. PostToolUse hooks provide deterministic, inline enforcement that catches every violation at the point of file creation.
D: Creating a custom tool wrapper adds unnecessary complexity. PostToolUse hooks on the existing file write tool achieve the same deterministic enforcement without modifying the tool interface.