Skip to content
CCAR-FAcademy CCAR-F

Diagram gallery (QA)

47 specs across 7 kinds. Rendered from data — this page is the Phase 2 verification surface.

comparison

1.5 d1-hook-vs-prompt-enforcement 6 nodes · 4 edges

Apply Agent SDK hooks for tool call interception and data normalization

Hook enforcement vs prompt guidanceGive the learner a decision rule: hard business rules go in hooks for deterministic guarantees, judgment calls go in the prompt.Hook enforcementprompt guidanceHard business ruleHard businessruleInterception hookInterception hookDeterministic guaranteeDeterministicguaranteeJudgment callJudgment callPrompt instructionPrompt instructionProbabilistic complianceProbabilisticcompliancerefund ceiling, prerequisiteorderingenforced on tool input in codetone,replacement-before-refundpreferencenon-zero failure rate accepted
Hook enforcement vs prompt guidance

Give the learner a decision rule: hard business rules go in hooks for deterministic guarantees, judgment calls go in the prompt.

Click a rule type to reveal a worked example of each.

1.6 d1-chaining-vs-dynamic-decomposition 6 nodes · 4 edges

Design task decomposition strategies for complex workflows

Prompt chaining vs dynamic decompositionLet the learner pick a decomposition pattern from one property: whether the subtasks are enumerable before work begins.Prompt chainingdynamic decompositionSubtasks knowable up frontSubtasksknowable upfrontFixed sequential pipelineFixed sequentialpipelineIntegration pass addedIntegration passaddedSubtasks emerge from findingsSubtasksemerge fromfindingsDynamic adaptive decompositionDynamic adaptivedecompositionPlan regenerated each stepPlan regeneratedeach stepprompt chainingavoids attention dilutionopen-ended investigationabsorbs new dependencies
Prompt chaining vs dynamic decomposition

Let the learner pick a decomposition pattern from one property: whether the subtasks are enumerable before work begins.

2.1 d2-tool-overlap-to-purpose-specific 6 nodes · 6 edges

Design effective tool interfaces with clear descriptions and boundaries

From overlapping tools to purpose-specific toolsShow that misrouting comes from overlapping descriptions, and that the two fixes are renaming with a scoped description and splitting a generic tool into purpose-specific tools with their own contracts. The graph converges top-down rather than splitting into a left and a right half: the two vague tools head it, the renamed and split tools sit below them, and the broken-versus-fixed contrast is carried by color — vague tools and the misrouted call in red, the purpose-specific tools and the correct call in green. The three split tools share one grouped box so the fixed side stays readable.analyze_content (vague)analyze_content(vague)analyze_document (vague)analyze_document(vague)Misrouted tool callMisrouted toolcallextract_web_resultsextract_web_resultsextract_data_points, summarize_content, verify_claim_against_sourceextract_data_points,summarize_content,verify_claim_against_sourceCorrect tool callCorrect tool callnear-identical descriptionoverlapping purposerename, web-specificdescriptionsplit by output contractunambiguous boundaryunambiguous boundary
From overlapping tools to purpose-specific tools

Show that misrouting comes from overlapping descriptions, and that the two fixes are renaming with a scoped description and splitting a generic tool into purpose-specific tools with their own contracts. The graph converges top-down rather than splitting into a left and a right half: the two vague tools head it, the renamed and split tools sit below them, and the broken-versus-fixed contrast is carried by color — vague tools and the misrouted call in red, the purpose-specific tools and the correct call in green. The three split tools share one grouped box so the fixed side stays readable.

3.6 d3-review-session-isolation 6 nodes · 5 edges

Integrate Claude Code into CI/CD pipelines

Self-review vs independent review instanceExplain why the session that generated the code is a weaker reviewer than a fresh instance that sees only the diff and the project standards.Self-reviewindependent review instanceSession A (wrote the code)Session A (wrotethe code)Session B (independent reviewer)Session B(independentreviewer)Carries its own assumptionsCarries its ownassumptionsSees only diff plus CLAUDE.mdSees only diffplus CLAUDE.mdMisses defects it justifiedMisses defects itjustifiedJudges code on its meritsJudges code onits meritsdesign rationale still incontextprimed to consider themcorrectno prior rationalestronger defect detectionextended thinking is not asubstitute for a separatereview instance
Self-review vs independent review instance

Explain why the session that generated the code is a weaker reviewer than a fresh instance that sees only the diff and the project standards.

4.1 d4-vague-vs-explicit-criteria 9 nodes · 7 edges

Design prompts with explicit criteria to improve precision and reduce false positives

Vague instruction vs explicit categorical criteriaShow that precision comes from replacing the decision rule with a decidable predicate, not from asking the model to be more confident or conservative — and show the downstream trust consequence of each path.Vague instructionVagueinstructionExplicit categorical criteriaExplicitcategoricalcriteriaModel invents its own barModel invents itsown barModel applies a fixed testModel applies afixed testInconsistent classificationInconsistentclassificationConsistent classificationConsistentclassificationHigh false positive rateHigh falsepositive rateFindings acted onFindings acted onTrust erodes across all categoriesTrust erodesacross allcategoriescheck comments are accurate,no decidable predicateflag only on codecontradiction, decidablepredicatevaries per runrepeatablenoisesignalspillover
Vague instruction vs explicit categorical criteria

Show that precision comes from replacing the decision rule with a decidable predicate, not from asking the model to be more confident or conservative — and show the downstream trust consequence of each path.

5.1 d5-position-effects-layout 9 nodes · 8 edges

Manage conversation context to preserve critical information across long interactions

Naive concatenation vs. structured aggregationMake clear that the cure for the "lost in the middle" effect is input layout — summary first, addressable sections below — rather than a stronger instruction to the model.Naive concatenationNaiveconcatenationSubagent report 1Subagent report 1Subagent report 2 (middle)Subagent report 2(middle)Subagent report 3Subagent report 3Answer omits middle findingsAnswer omitsmiddle findingsStructured layoutStructured layoutKey findings summary firstKey findingssummary firstSectioned detail with headersSectioned detailwith headersAnswer covers all reportsAnswer covers allreportsstart, read reliablyburiedend, read reliablylost in the middleevery report, condensedaddressable blocksprimacy positionretrievable by header
Naive concatenation vs. structured aggregation

