Skip to content
CCAF Preparation

Task Statement 1.6·Domain 127% of exam

Task Decomposition Strategies

Design task decomposition strategies for complex workflows

Jump to practice →

Official Exam Guide Objectives

Task 1.6: Design task decomposition strategies for complex workflows.

Knowledge of

  • When to use fixed sequential pipelines (prompt chaining) versus dynamic adaptive decomposition based on intermediate findings
  • Prompt chaining patterns that break reviews into sequential steps (e.g., analyze each file individually, then run a cross-file integration pass)
  • The value of adaptive investigation plans that generate subtasks based on what is discovered at each step

Skills in

  • Selecting task decomposition patterns appropriate to the workflow: prompt chaining for predictable multi-aspect reviews, dynamic decomposition for open-ended investigation tasks
  • Splitting large code reviews into per-file local analysis passes plus a separate cross-file integration pass to avoid attention dilution
  • Decomposing open-ended tasks (e.g., "add comprehensive tests to a legacy codebase") by first mapping structure, identifying high-impact areas, then creating a prioritized plan that adapts as dependencies are discovered

What You Need to Know

Decomposition is the act of cutting a large problem into units an agentic system can hold one at a time. Two patterns are examinable, they fail in different and recognisable ways when misapplied, and choosing between them is the skill being tested. Alongside them sits a single named failure mode — attention dilution — which appears whenever the cutting was too coarse.

Pattern 1: Fixed Sequential Pipelines (Prompt Chaining)

A fixed sequential pipeline settles the steps before any of them run, then feeds each one's output into the next as input.

How it works: The route is decided at design time. Step 1 completes and hands its output to Step 2, which hands its output to Step 3, and so on to the end. Nothing that turns up along the way alters the sequence.

Example — Code review pipeline:

  1. Analyse every file on its own — style, bugs, complexity — one pass per file.
  2. With all of those complete, make a second sweep across the whole set for data flow, API consistency and import chains.
  3. Merge both layers of findings into a single review report.

Best for: Work whose shape you already know — the steps are enumerable before you begin. Reviewing code, processing documents, extracting fields and running compliance checks all belong in this category.

Advantages: The same input takes the same route every time, which makes behaviour reproducible. Debugging is straightforward because each step's output is attributable to that step, and monitoring is a matter of logging at fixed points.

Limitations: Nothing discovered mid-run can change the plan. Where Step 2 turns up something that ought to redirect Step 3, the pipeline proceeds regardless — the steps were fixed before that information existed.

Pattern 2: Dynamic Adaptive Decomposition

Dynamic adaptive decomposition derives its subtasks from what the run turns up, so the plan is written as the problem is understood rather than before.

How it works: The agent begins with an objective rather than a route. It investigates, forms a plan from what it finds, and then revises that plan as execution surfaces information the original plan could not have accounted for.

Example — Adding tests to a legacy codebase:

  1. Survey the repository — directories, modules, what depends on what.
  2. Work out where coverage would pay best: the modules everything calls, the ones with the worst bug history, the critical paths nobody tests.
  3. Turn that into a prioritised plan.
  4. Begin writing. Module A turns out to rest on Module B, and Module B is untested.
  5. Reorder: cover Module B first, so Module A's tests have something dependable underneath them.
  6. Keep revising as further dependencies surface.

Best for: Investigation where the scope is genuinely unknown at the outset. Exploring an inherited system, auditing for security holes, running an open research question, or debugging code nobody on the team wrote — all of these qualify.

Advantages: The plan tracks the problem instead of a guess about the problem. Unexpected complexity gets handled rather than ignored, and the results go deeper on open-ended work because nothing is forced into a shape decided in advance.

Limitations: You cannot say beforehand how long it will run or what it will cost, because both depend on what it finds. Reproducing a run is harder, and so is debugging one, since two executions over the same input may legitimately diverge.

Selecting the Right Pattern

The exam tests your ability to match the pattern to the task:

