Sprint Close
You are the engineering-manager. Close the current sprint and generate a retrospective.
Step 1: Gather sprint data
- •Read
.claude/sprint/current.mdfor sprint info (number, goal, issues, start date) - •Get milestone data:
bash
gh api repos/{owner}/{repo}/milestones --jq '.[] | select(.state=="open")' - •For each sprint issue, get final status:
bash
gh issue list --milestone "Sprint N (date – date)" --state all --json number,title,state,closedAt,labels
- •Read checkpoint files:
.claude/sprint/checkpoints/issue-*.md - •Get commit count during sprint:
bash
git log --oneline --since="<sprint-start-date>" --until="today" -n 500
- •Get PRs merged during sprint:
bash
gh pr list --state merged --search "milestone:\"Sprint N\"" --json number,title,mergedAt
Step 2: Compute plan vs actual
For each sprint issue:
- •Planned: Was it in the original sprint plan?
- •Completed: Was it closed during the sprint?
- •Carry-over: Still open at sprint end?
- •Unplanned: Added mid-sprint?
Metrics:
- •Completion rate: closed / planned (%)
- •Scope change: (unplanned added - carry-over) / planned
- •Velocity: total issues closed (planned + unplanned)
Step 3: RICE calibration
Compare predicted Friction scores with actual outcomes:
- •Items that took longer than expected → Friction was underestimated
- •Items completed faster than expected → Friction was overestimated
- •External items (F=4-5) → measure calendar days waited
Propose Friction adjustments for similar future items in .product/rice-scores.md.
Step 4: Generate retrospective
Write .claude/sprint/archive/sprint-N.md:
markdown
# Sprint N Retrospective
- **Period:** YYYY-MM-DD to YYYY-MM-DD
- **Goal:** [sprint goal]
- **Completion:** X/Y issues (Z%)
## Plan vs Actual
| Issue | Title | Planned | Status | Notes |
|-------|-------|---------|--------|-------|
| #A | ... | Yes | Done | |
| #B | ... | Yes | Done | |
| #C | ... | Yes | Carry-over | Blocked by ... |
| #D | ... | No | Done | Added mid-sprint |
## Metrics
- Velocity: X issues closed
- Completion rate: Z%
- Scope change: +N added, -M carried over
- Commits: N
- PRs merged: N
## RICE Calibration
- {{SPEC_PREFIX}}-XXX: Friction was 2, actual felt like 3 (reason)
- {{SPEC_PREFIX}}-YYY: Friction was 4, actual was 3 (external resolved faster)
## What Went Well
- [auto-generate from completed items and velocity]
## What Could Improve
- [auto-generate from carry-overs and blockers]
## Action Items for Next Sprint
- [ ] Adjust Friction score for similar items
- [ ] Address blocker: ...
Step 5: Close milestone
bash
# Close the GitHub milestone
gh api repos/{owner}/{repo}/milestones/<milestone-number> -X PATCH -f state="closed"
Step 6: Handle carry-over issues
For each issue still open:
- •Remove from closed milestone
- •Remove
in-progresslabel (will be re-added in next sprint if selected) - •Add comment: "Carried over from Sprint N. Reason: [blocker/scope/deprioritized]"
- •Note in retrospective
bash
gh issue edit <number> --remove-milestone gh issue edit <number> --remove-label in-progress gh issue comment <number> --body "Carried over from Sprint N → next sprint candidate"
Step 7: Clean up worktrees
For each carry-over issue with a worktree:
- •If branch has uncommitted work: warn user, do NOT delete
- •If branch is clean: offer to remove
bash
git worktree list
# For each stale worktree:
git worktree remove ../{{WORKTREE_DIR}}/issue-<number> --force
git worktree prune
Step 8: Clean up checkpoints
Move checkpoint files to archive:
bash
# Archive completed checkpoints mv .claude/sprint/checkpoints/issue-*.md .claude/sprint/archive/sprint-N-checkpoints/
Remove .claude/sprint/current.md (will be recreated by next /sprint-plan).
Step 9: Update dashboard
Run the /status flow to refresh the dashboard with post-sprint metrics.
Step 10: Present summary
code
Sprint N Closed
===============
Goal: [sprint goal]
Period: YYYY-MM-DD to YYYY-MM-DD
Results: X/Y issues completed (Z%)
Completed: #A ({{SPEC_PREFIX}}-XXX), #B ({{SPEC_PREFIX}}-YYY)
Carry-over: #C ({{SPEC_PREFIX}}-ZZZ) — reason
Unplanned: #D ({{SPEC_PREFIX}}-WWW) — added mid-sprint
Velocity: X issues | N commits | M PRs merged
RICE Calibration: N adjustments proposed
Retrospective: .claude/sprint/archive/sprint-N.md
Next: Run /sprint-plan to start Sprint N+1