STATS=$(node "$GSD_TOOLS" stats json)
if [[ "$STATS" == @file:* ]]; then STATS=$(cat "${STATS#@file:}"); fi
Extract fields from JSON: milestone_version, milestone_name, phases, phases_completed, phases_total, total_plans, total_summaries, percent, plan_percent, requirements_total, requirements_complete, git_commits, git_first_commit_date, last_activity.
# 📊 Project Statistics — {milestone_version} {milestone_name}
## Progress
[████████░░] X/Y phases (Z%)
## Plans
X/Y plans complete (Z%)
## Phases
| Phase | Name | Plans | Completed | Status |
|-------|------|-------|-----------|--------|
| ... | ... | ... | ... | ... |
## Requirements
✅ X/Y requirements complete
## Git
- **Commits:** N
- **Started:** YYYY-MM-DD
- **Last activity:** YYYY-MM-DD
## Timeline
- **Project age:** N days
If no .planning/ directory exists, inform the user to run /gsd-new-project first.
1---2name: gsd-stats3description: Display project statistics — phases, plans, requirements, git metrics, and timeline4---5
6
7<objective>
8Display comprehensive project statistics including phase progress, plan execution metrics, requirements completion, git history stats, and project timeline.
9</objective>
10
11<!-- Workflow content (was: stats.md) -->
12<purpose>
13Display comprehensive project statistics including phases, plans, requirements, git metrics, and timeline.
14</purpose>
15
16<required_reading>
17Read the skill content below before starting.
18</required_reading>
19
20<process>
21
22<step name="gather_stats">
23Gather project statistics:
24
25```bash
26STATS=$(node "$GSD_TOOLS" stats json)
27if [[ "$STATS" == @file:* ]]; then STATS=$(cat "${STATS#@file:}"); fi
28```
29
30Extract fields from JSON: `milestone_version`, `milestone_name`, `phases`, `phases_completed`, `phases_total`, `total_plans`, `total_summaries`, `percent`, `plan_percent`, `requirements_total`, `requirements_complete`, `git_commits`, `git_first_commit_date`, `last_activity`.
31</step>
32
33<step name="present_stats">
34Present to the user with this format:
35
36```
37# 📊 Project Statistics — {milestone_version} {milestone_name}
38
39## Progress
40[████████░░] X/Y phases (Z%)
41
42## Plans
43X/Y plans complete (Z%)
44
45## Phases
46| Phase | Name | Plans | Completed | Status |
47|-------|------|-------|-----------|--------|
48| ... | ... | ... | ... | ... |
49
50## Requirements
51✅ X/Y requirements complete
52
53## Git
54- **Commits:** N
55- **Started:** YYYY-MM-DD
56- **Last activity:** YYYY-MM-DD
57
58## Timeline
59- **Project age:** N days
60```
61
62If no `.planning/` directory exists, inform the user to run `/gsd-new-project` first.
63</step>
64
65</process>
66
67<success_criteria>
68- [ ] Statistics gathered from project state
69- [ ] Results formatted clearly
70- [ ] Displayed to user
71</success_criteria>
72
73
74<process>
75Execute the stats workflow steps embedded above end-to-end.
76</process>