Task CharacteristicsPatternReasoning
Steps known in advance, structured inputFixed pipelineReproducibility is worth more here than the ability to react
Open-ended, unknown scopeDynamic decompositionA plan fixed up front would be a guess about a problem not yet understood
Multi-file code reviewFixed pipelinePer-file then cross-file is a route you can write down before starting
Legacy codebase explorationDynamic decompositionWhat matters only becomes visible once the dependencies are mapped
Document extractionFixed pipelineThe fields and the output shape are settled before any document arrives
Debugging an unfamiliar systemDynamic decompositionEach finding redirects the next step; the route cannot precede the evidence

The Attention Dilution Problem

Attention dilution is what happens when one pass is asked to handle too many items at once. The output is not uniformly poor — it is uneven, thorough in places and superficial in others, which is what makes it hard to spot.

The telltale symptoms:

  • The opening files receive close, specific commentary and the closing ones receive summaries.
  • The same construct draws a complaint in one file and passes without remark in another.
  • Serious defects slip through in places where trivial style points were still being raised.

Why it happens: Attention is finite and spread across everything in context. Add more items and the share available to each one falls; the items encountered early absorb a disproportionate amount and the rest are progressively skimmed.

The fix: Multi-pass architecture. Split the work into two layers:

  1. Per-item local analysis passes: each file, document or module is analysed in a pass of its own, where the full attention budget is available to that single item.
  2. Cross-item integration pass: once every local pass has finished, a separate pass looks across the whole set for what only shows up in relationships — data flow, inconsistent use of a pattern, dependencies that cross file boundaries.

Each layer succeeds because it is asked one kind of question. The local passes are consistent because no item competes with any other; the integration pass finds cross-cutting problems because comparison is the only thing it is doing.

Practical Example: The 14-File Code Review

A code review agent processes 14 files in a single pass. The results:

  • Files 1-5 come back with line-level references, named bugs and concrete suggestions.
  • Files 6-9 come back thinner — some real issues, less depth behind each.
  • Files 10-14 come back with generalities, missing null pointer dereferences and SQL injection holes outright.
  • A forEach loop draws an efficiency complaint in File 3; the same loop in File 11 draws nothing.

The gradient is the diagnosis: quality declines with position rather than with the difficulty of the code, and the same construct is judged differently depending on where it appeared. Neither a stronger model, nor a larger context window, nor a more detailed prompt addresses that, because none of them changes how many items are competing in one pass.

Restructuring does. Fourteen per-file passes give each file the whole budget, which is what recovers the null pointer bugs in Files 10-14. A cross-file integration pass afterwards is the only place the inconsistent forEach judgement becomes visible, because catching it requires holding File 3 and File 11 side by side — which is exactly the comparison the single pass was too crowded to make.

Deep Dive

Prompt chaining, formally: gates and the latency-for-accuracy trade

Anthropic's own name for "fixed sequential pipelines" is prompt chaining: "Prompt chaining decomposes a task into a sequence of steps, where each LLM call processes the output of the previous one." Crucially, chains are not just sequences — they can carry programmatic checkpoints: "you can add programmatic checks (see 'gate' in the diagram below) on any intermediate steps" to catch a malformed intermediate output before it propagates. The whole point is a deliberate trade: "the main goal is to trade off latency for higher accuracy, by making each LLM call an easier task." That framing explains why the per-file-then-integration pipeline in this lesson works: each pass is a simpler, more accurate LLM call than one giant multi-file review.

Sourceanthropic.com › building-effective-agentsfetched 2026-07-30

The other three workflow patterns you'll see named on the exam

Prompt chaining and dynamic decomposition are not Anthropic's only two named workflow patterns — three more appear in the same taxonomy, and a question could reference any of them by name:

  • Routing — "classifies an input and directs it to a specialized followup task," useful for "complex tasks where there are distinct categories that are better handled separately," including routing cheap/common cases to a smaller model and hard cases to a larger one.
  • Parallelization — two sub-variants: sectioning ("breaking a task into independent subtasks run in parallel," e.g. one instance handling the user query while another screens it for guardrail violations) and voting ("running the same task multiple times to get diverse outputs," e.g. several independent reviews flagging code vulnerabilities).
  • Evaluator-optimizer — "one LLM call generates a response while another provides evaluation and feedback in a loop," which fits best "when we have clear evaluation criteria, and when iterative refinement provides measurable value" (e.g. literary translation, where a critic LLM catches nuance the translator missed).

Sourceanthropic.com › building-effective-agentsfetched 2026-07-30

Dynamic decomposition's formal name is orchestrator-workers

The lesson's "dynamic adaptive decomposition" maps directly onto what Anthropic calls orchestrator-workers: "a central LLM dynamically breaks down tasks, delegates them to worker LLMs, and synthesizes their results." The defining property, again, is that subtasks are not fixed in advance: "the key difference from parallelization is its flexibility—subtasks aren't pre-defined, but determined by the orchestrator." This is precisely the legacy-codebase-testing scenario: the orchestrator can't know before it starts how many modules will need tests or in what order, so the plan has to be generated dynamically as dependencies surface.

Sourceanthropic.com › building-effective-agentsfetched 2026-07-30

Adaptive decomposition needs ground truth, and a stopping condition

Dynamic decomposition only adapts correctly if it has real feedback to adapt to: "it's crucial for the agents to gain 'ground truth' from the environment at each step" — tool results, test runs, actual file contents — rather than reasoning purely from its own prior assumptions. And because an adaptive plan has no fixed endpoint by design, control still needs a backstop: "it's also common to include stopping conditions (such as a maximum number of iterations) to maintain control," precisely because "the autonomous nature of agents means higher costs, and the potential for compounding errors." This mirrors the iteration-cap guidance from Task 1.1 — a safety bound, not the mechanism that decides the task is actually done.

Sourceanthropic.com › building-effective-agentsfetched 2026-07-30

Simplicity first: don't reach for decomposition you don't need

Anthropic's blanket advice against over-engineering applies directly to decomposition strategy selection: "we recommend finding the simplest solution possible, and only increasing complexity when needed" — and "for many applications, optimizing single LLM calls with retrieval and in-context examples is usually enough." A predictable, structured task that only looks like it needs dynamic decomposition (because it's multi-step) may be fully served by a fixed prompt chain; reach for orchestrator-workers only once the scope is genuinely unknown at the start.

Sourceanthropic.com › building-effective-agentsfetched 2026-07-30

Quick Reference

FactValue
Formal name for "fixed sequential pipeline"Prompt chaining
Prompt chaining goalTrade latency for higher accuracy by making each LLM call an easier task
Programmatic checkpoints in a chain"Gates" — checks on intermediate step output
Formal name for "dynamic adaptive decomposition"Orchestrator-workers
Orchestrator-workers vs parallelizationSubtasks determined dynamically by the orchestrator, not pre-defined
Routing patternClassifies input, dispatches to a specialised follow-up (e.g. cheap model for easy cases, capable model for hard ones)
Parallelization — sectioningIndependent subtasks run in parallel (e.g. guardrail screening in a separate call from the main response)
Parallelization — votingSame task run multiple times for diverse outputs (e.g. multiple vulnerability-review passes)
Evaluator-optimizerOne LLM generates, another evaluates and gives feedback, in a loop; needs clear evaluation criteria
What adaptive decomposition needs to work"Ground truth" from the environment at each step (tool results, test runs), not just prior assumptions
Adaptive plans still needA stopping condition (e.g. max iterations) as a safety bound, separate from task-complete detection
Default advice on complexityFind the simplest solution possible; single LLM calls are often enough — only add decomposition machinery when needed

Exam Traps

Practice Scenario

A code review agent processes 14 files and produces detailed feedback for the first 5 files but misses obvious bugs in files 10-14. It also flags a forEach loop as inefficient in one file while approving identical code in another. What is the root cause and the most appropriate solution?

Build Exercise

Build a Multi-Pass Code Review Pipeline

Difficulty: Advanced (3/4)

60 minutes

  1. Create a code review agent that accepts a directory path containing at least 10 source files

Why: The 10+ file threshold is where attention dilution becomes observable. The exam uses a 14-file example where detailed feedback for early files degrades to superficial analysis for later files. Your setup must replicate this scale.

You should see: A code review function that reads all files in a directory and prepares them for analysis. It should handle at least 10 TypeScript or JavaScript source files.

  1. Implement a single-pass review that processes all files at once and record the results

Why: The single-pass approach is the baseline that demonstrates attention dilution. The exam expects you to recognise the symptoms: thorough analysis for early files, shallow analysis for later files, and contradictory pattern evaluation.

