fix: /mgw:project creates STATE.md and archives old phases#34
Closed
snipcodeit wants to merge 2 commits intomainfrom
Closed
fix: /mgw:project creates STATE.md and archives old phases#34snipcodeit wants to merge 2 commits intomainfrom
snipcodeit wants to merge 2 commits intomainfrom
Conversation
- Insert archive_phases step before write_roadmap to preserve old phase dirs - Insert write_state step after write_roadmap to create STATE.md from GSD template - Update report step to show STATE.md and archival status - Update success_criteria to include STATE.md and archival checks Co-Authored-By: Claude Opus 4.6 <[email protected]>
- Copy updated commands/project.md to .claude/commands/mgw/project.md - Both files are byte-identical with archive_phases and write_state steps Co-Authored-By: Claude Opus 4.6 <[email protected]>
Owner
Author
Testing ProceduresQuick Verification (code review)# Step ordering
grep -n 'step name="archive_phases"\|step name="write_roadmap"\|step name="write_state"\|step name="write_project_json"' commands/project.md
# Mirror identical
diff commands/project.md .claude/commands/mgw/project.md
# STATE.md template sections present
grep -c '## Project Reference\|## Current Position\|## Performance Metrics\|## Accumulated Context\|## Session Continuity' commands/project.mdEnd-to-End Test
Edge Cases
|
Owner
Author
|
Closing — wrong approach. This PR adds more GSD file management to MGW, but the correct fix is the opposite: MGW should stop writing .planning/ROADMAP.md entirely and let GSD manage all .planning/ files. See replacement issue for the correct architecture. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
archive_phasesstep to/mgw:projectthat moves existing.planning/phases/to.planning/ARCHIVED-phases-pre-{name}-{date}/before writing a new ROADMAPwrite_statestep that creates.planning/STATE.mdfrom the GSD template, initialized for Phase 1 with skip-if-exists guardCloses #33
Changes
commands/project.md(+230 lines):archive_phasesstep inserted beforewrite_roadmap— checks for existing phase directories, archives them with a timestamped name, setsARCHIVE_STATUSwrite_statestep inserted afterwrite_roadmap— creates full GSD-compliant STATE.md with all 8 sections (Project Reference, Current Position, Performance Metrics, Accumulated Context, Session Continuity), setsSTATE_STATUSreportstep GSD scaffold section to displayROADMAP_STATUS,STATE_STATUS, andARCHIVE_STATUSsuccess_criteriawith two new checklist items.claude/commands/mgw/project.md(mirror):commands/project.mdTest Plan
archive_phasesstep appears beforewrite_roadmapincommands/project.mdwrite_statestep appears afterwrite_roadmapand beforewrite_project_jsondiff commands/project.md .claude/commands/mgw/project.md/mgw:projecton a test repo with existing.planning/phases/— confirm archival + STATE.md creation/mgw:projecton a clean repo — confirm STATE.md created, archival skipped gracefullyVerification
GSD verifier passed 5/5 must-haves: