Skip to content

Rodeo Philosophy

rodeo is the react starter i built for myself to work with agents. as agents got better, i started building more and more web apps with them, and i needed a solid foundation to build all of them off of.

and the better agents got, the more i had to change how i worked, mostly because i was tired of waiting forever on an agent and then not trusting what it wrote.

the thing i kept running into is that agents are really good at copying whatever's already in your codebase. the good parts and the bad parts.

rodeo is where all of that ended up. it's the starting place i wanted for any web app.

this isn't a setup guide. it's more about how i think about building with agents, and it's opinionated.

none of it is new honestly. agents just made it matter a lot more.

you'll probably disagree with some of it, and that's fine. it's a starter. rip out whatever doesn't work for you.

Teaching through the codebase

this part comes straight from a post by poteto on x. the idea is you want most of your effort at the top, on the codebase itself. then static analysis. then prose. human review goes last because it's the thing that scales the worst.

  1. Codebase

    One-way imports, theme tokens, server-only files.

  2. Static analysis

    Most errors name the fix.

  3. Prose

    Short guides, read when needed.

  4. Human review

    Whether the feature makes sense.

most of the work happens at the top.

the codebase is on top because an agent learns more from your code than from anything you tell it. ask for a new page and it goes and reads the pages you already have, then writes one just like them.

so rodeo's code is set up to be copied. every folder has one job and imports only go one way. routes use components, components use hooks, hooks use lib, and nothing reaches back up.

without rodeo

  1. routes
  2. components
  3. hooks
  4. lib

anything can import anything.

rodeo

  1. routes
  2. components
  3. hooks
  4. lib

an import that points back up fails lint.

the same four folders, and which way their imports can point.

Letting lint be the strict one

the next layer down is lint, and rodeo's lint is very strict. normally that would be really annoying as an engineer. but agents are able to put up with it and follow best practices.

the part i think is pretty sweet is the linting on the design tokens. if an agent reaches for a color or a size that isn't in the theme, lint fails it, so you don't end up with a bunch of little design papercuts.

rodeo's errors name their fix, most of them anyway. an error that just says no teaches the agent to sneak around it. write bg-gray-100 and the error lists the theme colors to use instead.

agents take the shortest path, every time. left alone, an agent will write a server function that trusts whatever the browser sends. in rodeo that fails lint until the function checks its input with a schema.

a raw color
<div className="bg-gray-100">

"bg-gray-100" uses the raw Tailwind palette. Use one of the theme colors: accent, background, border...

unchecked input
createServerFn().handler(
  ({ data }) => save(data))

This server function reads data without a validator. Add .validator(schema) with a Zod schema before .handler()

two things an agent wrote, and what lint said back. the messages are real, just trimmed.

the usual way around a rule is a disable comment, so those fail lint too. if a rule really is wrong for a file, the exception goes in lint/exceptions.ts with a reason next to it.

Catching mistakes where they happen

an agent is at its best right after it writes something. the file's still open and it remembers what it was going for, so a fix is one more edit. catch the same mistake in a pull request and it's a review comment, another commit, and another CI run.

so rodeo checks all the time. every edit gets formatted, linted and typechecked. the end of a turn checks everything that changed. commits check the staged files, pushes build the app and run every browser test, and CI starts from a clean install and does it all again.

the fast checks mostly look at the file the agent just touched, so they come back quick. the slow stuff, building the whole app and running browser tests, waits until you push, when you're done anyway.

editcommitpull request
without rodeo

caught in the pull request

rodeo

fixed on the edit

the same mistake, and where it gets caught.

it sounds small, but you stop finding the same mistake in every review, because the agent already heard about it the second it wrote it.

Spending tokens on signal

agents read everything you put in front of them. comments, tests, docs. all of it costs context they could be spending on the actual task.

without rodeo
rodeo
  • the actual task
  • reading comments
  • fixing unit tests
  • reading docs
where an agent's tokens go on one change. an illustration, not a benchmark.

and it compounds. every comment is something the next agent reads, and probably copies. every unit test is something the next change might have to go fix. so you never stop paying for it. give it a year and a big chunk of every task is upkeep.

tokens spent on upkeep, per change

day onea year in
  • without rodeo
  • rodeo
it piles up because every change has more comments to read and more tests to fix. also an illustration.

so rodeo drops a few habits that are fine for people and kinda terrible for agents.

Comments

most comments just say the code again in english. the agent can already read the code, so that's tokens for nothing. and agents copy what they see. one comment explaining a workaround and suddenly every other file has one. it spreads like a weed.

if the code needs explaining, explain it in code. a better name, a smaller function, a type. and if none of that works, it's usually a workaround, and the fix is fixing it, not writing about it.

without rodeo
// only authors and admins can edit
if (user.id === post.authorId ||
    user.role === "admin") {
rodeo
if (isAuthor(user, post) ||
    isAdmin(user)) {
a better name does the comment's job, and that's what the next agent copies.

Unit tests

agents love writing tests like "the header says welcome". then you change the header, the test fails even though nothing broke, and the agent burns tokens rewriting a test that never caught anything. a browser test clicks through the app like a person would. it still trips when you reword a heading, mine did this week, but when it fails on a flow, a person would've hit it too.

browser tests are slower, sure. but you need way fewer of them, and they test what people do.

Docs

rodeo has seven short guides. an agent opens one when the task needs it. a hook blocks new docs in most of the repo, because docs go stale and agents trust them anyway.

if something can be a lint rule, it's a lint rule.

You review what matters

i still want to read what the agent wrote and decide whether the feature makes sense. i just don't want to spend that time pointing out the same random colors or missing input checks.

after a week in a rodeo app i hope you trust your agents a little more.

This will change

none of this is set in stone. models keep getting smarter, and some of these guardrails are going to stop pulling their weight.

when a guardrail stops catching real mistakes, i'll take it out. rodeo should fit the models we have now.

the goal is to keep rodeo as small as it can be. it's free, and ideally it saves you some tokens and some review time.

Acknowledgements

huge thanks to poteto. the pyramid comes from their post on x, and so does the idea of killing comments.

thanks to matt pocock too. his skills and his focus on what matters now that agents write the code helped me narrow rodeo down a lot.

rodeo is built on vite+, tanstack start, react, tailwind, shadcn/ui, ui sdk and nitro. thank you all.