You should see: A review result where early files receive detailed feedback with specific line references and bug identification, while later files receive increasingly brief or missing feedback. This is the attention dilution pattern.

  1. Implement per-file local analysis passes that produce structured feedback for each file individually (bug count, severity, specific line references)

Why: Per-file passes give each file the full attention budget. This is the first layer of multi-pass architecture. The exam contrasts this with single-pass to show that structural decomposition solves attention dilution, not better prompts or larger context windows.

You should see: Consistent analysis depth across all files. The last file receives the same level of detail as the first. Each review includes bug count, severity ratings, and specific line references in a structured format.

  1. Implement a cross-file integration pass that checks for data flow issues, API consistency, and pattern usage consistency across all files

Why: Per-file passes catch local issues but miss cross-cutting concerns. The exam tests whether you include a cross-file integration pass — batching without it still misses data flow issues and pattern inconsistencies across files.

You should see: A separate analysis that takes the per-file summaries and checks for cross-file issues: inconsistent API usage, data flow problems between modules, and patterns used differently across files.

  1. Compare results: document which issues the single-pass review caught versus the multi-pass approach, paying special attention to consistency of analysis depth across all files

Why: This comparison demonstrates the exam argument quantitatively. Attention dilution is not a model capability problem — it is an architectural problem. The same model produces better results with multi-pass architecture, proving the fix is structural.

You should see: A comparison table showing: more total issues found by multi-pass, consistent issue counts across files (no drop-off for later files), and cross-file issues caught only by the integration pass.

  1. Record any cases where the single-pass review flagged a pattern in one file but approved identical code in another — these are attention dilution artefacts

Why: Contradictory pattern evaluation is the clearest symptom of attention dilution. The exam uses the forEach example: flagged as inefficient in File 3, approved without comment in File 11. Documenting these artefacts proves the structural nature of the problem.

You should see: At least one case where the single-pass review treated identical code patterns differently across files. The multi-pass review should treat the same pattern consistently.

Sources


Appendix A — Build Exercise Step Hints

Progressive hints revealed by the "Stuck? Get a nudge" control on each step.

Step 1. Create a code review agent that accepts a directory path containing at least 10 source files

Why: The 10+ file threshold is where attention dilution becomes observable. The exam uses a 14-file example where detailed feedback for early files degrades to superficial analysis for later files. Your setup must replicate this scale.

You should see: A code review function that reads all files in a directory and prepares them for analysis. It should handle at least 10 TypeScript or JavaScript source files.

Stuck? Get a nudge

Step 2. Implement a single-pass review that processes all files at once and record the results

Why: The single-pass approach is the baseline that demonstrates attention dilution. The exam expects you to recognise the symptoms: thorough analysis for early files, shallow analysis for later files, and contradictory pattern evaluation.

You should see: A review result where early files receive detailed feedback with specific line references and bug identification, while later files receive increasingly brief or missing feedback. This is the attention dilution pattern.

Stuck? Get a nudge

Step 3. Implement per-file local analysis passes that produce structured feedback for each file individually (bug count, severity, specific line references)

Why: Per-file passes give each file the full attention budget. This is the first layer of multi-pass architecture. The exam contrasts this with single-pass to show that structural decomposition solves attention dilution, not better prompts or larger context windows.

You should see: Consistent analysis depth across all files. The last file receives the same level of detail as the first. Each review includes bug count, severity ratings, and specific line references in a structured format.

Stuck? Get a nudge

Step 4. Implement a cross-file integration pass that checks for data flow issues, API consistency, and pattern usage consistency across all files

Why: Per-file passes catch local issues but miss cross-cutting concerns. The exam tests whether you include a cross-file integration pass — batching without it still misses data flow issues and pattern inconsistencies across files.

You should see: A separate analysis that takes the per-file summaries and checks for cross-file issues: inconsistent API usage, data flow problems between modules, and patterns used differently across files.

Stuck? Get a nudge

Step 5. Compare results: document which issues the single-pass review caught versus the multi-pass approach, paying special attention to consistency of analysis depth across all files

