| name | refinery-merge |
| description | DMA merge queue pattern for sequential, deterministic merge request processing. Checks out branches, rebases onto main, runs tests, merges, and pushes. Never auto-resolves conflicts. |
| type | skill |
| category | workflow |
| status | stable |
| origin | tibsfox |
| modified | false |
| first_seen | "2026-03-06T00:00:00.000Z" |
| first_path | .claude/skills/refinery-merge/SKILL.md |
| superseded_by | null |
Refinery Merge
Sequential merge queue processor for completed polecat branches. The refinery is the DMA controller of the Gastown chipset -- it moves data (code changes) from producer (polecat branches) to consumer (main branch) without CPU (mayor) intervention during normal operations. The pipeline is deterministic: checkout, rebase, test, merge, push. Merge conflicts block the queue and escalate; they are never auto-resolved.
Activation Triggers
This skill activates when:
- The merge queue has pending merge requests from completed polecats
- A polecat calls done and its branch needs to be merged into main
- The refinery is assigned to process a rig's merge queue
- Merge queue depth exceeds a threshold and processing is needed
Core Capabilities
Sequential MR Processing
The refinery processes merge requests one at a time in strict FIFO order. No parallel merges. No priority reordering. The queue is a pipeline, not a pool.
Queue processing loop:
const state = new StateManager({ stateDir: '.chipset/state/' });
async function processQueue(): Promise<void> {
const pending = await listMergeRequests('pending');
if (pending.length === 0) {
return;
}
const mr = pending[0];
await processMergeRequest(mr);
}
Rebase-Test-Merge Pipeline
Each merge request flows through a five-stage pipeline. Every stage must succeed before advancing to the next.
CHECKOUT REBASE TEST MERGE PUSH
| | | | |
v v v v v
get branch -> rebase onto -> run tests -> merge to main -> push remote
current main (if configured) close bead