Make clear that the cure for the "lost in the middle" effect is input layout — summary first, addressable sections below — rather than a stronger instruction to the model.

5.3 d5-failure-vs-empty-result 8 nodes · 6 edges

Implement error propagation strategies across multi-agent systems

Access failure vs. valid empty resultCement the distinction that drives most items here, and show what each of the two anti-patterns costs the coordinator.Access failureAccess failureValid empty resultValid emptyresultRetry or reroute decisionRetry or reroutedecisionAccept as evidenceAccept asevidenceAccess failure disguised as emptyAccess failuredisguised asemptyFalse confidence in reportFalse confidencein reportEmpty reported as generic errorEmpty reported asgeneric errorWasted retries, lost contextWasted retries,lost contextcorrect, source neverconsultedanti-pattern, silentlysuppressedgap reads as findingcorrect, query ran and matchednothinganti-pattern, evidencediscardedcoordinator flying blind
Access failure vs. valid empty result

Cement the distinction that drives most items here, and show what each of the two anti-patterns costs the coordinator.

5.6 d5-conflicting-values-handling 8 nodes · 7 edges

Preserve information provenance and handle uncertainty in multi- source synthesis

Arbitrary selection vs. annotated conflictShow why keeping both conflicting values with attribution, methodology and dates is the only option that lets the coordinator reconcile knowingly.Two credible sources disagreeTwo crediblesources disagreeArbitrary selectionArbitraryselectionSingle unsourced numberSingle unsourcednumberAnnotated conflictAnnotatedconflictBoth values with attributionBoth values withattributionCoordinator reconciles knowinglyCoordinatorreconcilesknowinglyDates and methodology recordedDates andmethodologyrecordedNo temporal difference misreadNo temporaldifferencemisreadanti-patterndisagreement invisibleboth values keptsource, excerpt, methoddecide before synthesis2023 vs 2026 dataprevented, not adjudicated
Arbitrary selection vs. annotated conflict

Show why keeping both conflicting values with attribution, methodology and dates is the only option that lets the coordinator reconcile knowingly.

flowchart

1.2 d1-hub-and-spoke-coordinator 6 nodes · 11 edges

Orchestrate multi-agent systems with coordinator-subagent patterns

Hub-and-spoke coordinator with isolated subagentsShow that all communication radiates from the coordinator, that there are no spoke-to-spoke edges, and that each subagent has its own isolated context.Coordinator agentCoordinatoragentWeb search subagentWeb searchsubagentDocument analysis subagentDocumentanalysissubagentSynthesis subagentSynthesissubagentReport subagentReportsubagentdelegated subtopic pluscontextdelegated documentsplus contextall prior findings inpromptapproved synthesisfindings or structurederrorfindings or structurederrordraft for gap evaluationIsolated context per subagent
Hub-and-spoke coordinator with isolated subagents

Show that all communication radiates from the coordinator, that there are no spoke-to-spoke edges, and that each subagent has its own isolated context.

Click the coordinator to highlight the delegation and return edges that touch it.

1.2 d1-iterative-refinement-loop 7 nodes · 7 edges

Orchestrate multi-agent systems with coordinator-subagent patterns

Coordinator-driven iterative refinementShow that synthesis is evaluated for coverage gaps and re-delegated with targeted queries until coverage is sufficient, rather than emitted after one forward pass.Enumerate topic sectorsEnumeratetopicsectorsPartition scope across subagentsPartitionscope acrosssubagentsCollect subagent findingsCollectsubagentfindingsInvoke synthesisInvokesynthesisEvaluate synthesis for gapsEvaluatesynthesisfor gapsRe-delegate targeted queriesRe-delegatetargetedqueriesEmit final reportEmit finalreportone sector persubagentparallel executionfindings passed inpromptcoordinatorcompares tosectorsgaps foundnew findingscoverage sufficient
Coordinator-driven iterative refinement

Show that synthesis is evaluated for coverage gaps and re-delegated with targeted queries until coverage is sufficient, rather than emitted after one forward pass.

one transition at a time
1.4 d1-prerequisite-gate 6 nodes · 7 edges

Implement multi-step workflows with enforcement and handoff patterns

Prerequisite gate blocking a downstream tool callShow that the gate sits between the model's tool request and execution, denies with an actionable reason, and records verified state only from the prerequisite tool's result.Claude requests a toolClauderequests atoolPrerequisite gatePrerequisitegateVerified customer ID present?Verifiedcustomer IDpresent?Execute toolExecutetoolDeny with actionable reasonDeny withactionablereasonRecord verified state from resultRecordverified statefrom resultoutgoing tool callinterceptedtool is gatedtool is not gatedyesnoagent callsget_customerinsteadget_customerreturned verified ID
Prerequisite gate blocking a downstream tool call

Show that the gate sits between the model's tool request and execution, denies with an actionable reason, and records verified state only from the prerequisite tool's result.

one transition at a time
1.4 d1-multiconcern-decomposition 6 nodes · 7 edges

Implement multi-step workflows with enforcement and handoff patterns

Decomposing a multi-concern request over shared contextShow identity established once, three concern branches investigated in parallel against that shared context, and a single synthesized resolution.Multi-concern customer messageMulti-concerncustomermessageVerify identity onceVerifyidentityonceDamaged item branchDamageditem branchDuplicate charge branchDuplicatechargebranchAddress change branchAddresschangebranchSynthesize unified resolutionSynthesizeunifiedresolutionget_customershared verifiedcontextshared verifiedcontextshared verifiedcontextreplacement orrefundrefund amountaccount updated
Decomposing a multi-concern request over shared context

Show identity established once, three concern branches investigated in parallel against that shared context, and a single synthesized resolution.

one transition at a time
1.5 d1-posttooluse-normalization 5 nodes · 6 edges

Apply Agent SDK hooks for tool call interception and data normalization

