From fb3ee5665118a0116bcc06620f43f8d32091fc47 Mon Sep 17 00:00:00 2001 From: Tom Boucher Date: Thu, 6 Aug 2026 06:44:28 -0400 Subject: [PATCH] fix(#3033): resolve zero-plan split-parent phase as complete when roadmap checkbox is checked (#3114) * fix(#3033): resolve zero-plan split-parent phase as complete when roadmap checkbox is checked A phase split into sub-phases (parent kept as shared context, zero plans by design) was permanently stuck as 'researched' because the roadmap- checkbox override at line 2266 required completion.phase_complete (derived from plan/summary counts), which is always false for zero-plan phases. The parent was permanently eligible for current-phase selection and re-planning recommendations. The override now fires when roadmapComplete AND planCount === 0 (the split-parent shape), treating it as complete regardless of the plan-count derivation. A zero-plan phase whose checkbox is still unchecked stays in-progress (researched). Ordinary phases with plans are unchanged. * chore(#3033): backfill changeset PR number 3114 --------- Co-authored-by: sim --- .changeset/curious-jaguars-gather.md | 5 +++++ src/init.cts | 10 +++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 .changeset/curious-jaguars-gather.md diff --git a/.changeset/curious-jaguars-gather.md b/.changeset/curious-jaguars-gather.md new file mode 100644 index 000000000..8fa05a5b3 --- /dev/null +++ b/.changeset/curious-jaguars-gather.md @@ -0,0 +1,5 @@ +--- +type: Fixed +pr: 3114 +--- +**A split-parent phase marked complete in the ROADMAP is no longer permanently reported as `current_phase`** — a phase split into sub-phases (parent kept as shared context, zero plans by design) was stuck as `researched` because the roadmap-checkbox override required `completion.phase_complete` (always false for zero-plan phases). The override now fires for zero-plan phases when the roadmap checkbox is checked. (#3033) diff --git a/src/init.cts b/src/init.cts index 0daaeb112..b642fb690 100644 --- a/src/init.cts +++ b/src/init.cts @@ -2263,7 +2263,15 @@ function cmdInitManager(cwd: string, raw: boolean): void { } const roadmapComplete = _checkboxStates.get(phaseNum) || false; - if (roadmapComplete && completion.phase_complete && diskStatus !== 'complete') { + // #3033: a zero-plan phase (split parent — intentionally plan-less, holds + // shared context for sub-phases) whose roadmap checkbox is marked complete + // must resolve as complete. The original gate required completion.phase_complete + // (derived from plan/summary counts), which is always false for zero-plan + // phases — so the checkbox override never fired and the parent was permanently + // stuck as 'researched' (an in-progress state eligible for current-phase + // selection). Now: when the roadmap marks it complete AND it has zero plans, + // treat it as complete regardless of the plan-count derivation. + if (roadmapComplete && (completion.phase_complete || planCount === 0) && diskStatus !== 'complete') { diskStatus = 'complete'; }