From b0c7c89be1eff8469aea224ec03fb59fc15a6f5e Mon Sep 17 00:00:00 2001 From: cheedo Date: Thu, 1 Jan 2026 18:13:38 -0800 Subject: [PATCH] feat(formula): Add Refinery-specific inline conflict resolution guidance (gt-p80pc) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Expanded the sync-git step in mol-sync-workspace.formula.toml with detailed guidance for Refinery agents on how to handle merge conflicts inline: - Trivial conflicts: resolve immediately (imports, whitespace, etc.) - Semantic conflicts: assess carefully before merging - Complex conflicts: abort and notify polecat to rebase - Judgment call principle: when in doubt, abort rather than risk broken main 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .../formulas/mol-sync-workspace.formula.toml | 54 ++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-) diff --git a/.beads/formulas/mol-sync-workspace.formula.toml b/.beads/formulas/mol-sync-workspace.formula.toml index b63027b9..ac9d7f4f 100644 --- a/.beads/formulas/mol-sync-workspace.formula.toml +++ b/.beads/formulas/mol-sync-workspace.formula.toml @@ -183,7 +183,59 @@ The Preservation Protocol: - Document the conflict - Proceed with sync on clean baseline -**Refinery exception:** Must resolve conflicts inline (can't delegate). +**Refinery-specific conflict resolution:** + +Unlike polecats who can file a bead and delegate, the Refinery MUST resolve +conflicts inline. The Refinery processes the merge queue - if it can't resolve +a conflict, the queue backs up and polecats' completed work never lands. + +**Refinery conflict protocol:** + +1. **Analyze the conflict:** + ```bash + git status # See conflicted files + git diff # Examine conflict markers + ``` + +2. **Trivial conflicts (resolve immediately):** + - Import ordering changes + - Whitespace or formatting + - Non-overlapping additions in same file + - Version bumps or changelog entries + + Resolution: + ```bash + # Edit conflicted files to resolve + git add + git rebase --continue + ``` + +3. **Semantic conflicts (assess carefully):** + - Both sides modified same function + - Deleted code that the other side modified + - Structural changes (renamed files, moved code) + + If you can understand both intents and merge correctly: + ```bash + # Carefully merge the changes, preserving both intents + git add + git rebase --continue + ``` + +4. **Complex conflicts (abort and notify polecat):** + - Conflicting business logic changes + - Unclear which version is correct + - Risk of subtle bugs from incorrect merge + + ```bash + git rebase --abort + gt mail send {{ rig }}/polecats/ -s "Rebase needed" \ + -m "Your branch conflicts with main in . Please rebase and resubmit via gt done." + # Skip this branch, continue with queue + ``` + +**The Refinery judgment call:** When in doubt, abort and notify rather than +risk merging incorrectly. A resubmitted branch is better than a broken main. **Exit criteria:** Local branch matches or is cleanly ahead of origin/main."""