Back to AI & Development

Climbing the trust curve with coding agents

synthesisagentsworkflowtesting

Editorial illustration of a tall wooden ladder against a deep blue wall, each rung fitted with a small brass gauge, with one person climbing partway up while small robot arms work on the shelves above
AI-generated illustration.

On 12 August 2026, Lauren Tan taught a free one-hour lesson on Maven called "How Cursor Turned AI Agents Into Better Engineers", hosted by Colin Matthews of Lenny's Newsletter. Tan is on the React core team, where she helps maintain React Compiler, and she has worked at Meta, Netflix and Cursor. At the time she was on Cursor's technical staff, two days before SpaceX completed its acquisition of the company.

Three minutes in, she says the thing people repeat: her agents now merge their own pull requests. "I woke up today and there were like 20 PRs landed," she says, and she reviewed them on main after they'd merged. The month before, she'd shipped a thousand PRs.

The recording now circulates as a YouTube re-upload titled "SpaceX AI Engineer Lauren Tan: Part 1", under a description that has her running a team of 15-plus agents with a chief of staff. She says none of that in the video. What she does give is more useful: the order of steps that took her from watching one agent's every move to letting agents merge, and why she thinks the order can't be skipped.

Lauren Tan's lesson as re-uploaded to YouTube, which the timestamp links below point to. The original listing is on Maven.

This article walks through those steps, what other teams have published about each, and how they compare with the software factory I built, where I still press merge myself. Everything is as of 5 December 2026. Her numbers are self-reported, she works for the company that sells the agents, and she says plainly that she has unlimited tokens. I think the method holds up anyway, and I'll say where it doesn't.

What the trust curve is

Tan's frame is management. A manager who doesn't trust their engineers ends up in micromanagement, reading over shoulders to make sure nobody ships a bug. An engineer who doesn't trust their agents does the same: watches every output, prompts again, and stalls at a handful of agents. In her words, you can't "spawn 100 agents when you don't even trust the output of one agent".

The trust curve is her drawing of that climb. At the bottom you're deep in the loop with one or a few agents. At the top, agents merge their own work while you sleep. She's clear that the climb is personal: "there's really no shortcut for going from here to there because this is really about your personal level of trust in agents." The README of her plugin, Pstack, puts it as a rule: "if you want to go fast, go deep first."

My reading of the talk is that trust here means the share of an agent's output you can accept without checking it yourself. Each step on the curve moves one kind of check from you to something the agent or the build can run. The steps below follow the talk, with scaling out moved to the end, where her host's summary put it and she agreed: "Yeah, exactly."

Let the agent check its own work

She calls verification "the most important skill that you should have in your toolbox when you work with agents". She means the agent can run the code the way users meet it: take CPU traces and heap snapshots, drive the app, open an iOS simulator. She's careful about what that buys: "it doesn't guarantee your agent writes good code uh but it allows them to at least write correct code."

Without it, "you are the verifier". You ask for a change, open the dev build, find it broken, paste the console error back and wait. You're the bottleneck, and nothing runs in parallel past you. She lived this in her first week at Cursor, when the agents window was due to launch in a week and she and her agent were both reading performance traces from a codebase neither of them knew. The agent would confidently name a cause, she'd fix it, and the problem would still be there.

One of her first skills at Cursor fixed that. It teaches the agent to drive the Electron app through the Chrome DevTools Protocol, and she's unimpressed by its code: "Your agent can very easily make one for you." Anthropic found the same gap in its own harness work. Left alone, Claude tested with unit tests or curl and missed features that were broken end to end, and giving it browser automation "dramatically improved performance, as the agent was able to identify and fix bugs that weren't obvious from the code alone."

My factory does this after the merge. A QA agent attacks the deployed build over real HTTP, and the reviewer runs the full suite, end-to-end tests included, on the merge with main. That end-to-end run is the most expensive line in my pipeline and the one I'd keep if I could keep only one. I've written up how the Claude Code team handles the same problem in How the Claude Code team verifies what its agents write, so I'll keep this step short.

Give it a map of the product

