forked from cleveragents/cleveragents-core
21e9a65c33
Replace the metadata-only subplan spawn with real child Plan domain object creation. SubplanService.spawn() now creates full Plan instances with proper PlanIdentity (linking parent_plan_id and root_plan_id), sets them to PlanPhase.STRATEGIZE / ProcessingState.QUEUED, and returns them in the SpawnResult.child_plans list for downstream lifecycle orchestration. Key changes: - SubplanService.spawn() now creates Plan domain objects for each spawn entry with complete PlanIdentity linking, inheriting the parent plan's namespace, actors, project links, definition_of_done, and access settings. - SpawnResult dataclass extended with child_plans: list[Plan] field to carry the created child plans alongside the existing metadata and statuses. - Parent plan's subplan_statuses list is updated with SubplanStatus entries tracking each child's lifecycle state. - Fixed Pyright type errors: added missing definition_of_done, reusable, read_only, and server parameters to Plan and NamespacedName constructors. - Removed @tdd_expected_fail tags from TDD test files since the bug is fixed. - Added Behave scenarios and Robot integration tests verifying child plan creation, lifecycle phase/state, and parent tracking. ISSUES CLOSED: #823