Chapter 08
Task Decomposition
Fixed pipeline when the scope is knowable, dynamic when it emerges — and why 14 files need 15 passes.
8.1
Fixed pipeline
Every step defined before anything runs. Same shape on every input.
documentinput
→metadataextract
→dataextract
→validateschema + rules
→enrichlookups
→outputfinal
Use it when the structure is known up front and stability matters more than adaptability — document processing, reviews that always follow one template, mechanical migrations.
8.2
Dynamic adaptive decomposition
The next subtask is generated from what the last one found. The plan does not exist at the start.
8.2b
Which one
Not a preference. It follows from whether the scope is knowable before you start.
| signal in the scenario | choose |
|---|---|
| structure is predictable, always the same template | fixed pipeline |
| every step is known up front | fixed pipeline |
| you need stability and reproducible runs | fixed pipeline |
| open-ended investigation | dynamic |
| full scope unknown at the start | dynamic |
| each step depends on what the last one returned | dynamic |
8.3
Multi-pass review
Ten or more files in one prompt does not review ten files. It reviews some of them.
Recall in 60 seconds
- Fixed pipeline = all steps defined up front; use it for predictable, repeatable work.
- Dynamic decomposition = subtasks generated from intermediate results.
- Signal for dynamic: scope unknown, open-ended investigation, each step depends on the last.
- Signal for fixed: same template every time, and you need reproducibility.
- A 10+ file PR needs per-file passes, not one big prompt.
- One prompt over many files causes attention dilution, inconsistent flagging and missed bugs.
- The integration pass is mandatory — cross-file issues appear nowhere else.
- Local issues and boundary issues are different passes on purpose.