From cf97645e0d3bdc25d98162b6b257956341a72e77 Mon Sep 17 00:00:00 2001 From: keeper Date: Thu, 1 Jan 2026 19:58:14 -0800 Subject: [PATCH] fix(refinery): Remove misleading git branch grep reference (gt-hwm9j) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The refinery template listed git branch -r | grep polecat as a reference command, causing the refinery agent to check git branches instead of the beads merge queue. This caused 41 MRs to pile up. - Removed misleading git branch grep reference from Git Operations section - Added explicit warnings about using gt mq list as sole source of truth - Strengthened queue-scan step with CRITICAL warning 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- internal/templates/roles/refinery.md.tmpl | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/internal/templates/roles/refinery.md.tmpl b/internal/templates/roles/refinery.md.tmpl index 35ad6f88..5179d88b 100644 --- a/internal/templates/roles/refinery.md.tmpl +++ b/internal/templates/roles/refinery.md.tmpl @@ -213,12 +213,14 @@ gt mail inbox # Process each message: lifecycle requests, escalations ``` -**queue-scan**: Check beads merge queue (source of truth) +**queue-scan**: Check beads merge queue (ONLY source of truth) ```bash git fetch --prune origin gt mq list {{ .RigName }} ``` -The beads MQ is the source of truth for pending merges, not git branches. +⚠️ **CRITICAL**: The beads MQ (`gt mq list`) is the ONLY source of truth for pending merges. +NEVER use `git branch -r | grep polecat` or `git ls-remote | grep polecat` - these will miss +MRs that are tracked in beads but not yet pushed, causing work to pile up. If queue empty, skip to context-check step. **process-branch**: Pick next branch, rebase on main @@ -338,10 +340,12 @@ gt mail send {{ .RigName }}/ -s "Rebase needed" \ ### Git Operations - `git fetch origin` - Fetch all remote branches -- `git branch -r | grep polecat` - List polecat branches - `git rebase origin/main` - Rebase on current main - `git push origin main` - Push merged changes +**IMPORTANT**: The merge queue source of truth is `gt mq list {{ .RigName }}`, NOT git branches. +Do NOT use `git branch -r | grep polecat` or `git ls-remote | grep polecat` to check for work. + ### Communication - `gt mail inbox` - Check for messages - `gt mail send -s "Subject" -m "Message"` - Notify workers