Claude Code Training

Capstone ~120 min

Capstone Project

Learning objectives

By the end of this chapter, you will be able to:

  1. Stand up a Claude Code project from scratch — a sandbox repo, a `CLAUDE.md` capturing conventions and a deliberate load-bearing gotcha, and a sensible permission posture (Chapters 1–3).
  2. Drive spec-first development in **plan mode**: design the data model and commands read-only, then export a committed spec before any code is written (Chapter 6).
  3. Build a working tool under the permission gate, then extend Claude Code itself with a packaged **skill** and an **output style** (Chapters 2–3, 8–9).
  4. Delegate a scoped code review to a least-privilege **subagent** and act on the summary it returns from its isolated context (Chapter 7).
  5. Run two independent features in **parallel git worktrees** and integrate-test-merge them safely (Chapter 10).
  6. Map the finished build onto the **four deep-agent pillars** and place MCP and the GitHub Action in that picture (Chapters 11, 4, 5) — then pass a cumulative exam spanning all 11 chapters.

Before we start — what this capstone is

This is the finale. Across eleven chapters you learned the moves one at a time; here you run them end to end on a single build, reaching for the right tool at the right moment. There's nothing new to learn — it's a chance to feel how the pieces fit, and to prove to yourself that you can drive Claude Code through a real piece of work.

What you'll build. A tiny devlog — a per-project work journal / changelog: a Python-stdlib CLI backed by one JSON file, with add, list, and summary commands, plus two features (search, export) you'll build in parallel. It's deliberately small; the point is the workflow around it, not the program.

Framework-free, like every lab in this course. You need only Claude Code, git, and a shell — no npm/Node, no accounts, no cloud. Everything happens in a throwaway sandbox; nothing here touches anything else on your machine.

How it's assessed. Two parts: (1) the success checklist at the end of the build — work through the stages and tick each box; and (2) the final exam below this page (12 questions drawn from all eleven chapters, passing score 9/12). Passing the exam marks the course complete.

How to read this. Work the stages in order — each has a Goal, the chapters it draws on, copy-pasteable steps, and an Expected outcome so you can check yourself. The prompts you give Claude are suggestions; phrase them your own way. If a step doesn't behave exactly as written (Claude Code moves fast), fall back to the chapter it came from.

Why a capstone

A course of isolated skills leaves a gap: knowing each tool isn't the same as knowing which tool, when. Real work is a stream of small decisions — "is this a job for a skill or a subagent?", "should I plan first or just edit?", "are these two features safe to run in parallel?" The capstone is where those decisions come at you together, on one build, so the judgment becomes yours. When you finish, you'll have done — in miniature — exactly what every chapter was preparing you for: drive a capable agent through a long-horizon task without losing control of the code.

Everything you learned, in one build 0 · Set up project memory Ch 1–3 1 · Plan plan mode → spec Ch 6 2 · Build core permission gate Ch 2–3 3 · Extend CC skill + output style Ch 8–9 4 · Review subagent Ch 7 5 · Parallel worktrees+merge Ch 10 Reflection — the four deep-agent pillars (Ch 11) ① system prompt CLAUDE.md ② planning plan + to-do ③ subagents isolated context ④ filesystem state + retrieval + where MCP (Ch 4) & the GitHub Action (Ch 5) fit one long-horizon build, driven under control — which is the whole point of the book
Figure 12.A — the capstone in one image: six build stages, each exercising specific chapters, converging on the four deep-agent pillars. Pedagogical diagram by this training, not from the book.

The build — the devlog CLI

You're building a small work journal. The spec is intentionally tiny so the workflow is the star:

  • Storage: one file, devlog.json — a JSON list of entries, each { "id": <int>, "ts": <string>, "text": <string>, "tags": [<string>...] }.
  • Core commands (Stage 2): add "<text>" [--tag T], list [--tag T], summary (totals + counts by tag).
  • Parallel features (Stage 5): search <query> and export --format md|json.
  • The one rule that matters — your load-bearing gotcha: entries are append-only, and an entry's id is a stable reference — never renumber or reuse ids. (Later, the release-notes skill and export refer to entries by id; renumbering silently breaks them. This is the same "one load-bearing fact the agent must not break" lesson as Chapter 5 — and you'll put it in CLAUDE.md so the agent respects it.)
  • Stdlib only: json, argparse, datetime, pathlib. A handful of asserts or a tiny unittest is your "test" gate.

Stage 0 — Set up the project and its memory

Goal: a sandbox repo with project memory and a permission posture in place, before any feature work. Draws on: Chapter 1 (context engineering), Chapter 2 (CLAUDE.md / /init), Chapter 3 (settings, permissions, memory).

Create the sandbox:

mkdir -p ~/cct-capstone-lab && cd ~/cct-capstone-lab
git init -q
printf '# devlog\nA tiny project work-journal CLI (capstone build).\n' > README.md
git add . && git commit -q -m "init capstone sandbox"

Start claude in the sandbox. Author a CLAUDE.md — either with /init and then edit, or by asking directly:

Create a CLAUDE.md for this project. Record these conventions:
- This is a Python-stdlib CLI; no third-party dependencies, ever.
- Data lives in devlog.json as a JSON list of {id, ts, text, tags}.
- LOAD-BEARING: entries are append-only. An entry's `id` is a stable
  reference used elsewhere — NEVER renumber, reuse, or mutate existing ids.
- Prefer the simplest change that works; read a file before editing it.

Expected outcome: a committed sandbox and a CLAUDE.md that states the stdlib rule and — prominently — the append-only / stable-id gotcha. This is your project's memory; every later stage rides on it. (If you want a stricter guardrail than prose, recall Chapter 3: a hook enforces deterministically where CLAUDE.md only instructs — optional here.)

Stage 1 — Plan the build in plan mode

Goal: a reviewed spec on disk before a line of code. Draws on: Chapter 6 (plan mode, spec-driven development).

Enter plan mode (/plan, or Shift+Tab to the plan permission mode) and ask Claude to design — not build — the tool:

/plan Design the devlog CLI: the devlog.json schema, the add/list/summary
commands and their flags, timestamp handling, and the edge cases (empty log,
missing file, unknown --tag). Don't write code yet — propose a plan.

Refine the plan through feedback, then export it to a committed spec so it becomes durable repo context:

Write the approved design to .claude/devlog-spec.md, then exit plan mode.

Expected outcome: Claude explored read-only and produced a plan (no files changed in plan mode); you exported it to .claude/devlog-spec.md and committed it. You now have the explore → plan → (commit the spec) → code loop in motion — and a spec the agent can re-read instead of re-deriving.

Stage 2 — Build the core under the permission gate

Goal: a working add/list/summary, with the gotcha respected. Draws on: Chapter 2–3 (the permission gate, approving edits).

Ask Claude to implement the spec:

Implement devlog.py per .claude/devlog-spec.md: add, list, and summary,
backed by devlog.json. Honor the append-only / stable-id rule from CLAUDE.md.

Approve the edits as the permission gate prompts. Then exercise it:

python devlog.py add "Set up the sandbox" --tag setup
python devlog.py add "Planned the CLI in plan mode" --tag plan
python devlog.py list
python devlog.py summary
cat devlog.json   # confirm ids are 1, 2 (stable, append-only)

Expected outcome: a working CLI; devlog.json shows sequential, stable ids; summary reports totals by tag. Commit it. (Watch that the agent appended rather than rewriting the file — the CLAUDE.md gotcha doing its job.)

Stage 3 — Extend Claude Code: a skill + an output style

Goal: package a recurring task as a reusable skill, and set a session communication style. Draws on: Chapter 9 (skills), Chapter 8 (output styles).

The skill — turn "summarize the log into release notes" into a packaged workflow:

Create a project skill `release-notes` at .claude/skills/release-notes/.
Its job: read devlog.json and produce a Markdown changelog grouped by tag,
referencing entries by their stable id. Put the steps in SKILL.md; if it
needs a script, reference it with ${CLAUDE_SKILL_DIR}.

Then trigger it by description (don't type the slash): give me release notes for the project so far.

The output style — set a terse, structured session voice:

Create a project output style "terse-structured" that makes responses short,
bulleted, and code-first. Then switch to it.

(Recall Chapter 8: select styles via /config → Output style or the outputStyle setting — the standalone /output-style command was removed — and a style change takes effect after /clear or a new session.)

Expected outcome: /skills lists release-notes, and a natural-language request invoked it (the description routed it — Chapter 9); the changelog references entries by id. After /clear, responses follow the new style. You've extended Claude Code itself, not just the project.

Stage 4 — Delegate a review to a subagent

Goal: a scoped, isolated review that returns a summary. Draws on: Chapter 7 (subagents).

Create a least-privilege reviewer and delegate to it:

Create a subagent "devlog-reviewer" with read-only tools (Read, Grep, Glob —
no Write/Edit/Bash). Then use it to review devlog.py for bugs and edge cases
and report back a summary.

Expected outcome: the subagent ran in its own context window and returned a summary (you didn't see its every step in the main thread — run /context to see the main window stayed lean). Its tools list is a genuine allowlist (Chapter 7). Apply any fixes it surfaced in the main session, and commit.

Stage 5 — Two features in parallel worktrees, then merge

Goal: build two independent features at once, then integrate-test-merge. Draws on: Chapter 10 (worktrees, the integrate-test-then-push pattern).

search and export touch different code paths, so they're safe to parallelize. Create two worktrees (the mechanism Chapter 10 explains; Claude Code's own shortcut is claude --worktree <name>):

cd ~/cct-capstone-lab
git worktree add ../cap-search -b feat/search
git worktree add ../cap-export -b feat/export
git worktree list

In each worktree, run a focused claude session scoped to that one feature — verify each is on its own branch first (the Chapter 10 lesson: a wrong starting branch silently poisons the merge):

# in ../cap-search:  "Add a `search <query>` command that prints matching entries. Touch only the search path."
# in ../cap-export:  "Add an `export --format md|json` command. Touch only the export path."

Then integrate on a throwaway branch, test before merging, and only then merge to the main branch:

cd ~/cct-capstone-lab
git checkout -q -b integrate
git merge --no-edit feat/search
git merge --no-edit feat/export
python devlog.py search setup && python devlog.py export --format md   # TEST the merged result
git checkout -q main && git merge --no-edit integrate                  # only after it passes
git worktree remove ../cap-search && git worktree remove ../cap-export  # clean up (Ch10 checklist)

Expected outcome: both features built in isolation, integrated on a throwaway branch, tested, then merged to main; worktrees cleaned up. You ran the full Chapter 10 pattern — parallel isolation → integrate → test → merge — by hand.

Stage 6 — Reflect: the four pillars (and where MCP and the Action fit)

Goal: see the architecture you just operated. Draws on: Chapter 11 (deep agents), Chapter 4 (MCP), Chapter 5 (the GitHub Action).

Look back over Stages 0–5 and map what you did onto the four deep-agent pillars (Chapter 11):

  • ① The system prompt / project memory — your CLAUDE.md (the gotcha, the conventions) shaped how the agent thought the whole way through.
  • ② Planning — plan mode + the committed spec kept a long task oriented.
  • ③ Subagents — the reviewer did heavy work in an isolated context and returned a summary.
  • ④ The filesystem — devlog.json, the spec, the skill, and git worktrees were all state on disk, kept out of the context window and pulled back in only as needed.

Then place the two surfaces this framework-free build only touched:

  • MCP (Chapter 4): if devlog needed to read from an external tracker (Jira, a database), you'd expose that as an MCP server — added at local/project/user scope, declared in .mcp.json for the team, its tool definitions deferred by default. Where would an MCP server slot into devlog? Name one.
  • The GitHub Action (Chapter 5): to run devlog checks unattended on every PR, you'd wire anthropics/claude-code-action@v1 into .github/workflows/, with the scoped GitHub App + a model credential as a secret — Claude works on a claude/ branch, never main, with a human reviewing the PR. What check would you have it run?

Expected outcome: you can name, for your own build, where each pillar showed up and where MCP and the Action would extend it. That's the whole course, seen from above.

Success checklist

  • [ ] Stage 0 — sandbox + a CLAUDE.md stating the stdlib rule and the append-only / stable-id gotcha (Ch 1–3).
  • [ ] Stage 1 — designed in plan mode (read-only) and exported a committed .claude/devlog-spec.md (Ch 6).
  • [ ] Stage 2 — add/list/summary work; devlog.json ids are stable and append-only (Ch 2–3).
  • [ ] Stage 3 — a release-notes skill that a natural-language request invoked, plus a custom output style in effect (Ch 8–9).
  • [ ] Stage 4 — a least-privilege subagent reviewed the code in an isolated context and returned a summary (Ch 7).
  • [ ] Stage 5 — search + export built in parallel worktrees, integrated-tested-merged, worktrees cleaned up (Ch 10).
  • [ ] Stage 6 — mapped the build to the four pillars and placed MCP + the Action (Ch 11, 4, 5).
  • [ ] You passed the final exam below (9/12).
Common pitfalls - Skipping the spec and "just building." Plan mode + a committed spec is what keeps a multi-step build coherent (Ch6) — don't skip Stage 1. - Letting the agent renumber ids. If devlog.json ids change, your skill and export break — exactly the load-bearing gotcha. If it happens, your CLAUDE.md rule wasn't prominent enough (Ch5). - A wrong starting branch in a worktree. Verify each worktree session is on its own feature branch before it works; a wrong base poisons the merge (Ch10). - Reaching for the wrong primitive. Recurring procedure → a skill; heavy/iso­lated work → a subagent; external system → MCP; must-run-every-time → a hook (Ch9's routing rule). - Over-privileging the reviewer subagent. Give it read-only tools — a reviewer has no business writing files (Ch7, least privilege).

The whole course in one image

Analogy — the solo flight

Every chapter was a lesson with the instructor's hands near the controls: here's the throttle (context engineering), here's how you talk to the tower (CLAUDE.md), here's how you read the instruments (plan mode), how you hand off to the co-pilot (subagents), how you run two engines at once (worktrees). The capstone is the solo flight — same aircraft, same procedures, but now you take it up, run the checklist, handle the radio, and bring it back down. Nothing new happens on a solo flight; what changes is that the judgment is yours. When you land this devlog, you're not someone who has heard about agentic coding — you're someone who has done it, start to finish. That's the certificate this course was really for.

Further practice — apply it to your own repo

The most valuable thing you can do next is run this exact arc on your own project, where the stakes are real: /init a CLAUDE.md (with your real load-bearing gotchas), plan your next feature in plan mode, package the chore you do most often as a skill, give a reviewer subagent your gnarliest module, and try two independent changes in parallel worktrees. The devlog was the rehearsal; your repo is the performance.

Knowledge check

The final exam is below — 12 application questions drawn from all eleven chapters (passing score 9/12). It's the last thing between you and a completed course. Good luck.

Final exam

12 questions. Passing score: 9.

Q1. Chapter 1. Halfway through a long session, Claude's answers degrade and it starts contradicting decisions it made earlier. What's the best explanation and response?
Q2. Chapter 2 / 3. Your project has a load-bearing convention ('never renumber entry ids'). You put it in `CLAUDE.md`. What is `CLAUDE.md` mechanically, and what does it (not) guarantee?
Q3. Chapter 3. A formatting/lint step must run on every commit, no matter what. A teammate proposes writing 'always run the formatter' into a skill's instructions. Why is a hook the better tool?
Q4. Chapter 4. Everyone on the team should automatically get a `tracker` MCP server when they open the repo. Which scope/config is correct, and what's the command nuance?
Q5. Chapter 5. You tag `@claude` on a GitHub issue with the Action installed. By default, what happens — on which branch, and with what credentials?
Q6. Chapter 6. You enter plan mode and ask Claude to fix a bug. Before you approve the plan, what can and can't it do?
Q7. Chapter 7. You want a security review that won't flood your main context and shouldn't touch files. How do you set up the subagent, and what comes back?
Q8. Chapter 8. You want Claude to respond as a terse, structured reviewer for this session. Which mechanism, how do you select it, and when does it take effect?
Q9. Chapter 9. Your `release-notes` skill isn't firing when you expect it to. Per progressive disclosure, what decides whether a skill is selected, and what recurring cost should you manage?
Q10. Chapter 10. You start a cloud/background session and the MCP server you added locally with `claude mcp add` isn't available. Why — and what config DOES travel to a cloud session?
Q11. Chapter 11. A colleague calls Claude Code a 'deep agent' and says its planning tool is `TodoWrite`. What's accurate as of now?
Q12. Synthesis. You have four needs: (a) a chore you repeat most sessions, (b) a heavy audit that would flood your context, (c) reading live data from an external database, (d) a check that must run on every commit no matter what. Which primitive fits each?
Instructor notes & source coverage

Source Ledger — Capstone Project

Primary source (NOT a book chapter)

There is no book chapter behind this unit. The Capstone is original pedagogical synthesis — it recombines the skills taught across Chapters 1–11 into one integrative, hands-on build, and adds a cumulative final exam. Consequences for sourcing:

  • No source PDF. There is no source-pdfs/12-*.pdf. The capstone was not extracted from a book; it was designed from scratch (design-of-record in work/capstone-design.md, approved 2026-06-16).
  • No extracted-chapters/ file. Because there is no PDF, there is no extracted-chapters/12-capstone.txt or .md. There is nothing to extract and nothing to treat as a verbatim source-of-truth — the lesson itself is the primary artifact, and its grounding is the corrected-canonical facts established across the eleven chapter audits (see Grounding & conventions at the end).
  • Unit metadata. Slug 12-capstone (sorts/files after 11-chapter-11); Part 4 — Capstone (its own sidebar heading); kind: capstone (not a numbered chapter); displayed title "Capstone Project" (not "Chapter 12"); status ready; estimatedMinutes 120 (~90–120 min build + ~20 min exam). It re-uses the existing [slug].astro route and the generic quiz component — no new components or routes.
  • Framework-free, like every chapter lab. Claude Code + git + a throwaway Python-stdlib devlog sandbox in ~/cct-capstone-lab/. No npm/Node, no accounts, no cloud, no API keys. The devlog CLI (add/list/summary core; search/export parallel features; one devlog.json store; json/argparse/datetime/pathlib only) is an original teaching artifact, chosen because it has a natural hook for every chapter's skill.

Enrichment sources

The Capstone introduces no new external sources. Every Claude Code behavior claim it makes is re-used from the eleven chapter ledgers and rests on the canonical Claude Code docs already cited there (https://code.claude.com/docs/en/..., with docs.claude.com mirroring). Per project convention, no inline > Source: / > Enrichment — … labels appear in the learner-facing lesson — and in this lab-shaped finale the only in-lesson labelled callout is the single closing > Analogy — the solo flight box. This ledger is the single source of provenance.

The docs surfaces the capstone leans on (all previously cited across Chapters 1–11, listed here by the chapter that owns each fact):

  • [Ch1] Context engineering / context rot / the four strategies (write · select · compress · isolate) — Chapter 1's ledger and the Effective context engineering engineering post.
  • [Ch2] CLAUDE.md / /init as project memory — https://code.claude.com/docs/en/memory.
  • [Ch3] Settings, permissions, hooks (deterministic vs. prose) — https://code.claude.com/docs/en/hooks, …/settings.
  • [Ch4] MCP scopes (local/project/user), .mcp.json, --scope project, the -- separator, deferred tool definitions — https://code.claude.com/docs/en/mcp.
  • [Ch5] anthropics/claude-code-action@v1, the claude/ branch, headless Agent SDK, two-credential model, no auto-merge by default — https://code.claude.com/docs/en/github-actions.
  • [Ch6] Plan mode (read-only; reads/searches/MCP but no edit/commit/install until approved); spec-driven development — https://code.claude.com/docs/en/permission-modes.
  • [Ch7] Subagents — tools allowlist, the Agent tool (formerly Task), isolated context returning a summary — https://code.claude.com/docs/en/sub-agents.
  • [Ch8] Output styles modify the system prompt; selected via /config (the removed /output-style); read once at session start; keep-coding-instructions — https://code.claude.com/docs/en/output-styles.
  • [Ch9] Skills — progressive disclosure / selection routes on the listing (description); body persists in-session; ${CLAUDE_SKILL_DIR}; allowed-tools is a grant — https://code.claude.com/docs/en/skills.
  • **[Ch10] Cloud/background session = fresh clone; repo-committed config travels, user-local (incl. claude mcp add) doesn't; worktree.baseRef governs local worktrees; the integrate-test-merge pattern** — https://code.claude.com/docs/en/claude-code-on-the-web, …/worktrees.
  • **[Ch11] The four deep-agent pillars; "deep agent" is a community/LangChain term not an official label; Task* family current / TodoWrite legacy** — Chapter 11's ledger + …/tools-reference.

Pedagogical enrichment by the training author

Everything in the Capstone is, in a sense, pedagogical authorship — it is original synthesis, not extraction. The items below are the parts that are purely the training author's invention (no analogue in any chapter or in the docs), inventoried for separate audit.

  • Newcomer preface (## Before we start — what this capstone is). Explains the finale framing ("you learned the moves one at a time; here you run them end to end"), names the devlog build, restates "framework-free, like every lab," and explains the two-part assessment (success checklist + final exam, 9/12 to pass). No new claims — it summarizes the unit.
  • "Why a capstone" section. Argues that knowing each tool isn't the same as knowing which tool, when — the judgment the capstone exercises. Pedagogical framing only.
  • Figure 12.A (one original SVG). A map of the six build stages in sequence, each tagged with the chapters it exercises, converging on the four deep-agent pillars (with MCP / the Action placed in the picture). figcaption notes it is "Pedagogical diagram by this training, not from the book." This is the only diagram in the unit (intentional — see Grounding & conventions).
  • The devlog CLI spec. An original, deliberately tiny tool (add/list/summary + search/export; one JSON store; stdlib only). The load-bearing gotcha — entries are append-only and an entry's id is a stable reference (never renumber/reuse) — is an original teaching device that deliberately echoes Chapter 5's break-then-fix lesson ("one load-bearing fact the agent must not break"), surfaced through CLAUDE.md.
  • Stages 0–6 — the staged walkthrough. Original sequencing that recombines the chapter skills into one build (each stage maps to specific chapters — see the Stage→Source table). Copy-paste commands + an "Expected outcome" per stage follow the practical-exercise pattern of the chapter labs.
  • Success checklist (one box per stage + the exam) and Common pitfalls block. Original; restate the stage goals and the chapter routing rules (skill vs. subagent vs. MCP vs. hook).
  • Closing analogy (> Analogy — the solo flight). One sustained analogy: the eleven chapters were lessons with the instructor's hands near the controls; the capstone is the solo flight — same aircraft, same procedures, but the judgment is now the learner's. This is the single** analogy in the unit (intentional — see Grounding & conventions).
  • "Further practice" coda — apply the same arc to the learner's own repo. Optional, ungraded.

The final-exam items and the six objectives are grounded in the chapters and their corrected-canonical facts; none of the analogy, Figure 12.A, the devlog sandbox, the checklist, or the stage prose is itself assessed.

Objective → Source Mapping

Learning ObjectiveStage(s)Chapter sourceConfidenceNotes
Stand up a Claude Code project from scratch — a sandbox repo, a CLAUDE.md capturing conventions and a deliberate load-bearing gotcha, and a sensible permission posture.Stage 0Ch1 (context engineering), Ch2 (CLAUDE.md//init), Ch3 (settings/permissions/memory)HighCLAUDE.md framed as project memory/context, not a system-prompt edit (Ch11 re-audit correction); the gotcha rides on it.
Drive spec-first development in plan mode: design the data model and commands read-only, then export a committed spec before any code is written.Stage 1Ch6 (plan mode, spec-driven development)HighPlan mode is read-only (reads/searches/analyzes/MCP, normal prompts) — no edits/commits/installs until approved. Spec → committed .claude/devlog-spec.md as durable repo context.
Build a working tool under the permission gate, then extend Claude Code itself with a packaged skill and an output style.Stage 2, Stage 3Ch2–3 (permission gate, approving edits), Ch9 (skills), Ch8 (output styles)HighSkill selection routes on the description; scripts via ${CLAUDE_SKILL_DIR}. Output styles selected via /config (the removed /output-style); read once at session start.
Delegate a scoped code review to a least-privilege subagent and act on the summary it returns from its isolated context.Stage 4Ch7 (subagents)Hightools is a genuine allowlist (read-only here); delegation via the Agent tool (formerly Task); isolated context returns only a summary.
Run two independent features in parallel git worktrees and integrate-test-merge them safely.Stage 5Ch10 (worktrees, integrate-test-then-push)HighVerify each worktree session's starting branch first (a wrong base poisons the merge); integrate on a throwaway branch → test → merge → clean up.
Map the finished build onto the four deep-agent pillars and place MCP and the GitHub Action in that picture — then pass a cumulative exam spanning all 11 chapters.Stage 6 + the examCh11 (four pillars), Ch4 (MCP), Ch5 (the Action)HighPillars 1 system prompt · 2 planning · 3 subagents · 4 filesystem. MCP scopes local/project/user + .mcp.json; Action @v1 on a claude/ branch. Exam = all 11 chapters.

Lesson / Stage → Source Mapping

Lesson section / StageChapter sourceConfidenceNotes
Preface — what this capstone is (finale framing, the devlog build, framework-free, two-part assessment)Synthesis of Chapters 1–11HighPedagogical framing; no new claims.
"Why a capstone" — knowing each tool ≠ knowing which tool whenPedagogicalHighOriginal framing of the synthesis goal.
Figure 12.A — the six stages → the four pillarsn/a — pedagogical diagramn/aThe only SVG in the unit (intentional for a lab-shaped finale). figcaption flags it as not from the book.
The devlog CLI spec — storage, core commands, parallel features, the append-only / stable-id gotcha, stdlib onlyPedagogical (gotcha echoes Ch5 break-then-fix)HighOriginal teaching artifact. The gotcha is the deliberate "one load-bearing fact the agent must not break" trap, surfaced via CLAUDE.md.
Stage 0 — set up the sandbox; author CLAUDE.md (stdlib rule + the append-only / stable-id gotcha); permission posture; (hook enforces where CLAUDE.md only instructs)Ch1, Ch2, Ch3HighCLAUDE.md = project memory; the "hook enforces deterministically, CLAUDE.md only instructs" aside is the Ch3 fact.
Stage 1 — enter plan mode (/plan, Shift+Tab, or --permission-mode plan); design read-only; export to a committed .claude/devlog-spec.mdCh6HighPlan mode read-only; explore → plan → commit-the-spec → code loop; the committed spec is durable repo context the agent can re-read.
Stage 2 — implement add/list/summary under the permission gate; exercise it; confirm stable, append-only idsCh2, Ch3HighApprove edits as the gate prompts; the CLAUDE.md gotcha doing its job (agent appends, doesn't renumber).
Stage 3 — package a release-notes skill (.claude/skills/release-notes/, SKILL.md, scripts via ${CLAUDE_SKILL_DIR}), invoked by description; set a terse-structured output style via /configCh9 (skills), Ch8 (output styles)HighSkill routes on the description (Ch9); the /output-style command was removed → select via /config/the outputStyle setting; style change takes effect after /clear (Ch8).
Stage 4 — create a least-privilege devlog-reviewer subagent (read-only Read/Grep/Glob allowlist); delegate; it returns a summary from an isolated context (/context stays lean)Ch7Hightools is a genuine allowlist; delegation via the Agent tool; isolated context returns only the summary.
Stage 5 — two parallel worktrees (git worktree add; CC shortcut claude --worktree); verify each starting branch; integrate on a throwaway branch → test before merging → merge to main → clean upCh10HighThe integrate-test-then-push pattern; "a wrong starting branch silently poisons the merge" is the Ch10 caveat; cleanup per the Ch10 checklist.
Stage 6 — reflect: map Stages 0–5 onto the four pillars (① system prompt/CLAUDE.md · ② planning · ③ subagents · ④ filesystem); place MCP (local/project/user, .mcp.json, deferred tools) and the Action (@v1, claude/ branch, scoped App + model secret, human-reviewed PR)Ch11, Ch4, Ch5HighPillar numbering follows the Ch11 canonical order. MCP/Action are touched conceptually (account/stack-heavy → carried by the exam), not built.
Success checklist (one box per stage + the exam)Recap of Stages 0–6HighOriginal; the assessment surface for the build half.
Common pitfalls (skip-the-spec, renumbered ids, wrong worktree branch, wrong primitive, over-privileged reviewer)Ch5, Ch6, Ch7, Ch9, Ch10HighRestates the routing rule (skill / subagent / MCP / hook) and the least-privilege reviewer point.
Closing analogy — the solo flightn/a — pedagogicaln/aThe only analogy in the unit (intentional). No new claims.
"Further practice" coda — do the arc on your own repoPedagogicalHighOptional, ungraded.

Unsupported / Pedagogical-Only Claims

ItemJustification
The "solo flight" closing analogyPedagogical analogy. Restates the finale framing — the chapters were instructor-guided lessons; the capstone is the solo flight where the judgment becomes the learner's. No factual claim. The single analogy in the unit (the lab-shaped finale follows the practical-exercise pattern, not the per-section-analogy lesson pattern).
Figure 12.A (SVG)Original SVG. Visually maps the six build stages to the chapters they exercise and to the four deep-agent pillars (with MCP / the Action placed). The only diagram in the unit. figcaption flags it as not from the book.
The devlog CLI sandboxOriginal teaching artifact authored for this training: a tiny Python-stdlib work-journal CLI chosen because it offers a natural hook for every chapter's skill, runnable framework-free (Claude Code + git only, no npm/accounts/cloud). The append-only / stable-id gotcha is a deliberate teaching device echoing Chapter 5.

Quiz Item → Source Mapping (cumulative final exam)

12 questions, passing score 9/12. Application/scenario-flavored, one per chapter (1–11) plus one synthesis/routing question, all grounded in the corrected-canonical facts.

Quiz IDAnswerChapterItemConfidence
q1bCh1Mid-session degradation = the finite context window / attention budget suffering context rot; apply the four strategies (write / select / compress (/compact) / isolate in subagents). A bigger model doesn't remove the finite-window problem.High
q2aCh2/Ch3 + Ch11 correctionCLAUDE.md is persistent project memory/context ("context, not enforced configuration"), NOT a system-prompt edit; it instructs but doesn't guarantee — for a must-hold rule, use a hook.High — carries the Ch11 re-audit CLAUDE.md-vs-system-prompt correction.
q3cCh3A must-run-every-commit step belongs in a hook (harness-executed deterministically on its event, can block on exit 2), not a skill's prose (instructs, not guaranteed). Hooks are not a security boundary.High
q4dCh4Team-shared MCP server → --scope project writes the committed .mcp.json; default scope is local (~/.claude.json), so a bare claude mcp add does not create .mcp.json; local installs need the -- separator; scopes are local/project/user — no 'session' scope; ~/.claude/settings.json is not the MCP file.High — carries the full Ch4 scope/path corrections.
q5aCh5@claude → anthropics/claude-code-action@v1 runs headless on the Agent SDK, works on a separate branch under the claude/ prefix (never main), pushes a branch + PR for human review (no auto-merge by default); two credentials — the scoped Claude GitHub App + a separate model secret (OAuth token or API key).High — carries the Ch5 @v1 / branch / no-auto-merge corrections.
q6bCh6Plan mode is read-only: reads/searches/analyzes/MCP (with normal prompts) but cannot edit/create/delete/commit/install until you approve and exit. Distinct from the in-session to-do list.High
q7cCh7Read-only tools allowlist (Read/Grep/Glob — no Write/Edit/Bash); delegate via the Agent tool (formerly Task); subagent runs in its own isolated context window and returns only a summary (omitting tools would over-privilege).High
q8aCh8An output style (it modifies the system prompt); select via /config → Output style or the outputStyle setting (the standalone /output-style was removed); read once at session start (effective after /clear); a custom style drops coding instructions unless keep-coding-instructions: true.High
q9bCh9Progressive disclosure: selection routes on the listing / description (when_to_use appended; first body paragraph only if no description) — fix the description, not deep body text; the body persists in-session (recurring token cost — keep it lean); scripts via ${CLAUDE_SKILL_DIR}; allowed-tools is a pre-approval grant, not a trigger or restriction.High
q10bCh10A cloud/background session is a fresh clone — repo-committed config travels (CLAUDE.md, .claude/settings.json hooks, .mcp.json, `.claude/skills\agents\commands); user-local config doesn't, and claude mcp add writes local user config (not the repo). Fix: commit the server to .mcp.json. **worktree.baseRef` governs local worktrees, not cloud checkout.**High — carries the Ch10 re-audit corrections.
q11cCh11"Deep agent" is a community/LangChain-articulated term, NOT an official Anthropic/Claude Code label (Anthropic more commonly discusses long-running / long-horizon work); current task-tracking is the **Task* family** (TodoWrite/TodoRead legacy/disabled by default); the four building blocks = detailed system prompt · planning tool · subagents · filesystem.High — carries the Ch11 "deep agent" terminology + Task* corrections.
q12aSynthesis (Ch3, Ch4, Ch7, Ch9)Routing: (a) recurring chore → Skill; (b) heavy/isolating audit → Subagent; (c) external/live data → MCP server; (d) must-run-every-time → Hook. Matching the shape of the work to the primitive is the synthesis skill the course builds toward.High — the one cross-chapter synthesis item.

Drift / Corrections Applied

The Capstone has no book source, so there is no book wording to correct here. Its sole drift discipline is: it asserts only the post-audit, corrected-canonical forms of every Claude Code surface it touches — i.e. it is consistent with the 2026-06-16 course-wide sweep and the Chapter 10/11 re-audits, and does not reintroduce any stale wording the chapter audits removed.

Concretely, the capstone asserts the corrected forms (and never the stale ones):

SurfaceStale form the capstone does NOT useCorrected form the capstone usesWhere it appears
Subagent delegation tool"Task tool" as the current nameAgent tool (formerly Task)Stage 4, q7
Task trackingTodoWrite/TodoRead as current**Task* family current; TodoWrite/TodoRead legacy/disabled by default**q11, Figure 12.A label
MCP scopes"project / user / session"local / project / user (no 'session'); default local; --scope project → committed .mcp.json; -- separatorStage 6, q4
GitHub Action@beta; auto-merge; commits to main@v1; claude/ branch never main; no auto-merge by default; two credentials (scoped App + model secret); headless Agent SDKStage 6, q5
Output stylesthe /output-style command/config (or the outputStyle setting); /output-style removed; read once at session start; keep-coding-instructionsStage 3, q8
"Deep agent"an official Anthropic/Claude Code labela community/LangChain-articulated term; Anthropic discusses long-running / long-horizon workStage 6, q11
Cloud sessions"no config at all" / mirrors your machinefresh clone; repo-committed config travels, user-local (incl. claude mcp add) doesn't; worktree.baseRef is local worktrees onlyq10
CLAUDE.md"rewrites the system prompt" / "enforced configuration" / "same lever as an output style"persistent project memory/context ("context, not enforced configuration"); instructs, doesn't guarantee; distinct from system-prompt customizationStage 0, Stage 6 ①, q2
Hooksa security boundarydeterministic, harness-executed on their event (can block on exit 2); not a security boundaryStage 0 aside, q3
Skill triggeringtrigger phrases in the body / allowed-tools triggers/restrictsroutes on the description listing; body persists in-session; ${CLAUDE_SKILL_DIR}; allowed-tools is a grantStage 3, q9
Plan modeedits then shows a plan / disables the modelread-only (reads/searches/MCP) — no edit/commit/install until approvedStage 1, q6
Canonical docs hostn/acode.claude.com (with docs.claude.com mirroring)throughout (consistency)

No extracted-chapters/ file exists to leave untouched; the corrected forms above are the capstone's only source-of-truth, inherited from the eleven chapter ledgers.

Grounding & conventions (in place of an Extraction caveat)

Because there is no PDF and no extract, the usual Extraction caveat does not apply. In its place, a reviewer should know:

  • No PDF / no extract / no .txt-or-.md source-of-truth. The lesson is the primary artifact. There is nothing to re-open for "exact book wording," because there is no book chapter — the unit is original synthesis. The design-of-record is work/capstone-design.md (approved 2026-06-16); it is a design spec, not a source text.
  • **All Claude Code behavior claims are grounded in the corrected-canonical facts established across the eleven chapter audits — specifically the surfaces enumerated in the Drift / Corrections** table above (the Agent tool not "Task tool"; Task* family not TodoWrite-as-current; MCP local/project/user scopes; the Action @v1; output styles via /config; "deep agent" as a community term; cloud repo-committed-config; CLAUDE.md as project memory not a system-prompt edit; hooks deterministic-not-a-security-boundary; plan mode read-only; skill selection routes on the description). The capstone introduces no new external sources and re-uses these corrected facts; it does not re-derive any claim from memory.
  • Intentional convention deviation — lab-shaped, not the standard lesson shape. The Capstone is project/lab-shaped, so it intentionally follows the practical-exercise pattern (Stages with copy-paste commands + an "Expected outcome" per stage), NOT the standard chapter lesson pattern (a > Analogy — … callout per numbered section + multiple original SVGs woven through the body). Accordingly it has one closing analogy ("the solo flight") and one original SVG (Figure 12.A) — by design, not by omission. This is the correct shape for a hands-on finale; a reviewer should not flag the missing per-section analogies or additional diagrams as a defect.
  • Title / numbering. Rendered as "Capstone Project" (not "Chapter 12"); kind: capstone, Part 4. Verify the chapter-page template does not hard-render "Chapter {number}" in a way that mislabels it.
  • Assessment shape differs from a chapter. 12 questions, passing score 9/12 (≈75%) — the only quiz in the course with more than 6 questions and a non-5 passing score. The generic quiz component handles both (passingScore is a field; questions is an array) — verify rendering and the "Passed" threshold during build verification.