Retro (out-of-the-loop factory HHF)
Automated queues, CI fixers, and scheduled hygiene passes optimize inside their existing rules; they rarely delete or redesign the loop itself. /retro is the manual, out-of-the-loop meta-audit that mines what the owner keeps repeating or correcting, checks whether automation is shipping real product or spinning on churn, inspects cross-repo glue, and proposes first-principles cuts.
Stay strictly read-only until the owner says which cuts to execute. Never schedule /retro inside an automated queue or hygiene loop.
Step 1: Collect telemetry in one command
shnode <skill>/scripts/collect.mjs <target> [--days 7] [--json]
Run from <target> (defaults to .; default window 7 days, override with --days <n>). Run on the strongest available judgment model (xhigh when permitted). The collector gathers five cross-cutting lenses without duplicating existing audit logic:
- Owner prompts and corrections: Extracts recent human-typed messages across Antigravity/T3, Claude Code, and Codex transcripts tied to
<target>, stripping harness wrappers and automated worker briefs, and flags repeated steers, questions, and corrections (again,still,why,stop,wrong,stale,clean,broken,duplicate,is that true). - Factory yield and queue state: Summarizes recent
git log(productfeat/fixvs.chore/rework/revert ratio, hot paths, worktree count) plus auto-detected queue/CI adapters when present (dispatch --queue --json,local-cistate and red/flake history,review-ledger status,t3 thread listactive/stalled/high-item threads, and provider pool status). - Cross-boundary glue: Checks user LaunchAgents referencing
<target>or its sibling repos for dead paths, non-zero exit codes, and recent error tails in bot or daemon logs, catching broken wiring that single-repo checks miss. - Dev speed and delegated scanners: Summarizes recent check step timings (slowest and most-failing steps) and invokes sibling
skill-audit,check-audit, andpstack-doctorscanners in summary mode instead of re-implementing them.
Step 2: Diagnose from first principles
Inspect the collector output and spot-check any flagged log, script, or transcript before claiming a defect. Do not summarize every section back to the owner; synthesize across all four telemetry lenses to answer five harsh questions:
- What is the owner correcting or asking repeatedly? Cluster human interventions into the single underlying invariant, type, hook, or check that makes the class impossible (
/pstack:correct), rather than adding more prose rules. - Is the automated loop shipping value or manufacturing busywork? Challenge queue priorities, auto-reopen rules, stalled waiting threads, account/quota imbalance, oversized watcher contexts, and silent drops (e.g. notifications, triggers, or stale worktrees).
- What whole subsystem, script, check, or workflow step should be cut or halved? Apply Redesign from First Principles, then KISS: test a 50%+ subtraction or single-owner collapse before settling for a patch.
- What is slowing down delivery? Flag slow landing steps, chronic flakes, bloated worktrees, or repeated setup/install stalls with measured timings.
- What is silently rotting across repo boundaries? Flag broken launchd plists, stale paths after renames, unlinked skills, or dead JSON/state contracts between tooling repos and live agents.
- What changed since the last retro (
history)? Checkhistory.deltasandhistory.priorCuts:- If a previously
executedcut regressed (metric worsened or the same complaint returned inownerPrompts), promote it to P0 premise failure and propose a deeper structural cut instead of repeating the old patch. - Suppress previously
droppedcuts unless the underlying metric regressed sharply. - Keep
deferredcuts as a one-line footnote instead of spending one of the 5 fresh slots on them.
- If a previously
Step 3: Output contract (anti-slop)
Lead with a one-sentence blunt verdict on factory health (including key deltas since the last retro when history.priorRuns > 0), followed by at most 5 ranked cuts ordered by leverage (P0 live traps and relapsed cuts -> P1 loop redesigns and 50%+ cuts -> P2 repeated-correction encodings and speed wins).
Each cut gives only:
- What is broken or wasteful with exact evidence (counts, timings, log line, or repeated owner prompt).
- The premise to kill or invariant to enforce (the structural cut, never a band-aid prose line).
- Execution route (
fix now,run /pstack:correct,run /skill-auditor/check-audit,launch worktree thread, ordefer).
Skip zero-finding lenses completely. End with one short pick (go all, go 1,2, or drop) and change nothing until the owner replies.
Step 4: Record outcomes for compounding
After the owner picks cuts (and once any immediate cuts finish), record the run snapshot and cut statuses (executed, deferred, or dropped) to <git-common-dir>/retro-history.jsonl so the next /retro measures progress and never repeats rejected ideas:
shnode <skill>/scripts/collect.mjs <target> --days <n> --no-scanners --record --cuts '[{"id":"<slug>","title":"<short title>","status":"executed|deferred|dropped","commit":"<sha>","reason":"<why>"}]'