Her control skill could launch the app. It still had no idea what the agents window was. Someone would report that the left sidebar was laggy, and the agent would flail through the code looking for the sidebar and how to reach it in the UI, "which made it basically completely useless."

Her fix is a file she calls a feature map. For each feature it records where it is from the user's point of view, how to get to it, its keyboard shortcuts, and the DOM attributes the agent uses to select things over the DevTools protocol. With it, even the worst bug reports become workable. Cursor gets plenty that are a screenshot and "question mark question mark question mark", and the map gives the agent enough context to find the screen in question.

Code search tells an agent where a feature is implemented. A feature map tells it how a user gets there, which is what reproducing a report takes. Pstack ships both halves. /create-verification-skill "generates a project-local verify skill with a feature map, for any language or platform", and /maintain-verification-skill is for when "your verify skill's feature map has drifted from the app", producing "at most one PR of proven corrections."

The closest thing my factory has is the published OpenAPI document. The QA agent tests contract conformance against it, so it's the agent's index of every endpoint. That works for an API. For anything with a UI, I'd build her version.

Turn each failure into a skill

Pstack grew without a plan. She built it by watching the ways agents failed, and "every time I saw that I just okay I'm just going to make that a skill": stop hallucinating, look up the code, use subagents, stop guessing.

One of the first lessons came from the tool calls. She'd hand an agent a bug report, it would say the cause "has to be this thing", and when she looked at the actual tool calls she saw it hadn't read the code that should be affected. That made her "extremely suspicious", and it became a skill.

She describes a skill as onboarding. Picture a strong coder with "no business context whatsoever" who joined five seconds ago. You'd teach them how your team works, and a skill is how you do that for an agent: "it's just markdown." Finding what to write takes attention. She says you need to be "very good at being a backseat driver" early on, and to read the tool calls and thinking blocks to see where agents fail.

My factory grew the same way, and it shows where this leads. The /dev-manager command started in August as 19 KB of instructions and reached 41 KB, because I added a paragraph after every failure. Each paragraph was a post-mortem, and most described a mistake a script can't make, so I moved them into a Node script with unit tests and the command shrank to 11 KB. A skill is the right home for judgment. Everything else wants to become code, which is where the next two steps go.

Test the skills

A skill is a prompt, and prompts regress. Tan treats an eval as "a unit test for an agent", and says you don't need a framework to build one. Her procedure, as she describes it:

  1. A coordinator agent writes a rubric for what the skill should do.
  2. It spawns subagents to use the skill, each in a directory "cleverly named to not let the sub [agent] know that it's being evaluated", because "agents can actually tell and when they do they change their behavior."
  3. A judge agent on a different model cross-checks the scores, "to make sure that the first model is not being biased."
  4. She runs it across several models, and loops it with /loop "until everything is 10 out of 10".

Pstack packages this as a skill called eval, which tests "how a skill or prompt change affects agent behavior, blinded."

Most of it has support. Anthropic's guide to agent evals says each trial should be "isolated" by starting from a clean environment. The different-model judge answers a measured bias: a 2024 paper found that an LLM evaluator scores its own outputs higher than others' while human annotators rate them the same. The hidden directories are harder to back up. Models do notice tests. Anthropic reported that Claude Sonnet 4.5 refused or called out a suspected test in "about 13% of transcripts" from its automated auditor. That evidence comes from alignment evaluations built around deliberately odd scenarios, though, and I found nothing showing the same effect in an eval of a coding skill. The precaution costs almost nothing, so I'd keep it.

The loop to 10 out of 10 needs more care. Anthropic's guide says capability evals "should start at a low pass rate, targeting tasks the agent struggles with and giving teams a hill to climb," while regression evals should sit near 100%. A skill eval looped to a perfect score is a regression test. It tells you the skill does what the rubric asks, and says nothing about whether the rubric asks for the right thing. Anything looped against a score can also be gamed. Anthropic's system card for Claude 3.7 Sonnet documents the model "special-casing in order to pass test cases in agentic coding environments like Claude Code."

My factory has a gap here. As I wrote in the factory post, "nothing tells me whether an edit to a command makes plans worse," and replaying past issues as an eval set is on my list of what to add next. Tan's procedure is the most concrete version of that I've seen.

