Skip to content

mgw:run must create GSD phase directories when routing to gsd:new-milestone #52

@snipcodeit

Description

@snipcodeit

BLUF

When /mgw:run routes an issue to gsd:new-milestone, it should ensure GSD creates the full .planning/phases/ directory structure matching the ROADMAP phases. Currently, work executes but GSD phase state is never instantiated, causing /gsd:progress to show stale data and route incorrectly.

What's Wrong

After completing all 4 MGW milestones (28 issues, all merged), running /gsd:progress routes to "discuss phase 1" because:

  1. Stale phase directories from the tool-building milestone remain in .planning/phases/ (01-shared-workflow-hardening, 02-template-engine, etc.)
  2. No new phase directories were created for the open-source release ROADMAP phases (Community Files, GitHub Config, Package Prep, etc.)
  3. ROADMAP.md progress table shows all phases "Not started" despite all work being complete
  4. GSD has no visibility into MGW's pipeline state — it only reads .planning/phases/

Root Cause

MGW's /mgw:run delegates to GSD agents (planner, executor, verifier) but doesn't ensure the full GSD lifecycle runs:

  • gsd:new-milestone should create ROADMAP.md with phases → this happens
  • gsd:plan-phase N should create .planning/phases/NN-slug/ with PLAN.md → this is skipped
  • gsd:execute-phase N should create SUMMARY.md and advance STATE.md → this is skipped
  • gsd:complete-milestone should archive old phase dirs → never called

The result: MGW completes work via GitHub issues/PRs, but GSD's state (.planning/) is never updated to reflect it.

What's Needed

  1. When mgw:run routes to gsd:new-milestone, it must orchestrate the full GSD lifecycle:

    • Create milestone → plan each phase → execute each phase → verify → complete milestone
    • Each phase should produce proper .planning/phases/ artifacts (PLAN.md, SUMMARY.md)
  2. When mgw:run routes to gsd:quick or gsd:quick --full, it must create proper .planning/quick/ artifacts

  3. After all issues in an MGW milestone complete, gsd:complete-milestone should be triggered to archive phase directories and advance state

  4. Old .planning/phases/ from previous milestones must be cleaned up (either during complete-milestone or via gsd:cleanup)

What's Involved

  • commands/run.md — the execute_gsd_milestone step needs to orchestrate plan-phase and execute-phase for each ROADMAP phase, not just spawn a single executor
  • commands/milestone.md — needs a completion hook that calls gsd:complete-milestone
  • .planning/ state — needs cleanup of stale dirs from tool-building milestone
  • workflows/gsd.md — GSD Milestone Pipeline Pattern section needs to match actual GSD lifecycle

Additional Context

GSD research confirms the expected lifecycle:

  • Phases are created by gsd:plan-phase N.planning/phases/NN-slug/ with RESEARCH.md, PLAN.md
  • Execution by gsd:execute-phase N → adds SUMMARY.md, VERIFICATION.md, updates ROADMAP progress
  • Milestone completion by gsd:complete-milestone → archives to .planning/milestones/, resets STATE.md
  • MGW should orchestrate this sequence, not bypass it

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions