Invariant
A session that ends with /retro then /wrap leaves no artefact behind that
the next session would have to find by hand — or is told about each one it
deliberately leaves.
Current violation (observed 2026-08-12)
/wrap covers uncommitted and unpushed work, claim release, and the session
rename. /retro covers PRs, issues, review threads, and promises. Neither
looks at anything on disk beyond git status, so a long session leaves a
predictable tail of debris that only a human notices.
Everything below was left over by one session and found by hand during its
retro — none of it was surfaced by either skill:
| Artefact |
Left behind by this session |
| Local branches whose PR is merged or closed |
feat/checker-settle-and-carry (PR closed unmerged), fix/checker-empty-body-crash (merged) — both in harmon-devkit, still checked out-able weeks later |
shepherd-codex cycle state |
7 .json files across both repos, one per shepherded PR, all long merged. check-codex-cloud-review.sh reap exists precisely for this and nothing runs it |
deferred-findings directories |
empty fix/ and feat/ parents remain after the notes are consumed |
| Fixture temp dirs from killed gate runs |
dozens of /tmp/codex-cloud-review-* and /tmp/harmon-init-worktree-* left by rounds killed on harness timeouts |
None of it is harmful in isolation. Together it is the reason "is this branch
still needed?" is a question every session has to re-answer.
Verify
rg -n 'branch --merged|reap|deferred-findings|shepherd-codex' \
ai/skills/universal/wrap/SKILL.md
No hits means /wrap still checks none of these.
Proposed additions to /wrap
Each is read-only first, and proposes rather than performs — the skill's
existing discipline for claims.
- Local branches whose PR is finished. For each local branch other than
the default, resolve its PR and report merged / closed-unmerged / none.
Offer git branch -d for merged ones and -D for closed-unmerged, one
command per branch so the user can decline any. Never touch a branch with
an open PR, unpushed commits, or no upstream — those are live work.
- Reap shepherd cycle state. Run
check-codex-cloud-review.sh reap where
the helper is vendored. It already refuses to remove state for open PRs, so
this is safe unconditionally, and it is the exact lifecycle half the script
documents as belonging to a sweep nobody runs.
- Deferred-findings sweep. Report any file left under the
deferred-findings git-dir path — an unconsumed note is a lost P2 — and
prune the empty branch-name directories once the files are gone.
- Claim markers with no claim record.
/wrap's claim step keys off the
Claiming — comment /claim writes. Markers set by hand — an easy path,
since tick-criteria.sh requires an assignee — are invisible to it and to
the release workflow, which then reports success (harmon-devkit#434). List
any issue this session touched that still carries a claim:* label or
assignee, whatever its record, so the mismatch surfaces at the moment
somebody can act on it.
- Draft PRs left open by this session. For each, confirm the blocker
report the shepherd contract requires actually exists on the PR. A draft
with no stated blocker is a stall nobody can pick up.
- Merged PRs whose issue has unticked criteria. The closing-keywords
guard catches this in CI, but only for the PR that closes the issue. A
merged PR that used Refs can still leave criteria unticked on work that
is genuinely done.
- Unreleased consumer changes. If the session merged anything under
template/ and a release PR is still open, say so — consumers lag until it
merges, and the session that made the change is the one that knows it
matters.
Worth considering, not proposed: pruning /tmp fixture directories. They are
outside the repo, other processes may own them, and the pattern is
repo-specific — a report ("N fixture dirs older than a day") is probably the
right ceiling.
Acceptance criteria
Found while running /retro on a session that had produced all four artefact
classes above. Related: harmon-devkit#434 (markers without a record strand
silently).
Invariant
A session that ends with
/retrothen/wrapleaves no artefact behind thatthe next session would have to find by hand — or is told about each one it
deliberately leaves.
Current violation (observed 2026-08-12)
/wrapcovers uncommitted and unpushed work, claim release, and the sessionrename.
/retrocovers PRs, issues, review threads, and promises. Neitherlooks at anything on disk beyond
git status, so a long session leaves apredictable tail of debris that only a human notices.
Everything below was left over by one session and found by hand during its
retro — none of it was surfaced by either skill:
feat/checker-settle-and-carry(PR closed unmerged),fix/checker-empty-body-crash(merged) — both in harmon-devkit, still checked out-able weeks latershepherd-codexcycle state.jsonfiles across both repos, one per shepherded PR, all long merged.check-codex-cloud-review.sh reapexists precisely for this and nothing runs itdeferred-findingsdirectoriesfix/andfeat/parents remain after the notes are consumed/tmp/codex-cloud-review-*and/tmp/harmon-init-worktree-*left by rounds killed on harness timeoutsNone of it is harmful in isolation. Together it is the reason "is this branch
still needed?" is a question every session has to re-answer.
Verify
rg -n 'branch --merged|reap|deferred-findings|shepherd-codex' \ ai/skills/universal/wrap/SKILL.mdNo hits means
/wrapstill checks none of these.Proposed additions to
/wrapEach is read-only first, and proposes rather than performs — the skill's
existing discipline for claims.
the default, resolve its PR and report merged / closed-unmerged / none.
Offer
git branch -dfor merged ones and-Dfor closed-unmerged, onecommand per branch so the user can decline any. Never touch a branch with
an open PR, unpushed commits, or no upstream — those are live work.
check-codex-cloud-review.sh reapwherethe helper is vendored. It already refuses to remove state for open PRs, so
this is safe unconditionally, and it is the exact lifecycle half the script
documents as belonging to a sweep nobody runs.
deferred-findingsgit-dir path — an unconsumed note is a lost P2 — andprune the empty branch-name directories once the files are gone.
/wrap's claim step keys off theClaiming —comment/claimwrites. Markers set by hand — an easy path,since
tick-criteria.shrequires an assignee — are invisible to it and tothe release workflow, which then reports success (harmon-devkit#434). List
any issue this session touched that still carries a
claim:*label orassignee, whatever its record, so the mismatch surfaces at the moment
somebody can act on it.
report the shepherd contract requires actually exists on the PR. A draft
with no stated blocker is a stall nobody can pick up.
guard catches this in CI, but only for the PR that closes the issue. A
merged PR that used
Refscan still leave criteria unticked on work thatis genuinely done.
template/and a release PR is still open, say so — consumers lag until itmerges, and the session that made the change is the one that knows it
matters.
Worth considering, not proposed: pruning
/tmpfixture directories. They areoutside the repo, other processes may own them, and the pattern is
repo-specific — a report ("N fixture dirs older than a day") is probably the
right ceiling.
Acceptance criteria
/wrapreports local branches whose PR is merged or closed-unmerged, and offers a per-branch delete, never touching branches with open PRs or unpushed commits./wrapreaps shepherd cycle state where the helper is vendored./wrapreports unconsumeddeferred-findingsnotes and prunes empty directories./wrapreports claim markers that have no claim record, independently of the record-based release path./wrapreports draft PRs from this session that carry no blocker report.Found while running
/retroon a session that had produced all four artefactclasses above. Related: harmon-devkit#434 (markers without a record strand
silently).