Skip to content

feat(gemini): add gemini model mapping and always-on triage rules - #7

Merged
cristim merged 1 commit into
mainfrom
feat/gemini-model-mapping-v2
Apr 30, 2026
Merged

feat(gemini): add gemini model mapping and always-on triage rules#7
cristim merged 1 commit into
mainfrom
feat/gemini-model-mapping-v2

Conversation

@cristim

@cristim cristim commented Apr 30, 2026

Copy link
Copy Markdown
Member

This PR adds Gemini model mappings to the model tier rubric and implements the always-on per-item triage rule to improve backlog hygiene.

Summary by CodeRabbit

  • Documentation
    • Always-on inline triage: items must be marked triaged when created, updated, or reviewed; apply the rubric immediately on create/update/read, include full labels on creation, use status/needs-info + a clarifying question when needed, and handle type/question with a special flow that marks triaged but leaves the item open.
    • Delegation & tiers: unified tri-model tier groups with explicit cross-provider equivalents and a “go one tier cheaper” guideline; subagents must be spawned via the Agent tool’s model parameter; main-conversation immutability only applies to Agent spawns.

@cristim cristim added enhancement New feature or request triaged Item has been triaged type/docs Documentation impact/internal Team-internal only effort/s Hours severity/low Minor harm urgency/eventually No deadline priority/p3 Polish / idea / may never ship labels Apr 30, 2026
@coderabbitai

coderabbitai Bot commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ec57097c-820f-4470-8631-9bddbdb7f6a0

📥 Commits

Reviewing files that changed from the base of the PR and between 4c486eb and a90c30e.

📒 Files selected for processing (2)
  • CLAUDE.md
  • triage.md

📝 Walkthrough

Walkthrough

Updates CLAUDE.md to add OpenAI and Gemini model-tier mappings, refine subagent delegation to require Agent-tool model selection and narrow immutability scope; updates triage.md to mandate inline per-item triage on create/read/update with a type/question exception.

Changes

Cohort / File(s) Summary
Model-tier mapping & delegation
CLAUDE.md
Adds Anthropic→OpenAI and Anthropic→Gemini explicit mappings (Haiku/Sonnet/Opus ↔ corresponding OpenAI/Gemini tiers), instructs ignoring mappings when running on Anthropic, consolidates tier rubric into tri-model groups, requires spawning subagents via the Agent tool’s model parameter, and limits main-conversation-model immutability to Agent spawns.
Always-on triage workflow
triage.md
Enforces inline triage on issue/PR create, read, or update when triaged is missing: require initial gh ... create --label with full labels, apply labels or set status/needs-info plus a clarifying question on updates, triage on reads when next human checkpoint, and a type/question exception that applies type/question + status/needs-info, posts the clarifying question, marks triaged, and leaves the item open.

Sequence Diagram(s)

(Skipped — documentation and workflow changes; no new multi-component runtime control flow to visualize.)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰 I hopped through docs and stitched each model name,

I told the agents where to go and how to play the game.
I tagged each ticket tidy when it first came in view,
A question gets a nudge, a label, and a cue.
Small hops, neat trails — now order hops anew.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the two main changes: adding Gemini model mapping and implementing always-on triage rules, both reflected in the CLAUDE.md and triage.md modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/gemini-model-mapping-v2

Review rate limit: 0/5 reviews remaining, refill in 48 minutes and 17 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

@cristim

cristim commented Apr 30, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Apr 30, 2026

Copy link
Copy Markdown
Contributor
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🧹 Nitpick comments (1)
CLAUDE.md (1)

300-300: ⚡ Quick win

Prefer an explicit section reference for the type/question exception.

Line 300’s “existing rule below” is harder to maintain than a direct reference to the source rule section in ~/.claude/triage.md (as already done in triage.md itself). Tightening this phrasing will reduce cross-file drift.

Suggested wording
-- **Exception — `type/question` items** still skip the priority rubric per the existing rule below: apply `type/question` + `status/needs-info`, post the clarifying question, mark `triaged`, and leave open.
+- **Exception — `type/question` items** still skip the priority rubric per `~/.claude/triage.md` §"Picking the next thing to work on": apply `type/question` + `status/needs-info`, post the clarifying question, mark `triaged`, and leave open.