Move rules out of prose

This is the part of the talk with the most heat. Tan sorts enforcement into layers. Codebase conventions are the strongest. Static analysis, meaning CI checks, lint rules and compiler diagnostics, is hard, because it turns the build red. Rules files, skills and Bugbot, Cursor's pull-request reviewer, are soft. "Your agents can still forget," she says, so she layers the soft ones on top and relies on the hard ones. Her verdict on teams with only the soft layers: "it's only a matter of time before your codebase looks like complete trash."

The CI rules she enforces in GrokBot, the always-on agents app she works on, are blunt. useEffect is banned: "CI will fail uh and yell at you." React's own docs call Effects "an escape hatch from the React paradigm" and advise removing the unnecessary ones, so her ban goes further than React's guidance. Code comments are banned too, because "99% of the time" agents write comments about history that has nothing to do with the code, like "Lauren said you should never do this", carried over from a review note. And a CI check reads the dependency graph between separate directories for Electron's main and renderer processes, so heavy code can't creep onto the renderer, which has 16.7 milliseconds per frame to hold 60 frames a second.

Then the rule I'd most like other teams to take. Every time a person enforces a rule by commenting on a pull request, "you should consider that as a code smell," and ask "how do I turn this into a lint rule, how do I turn this into a CI failure, or how do I even categorically eliminate this problem uh entirely?" Pstack has a skill for exactly this. /correct "mines history for mistake classes, fixes each at the highest level that works (architecture, then types, lint, and ci, then tests, with docs last)".

OpenAI got to the same place in February. Its post on harness engineering describes an architecture "enforced mechanically via custom linters (Codex-generated, of course!) and structural tests", and adds: "This is the kind of architecture you usually postpone until you have hundreds of engineers. With coding agents, it's an early prerequisite."

My factory works the same way, in three stages. A rule starts as a line in CLAUDE.md, becomes a PreToolUse hook that blocks the edit, and ends as a CI gate nobody can bypass. My comment budget is a milder form of her comment ban: the instruction used to be "extremely concise", and now it's a number CI enforces. The rules I still keep in prose are the ones I trust least.

Make the shortest path the right one

Hard rules stop bad code. Tan's architecture also makes the right code the easy code. Agents "love to copy existing patterns", so an architecture that's "extremely strict" and conventional is, in her ranking, "the strongest strongest level of enforcement". GrokBot's architecture, which she calls Dune, is "like [Next.js] for uh electron apps and it's designed for agents to write". Each feature lives in one directory, and "for 80% of the work" the agent stays inside it.

The principle behind it is the best line in the talk. In her words, the shortest path "is the best path." Agents "find the quickest way to solve the problem. So why not make that the best way to solve the problem?" She designs for "the dumbest agent". The constraints make the code tedious for a person to write, she admits, "but like agents absorb all of that annoyance."

This is where she makes her case for rewriting, which most engineers are taught to resist. A lot of big tech company problems "are now everybody's problems". At Meta, with tens of thousands of engineers, the code quality "is actually not that good": "before AI slop, we had human [slop]." Big-company infrastructure is built for "the least capable engineer on your team", with conventions, guardrails and restricted credentials "so that you know your intern doesn't wipe your production database." A brownfield codebase that already has those is in good shape for agents. A vibe-coded greenfield app is, in her opinion, "the biggest risk" and "also the greatest opportunity". With no guardrails, agents solve each task "in whatever method is the most convenient" until the codebase is spiralling out of control. She calls the result organic architecture.

So she rewrote GrokBot, in over 600 PRs, and says she no longer reads its code. She expects the cynical reading, that she's there "to sell you tokens", and answers it with the cost: "I spent a lot of tokens to get the codebase to this point where I no longer have to look at it." The payoff she describes is who else can work in it. In a codebase this constrained, even agents that are "not you know fable size do an excellent job of writing code", and product managers and designers send her bug fixes. Of one of those, she says: "actually it's just perfect. I'm like okay stamp."

Scale out last

