<purpose>

List all milestones grouped by status (In Progress / Planned / Shipped) with active-milestone marker (parallel mode); sequential mode redirects to `/gmd:progress` for current-milestone status.

Phase 67-02 (v1.5.9 Parallel Milestone Organization, STATUS-04) ships this command end-to-end:
- NEW workflow at `workflows/list-milestones.md`
- Slash-command shim at `C:/Users/Christopher/.claude/commands/gmd/list-milestones.md`
- Renders MILESTONES.md three tables via shared helper `bin/lib/milestones-render.js::formatMilestoneTableRow` (consumed from Plan 67-01 LOCKED signature)
- `▶` glyph (U+25B6) marks the active-milestone pointer-matched row in `## In Progress`
- Sequential mode prints `Sequential mode — see /gmd:progress for current milestone status` and exits 0 (documented sequential-mode UX per CONTEXT.md Area 3 — NO stderr warn)
- Golden-output fixture at `tests/fixtures/list-milestones-baseline.txt`; regenerable via `node bin/gmd-tools.cjs list-milestones --golden-regen`

</purpose>

<required_reading>

Read all files referenced by the invoking prompt's execution_context before starting.

</required_reading>

<process>

## 0. Mode-Aware Init Context

Run init list-milestones to retrieve organizational mode + milestones index + active-milestone pointer:

```bash
INIT=$(node "$HOME/.claude/get-magic-done/bin/gmd-tools.cjs" init list-milestones)
if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
```

Extract from init JSON:
- `organizational_mode` — `'sequential'` | `'parallel'`
- `active_milestone_slug` — string | null (active-milestone pointer for `▶` glyph render)
- `milestones_index` — `{ in_progress[], planned[], shipped[], on_disk[], rows{ in_progress, planned, shipped } }`

## 1. Sequential-Mode Redirect

If `organizational_mode !== 'parallel'`:

Print to stdout (NOT stderr — this is the documented sequential-mode UX per CONTEXT.md Area 3, NOT an ignored-flag stderr-warn case):

```
Sequential mode — see /gmd:progress for current milestone status
```

Exit 0. Skip steps 2-4.

## 2. Read MILESTONES.md (Parallel Mode)

Already done in Step 0 — `milestones_index.rows` contains `{ in_progress, planned, shipped }` arrays of `{ slug, goal, last_activity }` row objects. `in_progress` rows are enriched with `last_activity` from per-milestone `STATE.md` frontmatter (overriding MILESTONES.md table-row value when fresher).

## 3. Render Three Sections via Shared Helper

Use `bin/lib/milestones-render.js::formatMilestoneTableRow(milestone, opts)` (Plan 67-01 LOCKED signature) to render each row. Active milestone (slug === `active_milestone_slug`) gets `▶` glyph in In Progress section.

Output:

```
# Milestones

## In Progress

| slug | goal | last_activity |
| ---- | ---- | ------------- |
{ for each row in milestones_index.rows.in_progress:
    formatMilestoneTableRow(row, {
      glyph: (row.slug === active_milestone_slug ? '▶' : ''),
      status: 'in_progress',
    })
}

## Planned

| slug | goal |
| ---- | ---- |
{ for each row in milestones_index.rows.planned:
    formatMilestoneTableRow(row, { status: 'planned' })
}

## Shipped

| slug | goal |
| ---- | ---- |
{ for each row in milestones_index.rows.shipped:
    formatMilestoneTableRow(row, { status: 'shipped' })
}
```

Column-shape defaults (Phase 65-04 LAYOUT-03 schema):
- **In Progress:** 3-col (slug | goal | last_activity)
- **Planned:** 2-col (slug | goal) — last_activity absent (no in-flight activity)
- **Shipped:** 2-col (slug | goal) — last_activity less meaningful post-ship

Goal field truncated to ~50 chars by `formatMilestoneTableRow` (50-char default `DEFAULT_COLUMN_TRUNCATE`). Null/missing fields render as em-dash (`—`).

Section headers and table dividers are emitted by the workflow (NOT by the shared helper). Empty sections (e.g., no Planned milestones) print the section header + table-header-only block.

## 4. Exit

Exit 0. No commit; this is a read-only command (`commit_docs: true` does NOT trigger any commit here — no state mutation occurs).

</process>

<carryforward>

DEFER-65-01 (per Phase 65 VERIFICATION carry-forward #3): this workflow does NOT add new templates. The slash-command shim at `C:/Users/Christopher/.claude/commands/gmd/list-milestones.md` is the only new authoring surface beyond this file. Per-plan `cp + diff -q + git add -f` workflow-mirror discipline holds; no SCOPES extension needed (Phase 69 DOC-01 work).

Golden-output fixture at `tests/fixtures/list-milestones-baseline.txt` consumed by `bin/lib/milestones-render.test.cjs::E1` strict-equal diff. Regeneration command:

```bash
node bin/gmd-tools.cjs list-milestones --golden-regen
```

The regen flag is documented in TWO discoverable locations (per critic Gate 7.8 missed_concern #3): test file header (`bin/lib/milestones-render.test.cjs` lines 11-15) AND `bin/gmd-tools.cjs` usage-comment block. Fixture file itself stays byte-stable (no `.txt` comment syntax; adding header bytes would break golden-diff strict-equal).

</carryforward>
