refinery-mergelisted
Install: claude install-skill Tibsfox/gsd-skill-creator
# 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:**
```typescript
const state = new StateManager({ stateDir: '.chipset/state/' });
async function processQueue(): Promise<void> {
// Get pending MRs in FIFO order
const pending = await listMergeRequests('pending');
if (pending.length === 0) {
// Queue empty -- nothing to process
return;
}
// Process the oldest MR first (strict FIFO)
const mr = pending[0];
await processMergeRequest(mr);
}
```
### Rebase-Test-Merge Pipeline
Each merge request flows through a five-stage pipeline. Every stage