# Lifecycle and delivery closeout

Load this reference when closeout begins and `CloseoutEligibility` must be derived, when an explicitly authorized recovery checkpoint is being considered, or when the user explicitly requests push. The main Skill must first establish a valid selected handoff and retain its incomplete-or-drifted fail-safe.

Derive `CloseoutEligibility` independently; it is exactly `not-eligible`, `lifecycle-ready`, or `local-commit-ready`. Before deriving a ready value, run `rsp ready <change-work-ref> --json` for every terminal Change and require `completionGate: pass` plus `archiveReady: yes`. Only that machine gate, `AcceptanceDisposition: review-clean`, fresh owner, authority, exact diff, and decisive Required verification evidence can derive a ready value. Optional coverage warnings remain in the Receipt but do not block. Any other acceptance state derives `CloseoutEligibility: not-eligible`; neither archive nor commit runs. Human acceptance remains separate and unperformed unless the declared acceptance contract and current authority explicitly establish it.

Valid selected handoff only: effective `manage.closeout` is an automatic grant ceiling narrowed by nearer restrictions and host enforcement. `manual` grants neither automatic archive nor commit. `lifecycle` grants lifecycle closeout after Manage-owned clean fixed-scope change review and a complete durable writeback decision but no Git action. `local` automatically grants lifecycle closeout and, for one eligible terminal non-small clean exact owned boundary, exactly one local Commit route without another user request. Separately justified recovery checkpoints remain possible within the same ceiling. Explicit current-turn authority may allow a local action not automated by the preset; denial wins.

When granted, close lifecycle before any commit. Change: after Manage-owned clean fixed-scope change review and the durable writeback decision run `rsp archive <change-work-ref>` and inspect the complete lifecycle diff. For shallow Group: review, decide durable writeback, and archive each child independently; rederive completion, then when all children plus Group gate pass run `rsp group close <group>`; inspect the complete lifecycle diff after each mutation. This includes terminal owners. Require proven review/clean-boundaries.

Decide commit eligibility separately. Under `local` or explicit commit authority, downstream work may justify one recovery checkpoint: give `rsp-commit` the WorkOwner, paths, evidence, lifecycle state, and authority, then derive status from its receipt. Terminal small owners default to no commit. After lifecycle closeout, a qualified `local` terminal non-small Change or Group with known owner and paths, fresh decisive verification, clean exact boundary, and no nearer denial routes exactly once to `rsp-commit`; do not require the user to repeat `commit`. An ambiguous, mixed, stale, or denied boundary stops without staging. Apply the same owner envelope to explicitly authorized Group/release commits. If Commit is unavailable, return `StopDisposition: capability-unavailable` to Core for its bounded manual Commit fallback; Manage does not stage or commit. Archive grants no Git or publication authority.

Push is opt-in only when user explicitly mentions push and remote, branch, and Group or goal milestone are unambiguous or accepted. Push there, or earlier only for required remote CI, recovery, or collaboration. Never force-push, infer push from commit authority, or push a protected or ambiguous branch. Failure preserves local commits and stops at remote boundary. Return to Core before a separate release operation and dedicated release commit.
