Kairox Arch Prep
EXAM SCENARIO

Code generation with Claude Code

What the code generation with Claude Code scenario tests on the CCA-F exam: CLAUDE.md, plan mode, commands, hooks, permissions and session hygiene.

In the code generation scenario, a development team uses Claude Code day to day to write, refactor and review code. Questions set here lean on the Claude Code configuration domain and the prompt engineering domain: how a team shares conventions, how risky work is planned, and how guarantees are enforced rather than requested.

The setup you should picture

A repository with a root CLAUDE.md that records build and test commands and code conventions, subdirectory CLAUDE.md files for parts of the codebase with their own rules, shared settings with permission rules committed to the repo, a few project commands or skills for routines the team repeats, and hooks that run formatters or block edits to protected paths. Each developer also has personal preferences in their own user-level files.

Decisions the exam probes

Shared versus personal. Team conventions and permission rules go in committed project files; personal preferences go in user-level files; personal overrides that should not be committed go in local settings. Many questions are simply "where should this live?"

Guidance versus enforcement. CLAUDE.md content is loaded into context and usually followed. Hooks and permission rules are enforced by the harness every time. If a rule must never be broken — no edits to migrations, formatting after every change — the answer is a hook or a deny rule.

Planning risky work. For a wide refactor in unfamiliar code, explore and plan first: plan mode lets Claude read and propose without changing files, and a human approves the approach before implementation begins.

Packaging repetition. A review routine typed many times a day should become a project command or skill that anyone can invoke by name, rather than text pasted into the chat or loaded into every session through CLAUDE.md.

Keeping context clean. Clear the session between unrelated tasks; compact a long session when the same task continues. Keep CLAUDE.md short so important rules are not drowned out.

Common traps

How to practise

Set up a small repository the way you would for a team of five: write the root and one subdirectory CLAUDE.md, commit a settings file with allow and deny rules, add a formatter hook and a hook that blocks one folder, and package one routine as a command. Then ask Claude Code to break each rule and see which mechanisms actually stop it.

The six scenarios are listed in Anthropic's official exam guide (version 1.1), with four drawn per sitting. The emphasis described here is our own study guidance, not official exam content.

Practice questions set in this scenario

Original questions, not real exam items. All 13 questions in this scenario also appear in the practice exam.

Practice question 1

Domain 1: Agentic Architecture & Orchestration

An agent must migrate 300 files to a new logging API. Each file can be changed independently, and a test command verifies each change. Which approaches are most appropriate? Choose two.

  1. A. Split the work into per-file or per-module tasks, each checked by the test command
  2. B. Let the agent decide on each file whether running the tests is worth the extra time
  3. C. Skip tests during the migration and run the full suite once at the end to save time
  4. D. Run tasks in parallel batches and queue failures for retry or human review
  5. E. Give one agent the whole migration in a single prompt and review the final combined diff
Show answer and explanation

Answer: A and D. Breaking a large job into small verifiable units, each with an objective success check, keeps failures local and reviewable. Because files are independent, batches can run in parallel, with failures queued instead of blocking the whole run. A single giant prompt or one end-of-run test makes failures hard to localise, and optional verification removes the safety net.

Practice question 2

Domain 1: Agentic Architecture & Orchestration

An agent can edit files, run shell commands and push to git. For a first rollout to a team, which permission design best limits risk while keeping it useful?

  1. A. Allow every action, but tell Claude in its system prompt that it must never push to git
  2. B. Allow file edits and the test command; require approval for pushes and side effects
  3. C. Allow file reads only, and have developers apply every suggested edit by hand
  4. D. Allow every action, since developers can always revert anything the agent gets wrong
Show answer and explanation

Answer: B. Least privilege: give the agent exactly what the task needs and gate irreversible or externally visible actions (pushes, deployments, network writes) behind approval. Allowing everything relies on cleanup after damage, a prompt instruction is not an access control, and read-only access makes the agent nearly useless for the task.

Other scenarios