Prompt Patterns

Hierarchical Decomposition

Breaks a concept into its immediate constituent parts, increasing resolution through containment rather than variation.

Also known asOutline ExpansionPart-Whole DecompositionStructural Breakdown
Hierarchical Decomposition pattern diagram

Problem

Complex topics are often returned as flat lists or linear prose, obscuring part-whole structure and boundaries.

Solution

Ask for decomposition into components (and optionally subcomponents) as a hierarchy. Containment-based structuring increases resolution and makes system organization explicit.

Example

One worked example. The book has 2–4 per technique.

Prompt
Break a continuous delivery pipeline into its main components. For each component, list its sub-components.
Response
1. **Source Control**
   - Repository management
   - Branching strategy
   - Commit hooks and pipeline triggers

2. **Build**
   - Compilation / packaging
   - Dependency resolution
   - Artifact generation

3. **Test**
   - Unit tests
   - Integration tests
   - Performance tests
   - Security scans

4. **Deployment**
   - Environment provisioning
   - Staging deployment
   - Production release (automated or gated)
   - Rollback mechanism

5. **Observability**
   - Monitoring and alerting
   - Log aggregation
   - Health checks

Techniques

Concrete ways to implement Hierarchical Decomposition. Each technique fits a different situation.

  • 01

    Component Decomposition

    Break a concept into its parts at a single level to establish the major components without going deeper.

  • 02

    Recursive Decomposition

    Decompose each part further into sub-components to produce a multi-level tree when a domain needs to be understood at multiple levels.

Prompt Patterns book cover

Full treatment in the book

Hierarchical Decomposition — the complete chapter

  • Mechanism — why this pattern works
  • 2–4 worked examples per technique
  • Placement, sequencing, and debugging rules
  • Composition with related patterns