Capstone · Skills through practice
Hands-On Labs
Knowledge sticks when you build. These are the Exam Guide's four preparation exercises, expanded into concrete labs with self-check questions. The exam rewards judgment from experience — do at least one end-to-end.
Why bother when the exam is multiple-choice?The distractors are written by people who watched practitioners fail these exact tasks. Having felt a prompt-based rule fail, or a subagent lose context, makes the right answer obvious under time pressure. Fluency (recognizing an answer) is weaker than storage strength (having done it).
Lab 1 · Multi-Tool Agent with Escalation Logic
Reinforces D1 · D2 · D5
- Define 3–4 MCP tools with detailed descriptions; include two deliberately similar tools that need careful wording to disambiguate.
- Implement an agentic loop that branches on
stop_reason — handle both "tool_use" and "end_turn" correctly.
- Add structured errors (
errorCategory, isRetryable, human-readable message); verify the agent retries transient errors and explains business errors.
- Add a tool-call interception hook enforcing a business rule (e.g., block operations over a threshold) and redirect to escalation.
- Send a multi-concern message; verify the agent decomposes, handles each concern, and synthesizes one response.
Success check: flip the hook off and re-run the over-threshold case — watch the prompt-only version fail intermittently. That failure is the lesson behind "use a guarantee."
Lab 2 · Claude Code for a Team Workflow
Reinforces D3 · D2
- Create a project-level
CLAUDE.md with coding + testing standards; confirm it applies for a second "teammate" checkout (not user-level).
- Create
.claude/rules/ files with paths globs (e.g., ["src/api/**/*"], ["**/*.test.*"]); confirm they load only when editing matching files.
- Create a project skill with
context: fork and allowed-tools; confirm it runs isolated without polluting the main conversation.
- Configure an MCP server in
.mcp.json with ${ENV} expansion; add a personal one in ~/.claude.json; confirm both are available at once.
- Try plan mode vs direct on three tasks: a one-file bug fix, a multi-file migration, a feature with multiple valid designs. Note where plan mode earns its cost.
Success check: put an instruction in ~/.claude/CLAUDE.md and confirm a fresh clone doesn't see it — the exact failure behind the "new teammate" question.
Lab 3 · Structured Data Extraction Pipeline
Reinforces D4 · D5
- Define an extraction tool whose JSON schema has required + optional + nullable fields and an enum with
"other"+detail. Feed a doc missing a field; confirm it returns null, not a fabrication.
- Build a validation-retry loop (Pydantic/JSON schema): on failure resend the doc + failed extraction + specific error. Track which failures retry fixes (format) vs can't (absent info).
- Add few-shot examples for varied structures (inline citations vs bibliographies; tables vs narrative); confirm improved consistency.
- Submit a 100-doc batch via the Message Batches API; handle failures by
custom_id (chunk oversized docs); compute processing time vs an SLA.
- Output field-level confidence; route low-confidence to human review; analyze accuracy by document type and field.
Success check: make a schema field required and watch fabrication return — then make it nullable and watch it stop. That's the anti-hallucination rule in your hands.
Lab 4 · Multi-Agent Research Pipeline (design & debug)
Reinforces D1 · D2 · D5
- Build a coordinator delegating to ≥2 subagents; ensure
allowedTools includes "Task" and each subagent gets findings in its prompt (no automatic inheritance).
- Run subagents in parallel via multiple
Task calls in one response; measure the latency win vs sequential.
- Give subagents structured output separating content from metadata (claim, excerpt, source, date); confirm synthesis preserves attribution.
- Simulate a subagent timeout; confirm the coordinator receives structured error context and can proceed with partial results + coverage-gap annotations.
- Feed conflicting source stats; confirm synthesis keeps both with attribution (and dates) rather than picking one.
Success check: deliberately over-narrow the coordinator's decomposition and watch coverage gaps appear even though every subagent "succeeds" — the root-cause question, reproduced.
Quick self-check
In Lab 1 you disable the interception hook and rely only on a system-prompt rule to block over-threshold operations. The observed behavior best illustrates that:
- Prompt-based rules have a non-zero failure rate; guarantees need deterministic enforcement
- System prompts are ignored entirely whenever any tool is available
- Interception hooks are only necessary when the model lacks tools
- Business rules should always be enforced by lowering the temperature
Option 1. The whole point of the lab: probabilistic prompt compliance fails some fraction of the time; deterministic hooks/gates don't. This is the exam's master heuristic.
Ask your teacher. Want starter scaffolding for any lab (tool schemas, a loop skeleton, a rules-file template)? Ask and I'll generate it. No cloud access needed — you can run these locally with the Agent SDK / Claude Code.