Summary
The refinery review step should be optional. For many use cases — prototyping, personal projects, trusted codebases, small changes — the overhead of a refinery review (clone, diff, analyze, merge) is unnecessary and slows the feedback loop. Users should be able to let polecats merge directly to the target branch (main or convoy feature branch) without triggering a review cycle.
Design
Town-level setting
// townConfig
review_mode: "always" | "never" | "pr_only"; // default: "always"
| Mode |
Behavior |
always (default) |
Current behavior — every polecat gt_done creates an MR bead, refinery reviews and merges |
never |
Polecat merges directly to the target branch on gt_done. No MR bead created, no refinery dispatch, source bead goes straight to closed. |
pr_only |
Polecat creates a PR on gt_done but no refinery reviews it. The PR goes through CI and waits for human merge (or auto-merge per #1002). |
Settings UI
Add a "Review Mode" selector in the Refinery section of town settings:
Review Mode
* Refinery reviews all changes (default)
Every change is reviewed by the refinery before merging.
* Skip review — merge directly
Polecats merge to the target branch immediately. No code review.
* PR only — no automated review
Polecats create pull requests but the refinery does not review them.
PRs go through CI and wait for human merge.
Reconciler Changes
In reconcileReviewQueue Rule 5 (pop open MR for refinery), check the review mode:
if (townConfig.review_mode === "never") {
// No MR beads should exist — agentDone skips MR creation
return [];
}
In applyEvent("agent_done") for polecats, check the review mode:
if (townConfig.review_mode === "never") {
// Polecat merges directly — no MR bead, close the source bead
closeBead(sql, agent.current_hook_bead_id);
unhookAgent(sql, event.agent_id);
return;
}
if (townConfig.review_mode === "pr_only") {
// Create MR bead with pr_url but do NOT dispatch refinery
createMrBead(sql, { ..., skip_refinery: true });
unhookAgent(sql, event.agent_id);
transitionBead(sql, agent.current_hook_bead_id, "in_review");
return;
}
// Default: "always" — existing behavior
Polecat Prompt Changes
When review_mode === "never", the polecat system prompt should include:
You are working in direct-merge mode. When you finish your work:
1. Merge your branch into the target branch (main or the convoy feature branch)
2. Push the merged result
3. Call gt_done with your branch name
Your changes will NOT be reviewed by a refinery. Ensure your code is
correct, tests pass, and the build succeeds before merging.
When review_mode === "pr_only", the polecat prompt should instruct it to create a PR via gh pr create and pass the PR URL to gt_done.
Convoy Behavior
For convoys:
never mode: Each polecat merges directly to the convoy feature branch. When all beads are closed, the convoy landing MR is created (if review-then-land mode) or the convoy closes directly (if review-and-merge mode). The landing MR itself could optionally still go through the refinery — consider a separate landing_review_mode setting.
pr_only mode: Each polecat creates a PR against the convoy feature branch. PRs are merged by humans or auto-merge. Convoy progress tracks PR merge status via polling.
Refinery Container
When review_mode === "never", the refinery agent is never dispatched. The container does not need to start a refinery process, saving resources.
Per-Rig Override (future)
Initially this is town-level only. A natural extension is per-rig override:
// rigConfig (future)
review_mode?: "always" | "never" | "pr_only"; // overrides townConfig if set
Acceptance Criteria
References
Summary
The refinery review step should be optional. For many use cases — prototyping, personal projects, trusted codebases, small changes — the overhead of a refinery review (clone, diff, analyze, merge) is unnecessary and slows the feedback loop. Users should be able to let polecats merge directly to the target branch (main or convoy feature branch) without triggering a review cycle.
Design
Town-level setting
always(default)gt_donecreates an MR bead, refinery reviews and mergesnevergt_done. No MR bead created, no refinery dispatch, source bead goes straight toclosed.pr_onlygt_donebut no refinery reviews it. The PR goes through CI and waits for human merge (or auto-merge per #1002).Settings UI
Add a "Review Mode" selector in the Refinery section of town settings:
Reconciler Changes
In
reconcileReviewQueueRule 5 (pop open MR for refinery), check the review mode:In
applyEvent("agent_done")for polecats, check the review mode:Polecat Prompt Changes
When
review_mode === "never", the polecat system prompt should include:When
review_mode === "pr_only", the polecat prompt should instruct it to create a PR viagh pr createand pass the PR URL togt_done.Convoy Behavior
For convoys:
nevermode: Each polecat merges directly to the convoy feature branch. When all beads are closed, the convoy landing MR is created (if review-then-land mode) or the convoy closes directly (if review-and-merge mode). The landing MR itself could optionally still go through the refinery — consider a separatelanding_review_modesetting.pr_onlymode: Each polecat creates a PR against the convoy feature branch. PRs are merged by humans or auto-merge. Convoy progress tracks PR merge status via polling.Refinery Container
When
review_mode === "never", the refinery agent is never dispatched. The container does not need to start a refinery process, saving resources.Per-Rig Override (future)
Initially this is town-level only. A natural extension is per-rig override:
Acceptance Criteria
review_modesetting added to town config (default:always)nevermode: polecatgt_donecloses the source bead directly, no MR bead createdpr_onlymode: MR bead created with PR URL, no refinery dispatched, waits for external mergealwaysmode: unchanged current behaviorneverorpr_onlymodesReferences
pr_onlymode)