斯坦福如何教AI原生工程
做法与步骤
- 课程作业从九个可被AI一键完成的练习,改为向开源项目提交补丁并由维护者评审,迫使学生理解代码意图、影响和协作。
- 使用Geoffrey Litt的explain-diff技能将AI生成的变更转化为可视化讲解并自我测验,以理解diff而非盲目接受。
- Monaco团队评估后保留Devin做代码审查,但自建agent工作空间,因为后台agent需要运行产品、复现故障和测试补丁的环境。
- Mihail的经验法则:购买工具是为了学习,自建工具是为了长期保留和适配自身云环境。
- 构建Hal系统让工程师调查故障并开PR,也让销售解释产品,同一系统服务不同角色输出不同形式的结果。
- 作者提出关键问题:agent只能看到当前代码,如何找到团队半年前拒绝同一变更的原因?这需要权威地图和人类维护者决策。
对实践的启示
对AI应用从业者:不要只让agent写代码,要投资于理解diff、上下文工程和与人类评审者的协作流程;工具选型上区分学习型购买与长期自建;关注代码审查瓶颈和agent运行环境。
原文摘引
You buy to learn, and you build to keep.
You can ask an agent to implement a feature in an afternoon. You still have to find out whether the maintainer wants it, why the code behaves the way it does, and what else your patch might break.
▸ 展开原文全文(55 段,抓取自 Latent Space)
The AI Engineer YouTube channel just crossed one million subscribers. Thank you to everyone who’s watched a talk, sent one to a teammate, or put something they learned into production. For this special, we wanted to sit down with someone who has to answer a question a lot of us are asking at work: what should a software engineer actually learn now?
Mihail Eric has two places to test his answer. He teaches The Modern Software Developer at Stanford and leads AI at Monaco, where his colleagues use coding agents to ship software and investigate outages. I asked him to take us through the syllabus, then tell us which parts survived contact with his own engineering team.
This is also meant as a preview for all of you joining us in San Francisco for AIE Code next week, as required knowledge for all the conversations with the speakers, sponsors and attendees you’re about to have. If you can see this as a LS subscriber and haven’t got a ticket yet, you can use this code for 30% off (no refunds, sorry)
Last year’s homework takes one prompt
The first run of CS146S had nine assignments and a capstone. In one exercise, students ran an AI code reviewer on a repo and evaluated its feedback. By the next run, Mihail figured students could one-shot a lot of those exercises. When he asked a room of Stanford sophomores and juniors how they coded, everyone he surveyed was already using an agent.
So this time, part of the homework is contributing to an open-source project. The person who maintains the repo reviews the student’s patch. I like what that does to the assignment. You can ask an agent to implement a feature in an afternoon. You still have to find out whether the maintainer wants it, why the code behaves the way it does, and what else your patch might break. That conversation is also how a junior engineer gets to learn from a senior one.
There’s an exercise in the episode you can borrow for your next PR. Geoffrey Litt’s explain-diff skill turns a change into a visual walkthrough, then quizzes you about it. Try it on a patch your agent just wrote. Which question do you have to reopen the code to answer? Watch the discussion.
What Monaco buys, and what it builds
At Monaco, the team evaluated code review products and kept using Devin. Agent workspaces went the other way. A background agent needs somewhere to run the product, reproduce a failure and test the patch. The details depend on how Monaco’s cloud is set up, so the team built its own workspaces. Mihail’s rule of thumb: “You buy to learn, and you build to keep.”
One result is Hal. An engineer can ask it to investigate something that broke and open a PR. A salesperson can ask the same system how the product works. In one case the useful answer is a change someone can review. In the other, it’s an explanation you can give a customer. Give both people a wall of debugging output and you’ve only served one of them.
The question I kept coming back to was what happens at the other end of the PR. An agent sees the current code. Where does it look to find out why the team rejected this same change six months ago? That takes us from Basis’s Authority Map to Mihail’s prediction that open-source repos will become agent-run software factories. It’s a good reason to send a student to a maintainer today. Someone still has to decide which change belongs in the project.
If you’re building with coding agents, come join us at AI Engineer CODE. And if you’ve been teaching this stuff yourself, I’d love to hear which assignment you had to rewrite first.
Show notes
- Stanford CS146S — The ten-week syllabus, assignments and open-source partners. You can also switch to the previous year’s course to compare.
- Build a coding agent and look inside Claude Code — Mihail’s walkthroughs of the tool loop and the harness around it.
- Understanding is the new bottleneck — Geoffrey Litt’s approach to learning what changed in an AI-written diff.
- Monaco’s agent-developer workspaces — The team’s reasoning for building a place where agents can run and test the app.
- How to Kill the Code Review and the underlying Faros study — Teams with high AI adoption merged 98% more PRs, while their PR review time was 91% longer.
- Basis’s Authority Map — Where an agent should look for current behavior, earlier decisions and intent.
- Stripe’s Minions — A production example of giving background coding agents an environment and a path to an engineer-reviewed PR.
- Boris Cherny’s Steps of AI Adoption — The five stages we pull up on screen near the end of the episode.
- Mihail on The Thinking Mode — EO Studio’s interview, excerpted at the start of ours.
Timestamps
0:00 · One million AI Engineer subscribers and the CODE Summit
0:51 · Mihail Eric and Stanford CS146S
5:26 · What junior engineers need to learn now
10:02 · Open-source maintainers review the students’ code
15:04 · A tour of the ten-week syllabus
24:04 · The loop, tools and harness inside a coding agent
32:18 · Context engineering for a large codebase
38:15 · Skills that make you understand the diff
46:42 · The Monaco.com dispute and the airplane banner
50:23 · What Monaco does for sales teams
59:21 · Inside Monaco’s engineering team
1:01:40 · “You buy to learn, and you build to keep”
1:05:24 · Making repos agent-ready and closing the on-call loop
1:12:37 · When code review becomes the bottleneck
1:20:37 · Security, dependencies and permissions
1:30:13 · Background agents and Stripe’s Minions
1:34:16 · MCP portals and why infrastructure converges
1:41:22 · Building the software factory
1:45:24 · What work is left for developers?
1:52:16 · From personal adoption to team autonomy
Transcript
Download the complete text below. In the web edition, you can also read the transcript and click any timestamp to jump into the interview.
| | transcript.txt153.06 KB • PLAIN File |
Automated transcript, aligned to the final episode. Timestamps open the corresponding moment on YouTube.
0:00 swyx · Intro — Okay, this is a pretty special episode because we're celebrating 1 million subscribers on the AI Engineer YouTube channel. So go over there and subscribe if you haven't heard about it. The guest is Mihail Eric, who is not only teaching The Modern Software Developer at Stanford, which is going viral right now, for basically covering all the AI-native development best practices, but also he is head of AI in Monaco. So he's not only a teacher, but he's a practitioner.
0:24 And those of you coming to AI Engineer CODE Summit next week, it's going to be the celebration of all the extreme progress that you've seen in coding in the last year. I'm excited about all the themes of fighting slop, of system one models, and of increasing your ambition for major rewrites of basically everything that you've seen in code. There's never been a more exciting time to be an AI engineer. And with one million AI engineers, I think it's just getting started.
0:49 So let's get into the interview.
0:51 Okay, we're in the studio with Mihail Eric, adjunct professor at Stanford and head of AI at Monaco. Welcome. Thank you. I'm glad to be here. You caught our attention because of your course that you are refreshing for the third time, third time?
1:03 Second time. Second time. Yep. The CS146, or 146S, The Modern Software Developer at Stanford.
1:09 Mihail Eric · EO Studio excerpt — This particular generation of junior developers, of junior engineers, the people that are now entering the workforce, will, I think, be the first kind of generation of that new shift.
1:18 And I looked at the syllabus and I was like, this is everything we cover. So every now and then I like to invite people like yourself who like you cover a broad range of topics and then we can sort of go topic by topic and Give people the state of the art on each of these things, which I assume you're doing with all your guests anyway For sure. Tell us the history of the course.
1:36 What made you want to Spring out CS 146? Ye