Skip to content

Commit 6877ff0

Browse files
Stephen Millerclaude
authored andcommitted
merge: resolve conflicts with main after PRs #39-#41
Merged consumer table entries from both ask.md (#38) and review.md (#36) branches into unified tables. Co-Authored-By: Claude Opus 4.6 <[email protected]>
2 parents c53bc43 + 80d61bc commit 6877ff0

28 files changed

Lines changed: 2175 additions & 328 deletions

.claude/commands/mgw/help.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ COMMANDS
4343
/mgw:milestone Execute milestone issues in dependency order (auto-sync, checkpoint)
4444
/mgw:next Show next unblocked issue — what to work on now
4545
46+
Query
47+
─────
48+
/mgw:status [milestone] [--json] Project dashboard — milestone progress + issue stages
49+
4650
GitHub Operations
4751
─────────────────
4852
/mgw:update <number> [msg] Post status comment (auto-detects type, or custom)

.claude/commands/mgw/issue.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,27 @@ gh issue view $ISSUE_NUMBER --json number,title,body,labels,assignees,state,comm
6666
If issue not found → error: "Issue #$ISSUE_NUMBER not found in this repo."
6767

6868
Store as $ISSUE_DATA.
69+
70+
**Capture comment tracking snapshot:**
71+
72+
Record the current comment count and timestamp of the most recent comment. These
73+
are stored in the triage state and used by run.md's pre-flight comment check to
74+
detect new comments posted between triage and execution.
75+
76+
```bash
77+
COMMENT_COUNT=$(echo "$ISSUE_DATA" | python3 -c "import json,sys; d=json.load(sys.stdin); print(len(d.get('comments', [])))")
78+
LAST_COMMENT_AT=$(echo "$ISSUE_DATA" | python3 -c "
79+
import json,sys
80+
d = json.load(sys.stdin)
81+
comments = d.get('comments', [])
82+
if comments:
83+
print(comments[-1].get('createdAt', ''))
84+
else:
85+
print('')
86+
" 2>/dev/null || echo "")
87+
```
88+
89+
Store $COMMENT_COUNT and $LAST_COMMENT_AT for use in the write_state step.
6990
</step>
7091

7192
<step name="assign_self">
@@ -223,6 +244,8 @@ Write to `.mgw/active/${ISSUE_NUMBER}-${slug}.json` using the schema from state.
223244
Populate:
224245
- issue: from $ISSUE_DATA
225246
- triage: from analysis report
247+
- triage.last_comment_count: from $COMMENT_COUNT (captured in fetch_issue step)
248+
- triage.last_comment_at: from $LAST_COMMENT_AT (captured in fetch_issue step, null if no comments)
226249
- gsd_route: confirmed or overridden route
227250
- pipeline_stage: "triaged"
228251
- All other fields: defaults (empty arrays, null)
@@ -257,11 +280,12 @@ Consider closing or commenting on the issue with your reasoning.
257280

258281
<success_criteria>
259282
- [ ] Issue fetched from GitHub via gh CLI
283+
- [ ] Comment tracking snapshot captured (count + last timestamp)
260284
- [ ] Self-assigned if not already
261285
- [ ] Analysis agent spawned and returned structured report
262286
- [ ] Scope, validity, security, conflicts all assessed
263287
- [ ] GSD route recommended with reasoning
264288
- [ ] User confirms, overrides, or rejects
265-
- [ ] State file written to .mgw/active/ (if accepted)
289+
- [ ] State file written to .mgw/active/ (if accepted) with comment tracking fields
266290
- [ ] Next steps offered
267291
</success_criteria>

.claude/commands/mgw/project.md

Lines changed: 11 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: 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
44
argument-hint: ""
55
allowed-tools:
66
- Bash
@@ -13,9 +13,13 @@ allowed-tools:
1313

1414
<objective>
1515
Turn 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

2024
This command creates structure only. It does NOT trigger execution.
2125
Run /mgw:milestone to begin executing the first milestone.
@@ -469,90 +473,6 @@ fi
469473
Store `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-
677594
State:
678595
.mgw/project.json written
679596
.mgw/cross-refs.json {updated with N entries|unchanged}
680597
681598
Next:
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

685603
If 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

Comments
 (0)