Files
msd-core/.changeset/2056-plan-phase-foreign-prefix.md
Tom Boucher 250c901b5d fix(#2056): guard init plan-phase against foreign-prefix numeric collapse
normalizePhaseName() strips any [A-Z][A-Z0-9_]*- prefix as a project code,
so a foreign-prefixed query like MEM-01 collapsed to 01 and resolved to
the unrelated numeric Phase 01 via the dir/roadmap fallback. Add a guard
in cmdInitPlanPhase: when the query carries a prefix that is not the
configured project_code, require exact prefixed evidence (a phase dir whose
token literally IS the prefixed query, or a roadmap entry literally headed
with it) before accepting a match; otherwise report phase_found:false.
The project_code's own prefixed phases pass through unchanged.
2026-07-08 14:04:52 -04:00

526 B

type, pr
type pr
Fixed 0

init plan-phase no longer collapses foreign-prefixed task/workstream IDs into numeric phases — a query like MEM-01 (where MEM is not the configured project_code) used to have its prefix stripped and resolve to the unrelated numeric Phase 01; it now reports phase_found: false unless a phase directory or roadmap entry literally carries that prefix. The configured project_code's own prefixed phases (e.g. LKML-01 under project_code: LKML) continue to resolve as before. (#2056)