/claude-engineering-skills:harness-retrofrom Claude Engineering Skills
Post-session retro for the AI harness itself: mechanically scan recent Claude Code session transcripts for failures that RECUR across sessions (tool errors, denials, hook errors and blocks, refusals, retries, user corrections), check what the harness already has, then judge each ranked candidate and PROPOSE the lowest enforcing layer (hook/gate > script > reference doc > AGENTS.md) with the failure it prevents, the exact change and a positive-control test. Never applies a change: a human approves, the fix lands as its own PR. Also promotes memory tripwires that keep firing into enforcement, and measures recurrence before vs after a fix landed. Pick by INPUT: past SESSIONS to mine come here; a CODE change to review is /audit-code. Triggers on: "harness retro", "retro", "what keeps going wrong", "recurring failures", "promote this tripwire", "/harness-retro". Full command syntax: see the Usage section in this skill.
Ships in Claude Engineering Skills. 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.
/harness-retro — scan this repo's sessions (7 days), judge, propose
/harness-retro --fleet — report every repo on this account
/harness-retro effect — did an enforced fix reduce its failure?
Worktree preflight — in a linked git worktree the gitignored tooling tree
scripts/.claude-skills/is absent (git worktree adddoes not populate it), so every command below that uses it dies onMODULE_NOT_FOUND. Runnpm run skills:hydratefirst; if no such script exists,references/worktree-preflight.mdholds the entry to add (ask the user first: it editspackage.json). Keys are not copied: put them in~/.audit-loop.env, which every worktree reads.
Detect mechanically, judge with the model, enforce in the repo. The scanner is deterministic and costs no model tokens (10-25 s for a week of transcripts); you are the judgment step, and only for the top few candidates it hands you (default 5). Propose, never apply.
Transcripts are read from the account's config root and never leave local
disk. v1 writes derived scan artifacts under .audit/harness-retro/
(gitignored) and adds no audit-store write of its own; enforce on a
type: friction tripwire records its test through the existing quality link
seam (memory_friction).
node scripts/harness-retro.mjs scan
Read the report. UNMEASURED is not a clean result — say what it scanned
and why it could not conclude (no transcripts, read errors, unrecognised
format, no in-scope sessions), then stop. MEASURED with zero candidates is a
valid result: report how many sessions were scanned and that nothing recurred.
Run it at the end of every coordinator session: the scan artifacts it leaves
are what effect later measures against.
The latest scan artifact (.audit/harness-retro/scan-<id>.json) lists the
ranked candidates (each with coveredBy hints) and tripwires whose status
is promotion-candidate. For each, decide one verdict:
propose — a recurring, mechanically decidable failure no existing surface
enforces. Choose the LOWEST layer that can enforce it.already-covered — a hook, gate, skill or memory already handles it; name
it in coveredBy. A hook_block that keeps firing IS enforcement working —
propose only if its round trip is the cost (e.g. rewrite instead of block).judgment-only — real, but no check can decide it.not-actionable — noise, an upstream product behaviour, or a one-time event.Open the named surface before you claim already-covered; coveredBy is a
lexical hint, not a verdict. Ladder, the coordinator-chore rule (a recurring
mechanical chore → layer: script, coordinatorChore: true) and a worked
example: references/judging-candidates.md.
Write the envelope to a file with the Write tool, then record it:
node scripts/harness-retro.mjs record --scan latest --file .claude/tmp/retro-proposals.json
record refuses a proposal missing any of the three things, an identity
the scan did not rank, or evidence that does not match the scan's counts. The
shape it validates (keys are exact; .strict() refuses extras):
{
"scanId": "20261116T120000123Z-abcdef",
"proposals": [
{
"identity": "fingerprint:0123456789abcdef",
"verdict": "propose",
"failurePrevented": { "summary": "hook commands fail when the session cwd is not the repo root", "sessions": 8, "occurrences": 51 },
"layer": "gate",
"change": { "files": [".claude/settings.json"], "description": "prefix every hook command with \"$CLAUDE_PROJECT_DIR\"" },
"positiveControl": { "test": "tests/<new-check>.test.mjs", "assertion": "a hook command with a relative path fails the test" },
"coordinatorChore": false
},
{
"identity": "tripwire:feedback_example",
"verdict": "already-covered",
"reason": "the grep nudge hook already blocks this before it runs",
"coveredBy": ".claude/hooks/bash-grep-nudge.mjs"
}
]
}
layer: "agents-md" additionally needs ladderJustification (why no lower
layer can enforce it). Present the rendered proposals-<id>.md to the human.
The fix is its own PR. In that branch, once its test exists (TEST = that test's repo-relative path):
node scripts/harness-retro.mjs enforce --identity fingerprint:0123456789abcdef --scan latest --test "$TEST" --layer gate --summary "hook commands resolve from the project dir"
enforce refuses, writing nothing, an identity the scan did not rank. It
also refuses a test npm test would not run and a summary carrying a path.
Otherwise it appends the decision to .harness-retro/decisions.json (committed with the
fix). For a tripwire: identity whose memory is type: friction, it also
records the enforcing test through the existing quality link seam. It does NOT
edit MEMORY.md: retiring the tripwire line is a human edit in the same PR.
reject --identity … --summary … records a "no". Closure rules and reading
effect:
references/effect-and-closure.md.
node scripts/harness-retro.mjs effect
Recurrence before vs after each enforcement landed, over equal windows and a
stable population. pending, pending-merge and unmeasured carry reasons —
report them as such, never as "no effect".
node scripts/harness-retro.mjs status reports the last scan's age and any
registry problems.
| File | Summary | Read when |
|---|---|---|
references/judging-candidates.md | Judging a retro candidate — the enforcement ladder, the three-things contract, coordinator chores, an example. | Step 2 — judging candidates, OR unsure which layer a fix belongs in. |
references/effect-and-closure.md | Closing a decision and reading its effect — enforce/reject, activation, the verdicts. | Step 4 or 5 — recording an approved fix, OR an effect verdict needs explaining. |
references/worktree-preflight.md | Worktree preflight remedy — the skills:hydrate npm script to add when a linked worktree lacks the tooling tree. | A command dies with MODULE_NOT_FOUND in a linked worktree AND this repo has no skills:hydrate script. |
— end of /harness-retro —
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
Generated from the plugin's indexed repository (lbstrydom/claude-engineering-skills) — no native marketplace selected
npx claudepluginhub p/lbstrydom-claude-engineering-skills18 skills in this plugin
/ai-context-managementManage AGENTS.md and CLAUDE.md alignment across a repo so Claude, Copilot,
Cursor, Windsurf, and other AI agents share the same project context.
Detects drift, reconciles manually-introduced divergence, and migrates legacy
CLAUDE.md-canonical repos to AGENTS.md-canonical.
Triggers on: "audit AGENTS.md", "check context drift", "AGENTS.md vs CLAUDE.md",
"fix context drift", "migrate to AGENTS.md",
"context sync", "what tools read which file", "ai-context-management".
Usage: /ai-context-management audit — Score drift + report findings
Usage: /ai-context-management reconcile — Apply patches to fix drift
Usage: /ai-context-management migrate — Flip legacy repo to AGENTS.md canonical
/audit-codeIteratively audit code against a plan with GPT + an independent final gate (Gemini, else Claude).
5-pass parallel static analysis (structure, wiring, backend, frontend,
sustainability), R2+ ledger-driven suppression, debt capture for
out-of-scope findings, max 6 rounds with 2-stable-rounds convergence.
Invoke this for ANY code-correctness review, even a small pasted snippet
or diff — don't just review it yourself directly; a single read-through
is not a substitute for the multi-pass GPT + final-gate adjudication this skill
performs, and skipping it means the review didn't actually happen.
Triggers on: "audit my code", "audit my changes", "audit my PR",
"check the implementation", "review my code", "audit code", "/audit-code",
"audit this", "verify the implementation".
Usage: /audit-code <plan-file> — Audit code against plan (--scope diff default)
Usage: /audit-code <plan-file> --scope plan — Audit only files mentioned in the plan
Usage: /audit-code <plan-file> --scope full — Full repo audit