Skip to content

feat(groomer): let the groomer assign the escalation lane on merit - #922

Merged
joryirving merged 1 commit into
mainfrom
feat/groomer-picks-lane-on-merit
Sep 2, 2026
Merged

feat(groomer): let the groomer assign the escalation lane on merit#922
joryirving merged 1 commit into
mainfrom
feat/groomer-picks-lane-on-merit

Conversation

@joryirving

Copy link
Copy Markdown
Contributor

Summary

  • Replace the size-based escalation test with a determinacy one, and allow the groomer to assign the escalation lane directly.
  • Stop asserting what model the default lane runs.

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:

  • Default lane — the change to make is already clear from the issue and its code, and a worker only has to carry it out. Bug fixes, small features, config/docs changes, single-module refactors. A determinate change spanning many files is still determinate, so size alone is not grounds to escalate.
  • Escalation lane — the work requires deciding between alternatives rather than carrying out a decision already made: a design or architecture change, a fix whose correct approach is genuinely arguable, or work that must hold several modules in mind at once.

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 when escalationLaneId is 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)
  • typecheck, lint and build clean

https://claude.ai/code/session_01YSuDvZq9ncvyX85Uzx3cQh

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
@joryirving
joryirving merged commit 599eca6 into main Sep 2, 2026
12 checks passed
@joryirving
joryirving deleted the feat/groomer-picks-lane-on-merit branch September 2, 2026 22:26
@its-miso its-miso Bot mentioned this pull request Sep 2, 2026

@its-saffron its-saffron Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 when escalationLaneId is 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant