feat(groomer): let the groomer assign the escalation lane on merit - #922
Merged
Conversation
The prompt permitted the escalation lane for hard work and then told the groomer never to use it: 'when unsure, choose the default — the bridge automatically escalates if a local attempt is exhausted, so you never need to pre-escalate'. Given that, defaulting to the default lane every time is correct behaviour, and work needing judgement burns its retries in the wrong lane before landing on a human. Replace the size-based test with a determinacy one. Most issues are determinate — the change is already clear and a worker only has to carry it out — and those belong in the default lane however many files they touch. Work that requires deciding between alternatives goes to the escalation lane directly. Also drop 'the local model is a capable coding model'. Lane capability comes from the operator's own lane descriptions; the prompt should not assume what runs behind any lane. Claude-Session: https://claude.ai/code/session_01YSuDvZq9ncvyX85Uzx3cQh
Open
Contributor
There was a problem hiding this comment.
AI Automated Review
Full PR review.
Analysis engine: MiniMax-M2.7@https://litellm.jory.dev/v1 (anthropic) — primary route
Review: PR PR 922 — feat(groomer): let the groomer assign the escalation lane on merit
Recommendation: Approve
This is a well-reasoned, low-risk change to the groomer's lane-selection prompt guidance. It replaces size-based escalation logic with determinacy-based logic and allows the groomer to assign the escalation lane directly rather than routing through the default lane first.
Change-by-Change Findings
src/lib/groomer/prompts/system-prompt.ts (1-line effective change)
- Before: Lane selection was size-driven ("Do NOT escalate just because an issue touches multiple files"), used the local model's capability as rationale, and instructed the groomer to route uncertain work through the default lane (bridge would auto-escalate).
- After: Lane selection is determinacy-driven ("Judgement, not size, is the test"). Groomer assigns the escalation lane directly when the work requires deciding between alternatives. The prompt no longer asserts what model any lane runs — lane capability is deferred to operator-authored lane descriptions.
- Assessment: The semantic shift from "size" to "determinacy" aligns with the stated rationale: work whose correct approach is already clear (even if spanning many files) belongs in the default lane; work requiring architectural judgment belongs in escalation. Removing "The local model is a capable coding model" is consistent with the agnostic design noted in the PR body and with AGENTS.md guidance on not baking assumptions into prompts.
src/lib/groomer/prompts/system-prompt.test.ts (4 new tests, 2 updated assertions)
lets the groomer assign the escalation lane directly: Confirms the new "Assign it directly" phrasing and absence of bridge-escalation language.keeps size out of the escalation test: Confirms "Judgement, not size" language and explicit "do NOT escalate merely because an issue touches many files".makes no claim about what model any lane runs: Confirms removal of "The local model is a capable coding model".omits escalation guidance entirely when no escalation lane is configured: Confirms conditional omission — escalation-specific language absent whenescalationLaneIdis empty.- Updated existing tests to reflect new phrasing ("Choose 'cloud' when the work requires deciding between alternatives", "Most ready work belongs in 'local'").
Sources
- PR body and rationale
- Diff of both changed files
- CI check results (all 11 checks passed including Tests, Lint, Typecheck, Build)
Standards Compliance
Per AGENTS.md conventions, this change:
- Does not introduce agent-specific names in generic docs — the prompt is entirely about lane IDs and determinacy, with no hardcoded agent names.
- Follows the "be concise" rule already present in the prompt.
- No Prisma schema changes, no API route changes, no auth changes — this is purely prompt-text modification with corresponding test coverage.
Tool Harness Findings
No tool harness output was provided in the corpus.
Unknowns / Needs Verification
None. The change is self-contained, tests pass (2487 passed, 5 skipped including 4 new tests), and all CI checks succeeded.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Why
The prompt permitted the escalation lane for hard work and then withdrew the permission in the next sentence: "When unsure, choose the default — the bridge automatically escalates if a local attempt is exhausted, so you never need to pre-escalate a borderline case."
Given that, always choosing the default lane is the groomer following instructions. Work that needs judgement spends its retry budget in the wrong lane and then parks on a human.
The new test
Determinacy, not size:
Assigned directly, rather than routed through the default lane first to see whether it copes.
Agnostic
Removed
"The local model is a capable coding model". Lane capability is whatever the operator wrote in their lane descriptions — a deployment may have two local lanes of different sizes, or no escalation lane at all, and the guidance is omitted entirely whenescalationLaneIdis unset. A test asserts the prompt makes no claim about what runs behind a lane.Verification
npx vitest run— 2487 passed, 5 skipped (4 new)https://claude.ai/code/session_01YSuDvZq9ncvyX85Uzx3cQh