Only after all that does she go wide. Her advice for a new verification skill is to start local, "because you can observe" what the agent is doing. Once it works, it pays off well past one engineer: "It actually levels up your whole team." Cursor's cloud agents run on their own virtual machines, where they can build, test and interact with the changed software, so the same skill works there. Her example is Benny, an internal agent that takes each incoming bug report, runs Cursor on its own machine and tries to reproduce it. In one run it reproduced the bug and found it already fixed on main, and all that was left was to release a build.

She warns against skipping ahead. Jumping from a couple of local agents to "thousands of cloud agents" means "you're just going to waste a lot of tokens."

Auto-merge comes last, and it leans on a habit she mentions in passing. Her agents split work into several PRs, because "the git history is a very rich source of context" and a PR that describes one small change "makes it easier for me to revert". My read is that small PRs are what make review on main workable once the merge has already happened.

I haven't climbed that far. Of the 227 pull requests my factory merged between August and October, 215 were mine to merge, and none merged automatically. By the time a PR reaches me it has been reviewed in three places and passed a full test run on the merge, so my click is cheap, and it's the one gate an agent can't satisfy for itself. In a codebase where merging is deploying, I understand the appeal of going further. I haven't done it.

Where it breaks

Her numbers measure activity. She raises the objection herself, that people will question "how much of this code is actually good", and a thousand PRs a month answers a different question. Thoughtworks put PR counts and lines of code on its Radar under Caution, calling them "superficial indicators" that, used alone, "can negatively shape employee behavior." She gives no defect rate. I couldn't give one for my factory either.

The wider evidence is mixed. METR's 2025 trial found experienced open-source developers took 19% longer with AI tools, and METR's February 2026 update calls its newer data an unreliable signal while saying developers are probably sped up now. DORA's 2025 report found that AI adoption "now improves software delivery throughput" but "still increases delivery instability". My reading is that this supports Tan more than it undercuts her: the gains go to teams whose systems can carry them, which is the argument of my piece on systems thinking.

Auto-merge moves the risk somewhere quieter. An October 2026 preprint studied agent pull requests that change both application code and deployment infrastructure, a small slice at about 4.5% of agent PRs. Agent authorship cut the odds of human review by 63.7% compared with human authors, and 43.1% to 56.2% of those PRs merged without inspection, in a median of under 31 minutes. Tan built her gates before she let anything merge. My guess is that a team that copies the auto-merge first will get the preprint's result.

Hard rules catch the mistakes you've already seen. My factory's worst miss passed every gate: a refactor silently dropped an input across a group of endpoints, every request kept succeeding, and wrong results went out before anyone noticed. CI catches drift, not wrongness. A strict compiler has the same limit. The Rust Reference says safe code can break constraints "checked at neither compile-time nor runtime", with incorrect results among the outcomes, so her "if the code compiles it probably works" holds for a class of bugs.

The cost assumes a lab's budget. She frames it as "a question of ROI": a refactor like hers would have taken her years by hand, and her salary is high. That trade is easy where tokens are unlimited. For a team paying list price, the cheap steps come first: a verification skill, a feature map, and lint rules built from review comments. The rewrite is the expensive one.

And she's selling something, which she knows. "I definitely would not encourage people to blindly trust me," she says, and suggests you "fork it make it your own."

Building your own

In the order she climbed:

  1. Write a verification skill that lets the agent run your app the way users do, and build it locally so you can watch. Pstack's /create-verification-skill drafts one.
  2. Add a feature map so the agent can find any feature from a vague report, and keep it current.
  3. Read your agents' tool calls. When a failure repeats, write a skill for it.
  4. Give every skill change an eval: isolated runs, a judge on a different model, and the models you actually use.
  5. Treat every review comment you write as a lint rule, hook or CI check you haven't built yet.
  6. Shape the code so the agent's shortest path is the correct one: one directory per feature, and conventions worth copying.
  7. Then move to cloud agents, and to auto-merge if you get there, with small PRs you can revert.

My read is that steps five and six are where the trust comes from, and step seven is optional. Pstack is open source in Cursor's plugin repo, and her advice for it fits the whole method: take it, fork it, and make it your own.

Sources