Files
msd-core/.changeset/fix-3128-roadmap-plan-count-slug.md
Tom Boucher b0be6755e7 fix(#3128): extend roadmap.cjs plan-count to detect {N}-PLAN-{NN}-{slug}.md layout (#3139)
* fix(#3128): extend roadmap.cjs plan-count to match {N}-PLAN-{NN}-{slug}.md

Root cause: same regex flaw as #2893 (fixed in phase.cjs by #2896).
The manager-dashboard countPhasePlansAndSummaries() in roadmap.cjs was
not updated alongside the phase.cjs fix. Files like 5-PLAN-01-setup.md
end in -setup.md, not -PLAN.md, so plan_count returned 0.

Symptom: init manager returned plan_count=0 / disk_status=discussed for
fully-planned phases, triggering redundant background planner agents that
correctly detected existing plans and declined -- wasted runs.

Fix: apply the same looksLikePlanFile pattern from phase.cjs with
PLAN-OUTLINE and pre-bounce exclusions to countPhasePlansAndSummaries.

Regression test: tests/bug-3128-roadmap-plan-count-slug-layout.test.cjs
Suite: 6985/6985. Closes #3128.

* fix(lint): allow-test-rule for roadmap isPlanFile structural contract test
2026-05-05 15:02:07 -04:00

712 B

type, pr
type pr
Fixed 3128

roadmap.cjs plan_count now correctly detects {N}-PLAN-{NN}-{slug}.md files — the manager-dashboard plan-count filter matched only *-PLAN.md and PLAN.md, missing the slug-form layout (5-PLAN-01-setup.md) that gsd-plan-phase actually writes. init manager returned plan_count: 0 / disk_status: "discussed" for fully-planned phases, causing the manager to recommend and dispatch redundant background planner agents. Same regex flaw as #2893 (fixed in phase.cjs via PR #2896); roadmap.cjs was missed in that sweep. Fix applies the same looksLikePlanFile logic (with PLAN-OUTLINE and pre-bounce exclusions) to countPhasePlansAndSummaries. Closes #3128.