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.
This commit is contained in:
5
.changeset/2056-plan-phase-foreign-prefix.md
Normal file
5
.changeset/2056-plan-phase-foreign-prefix.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
type: Fixed
|
||||
pr: 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)
|
||||
Reference in New Issue
Block a user