Files
msd-core/get-shit-done/workflows/session-report.md
Tom Boucher 73c1af5168 fix(#2543): replace legacy /gsd-<cmd> syntax with /gsd:<cmd> across all source files (#2595)
Commands are now installed as commands/gsd/<name>.md and invoked as
/gsd:<name> in Claude Code. The old hyphen form /gsd-<name> was still
hardcoded in hundreds of places across workflows, references, templates,
lib modules, and command files — causing "Unknown command" errors
whenever GSD suggested a command to the user.

Replace all /gsd-<cmd> occurrences where <cmd> is a known command name
(derived at runtime from commands/gsd/*.md) using a targeted Node.js
script. Agent names, tool names (gsd-sdk, gsd-tools), directory names,
and path fragments are not touched.

Adds regression test tests/bug-2543-gsd-slash-namespace.test.cjs that
enforces zero legacy occurrences going forward. Removes inverted
tests/stale-colon-refs.test.cjs (bug #1748) which enforced the now-obsolete
hyphen form; the new bug-2543 test supersedes it. Updates 5 assertion
tests that hardcoded the old hyphen form to accept the new colon form.

Closes #2543

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 12:04:25 -04:00

3.9 KiB

Generate a post-session summary document capturing work performed, outcomes achieved, and estimated resource usage. Writes SESSION_REPORT.md to .planning/reports/ for human review and stakeholder sharing.

<required_reading> Read all files referenced by the invoking prompt's execution_context before starting. </required_reading>

Collect session data from available sources:
  1. STATE.md — current phase, milestone, progress, blockers, decisions
  2. Git log — commits made during this session (last 24h or since last report)
  3. Plan/Summary files — plans executed, summaries written
  4. ROADMAP.md — milestone context and phase goals
# Get recent commits (last 24 hours)
git log --oneline --since="24 hours ago" --no-merges 2>/dev/null || echo "No recent commits"

# Count files changed
git diff --stat HEAD~10 HEAD 2>/dev/null | tail -1 || echo "No diff available"

Read .planning/STATE.md to get:

  • Current milestone and phase
  • Progress percentage
  • Active blockers
  • Recent decisions

Read .planning/ROADMAP.md to get milestone name and goals.

Check for existing reports:

ls -la .planning/reports/SESSION_REPORT*.md 2>/dev/null || echo "No previous reports"
Estimate token usage from observable signals:
  • Count of tool calls is not directly available, so estimate from git activity and file operations
  • Note: This is an estimate — exact token counts require API-level instrumentation not available to hooks

Estimation heuristics:

  • Each commit ≈ 1 plan cycle (research + plan + execute + verify)
  • Each plan file ≈ 2,000-5,000 tokens of agent context
  • Each summary file ≈ 1,000-2,000 tokens generated
  • Subagent spawns multiply by ~1.5x per agent type used
Create the report directory and file:
mkdir -p .planning/reports

Write .planning/reports/SESSION_REPORT.md (or .planning/reports/YYYYMMDD-session-report.md if previous reports exist):

# GSD Session Report

**Generated:** [timestamp]
**Project:** [from PROJECT.md title or directory name]
**Milestone:** [N] — [milestone name from ROADMAP.md]

---

## Session Summary

**Duration:** [estimated from first to last commit timestamp, or "Single session"]
**Phase Progress:** [from STATE.md]
**Plans Executed:** [count of summaries written this session]
**Commits Made:** [count from git log]

## Work Performed

### Phases Touched
[List phases worked on with brief description of what was done]

### Key Outcomes
[Bullet list of concrete deliverables: files created, features implemented, bugs fixed]

### Decisions Made
[From STATE.md decisions table, if any were added this session]

## Files Changed

[Summary of files modified, created, deleted — from git diff stat]

## Blockers & Open Items

[Active blockers from STATE.md]
[Any TODO items created during session]

## Estimated Resource Usage

| Metric | Estimate |
|--------|----------|
| Commits | [N] |
| Files changed | [N] |
| Plans executed | [N] |
| Subagents spawned | [estimated] |

> **Note:** Token and cost estimates require API-level instrumentation.
> These metrics reflect observable session activity only.

---

*Generated by `/gsd:session-report`*
Show the user:
## Session Report Generated

📄 `.planning/reports/[filename].md`

### Highlights
- **Commits:** [N]
- **Files changed:** [N]  
- **Phase progress:** [X]%
- **Plans executed:** [N]

If this is the first report, mention:

💡 Run `/gsd:session-report` at the end of each session to build a history of project activity.

<success_criteria>

  • Session data gathered from STATE.md, git log, and plan files
  • Report written to .planning/reports/
  • Report includes work summary, outcomes, and file changes
  • Filename includes date to prevent overwrites
  • Result summary displayed to user </success_criteria>