quick-wrap
Short session close: commit, loose ends, stop. Not workstream-complete.
SKILL.mdskills/quick-wrap/SKILL.md
GitHubQuick Wrap — the Light End-of-Work Close
Non-Claude EM: this skill is the Claude-native path; a non-Claude EM takes the engine-op path at
coordinator/docs/wiki/non-claude-workers/non-claude-em-path.md.
Fallback only: an emit-dispatch-workflow run closes in-run.
The short checklist for a session whose work is finished, small, and unremarkable. Fail one entry condition and route to the named remedy.
Entry test — ALL four must hold
| # | Condition | Read | If it fails |
|---|---|---|---|
| 1 | No governing plan drove this session's work † | close_gate.governing_plan — quick-wrap-assemble brief |
/workstream-complete |
| 2 | Diff under the review brightline — <500 novel LOC, <5 commits, <4 surfaces | close_gate.diff (session-scoped, carve-outs pre-applied) — quick-wrap-assemble brief |
Scoped review, then wrap (below), not /workstream-complete |
| 3 | What this session claimed is finished here ‡ | artifact.chain.ancestor_count — pickup-assemble brief <path>; nothing claimed, test passes. Ancestors do not fail it; step 2 pays their legs |
/handoff, if the claimed baton is not finished |
| 4 | Work is finished — nothing in-flight for a successor | judgment | /handoff, only if context pressure genuinely forces the stop |
† spec-dispatch. close_gate.governing_plan.scope_mode == "spec-dispatch" passes test 1 as a
deferred obligation, conditional on step 2's reconciliation micro-step running and step 5 reporting
it. dispatch-routed sessions carry governing_plan.present: false and pass as before.
‡ A claimed baton closes here, with or without ancestors. A chain-root baton (predecessor:
none/null, no additional_predecessors, no forked_from) is stamped terminal in step 2; one
with ancestors gets its Session Ledger row appended first.
close_gate.diff already excludes relocated and doc-only lines; report gross and novel counts in step 5 when the carve-out drops the session under the line.
The named routes past test 2
Test 2 failing means a review is owed. Route 1 is the default.
1. Scoped review, then wrap (the default). (1) register the reviewed file list with
review-findings-ledger targets --add, then dispatch a reviewer scoped to the risk surface —
Skill(coordinator:review-code) diff-shaped, or a direct coordinator:code-reviewer when scope
is narrow; (2) the reviewer applies and verifies its own ledger; (3) run the checklist below, verdict in step 5.
Do not ask whether to dispatch — invoking this skill IS the request for the dispatch this step names; it dissolves no gate this skill's own body names.
2. Successor-runs-review handoff — only when the owed review is genuinely un-runnable in this
session. Name the class member per coordinator/skills/handoff/SKILL.md § Step 0 trigger 4; that
trigger's discharge (name the blocker and the event that clears it in the successor's remit)
governs. This route terminates in /handoff, never in /execute-plan's Phase-5 halt
(coordinator/skills/execute-plan/SKILL.md § Phase 5). Never a lighter substitute for dispatching a reviewer.
Unlocks nothing else — test 1, 3, or 4 failing still routes to its named sibling.
A lesson is not a disqualifier — capture through the lesson CLI, then wrap.
- Branch ready to ship →
/merging-to-main; quick-wrap ends a session, never a branch. - End of the working day →
/workday-complete; never run both.
Mutual exclusion. /quick-wrap, /workstream-complete, /handoff: one session, one closing ceremony; two workstreams close separately, named which.
The checklist
Five steps; longer than a few minutes means the entry test was wrong.
1. Commit. Run the safe-commit mechanism — it computes this session's safe pathspec from its touch-list (minus anything a live peer also claims) and commits — publishing is the separate cadence checkpoint below, not part of this call:
<!-- VERBATIM -->On a PowerShell host, invoke the coordinator-invoke.exe door by absolute path through the call
operator (Shape W, ${CLAUDE_PLUGIN_ROOT}/snippets/resolve-coordinator-bin.md § The door):
& "$env:COORDINATOR_SETTINGS_HOME\bin\coordinator-invoke.exe" session.safe_commit_offer '{"cwd":"<repo-root>","session_id":"<this session's id>"}'
POSIX: the bare coordinator-invoke door.
Pass session_id explicitly — the op refuses without it (caller identity could not be established); cwd only selects the tree scanned.
Payload is one positional JSON string, not k=v. Never pass --repo: this op is scope "none" and refuses it (-32603). Add "dry_run": true to preview; omit it to commit.
Do not ask whether to commit. Run it, report what the op's rendered field says landed. "message": "<subject>" for one group, the
groups param (list of {"paths": [...], "message": "..."}) for several — mutually
exclusive with message. Paths outside the safe pathspec drop silently.
Residue gate. Run "$_py" "${CLAUDE_PLUGIN_ROOT}/bin/close-residue-check.py" --session-id <this session's id> before the commit only to read its groups (a dirty tree exits 1 there; pass the groups to the commit); the run after the commit gates. Exit 1 after the commit refuses the close: stop, commit or ignore the listed residue, never wrap over it.
2. Close loose ends. The judgment step — sweep what this session actually touched:
- A queue entry resolved this session: closure is a move, never in-place —
git mv state/<queue>/<slug>.yaml archive/<queue>/<YYYY-MM>/<slug>.yaml, setstatus: closed,closed_at:,closed_by:. - An inbound cross-repo memo actioned this session → resolve it.
- An unclosed residual in prose only: file it, one call each —
coordinator-queue-append --schema bug-backlog --status open --severity P0|P1|P2|P3 --title … --surface … --repro-steps … --evidence … --body …(other queues:--schema NAME --help). Naming it in step 5 alone is dumping it. - A
scope_mode: spec-dispatchplan authored/executed this session: tick ACs, setplan-tasksdispositions; a met terminal judge stampsstatus: implementedinsideterminal_commit(terminal-judge); verify, never restamp. Where it did not stamp, thed-stamp-plan-implementeddirective owns it.A-PLAN-SELF-COMPLETES-ONLY-ON-A-MET-TERMINAL-JUDGE. - A plan this session executed whose
exit_criterion_metis absent blocks the close.asserted: falsedoes not block; it routes to/handoffor a Phase-5 halt (coordinator/skills/execute-plan/SKILL.md§ Phase 5). - The baton this session claimed and finished. If it has ancestors, first append the Session
Ledger row through
coordinator-invoke handoff.append_session_ledger(${CLAUDE_PLUGIN_ROOT}/snippets/resolve-coordinator-bin.md). Then, ancestors or not, stampdeployment_state: shipped+shipped_in: <this session's commit>;statusstaysclaimed(the enum admits onlyopen/claimed). Both keys, or the baton is stranded instate/handoffs/—sweep-terminal-handoffswalks past an unstamped record. The drain below files it. - A
dispatch-routed sizing that routed this session: the close stamps itshipped(never one withrequirement_register; its rollup ships it) when this session committed the sizing file and non-bookkeeping work; otherwise stamp by hand (j-dispatch-sizing-ship-failed). A second XS dispatched and left unfinished: flip it tostatus: declinedfirst, or it ships as a false positive. - Each sizing-object this session made terminal (
shipped/declined/superseded,close_gate.terminal_sizings): archive withcoordinator-invoke fleet.archive_terminal_sizings '{"mode":"already-terminal","dry_run":false,"candidate_ids":["state/sizings/<slug>.yaml"]}'— it moves and commits itself (a handgit mvis refused bysafe_commit_offer). Other sessions' terminal sizings are not this close's work. Noclosed_at/closed_by. A record still atsized,routed, ordraftis untouched. coordinator-fold-execution-recordsidecars this session produced — a diverged sidecar's prose is already in the envelope (j-diverged-sidecars, or-degraded): settle that point, then delete. Never open sidecars to read.
Completion entry and lessons, before the drain. Write the completion entry with
coordinator-complete-entry (title, prose of eight sentences or fewer, nature) — once per session.
Capture lessons (lesson CLI) here.
Then drain — MANDATORY, and the last act of this step. Run "${COORDINATOR_SETTINGS_HOME:-$HOME/.coordinator-claude-settings}/bin/sweep-terminal-handoffs" (PowerShell: & "$env:COORDINATOR_SETTINGS_HOME\bin\sweep-terminal-handoffs.exe") once,
after every stamp above is written. Terminal batons land at archive/handoffs/YYYY-MM/<file>.md, month keyed on the filename's leading date, never the stamp date. The close condition is checkable and you check it: state/handoffs/ holds no
record carrying a terminal deployment_state when you report. Live batons sit only at state/handoffs/YYYY-MM/<file>.md. Idempotent; it drains other sessions'
residue too.
[[terminal-batons-are-swept-at-close-not-left-to-the-next-ceremony]]
3. Refresh. regenerate-orientation-cache --invoker quick-wrap.
4. Changelog. & "$env:COORDINATOR_SETTINGS_HOME\bin\workday-complete-step9-append-changelog.exe" --no-push (POSIX $COORDINATOR_SETTINGS_HOME/bin/workday-complete-step9-append-changelog --no-push). Rerun-safe.
5. Report. Four lines: what landed (commit SHA), the completion entry path, what you closed,
what's deliberately open. Six for scope_mode: spec-dispatch: add the code-reviewer verdict + ledger verified + one
commit, and that the plan-reconciliation ran. Then stop.
Anti-scope
- Never deletes, force-pushes, or rewrites history. No
reset --hard,checkout --over another's hunk, branch deletion, rebase. Authorized: a scoped forward commit, agit mvof a queue entry or terminal sizing-object into archive, this session's own terminal-status write on a sizing-object or the baton it claimed. - Writes no handoff or spinoff; the completion entry is its one record.
- Captures lessons only through the
lessonCLI. - Runs no test suite. Do not add
Skill(coordinator:validate)or hand-rollpytest. Report evidence already produced as-is; a suite already known red fails the entry test. - Opens no review trail of its own. The scoped-review route runs before this checklist and
never substitutes for the partitioned review a plan-driven or predecessor-consuming session
owes — except
scope_mode: spec-dispatch, discharged upstream. - Never closes a queue entry it didn't resolve.
- Does not supersede the PM's closure authority. This closes a session, never a workstream — never emits a "Session Complete" header.
See also
skills/workstream-complete/SKILL.md (the heavy close), skills/handoff/SKILL.md (its Step 0
redirects here), commands/workday-complete.md (supersedes this one).