Developer Productivity & Operational Enablement
Here is the truth this track owes you: Domain 7 is the smallest domain on the exam: 7%, roughly four questions out of sixty-three. Do not spend a week here. Read this lab once, understand the two or three distinctions the exam actually tests (where team context lives, and which of the agent-building surfaces you are looking at) and move on. Being brief here is the correct allocation of your time, and this lab is built to let you be.
- Configure Claude tools and environments for teams (e.g., Claude Code)
- Improve developer workflows using AI-assisted tooling
- Support debugging and operational issue resolution
1. Claude Code, From an Architect's Seat
The exam does not ask whether you can drive the CLI. It asks whether you configured it so that twelve engineers get the same behavior, the same guardrails, and the same tool surface, without trusting each of them to remember. That is a configuration problem, and it has a small number of moving parts.
The CLAUDE.md hierarchy
Claude Code assembles its working context from a layered set of CLAUDE.md files, most-specific-wins. The one that matters for a team is the project file, checked into the repository. It is shared context; it is reviewed like code; it is the same for everyone who clones.
| Layer | Where it lives | Committed? | Holds |
|---|---|---|---|
| Enterprise / system policy | Org-managed, outside the repo | Centrally | Non-negotiable organizational rules; overrides everything below |
| Project | ./CLAUDE.md in the repo root | Yes — version control | The team's shared context: build/test commands, architecture invariants, conventions, "never do X" |
| User | ~/.claude/CLAUDE.md | No — personal | Individual preferences; not the team's business |
| Subdirectory | CLAUDE.md in a subtree | Usually yes | Context that applies only to that part of the codebase |
What belongs in the project file: the exact build and test commands, the architecture invariants an engineer would otherwise have to learn by breaking them, code conventions, and the short list of hard constraints. What does not belong: secrets (never), long prose, and anything that merely restates what the code already says. A CLAUDE.md that duplicates the codebase is a second thing to keep in sync and a place for drift to hide.
# Project: claims-triage
## Build & test
- Install: `uv sync`
- Test: `uv run pytest` (must pass before any commit)
- Lint: `uv run ruff check .`
## Architecture invariants
- The classification step is a single augmented-LLM call. Do NOT
turn it into an agent loop.
- Every denial route requires a named human. Never auto-execute a denial.
- Structured output is the contract: keep the schema in `schemas/triage.py`.
## Conventions
- Type-hint everything; no bare `except`.
- New model calls go through `llm/client.py`, never `anthropic.Anthropic()`
inline.
## Never
- Never commit secrets. Credentials come from the environment.
- Never edit files under `vendor/` or `migrations/` without asking.
Settings precedence and where team policy lives
Behavioral configuration (permissions, hooks, model defaults) lives in settings.json, and it layers the same way the context files do.
| File | Scope | In git? | Purpose |
|---|---|---|---|
| Enterprise-managed policy | Organization | Centrally managed | Overrides project and personal settings; where a security team enforces org rules |
.claude/settings.json | Project | Committed | The team's shared policy: allow/deny rules, hooks, MCP servers |
.claude/settings.local.json | Individual | Gitignored | One engineer's personal overrides; never shared |
Permissions and hooks: the load-bearing distinction
Permissions are allow/deny rules for tools and commands. This is Lab 5's principle applied to the developer's own machine: if a capability is dangerous, remove it rather than writing a prompt that asks the model not to use it. A denied Bash(rm -rf:*) rule cannot be argued out of the way by a cleverly phrased task.
Hooks are deterministic code that runs on tool events: before a write, after an edit, on session start. A hook is the right home for a lint gate, a secret scan, or a hard block on a destructive command, because a hook executes. It is not a request the model can decline; it is a program that runs and can return non-zero.
{
"permissions": {
"allow": [
"Bash(uv run pytest:*)",
"Bash(uv run ruff:*)",
"Read", "Edit", "Grep", "Glob"
],
"deny": [
"Bash(rm -rf:*)",
"Bash(git push --force:*)",
"Read(./.env)",
"Read(./secrets/**)"
]
},
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{ "type": "command", "command": "./.claude/hooks/scan-secrets.sh" }
]
}
]
}
}
CLAUDE.md. Prose in a context file is guidance the model usually follows; a hook is code that always runs. When a scenario asks how to guarantee a gate, the answer is never "add an instruction to the prompt."
Reusable team assets and the CI path
Two more pieces round out a team configuration, and both live in the repo so the whole team inherits them:
- Subagents and custom slash commands — checked-in definitions that give everyone the same specialized helpers (a reviewer subagent, a
/migratecommand) instead of each engineer reinventing them. - MCP servers configured at project scope — so every engineer's Claude Code sees the same tool surface (the internal docs server, the ticketing integration), rather than a surface that varies by whoever set up their laptop.
Finally, Claude Code runs headless: non-interactively, as a step in a pipeline. That is how AI-assisted work becomes a repeatable CI job rather than something that only happens when a human is at a keyboard.
# A CI step: run Claude Code non-interactively in print mode.
# The project CLAUDE.md and .claude/settings.json travel with the repo,
# so the pipeline inherits the same context, permissions, and hooks
# the whole team uses.
claude -p "Review the diff on this branch against our conventions in \
CLAUDE.md. List any violations. Do not edit files." \
> review-output.txt
# Credentials come from the environment (see section 5), never from a flag.
2. Three Ways to Build an Agent, and the Trap
Once a team decides it wants an agent (open-ended, model-directed tool use; the four-part test from Lab 1 still applies), there are distinct products for building one, and the exam likes to test whether you can tell them apart. The confusion is real: two of them have similar names and do different things.
Separate them with two questions: who supplies the harness (the agent loop and context management) and who supplies the deployment (the infrastructure it runs on).
| Approach | You write | Who supplies the harness | Who supplies the deployment | Tools available | Use when |
|---|---|---|---|---|---|
| Tool Runner in the anthropic SDK |
Just your tool functions | The SDK (harness only) | You host | Only tools you define: no built-ins, no sandbox | A custom-tool agent without hand-writing the request→execute→loop cycle |
| Claude Agent SDK separate package |
A prompt + options | The SDK: Claude Code as a library (harness only) | You host | Built-in Read/Write/Edit/Bash/Glob/Grep, plus subagents, hooks, permissions, MCP | A batteries-included coding / filesystem agent on your own infrastructure |
| Managed Agents Anthropic-hosted |
An agent config + your tool results | Anthropic (harness + deployment) | Anthropic — per-session sandbox | Hosted sandbox (bash, files, code exec) + Skills / MCP + your tools | You want Anthropic to run the loop and host the workspace; versioned configs; scheduled runs |
The mental model is the harness/deployment split. Tool Runner and the Agent SDK both give you a harness only; you still host and deploy. Managed Agents is the only one that supplies both. A manual while stop_reason == "tool_use" loop supplies neither; you own everything.
anthropic SDK, reached via client.beta.messages.tool_runner with @beta_tool–decorated functions; it automates the loop over tools you define, with no built-in tools and no sandbox. The Claude Agent SDK is a separate package (claude-agent-sdk): Claude Code packaged as a library, shipping built-in file/bash/search tools, subagents, hooks, and permissions. Both are harness-only and you host them; the difference is scope. If a scenario says "automate the loop over my own functions," that is Tool Runner. If it says "a coding agent with file and bash tools on my own infra," that is the Agent SDK. If it says "Anthropic runs the loop and hosts the sandbox," that is Managed Agents.
3. Where AI-Assisted Workflows Actually Pay Off
The objective is to "improve developer workflows," and the architect's job is to point the leverage at the tasks where it compounds, and to know each one's failure mode, because the exam rewards the candidate who names the risk, not the one who is merely enthusiastic.
| Workflow | The leverage | The failure mode |
|---|---|---|
| Codebase onboarding & Q&A | New engineers ask the repo questions instead of interrupting a senior | Confident answers about code that has since changed; treat as a starting point, not authority |
| Test generation | Coverage for the cases a human wouldn't bother to type | Tests that assert current behavior, bugs included; they lock in the mistake |
| Large mechanical refactors | The same rename or API swap across hundreds of files | Silent semantic drift on the one file that wasn't quite mechanical |
| Code review, first pass | Catches the obvious before a human spends attention | Not a replacement for human review; it misses intent and over-reports style |
| Incident triage from logs | Summarize a wall of traces into a hypothesis fast | A plausible narrative that fits the logs but isn't the cause |
| Docs & runbook drafting | A first draft of the thing nobody wants to write | Documentation that reads well and is subtly wrong; still needs an owner |
| Migration sweeps | Framework or dependency upgrades across a monorepo | Passing builds that changed behavior no test covered |
The thread running through every failure mode is the same: generated code is reviewed like any other code. That is the governance stance an architect owns. It has three parts: a review requirement (a human approves before merge, exactly as for hand-written code), provenance (you can tell what was AI-assisted, so a regression can be traced), and the flat rule that AI authorship changes nothing about the bar the change must clear. "The model wrote it" is never a reason to skip review; if anything it is a reason not to.
4. Debugging and Operational Enablement
This objective overlaps Lab 7's diagnosis-and-optimization material, so keep it short and cross-reference: the how of isolating a fault (the ablation ladder, distinguishing a retrieval regression from a prompt regression) lives there. The half that belongs to Domain 7 is enablement: the architect's job is to make the on-call engineer's first ten minutes deterministic rather than heroic.
You do that by shipping the pieces before the incident, not during it:
- A runbook (Lab 9) so the responder follows a path instead of inventing one at 3 a.m.
- Structured traces keyed by
request_id(Lab 5) so any failure can be pulled up by its identifier and reported to Anthropic without guesswork. - A reproducible failing case (the input, the trace, the observed output), because a bug you can replay is a bug you can fix.
- The ablation ladder (Lab 7) so the responder localizes the regression instead of changing four things at once.
None of this is about the model being clever in the moment. It is about the architect having made the moment boring in advance.
5. Environment Configuration for Teams
Secrets are the part of team configuration where a mistake is expensive, and the rule is absolute: secrets never live in CLAUDE.md, never in prompts, and never in the repository. They come from environment variables or a secret manager. A key committed to a context file is a key leaked to everyone who clones and everyone in the model's context.
The subtle exam point is credential resolution order. The SDK resolves credentials in a fixed sequence, first match wins:
| Order | Source | Note |
|---|---|---|
| 1 | ANTHROPIC_API_KEY | The usual env var |
| 2 | ANTHROPIC_AUTH_TOKEN | Consulted only if the API key is unset |
| 3 | An OAuth profile | From an interactive login; a bare client picks it up automatically |
| 4 | Workload Identity Federation | Federated env vars for CI / cloud service accounts |
ANTHROPIC_API_KEY does not mean no credentials are present. This is the trap. A developer who sees the env var is empty may conclude the client is unauthenticated and go hunting for a key, but the SDK will happily fall through to an auth token, an OAuth profile on disk, or federated credentials, and authenticate against whatever org that is scoped to. When you debug an auth problem, ask which source actually won, not just whether the one variable you remember is set.
6. Design Exercise
Self-driven lab Lab10_Self_Driven_Lab.ipynbObjective: onboard a twelve-engineer team onto Claude Code in a regulated codebase, and produce the configuration a new hire inherits on their first clone. About 40 minutes; this domain does not warrant more.
Scenario. A fintech team of twelve is adopting Claude Code across a Python monorepo under regulatory scope. Denials of a customer action must be attributable to a named human. The codebase has a migrations/ directory that must never be edited without review, a mandatory linter, and a hard rule that no secret ever reaches a commit. You are the architect setting the team up.
- Write the project
CLAUDE.mdoutline. List the sections and one line each: build/test commands, the architecture invariants (including the named-human-on-denial rule), conventions, and the "never" list. State explicitly what you are keeping out, and why secrets and long prose are not in it. - Sort the controls: hook or prompt? For each of (run the linter before commit, block edits to
migrations/, scan for secrets before any write, prefer small functions), decide whether it is a hook / deny rule (must always hold) or an instruction inCLAUDE.md(guidance). Justify each with one sentence. The regulator's rule is the tell for at least one of them. - Split committed vs. local settings. What goes in
.claude/settings.json(shared, in git) versus.claude/settings.local.json(personal, gitignored)? Put the allow/deny list and the hooks in the right place, and name one thing that belongs only in an individual's local file. - Define the code-review policy for AI-assisted changes. Write the rule in one or two sentences. It must cover the review requirement, provenance, and the principle that generated code clears the same bar as any other change. Do not let "the model wrote it" appear anywhere as an exemption.
- Specify the CI step. Describe the headless Claude Code invocation that runs in the pipeline, what it checks, where its credentials come from, and why running it in CI (rather than trusting each engineer to run it locally) is the enforcement point.
- State the one control the regulator makes non-optional, and show where it is enforced. If your answer is "an instruction in
CLAUDE.md," revise it: a regulated constraint is a hook, a deny rule, or an egress gate, not a request.
Step 2 is the one the exam tests. Step 6 is the one an auditor tests.
Check Yourself
Exam-style items. Commit to an answer before expanding.
A team wants to guarantee that a secret-scanning check runs before every file write in Claude Code, with no way for an engineer or the model to skip it. Where should this control live?
Correct: B. Hooks enforce; prompts request. A PreToolUse hook is deterministic code that runs on the tool event and can return non-zero to block the write; it cannot be talked out of the way. Committing it to .claude/settings.json means the whole team inherits it from the repo.
A and D are prose in context files: guidance the model usually follows and can be steered around; neither is a guarantee. C relies on human memory, which is exactly what a control is supposed to replace. The word "guarantee" in the stem is the signal that the answer must be an enforcement mechanism, not an instruction.
An engineer wants to build an agent that loops over a handful of custom functions they wrote, without hand-writing the request→execute→loop cycle, and they will host it themselves. They do not need built-in file or bash tools. Which surface fits?
Correct: C. Tool Runner automates the loop over tools you define, ships no built-in tools and no sandbox, and you host it. That matches the requirement exactly: custom functions, no built-ins, self-hosted, and the loop handled for you.
A is the wrong package for this need: the Agent SDK bundles built-in file/bash/search tools the engineer explicitly does not want, and its scope is a full coding harness. B moves both the loop and the hosting to Anthropic, which the engineer did not ask for. D makes the engineer write the loop by hand, the one thing they wanted to avoid. The trap is A: it sounds like the default "agent SDK," but the name collision is exactly what the item tests.
You are configuring Claude Code for a twelve-person team. Which two configurations belong in version control so the whole team inherits them? (Choose two.)
Correct: A and C. The project CLAUDE.md is the team's shared context and the project .claude/settings.json is the team's shared policy; both are checked in precisely so a new clone inherits the same behavior and guardrails as everyone else.
B and D are personal by design: user-level context and settings.local.json are gitignored individual overrides, not team assets. E is the disqualifying answer: a secret never goes in the repository, in a context file, or in a prompt; it comes from the environment or a secret manager. "Committed to the repo so everyone can authenticate" is a leaked credential dressed up as convenience.
An on-call engineer reports that the Claude client is "authenticating against the wrong organization" even though ANTHROPIC_API_KEY is not set in their shell. What is the most likely explanation?
Correct: B. An unset ANTHROPIC_API_KEY does not mean no credentials are present. The SDK resolves in order (API key, then auth token, then an OAuth profile, then Workload Identity Federation) and the first match wins. A profile on disk or federated CI credentials scoped to another org will authenticate silently.
A is false and is the exact misconception the domain warns about: a bare client works fine off a profile. C misunderstands the architecture; the organization is a property of the credential, not of the prompt. D describes a secret in a context file, which is a real anti-pattern but not how credential resolution works, and the scenario's clue is the empty env var, which points squarely at fall-through.
Key Takeaways
- Domain 7 is the smallest domain: 7%, about four questions. Learn the distinctions, answer the scenarios, and spend your saved hours on the heavier domains.
- The project
CLAUDE.mdand.claude/settings.jsonare the team's shared context and policy, committed to version control. Personal preferences andsettings.local.jsonare not. - Secrets belong in
CLAUDE.md, prompts, and the repo never: only in environment variables or a secret manager. - Hooks enforce; prompts request. A control that must always hold is a hook or a deny rule, never an instruction in a context file.
- Permissions apply Lab 5's principle to the developer's machine: remove the capability rather than trusting a prompt not to use it.
- Tool Runner (in the
anthropicSDK) loops over your own tools, harness-only, self-hosted. The Claude Agent SDK is a separate package: Claude Code as a library with built-in tools, harness-only, self-hosted. Managed Agents supplies the harness and the hosted sandbox. Don't confuse the first two. - Generated code is reviewed like any other code: review requirement, provenance, same bar. "The model wrote it" is never an exemption.
- An unset
ANTHROPIC_API_KEYdoes not mean no credentials: the SDK falls through API key → auth token → OAuth profile → Workload Identity Federation, first match wins.