Reading time: 7 minutes | Issue #52 | Book a Discovery Call
Happy Tuesday. Mark here.
On November 13, Cursor explained how its October breach started.
An attacker got hold of a key Cursor had issued to Fireworks AI, one of its training and inference vendors. With it, the attacker copied old coding-agent traces and found credentials nobody had scrubbed.
They used them to go further in. On October 29, tampered builds of a Claude Code extension showed up in Cursor's marketplace, according to Cursor's own update and BleepingComputer.
It struck me that no model failed in that chain. The weak links were a vendor's key, a bucket of old traces, unscrubbed credentials and an extension store. All of it is plumbing around the agents.
People have started calling that plumbing a software factory. This week: what it is, and the nine parts that make it up.
Inside the Issue
What a software factory is, and why the agent is the smallest part
The nine parts we build, from gateway to merge
Stripe's model router, OpenAI's 500 agents, Cursor's shared board, Red Hat's context play and a leaky "don't ask again"


The agent comes fifth
The term goes back to 1968, when Bob Bemer, then at General Electric, proposed a software factory. It meant standard tools and cost tracking, with people doing every step.
This year, teams started handing those steps to agents. Now the argument is over one question: does anyone read the code before it ships?
The dark version says no. StrongDM's AI team described a three-engineer factory where, by charter, nobody writes the code and nobody reviews it. Its co-founder and CTO, Justin McCarthy, set a rule of thumb: if you haven't spent $1,000 a day on tokens per engineer, your factory has room for improvement.
The lit version says yes. Addy Osmani, who works on Claude Code at Anthropic, describes many agent loops, each in its own harness, feeding one review gate. People settle the architecture before an agent starts, then review the risky changes: auth, billing and public APIs.
In September, more than 40% of pull requests on GitHub started with an agent's first draft, up from 17% in March, according to GitHub. That's 110 million agent-started PRs in one month, counting only the agents GitHub can detect.
First drafts got cheap. Now PRs wait for review, testing and the merge.
Our read: A software factory is the system around the agents that takes a ticket to a tested, reviewed pull request the same way every time.
I want two things from one: senior-grade quality on every change, and security patches applied faster, more safely and automatically. The second is the hard one, and a month like Cursor's October is why it matters.
Most of the parts are commodity: LiteLLM, Langfuse, Postgres, the Claude Agent SDK. The real work is wiring them together and setting the rules.
We build the lit version on our customers' own infrastructure, because they keep telling us they won't hand a vendor their code and staging environments. Ours has nine parts. The agent that writes code is the fifth.
For an engineering team, these nine parts cover steps 3 to 6 of the seven-step ladder from three weeks ago.
1. One toll gate for every model call.
Every model call goes through an LLM gateway: self-hosted LiteLLM, or Bedrock in the customer's own AWS account.
Every tenant, service and developer gets a virtual key with a spend cap. We add the company's rules to every prompt there. Any call that skips the gateway is a defect.
Our PR review agent at a US healthcare data company costs about $1 to $3 a review, capped at $20 a day.
2. Traces before agents.
We trace every model call in self-hosted Langfuse: tokens, latency and cost per task.
As Cursor found out, traces are the most sensitive thing a factory produces. They hold prompts, diffs and, if nobody redacts them, credentials. Ours stay inside the customer's perimeter.
3. A trigger on the board.
Teams keep their tracker: Jira, Azure DevOps or ClickUp. Move a ticket to "AI: Ready" and the run starts.
4. A spec before any code.
The agent drafts spec.md: requirements, user stories and acceptance criteria. If something is unclear, it asks a person.
Then come plan.md and tasks.md. A person approves the plan before the agent writes any code. GitHub's open-source Spec Kit runs a version of this.
5. A sandbox per ticket, two CI runs at most.
Now the agent writes code. Each ticket gets its own disposable sandbox, so we can run many tickets in parallel.
Code runs every step it can check, and the agent fills in the judgement calls. CI gets two runs at most. The output is a draft PR that a person finishes and merges.
This part isn't in production yet. In our internal tests, every CI failure was saved with the developer's fix, so the next run wouldn't repeat the mistake. That's what I mean by harness engineering.
6. Context the agent asks for.
The agent queries a code graph ("what depends on X?") and a knowledge graph of the customer's rules and ADRs, then pulls only the slice of the repo it needs.
7. Review, with the guarantees in code.
This is the station we run in production. One step calls a model, with read-only tools and a 20-turn cap. We deny Bash, Write, Edit and web access.
We filter the findings in plain, unit-tested code. A finding stays only if it quotes 5 lines or fewer, word for word, from the diff. We drop repeats and past dismissals, put patient data first and post five comments at most.
The agent never blocks a merge, and new installs post nothing until the customer opts in.

8. Evals that gate every prompt change.
The review prompt lives in git. A change ships only if it passes 8 golden PRs with known right answers.
My favorite case is the clean refactor. If a reviewer keeps flagging problems in good code, your engineers learn to ignore it.
9. A person merges, and we measure the chain.
A person approves every PR, and the code ships through the customer's own CI/CD.
We tag every step with the same IDs, from agent session to commit, PR and epic. That lets us price each feature in tokens and effort.
There's a gap. When engineers use their own Claude Code, Cursor or Codex subscriptions, those calls go straight to the vendor. We match that work to commits from metadata, never prompts or code, and label it as an estimate.
We hit one problem. On a long-running engagement, AI helped the team write code faster than QA could test it, and testing became the bottleneck. We told the customer before they asked. QA agents are the next part we're building.
I haven't settled on full autonomy. StrongDM took people out of review, and I respect that call. For a mid-market company, a bad merge reaches paying customers, and someone has to be accountable. An agent can't be. So for now, a person approves every merge and takes responsibility for what ships.

Start with the station that can't hurt you
We set up review first. It's advisory and runs dry. After two weeks, you'll know if it's worth your engineers' time.
1. Give it its own key. Create a LiteLLM virtual key for the reviewer with a daily budget. Ours is $20. Setup guide: LiteLLM's virtual keys docs.
2. Lock it to read-only tools. In the Claude Agent SDK, allow Read, Glob and Grep, block Bash, Write, Edit and web access with disallowedTools, and cap each run at 20 turns.
3. Write the gate in code. Keep a finding only if its snippet, 5 lines or fewer, appears word for word in the diff. Show five at most.
4. Pick 8 golden PRs from your history. Include a clean refactor that should get zero comments and a PR description that tries to instruct the reviewer. A missed or invented finding fails the build.
5. Run it dry for two weeks. Compare its findings with your reviewers'. If it holds up, turn on posting for one repo. If not, you spent at most $280.

01 Stripe is buying a model router. Stripe agreed to buy OpenRouter in August. Bloomberg reported more than $7 billion, unconfirmed, and the deal has reportedly closed. Whoever owns your gateway owns part of your factory. If yours is hosted, reread its data terms.
02 OpenAI runs its own agents like contractors. On November 12, OpenAI described the controls on its 500-plus persistent agents. Each gets a sandbox, its own identity and a credential broker so it can't read secrets. A second model reviews every action, and OpenAI logs every turn. That's parts 1, 2 and 5 of this issue.
03 Cursor put the team's agents on one board. Cursor made Projects multiplayer in beta on November 10. Ask if it reads your PMs' tracker or adds a second one.
04 Red Hat wants to hold your agents' context. At KubeCon this month, Red Hat announced Developer Hub 2.1. It exposes your software catalog, docs and workflows to agents over MCP. If your platform team runs Backstage, look at it for part 6.
05 "Don't ask again" saved the password too. Apiiro found real secrets in 1,122 of 104,185 public copies of .claude/settings.local.json. Claude Code saves commands you approve with "don't ask again" there, passwords included. Check your repos.

What breaks, and which part catches it. Find a failure you've had. Start with the part next to it.

If you want a factory like this on your own infrastructure, book a discovery call. An AI Velocity Pod builds it alongside your team, month to month. If we don't deliver, you don't pay.
Until next Tuesday,
— Mark Ajzenstadt, Founder @ Limestone Digital
