Data-driven sprint retrospectives from git history: velocity, cycle/lead time, contributor insights, churn hotspots and a markdown retro report with action-item carry-over. Use when running a sprint retrospective, analyzing team throughput or cycle time from commits, finding churn hotspots or bus-factor risks, or checking follow-through on a previous retro's action items.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Sprint Retrospective?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/borghei-sprint-retrospective)
---
name: sprint-retrospective
description: >
Data-driven sprint retrospectives from git history: velocity, cycle/lead
time, contributor insights, churn hotspots and a markdown retro report with
action-item carry-over. Use when running a sprint retrospective, analyzing
team throughput or cycle time from commits, finding churn hotspots or
bus-factor risks, or checking follow-through on a previous retro's action items.
license: MIT + Commons Clause
metadata:
version: 2.0.2
author: borghei
category: project-management
domain: agile-ceremonies
updated: 2026-11-08
tags: [retrospective, agile, continuous-improvement, team]
python-tools: velocity_analyzer.py, contributor_insights.py, code_churn_analyzer.py, retro_report_generator.py
tech-stack: python, git, agile, scrum, analytics
---
# Sprint Retrospective Expert
The agent acts as a data-driven retrospective facilitator that mines git history, PR metadata, and commit patterns to generate comprehensive sprint retrospective reports. It goes beyond simple commit counts — analyzing velocity trends, contributor work patterns, code health indicators, and team collaboration dynamics to surface actionable insights. Four stdlib Python tools (velocity, contributor, churn, report generator) chain into a single pipeline.
**Keywords:** sprint retrospective, velocity analytics, contributor insights, code churn, work sessions, cycle time, lead time, throughput, burndown, team health, collaboration metrics, bus factor, refactor ratio, hotspot analysis, conventional commits, session detection, deep work, improvement tracking
## Core Capabilities
- **Velocity analysis** — throughput, cycle/lead time, deploy frequency, commit-type breakdown, work-session detection (deep/focused/micro)
- **Team work patterns** — specialization spread, knowledge silos, review and collaboration patterns across the team. The contributor output has per-person numbers for spotting bus-factor risk; report them at team level by default and never as a performance score
- **Code quality trends** — churn hotspots, oscillation, test-to-production ratio, refactor frequency, healthy-range indicators
- **Team health** — review coverage, bus factor / knowledge-silo detection, cross-boundary work
- **Report generation & trend tracking** — narrative markdown reports, sprint snapshots, sprint-over-sprint deltas, action-item carry-over
## When to Use
- Running a weekly (7d), standard sprint (14d), or monthly/PI (30d) retrospective
- Producing a data-dense retro report or executive sprint summary from git history
- Diagnosing velocity, cycle-time, or review-bottleneck trends across sprints
- Identifying churn hotspots, refactoring candidates, or bus-factor / knowledge-silo risks
- Tracking follow-through on action items from previous retros
- Automating retrospectives on a CI/CD schedule
## Clarify First
Before generating the retro report, settle the inputs below. When one is missing or vague and would change the result, ask about it; when it wouldn't, use a sensible default and say which one you used.
- **Time window:** sprint length via `--days` or `--since/--until` (defines which commits count; the wrong window skews velocity and cycle-time).
- **Repo and merge style:** which repo/branch and whether squash-merges are used (squash merges lose branch-level cycle-time data).
- **Prior snapshot:** whether a previous retro snapshot exists (enables sprint-over-sprint deltas and action-item carry-over).
- **Audience:** team retrospective vs executive sprint summary (sets the narrative depth and which dashboards lead).
Ask about the two or three inputs that matter most for this request, not the whole list. If the user wants a result straight away, produce it and state your assumptions at the top.
## Quick Start
Three tools read git history (`velocity_analyzer.py`, `contributor_insights.py`, `code_churn_analyzer.py`). Each takes `--days N` (default 7) or `--since/--until YYYY-MM-DD`, `--repo PATH` (a repository, or a `.bundle` file made with `git bundle create`), and `--format text|json` (`--json` is an alias). `retro_report_generator.py` reads their JSON and writes the markdown report (`-v` velocity JSON, required; `-c` contributors; `-u` churn; `--previous-retro` last report for action-item carry-over; `--previous-velocity` for deltas; `-s` sprint name; `-o` output file; `--save DIR` snapshot; `--format json` for a summary plus the markdown).
Real command, on the bundled sample repository (10 commits, one merged branch):
```bash
python3 project-management/sprint-retrospective/scripts/velocity_analyzer.py \
--repo project-management/sprint-retrospective/assets/sample_repo.bundle \
--since 2026-03-01 --until 2026-03-15
```
```text
Sprint Velocity Report (2026-03-01 to 2026-03-15)
=======================================================
Read: 9 commits, 1 merge commits, 3 authors
Throughput: 0.6 commits/day
LOC Net: +10 lines (added: 10, removed: 0)
PRs Merged: 1
Avg PR Size: 2 LOC
Cycle Time: 30.0 hours
Deploy Frequency: 0.1/day
```
Full pipeline on a real repo, last 14 days (JSON goes to a temp dir, not the repo):
```bash
S=project-management/sprint-retrospective/scripts; OUT=$(mktemp -d)
python3 $S/velocity_analyzer.py --days 14 --repo . -f json > $OUT/v.json
python3 $S/contributor_insights.py --days 14 --repo . -f json > $OUT/c.json
python3 $S/code_churn_analyzer.py --days 14 --repo . -f json > $OUT/ch.json
python3 $S/retro_report_generator.py -v $OUT/v.json -c $OUT/c.json -u $OUT/ch.json -s "Sprint 23" -o $OUT/retro.md
```
Report without a repo, from the sample JSON (a fictional 3-person sprint):
```bash
python3 project-management/sprint-retrospective/scripts/retro_report_generator.py \
-v project-management/sprint-retrospective/assets/sample_velocity.json \
-c project-management/sprint-retrospective/assets/sample_contributors.json \
-u project-management/sprint-retrospective/assets/sample_churn.json \
--previous-retro project-management/sprint-retrospective/assets/sample_previous_retro.md -s "Sprint 23"
```
On that sample the report flags churn rate 0.34 and hotspot concentration 0.32 as attention areas (cut-offs are this skill's heuristics, not an industry standard), one single-owner directory, and two of three previous action items still open.
Missing data stays missing: with no merge commits (squash or rebase history) cycle time and PR size print `n/a` and are `null` in JSON, and the report says so. A report run without `-u` says code health was not assessed instead of calling it healthy.
## Exit Codes
| Code | Meaning |
|------|---------|
| `0` | Analysis or report produced. The tools report; they do not gate, so findings do not change the exit code |
| `2` | Unusable input: not a repository or bundle, invalid or reversed `--since/--until`, `--days` below 1, **no commits in the window**, or a report input that is missing, unreadable, empty of commits, or not the matching tool's JSON. One-line message on stderr, no traceback |
Exit `1` is not used.
## Anti-Patterns
### Generating the retro without the team
**Mistake:** Someone runs the pipeline, writes conclusions from the report alone and sends them out as the retro.
**Why it happens:** The git analysis produces a full narrative report, so the retro looks done already.
**Instead:** Use the report as the data input to a live retro with the team (see `references/retrospective_facilitation.md`). The conclusions come out of that conversation. A retro doc with one author and no team input means a real retro still has to happen.
### Blame framing
**Mistake:** The retro output says "<name> did not finish the integration in time, which blocked the sprint."
**Why it happens:** Per-person data from `contributor_insights.py` makes it easy to tie a slip to one name.
**Instead:** Rewrite any line that names a person and a fault as a root cause and a systemic fix. Use contributor data for patterns such as bus-factor risk, not for blame. Once blame appears, nobody admits anything at the next retro.
### Action items reborn each sprint
**Mistake:** "Improve cross-team comms" appears as the action item three sprints running.
**Why it happens:** The item is vague enough that everyone agrees with it and too vague for anyone to act on.
**Instead:** Save a snapshot each sprint so carry-over shows repeats. If the wording repeats, root-cause the problem instead of re-adding it. Give each new action an owner, a due date and a definition of done.
Seven more, each with a bad and a good example: `references/red-flags.md`.
## Reference Documentation
Load the reference that matches the task — keep this file lean and pull detail on demand:
- **[references/workflows-and-output.md](references/workflows-and-output.md)** — the five core analysis workflows (velocity, contributor, churn, team health, improvement tracking), tool flag tables, time-window guidance, session/code-health/collaboration deep dives, state persistence & trend tracking, narrative generation guidelines, output examples, CI/CD integration, troubleshooting, success criteria, and full Python tool reference. Read this for any hands-on retro analysis or report generation.
- **[references/retrospective_facilitation.md](references/retrospective_facilitation.md)** — 8 retro formats (Start/Stop/Continue, 4Ls, Sailboat, DAKI, etc.), facilitation techniques for remote/in-person teams, anti-patterns, and psychological safety frameworks. Read when facilitating the live ceremony.
- **[references/velocity_benchmarks.md](references/velocity_benchmarks.md)** — industry benchmarks by team size, healthy velocity patterns, and when velocity metrics mislead. Read when interpreting velocity numbers.
- **[references/red-flags.md](references/red-flags.md)** — common ways this skill's output goes wrong, with fixes. Read before finalizing a retro report.
## Scope & Limitations
**In Scope:** Git history analysis for velocity, contributor, and code churn metrics; session detection via commit-timestamp gaps; commit-type classification via conventional-commit prefixes; markdown report generation with executive summary, dashboards, and action-item tracking; sprint-over-sprint comparison; bus factor and knowledge-silo identification.
**Out of Scope:** Sprint planning and capacity calculation (see `scrum-master/`); JSON-based planned-vs-completed point analysis (see `scrum-master/velocity_analyzer.py`); product-level OKR/roadmap management (see `execution/`); code quality beyond churn (no static analysis or coverage measurement); Jira/Linear ticket-level cycle time (this skill uses git merge commits as proxy).
**Important Caveats:** All metrics derive from git history only — squash merges lose branch-level cycle-time data. Session detection is a heuristic on commit timestamps, not measured focus time. Per the Scrum Guide 2020, this skill treats velocity as a diagnostic signal, not a performance target; flow metrics (cycle time, throughput, WIP) are first-class. Rotate facilitation formats every 3-5 sprints to prevent staleness.
## Integration Points
| Integration | Direction | Description |
|------------|-----------|-------------|
| `scrum-master/` | Complements | Git-based velocity supplements JSON-based sprint data; cross-reference for fuller picture |
| `senior-pm/` | Feeds into | Retro velocity trends inform executive reporting and portfolio health dashboards |
| `delivery-manager/` | Feeds into | Velocity trends help forecast sprint capacity and release timing |
| `agile-coach/` | Feeds into | Retro trend data identifies systemic patterns for coaching interventions |
| `execution/release-notes/` | Feeds into | Sprint commit data and type distribution inform release note generation |
| CI/CD Workflows | Automated | GitHub Actions runs the 4-tool pipeline on a cron schedule (see workflows reference) |
| `.retro-history/` | Bidirectional | Save sprint snapshots for trend tracking; load previous snapshots for comparison |
## Files
| File | Purpose |
|------|---------|
| `scripts/velocity_analyzer.py` | Throughput, cycle/lead time, commit types, sessions |
| `scripts/contributor_insights.py` | Specialization, sessions, collaboration and bus-factor data |
| `scripts/code_churn_analyzer.py` | Hotspots, directory churn, health indicators, refactoring candidates |
| `scripts/repo_source.py` | Library: lets `--repo` accept a `.bundle` file |
| `scripts/retro_report_generator.py` | Markdown retro report from the three JSON outputs |
| `assets/sample_velocity.json`, `assets/sample_contributors.json`, `assets/sample_churn.json` | Tool-shaped outputs for a sample sprint |
| `assets/sample_repo.bundle` | 10-commit git bundle for trying the three git tools |
| `assets/malformed_repo.bundle`, `assets/malformed_velocity.json` | Deliberately unusable inputs (exit 2) |
| `assets/contract.json` | Declared runs checked by `scripts/skill_contract_check.py` |
| `assets/sample_previous_retro.md` | Previous retro with action items for carry-over |
| `assets/retro_report_template.md` | Report template |