Undercut for Firebase Studio
Undercut is a free, MIT-licensed routing policy you drop into the workspace's .idx/airules.md — the rules file Gemini in Google's cloud-based Firebase Studio reads first — cheap tier first, escalate only on evidence, never on a vibe. Firebase Studio has no built-in per-task cost dial of its own to compare against; this exists because the same overpay-by-default pattern we measured elsewhere in the agent ecosystem (see the Gemini CLI page) shows up anywhere an agent defaults every task to its strongest model.
Google announced Firebase Studio is sunsetting on March 22, 2027, and as of June 22, 2026 new workspace creation and user signup are disabled — existing workspaces keep working, and Google's own guidance is to migrate projects to Google AI Studio or Google Antigravity. This page is useful only if you already have a running Firebase Studio workspace; it's not a reason to start one. Source: Firebase Studio release notes.
How this maps onto Firebase Studio
Firebase Studio inherited its AI-rules mechanism from Project IDX, and per Firebase's own "Configure Gemini within workspaces" docs, Gemini chat in Firebase Studio checks for a rules file in a fixed order: .idx/airules.md first, falling back to GEMINI.md, then .gemini/styleguide.md, then AGENTS.md, then cursorrules if none of those exist. The file is plain Markdown, conventionally organized into a Persona section, coding guidelines, and project context, and Google's own docs describe it plainly: "Gemini uses your rules as system instructions and context, customizing its responses for your use case." There's no separate per-project vs. per-user split documented for this file — it's read at the workspace level.
Firebase Studio has no documented Agent Skills or auto-discovered SKILL.md mechanism of its own — that's a Gemini CLI feature (see the Gemini CLI page), not a Firebase Studio one, and the two products are related but separate. If your workspace already has a GEMINI.md, AGENTS.md, or another file lower in that precedence list, Gemini in Firebase Studio will still use it — but .idx/airules.md wins whenever it exists, so that's the file to write to if you want this policy to actually take effect.
Undercut's tier names — cheap, standard, frontier, apex — stay generic on purpose. Firebase Studio runs on Google's own Gemini models rather than exposing a cross-vendor picker, so models.md gives a rule of thumb rather than a fixed slug: cheap resolves to the smallest/fastest model in the current Gemini lineup that your workspace can select, standard to the default chat model, frontier to the highest-reasoning production model, and apex to a single batched tie-break call on the strongest one available. Nothing here sits between Firebase Studio and its model backend — it's instruction text Gemini reads out of the workspace at chat time, no proxy, no network hop.
Install for Firebase Studio
Run this from your Firebase Studio workspace's terminal, at the repository root. Gemini chat prioritizes this exact path over every other rules file Firebase Studio checks, so this is the one to write to.
If the workspace has no .idx/airules.md yet, the same command creates one. Already have a GEMINI.md or AGENTS.md with project context in it? Leave it — .idx/airules.md is read first regardless, so this is additive, not a replacement.
Not on skills.sh. Firebase Studio isn't one of the listed npx skills add targets as of this writing, and Firebase Studio has no documented Agent Skills / SKILL.md discovery mechanism of its own — only the rules-file precedence confirmed against Firebase's own docs. The command above is the whole install.
testing/README.md and the raw JSON in testing/results/node src/main.js --mockZero lock-in. It's instruction text Gemini reads — delete the block and you're back to status quo.
How it works
The Undercut Rubric · v1This is a named, versioned spec — not internal logic we could quietly change. When the rubric changes (a new flag, a different cap), the version number moves and the changelog says why.
Every unit of work gets scored against six flags, then assigned the cheapest tier that can plausibly handle it. It only moves up a tier when something objective proves it needs to — a failed check, a measured disagreement, an explicit uncertainty flag. It never moves up on a guess, and it never moves back down mid-task.
0 flags → cheap · 1–2 → standard · 3+ or any ownership/judgment call → frontier. Apex only when you can write one sentence stating why the marginal intelligence pays for the cost.
Cheap-to-verify ⇒ cheap-to-generate. If output can be checked mechanically, it starts at the lowest tier regardless of how hard it looks — verification catches failure. Only unverifiable work needs to start high.
The next tier up gets only the failed or uncertain items, plus verification notes. It resolves the residue — it never redoes the batch.
Never de-escalate mid-task. Max one retry per tier. Anything still unresolved goes to a single batched apex tie-break call. One hard file in a 700-file job doesn't drag the other 699 up a tier.
unit of work
|
6-flag rubric
|
+---+----+
| 0 flags|--> cheap
| 1-2 |--> standard
| 3+/own |--> frontier
+---+----+
| fail x2 / disagree / uncertain
v
escalate +1 tier
(residue only)
|
still unresolved?
v
single batched
apex tie-break
Why it holds up
Even when the rubric flags are scored imperfectly, the escalator still routes work to the right tier almost every time — because a wrong flag only ever costs one extra cheap attempt, never a wrong answer or a big bill.
A stock dispatcher model reproduces the rubric flags imperfectly — Haiku hits 90% agreement, Sonnet 93%. The weakest flag (format-strict) is only 60%. None of that matters: under the shipped policy, both dispatchers still route 100% of units to the correct tier. A wrong flag changes the ladder cap, never the base tier — worst case, one extra cheap attempt.
Every rule is a property of the unit of work — verifiable, ambiguous, blast-radius — never a specific model's known weakness. Vendor cards go stale as models change; work properties don't. It's also hard-won — a format-strict rule that worked on Anthropic backfired on Gemini, which is exactly why the rubric no longer encodes per-vendor behavior.
Honest limits
Not a proxy, not a gateway, doesn't auto-flag in production — and on Firebase Studio specifically, it's not a "skill" the workspace discovers on its own: it only takes effect if you've put it in .idx/airules.md (see Install above), and it's not listed on skills.sh as an install target. Firebase Studio's own reliability at scoring the flags hasn't been separately measured the way Claude Code's has (see above); treat that as unverified until tested. It doesn't promise a dollar figure for your workload, and this page is only useful for a workspace you already have — Google stopped issuing new Firebase Studio workspaces on June 22, 2026 ahead of the March 2027 sunset (see the banner above), so there's no path to install this for a fresh signup. Full list of general limits, with the finance/procurement note and the paid-tier disclosure, is on the main page.
Nothing about this page expires. What does keep happening is the token bill, one chat turn at a time, on whatever Gemini is currently doing with mechanical work in your workspace.