Appearance
Adaptive Goal Decomposition
Extend the Target Convergence Prompt with on-demand subgoals: agents decide dynamically whether to work directly or decompose, keeping progress stable and recoverable.
Problem
Prompts either over-plan (decompose everything up front) or under-plan (tackle complex goals monolithically). Adaptive decomposition lets agents decide at each iteration whether a criterion is small enough to address directly or broad enough to warrant subgoals.
Terminology
Goal — Declarative description of the desired end state, typically 1–3 sentences. Describes what must be true when complete, not how to achieve it.
Acceptance Criteria — Binary, verifiable conditions that prove the Goal is met. State-based phrasing ("exists", "includes", "passes", "returns", "renders") indicates proof of success, not means of achieving it.
Subgoals — Intermediate outcomes, each with its own Goal and Acceptance Criteria. Created only when an acceptance criterion is too broad to satisfy directly. Each subgoal explicitly states which parent criterion it advances.
The Decision Step
During the Assess phase of the convergence loop, add a decision:
markdown
## Convergence Loop
On each iteration:
1. **Assess:** Identify the gap between acceptance criteria and current state.
For each unmet criterion, decide: work directly or create subgoals?
2. **Plan:** Identify what changes to make next (or define subgoals)
3. **Act:** Make the changes (or execute subgoals)
4. **Repeat:** Iterate until acceptance criteria are metThe loop remains idempotent — the same prompt works on the first try or the hundredth because the assess step re-evaluates from current state every time.
Work Directly When
- The path to satisfy a criterion is clear
- Changes are related and can be made together
- Criterion scope is manageable in a single pass
Create Subgoals When
- A criterion requires many unrelated changes
- The path forward is unclear and needs exploration
- The criterion spans multiple files, systems, or concerns
Subgoal Execution
Each subgoal runs its own convergence loop with its own Goal and Acceptance Criteria. When all subgoals complete, control returns to the parent loop, which reassesses whether the original criterion is now satisfied.
Parent Goal
├── Criterion A (work directly)
├── Criterion B (too broad → subgoals)
│ ├── Subgoal B.1 (own convergence loop)
│ └── Subgoal B.2 (own convergence loop)
│ └── ← reassess Criterion B
└── Criterion C (work directly)Guardrails
- Maximum depth: 2 levels (parent → child → grandchild). If a subgoal seems to need its own subgoals, the parent criterion needs better scoping.
- 2–4 subgoals per split. Fewer than 2 means decomposition was unnecessary. More than 4 means the parent criterion is too broad — re-scope it.
- Completeness check: After subgoals complete, reassess whether the original criterion is satisfied. Subgoal completion does not guarantee parent satisfaction.
Progress Summaries
After each iteration (or subgoal completion), produce a brief progress summary:
- Which criteria are now met
- Which criteria remain open
- What changed since last iteration
- What the next action or subgoal is
Progress summaries keep long-running tasks recoverable — an agent resuming from a summary can pick up where the previous iteration left off.
Examples
Example: Working Directly
markdown
Acceptance Criteria:
- [ ] Route `/profile` exists
- [ ] Page displays user's name
Assessment: Both criteria are clear and related. Working directly.No decomposition needed. The agent edits the route and template in one pass.
Example: Creating Subgoals
markdown
Acceptance Criteria:
- [ ] API integration works correctly
Assessment: This criterion is too broad — it spans client configuration,
endpoint implementation, and error handling. Creating subgoals.
Subgoal 1: API client configured (advances "API integration works correctly")
- [ ] HTTP client library installed
- [ ] Base URL configured from environment
- [ ] Authentication headers included
Subgoal 2: Endpoints implemented (advances "API integration works correctly")
- [ ] GET /users returns user list
- [ ] POST /users creates a new user
- [ ] Error responses mapped to application errors
Progress summary after Subgoal 1:
- Met: API client configured (library installed, base URL set, auth headers)
- Open: Endpoints not yet implemented
- Next: Begin Subgoal 2References
- ADaPT (2023): On-demand subgoal generation improves long-horizon task success compared to upfront planning. arXiv:2311.05772
- Hierarchical Task Networks (HTN): Hierarchical decomposition enables flexible planning by breaking complex goals into manageable subgoals. Wikipedia
- Goal-conditioned RL: Outcome-based planning outperforms fixed step sequences when paths are uncertain. Nachum et al., 2018