Videos

Engineering conversations

Talks and interviews from BetterEngineer, a nearshore software engineering company. We place senior engineers from Latin America with U.S. teams.

Watch on YouTube

How AI agents build, test, and review code

Josh Arnold, CTO of BetterEngineer, on how his team takes a ticket to a pull request. Agents do the building. Rules in code decide the path, and automated checks send a failure back to be fixed before a person reviews it. An engineer still approves what ships. In the early run he reports, about 40% of tickets passed with no one in the loop.

Tickets with no person in the loop
40%
Quality gates before merge
16
New tickets from one night of observation
15
Read the transcript

Introduction to The Software Factory

Josh asks who in the room is already running something they would call a software factory. He is speaking in the same territory as the talk before his, and says a lot of those findings match what BetterEngineer has seen.

Combining AI automation and human engineering

Engineers still drive the code. His read of common practice is that no more than about 30% of the work is fully automated. The factory and the people should not be two separate systems. Whatever the factory does, the engineers should do the same thing, and an improvement on one side should show up on the other.

Why AI agents need deterministic workflows

Leaving every decision to the model produces mistakes and missed context, and a bigger rule set makes important pieces easier to skip. The factory makes routing decisions in code, then sends the work to a specific agent based on what is changing. The code routes the models.

Human-driven and AI-driven engineering workflows

Both paths start from a spec. A developer uses a skill that turns the work into a formal spec. The factory does the same. The paths split at one step. On the developer side that step is a loop he calls No Mistakes: an agent walks a series of rules and checks. The goal is to catch bugs before a pull request, not after it is up for review. The factory runs the same checks and the same mechanical gates. Improving one path should improve the other.

Automated verification and self-correction loops

A series of checks runs, and any failure sends the work back to the previous step to be fixed, then back through the check. Those checks are enforced in code, not by trusting an agent to say the work is fine. The loop stops after three tries. If it is still failing, it is flagged for a person, and the fix is meant to be baked into the next run.

From production issues to automated software development

The intake point is a Linear ticket. The first use case is Sentry on production: a Sentry issue becomes a Linear issue, the ticket is enriched, the factory tries to reproduce it, and then it starts building a fix. They are keeping the automated work on smaller changes. Developers still take a large feature and build it. The factory is not handed an entire feature and told to start from scratch.

The complete Software Factory workflow

A ticket sits in Linear, then moves through intake, triage, and a plan that becomes an OpenSpec. When a change is more complex, a tool he calls Lavish builds a document of the unclear decisions, and sometimes a set of interface options, so a person can pick and send that choice back. Developers have that through Claude Code. The factory hosts the same step for each ticket that needs it.

Human oversight and autonomous deployment

This is not a box where you drop a request and it ships to production. People still join at some stages. Planning and review are still human. The next step is to find low-risk changes that can go from zero to production, mostly production fixes where the team is confident in the fix and no human review is required.

AI model costs and scalability

Asked about token cost, Josh says it does not register at their current size, so they are not breaking it out. They still use frontier models. If cost became a problem they could move to cheaper models or self-hosting. For now they would rather spend the attention on the workflow. A larger team would have to treat cost differently.

The 16 quality gates for AI-generated code

He walks through 16 gates. One example is duplicated code: a check looks for a copy of code that already exists elsewhere and sends it back so the agent can reuse what is there, or flags it if touching the other code would add risk. The agent can also decide whether a cleanup is safe to do now or should go to a person.

Repository-specific rules and engineering standards

The factory is its own repo and its own product. The rules live in the repo being built. It builds itself and the main company repo, and those repos do not share the same quality checks. When the factory picks up a repo, it loads that repo's agent instructions and the verification rules. The point of the rules is that an AI does not get to choose the path. A person defines how it works, and then the work is handed to an agent inside that structure.

Agentic workflows and automated review loops

The loop is heavy and can take a while. Nobody is supposed to sit and refresh. You put work in, it runs, and it either merges or lands in a queue. It is meant to be hands off. If verification fails, the work goes back. If it passes, it moves to the next gate. The structure says what the agent can and cannot do.

Separating AI coding and review agents

The agent that finds a problem is not allowed to fix it. It sends the finding back, and a different step fixes that specific issue from a clean start, so the model does not get muddled by working the same issue over and over. The reviewer has a small tool set. It cannot get creative and route around the system. Its job is to say the check worked or it did not.

Improving the system beyond prompt engineering

When something breaks, the move is not to keep tuning the prompt. The next time that case appears, it should be guaranteed by a check in code.

Early results and automation metrics

The numbers are a starting point. About 40% of tickets pass with no human involvement. About 21% fail something and go back through the flow once. About 15% go back twice. Each of those cases is a chance to change the flow so it does not happen the same way again. Duties stay strict: one step can do one job.

Industry examples of AI software factories

He points at published write-ups from larger teams. Stripe's custom factory, he says, is on the order of 1,300 pull requests a week. OpenAI published Symphony as a public proof of concept: a detailed spec that an AI then built in about 20 languages, including Rust, Go, and TypeScript. He treats that as a demo of how someone could build their own factory, not as a finished product.

Next steps: automated merging and deployment

The next piece is auto-merge for a low-risk change, straight to production. He also wants to run changes to the reviewers back across earlier runs, to see whether a new reviewer would have done better.

AI agent observability and continuous improvement

They had just turned on a tool called Halo. It watches every run through the factory, including reviewer agents loaded from the other repo, saves that record, and once a week sends it for an analysis of how the prompts could have done better. The pitch he is using it for: fixing one failure by hand tends to overfit that one case and break another. Halo groups a few hundred cases so the change is aimed at a type of problem. One overnight run produced 15 new Linear tickets. Nothing in that loop merges itself yet.

How AI enables small engineering teams to think bigger

On a small team he would previously have turned down a project to build self-improving agents. They stood it up quickly, it ran overnight, and the 15 tickets were waiting in Linear. The idea is that a small team can take on work that used to be reserved for a group with a specialist.

The risks of fully autonomous software deployment

He asks the room how anyone who auto-merges to production with no human keeps a fail-safe, so a bad pattern is caught before it has been shipping for two weeks. He wants that conversation.

A finding from the observation run

He shows one Halo finding: the tool read the instructions, stated what it found, and proposed a change. There were 15 of those from the night before. He expects that volume to start high and then drop as the checks absorb the repeated cases.

Who reviews AI-generated code?

  • Jonathan Ellis, SlopCop
  • 15 minutes
  • YouTube

Jonathan Ellis leads SlopCop, which is building static analysis so an agent can see when a change in one part of a codebase breaks an assumption in another. This talk is how he reviews code that agents write: mutation testing, fuzz testing, and review before a pull request. The figures below are from his own evaluation, not a BetterEngineer study.

Agent review vs. a commercial bot, in his test
5¢ vs. $1
High-impact bugs the reviewers found
18%
Same bugs, with real static analysis
73%
Read the transcript

Programming languages and infrastructure for AI agents

He answers a comment about rewriting everything in Rust. He likes Rust and says he about 80% regrets writing roughly 4 million lines of it, because the language is heavy and you end up fighting the agents and the build infrastructure for more cores. He mentions a blog post on infrastructure for agentic Rust, a build cache he calls Mr. Boxington, and using ZFS to compress cargo target directories. That is not the talk.

Rust vs. Go for agentic software development

He is starting to rewrite things in Go. The compiler is fast, you get about 90% of the performance, and the garbage collector is acceptable for most of the code people are writing in Rust now. He sets Zig aside.

Improving AI-generated code quality and preventing technical debt

The techniques he is about to describe are more than 30 years old. Mutation testing was being written about in the 1970s. They stayed niche because they cost too much compute, or they needed people to sift the results. Agents can write the tests and process the results, so both costs drop. That is how you let agents write code into the millions of lines without the codebase collapsing into debt.

Mutation testing explained

Mutation testing deliberately breaks the code a person or an agent wrote. A simple mutation is to put return 0 or return null at the top of a function and see what fails. If you introduce a break and every test still passes, the tests cannot tell a broken method from a correct one.

Using AI agents to improve test coverage

A person used to read those misses and decide whether the code was wrong or the tests were thin. An agent can do that pass now.

Building an agentic mutation testing framework

Most mutation frameworks were built for the old workflow. He spent about a week with Claude and built his own for Rust. He calls it Quicksilver. It is aimed at agents, and he says it is significantly faster than cargo-mutants or mutagen. It is public and Apache licensed. If you are not writing Rust, he says to point an agent at the repo and ask it to carry the same lessons into Go, TypeScript, Python, or whatever you use.

Integrating mutation testing into CI workflows

It should not be a one-off. Put it in continuous integration, but do not try to mutate every pull request exhaustively. Once a week, look for hot spots and go deeper there. Even with an agent directing it, testing every possible mutation is too expensive, so you prioritize and deepen coverage over time.

Fuzz testing for AI-generated code

The second category is fuzz testing: throw inputs at the code and see what crashes. He sketches four ways to choose those inputs. The easiest is a round trip, where one function's output is supposed to be reversed by another and you can check that the property holds.

Coverage-guided and symbolic fuzz testing

Coverage-guided fuzzing starts from a map of code that never runs, including code the mutation run never reached, and generates inputs that force execution there. The tests come from the fuzzer rather than from a person or an agent writing them by hand. The symbolic version uses data-flow analysis on a code property graph to figure out which inputs would reach a branch you have not hit. Tools exist for these, mostly at the level of a single function.

Library-level testing and correctness verification

You can also fuzz a whole library. In SlopCop's Bifrost repo he sat with an agent and worked out how to fuzz the API surface in a way that was actually useful. His suggested prompt is: how do I build a fuzz harness for this software, or, one level up, how do I build an oracle that tests this library's correctness?

Improving AI testing through expert terminology

Using the expert's word puts the agent in the right part of its training. He is not from the machine-learning side, but when he asks for a correctness harness, "oracle" is the word that gets a better answer, because an oracle is the thing that knows how to verify what you are building. He also likes asking for ideas from the past 30 years of software reliability research that are still unused because they took too much human effort.

AI-powered code review

His last topic is code review. He thinks the room already agrees that doing review by hand, the old way, is a waste of time. Most people have seen review bots such as Greptile: they hook to pull requests and do an okay job.

Integrating code review into agent harnesses

He wanted those reviews inside the harness, so he could act on them without pushing to CI and waiting, sometimes in a fresh session that has lost the context. Mjolnir is a control plane for harnesses. Codex is open source, so he had an agent take Codex's code review prompt, put it in Mjolnir, and compare it with Greptile.

AI code review cost and performance comparison

Give the agent its normal tools and a shell in a loop, and he matched Greptile's review quality at about 5% of the price. Greptile charges $1 a review. Doing it in the harness cost about five cents. On a chart of effort against bugs found, you can turn the effort up, including what he calls a Ralph loop, and spend more looking for bugs. The short version: at any effort level you configure Greptile for, the harness path did better. The repo is public. He thinks the license is Apache, and he does not swear to it.

Using multiple AI models for code review

You can configure more than one reviewer. They catch things the others miss. He likes reviewers from different model families, and he says he has measured a better result, not just suspected one. He tells the room to run the same test on their own code. Another language might differ. An agent can set up that comparison.

Why AI agents struggle to detect high-impact bugs

The less happy chart splits bugs by impact. Low-impact bugs are found readily. Medium-impact bugs less so. High-impact bugs sit near the bottom. Pointing agents, Greptile, and CodeRabbit at his codebase did not surface many high-impact bugs. He does not think that means the bugs are absent, because he fixes high-impact bugs every day. The tools are weak at finding them.

Understanding cross-component dependencies

The usual shape of the miss: a change in one crate breaks an assumption in another, and nothing helps the agent walk from one to the other.

Static analysis for AI-generated code

That gap is what static analysis was built for, another line of work that is more than 30 years old. You read the syntax tree and the graph of function calls and understand the code without running it.

Static analysis and bug detection results

He took bugs he had already fixed and asked whether an agent could have seen them. Given a hypothetical perfect static analysis tool, the agent would have spotted the bug 91% of the time. Given static analysis as it actually exists, 73%. He contrasts that with about 18% without it.

Introducing SlopCop

That gap is what SlopCop is building. He invites people to the beta and to talk with him or Chris after the session.

Why quality assurance is everyone's responsibility in the AI era

His closing point: before agents, technologists spent almost all of their time building and shipping, and QA was another department's problem. Now at least half the time should go to the systems that make the agents' output better instead of worse. That is everyone's problem.

The courage to create

Boris Portman, CEO of BetterEngineer, and Marc Boudria, chief innovation officer, talk with Vicente Fox, former president of Mexico, about innovation, leadership, and talent in Mexico and Latin America.

Foundations he runs with his wife
3
People in the San Miguel program each day
350
Mexicans abroad, in his count
40 million
Read the transcript

Opening

Boris Portman. He introduces himself as CEO and founder of BetterEngineer, and says it is an honor to sit with President Vicente Fox. He first met Fox at a celebrity golf match for a charity. Since then, he says, Fox spends 95% of his time on charity and on helping other people. He also calls Fox the innovation president, and mentions that Fox is studying AI with his grandson this year. He is going to bring in Marc Boudria, the chief innovation officer, and then thanks Fox for being there.

Vicente Fox. The pleasure is his. He apologizes for his English and says he can use a little Spanish if people do not follow. He picks up what Boris said about doing things for others. The shortcut to happiness, he says, is doing for others. That is how you enrich yourself and the people you serve.

Boris Portman. He agrees. Giving first is how help comes back, and it makes you a better person. He introduces Marc.

From Coca-Cola to the presidency

Marc Boudria. He asks whether Fox's approach to innovation changed between running Coca-Cola in Mexico and being president.

Vicente Fox. Innovation is general. Some people push it harder than others. He had been watching a video of farming in China. The methods look unique next to anything he knows in the West, and they are old there. Innovation, he says, has a lot to do with exchanging ideas and learning how other people do a thing. In Mexico, farmers used to seed the soil for wheat or corn and use whatever counted as fertilizer at the time. The fertilizer you buy now is full of technology, and it multiplies the harvest. He loves innovation. The proof, for him, was the campaign, when he moved from private business into politics. He was new to politicians, to political audiences, and across borders. At the end he was only doing what he had learned at Coca-Cola. Bringing that way of working into politics was the innovation.

Speaking so people understand

Vicente Fox. The second thing that made the campaign work was the language. For a hundred years, he says, Mexican politicians spoke in a way ordinary people could not follow. They were trying to impress. He campaigned as a charro, a Mexican cowboy, in boots, a hat, and jeans, and he spoke the plain language of campesinos. For the first time, he says, people understood what it was about. That is why he defeated a party that had held power for 72 years. People innovate in almost everything they do.

Marc Boudria. He agrees. Innovation does not have to be the newest technology. Sometimes it is breaking a tradition and thinking about the thing differently. He asks whether something in Mexican culture makes that easier.

Fixing the car without the manual

Vicente Fox. He thinks it is in the culture. Mexicans, he says, are willing to step outside the rule, the practice, and the manual. In the United States, he says, everything follows what is written. If you want a car fixed in Mexico, they will fix it. They will not wait on a spare part from the company and a page in the manual. They look at the car and solve the problem. Innovation, for him, is solving things in a constructive way. He tells Marc that ideas can be invited in, the way you invite a person into a company or a government. You get innovation by taking it from another source.

Capital Factory and Centro Fox

Vicente Fox. He spent the day before at Capital Factory in Austin. He calls it a cathedral of ideas. Kids and anyone with an idea should get in the door. He sketches a path: someone walks in with a few ideas and walks out with many more, then sits down with the people there and asks what can be done with one idea. If it works, Capital Factory puts money in and tells them to do more and to turn the idea into a company. Successful companies come out of that, he says. He also says the U.S. Army and U.S. intelligence rent a full floor there to catch ideas from many people.

Mexico does not have a Capital Factory, he says. What they have is Centro Fox. It works on leadership and for people who are poor. The library is for people who have not had the chance. Kids from rural communities in Guanajuato and elsewhere in Mexico come in and find, for the first time, that they can do great things. The first thing he tells them is that they were not born to be poor. Poor, he says, is the person who decides to stay that way. They were born to do great things. Centro Fox gives them a first look at entrepreneurship, at what a company is, and at how business works.

He asks Marc whether that counts as creativity and innovation. He came up with the idea and it worked. They have a commitment. He is still trying to define the words, and his answer is that innovation is everything.

Leadership, and Mahatma Gandhi

Marc Boudria. He calls it enablement. Often what people need is to be told they do not have to ask permission. You do not need permission to learn. A lot of the barriers are artificial. As Fox said, you are not born to be poor. People are born able to create.

Vicente Fox. The power he thinks everyone has, all 8 billion people, is leadership. Most people never see it. He tells the kids to go inside and find out who they are. Why were they born poor in San Cristóbal when they could have been born in Seattle, Silicon Valley, or Austin? Then find what they are made of. What they find, he says, is leadership. With the power of a voice, you change things. The example is Mahatma Gandhi. Fox points to the famous picture, Gandhi in a simple cloth, and says the power of the idea and the voice defeated the British Empire. Gandhi had a purpose: liberate India, be independent, be free. Anyone could have had the idea. Gandhi had it, and he acted on it.

Marc Boudria. He mentions the Salt March, taking back the power to make salt yourself instead of paying someone else and being blocked from a thing you can already do.

Vicente Fox. Gandhi was poor. If you live in a neighborhood with nothing, how do you leave? You go after the idea and you carry it out. Gandhi went through India, town by town, and asked people to join. Fox says he is not Mahatma Gandhi. He is Vicente Fox, and he wants to do something similar with the Mexican diaspora.

170 million Mexicans

Vicente Fox. Some people say Mexico is losing 40 million citizens. He says Mexico is gaining 40 million Mexicans abroad. They are exposed to another set of ideas and another way of doing things. Those 40 million, he says, may be a greater strength than the 130 million in Mexico. Put them together and you have 170 million. Some are highly trained. Some are in extreme poverty. Imagine what that group can do together.

He is gathering them under a slogan he explains as having Mexico under his skin. He loves Mexico, and he is willing to do what it needs. With that line he wants everyone to join, in one large list, and then he wants to send tasks. Do this, start now. Do that, start tomorrow. If you can move 170 million people, he says, you get what Gandhi got: you leave fear and you go into making things.

He reaches for a line from President Roosevelt, in his own words. Do not be afraid, except of fear itself. Get rid of the fear and move up. That is the call he wants to make to Mexicans everywhere.

A fast ask, and a joke about AI

Marc Boudria. He likes it. There is a practical kind of innovation in using technology so the ask is quick and easy to act on.

Vicente Fox. He jokes that he knows "this lady, AI," and he is going to call her with the problem. He needs to unite 170 million Mexicans. How? Does he bring enchiladas and tacos, or hot dogs and hamburgers? The one phrase he wants to use is love. Love, he says, is the greatest creation, and by love you can move mountains. He asks them to invite him back when this is moving. It is already moving. There is a YouTube channel, and they are on Facebook and Instagram. He may take this conversation, or ask for a copy, and put it there so he can call people in.

Knowing how to make a thing

Marc Boudria. He thanks Fox. More people need to hear this.

Vicente Fox. They are doing their part by discussing it in the open. You have to talk about it. More people need to understand what it takes.

Marc Boudria. A hundred years ago, if someone needed a table or a chair, they built it. People had the basic knowledge to make what they needed. That has gone. People no longer understand the phone in their pocket. Everyone should understand the basics of how it works. The more you understand, the more the world is something you can shape.

Vicente Fox. That is the message. He wishes them luck and thanks them. Boris thanks him.

Three foundations

Boris Portman. He comes back to giving, and to the next generation, in what he calls the age of the speed of innovation. AI, he says, is yesterday's news. Today is how fast things can move. He is a father and a grandfather, and he is thinking about children who start with less, including children who do not have the health and the bodies that other people take for granted. He asks Fox to talk about the foundations and the work in Mexico and beyond.

Vicente Fox. He and his wife Marta run three nonprofits. They are not using their own money. People assume a former president of Mexico has millions because he stole from the government. That is not their case. He says they ran an honest administration and never took one peso from the Mexican treasury. To build the three nonprofits they had to ask other people for help. They went as far as a 501(c)(3) in the United States. Money raised here goes through that organization and can be brought to Mexico for the three nonprofits, and the donor gets a tax deduction.

One foundation is in San Miguel de Allende, which he calls maybe the most beautiful town in the world, with a nod to how proud his hosts are of Austin. It helps children and older people who lack resources and abilities. Brain injuries. People who cannot use their hands, arms, or legs, who cannot walk, hear, or see. About 350 people take part every day. Visit, he says, and it brings tears. The work is creation and innovation in a practical sense. Help the person who cannot hear to start hearing. Help the child who cannot see.

A second effort ties nonprofits in the region together so the services get more professional. A lot of people want to help and do not know how to do it well. There is a master's program, with a university, for nonprofit administrators and staff: how to raise money, how to administer it, how to serve the people they exist for. The same effort brings nutrition and protein to nonprofits in the state and the region. He gives Vamos México as a name for this work.

The third is a presidential library, the kind every U.S. president has. He says it is the only one outside the United States. It is in León, Guanajuato, at the hacienda where he was born and raised. They used the old milking stable, more than 350 years old. The building mixes old brick with new glass and steel. The hacienda beside it, about 450 years old, is now a hotel and a restaurant, and Centro Fox is across the street. What they do there is the leadership work he already described. A person with a name and a face changes things. Institutions do not, on their own. If you have a purpose, you can change what is around you. He and Marta love these places, and he thanks Boris for the chance to talk about them.

Talent in Mexico, and the migrant story

Boris Portman. He tells his own story briefly. His family came as refugees from the former Soviet Union. They landed with $300, in Section 8 housing, in an unsafe part of a U.S. city. His mother put all $300 into a piano and started teaching the neighborhood children. His father delivered pizza. In Kyiv they had had elite jobs. He is grateful for the opportunity they built, and he sees the same kind of opportunity in talent in Mexico and across Latin America, which is what BetterEngineer has been growing. He asks Fox to speak to the companies they work with in the United States. This is not cheap labor. The talent and the spirit are in Mexico, past what people associate with a place like Capital Factory. Opportunity, innovation, better engineers, AI.

Vicente Fox. In Mexico it stands on three things. You need opportunities. You need someone willing to take them. You need enough basic knowledge, and enough help, to put the opportunity together with the desire to progress. Then you do it. That, he says, is what a migrant is. He loves migrants. By nature they are the clearest example of leadership and of going toward opportunity. People like Boris's family left because they could not see enough opportunity where they were, and they went where the opportunity was. He tells the United States that migration pressure exists because the country is successful. The more the economy works, the more it draws people who want to solve their problems.

Boris comes from a migrant family. Fox comes from a migrant family. Everyone in the United States, he says, except the Indigenous peoples who were already here, comes from a migrant line. Africa, Latin America, Mexico, Europe. A land of migrants blends the best of each group, and that is the miracle of the country.

His own family, in the story he tells, goes back to Ireland about 500 years ago. Ireland was doing well, and then hunger, disease, and unemployment set in. The family left. They went to Strasbourg, on the border of France and Germany, because that was where Europe was moving. Then war, disease, and a lack of work arrived there too. The family got on a boat and came to the United States through Ellis Island. They found the dream, and they still asked where the opportunity was. At that time, he says, Ohio was the most active state. Cincinnati was a point people passed as they went west, toward California, Colorado, and Seattle. Migrants will take a risk to progress, and they can tell where the action is. That is his family's story, and Boris's.

He closes with amigos. Stay in contact. Keep working for a better world. He points people to the Centro Fox website.

Questions these talks answer

How do AI agents fit into a software team?

In the workflow Josh Arnold describes, agents do the building inside rules the team wrote. Code decides which step runs, not the model. Automated checks send a failure back to be fixed before a person reviews it. An engineer still approves what merges. Agents do not replace the team.

How do you review code that AI agents write?

Jonathan Ellis argues that a normal review pass misses many of the bugs that matter. He covers mutation testing, fuzz testing, and static analysis. In his evaluation, review tools found about 18% of the high-impact bugs he already knew about. With static analysis as it exists today, he puts that at 73%. SlopCop is his company. It is building that analysis so an agent can see across separate parts of a codebase. Those figures are his, not a BetterEngineer study.

What does BetterEngineer do?

BetterEngineer is a nearshore software engineering company. We place senior engineers from Latin America with U.S. teams. The talks are from people on our team and people we invite. To talk about engineers for your team, schedule a 30-minute call.