Skip to content
Skills Library
Programming · Analysis

retro

/retro

Engineering retrospective from git history — velocity, test ratio, focus score, commit patterns. Use when: "/retro", "retro on last N days", "how productive was this sprint", "analyze my commit history", "work patterns", "session analysis", "回顧", "分析工作模式", "這週做了什麼". Note: "session analysis" here means commit-window productivity (git history), not conversation-session distillation (→ distill). Not for: viewing specific commit diffs, comparison audits, debugging test coverage drops, or turning conversation history into skills (→ distill).

Repository
autopilot ↗
Licence
MIT
Last repository change
27.10.2026

Assessment and security

95/ 100Class: good
Format20 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
3
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 27.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Engineering retrospective from git history — velocity, test ratio, focus score, commit patterns. Use when: "/retro", "retro on last N days", "how productive was this sprint", "analyze my commit history", "work patterns", "session analysis", "回顧", "分析工作模式", "這週做了什麼". Note: "session analysis" here means commit-window productivity (git history), not conversation-session distillation (→ distill). Not for: viewing specific commit diffs, comparison audits, debugging test coverage drops, or turning conversation history into skills (→ distill).

Triggers from the description

retro on last N dayshow productive was this sprintanalyze my commit historywork patternssession analysis分析工作模式這週做了什麼
Original author description

Engineering retrospective from git history — velocity, test ratio, focus score, commit patterns. Use when: "/retro", "retro on last N days", "how productive was this sprint", "analyze my commit history", "work patterns", "session analysis", "回顧", "分析工作模式", "這週做了什麼". Note: "session analysis" here means commit-window productivity (git history), not conversation-session distillation (→ distill). Not for: viewing specific commit diffs, comparison audits, debugging test coverage drops, or turning conversation history into skills (→ distill).

How it works

  1. Arguments
  2. Step 1: Data Collection (run in parallel)
  3. Step 2: Compute Metrics
  4. Step 3: Load Previous Retro (if exists)
  5. Step 4: Output Report
  6. Step 5: Persist Snapshot
  7. Step 6: Delta Report (if previous retro exists)
  8. Tone Guidelines
Original SKILL.md headings · 148 lines, 726 words
SKILL.md preview
---
name: retro
description: >
  Engineering retrospective from git history — velocity, test ratio, focus score, commit patterns.
  Use when: "/retro", "retro on last N days", "how productive was this sprint", "analyze my commit
  history", "work patterns", "session analysis", "回顧", "分析工作模式", "這週做了什麼". Note:
  "session analysis" here means commit-window productivity (git history), not conversation-session
  distillation (→ distill). Not for: viewing specific commit diffs, comparison audits, debugging
  test coverage drops, or turning conversation history into skills (→ distill).
---

# retro — Engineering Retrospective

## Arguments

| Invocation | Window |
|------------|--------|
| `/retro` | Last 7 days (default) |
| `/retro 14d` | Last 14 days |
| `/retro 30d` | Last 30 days |

Parse the argument: extract the number before `d`. Default to 7 if no argument.

## Step 1: Data Collection (run in parallel)

Run all six collection commands simultaneously using parallel Bash calls. Set `DAYS` to the parsed window size.