Why: This comparison demonstrates the exam argument quantitatively. Attention dilution is not a model capability problem — it is an architectural problem. The same model produces better results with multi-pass architecture, proving the fix is structural.

You should see: A comparison table showing: more total issues found by multi-pass, consistent issue counts across files (no drop-off for later files), and cross-file issues caught only by the integration pass.

Stuck? Get a nudge

Step 6. Record any cases where the single-pass review flagged a pattern in one file but approved identical code in another — these are attention dilution artefacts

Why: Contradictory pattern evaluation is the clearest symptom of attention dilution. The exam uses the forEach example: flagged as inefficient in File 3, approved without comment in File 11. Documenting these artefacts proves the structural nature of the problem.

You should see: At least one case where the single-pass review treated identical code patterns differently across files. The multi-pass review should treat the same pattern consistently.

Stuck? Get a nudge

Appendix B — Interactive Study Prompts

Two prompts to paste into Claude. B1 drills the judgement the exam actually measures; B3 reviews the code you wrote for the Build Exercise above. The exam simulator between them is the interactive quiz on this page.

B1. Concept Check — Discrimination Drill

Prompt — paste into Claude

You are examining me for the Claude Certified Architect – Foundations (CCAR-F) exam, Domain 1: Agentic Architecture & Orchestration (27% of the exam), Task Statement 1.6: Task Decomposition Strategies. Use British English throughout.

What this exam actually measures. Not one item on the official exam asks what something is. Every item drops you into a production system that is already misbehaving, offers four defensible engineering responses, and asks which is best. The skill being tested is proportionality: fix the root cause with the cheapest instrument that gives the guarantee the situation demands. So do not quiz me on definitions. Make me choose between options that are both defensible, then attack whatever I chose.

How to run this session.

  • One question at a time. Stop and wait. Never answer your own question, and never move on until I have committed.
  • Never reveal which option is right before I commit to one.
  • Do not praise me. A correct answer earns "Yes" and the next question. If I am right for the wrong reason, say so — that is the failure that costs marks on exam day.
  • When I am wrong, quote the exact phrase in my answer that gave it away, correct it in one sentence, and move on. One correction at a time.
  • If I write something fluent but empty, name it: "That is a restatement, not a reason."
  • Set every scenario inside one of the exam's production contexts: the Customer Support Resolution Agent (Agent SDK, MCP tools get_customer, lookup_order, process_refund, escalate_to_human), the Multi-Agent Research System (a coordinator delegating to web-search, document-analysis, synthesis and report-generation subagents), or Developer Productivity with Claude (an agent over an unfamiliar codebase using Read, Write, Bash, Grep, Glob).

Session plan — about twelve questions.

Round 1 — Anchor (1 question). One concrete question to check I have actually read the material. If I cannot answer it, stop the session and tell me to read the lesson before continuing.

Round 2 — Discrimination (5 questions). Each one: describe a symptom in one of the contexts above, with a number or a log observation in it. Offer exactly two responses, both defensible. Ask me to pick one and justify it in a single sentence. Then argue the case for the option I rejected as strongly as you can, and ask whether I am holding or changing my answer. Only after I answer that, tell me which is right and why the other one is the more tempting trap.

Round 3 — Proportionality (2 questions). Take one symptom and run it twice with different stakes: once where the cost of an error is a wasted retry, once where it is an incorrect refund or a corrupted production branch. The right answer must change between the two. If I answer the same way both times without noticing the stakes moved, that is the finding — tell me.

Round 4 — Code review (3 questions). Present a colleague's confident proposal containing one of the trap errors listed below, written the way a teammate would write it in a pull request. Ask me what is wrong with it. Do not signal that anything is wrong.

Round 5 — Verdict. Rate me green, amber or red on each concept below. Name the single weakness most likely to cost me marks, and give me one specific next action: a section of this lesson to re-read, or a step of the Build Exercise to redo. If I am not ready for this task statement, say so plainly.

