Domain 1: Agentic Architecture & Orchestration (27%)
Biggest domain — 7 task statements.
1.1 Agentic loops for autonomous task execution
Knowledge:
- Loop lifecycle: send request → inspect stop_reason (tool_use vs end_turn) → execute tool(s) → return results → repeat
- Tool results get appended to conversation history so the model reasons over them next turn
- Model-driven decisions (Claude reasons about next tool) vs. pre-configured decision trees
Skills:
- Continue loop while stop_reason == "tool_use"; stop when "end_turn"
- Append tool results into context between iterations
- Anti-patterns to avoid: parsing NL text to detect "done"; arbitrary iteration caps as the primary stop mechanism; checking for presence of assistant text as a completion signal
Exam angle: any answer that says "look for the word 'done' in the response" or "cap at N loops" as the correct termination strategy is a trap.
1.2 Multi-agent coordinator-subagent orchestration
Knowledge:
- Hub-and-spoke: coordinator owns all inter-subagent communication, error handling, routing
- Subagents have isolated context — no automatic inheritance of coordinator history
- Coordinator decomposes tasks, delegates, aggregates results, decides which subagents to invoke (not always the full pipeline)
- Risk: overly narrow decomposition → incomplete coverage of broad topics (see Sample Q7)
Skills:
- Coordinator dynamically selects subagents based on query complexity (not always-full-pipeline)
- Partition scope across subagents to avoid duplication (distinct subtopics/source types)
- Iterative refinement: coordinator evaluates synthesis for gaps → re-delegates targeted queries → re-invokes synthesis
- Route ALL subagent communication through coordinator (observability, consistent error handling)
1.3 Subagent invocation, context passing, spawning
Knowledge:
- Task tool spawns subagents; coordinator's allowedTools must include "Task"
- Subagent context must be explicitly provided in the prompt — no shared memory across invocations
- AgentDefinition: descriptions, system prompts, tool restrictions per subagent type
- Fork-based session management: explore divergent approaches from a shared baseline
Skills:
- Pass complete prior findings directly in the subagent's prompt (not by reference)
- Use structured formats to separate content from metadata (source URLs, doc names, page numbers) → preserves attribution
- Spawn parallel subagents via multiple Task calls in a single coordinator response (not sequential turns)
- Write coordinator prompts around goals/quality criteria, not step-by-step procedures — enables subagent adaptability
1.4 Multi-step workflows: enforcement & handoff
Knowledge:
- Programmatic enforcement (hooks, prerequisite gates) vs. prompt-based guidance — different reliability tiers
- Deterministic compliance needed when errors are costly (e.g., identity verification before financial ops) — prompts alone have non-zero failure rate
- Structured handoff protocol for escalation: customer details, root cause, recommended action
Skills:
- Programmatic prerequisites blocking downstream tools until upstream steps complete (e.g., block process_refund until get_customer returns a verified ID) — this is Sample Q1's answer
- Decompose multi-concern requests into distinct items, investigate in parallel with shared context, synthesize a unified resolution
- Compile structured handoff summaries (customer ID, root cause, refund amount, recommended action) for human escalation
1.5 Agent SDK hooks: interception & normalization
Knowledge:
- PostToolUse hook pattern: intercept tool results for transformation before the model sees them
- Hook patterns to intercept outgoing tool calls to enforce compliance (e.g., block refunds above threshold)
- Hooks = deterministic guarantee; prompts = probabilistic compliance
Skills:
- PostToolUse hooks to normalize heterogeneous data (Unix ts, ISO 8601, numeric codes) from different MCP tools before agent processing
- Tool-call interception hooks that block policy violations (refunds > $500) and redirect to escalation
- Choose hooks over prompts whenever business rules require guaranteed compliance
1.6 Task decomposition strategies
Knowledge:
- Fixed sequential pipelines (prompt chaining) vs. dynamic adaptive decomposition based on intermediate findings
- Prompt chaining example: analyze each file individually → cross-file integration pass
- Adaptive investigation plans generate subtasks based on what's discovered at each step
Skills:
- Pick pattern to the workflow: prompt chaining for predictable multi-aspect reviews; dynamic decomposition for open-ended investigation
- Split large code reviews into per-file local passes + separate cross-file integration pass (avoids attention dilution) — Sample Q12's answer
- Decompose open-ended tasks (e.g., "add tests to legacy codebase") by mapping structure → identifying high-impact areas → prioritized adaptive plan
1.7 Session state, resumption, forking
Knowledge:
- --resume <session-name> for named session continuation
- fork_session for independent branches off a shared analysis baseline
- Must inform the agent about file changes when resuming after code modifications
- New session + structured summary > resuming with stale tool results, when prior context is invalid
Skills:
- --resume with session names across work sessions
- fork_session for parallel exploration (comparing 2 refactor/testing strategies from shared analysis)
- Choose: resume (context mostly valid) vs. fresh + injected summary (tool results stale)
- Inform resumed sessions of specific file changes for targeted re-analysis (not full re-exploration)
Discussion Prompts / Things to Drill
- [ ] Walk through a full agentic loop pseudocode and identify the stop condition
- [ ] Design a coordinator + 3 subagent system and identify what MUST be in each subagent's prompt
- [ ] Write a
PostToolUsehook scenario vs. a tool-call-interception hook scenario — know the difference - [ ] Practice spotting "narrow decomposition" root-cause questions (Sample Q7 pattern)