Run the six collection commands — **1a** commits+stats, **1b** per-commit file breakdown, **1c** timestamps for session detection, **1d** file hotspots, **1e** project-completion delta, **1f** review-loop lens (`scripts/retro-review-loop.js --days DAYS --json` — the hetero-dispatch/review/debate effort git history can't see) — from [references/data-collection.md](references/data-collection.md), substituting `DAYS`.

**1g** The task-tree escalation scan is dormant. Do not run `node scripts/tree.js escalations`. See docs/adr/0002-task-tree-and-qc-panel-dormant.md.

## Step 2: Compute Metrics

From the collected data, calculate:

### Core Metrics
- **Total commits** — count of commits in window
- **Insertions / Deletions / Net LOC** — sum from shortstat
- **Commit days** — distinct dates with commits
- **Shipping streak** — longest run of consecutive days with commits

### Test Ratio
- **Test LOC** — insertions in files matching `test/` or `_test` or `Test.cpp`
- **Test ratio** — test LOC / total LOC (target: >15%)

### Commit Type Breakdown
Parse commit message prefixes (case-insensitive):
- `feat` / `add` → Feature
- `fix` → Bugfix
- `refactor` / `clean` → Refactor
- `test` → Test
- `doc` / `docs` → Documentation
- `chore` / `build` / `ci` → Chore
- `refine` / `improve` → Refinement
- Everything else → Other

### Focus Score
- Group commits by top-level directory (`src/games/`, `src/network/`, `docs/`, etc.)
- Focus score = % of commits in the single most-changed directory
- >60% = focused, 40-60% = balanced, <40% = scattered

### Session Detection
- Sort commits by Unix timestamp
- Gap >= 45 minutes = new session boundary
- Calculate: session count, average session length, longest session
- Active coding hours = sum of all session durations

### Hourly Distribution
- Bucket commits by hour-of-day (local time from `%ai`)
- Used for ASCII bar chart

### Projects Completed
- Delta of completed project count between now and N days ago (from Step 1e)

## Step 3: Load Previous Retro (if exists)

```bash
ls -t .context/retros/*.json 2>/dev/null | head -1
```

If a previous retro JSON exists, read it for delta comparison.

## Step 4: Output Report

Format the report (~1500 words) using the exact section structure in [references/report-templates.md](references/report-templates.md): Tweetable Summary, Metrics Dashboard, Hourly Distribution, Session Analysis, Commit Type Breakdown, Hotspot Analysis, **Transcript Coverage** (from 1f — always render), **Review-Loop Lens** (from 1f; preserve known/unknown and deterministic/heuristic labels), **Escalations** (task-tree scan dormant, ADR-0002; no `tree.js` run), Ship of the Week, Observations (3), Habits for Next Week (3).

## Step 5: Persist Snapshot

```bash
mkdir -p .context/retros
```

Write a JSON file to `.context/retros/{YYYY-MM-DD}.json` containing:
```json
{
  "date": "YYYY-MM-DD",
  "window_days": N,
  "commits": N,
  "insertions": N,
  "deletions": N,
  "net_loc": N,
  "test_ratio": 0.xx,
  "focus_score": 0.xx,
  "focus_dir": "src/games/mj/",
  "sessions": N,
  "avg_session_min": N,
  "commit_days": N,
  "shipping_streak": N,
  "projects_completed": N,
  "commit_types": { "feat": N, "fix": N, ... },
  "top_hotspots": ["file1", "file2", ...],
  "review_loop_lens": {
    "sessions": N,
    "hetero_dispatch_total": N,
    "impl_dispatch": N,
    "review_dispatch": N,
    "codex_exec": N,
    "review_driven_commits": N,
    "qc_verdict_commits": N,
    "versions": N,
    "provenance": [],
    "warnings": [],
    "loop_metrics": {
      "deterministic": {},
      "heuristic": {}
    }
  }
}
```

Populate `review_loop_lens` from the additive 1f JSON (`transcript.*`, `git_signals.*`,
`provenance`, `warnings`, and `loop_metrics`). If `transcript.sessions == 0`, still persist the
coverage/provenance and git-signal fields so a future retro can distinguish missing evidence,
attribution gaps, and true observed zero.

## Step 6: Delta Report (if previous retro exists)

If a previous retro JSON was found in Step 3, append a delta section:

```
vs Last Retro ({previous_date})
═══════════════════════════════
Commits          {n} → {n}   ({+/-}%)
Net LOC          {n} → {n}
Test Ratio       {n}% → {n}%
Focus Score      {n}% → {n}%
Sessions         {n} → {n}
Hetero dispatch  {n} → {n}    (review_loop_lens.hetero_dispatch_total; omit if either retro lacks the block)
Review-driven    {n} → {n}    (review_loop_lens.review_driven_commits)
```

## Tone Guidelines

- Encouraging but candid — anchor every statement in data
- No generic praise ("great job!"). Instead: "42 commits in 7 days is your highest since the Feb retro."
- Flag risks without being preachy: "Test ratio 4% — not sustainable if auth refactor ships to prod."
- Keep total output around 1500 words
Files in this package (3)
  • SKILL.md 6 KB
  • references/data-collection.md 3 KB
  • references/report-templates.md 4 KB

Versions

RepositoryScoreLicence
This page · cookys/autopilot95MIT
jongio/skills100MIT
stefanoskarakasis/product-marketing-skills100MIT
bartolli/kmd100MIT
gethamster/plugin100MIT
cookys/autopilot100MIT
rizukirr/vibekit100MIT
rjmurillo/ai-agents100MIT
rjmurillo/ai-agents100MIT

Identical content appears in 2 other GitHub folders. We show one copy with the highest score.

Database snapshot: 13.11.2026 · package version 52a5dc4a7665 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100sprint-retrospective
    Data-driven sprint retrospectives from git history — velocity, cycle/lead time, contributor insights, and churn hotspots. Use to run a retrospective, analyze team velocity or throughput, or generate a retro report from commit history.
  • 100engineering-retro
    Git-based engineering retrospective analyzing commits, PRs, and velocity over configurable windows with monorepo path scoping. Triggers on: "retrospective", "sprint retro", "weekly review", "what did we ship", "engineering retro", "dev summary", "commit analysis".
  • 100retro-analysis
    Produce a recurring engineering retrospective from repository history, delivery evidence, work patterns, code-quality signals and prior snapshots, in repository, comparison or cross-project mode. Use when the user asks for a retro over shipped work: "run a retrospective", "how…
  • 100retro-analysis
    Produce a recurring engineering retrospective from repository history, delivery evidence, work patterns, code-quality signals and prior snapshots, in repository, comparison or cross-project mode. Use when the user asks for a retro over shipped work: "run a retrospective", "how…
  • 100git-review
    Goal-directed review of git history for change coherence. Trigger when: - Analyzing project history, reviewing diffs, or checking commit messages for alignment. - Prompt contains: /git-review, git history, commit log, change coherence.
  • 100commit
    Create a well-formed git commit from current changes using session history for rationale and summary; use when asked to commit, prepare a commit message, or finalize staged work.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.