Based on learnings: Whenever a gap in CLAUDE.md or linked files (coding-standards.md, conventions.md, infra-ops.md, project-docs.md, multi-agent-comms.md, project-level CLAUDE.md) could be improved, proactively propose the change with description and rationale; wait for approval before editing.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@CLAUDE.md` at line 300, Replace the vague phrase "existing rule below" in
CLAUDE.md (the line describing the Exception — `type/question` items) with an
explicit pointer to the exact section in the triage rules: reference the
`~/.claude/triage.md` section that defines the `type/question` exception
(mentioning `type/question` + `status/needs-info`) instead of "below" so readers
can find the authoritative rule directly; update the sentence to read something
like "see the 'type/question' exception in ~/.claude/triage.md (section:
EXCEPTION: type/question handling)" to remove ambiguity and prevent cross-file
drift.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@CLAUDE.md`:
- Line 223: The text incorrectly refers to "Task tool spawns"; update the
wording to consistently use the Agent tool when describing model
selection—specifically change "Task tool spawns" to "Agent tool spawns" (or
otherwise reference the Agent tool's model parameter) so it aligns with the rule
defined for the Agent tool and its model parameter; ensure the paragraph that
explains matching model tier (Haiku, Sonnet, Opus) explicitly ties those tiers
to the Agent tool's model parameter and includes the guidance "when in doubt, go
one tier cheaper."

---

Nitpick comments:
In `@CLAUDE.md`:
- Line 300: Replace the vague phrase "existing rule below" in CLAUDE.md (the
line describing the Exception — `type/question` items) with an explicit pointer
to the exact section in the triage rules: reference the `~/.claude/triage.md`
section that defines the `type/question` exception (mentioning `type/question` +
`status/needs-info`) instead of "below" so readers can find the authoritative
rule directly; update the sentence to read something like "see the
'type/question' exception in ~/.claude/triage.md (section: EXCEPTION:
type/question handling)" to remove ambiguity and prevent cross-file drift.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e944a7f6-0699-4a0b-be11-4f09f329f02d

📥 Commits

Reviewing files that changed from the base of the PR and between a3f2a22 and 7e4ec9b.

📒 Files selected for processing (2)
  • CLAUDE.md
  • triage.md

Comment thread CLAUDE.md Outdated
@cristim
cristim force-pushed the feat/gemini-model-mapping-v2 branch from 7e4ec9b to 4c486eb Compare April 30, 2026 20:32
@cristim

cristim commented Apr 30, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Apr 30, 2026

Copy link
Copy Markdown
Contributor
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai 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.

🧹 Nitpick comments (1)
CLAUDE.md (1)

216-218: ⚡ Quick win

Inconsistent model identifier format between mapping and usage guidance.

Lines 216-218 use shorthand labels ("OpenAI mini", "OpenAI mid", "OpenAI top") that don't match the specific model identifiers defined in the mapping at lines 19-21 ("gpt-5.4-mini", "gpt-5.4", "gpt-5.5"). Similarly for Gemini, the mapping uses full version numbers.

When an agent reads the tier descriptions to select a model for the Agent tool's model parameter, they need the exact API identifier, not a descriptive shorthand. The mismatch forces cross-referencing back to lines 19-21.

♻️ Proposed fix to use consistent model identifiers
-- **Haiku / OpenAI mini / Gemini 3.1 Flash-Lite** (default for most delegations): file renames, typo fixes, mechanical edits with a clear spec, simple lookups (grep for a symbol, find where X is called), reading a single file to answer a factual question, formatting/style fixes, running a single command (or routine `gh`/`git` operations) and reporting output, implementing a tightly-specified function, writing a new test from a tight spec, code review of a small single-file diff, mechanical API/SDK migration where the mapping is documented, classifying or labelling items against a clear rubric (e.g. backlog triage chunks), summarising a single file or short diff. Cheap, fast, good enough when the answer is mostly mechanical or rubric-driven.
-- **Sonnet / OpenAI mid / Gemini 3.1 Flash**: focused multi-file changes where coordination across files needs judgement, implementing a function whose spec is mostly clear but has 1–2 design choices, code review of a multi-file diff or a diff with non-trivial logic, refactors with a clear target shape, agentic loops where each step requires non-trivial reasoning (not just rubric-driven labelling). Use when there's some judgement involved but not deep design or hypothesis iteration.
-- **Opus / OpenAI top / Gemini 3.1 Pro** (or stay on the current top-level model): architecture decisions, multi-file refactors where the shape is unclear, debugging gnarly bugs that need hypothesis iteration, reading a large unfamiliar codebase from scratch (without `graphify-out/` available) to synthesise a mental model, any work where "understanding" is the hard part rather than the mechanical output.
+- **Haiku / gpt-5.4-mini / Gemini 3.1 Flash-Lite** (default for most delegations): file renames, typo fixes, mechanical edits with a clear spec, simple lookups (grep for a symbol, find where X is called), reading a single file to answer a factual question, formatting/style fixes, running a single command (or routine `gh`/`git` operations) and reporting output, implementing a tightly-specified function, writing a new test from a tight spec, code review of a small single-file diff, mechanical API/SDK migration where the mapping is documented, classifying or labelling items against a clear rubric (e.g. backlog triage chunks), summarising a single file or short diff. Cheap, fast, good enough when the answer is mostly mechanical or rubric-driven.
+- **Sonnet / gpt-5.4 / Gemini 3.1 Flash**: focused multi-file changes where coordination across files needs judgement, implementing a function whose spec is mostly clear but has 1–2 design choices, code review of a multi-file diff or a diff with non-trivial logic, refactors with a clear target shape, agentic loops where each step requires non-trivial reasoning (not just rubric-driven labelling). Use when there's some judgement involved but not deep design or hypothesis iteration.
+- **Opus / gpt-5.5 / Gemini 3.1 Pro** (or stay on the current top-level model): architecture decisions, multi-file refactors where the shape is unclear, debugging gnarly bugs that need hypothesis iteration, reading a large unfamiliar codebase from scratch (without `graphify-out/` available) to synthesise a mental model, any work where "understanding" is the hard part rather than the mechanical output.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@CLAUDE.md` around lines 216 - 218, The tier descriptions use shorthand labels
("OpenAI mini", "OpenAI mid", "OpenAI top", "Gemini 3.1 Flash-Lite") that are
inconsistent with the mapping identifiers, so update the descriptive text to use
the exact API model IDs from the mapping (e.g., "gpt-5.4-mini", "gpt-5.4",
"gpt-5.5" and the full Gemini version strings) wherever the Agent `model`
selection guidance is given; specifically edit the paragraph containing the
three bullets to replace the shorthand names with the corresponding exact
identifiers and keep any human-readable nickname only in parentheses after the
exact ID to avoid ambiguity when agents set the Agent tool's model parameter.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@CLAUDE.md`:
- Around line 216-218: The tier descriptions use shorthand labels ("OpenAI
mini", "OpenAI mid", "OpenAI top", "Gemini 3.1 Flash-Lite") that are
inconsistent with the mapping identifiers, so update the descriptive text to use
the exact API model IDs from the mapping (e.g., "gpt-5.4-mini", "gpt-5.4",
"gpt-5.5" and the full Gemini version strings) wherever the Agent `model`
selection guidance is given; specifically edit the paragraph containing the
three bullets to replace the shorthand names with the corresponding exact
identifiers and keep any human-readable nickname only in parentheses after the
exact ID to avoid ambiguity when agents set the Agent tool's model parameter.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: cdc2a96f-33de-45aa-83c4-79383dc2cb20

📥 Commits

Reviewing files that changed from the base of the PR and between 7e4ec9b and 4c486eb.

📒 Files selected for processing (2)
  • CLAUDE.md
  • triage.md
✅ Files skipped from review due to trivial changes (1)
  • triage.md

@cristim
cristim force-pushed the feat/gemini-model-mapping-v2 branch from 4c486eb to a7ddc10 Compare April 30, 2026 20:41
- Add Gemini 1.5 Flash/Pro/Ultra mapping to model tiers
- Update subagent strategy to reference OpenAI models
- Implement always-on per-item triage rule in CLAUDE.md and triage.md
@cristim
cristim force-pushed the feat/gemini-model-mapping-v2 branch from a7ddc10 to a90c30e Compare April 30, 2026 20:42
@cristim

cristim commented Apr 30, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Apr 30, 2026

Copy link
Copy Markdown
Contributor
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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

Labels

effort/s Hours enhancement New feature or request impact/internal Team-internal only priority/p3 Polish / idea / may never ship severity/low Minor harm triaged Item has been triaged type/docs Documentation urgency/eventually No deadline

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant