← ClaudeAtlas

implementation-harness-loop-recoverlisted

Use to recover the autonomous build loop after it was MANUALLY interrupted (Ctrl-C / killed) and may have left inconsistent state behind — phrases like "the loop got interrupted", "clean up after the loop", "recover the harness", "/loop-recover". Diagnoses AND fixes orphaned tasks, stale locks, a dirty tree / leftover loop worktree, revert-cycle damage, and ledger noise, then leaves the loop restartable. This MUTATES committed state (TASKS.json status, outcomes.jsonl) and pushes to main — it does the correcting the stopped loop can't. Requires the harness scaffolded.
RyanMKrol/claude-skills · ★ 0 · Data & Documents · score 73
Install: claude install-skill RyanMKrol/claude-skills
# Recover the loop after a manual interrupt You are recovering the autonomous build loop (`.harness/scripts/loop.sh`, run via `.harness/scripts/supervise.sh`) after it was **manually interrupted** (Ctrl-C). A clean interrupt is rare to get exactly right — the loop can be killed mid-flow and leave inconsistent state. Your job: **evaluate the loop's health, find every problem the interrupt caused, fix them properly, and leave the loop ready to restart.** Focus target: `$ARGUMENTS` (a task id scopes the orphan checks to it but still run the global health checks; empty = full sweep). Read this whole file, then execute in order. **Key mental model:** `cold_reset` (`git reset --hard` + `git clean -fd`) discards **tracked** changes but **gitignored files survive**. That's why audit logs / the failure buffer persist across attempts while an uncommitted `status=done` change can silently vanish — the root of most interrupt damage. ## ⚠️ Guardrails (do not violate) - **The loop MUST be stopped before you touch anything.** If a `loop.sh` / `supervise.sh` process is still alive, STOP and tell the user — its `cold_reset` would wipe your work and its pushes would race yours. - **Never mark a task `done` unless you have VERIFIED it is genuinely complete** — code merged to `origin/main`, CI green on that commit, the project's Definition of Done passes on current `main`, and any audit file PASSed. If work isn't on main, CI is red/missing, or an audit FAILED, it is not an orphan —