PostToolUse normalization before the model sees the resultShow that heterogeneous MCP results pass through a PostToolUse hook and reach the model in a single canonical shape.ClaudeClaudeMCP tool A epoch secondsMCP tool AepochsecondsMCP tool B ISO 8601MCP tool BISO 8601PostToolUse hookPostToolUsehookCanonical result in contextCanonicalresult incontexttool_use requesttool_use requestraw result1772585501raw result2026-03-01T12:00:00ZISO 8601 plusstatus vocabularyone consistentformat only
PostToolUse normalization before the model sees the result

Show that heterogeneous MCP results pass through a PostToolUse hook and reach the model in a single canonical shape.

one transition at a time
1.6 d1-perfile-plus-integration-pass 5 nodes · 5 edges

Design task decomposition strategies for complex workflows

Per-file passes plus a cross-file integration passShow that equal-depth per-file analysis and a dedicated cross-file pass together cover what a single combined pass cannot.Pull request with many filesPull requestwith manyfilesPer-file local analysisPer-filelocalanalysisPer-file summariesPer-filesummariesCross-file integration passCross-fileintegrationpassMerged review findingsMergedreviewfindingsone focused passper file in parallelequal depth forevery filedata flow andconsistency onlylocal issuesinteraction andconsistency issues
Per-file passes plus a cross-file integration pass

Show that equal-depth per-file analysis and a dedicated cross-file pass together cover what a single combined pass cannot.

one transition at a time
1.7 d1-resume-fork-restart-decision 8 nodes · 8 edges

Manage session state, resumption, and forking

Resume, fork, or start fresh?Give the learner a decision path keyed on whether prior tool results are still valid and whether divergent branches are needed.Prior session existsPriorsessionexistsAre prior tool results still valid?Are prior toolresults stillvalid?Resume with --resume session-nameResume with--resumesession-nameInform agent which files changedInform agentwhich fileschangedStart fresh with structured summaryStart freshwithstructuredsummaryNeed divergent approaches?Needdivergentapproaches?fork_session from shared baselinefork_sessionfrom sharedbaselineContinue in the one sessionContinue inthe onesessionassess stalenessmostly validresults are stalesome filesmodifiedcontext re-groundednothing changedyes, comparealternativesno, single line ofwork
Resume, fork, or start fresh?

Give the learner a decision path keyed on whether prior tool results are still valid and whether divergent branches are needed.

one transition at a time

Click a decision node to highlight the branch it selects.

1.7 d1-fork-session-branches 5 nodes · 5 edges

Manage session state, resumption, and forking

fork_session branches from a shared analysis baselineShow that one expensive baseline is inherited by independent branches whose contexts never mix, and that only one branch is carried forward.Shared analysis baselineSharedanalysisbaselineFork A integration testsFork AintegrationtestsFork B unit tests with injectionFork B unittests withinjectionCompare measured outcomesComparemeasuredoutcomesChosen approach carried forwardChosenapproachcarriedforwardfork_session,inherits baselinefork_session,inherits baselinecoverage, runtime,refactor costcoverage, runtime,refactor costkeep one branch
fork_session branches from a shared analysis baseline

Show that one expensive baseline is inherited by independent branches whose contexts never mix, and that only one branch is carried forward.

one transition at a time
2.2 d2-subagent-local-error-recovery 9 nodes · 10 edges

Implement structured error responses for MCP tools

Local recovery in a subagent, propagation only when neededShow the decision path from an MCP tool result to either local recovery or propagation, and show that a valid empty result bypasses error handling entirely.Subagent calls MCP toolSubagentcalls MCPtoolValid empty resultValid emptyresultisError returnedisErrorreturnedInspect errorCategoryInspecterrorCategoryRetry locallyRetrylocallyResolved locallyResolvedlocallyPropagate to coordinatorPropagatetocoordinatorPartial results plus attemptsPartialresults plusattemptsCoordinator decides next stepCoordinatordecides nextstepquery succeeded,no matchestool failedread structuredmetadatatransient andisRetryable truevalidation,permission,businesssucceededretries exhaustedinclude what wasattemptedreroute, degrade orescalateno retry needed
Local recovery in a subagent, propagation only when needed

Show the decision path from an MCP tool result to either local recovery or propagation, and show that a valid empty result bypasses error handling entirely.

one transition at a time
2.4 d2-mcp-server-scope-and-discovery 7 nodes · 6 edges

Integrate MCP servers into Claude Code and agent workflows

MCP server scoping and connection-time discoveryShow which config file serves which audience, where environment variable expansion injects credentials, and that tools and resources from every configured server are discovered at connection time into one list the agent sees.Project scope .mcp.json, team-sharedProject scope.mcp.json,team-sharedUser scope ~/.claude.json, personalUser scope~/.claude.json,personalEnvironment variablesEnvironmentvariablesMCP client startupMCP clientstartupConnect to all serversConnect toall serversDiscover tools and resourcesDiscovertools andresourcesOne tool list for the agentOne tool listfor theagentcommitted, soevery clone gets itexperimentalservers, onemachineexpansion keepssecretsuncommittedevery configuredscopediscovery atconnection timeall serverssimultaneously
MCP server scoping and connection-time discovery

Show which config file serves which audience, where environment variable expansion injects credentials, and that tools and resources from every configured server are discovered at connection time into one list the agent sees.

one transition at a time
2.5 d2-edit-fallback-flow 7 nodes · 7 edges

Select and apply built-in tools (Read, Write, Edit, Bash, Grep, Glob) effectively

Edit and the Read + Write fallbackShow that Edit is gated on anchor-text uniqueness, and that the recovery path when it is not unique is Read followed by Write rather than another Edit attempt.Edit with anchor textEdit withanchor textIs anchor text uniqueIs anchortext uniqueEdit succeedsEditsucceedsEdit fails non-unique matchEdit failsnon-uniquematchRead full fileRead fullfileWrite full fileWrite fullfileFile modified reliablyFilemodifiedreliablymatch countcheckedexactly one matchzero or manymatchesload completecontentsrewrite with thechange appliedfallback pathpreferred path
Edit and the Read + Write fallback

Show that Edit is gated on anchor-text uniqueness, and that the recovery path when it is not unique is Read followed by Write rather than another Edit attempt.

