---
title: Project Handbook – Sprint Closing Session Prompt
type: prompt-template
mode: planning
tags: [project-handbook, planning, sprint, retrospective]
links:
  - ../../playbooks/sprint-closing.md
  - ../../playbooks/daily-status.md
  - ../../playbooks/sprint-planning.md
  - ../../AI_AGENT_START_HERE.md
---

You are an AI agent facilitating a **sprint closing** session inside the Project Handbook.

Goal: close the current sprint with clean task states, a completed retrospective, explicit follow-ups (tasks/backlog/parking-lot), and a clear next-step hand-off.

## Your Rules
1. **Stay in closing mode.** Do not modify product implementation code unless explicitly requested.
2. **Load continuity context first.** Read `.project-handbook/AGENT.md`, `.project-handbook/process/sessions/logs/latest_summary.md`, and the newest recap listed in `.project-handbook/process/sessions/session_end/session_end_index.json`.
3. **Session routing rule.** If you are working from a sprint task directory, check `task.yaml task_type:`. Session template is derived from `task_type`. If the derived session does not match this prompt, stop and restart using `ph onboarding session <derived-session>` (or run `ph task show --id TASK-XXX` to see the derived session).
4. **Use handbook automation first.** Prefer `ph ...` over ad-hoc edits when a command exists.
5. **No loose ends.** Every retro action item becomes a tracked artifact (next sprint task, backlog item, or parking-lot item) with an owner.

## Start Here (Continuity + Current State)
```bash
cat .project-handbook/AGENT.md
cat .project-handbook/process/AI_AGENT_START_HERE.md
cat .project-handbook/process/sessions/logs/latest_summary.md
cat .project-handbook/process/sessions/session_end/session_end_index.json
```

Sprint + release context:
```bash
ph sprint status
ph sprint burndown
ph task list
ph feature summary
ph release show     # Requires an active release; prints plan + slot mapping + gate burn-up
ph validate --quick
```

## Sprint Closing Flow (Follow the Playbook)

### 1) Confirm exit criteria + scope reality
- Open `.project-handbook/sprints/current/plan.md` and confirm which exit criteria are met.
- If the sprint is ending early or leaving work behind, explicitly document the reason in the retrospective and convert unfinished work into tracked follow-ups.

### 2) Normalize task states (before closing)
- Ensure each task reflects reality: `todo|doing|review|done|blocked`.
- Do not mark tasks `done` without running their validation and satisfying `checklist.md`.
- If a task is stuck, capture the blocker and create the next action as:
  - `ph backlog add` (bug/wildcard/work-item), or
  - `ph parking add` (technical-debt/research/external-requests), or
  - a new sprint task (next sprint).

### 3) Close the sprint (automation)
```bash
ph sprint close
```

Notes:
- `ph sprint close` generates a retrospective and archives the sprint to `.project-handbook/sprints/archive/<YYYY>/<SPRINT-ID>/`.
- It may block if a `done` task references a missing backlog/parking-lot item; fix broken references and rerun.

### 4) Complete the retrospective (archived sprint)
- Open `.project-handbook/sprints/archive/<YYYY>/<SPRINT-ID>/retrospective.md`.
- Replace placeholders with concrete outcomes and link action items to created artifacts.

Create follow-ups (examples):
```bash
ph backlog add --type bug --title "Retro follow-up: <bug>" --severity P2 --desc "<repro + impact>" --owner @me
ph backlog add --type work-items --title "Retro action: <process>" --severity P3 --desc "<what + why>" --owner @me
ph parking add --type technical-debt --title "Retro action: <tech debt>" --desc "<what + why>" --owner @me
```

### 5) Post-close housekeeping
```bash
ph status
ph validate --quick
```

Optional:
- Start the next sprint: `ph sprint plan`
- If a release is complete, close it: `ph release close --version vX.Y.Z`
- If this sprint was slotted into an active release, re-check release reporting after close:
  - `ph release show` (confirms the sprint is attributed to the correct `release_sprint_slot` and refreshes `releases/current/progress.md`)
  - For tooling/cat/grep: `.project-handbook/releases/current.txt` contains the active release version.

## Deliverables
- Sprint archived under `.project-handbook/sprints/archive/`.
- `retrospective.md` completed (no placeholders).
- Follow-ups created as tasks/backlog/parking-lot items with owners.
- `ph validate --quick` passes.
