From dacd0beed37f19cf19b8d73b89a03100dc8ebb84 Mon Sep 17 00:00:00 2001 From: Tibsfox Date: Tue, 3 Mar 2026 03:00:36 -0800 Subject: [PATCH] fix(planner): compute wave numbers for gap closure plans MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Gap closure plans hardcode wave: 1 and depends_on: [], bypassing the standard wave assignment logic. When multiple gap closure plans have dependencies between them, they all land in wave 1 and execute in parallel — ignoring dependency ordering. Add an explicit wave computation step using the same assign_waves algorithm as standard planning. Closes #856 Co-Authored-By: Claude Opus 4.6 --- agents/gsd-planner.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/agents/gsd-planner.md b/agents/gsd-planner.md index 957233298..4013c98cd 100644 --- a/agents/gsd-planner.md +++ b/agents/gsd-planner.md @@ -852,15 +852,20 @@ grep -l "status: diagnosed" "$phase_dir"/*-UAT.md 2>/dev/null ``` -**7. Write PLAN.md files:** +**7. Assign waves using standard dependency analysis** (same as `assign_waves` step): +- Plans with no dependencies → wave 1 +- Plans that depend on other gap closure plans → max(dependency waves) + 1 +- Also consider dependencies on existing (non-gap) plans in the phase + +**8. Write PLAN.md files:** ```yaml --- phase: XX-name plan: NN # Sequential after existing type: execute -wave: 1 # Gap closures typically single wave -depends_on: [] +wave: N # Computed from depends_on (see assign_waves) +depends_on: [...] # Other plans this depends on (gap or existing) files_modified: [...] autonomous: true gap_closure: true # Flag for tracking