one transition at a time
3.3 d3-path-scoped-rule-activation 7 nodes · 7 edges

Apply path-specific rules for conditional convention loading

How a path-scoped rule decides whether to loadMake clear that the paths glob in a rule file is evaluated against the files being edited, so only matching rules enter the session context while non-matching rules cost nothing.Session starts editing filesSessionstartsediting filesRead .claude/rules/ frontmatterRead.claude/rules/frontmatterRule has a paths field?Rule has apaths field?Edited files match a glob?Edited filesmatch aglob?Rule loaded into contextRule loadedinto contextRule stays out of contextRule staysout ofcontextAlways loadedAlwaysloadedenumerate rulefilesper rule fileno paths fieldunconditionalyesmatch, e.g.**/*.test.tsxno match, no tokencost
How a path-scoped rule decides whether to load

Make clear that the paths glob in a rule file is evaluated against the files being edited, so only matching rules enter the session context while non-matching rules cost nothing.

one transition at a time

Hover a rule outcome to see an example glob and the kind of edit that would trigger it.

3.4 d3-plan-mode-decision 8 nodes · 11 edges

Determine when to use plan mode vs direct execution

Plan mode or direct execution?Give the learner a repeatable decision path from a task description to plan mode, direct execution, or the combined plan-then-execute pattern, including where the Explore subagent fits.Task requestTaskrequestScope already clear and single-file?Scope alreadyclear andsingle-file?Multiple approaches or architectural impact?Multipleapproaches orarchitecturalimpact?Codebase unfamiliar or discovery verbose?Codebaseunfamiliar ordiscoveryverbose?Explore subagent returns summaryExploresubagentreturnssummaryPlan mode (explore and design)Plan mode(explore anddesign)Human reviews planHumanreviewsplanDirect executionDirectexecutionread the scopesignalsyes, e.g. onevalidation checknoyesno, well-understoodchangeyes, isolate thereadsno, plan directlyplan against thesummaryapprove, amend orreject cheaplyexecute theapproved approachrejected, redesignbefore any edit
Plan mode or direct execution?

Give the learner a repeatable decision path from a task description to plan mode, direct execution, or the combined plan-then-execute pattern, including where the Explore subagent fits.

one transition at a time

Click a decision node to highlight its outgoing branches and the labels already shown on them.

3.5 d3-iterative-refinement-loop 8 nodes · 8 edges

Apply iterative refinement techniques for progressive improvement

Picking the right refinement techniqueMap the symptom you are seeing to the refinement technique the guide prescribes, and show test-driven iteration as a closed loop with an objective stopping condition.First result is unsatisfactoryFirst result isunsatisfactoryOutput varies between runs?Outputvariesbetweenruns?Give 2-3 input/output examplesGive 2-3input/outputexamplesUnfamiliar domain, unclear requirements?Unfamiliardomain,unclearrequirements?Interview pattern (Claude asks questions)Interviewpattern (Claudeasksquestions)Write tests firstWrite testsfirstShare test failuresShare testfailuresAll tests pass — doneAll testspass — donediagnose thesymptomyes, pin thetransformationnoyes, surfaceconsiderations firstno, requirementsalready clearimplement and runiterate on failuresonlyobjective stoppingcondition
Picking the right refinement technique

Map the symptom you are seeing to the refinement technique the guide prescribes, and show test-driven iteration as a closed loop with an objective stopping condition.

one transition at a time
3.5 d3-batch-vs-sequential-fixes 8 nodes · 7 edges

Apply iterative refinement techniques for progressive improvement

One message or several? Interacting vs independent issuesMake the batching decision concrete: interacting fixes must be described together, independent fixes are more reliably handled one at a time.Several issues found in reviewSeveralissues foundin reviewDo fixes affect each other?Do fixesaffect eachother?Interacting issuesInteractingissuesIndependent issuesIndependentissuesOne message with all issuesOnemessagewith allissuesSequential focused iterationsSequentialfocusediterationsCoherent combined behaviorCoherentcombinedbehaviorEach change easy to verifyEachchangeeasy toverifythe key questionyes, e.g. TTL andinvalidationno, e.g. log text anda typofix togetherno fix invalidatesanotherfix one at a timesmaller blastradius
One message or several? Interacting vs independent issues

Make the batching decision concrete: interacting fixes must be described together, independent fixes are more reliably handled one at a time.

one transition at a time
3.6 d3-ci-review-pipeline 9 nodes · 11 edges

Integrate Claude Code into CI/CD pipelines

Claude Code in a CI review pipelineShow the full non-interactive review loop: what context goes in (CLAUDE.md, diff, existing tests, prior findings), which flags shape the output, and how structured findings become inline PR comments without duplicates.Pull request pushPull requestpushCI job startsCI job startsCLAUDE.md standards and criteriaCLAUDE.mdstandardsand criteriaDiff and existing testsDiff andexistingtestsPrior review findingsPrior reviewfindingsclaude -p (non-interactive)claude -p(non-interactive)--output-format json --json-schema--output-formatjson--json-schemaValidated findings JSONValidatedfindingsJSONPost inline PR commentsPost inlinePRcommentswebhook triggersworkflowreview criteria andfixturesavoid duplicatescenariosreport only new orunaddressedno prompt can hangthe jobindependent reviewinstancesuppress repeatsenforce outputshapefile, line, severityone comment perfindingnext push re-enterswith prior findings
Claude Code in a CI review pipeline

Show the full non-interactive review loop: what context goes in (CLAUDE.md, diff, existing tests, prior findings), which flags shape the output, and how structured findings become inline PR comments without duplicates.

one transition at a time

Click a context input to see what noise problem it prevents.

4.6 d4-multi-pass-review-architecture 9 nodes · 9 edges

Design multi-instance and multi-pass review architectures

Pass taxonomy, merge rule and confidence routingShow the two pass types with the question each asks and the question each structurally cannot answer, then how their findings are merged by authority and routed by calibrated self-reported confidence.Large multi-file change setLargemulti-filechange setPer-file local passPer-filelocal passCross-file integration passCross-fileintegrationpassBlind spot, caller preconditionsBlind spot,callerpreconditionsBlind spot, line-level detailBlind spot,line-leveldetailMerged findingsMergedfindingsVerification pass with confidenceVerificationpass withconfidenceAuto-posted PR commentsAuto-postedPRcommentsHuman triage queueHumantriage queueasks logic errorsand uncheckedinputsasks contract anddata-flowmismatchesstructurally cannotanswerstructurally cannotanswerlocal findings winon line-levelquestionsintegration findingswin on contractquestionsdedupe on locationand detectedpatternhigh confidence,calibrated thresholdlower confidence,calibrated threshold
Pass taxonomy, merge rule and confidence routing

Show the two pass types with the question each asks and the question each structurally cannot answer, then how their findings are merged by authority and routed by calibrated self-reported confidence.

one transition at a time

Hover a pass to see which question it asks and which it structurally cannot answer.

5.1 d5-context-layers 8 nodes · 10 edges

Manage conversation context to preserve critical information across long interactions

How the request payload is reassembled each turnShow that the prompt sent on every request is deliberately assembled from distinct layers in a fixed order — pinned case facts first, summarized older turns in the middle where the lost-in-the-middle effect bites, the last N turns verbatim at the end — and that pinned case facts bypass compaction entirely while older turns and tool results are lossy on purpose.Full session transcriptFullsessiontranscriptCase facts extractorCase factsextractorPinned case facts block (first)Pinned casefacts block(first)Compaction stepCompactionstepSummarized older turns (middle)Summarizedolder turns(middle)Last N turns verbatim (last)Last N turnsverbatim(last)Trimmed tool resultsTrimmedtool resultsAssembled request payloadAssembledrequestpayloadamounts, dates, IDsnever summarizedolder turns onlylossy proserecency windowkeep relevant fieldsread at the toplost-in-the-middlezoneattached to turnsstrongest recency
How the request payload is reassembled each turn

Show that the prompt sent on every request is deliberately assembled from distinct layers in a fixed order — pinned case facts first, summarized older turns in the middle where the lost-in-the-middle effect bites, the last N turns verbatim at the end — and that pinned case facts bypass compaction entirely while older turns and tool results are lossy on purpose.

one transition at a time

Click a layer to see whether it is lossless or lossy on the next request.

5.2 d5-escalation-decision-flow 9 nodes · 10 edges

Design effective escalation and ambiguity resolution patterns

Escalation and ambiguity decision flowFix the order in which triggers are evaluated: an explicit human request short-circuits everything, policy gaps escalate, multiple matches trigger clarification, and frustration alone leads to an offer to resolve.Customer messageCustomermessageExplicit request for human?Explicitrequest forhuman?Escalate immediatelyEscalateimmediatelyPolicy gap or no progress?Policy gapor noprogress?Multiple customer matches?Multiplecustomermatches?Ask for additional identifierAsk foradditionalidentifierAcknowledge and offer to resolveAcknowledgeand offer toresolveCustomer reiterates human requestCustomerreiterateshumanrequestResolve autonomouslyResolveautonomouslyalways the firstcheckyes, transfer me toa humanno, frustration onlyyes, policy silent ortools exhaustedno, request iscoveredyes, never guessthe recordno, issue is inscopecustomer acceptsthe offerstill wants a personhonor it now
Escalation and ambiguity decision flow

Fix the order in which triggers are evaluated: an explicit human request short-circuits everything, policy gaps escalate, multiple matches trigger clarification, and frustration alone leads to an offer to resolve.

one transition at a time

Click a decision node to highlight its two outgoing branches and the cue on each label.

5.4 d5-exploration-narrowing-funnel 8 nodes · 8 edges

Manage context effectively in large codebase exploration

Progressive narrowing in codebase explorationShow the funnel from a broad question to a specific answer, and where verbose output is deliberately kept out of the main agent context.Broad question about refundsBroadquestionaboutrefundsGlob and Grep for candidatesGlob andGrep forcandidatesIsolated subagent traces refund flowIsolatedsubagenttraces refundflowIsolated subagent finds all testsIsolatedsubagentfinds alltestsScratchpad of key findingsScratchpadof keyfindingsPhase summary injectedPhasesummaryinjectedTargeted reads of 3 filesTargetedreads of 3filesAnswer with specific class namesAnswer withspecificclass namescheap breadth firstverbose outputstays outverbose outputstays outpaths and entrypointscoverage mapcondense beforenext phaseread only whatmattersno generic patterns
Progressive narrowing in codebase exploration

Show the funnel from a broad question to a specific answer, and where verbose output is deliberately kept out of the main agent context.

one transition at a time

Click a stage to highlight whether its output lands in a subagent context or the main one.

5.6 d5-provenance-chain 8 nodes · 7 edges

Preserve information provenance and handle uncertainty in multi- source synthesis

Where provenance survives and where it diesContrast the path that carries claim-source mappings as structured data through synthesis with the path that compresses findings into prose and loses attribution irreversibly.Source document or URLSourcedocumentor URLSubagent structured findingSubagentstructuredfindingClaim-source mappingClaim-sourcemappingCoordinator merge stepCoordinatormerge stepEstablished vs contested sectionsEstablishedvs contestedsectionsFinal cited reportFinal citedreportNaive prose summaryNaive prosesummaryAttribution lostAttributionlostexcerpt plus datesclaim, source,excerpt, datepreserved, notrewrittenconflicts annotatedevery claimtraceablecompressed forbrevitycitationsunverifiable
Where provenance survives and where it dies

Contrast the path that carries claim-source mappings as structured data through synthesis with the path that compresses findings into prose and loses attribution irreversibly.

one transition at a time

hierarchy

2.3 d2-scoped-tool-distribution 10 nodes · 10 edges

Distribute tools appropriately across agents and configure tool choice

Scoped tool sets across a coordinator and four subagentsShow that each subagent holds only a few role-relevant tools, that one scoped cross-role tool is a deliberate exception, and that complex cross-role work is routed back through the coordinator instead of widening a tool set.Coordinator agentCoordinator agentWeb search subagentWeb search subagentDocument analysis subagentDocument analysissubagentSynthesis subagentSynthesis subagentReport generation subagentReport generationsubagentsearch_web, extract_web_resultssearch_web,extract_web_resultsload_document, extract_data_pointsload_document,extract_data_pointsmerge_findings, verify_factmerge_findings,verify_factrender_report, cite_sourcerender_report, cite_sourceComplex verification requestComplex verificationrequestdelegates searchdelegates analysisdelegates synthesisdelegates reportingscoped to rolescoped to roleone scoped cross-role toolscoped to rolebeyond verify_factcoordinator re-delegates
Scoped tool sets across a coordinator and four subagents

Show that each subagent holds only a few role-relevant tools, that one scoped cross-role tool is a deliberate exception, and that complex cross-role work is routed back through the coordinator instead of widening a tool set.

3.1 d3-claude-md-hierarchy 8 nodes · 7 edges

Configure CLAUDE.md files with appropriate hierarchy, scoping, and modular organization

CLAUDE.md configuration hierarchy and sharing scopeShow the three levels of CLAUDE.md configuration as a tree of scopes, which of them travel through version control to teammates, and which modular files (@import targets, .claude/rules/) hang off each level. It describes scoping and sharing only, not any precedence or override order.CLAUDE.md configuration levelsCLAUDE.md configurationlevelsUser-level ~/.claude/CLAUDE.md, never committedUser-level~/.claude/CLAUDE.md,never committedProject-level root or .claude/CLAUDE.mdProject-level root or.claude/CLAUDE.mdDirectory-level subdirectory CLAUDE.mdDirectory-levelsubdirectory CLAUDE.md.claude/rules/ topic files.claude/rules/ topic files@import external standards files@import externalstandards files@import package-relevant standards files@importpackage-relevantstandards files/memory command reports loaded files/memory commandreports loaded filespersonal to one machine, applies toevery project that one user openscommitted, so every clone receivesthe team-wide standardscommitted, scoped to onepackage or servicemodular alternative to amonolith, e.g. testing.md,deployment.mdkeeps the committed file thineach package imports onlywhat it needsa verification command, not afourth level
CLAUDE.md configuration hierarchy and sharing scope

Show the three levels of CLAUDE.md configuration as a tree of scopes, which of them travel through version control to teammates, and which modular files (@import targets, .claude/rules/) hang off each level. It describes scoping and sharing only, not any precedence or override order.

Click a level to highlight the edge label describing its own scope — personal to one machine, or committed and received by every clone.

5.5 d5-aggregate-vs-segment-accuracy 7 nodes · 7 edges

Design human review workflows and confidence calibration

How a 97% aggregate hides a failing segmentMake the masking effect concrete so the learner instinctively decomposes any headline accuracy figure by document type and field.Aggregate accuracy 97%Aggregate accuracy 97%Typed invoices 99%Typed invoices 99%Scanned PDFs 96%Scanned PDFs 96%Handwritten forms 71%Handwritten forms 71%Tax ID field 82%Tax ID field 82%Automate everything (anti-pattern)Automate everything(anti-pattern)Automate validated segments onlyAutomate validatedsegments onlyhigh volume dominates meanacceptable with samplinghidden by the averagefield-level weaknessthe wrong conclusion to drawkeep full reviewkeep field review
How a 97% aggregate hides a failing segment

Make the masking effect concrete so the learner instinctively decomposes any headline accuracy figure by document type and field.

matrix

2.2 d2-mcp-error-category-matrix 6 nodes · 8 edges

Implement structured error responses for MCP tools

Error category drives the agent's recovery actionLet the learner read off, for each of the four MCP error categories, whether the call is retryable and what the agent should do next. Draw it as a 4-row by 2-column grid: the four categories are the rows, the two columns are isRetryable and the agent recovery action, and the relation labels are the cell values. The point is that the category is what makes recovery mechanical.isRetryableAgent recovery actiontransienttransientvalidationvalidationpermissionpermissionbusiness rulebusiness ruletrue — timeout or service unavailabletrueretry with backoff, same call may succeedretry with backoff, same call maysucceedfalse — invalid inputfalsecorrect the arguments, then call againcorrect the arguments, then callagainfalse — caller lacks rightsfalseescalate_to_human, different path neededescalate_to_human, different pathneededfalse — policy violationfalserelay customerExplanation, do not retryrelay customerExplanation, do notretrytimeout or service unavailableinvalid inputcaller lacks rightspolicy violation
Error category drives the agent's recovery action

Let the learner read off, for each of the four MCP error categories, whether the call is retryable and what the agent should do next. Draw it as a 4-row by 2-column grid: the four categories are the rows, the two columns are isRetryable and the agent recovery action, and the relation labels are the cell values. The point is that the category is what makes recovery mechanical.

2.5 d2-builtin-tool-selection 8 nodes · 12 edges

Select and apply built-in tools (Read, Write, Edit, Bash, Grep, Glob) effectively

Which built-in tool for which jobGive the learner a cheat-sheet grid: the six built-in tools are the rows, and the two columns are what the tool operates on and the stem wording that makes it the right choice. Relation labels are the cell values. Reading down the second column is what makes the scored Grep/Glob (content versus path) and Edit/Write (targeted versus whole-file) distinctions decidable from a question stem.What it operates onWhen it is rightGrepGrepGlobGlobReadReadEditEditWriteWriteBashBashfile contents, pattern matched inside filesfile contents, pattern matchedinside fileswho calls this, where an error message liveswho calls this, where an errormessage livesfile paths, name and extension patternsfile paths, name and extensionpatternswhich files exist, e.g. **/*.test.tsxwhich files exist, e.g.**/*.test.tsxone file, full contentsone file, full contentsfile already identified, follow imports and trace flowsfile already identified, followimports and trace flowsone unique anchor stringone unique anchor stringtargeted change and the anchor is uniquetargeted change and the anchor isuniquethe whole filethe whole filenew file, or fallback after Edit fails on a non-unique matchnew file, or fallback after Editfails on a non-unique matchshell commandsshell commandsbuild, test, git, verifying behaviorbuild, test, git, verifying behavior
Which built-in tool for which job

Give the learner a cheat-sheet grid: the six built-in tools are the rows, and the two columns are what the tool operates on and the stem wording that makes it the right choice. Relation labels are the cell values. Reading down the second column is what makes the scored Grep/Glob (content versus path) and Edit/Write (targeted versus whole-file) distinctions decidable from a question stem.

3.2 d3-command-skill-scoping 8 nodes · 4 edges

Create and configure custom slash commands and skills

Where to put it: CLAUDE.md, project command/skill, or personal command/skillHelp the learner choose the right home for an instruction on two axes — always needed versus invoked on demand, and team-wide versus personal — with each of the four cells naming the file location that fits.team-widepersonalAlways neededAlways neededOn demandOn demandCLAUDE.md or .claude/rules/ — always loaded and version controlledCLAUDE.md or .claude/rules/~/.claude/CLAUDE.md — yours only, never shared with teammates~/.claude/CLAUDE.md.claude/commands/ and .claude/skills/ — committed, invoked when the task comes up.claude/commands/ and.claude/skills/~/.claude/commands/ and ~/.claude/skills/ — personal variant, give it a different name~/.claude/commands/ and~/.claude/skills/always loaded and version controlledyours only, never shared withteammatescommitted, invoked when the taskcomes uppersonal variant, give it a differentname
Where to put it: CLAUDE.md, project command/skill, or personal command/skill

Help the learner choose the right home for an instruction on two axes — always needed versus invoked on demand, and team-wide versus personal — with each of the four cells naming the file location that fits.

4.3 d4-tool-choice-modes 12 nodes · 9 edges

Enforce structured output using tool use and JSON schemas

tool_choice modes by guarantee, schema selection and fitGive the three tool_choice modes as rows against the three columns the exam tests — what the call guarantees, who selects the schema, and which stem it fits — so a stem maps to a mode in one lookup.guaranteeschema selectionfittool_choice autotool_choice autotool_choice anytool_choice anytool_choice forced tooltool_choice forced toolPlain text answer allowedPlain text answer allowedModel may skip every schemaModel may skip everyschemaUnsafe for mandatory structureUnsafe for mandatorystructureSome tool call guaranteedSome tool call guaranteedModel picks the schemaModel picks the schemaUnknown document typeUnknown document typeNamed tool call guaranteedNamed tool call guaranteedYou pick the schemaYou pick the schemaOne extraction must run firstOne extraction must run first
tool_choice modes by guarantee, schema selection and fit

Give the three tool_choice modes as rows against the three columns the exam tests — what the call guarantees, who selects the schema, and which stem it fits — so a stem maps to a mode in one lookup.

4.5 d4-sync-vs-batch-tradeoffs 10 nodes · 8 edges

Design efficient batch processing strategies

Synchronous API vs Message Batches APIGive the learner a two-row table of the two APIs against the four columns the exam tests — cost, latency guarantee, multi-turn tool calling and workload fit — so a stem can be mapped to an API in one lookup.costlatencycapabilityfitSynchronous Messages APISynchronous MessagesAPIMessage Batches APIMessage Batches APIStandard pricingStandard pricingImmediate responseImmediate responseMulti-turn tools within one requestMulti-turn tools within onerequestBlocking pre-merge checksBlocking pre-mergechecks50% cost savings50% cost savings24-hour window, no SLA24-hour window, no SLAOne turn, no mid-request toolsOne turn, no mid-requesttoolsOvernight reports and weekly auditsOvernight reports andweekly audits
Synchronous API vs Message Batches API

Give the learner a two-row table of the two APIs against the four columns the exam tests — cost, latency guarantee, multi-turn tool calling and workload fit — so a stem can be mapped to an API in one lookup.

5.5 d5-confidence-review-matrix 7 nodes · 4 edges

Design human review workflows and confidence calibration

Confidence band and source clarity to review routeShow that routing is two-dimensional: confidence alone does not decide, because source ambiguity overrides a high score, and the automated cell still owes a sampled audit.clear sourceambiguous sourceHigh confidenceHigh confidenceLow confidenceLow confidenceAuto-approve plus sampled audit — stratified sample onlyAuto-approve plus sampled auditHuman review queue — source conflict overrides scoreHuman review queueHuman review queue — below calibrated thresholdHuman review queuePriority human review — highest expected errorPriority human review
Confidence band and source clarity to review route

Show that routing is two-dimensional: confidence alone does not decide, because source ambiguity overrides a high score, and the automated cell still owes a sampled audit.

Click a cell to reveal the reason its route is what it is.

sequence

1.3 d1-task-tool-parallel-spawn 5 nodes · 8 edges

Configure subagent invocation, context passing, and spawning

Spawning subagents with the Task toolShow that parallel subagents come from multiple Task calls in one coordinator response, and that each Task prompt must carry its own complete context.CoordinatorCoordinatorTask toolTask toolSearch subagentSearchsubagentAnalysis subagentAnalysissubagentSynthesis subagentSynthesissubagenttwo Task callsin one responseprompt withassigned subtopicprompt withassigned documentsstructured findingswith source URLsstructured findingswith page numbersthird Task callafter results arriveprompt containingall prior findingsciteddraftparallel
Spawning subagents with the Task tool

Show that parallel subagents come from multiple Task calls in one coordinator response, and that each Task prompt must carry its own complete context.

2.4 d2-mcp-tool-call-path 4 nodes · 6 edges

Integrate MCP servers into Claude Code and agent workflows

The MCP tool call path, end to endTrace one tool call from the agent through the MCP client and server to the backend and back, so the learner sees where description-based selection happens, where credentials are applied, and where the isError payload originates. Every hop stays on an adjacent layer — the agent never talks to the server directly.AgentAgentMCP clientMCP clientMCP serverMCPserverBackend systemBackendsystemselects tool fromits descriptiontool call withargumentsauthenticated requestusing injected credentialdata orfailureresult orisError payloadtool result addedto context
The MCP tool call path, end to end

Trace one tool call from the agent through the MCP client and server to the backend and back, so the learner sees where description-based selection happens, where credentials are applied, and where the isError payload originates. Every hop stays on an adjacent layer — the agent never talks to the server directly.

3.2 d3-context-fork-isolation 4 nodes · 6 edges

Create and configure custom slash commands and skills

context: fork — verbose skill output stays out of the main conversationShow that a skill declared with context: fork executes in an isolated sub-agent context and returns only a summary, so the main session context is preserved.DeveloperDeveloperMain sessionMainsessionForked skill sub-agentForkedskillsub-agentCodebaseCodebaseinvoke skill declaredcontext forkdelegate withisolated contextread and grepmany filesverboseintermediate outputreturnsummary onlyfindings, maincontext intact
context: fork — verbose skill output stays out of the main conversation

Show that a skill declared with context: fork executes in an isolated sub-agent context and returns only a summary, so the main session context is preserved.

4.3 d4-tool-use-extraction-sequence 4 nodes · 5 edges

Enforce structured output using tool use and JSON schemas

Extraction via tool use, and where each error class is caughtShow the concrete call path from document to validated record, and make clear that the tool schema removes syntax errors while only the semantic validator can catch wrong values.Extraction serviceExtractionserviceMessages APIMessagesAPISemantic validatorSemanticvalidatorDownstream systemDownstreamsystemdocument + extraction toolschema + tool_choicetool_use block,schema-compliant inputparsed record, nosyntax errors possiblesemantic errors(sums, wrong field)validatedrecord
Extraction via tool use, and where each error class is caught

Show the concrete call path from document to validated record, and make clear that the tool schema removes syntax errors while only the semantic validator can catch wrong values.

5.3 d5-error-propagation-sequence 4 nodes · 7 edges

Implement error propagation strategies across multi-agent systems

Error propagation from subagent to synthesisTrace one failure end to end: local recovery first, then a structured propagation that lets the coordinator re-route, and finally a coverage annotation in the output.CoordinatorCoordinatorWeb search subagentWebsearchsubagentDocument subagentDocumentsubagentSynthesis agentSynthesisagentresearchsubtopic Alocal retry,transient timeoutstructured error pluspartial resultstry suggestedalternative sourcevalid empty result,query succeededfindings plusknown gapsreport with coverageannotations
Error propagation from subagent to synthesis

Trace one failure end to end: local recovery first, then a structured propagation that lets the coordinator re-route, and finally a coverage annotation in the output.

5.4 d5-crash-recovery-manifest 5 nodes · 9 edges

Manage context effectively in large codebase exploration

Manifest-based crash recoveryShow that resumability comes from agents exporting state to known locations and the coordinator loading a manifest and injecting recovered state, rather than from re-running the exploration.CoordinatorCoordinatorPhase 1 subagentPhase 1subagentPhase 2 subagentPhase 2subagentState storeState storeManifestManifestdispatchphase 1export state toknown pathregister path andstatus completedispatchphase 2export partialstateprocesscrashesload onresumecomplete vsincomplete phasesre-dispatch withinjected state
Manifest-based crash recovery

Show that resumability comes from agents exporting state to known locations and the coordinator loading a manifest and injecting recovered state, rather than from re-running the exploration.

state-machine

1.1 d1-agentic-loop-stop-reason 6 nodes · 6 edges

Design and implement agentic loops for autonomous task execution

The agentic loop driven by stop_reasonWalk the four steps of the loop — send the request, inspect stop_reason, execute the requested tools, append their results — and show that the only transition signal is the structured stop_reason field: "tool_use" sends tool results back into conversation history before the next request, "end_turn" leaves the loop, and an iteration or time limit is the other exit.Send request to ClaudeSend requestto ClaudeInspect stop_reasonInspectstop_reasonExecute requested toolsExecuterequestedtoolsAppend tool results to historyAppend toolresults tohistoryTask completeTaskcompleteCircuit breaker trippedCircuitbreakertrippedmodelrespondsstop_reasonis "tool_use"stop_reasonis "end_turn"all tool_resultblocks collectednextiterationiteration or timelimit exceeded
The agentic loop driven by stop_reason

Walk the four steps of the loop — send the request, inspect stop_reason, execute the requested tools, append their results — and show that the only transition signal is the structured stop_reason field: "tool_use" sends tool results back into conversation history before the next request, "end_turn" leaves the loop, and an iteration or time limit is the other exit.

one transition at a time

Click a transition to highlight which stop_reason value produces it.

4.4 d4-validate-retry-feedback-loop 6 nodes · 6 edges

Implement validation, retry, and feedback loops for extraction quality

Validate, retry with error feedback, escalateShow that the retry edge carries the document, the failed extraction and the specific errors, that the loop is bounded, and that an absent-information failure exits to escalation rather than looping.Extract via tool useExtract viatool useValidate semanticsValidatesemanticsRetry with error feedbackRetry witherrorfeedbackAcceptedAcceptedEscalated to humanEscalated tohumanQuarantinedQuarantinedschema-compliantrecordno semanticerrorsformat orstructural errorsinformation absentfrom sourcedocument + failedextraction + specific errorsretry budgetexhausted
Validate, retry with error feedback, escalate

Show that the retry edge carries the document, the failed extraction and the specific errors, that the loop is bounded, and that an absent-information failure exits to escalation rather than looping.

one transition at a time

Click a transition to highlight its label — the exit condition it tests, and for the retry edge the document, failed extraction and specific errors it carries.

timeline

4.5 d4-batch-sla-window 6 nodes · 5 edges

Design efficient batch processing strategies

Fitting a 4-hour submission cadence inside a 30-hour SLAMake the SLA arithmetic visual: the queue wait plus the 24-hour worst-case processing window must fit inside the promised SLA, which is what fixes the submission interval.Hour 0 document arrivesdocument arrivesHour 4 batch submittedbatch submittedHour 28 results availableresults availableHour 30 SLA deadlineSLA deadlineQueued up to 4 hourswaits for next submission window ·submission intervalProcessing up to 24 hoursdocumented worst case · worst-casecompletiontwo hours of margin0h4h28h30h
Fitting a 4-hour submission cadence inside a 30-hour SLA

Make the SLA arithmetic visual: the queue wait plus the 24-hour worst-case processing window must fit inside the promised SLA, which is what fixes the submission interval.