Each table is one recurring choice: the signal in the stem, the answer it points to, and the discriminator that rules out the runner-up. Where the exam answer and today's product differ, the row gives the exam answer and says so; the detail is in the divergence log.
1. Prompt, or mechanism?
The test is compliance versus judgement, not "prompts are weak". Lessons: 1.4, 1.5, 2.3.
| Signal in the stem | Choose | Discriminator |
|---|
| "must", "always", "before any", "guaranteed", "100%" | Hook or programmatic prerequisite gate | A deterministic requirement needs a deterministic mechanism |
| One failure has a financial, identity, security or compliance cost | PreToolUse hook / gate | The cost of a single failure decides, not how often it happens |
| A measured skip rate that must reach zero (sample Q1: 12%) | Programmatic prerequisite blocking the downstream tools until the check has passed | Stronger prompts and few-shot examples only lower a rate |
| "prefer", "usually", "when appropriate"; formatting, style, calibration | Prompt: explicit criteria + few-shot examples | Judgement, not compliance (sample Q3's answer is a prompt fix) |
| Wrong tool picked between similar tools | Rewrite the tool descriptions | Selection is a description problem (sample Q2) |
| Right tools, wrong order | Gate the later tool on the earlier result | Ordering is enforcement; a routing classifier fixes availability, not order (Q1 option D) |
| One specific tool must be called in this response | Forced tool_choice ({"type": "tool", "name": "get_customer"}), then release to auto | Applies to one request only (product now differs, see the divergence log) |
| The rule must hold for the whole session | Hook | Forced tool_choice is not a session-wide ordering guarantee; left forced every turn it loops |
| Whether the agent has a tool at all | Tool distribution (tools, disallowedTools) | Availability, not behaviour |
| Amount above the autonomous limit | Hook deny whose reason names the escalation path | Never clamp the value silently with updatedInput |
| Block an action vs reshape its result | PreToolUse (before) vs PostToolUse with updatedToolOutput (after) | Blocking in PostToolUse is always wrong: the action already ran |
| Guarantee in Claude Code itself | Hook or settings.json | CLAUDE.md is guidance, not enforcement |
2. Which decomposition pattern?
Classifying question: can the subtasks be listed before the work starts? Lessons: 1.2, 1.6, 1.3.
| Signal in the stem | Choose | Discriminator |
|---|
| Subtasks known up front; the same aspects checked per item | Prompt chaining (fixed sequential pipeline) | Predictable structure; gates can sit between steps |
| "legacy", "unfamiliar", "investigate", open-ended scope | Dynamic adaptive decomposition (orchestrator-workers) | Discoveries must be able to change the remaining plan |
| Listable, but findings may change the approach | Hybrid: plan adaptively, then execute as a chain | A plan computed once and never revised is a fixed pipeline, not adaptive |
| Many files in one pass; uneven depth, contradictions | Per-file passes + a cross-file integration pass | Attention dilution; a bigger model or window does not fix it |
| Distinct request categories handled differently | Routing | Classify, then dispatch |
| Fixed steps per document, high volume, nothing waiting | Prompt chaining, with each stage run as a Message Batch | Fixed structure suits a chain; batch fits only if the deadline allows up to 24 h per stage (4.5) |
| Subagents all succeeded, report misses whole categories | Fix the coordinator's decomposition | The coordinator's logged subtasks indict it (sample Q7) |
| Subagents duplicate work or leave gaps | Brief each: objective, output format, source guidance, boundaries | Vague briefs, not too few subagents |
| Independent subtasks | Several Task calls in one coordinator response | Not across separate turns (product now differs, see the divergence log) |
| Coordinator does the work itself | Check allowedTools includes Task, then the subagent description, then the prompt | The guide's rule (product now differs, see the divergence log) |
3. Plan mode or direct execution?
Deciding question: is the approach already determined? Not difficulty, stakes or file count. Lesson: 3.4.
| Task in the stem | Choose | Discriminator |
|---|
| Architectural decision, several valid approaches (sample Q5: monolith to microservices) | Plan mode | The complexity is stated, so "start direct and switch if it gets hard" is wrong |
| Scope unknown until explored | Plan mode | Explore and design before committing to changes |
| Single-file fix with a clear stack trace | Direct execution | Approach already determined |
| Wide but mechanical (rename across 30 files) | Direct execution | Many files, one obvious approach |
| One file, two defensible designs | Plan mode | File count is not the criterion |
| Plan the migration, then apply it | Plan, approve, then direct | "Stay in plan mode throughout" is wrong |
| Verbose discovery is filling the context | Explore subagent | Plan mode protects the codebase; Explore protects the context window |
| Unclear requirements, unfamiliar domain | Interview pattern first, then plan | Claude asks the questions before designing (3.5) |
4. Which context mechanism?
Two questions: who gets it, and when does it load? Lessons: 3.1, 3.2, 3.3.
| Need | Choose | Discriminator |
|---|
| Universal standard, every session | Project CLAUDE.md | Always loaded |
| Convention for a file type scattered across directories (co-located tests) | .claude/rules/ file with a paths: glob | Matches by path, not by directory (sample Q6) |
| Convention for one subtree only | Directory CLAUDE.md or a path-scoped rule | A directory file is bound to its directory |
| Procedure run on demand | Skill (or command) | On demand, not always-on guidance |
| Skill produces verbose or exploratory output | Skill with context: fork | Output stays out of the main conversation |
| Guidelines-only skill, or one that needs the conversation | No context: fork | A fork never sees the conversation |
| Must hold every time | Hook | Deterministic |
| Shrink what loads into context | Rules with paths: | @import and rules without paths: load at launch |
| Organise a large CLAUDE.md for editing | @import or .claude/rules/ | Organises; saves no context |
| Check what actually loaded | /memory | Exam answer (product now differs, see the divergence log) |
| Convention must apply automatically to matching files | Path rule, not a skill | A skill relies on invocation (Q6 option C) |
5. Which scope?
Lessons: 3.1, 3.2, 2.4.
| Question | Choose | Discriminator |
|---|
| Every teammate gets it on clone or pull | Project: .claude/commands/, .claude/skills/, .claude/rules/, CLAUDE.md, .mcp.json, .claude/settings.json | Committed to the repository (sample Q4) |
| Personal, all my projects | User: ~/.claude/ files; MCP user scope in ~/.claude.json | Never shared |
| Personal, this project only, uncommitted | CLAUDE.local.md, .claude/settings.local.json; MCP local scope (in ~/.claude.json) | MCP "local" is not settings.local.json |
| Organisation-wide, cannot be excluded | Managed policy | Above every other level |
| Personal variant of a team skill | Personal scope, different name | Same name silently shadows the team's (personal beats project) |
| Team MCP server that needs a token | .mcp.json with ${VAR} expansion, committed | The token stays in each developer's environment |
| New teammate gets different behaviour after cloning | Move conventions from someone's ~/.claude/CLAUDE.md to project level | User-level files never travel |
.claude/config.json with a commands array | Not an option | Does not exist |
6. Which error response?
Read isRetryable for whether to try again at all and errorCategory for what trying again needs. Lessons: 2.2, 5.3.
| Category | isRetryable | Agent action | Discriminator |
|---|
| Transient (timeout, service unavailable) | true | Retry locally with backoff; propagate a structured error if still unresolved | Resend unchanged once the service recovers |
| Validation (bad format, missing field) | true in the lessons; the guide sets no value | Fix the input, then call again | Never resend unchanged; answer by behaviour |
| Business (policy violation) | false | Explain in customer terms; take the permitted alternative, often escalation | A rule refuses every time |
| Permission (access denied) | false | Propagate at once, naming the resource; escalate or use other credentials | A different principal, not a different wording |
| Valid empty result | Not an error (isError: false, zero results) | Report "no matches" | Retrying it wastes calls and triggers false escalation |
| Unresolved subagent failure | — | Return failure type, what was attempted, partial results, alternatives (sample Q8) | The coordinator's next action is derivable from the error alone |
| Business refusal raised as a protocol error | — | Return a tool execution error (isError: true) instead | Clients may never pass protocol errors to the model |
7. Escalate, resolve, or ask?
Lessons: 5.2, 1.4.
| Situation | Choose | Discriminator |
|---|
| Customer asks for a human, in any phrasing, at any point | Escalate immediately, no investigation first | An explicit request is a trigger on its own |
| Frustrated, issue covered by policy | Acknowledge, offer the resolution once; escalate only if they then ask for a person | Sentiment is not a trigger |
| Policy silent or conflicting | Escalate | Refusing invents policy as much as granting does |
| Customer asks for an exception | Escalate | Even when policy already says no |
| Policy says no and the customer accepts | Explain the outcome | No exception requested |
| Complex but covered, tools available | Resolve | Complexity is not a trigger (sample Q3's failure) |
| No meaningful progress after a genuine attempt | Escalate | Inability to progress is a trigger |
| Three concerns, one stuck | Resolve two; escalate only the stuck one with a structured handoff | Not the whole conversation |
| Amount above the autonomous limit | Gate blocks; escalate with a structured handoff | Money is a gate, not a prompt judgement |
| Several customer records match | Ask for an identifier that splits the candidates (order number, postcode) | Never pick by recency or activity; never read the candidates out |
| Unsure of a fact the customer can supply | Ask a clarifying question | Facts → ask; policy → escalate |
| Handoff contents | Customer ID, root cause, refund amount, recommended action | The human has no transcript access |
| Poor escalation calibration | Explicit criteria + few-shot examples in the system prompt | Before classifiers, sentiment or self-reported confidence |
8. Which prompting technique?
Lessons: 4.1, 4.2, 4.3, 4.4, 3.5.
| Symptom | Choose | Not this |
|---|
| Formats vary despite detailed instructions | Few-shot showing the exact output shape | More instructions; lower temperature |
| Ambiguous cases handled inconsistently | 2-4 examples of the ambiguous cases, each with reasoning | Confidence threshold; majority voting |
| Handles the constructs in its examples but not novel ones | Add the reasoning to the existing examples | One more example per construct |
| A field comes back null on some layouts only | Few-shot across those structures, plus nullable where the data can truly be absent | Bigger context window |
| False positives on a pattern used deliberately | Contrast pairs of acceptable and genuine cases | Confidence filtering; dropping the category |
| "Be conservative" / "only high-confidence findings" | Explicit report and skip criteria | Vague caution |
| Severity labels drift | Severity criteria with a concrete code example per level | Prose severity definitions |
| One category's false positives sink trust in all | Temporarily disable that category, refine, re-enable | Keeping every category live while iterating |
| Malformed or prose output where JSON is needed | tool_use with a JSON schema; tool_choice any or forced (product now differs, see the divergence log) | More examples; prompt-only JSON |
| Plausible values for fields the source lacks | Nullable fields + a prompt line saying null is correct | Every field required; a tool_choice change |
| Labels outside the allowed set | A tool enum with "other" + detail or "unclear" | More examples of each label |
| Line items do not sum to the total | Extract calculated_total and stated_total; retry with the specific error | Schema alone (it catches syntax, not semantics) |
| Information absent from the source | Null or human review | Retrying |
| Required step skipped in some cases | Programmatic enforcement | Few-shot examples |
| Prose spec interpreted inconsistently (Claude Code) | 2-3 concrete input/output examples | Rewriting the prose longer |
| Complex transform, many edge cases | Test-driven iteration: paste the failures | Describing the failures |
9. Synchronous or batch?
Deciding question: is anything waiting on the result? Lesson: 4.5.
| Signal | Choose | Discriminator |
|---|
| A person or pipeline is blocked (pre-merge check) | Synchronous | Batch has no latency SLA (sample Q11) |
| Overnight, weekly, backlog | Message Batches (50% cheaper, up to 24 h) | Latency-tolerant |
| Needs your own tool executed mid-request | Synchronous | No multi-turn tool calling inside a batch request |
| SLA of 24 h or less | Synchronous | No submission frequency gets a guarantee below the 24 h window |
| Rolling SLA | Submission gap + 24 h + downstream ≤ SLA | 30 h SLA → every 4 h in the guide's example (6 h at most with nothing downstream) |
| Fixed deadline | Latest submission = deadline − 24 h − downstream | Lead time is not the SLA |
| "Results come back out of order" | Correlate by custom_id | Not a reason to avoid batch (Q11 option C) |
| "Batch with a timeout fallback to real-time" | Reject | Unnecessary complexity (Q11 option D) |
| Some requests failed | Resubmit only the failed custom_ids with the fix (oversized → chunk, with derived ids) | Never re-run the whole batch or resubmit unchanged |
| Before a large run | Refine the prompt on a representative sample, synchronously | Each batch round can take up to 24 h |
processing_status: in_progress → canceling (only after a cancel) → ended. Result types: succeeded, errored, canceled, expired; only succeeded is billed.
10. Which review architecture?
Lessons: 4.6, 3.6, 4.4.
| Problem | Choose | Discriminator |
|---|
| Generator missed its own bugs | Independent instance without the generating reasoning | Same-session review confirms rather than challenges |
| 14 files, uneven and contradictory feedback | Per-file passes + integration pass (sample Q12) | Attention, not capacity |
| "Bigger context window" | Reject | Larger windows do not fix attention quality |
| "Flag only what 2 of 3 runs agree on" | Reject | Suppresses intermittently caught real bugs |
| Duplicate comments on every push | Prior findings in context + instruction to report only new or unaddressed issues | Both halves are needed |
| Generated tests duplicate existing ones | Existing test files in context | The model cannot avoid what it cannot see |
| Too many findings for reviewers | Route by severity × confidence, threshold calibrated on labelled data | Raw self-reported confidence is uncalibrated |
| Which findings are being dismissed | detected_pattern field; dismissal rate per pattern | Not every dismissal is a false positive |
| Output must feed a PR-comment bot | -p with --output-format json + --json-schema | Regex-parsing prose breaks |
11. Session continuation
The test is whether the saved history is still mostly true, not how many files changed or how recently. Lessons: 1.7, 5.4.
| State | Choose | Discriminator |
|---|
| Prior context still valid | Resume (--resume with the session name) | Nothing to correct |
| Prior context mostly valid; the changes are known and can be listed | Resume and name the changed files for targeted re-analysis | Re-exploring 50 files when 3 changed wastes the session budget |
| Tool results stale as a body (heavy churn, rebase, long gap) | Fresh session + injected structured summary | The guide calls this "more reliable"; old reads sit unmarked beside new ones |
| Two approaches to compare from one analysis | fork_session once per approach | Baseline paid once; branches cannot see each other |
| Stale context, and "fork it" is offered | Reject | A fork inherits the same stale history |
| Most recent conversation in this directory | --continue | No ID tracking; not for a specific older session |
| Long multi-agent run crashed | Manifest: skip completed phases, re-delegate pending items, inject outputs + scratchpad path | --resume restores one conversation, not many agents' state |
| Specifics fading mid-session | Write the scratchpad, then /compact | Restarting without saving state loses the findings |
| Need to undo file changes | Checkpointing or version control | Sessions persist conversation only |
- Summary to inject: established findings, files changed since, open questions, next step — conclusions, not raw tool output.
12. Provenance and conflicting sources
Lessons: 5.6, 5.3, 1.3.
| Situation | Choose | Discriminator |
|---|
| Findings passed between agents | Structured claim-source records: claim, source URL, document name, excerpt, publication date | Prose attribution dies at synthesis |
| Two credible sources disagree | Annotate both values with their sources | Never pick, average, or prefer the newer or bigger one |
| Different figures from different years | Capture publication and collection dates; report a trend if that explains it | Different numbers are not automatically a contradiction |
| Analysis agent finds a conflict | Report both; the coordinator decides before synthesis | A "recommended value" from analysis is still analysis resolving it |
| A source or topic could not be retrieved | Coverage-gap annotation with an explicit no-claim | Not a blanket caveat, not an estimate |
| Citations lost in the final report | Preserve claim-source mappings through synthesis | Content and metadata as separate fields |
| Rendering the report | Financial data → tables; news → prose; technical findings → structured lists | Never one format for everything |
| Report structure | Well-established · contested · coverage gaps | Source hedges kept ("suggests" never becomes "shows") |
13. Scratchpad, structured findings, or manifest?
They are not three rival files: structured findings is a format, scratchpads and state exports can use it, and the manifest points to them. Lessons: 5.4, 5.1, 5.6.
| Scratchpad file | Structured findings | Manifest |
|---|
| What it is | Notes an agent keeps while it works: exact names, file:line | A format: findings as machine-readable fields, not prose | Index of the run's state: per-phase status, outputs, pending items, what failed last |
| Question it answers | "What have I found so far?" | "What exactly was found, in a form code can process?" | "Where are we, and what is left?" |
| Problem it solves | Context degradation; survives /compact | Reliable parsing, aggregation, attribution | Crash recovery across agents |
| Who reads it | The same agent, read back before each step | The coordinator, the next agent, CI | The coordinator, on resume |
| When it is written | After each discovery | Whenever an agent returns results | After every significant step — not per phase, at shutdown or at a context threshold |
| Failure mode | Written but never read back: a log, not a mitigation | Prose blobs that lose source and date | Written at phase boundaries: a crash loses the whole phase |
14. Degradation, dilution, or lost in the middle?
All three produce "inconsistent" output; the discriminator is the axis. Lessons: 5.4, 1.6, 4.6, 5.1.
| Signal in the stem | Diagnosis | Fix |
|---|
| Long session; the problem appears late | Context degradation | Scratchpad + read-back, subagent delegation, /compact after persisting |
| "Typical patterns" instead of the specific classes found earlier | Context degradation (the guide's named tell) | Scratchpad + read-back |
| Vague or slightly wrong identifiers; re-reading files already read | Context degradation | Scratchpad with exact names and file:line |
| Verbose discovery filling the main context | Context degradation (the cause) | Explore subagent; trim tool output before it enters history |
| One pass over many files; detailed on some, superficial on others | Attention dilution | Per-file passes + integration pass |
| Same pattern flagged in one file, approved in another, same output | Attention dilution | Per-file passes + integration pass |
| A key fact in the middle of one long input is ignored | Lost in the middle | Key-findings summary first, headed sections, task at the end |
| Context degradation | Attention dilution | Lost in the middle |
|---|
| Axis | Time: accumulates over turns | Width: too many targets in one pass | Position inside one input |
| Inconsistency is between | Earlier and later answers | Items within one answer | The middle and the ends |
| Wrong fix | Bigger context window (buries specifics deeper) | Bigger context window (capacity is not attention) | "Pay attention to everything" in the prompt |
| Quick test | Did it work earlier in the session? | Is the inconsistency inside one response? | Was the missed fact mid-input? |
Lesson: 2.5.
| Need | Choose | Not this |
|---|
| Find callers, imports, a string in code | Grep (contents) | Glob |
Find files by name pattern (**/*.test.tsx) | Glob (paths) | Grep |
| Targeted change to a file | Edit with a unique old_string | Read + Write by default |
| Edit's anchor text is not unique | Widen the anchor where one is on offer; otherwise Read + Write (the guide's fallback) | Retrying the same Edit |
| Trace a deprecated function | Grep callers → Glob sibling tests → Grep again for wrappers and re-exports | Reading every file up front |
| Agent prefers Grep over an MCP search tool | Improve the MCP tool's description | Renaming it to mimic a built-in |
| Agent needs to see what exists (catalogue, schema) | MCP resource (content), not a tool (action) | Many exploratory tool calls |