Second in the 6-part CCA-F scenario series — full source for every scenario: aicert-labs.
The scenario, as written in the exam guide
A team uses Claude Code for code generation, refactoring, debugging, and documentation, with custom slash commands and a CLAUDE.md, deciding between plan mode and direct execution.
| Domain | Weight | Where it shows up in this scenario |
|---|---|---|
| Claude Code Configuration & Workflows | 20% | CLAUDE.md team conventions and three custom slash commands, each a different risk tier |
| Context Management & Reliability | 15% | A deliberately short CLAUDE.md — a long, stale one is itself a context-management failure |
"Use plan mode for risky changes" isn't a decision
That instruction just restates the problem. What's risky? Left undefined, it falls back to whoever's running the session that day, using whatever judgment they happen to have on hand. Two engineers on the same team will draw the line in different places, and neither of them is wrong — there was never a shared definition to be wrong about.
The reference CLAUDE.md in aicert-labs replaces the vague instruction with an explicit table: a file's blast radius — single file, shared module, legacy code, schema — maps to a mode. Not difficulty, not how the engineer feels about the change. Blast radius.
| Change touches... | Mode |
|---|---|
| A single file, not imported anywhere else | Direct execution |
A file imported by 3+ modules, or src/shared/ | Plan mode required |
src/legacy/ | Plan mode required, plan must state what wasn't verified |
| Database schema | Plan mode required, always |
The commands are the enforcement, not the table
A table in a markdown file is still just a table someone has to remember to check. The example project turns it into three custom slash commands that each carry their tier:
/fix-bugis direct-execution, but its own body tells it to refuse and redirect to/refactor-safelyif the fix isn't actually confined to one file./refactor-safelyis told explicitly: if you weren't invoked in plan mode, stop and tell the user to re-run in plan mode. It doesn't proceed "carefully" — it doesn't proceed./documentis direct-execution but forbidden from touching logic, so a docs command can't quietly turn into a refactor.
To make the blast-radius rule concrete instead of hypothetical, the example has src/shared/format-currency.ts genuinely imported by three route files. Ask /refactor-safely to change it, and the first thing it has to do — per its own instructions — is enumerate all three importers before proposing anything.
Two independent layers, not one
CLAUDE.md and the commands are prompt-level — they shape what Claude decides to do. .claude/settings.json adds a layer that doesn't depend on the model reading anything correctly: a PostToolUse hook that runs the linter after every edit, and a permissions deny-list that blocks git push --force and rm -rf outright, regardless of what any prompt says. This is the same principle as Scenario 1's process_refund: put the constraint where it can't be argued with, not just where it's likely to be followed.
Run it yourself
git clone https://github.com/AICERT-STUDY/aicert-labs
cd aicert-labs/cca-f/scenario-2-claude-code-workflows/example-project
npm install && npm test && npm run lint
Then open the folder in Claude Code and try /document src/shared/format-currency.ts, /fix-bug, and /refactor-safely — the README has exact commands to try, including one that should make Claude enumerate all three importers before touching anything.
Test yourself
1. Why does the example project's blast-radius table key off which files a module touches, rather than how large or complex the change is?
Answer: because complexity is subjective and inconsistent between engineers, while "imported by 3+ modules" is a fact you can check with a grep.
A rule that depends on judgment reintroduces the exact ambiguity the table exists to remove. A rule keyed on a checkable fact produces the same answer regardless of who — or what — is evaluating it.
2. What's the functional difference between putting a rule in CLAUDE.md versus enforcing it via .claude/settings.json hooks and permissions?
Answer: CLAUDE.md shapes what the model decides to do; settings.json hooks/permissions run independent of the model's decision.
A rule in CLAUDE.md only holds if the model reads and follows it correctly on every relevant turn. A hook or a permissions deny-list executes regardless — it's the same "tool enforces it, not the prompt" pattern as Scenario 1's typed needs_escalation result.
3. /fix-bug's instructions tell it to redirect to /refactor-safely under some conditions. Why put that logic inside the command instead of just trusting the engineer to pick the right command?
Answer: because the engineer invoking the command is exactly who might misjudge blast radius — the command is a second check, not a redundant one.
If picking the right command were reliable on its own, the blast-radius table wouldn't be needed in the first place. The redirect is a safety net for the case the table exists to guard against.
4. Why does CLAUDE.md explicitly say to keep it short, calling a long file a "Context Management failure"?
Answer: a long CLAUDE.md competes for context budget with the actual task, and content that's rarely relevant to a given task pushes out content that is.
This maps directly to the Context Management & Reliability domain: what goes in persistent, always-loaded context has to earn its place every session, not just once when it was written.
5. The src/legacy/reconcile.ts comment says three other services depend on its undocumented rounding behavior. What CCA-F-relevant risk does documenting that in the file itself address?
Answer: it prevents the tribal knowledge from being lost when the person who knew it leaves — and puts it exactly where an agent (or new hire) touching that file will actually read it.
Undocumented constraints that live only in one person's head are a reliability risk the moment that person is unavailable. Writing the constraint at the point of contact is what makes it durable.
Free CCA-F practice exam, covering all 5 domains: aicert.study/certifications/ccaf.