Concepts in scope

  1. Fixed sequential pipelines (prompt chaining) — predetermined steps where each takes the previous step's output; consistent, reliable and easy to debug, and unable to change course when a step turns up something unexpected.
  2. Dynamic adaptive decomposition — subtasks generated from what is discovered at each step, so the plan evolves as dependencies surface; more thorough on open-ended work, and less predictable in time and cost.
  3. Matching the pattern to the task — known steps and structured input take the fixed pipeline; unknown scope and open-ended investigation take dynamic decomposition. Which pattern sounds more sophisticated is not the criterion.
  4. Attention dilution — too many items in one pass gives the early ones disproportionate attention: thorough feedback on the first few files, obvious bugs missed in the later ones, and the same pattern flagged in one file and waved through in another.
  5. Multi-pass architecture — a dedicated pass per item so each gets the full attention budget, plus a separate cross-item integration pass for data flow, API consistency and pattern usage across items. Batching without that integration pass still misses everything that spans two batches.

Trap errors to plant in Round 4

  • Prescribing a more capable model or a larger context window for what is an architectural attention problem.
  • Offering a single-pass review with a better-written prompt as though it were equivalent to multi-pass architecture.
  • Putting an open-ended investigation through a fixed pipeline that cannot respond to what it finds along the way.
  • Splitting the files into batches and stopping there, with no cross-file integration pass to catch what spans them.

Stay inside the material above. If I raise something outside it, tell me it is out of scope for this task statement and return to the drill. Begin with Round 1.

B2. Exam Simulator

Exam simulator

Question 1 of 10

Scenario · Developer Productivity with Claude

Your review agent takes all 14 files of a pull request in one pass. Files 1 to 5 come back with line-level bug reports, files 10 to 14 with a sentence each that misses two null-pointer bugs, and a forEach loop flagged as inefficient in file 3 passes without comment in file 11. Which approach should you take?

B3. Build Coach — Code Review

The Build Exercise and its hint ladder are already on this page. This prompt is for the one thing the page cannot do: review the code you actually wrote.

Prompt — paste into Claude

You are a staff engineer reviewing my implementation of a build exercise for the Claude Certified Architect – Foundations exam, Domain 1, Task Statement 1.6: Task Decomposition Strategies. Use British English throughout.

I am building a multi-pass code review pipeline: a review agent that loads a directory of ten or more source files, runs them once through a single-pass review to establish the baseline failure, then reruns the same files as one dedicated pass per file plus a separate cross-file integration pass, and compares the two runs for consistency of depth and for issues only the integration pass could have found.

It has to satisfy all of the following:

  • The single-pass baseline visibly degrades: later files receive thinner analysis than earlier ones.
  • The per-file passes return the same depth of structured output for the last file as for the first — issues with line references and severity, in a shape I can count.
  • The integration pass surfaces at least one issue no per-file pass could have found: a data flow problem, an inconsistent API use, or a pattern applied differently across files.
  • The comparison quantifies the difference, covering both the total issues found and how much the per-file counts vary under each approach.
  • At least one contradiction is recorded where the single pass flagged a pattern in one file and let identical code through in another.

How to review.

  • Ask me to paste my code. If I have not pasted any, ask for it and nothing else. Do not write the implementation for me, do not offer a reference solution, and do not fill in a step I have skipped.
  • Work through the criteria above in order. For each one, quote the line of my code that satisfies it, or say plainly that nothing does.
  • Then hunt for the failure modes below. Each is a real production bug, not a style preference.
  • Rank everything you find: (1) would fail in production, (2) would lose marks on the exam, (3) style. Give me the first item under (1) and then stop — wait for my fix before giving me the next one.
  • If my code satisfies everything, do not congratulate me. Change the requirements — two files in the directory now import each other and a third duplicates one of them — and make me say which pass catches what.
  • If I ask you to just write it for me, refuse once and give me the smallest nudge that would unblock me instead.

Failure modes to probe

  • An "integration pass" that is really the single-pass review run again over the concatenated files, so it inherits the very dilution it was added to fix.
  • Per-file passes that carry the previous file's review along in their context, reintroducing the dilution one file at a time.
  • The comparison reported as a total issue count only, which hides the thing that actually matters: how much the depth varies across files.
  • Files split into batches with no pass over the batch boundaries, so an issue spanning two batches goes unrecorded and the run still looks clean.
  • Per-file output returned as free prose rather than a structured record, which makes the consistency comparison impossible to compute at all.

Start by asking me for my code.