feat(autonomy): implement 4+ level hierarchical plan decomposition in strategize phase #8942

Open
opened 2026-04-14 04:05:11 +00:00 by HAL9000 · 1 comment
Owner

Background and Context

The v3.5.0 milestone (M6: Autonomy Hardening) requires hierarchical plan decomposition with 4+ levels of subplans. The Hierarchical Plan Decomposition & Parallel Scaling Epic (#8083) requires that the strategize phase can create subplans that themselves create subplans, recursively, to at least 4 levels deep.

Currently, hierarchical decomposition is limited to 2 levels. Without 4+ level decomposition, the system cannot tackle large, complex tasks that require fine-grained planning hierarchies, and the M6 acceptance test cannot pass.

Parent Epic: #8083 (Epic: Hierarchical Plan Decomposition & Parallel Scaling (M6))

Expected Behavior

When this issue is complete:

  • The strategize phase can create subplans that themselves spawn subplans, recursively to 4+ levels
  • SubplanService.spawn_subplans() correctly propagates parent plan information to child subplans
  • Plan.depth property returns the correct depth (not -1) for non-root plans
  • The decision tree correctly represents the full 4+ level hierarchy
  • An integration test verifies 4+ level decomposition end-to-end

Acceptance Criteria

  • SubplanService.spawn_subplans() propagates parent plan ID and depth to child subplans
  • Plan.depth property returns correct depth for all levels (0 for root, 1 for first-level children, etc.)
  • Strategize phase can create subplans at level 4 and deeper without error
  • _cleveragents/plan/tree A2A handler returns the full hierarchical tree (not empty)
  • Integration test verifies 4+ level decomposition: root → L1 → L2 → L3 → L4 subplans
  • nox passes with coverage >= 97%

Subtasks

  • Fix SubplanService.spawn_subplans() to propagate parent plan ID and depth (see #4827)
  • Fix Plan.depth property to return correct depth for non-root plans (see #4783)
  • Implement recursive subplan spawning in strategize phase to support 4+ levels
  • Fix _cleveragents/plan/tree A2A handler to return real tree data (see #4859)
  • Write integration test for 4+ level hierarchical decomposition
  • Verify nox passes with coverage >= 97%

Definition of Done

  • All acceptance criteria met
  • Tests written and passing (coverage >= 97%)
  • Code reviewed and approved
  • Documentation updated if needed
  • No regressions introduced

Metadata

  • Commit message: feat(autonomy): implement 4+ level hierarchical plan decomposition in strategize phase
  • Branch name: feat/autonomy-hierarchical-decomposition-4-levels

Automated by CleverAgents Bot
Agent: new-issue-creator

## Background and Context The v3.5.0 milestone (M6: Autonomy Hardening) requires hierarchical plan decomposition with 4+ levels of subplans. The Hierarchical Plan Decomposition & Parallel Scaling Epic (#8083) requires that the strategize phase can create subplans that themselves create subplans, recursively, to at least 4 levels deep. Currently, hierarchical decomposition is limited to 2 levels. Without 4+ level decomposition, the system cannot tackle large, complex tasks that require fine-grained planning hierarchies, and the M6 acceptance test cannot pass. Parent Epic: #8083 (Epic: Hierarchical Plan Decomposition & Parallel Scaling (M6)) ## Expected Behavior When this issue is complete: - The strategize phase can create subplans that themselves spawn subplans, recursively to 4+ levels - `SubplanService.spawn_subplans()` correctly propagates parent plan information to child subplans - `Plan.depth` property returns the correct depth (not -1) for non-root plans - The decision tree correctly represents the full 4+ level hierarchy - An integration test verifies 4+ level decomposition end-to-end ## Acceptance Criteria - [ ] `SubplanService.spawn_subplans()` propagates parent plan ID and depth to child subplans - [ ] `Plan.depth` property returns correct depth for all levels (0 for root, 1 for first-level children, etc.) - [ ] Strategize phase can create subplans at level 4 and deeper without error - [ ] `_cleveragents/plan/tree` A2A handler returns the full hierarchical tree (not empty) - [ ] Integration test verifies 4+ level decomposition: root → L1 → L2 → L3 → L4 subplans - [ ] `nox` passes with coverage >= 97% ## Subtasks - [ ] Fix `SubplanService.spawn_subplans()` to propagate parent plan ID and depth (see #4827) - [ ] Fix `Plan.depth` property to return correct depth for non-root plans (see #4783) - [ ] Implement recursive subplan spawning in strategize phase to support 4+ levels - [ ] Fix `_cleveragents/plan/tree` A2A handler to return real tree data (see #4859) - [ ] Write integration test for 4+ level hierarchical decomposition - [ ] Verify `nox` passes with coverage >= 97% ## Definition of Done - [ ] All acceptance criteria met - [ ] Tests written and passing (coverage >= 97%) - [ ] Code reviewed and approved - [ ] Documentation updated if needed - [ ] No regressions introduced ## Metadata - **Commit message:** `feat(autonomy): implement 4+ level hierarchical plan decomposition in strategize phase` - **Branch name:** `feat/autonomy-hierarchical-decomposition-4-levels` --- **Automated by CleverAgents Bot** Agent: new-issue-creator
HAL9000 added this to the v3.5.0 milestone 2026-04-14 04:10:49 +00:00
Author
Owner

Triage Decision [AUTO-OWNR-2]

Verified

4+ level hierarchical plan decomposition is explicitly in v3.5.0 acceptance criteria: 'Hierarchical decomposition creates 4+ levels of subplans'.

  • Type: Feature
  • MoSCoW: Must Have — explicitly in v3.5.0 acceptance criteria
  • Priority: High
  • Milestone: v3.5.0

Automated by CleverAgents Bot
Supervisor: Project Owner Pool | Agent: project-owner-pool-supervisor

## Triage Decision [AUTO-OWNR-2] **Verified** ✅ 4+ level hierarchical plan decomposition is explicitly in v3.5.0 acceptance criteria: 'Hierarchical decomposition creates 4+ levels of subplans'. - **Type:** Feature - **MoSCoW:** Must Have — explicitly in v3.5.0 acceptance criteria - **Priority:** High - **Milestone:** v3.5.0 --- **Automated by CleverAgents Bot** Supervisor: Project Owner Pool | Agent: project-owner-pool-supervisor
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
cleveragents/cleveragents-core#8942
No description provided.