$npx -y skills add Rune-kit/rune --skill retroEngineering retrospective. Analyzes commit history, work patterns, and code quality metrics with trend tracking. Per-person breakdowns, shipping streaks, and actionable improvements. Use when asked for \"retro\", \"weekly review\", \"what did we ship\", or \"engineering retrospec
| 1 | # retro |
| 2 | |
| 3 | ## Purpose |
| 4 | |
| 5 | Engineering retrospective engine. Analyzes git history, work patterns, and code quality signals to produce actionable retrospectives with per-person breakdowns, shipping streaks, and concrete improvement habits. Fills a gap in the Rune ecosystem — cook builds, review checks, but nothing reflects on HOW the team works. |
| 6 | |
| 7 | <HARD-GATE> |
| 8 | Retro is READ-ONLY. It analyzes and reports — it does NOT modify code, create PRs, or change any files except its own output artifacts (.rune/retros/). |
| 9 | Retro is ENCOURAGING but CANDID. Every critique is anchored in specific commits, not vague impressions. |
| 10 | </HARD-GATE> |
| 11 | |
| 12 | ## Triggers |
| 13 | |
| 14 | - `/rune retro` — default 7-day retrospective |
| 15 | - `/rune retro 24h` — daily standup review |
| 16 | - `/rune retro 14d` — sprint retro (2 weeks) |
| 17 | - `/rune retro 30d` — monthly review |
| 18 | - `/rune retro compare` — current vs previous period side-by-side |
| 19 | - `/rune retro --business` — cross-domain executive retrospective with HTML report (Business tier) |
| 20 | - Called by `audit` (L2) for engineering health dimension |
| 21 | - Auto-suggest: end of work week (Friday sessions) |
| 22 | |
| 23 | ## Calls (outbound) |
| 24 | |
| 25 | - `scout` (L2): scan codebase for test file counts, project structure |
| 26 | - `plan` (L2): when retro identifies systemic bottlenecks — hand findings to plan for next sprint (e.g., "fix ratio >50% → allocate debugging time in next phase") |
| 27 | - `journal` (L3): retro findings → ADR entries for recurring team patterns |
| 28 | - `neural-memory` (L3): recall past retro insights for trend comparison; save this retro's key insights for future sessions |
| 29 | |
| 30 | ## Called By (inbound) |
| 31 | |
| 32 | - `audit` (L2): engineering velocity and health dimension |
| 33 | - `cook` (L1): optional — after completing a multi-phase feature, suggest retro |
| 34 | - `rescue` (L1): post-rescue retrospective |
| 35 | - `launch` (L1): post-launch retrospective |
| 36 | - User: `/rune retro` direct invocation |
| 37 | |
| 38 | ## Data Flow |
| 39 | |
| 40 | ### Feeds Into → |
| 41 | |
| 42 | - `plan` (L2): retro insights inform future sprint planning (e.g., "fix ratio too high → allocate debugging time") |
| 43 | - `journal` (L3): retro findings → ADR entries for team patterns |
| 44 | - `neural-memory` (external): retro insights → persistent cross-session memory |
| 45 | |
| 46 | ### Fed By ← |
| 47 | |
| 48 | - `git` history: commits, authors, timestamps, file changes |
| 49 | - `.rune/retros/` history: previous retro JSON for trend comparison |
| 50 | - `neural-memory` (external): past retro insights for pattern recognition |
| 51 | |
| 52 | ### Feedback Loops ↻ |
| 53 | |
| 54 | - `retro` ↔ `plan`: retro identifies bottlenecks → plan adjusts estimation and phase sizing → next retro measures improvement |
| 55 | |
| 56 | ## Execution |
| 57 | |
| 58 | ### Step 1 — Gather Raw Data |
| 59 | |
| 60 | Run these git commands to collect metrics for the specified time window: |
| 61 | |
| 62 | ```bash |
| 63 | # Core metrics (run in parallel) |
| 64 | git log --since="<window-start>" --format="%H|%an|%ae|%aI|%s" --shortstat |
| 65 | git log --since="<window-start>" --format="%H" --numstat |
| 66 | git log --since="<window-start>" --format="%aI" # timestamps for session detection |
| 67 | git log --since="<window-start>" --format="%an" | sort | uniq -c | sort -rn # per-author |
| 68 | git shortlog --since="<window-start>" -sn # author leaderboard |
| 69 | ``` |
| 70 | |
| 71 | **Time window alignment**: For day/week units, align to midnight: `--since="YYYY-MM-DDT00:00:00"`. This prevents partial-day skew. |
| 72 | |
| 73 | **Identify "You"**: `git config user.name` = current user. All others are teammates. |
| 74 | |
| 75 | Also gather: |
| 76 | - Test file count: `find . -name "*.test.*" -o -name "*.spec.*" -o -name "*_test.*" | wc -l` |
| 77 | - `.rune/retros/` for prior retro history (if exists) |
| 78 | - TODOS.md for backlog health |
| 79 | |
| 80 | ### Step 2 — Compute Summary Metrics |
| 81 | |
| 82 | | Metric | How to compute | |
| 83 | |--------|---------------| |
| 84 | | Commits | Count from git log | |
| 85 | | Contributors | Unique authors | |
| 86 | | LOC added/removed | Sum from numstat | |
| 87 | | Test LOC ratio | test files LOC / total LOC changed | |
| 88 | | Active days | Unique dates with commits | |
| 89 | | Sessions | Detected via 45-min gap threshold (Step 4) | |
| 90 | | LOC/session-hour | Total LOC / total session hours | |
| 91 | | Fix ratio | `fix:` commits / total commits | |
| 92 | |
| 93 | ### Step 3 — Hourly Activity Histogram |
| 94 | |
| 95 | Build an ASCII bar chart showing commit distribution by hour (local timezone): |
| 96 | |
| 97 | ``` |
| 98 | Hour Commits |
| 99 | 06 ██ 3 |
| 100 | 07 ████ 7 |
| 101 | 08 ██████ 12 |
| 102 | ... |
| 103 | ``` |
| 104 | |
| 105 | Identify: peak hours, dead zones, bimodal patterns (morning + evening coder). |
| 106 | |
| 107 | ### Step 4 — Session Detection |
| 108 | |
| 109 | Group commits into sessions using a **45-minute gap threshold**: |
| 110 | |
| 111 | - Commits within 45 min of each other = same session |
| 112 | - Gap > 45 min = new session |
| 113 | |
| 114 | Classify sessions: |
| 115 | - **Deep** (50+ min): focused work blocks |
| 116 | - **Medium** (20-50 min): moderate focus |
| 117 | - **Micro** (<20 min): quick fixes, drive-bys |
| 118 | |
| 119 | ### Step 5 — Commit Type Breakdown |
| 120 | |
| 121 | Parse conventional commit pr |