11---
22name : mgw:project
3- description : Initialize a new project — generate AI-driven milestones and issues from project description, write GSD ROADMAP and project state
3+ description : Initialize a new project — generate AI-driven milestones and issues from project description, persist project state
44argument-hint : " "
55allowed-tools :
66 - Bash
@@ -13,9 +13,13 @@ allowed-tools:
1313
1414<objective >
1515Turn a project description into a fully structured GitHub project: milestones created,
16- issues scaffolded from AI-generated project-specific content, dependencies labeled, GSD ROADMAP.md
17- written, and state persisted. The developer never leaves Claude Code and never does
18- project management manually.
16+ issues scaffolded from AI-generated project-specific content, dependencies labeled, and
17+ state persisted. The developer never leaves Claude Code and never does project management
18+ manually.
19+
20+ MGW does NOT write to .planning/ — that directory is owned by GSD. If a project needs
21+ a ROADMAP.md or other GSD files, run the appropriate GSD command (e.g., /gsd: new-milestone )
22+ after project initialization.
1923
2024This command creates structure only. It does NOT trigger execution.
2125Run /mgw: milestone to begin executing the first milestone.
469473Store ` PROJECT_NUMBER ` and ` PROJECT_URL ` for inclusion in project.json and the summary report.
470474</step >
471475
472- <step name =" write_roadmap " >
473- ** Write GSD ROADMAP.md to the target project's .planning/ directory**
474-
475- ``` bash
476- mkdir -p " ${REPO_ROOT} /.planning"
477- ROADMAP_PATH=" ${REPO_ROOT} /.planning/ROADMAP.md"
478-
479- if [ -f " $ROADMAP_PATH " ]; then
480- echo " ROADMAP.md already exists — skipping (won't overwrite existing GSD work)"
481- ROADMAP_STATUS=" skipped (exists)"
482- else
483- ROADMAP_STATUS=" written"
484- fi
485- ```
486-
487- If ROADMAP.md does not exist, construct and write it using template data:
488-
489- The ROADMAP.md must follow the GSD format from ` /home/hat/.claude/get-shit-done/templates/roadmap.md ` :
490-
491- ** Structure:**
492-
493- ``` markdown
494- # Roadmap: {PROJECT_NAME}
495-
496- ## Overview
497-
498- {DESCRIPTION}. This project follows the {GENERATED_TYPE} pipeline.
499-
500- ## Phases
501-
502- - [ ] ** Phase 1: {phase_name}** - {phase_description}
503- - [ ] ** Phase 2: {phase_name}** - {phase_description}
504- ...
505-
506- ## Phase Details
507-
508- ### Phase 1: {phase_name}
509- ** Goal** : {phase_description}
510- ** Depends on** : Nothing (first phase)
511- ** Requirements** : (tracked in GitHub — see milestone "{milestone_name}")
512- ** Success Criteria** (what must be TRUE):
513- 1 . {issue_title_1}
514- 2 . {issue_title_2}
515- 3 . {issue_title_3}
516- ** Plans** : TBD
517-
518- Plans:
519- - [ ] 01-01: TBD
520-
521- ### Phase 2: {phase_name}
522- ** Goal** : {phase_description}
523- ** Depends on** : Phase 1
524- ** Requirements** : (tracked in GitHub — see milestone "{milestone_name}")
525- ** Success Criteria** (what must be TRUE):
526- 1 . {issue_title_1}
527- ...
528- ** Plans** : TBD
529-
530- Plans:
531- - [ ] 02-01: TBD
532-
533- ## Progress
534-
535- | Phase | Plans Complete | Status | Completed |
536- | -------| ----------------| --------| -----------|
537- | 1. {phase_name} | 0/1 | Not started | - |
538- | 2. {phase_name} | 0/1 | Not started | - |
539- ...
540- ```
541-
542- Generate this content using the template data from ` /tmp/mgw-template.json ` . Iterate over
543- milestones → phases → issues to build each section. Use the Write tool to create
544- the file at ` $ROADMAP_PATH ` .
545-
546- ** Mapping rules:**
547- - Each template phase → one GSD phase (numbered globally across milestones)
548- - Phase ` description ` → ` **Goal** `
549- - Phase ` issues[].title ` → success criteria bullets (one per issue, as observable behaviors)
550- - First phase → ` **Depends on**: Nothing (first phase) ` , others → ` **Depends on**: Phase N-1 `
551- - Milestone name → Requirements milestone reference
552- - Plans section: always ` TBD ` initially with placeholder ` {NN}-01: TBD `
553- - Use ` $GENERATED_TYPE ` (from the AI-generated JSON) in the Overview line instead of a hardcoded template name
554- </step >
555-
556476<step name =" write_project_json " >
557477** Write .mgw/project.json with project state**
558478
@@ -671,15 +591,13 @@ Dependencies:
671591 {list of "#{dependent} blocked-by:#{blocking}" entries}
672592 (or: "None declared in template")
673593
674- GSD scaffold:
675- .planning/ROADMAP.md {written|skipped (exists)}
676-
677594State:
678595 .mgw/project.json written
679596 .mgw/cross-refs.json {updated with N entries|unchanged}
680597
681598Next:
682- /mgw:milestone start Execute first milestone
599+ /gsd:new-milestone Create GSD ROADMAP.md (if needed)
600+ /mgw:milestone start Execute first milestone
683601```
684602
685603If any milestones or issues failed to create, include:
@@ -692,7 +610,7 @@ Warnings:
692610
693611** CRITICAL BOUNDARY (PROJ-05):** This command ends here. It does NOT:
694612- Trigger /mgw: milestone or any execution workflow
695- - Spawn a GSD agent for ROADMAP.md (writes directly — fast and deterministic )
613+ - Write to .planning/ (GSD owns that directory — run /gsd : new-milestone to scaffold )
696614- Execute any issues or plans
697615</step >
698616
@@ -708,7 +626,6 @@ Warnings:
708626- [ ] Slug-to-number mapping built during Pass 1b
709627- [ ] Dependency labels applied (Pass 2) — blocked-by:#N on dependent issues
710628- [ ] cross-refs.json updated with dependency entries
711- - [ ] .planning/ROADMAP.md written in GSD format (or skipped if exists)
712629- [ ] .mgw/project.json written with full project state
713630- [ ] Post-init summary displayed
714631- [ ] Command does NOT trigger execution (PROJ-05)
0 commit comments