/autopilot:retrofrom autopilot
Analyzes git commit history to produce engineering retrospectives with metrics like velocity, test ratio, focus score, and session detection. Invoke with /retro or 'analyze my commit history'.
Ships in autopilot. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
| 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.
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, substituting DAYS.
1g The task-tree escalation scan is dormant. Do not run node scripts/tree.js escalations. See docs/dev/adr/0002-task-tree-and-qc-panel-dormant.md.
From the collected data, calculate:
test/ or _test or Test.cppParse commit message prefixes (case-insensitive):
feat / add → Featurefix → Bugfixrefactor / clean → Refactortest → Testdoc / docs → Documentationchore / build / ci → Chorerefine / improve → Refinementsrc/games/, src/network/, docs/, etc.)60% = focused, 40-60% = balanced, <40% = scattered
%ai)ls -t .context/retros/*.json 2>/dev/null | head -1
If a previous retro JSON exists, read it for delta comparison.
Format the report (~1500 words) using the exact section structure in 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).
mkdir -p .context/retros
Write a JSON file to .context/retros/{YYYY-MM-DD}.json containing:
{
"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.
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)
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
32 skills in this plugin
/agent-callContact an already-running persistent coding-agent session via fleet v2 (fallback: Claude SendMessage + outbox). Use when: "通知 <host>", "跟 <host> 說", naming a fleet member/pane. Not for: opinions (→ consult), hetero review (→ hetero-review), new workers (→ /l4–/l6).
/auditCompare two existing implementations for feature parity and missing items. Use when: "compare X with Y", "verify X matches Y", "比對 X 和 Y". Not for: future plan review, single-bug debug, writing tests.
/brainstormPre-code Socratic design exploration that surfaces 2-3 approaches and gates coding until approved. Use when: "help me think through X", "還沒想清楚", "我不確定要怎麼做". Not for: existing options (→ think-tank), external research (→ survey), chosen approach/quick fix (→ dev-flow).
npx claudepluginhub cookys/autopilot --plugin autopilotOther plugins' skills for the same job