Done
Close the current repository task completely while preserving unrelated work.
Invoke for /done, bare done in an active task, or an explicit request to
land, publish, or verify task changes. Do not treat ordinary completion
language such as “I am done reviewing” as publication authority.
Authority envelope
A bare done authorizes full closeout: shape, validate, integrate, publish,
prove, and clean up. A narrower request authorizes only its named stages. Honor
explicit PR, local-only, no-push, squash, merge, rebase, or fast-forward terms.
Never promote “commit and push,” “publish this branch,” or “verify landing” into
full cleanup.
Repository review rules and protected branches override the direct path.
Otherwise Default to direct landing on the actual default branch/bookmark.
Discover the destination and remote from live state; never assume main or
origin merely from convention.
Completion invariant
Report Done only when:
- Explicit task revisions are reviewable and repository-declared gates plus
focused behavioral checks pass.
- Exact ancestry, per-revision patch equivalence, or aggregate task-range
patch equivalence proves the task landed on the actual default destination.
- A writable authoritative remote equals the proved local default tip.
- The recorded task workspace and owned branches are safely cleaned up.
Done locally is terminal only when no remote exists by design or the request
explicitly required local-only closeout. A clean feature workspace, successful
push, merged PR label, or passing build alone is never completion proof.
Workflow
Helpers require Bend 2.0.40+, Git, jq, Bash, a POSIX shell, and GNU coreutils on
PATH. GitHub publication also requires authenticated gh; jj repositories
require jj. See Bend maintenance when changing or
testing a helper.
Record active_directory=$(pwd -P) before changing directories. Establish
the explicit task boundary from a receipt, recorded revisions, or a direct
user statement. Subjects and ancestry position are not task provenance.
Capture read-only evidence before mutations:
bend "${HOME}/.agents/skills/done/scripts/closeout.bend" -- snapshot \
--repo "$PWD" --active-directory "$active_directory" \
${receipt:+--receipt "$receipt"} >"$snapshot"
If no receipt exists, establish provenance and use hey agent-adopt before
the first closeout mutation.
Shape only task work. Leave unrelated dirt unstaged. Run repository gates
plus focused tests. Allow one unambiguous task-caused repair cycle; otherwise
record Blocked.
Run jj root --ignore-working-copy. Read jj closeout
when it succeeds; otherwise read Git closeout. Never
initialize jj during closeout.
If direct publication is forbidden or review is required, read the
GitHub PR path. GitHub is the explicit hosted
provider; unsupported providers require authenticated discoverable tooling
or a precise blocker.
After landing proof, read receipt, cleanup, and reporting.
Finite outcomes
Done: remote landing and cleanup proved; receipt terminal.
Done locally: local-only-by-design landing and cleanup proved; receipt terminal.
Landed; cleanup deferred: remote landing proved, but safe cleanup did not.
PR ready; merge pending: required PR exists; an active event subscription owns the remaining gates.
Local only: publication was expected but unavailable or unauthorized.
Blocked: scope, validation, conflict, identity, policy, or proof is unresolved.
Partial outcomes remain open. On the next invocation, re-read live local and
authoritative state, accept recorded evidence only when it still matches, and
resume at the first unmet stage. A false terminal claim records false_done.
1---2name: done3description: Close an explicit repository task by shaping, landing, publishing, proving, and cleaning it up; also handles narrower commit, publish, and landing-verification requests without exceeding their authority.4metadata:5 source: https://skillmd.com/skills/edmundmiller/done6---78# Done910Close the current repository task completely while preserving unrelated work.11Invoke for `/done`, bare `done` in an active task, or an explicit request to12land, publish, or verify task changes. Do not treat ordinary completion13language such as “I am done reviewing” as publication authority.1415## Authority envelope1617A bare `done` authorizes full closeout: shape, validate, integrate, publish,18prove, and clean up. A narrower request authorizes only its named stages. Honor19explicit PR, local-only, no-push, squash, merge, rebase, or fast-forward terms.20Never promote “commit and push,” “publish this branch,” or “verify landing” into21full cleanup.2223Repository review rules and protected branches override the direct path.24Otherwise **Default to direct landing** on the actual default branch/bookmark.25Discover the destination and remote from live state; never assume `main` or26`origin` merely from convention.2728## Completion invariant2930Report `Done` only when:31321. Explicit task revisions are reviewable and repository-declared gates plus33 focused behavioral checks pass.342. Exact ancestry, per-revision patch equivalence, or aggregate task-range35 patch equivalence proves the task landed on the actual default destination.363. A writable authoritative remote equals the proved local default tip.374. The recorded task workspace and owned branches are safely cleaned up.3839`Done locally` is terminal only when no remote exists by design or the request40explicitly required local-only closeout. A clean feature workspace, successful41push, merged PR label, or passing build alone is never completion proof.4243## Workflow4445Helpers require Bend 2.0.40+, Git, jq, Bash, a POSIX shell, and GNU coreutils on46PATH. GitHub publication also requires authenticated `gh`; jj repositories47require `jj`. See [Bend maintenance](./references/bend.md) when changing or48testing a helper.49501. Record `active_directory=$(pwd -P)` before changing directories. Establish51 the explicit task boundary from a receipt, recorded revisions, or a direct52 user statement. Subjects and ancestry position are not task provenance.532. Capture read-only evidence before mutations:5455 ```bash56 bend "${HOME}/.agents/skills/done/scripts/closeout.bend" -- snapshot \57 --repo "$PWD" --active-directory "$active_directory" \58 ${receipt:+--receipt "$receipt"} >"$snapshot"59 ```6061 If no receipt exists, establish provenance and use `hey agent-adopt` before62 the first closeout mutation.63643. Shape only task work. Leave unrelated dirt unstaged. Run repository gates65 plus focused tests. Allow one unambiguous task-caused repair cycle; otherwise66 record `Blocked`.674. Run `jj root --ignore-working-copy`. Read [jj closeout](./references/jj.md)68 when it succeeds; otherwise read [Git closeout](./references/git.md). Never69 initialize jj during closeout.705. If direct publication is forbidden or review is required, read the71 [GitHub PR path](./references/github-pr.md). GitHub is the explicit hosted72 provider; unsupported providers require authenticated discoverable tooling73 or a precise blocker.746. After landing proof, read [receipt, cleanup, and reporting](./references/cleanup.md).7576## Finite outcomes7778- `Done`: remote landing and cleanup proved; receipt terminal.79- `Done locally`: local-only-by-design landing and cleanup proved; receipt terminal.80- `Landed; cleanup deferred`: remote landing proved, but safe cleanup did not.81- `PR ready; merge pending`: required PR exists; an active event subscription owns the remaining gates.82- `Local only`: publication was expected but unavailable or unauthorized.83- `Blocked`: scope, validation, conflict, identity, policy, or proof is unresolved.8485Partial outcomes remain open. On the next invocation, re-read live local and86authoritative state, accept recorded evidence only when it still matches, and87resume at the first unmet stage. A false terminal claim records `false_done`.