feat(actor): add plan_subplan tool and decision emission #198

Closed
opened 2026-02-22 23:40:02 +00:00 by freemo · 1 comment
Owner

Metadata

  • Commit Message: feat(actor): add plan_subplan tool and decision emission
  • Branch: feature/m5-subplan-actor

Background

A plan_subplan tool is available to strategy actors, emitting SUBPLAN_SPAWN decisions. parallel=true emits SUBPLAN_PARALLEL_SPAWN with dependency lists. Decision payloads include merge strategy, resource scope, and context view overrides.

Acceptance Criteria

  • Add plan_subplan tool to strategy actors and emit SUBPLAN_SPAWN decisions.
  • Support parallel=true to emit SUBPLAN_PARALLEL_SPAWN and include dependency list.
  • Include merge strategy, resource scope, and context view overrides in decision payload.
  • Validate that subplan tool payload includes at least one resource scope or project ref.
  • Add schema validation for max_parallel, merge_strategy, and dependency list in tool payload.

Definition of Done

This issue is complete when:

  • All subtasks below are completed and checked off.
  • A Git commit is created where the first line of the commit message matches
    the Commit Message in Metadata exactly, followed by a blank line, then
    additional lines providing relevant details about the implementation. The
    commit body should be appropriate in size for a commit message and relatively
    complete in describing what was done.
  • The commit is pushed to the remote on the branch matching the Branch in
    Metadata exactly.
  • The commit is submitted as a pull request to master, reviewed, and
    merged before this issue is marked done.

Subtasks

  • Add plan_subplan tool to strategy actors and emit SUBPLAN_SPAWN decisions.
  • Support parallel=true to emit SUBPLAN_PARALLEL_SPAWN and include dependency list.
  • Include merge strategy, resource scope, and context view overrides in decision payload.
  • Validate that subplan tool payload includes at least one resource scope or project ref.
  • Add schema validation for max_parallel, merge_strategy, and dependency list in tool payload.
  • Add defaulting rules for omitted fields (inherit from action/plan; explicit override markers).
  • Emit decision rationale text with summary of why subplan was spawned (for explain output).
  • Update actor YAML examples for subplan emission.
  • Add a minimal plan_subplan tool payload example and a parallel spawn example with dependencies.
  • Tests (Behave): Add scenarios for subplan decision emission (parallel + dependencies).
  • Tests (Robot): Add actor tool integration smoke tests.
  • Tests (ASV): Add benchmarks/subplan_actor_tool_bench.py for tool invocation overhead.
  • Verify coverage >=97% via nox -s coverage_report. If coverage is <97% then review the current unit test coverage report at build/coverage.xml and use it to write new Behave based unit tests to improve code coverage. Specifically, write Behave style unit tests that are descriptively named and specifically improves coverage on whichever file has the most uncovered lines by writing tests that will target the uncovered lines in the report. Once that is done rerun nox -s coverage_report to verify all tests pass and coverage is above >=97%. Only mark this as complete once coverage is >=97%, if not repeat this task as many times as is needed until coverage reaches >=97%.
  • Run nox (all default sessions, including benchmark), fix any errors if needed ensuring nox passes across entire code base, do not ignore any failure even if it seems unrelated to this commit, fix it.

Section: #### M5: ACMS v1 + Context Scaling (Day 26)
Status: Open

## Metadata - **Commit Message**: `feat(actor): add plan_subplan tool and decision emission` - **Branch**: `feature/m5-subplan-actor` ## Background A `plan_subplan` tool is available to strategy actors, emitting SUBPLAN_SPAWN decisions. `parallel=true` emits SUBPLAN_PARALLEL_SPAWN with dependency lists. Decision payloads include merge strategy, resource scope, and context view overrides. ## Acceptance Criteria - [ ] Add `plan_subplan` tool to strategy actors and emit SUBPLAN_SPAWN decisions. - [ ] Support `parallel=true` to emit SUBPLAN_PARALLEL_SPAWN and include dependency list. - [ ] Include merge strategy, resource scope, and context view overrides in decision payload. - [ ] Validate that subplan tool payload includes at least one resource scope or project ref. - [ ] Add schema validation for `max_parallel`, `merge_strategy`, and dependency list in tool payload. ## Definition of Done This issue is complete when: - All subtasks below are completed and checked off. - A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation. The commit body should be appropriate in size for a commit message and relatively complete in describing what was done. - The commit is pushed to the remote on the branch matching the **Branch** in Metadata exactly. - The commit is submitted as a **pull request** to `master`, reviewed, and **merged** before this issue is marked done. ## Subtasks - [ ] Add `plan_subplan` tool to strategy actors and emit SUBPLAN_SPAWN decisions. - [ ] Support `parallel=true` to emit SUBPLAN_PARALLEL_SPAWN and include dependency list. - [ ] Include merge strategy, resource scope, and context view overrides in decision payload. - [ ] Validate that subplan tool payload includes at least one resource scope or project ref. - [ ] Add schema validation for `max_parallel`, `merge_strategy`, and dependency list in tool payload. - [ ] Add defaulting rules for omitted fields (inherit from action/plan; explicit override markers). - [ ] Emit decision rationale text with summary of why subplan was spawned (for explain output). - [ ] Update actor YAML examples for subplan emission. - [ ] Add a minimal `plan_subplan` tool payload example and a parallel spawn example with dependencies. - [ ] Tests (Behave): Add scenarios for subplan decision emission (parallel + dependencies). - [ ] Tests (Robot): Add actor tool integration smoke tests. - [ ] Tests (ASV): Add `benchmarks/subplan_actor_tool_bench.py` for tool invocation overhead. - [ ] Verify coverage >=97% via `nox -s coverage_report`. If coverage is <97% then review the current unit test coverage report at `build/coverage.xml` and use it to write new Behave based unit tests to improve code coverage. Specifically, write Behave style unit tests that are descriptively named and specifically improves coverage on whichever file has the most uncovered lines by writing tests that will target the uncovered lines in the report. Once that is done rerun `nox -s coverage_report` to verify all tests pass and coverage is above >=97%. Only mark this as complete once coverage is >=97%, if not repeat this task as many times as is needed until coverage reaches >=97%. - [ ] Run `nox` (all default sessions, including benchmark), fix any errors if needed ensuring nox passes across **entire** code base, do not ignore any failure even if it seems unrelated to this commit, fix it. **Section**: #### M5: ACMS v1 + Context Scaling (Day 26) **Status**: Open
freemo added this to the v3.4.0 milestone 2026-02-22 23:40:02 +00:00
Author
Owner

Expected completion updated (Day 15 rebaseline): Day 34 / 2026-03-14 (previously Day 28 / 2026-03-08)

**Expected completion updated (Day 15 rebaseline):** Day 34 / 2026-03-14 (previously Day 28 / 2026-03-08)
freemo added the due date 2026-03-06 2026-02-23 18:41:40 +00:00
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".

2026-03-06

Blocks
#368 Epic: Subplans & Parallelism
cleveragents/cleveragents-core
#392 Epic: Actor YAML & Compiler
cleveragents/cleveragents-core
#394 Epic: Decision Framework
cleveragents/cleveragents-core
Reference
cleveragents/cleveragents-core#198
No description provided.