Skip to content
Claude Certified Architect – Foundations (CCAR-F) Exam Prep

Lesson 6 of 30 · 6 min

x
6/30

Task Decomposition

Video lesson: CCAR-F 06/30: Task Decomposition

Two ways to decompose (design guidance, from Anthropic's published agent patterns)

Fixed pipeline (workflow)Dynamic decomposition (agent)
Who decides the stepsYour codeThe model, as it goes
FitsPredictable tasks with known stagesOpen-ended tasks where the next step depends on what is found
Predictability and costHigher and lowerLower and higher

Common workflow patterns: prompt chaining (sequential steps, optional gates between them), routing (classify, then send to a specialised path), parallelisation (independent subtasks, or the same task several times), orchestrator-workers (a coordinator splits dynamically and delegates), evaluator-optimizer (generate, critique, revise).

Prefer the simplest design that works: a single well-prompted call, then a workflow, then an agent.

Decomposing large reviews (design guidance)

For a large change set, review in two kinds of passes:

  1. Per-unit pass: each file (or module) analysed on its own with a focused prompt, so attention is not diluted across many files.
  2. Cross-unit pass: a separate pass for interactions between units (shared interfaces, data flow, duplicated logic).

One giant prompt over everything tends to give shallow, inconsistent feedback.

Choosing granularity

  • Too coarse: context overload, missed details.
  • Too fine: coordination overhead, lost cross-cutting issues, higher cost.
  • Make subtasks independent and verifiable where you can, so they can run in parallel and be checked.

Exam traps

  • Reaching for a dynamic agent when the steps are fixed.
  • A single mega-prompt for a multi-file task.
  • Per-file passes only, which miss cross-file problems.
  • Decomposing without a plan for merging results.

References

  1. Subagents in the SDK — checked Oct 16, 2026

Check your understanding

  • Invoice processing with fixed stages: workflow or agent?Show answer

    Answer

    Workflow.
  • A 30-file pull request needs review. Structure?Show answer

    Answer

    Per-file passes, then a cross-file integration pass.
  • Why not always use an agent?Show answer

    Answer

    More cost, latency and unpredictability for no benefit when steps are known.
Previous

Progress is saved in this browser.

Next Lesson