Decompose without losing information
Break a complex problem into subtasks with clear inputs, outputs and checkpoints, choose fixed or adaptive decomposition, and find the hand-off that loses information or blocks parallel work.
Scenario
A finance team splits its quarterly variance commentary into four Claude steps. Every step works, and every step passes its own test.
The CFO still can't trace a single explanation back to a ledger line. Step 2 summarized the variances in prose, and the line references never made it to step 3.
Explanation
Decomposition turns one hard task into several easier ones. Each subtask needs four things:
- One job: "extract every variance over the threshold", not "understand the ledger".
- A stated input: the source data, or named fields from an earlier step.
- An output contract: a shape the next step can use and code can check, such as JSON with required fields.
- A checkpoint where an error would spread: a programmatic gate, a sample review, or a test.
Fixed or adaptive? Building effective agents describes two families:
- Fixed decomposition (prompt chaining, sectioning): use it when the task splits cleanly into subtasks you know in advance. Each call does an easier job; you trade some latency for accuracy and can add gates between steps.
- Adaptive decomposition (orchestrator-workers): use it when you can't predict the subtasks. A central model breaks the task down based on the input and decides what to do next from what it finds.
Dependencies decide the order. Independent subtasks run in parallel and join in a synthesis step. Only real dependencies should make one step wait for another.
Where decompositions lose information:
- a hand-off that summarizes away what a later step needs (IDs, quotes, figures, page references);
- a constraint given only to the first step (a date, a currency, an exclusion) that later steps never see;
- long work that keeps its state only in the context: store progress in files, structured test status and git instead.
Granularity. Each split should buy something: an inspection point, a different tool, parallelism. Splits that buy nothing add latency and more places to fail. Explicit chaining is worth it when you need to inspect intermediate outputs or enforce a pipeline structure.
Worked example
The variance commentary, rebuilt. Forty cost centers; any variance over 5% needs an explanation for the CFO.
- Extract (code, not Claude): pull every variance over 5% from the ledger, with line IDs.
- Explain (Claude, one call per cost center, in parallel): input is that center's ledger lines and the budget owner's notes. Output contract:
{
"cost_center": "CC-214",
"variance_pct": 7.2,
"drivers": ["Contractor rates up after renewal"],
"evidence_line_ids": ["L-88120", "L-88134"]
}
- Gate (code): every flagged variance has an entry, and every evidence ID exists in the ledger. Missing ones go back to step 2.
- Synthesize (Claude): write the CFO commentary from the checked entries, citing line IDs.
The fixed chain fits because the steps are known in advance. The line IDs travel through every step, which is what the original prose hand-off lost.