| name | done-retirement |
| description | Pipeline retirement protocol for completed work items. Implements a 7-stage validate-commit-push-submit-notify-cleanup-terminate pipeline with irreversibility after push. Done means gone. |
| format | "2025-10-02T00:00:00.000Z" |
| version | 1.0.0 |
| status | ACTIVE |
| updated | "2026-04-25T00:00:00.000Z" |
| triggers | ["polecat has completed execution and is ready to retire its work","agent's hook status transitions to completed","work item's status transitions to done","convoy needs to track individual bead completion"] |
| references_subdir | true |
| word_budget | 800 |
Done Retirement
Pipeline retirement processor for the Gastown chipset. When a polecat finishes its work, this pipeline validates, commits, pushes, submits an MR, notifies, cleans up, and terminates. In hardware terms, it is the instruction retirement unit — writing results to the register file (shared repository), updating the reorder buffer (merge queue), and freeing execution resources.
Activation Triggers
This skill activates when:
- A polecat has completed execution and is ready to retire its work
- An agent's hook status transitions to
completed
- A work item's status transitions to
done
- A convoy needs to track individual bead completion
The 7-Stage Retirement Pipeline
Every retirement flows through seven stages in strict order. The pipeline has an irreversibility boundary at Stage 3 (Push). Before push, the retirement can be aborted and the bead returned to in_progress. After push, the process is irreversible — the branch is in the shared repository and the workspace will be destroyed.
| # | Stage | Purpose |
|---|
| 1 | Validate | Verify work meets acceptance criteria; reject premature retirement. |
| 2 | Commit | Ensure all changes are committed to the working branch. |
| 3 | Push | Push branch to shared repository. IRREVERSIBLE AFTER THIS. Work item status → done. |
| 4 | Submit | Create merge request record in the refinery's merge queue. |
| 5 | Notify | Send completion mail to mayor, witness, and convoy. |
| 6 | Cleanup | Destroy worktree, clear hook, remove dispatch record. |
| 7 | Terminate | Mark agent as terminated; release resources back to the pool. |
Stages: VALIDATE → COMMIT → PUSH → SUBMIT → NOTIFY → CLEANUP → TERMINATE.
Full TypeScript implementations live in references/retirement-implementation.md.
"Done Means Gone" — Irreversibility Rules
The irreversibility contract is the core design principle of this pipeline and MUST remain active at all times: