跳到正文
原文
Google AI:DEV 作者专属(RSS)· 0x School·· 2 小时前精选AI 评分70

0x School 分享用一组 AI 智能体协作编码的实践,并发布 Claude Code 插件 Larceny

How I Code with a Team of AI Agents

AI 导读

作者用一支 AI 智能体团队运营自己的软件店:协调者把需求拆成小票,分给四个编码智能体并行开发,审查者对每个 pull request 做对抗式检查,第三轮介入、第五轮升级给作者。

推荐理由

作者以自己软件店的实测复盘多智能体协作编码,给出小票拆分、对抗式审查等可迁移做法和成本代价。

正文 · 原文

I run my software shop with a team of AI agents. I talk to one of them, a coordinator, and he plans the work, splits it into small tickets, hands them to four coding agents and makes sure a reviewer checks every pull request before it merges. I packaged the setup as a Claude Code plugin called Larceny.

Why I set this up

People code with AI in two main ways today. The first is AI-assisted programming, where your editor sits in the middle, a chat sits on the side, and you accept or reject each change the AI suggests. The second is agentic coding, where you tell an agent what you want and it goes away and builds it.

I used the second way and kept hitting the same problem. Take a login feature. If I gave one agent the whole thing, it went away for a long time and came back with a login page, a large diff and a lot of slop. Then I either spent hours reviewing it or started rewriting it because the UI wasn't what I wanted. The agent wrote the code faster than I could read it, so I became the bottleneck.

I wanted the agents to work the way a good engineering team does, with small tickets, parallel work and code review, and I wanted to hand the coordination to them.

How the team works

Larceny org chart

The team has a coordinator, four coders and a reviewer. There's also an advisor I use to question the coordinator's decisions, and a teacher who explains anything I don't follow. I'm the owner.

When I ask for something, the coordinator turns it into tickets on a project board, works out which ones can run at the same time, and assigns each one to a coder. The coder builds its ticket on its own branch with tests and opens a pull request.

The reviewer is set up to be adversarial. She looks for problems, leaves inline comments and sends the work back until it's right. If a review goes to a third round the coordinator steps in, and at the fifth round it escalates to me. Once the reviewer approves, the work merges and the coordinator reports back.

The default crew is named after characters from Prison Break, a TV series about a man who breaks his brother out of prison. Scofield is the coordinator, and Sucre, Mahone, Whip and Sheba are the coders. The reviewer is Amy from the police sitcom Brooklyn Nine-Nine, the advisor is Yoda and the teacher is Sara. You can rename any of them during setup. I've run a crew from Game of Thrones on another project.

What the setup needs

Larceny setup: Claude Code on your machine with git, gh and a repo, connected to a tracker and Discord

  • Claude Code, which runs the agents on my Claude subscription.
  • A Git repo with at least one commit, and the GitHub CLI, gh, signed in.
  • A tracker. I use GitHub Projects.
  • Optional: Discord, so I can talk to the coordinator from my phone. The README covers the rest, including optional GitHub accounts for each agent.

Pros

Smaller diffs. Each ticket is small, so each pull request is small enough for a person to read in one sitting. I'd argue massive diffs aren't good for agents either, because a reviewer agent catches more in a small change.

A small pull request: one ticket's change, short enough to read in one sitting

Faster delivery. Tickets that don't depend on each other run in parallel.

Traceability. Every change has a ticket, a branch, a pull request and a review thread.

Review before merge. The reviewer checks every pull request, and I only get pulled in when the agents can't agree.

The reviewer agent's inline comments on a pull request before it merges

Time on planning. Agents now do most of the implementation, so the slow part of building software has moved to the work before it. Andrew Ng calls this the product management bottleneck. So I spend my time writing tickets with the coordinator, and other engineers review them before any agent starts. That's where we argue about trade-offs and decide how something should be built. Each ticket then links to its pull request, so reviewing the code means checking it against what we already agreed.

Cons

  • It costs more. A week of my Claude usage now lasts about a day, and I moved up to the Max plan.
  • It's too much for small fixes, so for those I ask the coordinator to do the work himself.
  • It takes work to set up.
  • Agents still skip steps, like moving a card on the board. When that happens, the coordinator updates their skills so the next agent doesn't.
  • You have to be comfortable stepping back from writing code.

Give it a try

Inside Claude Code:

/plugin marketplace add nestedmind/larceny
/plugin install larceny@larceny
/larceny:onboard

The crew built most of Larceny themselves, so the repo's tickets, pull requests and reviews show the workflow in practice.

I'd like to hear from anyone running several agents against one repo. How do you stop review from becoming the bottleneck?

来源:Google AI:DEV 作者专属(RSS) · dev.to