Undercut for Amazon Q Developer

Amazon Q Developer already reads project rules. Give it one that stops overpaying.

Undercut is a free, MIT-licensed routing policy saved as a project rule under Amazon Q Developer's own .amazonq/rules folder — cheap tier first, escalate only on evidence, never on a vibe. Amazon Q Developer 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 Claude Code page) shows up anywhere an agent defaults every task to its strongest model.

Install for Amazon Q Developer See the benchmarks
Not the same product as the old Q CLI

Per AWS's own docs, "the Q CLI has become the Kiro CLI" — so if you're looking for a terminal agent, that's the Kiro page, not this one. What's still called "Amazon Q Developer" today is the IDE chat (VS Code, JetBrains, Visual Studio, Eclipse) and the GitHub/GitLab integrations — both of which read the .amazonq/rules mechanism this page targets. Worth knowing before you install: AWS has also announced it will discontinue the Amazon Q Developer IDE plugins specifically on April 30, 2027, and is steering users toward Kiro for that surface too. Sources: AWS's command-line docs and the end-of-support notice on the Amazon Q Developer overview page.

Works anywhere a rules file can be read
Claude Code Codex Cursor Copilot Amazon Q Developer

How this maps onto Amazon Q Developer

One confirmed mechanism: project rules under .amazonq/rules.

Per Amazon Q Developer's own docs on project rules, you build a library of project-specific guidelines — coding standards, best practices — as plain Markdown files in project-root/.amazonq/rules. Once they exist, Amazon Q "will automatically use them as context whenever a developer chats with Amazon Q within your project, and will make sure to adhere to them when generating answers." You can create a rule file directly on disk, or from inside the IDE chat panel via the Rules button → Create new rule, which writes the same Markdown file for you. Individual rules can also be toggled on or off per chat session from that same Rules menu.

The same folder convention carries over to Amazon Q Developer's GitHub and GitLab integrations: commit a Markdown file to project-root/.amazonq/rules in a third-party-connected repo, and Amazon Q Developer "will automatically use them as context within your project, and will make sure to adhere to them when generating code for feature development." Two surfaces, one path, both documented by AWS itself — that's the confirmed mechanism this page installs to.

Undercut's tier names — cheap, standard, frontier, apex — are generic on purpose. Amazon Q Developer is built on Amazon Bedrock rather than tied to a single named model, so models.md gives the rule of thumb rather than a fixed slug. Nothing about this sits between Amazon Q Developer and its model backend — it's plain Markdown Amazon Q reads into context, no proxy, no network hop, nothing to route around if you remove the file.

Install for Amazon Q Developer

Free. MIT. Nothing installs, nothing proxies your traffic.

Option 1 — write the rule file directly (recommended, confirmed path)

Amazon Q Developer's own docs say a project rule can be "a filename of your choice" — save the policy as a Markdown file anywhere under .amazonq/rules at your project root and it's picked up automatically, no restart required.

$ mkdir -p .amazonq/rules && curl -fsSL https://raw.githubusercontent.com/undercutsh/firstpass/main/skills/firstpass/SKILL.md -o .amazonq/rules/undercut.md

Option 2 — use the Rules button in the IDE chat panel

Prefer not to touch the filesystem? Open the Amazon Q chat panel in your IDE, click RulesCreate new rule, name it, then paste in the policy text below — this writes the identical file to the same folder.

$ curl -fsSL https://raw.githubusercontent.com/undercutsh/firstpass/main/skills/firstpass/SKILL.md

Option 3 — commit it for GitHub or GitLab feature development

Same folder, same file, committed to a repo connected to Amazon Q Developer's GitHub or GitLab integration — per AWS's own third-party docs, it's picked up automatically when Amazon Q generates code for feature development in that repo, no separate configuration needed.

$ mkdir -p .amazonq/rules && curl -fsSL https://raw.githubusercontent.com/undercutsh/firstpass/main/skills/firstpass/SKILL.md -o .amazonq/rules/undercut.md && git add .amazonq/rules/undercut.md && git commit -m "Add Undercut routing rule"

What's unconfirmed or absent: AWS's docs describe project rules only at project-root/.amazonq/rules — we found no documented user-level or global equivalent (no ~/.amazonq/rules), so treat this as project-scoped only until AWS documents otherwise. skills.sh also lists no Amazon Q Developer install target, so the generic npx skills add undercutsh/firstpass referenced on the main site does not apply here — use one of the options above instead.

Validate it yourself

  1. 1Read the published results — testing/README.md and the raw JSON in testing/results/
  2. 2Reproduce for free, no API key, no spend: node src/main.js --mock
  3. 3Open the Amazon Q chat panel on a repo with the rule file in place, check the Rules menu to confirm it's listed and active, then ask it to do a small mechanical task

Zero lock-in. It's a Markdown file Amazon Q Developer reads — delete it or untoggle it in the Rules menu and you're back to status quo.

How it works

The Undercut Rubric · v1

Six flags assign a tier. Three triggers are the only way up.

This 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.

unit of work
6-flag rubric
0 flags
cheap~90% of units land here ✓
1–2
standard
3+/own
frontier
↑ escalate +1 tier only on: fail ×2 · two runs disagree · tagged "uncertain" residue only — never redoes the batch
See the rubric

Step 1 — Base tier, six-flag rubric

Unverifiable — can output be checked mechanically? (tests, schema, diff, grep)
Ambiguous — one right answer, or several defensible ones?
Blast — reversible? touches money, auth, user data, production, deletes?
Cross-cutting — one file/source, or reasoning across many?
Novel — pattern-following, or genuinely new design?
Format-strict — must output match an exact schema?

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.

The override — single biggest lever

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.

Step 2 — Escalate exactly one tier, on evidence only

  • Verification fails twice at the current tier
  • Two cheap-tier runs disagree on ambiguous-flagged work
  • The worker tags an item "uncertain"

Residue-only handoff

The next tier up gets only the failed or uncertain items, plus verification notes. It resolves the residue — it never redoes the batch.

Hysteresis — guardrails

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

Flags steer. Verification and escalation decide.

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.

See the data

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.

Haiku dispatcher
90% flag agreement
100% tier-match
Sonnet dispatcher
93% flag agreement
100% tier-match

The rules are about the work, not the model.

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

What this doesn't do.

Not a proxy, not a gateway, doesn't enforce anything at the network layer, and doesn't auto-flag in production — Amazon Q Developer scores the flags itself (measured robust to getting them wrong, see above). Doesn't promise a dollar figure for your workload — every figure on this page is an observation from our tasks and our graders, not a guarantee about yours; verification is not proof, it's a reproducible data point you can run yourself. It also doesn't cover a CLI — AWS's own docs say the Q CLI is now the Kiro CLI, so if that's what you run, see the Kiro page instead; this one covers the IDE chat and the GitHub/GitLab integrations, and the IDE plugins specifically are on a path to end of support on April 30, 2027 per AWS's own notice. And we found no documented user-level (~/.amazonq/rules) equivalent or a skills.sh install target — treat both as absent rather than untested. Full list of general limits, with the finance/procurement note and the paid-tier disclosure, is on the main page.

Undercut the top tier. Not the quality bar.

Nothing about this page expires. What does keep happening is the token bill, one session at a time, on whatever Amazon Q Developer is currently doing with mechanical work.

View on GitHub