00:00 保持雄心,也要验证模型
使用更强模型时,应把心态从“这做不到”转向“试试看”,并主动挑战模型能力;但外观看起来正确的结果仍可能有缺陷,需要理解模型正在做什么并验证输出。一个主聊天线程可以负责调度子代理、持续展示工作进展,并记录重要但不紧急的事项,帮助人保持在任务上下文中,而不是在等待时分心或盲目开启并行任务。
Boundary · 60:06
I was amazed by what I could do with Claude.
Claude能做到的事情让我很惊讶。
Flip your mindset and just flip it to being ambitious.
转变你的思维方式,让自己变得更有雄心。
A lot of times when you say you can't do something, just like be like, what if?
很多时候,当你说自己做不到某件事时,不妨想想:万一呢?
And just go try.
然后就去试试。
Be skeptical also.
也要保持怀疑。
Yeah.
是啊。
Like, just because the model did a thing and it looks good from the outside does not mean it's perfect.
模型做成了一件事,而且从表面看起来不错,并不意味着它完美无缺。
Like, you should always be asking the model to do a thing that you don't think it can do, especially in a new generation.
你应该总是让模型去做一些你觉得它做不到的事,尤其是在新一代模型上。
I think this is from Simon Willison.
我觉得这是 Simon Willison 说的。
It was like, trust but verify, right?
大意是:信任,但要核实,对吧?
So today on AI That Works, we covered, um, how we're shipping the Opus 5.5 era.
今天在《AI That Works》节目中,我们聊了聊我们如何迈入 Opus 5.5 时代。
Era.
时代。
Changes to how smarter models and new workflows, uh, have changed the way me and Vibeov work.
更智能的模型和新工作流带来的变化,呃,改变了我和 Vibeov 的工作方式。
vibov's one is be ambitious.
Vibeov 的观点是:要有雄心。
my take is also be skeptical.
我的看法也是:要保持怀疑。
we both agree here.
我们在这点上都认同。
and the main thing here is like to be more ambitious, you need to have a main chat that can drive sub agents.
关键是,要想更有雄心,你需要一个能调度子代理的主聊天窗口。
and then to be skeptical, you need to actually like, one, you should understand what it's doing.
而要保持怀疑,你首先得真正了解它在做什么。
and so you can have the main chat show you things that are happening as it's going on.
这样你就可以让主聊天窗口在事情进行时,向你展示正在发生的情况。
maybe log like important but not urgent tasks.
也许把重要但不紧急的任务记下来。
but to give you something to do in the downtime so you don't start multitasking because multitasking is what actually like degrades the quality of your work.
但这是为了在空闲时间给你找点事做,这样你就不会开始多任务处理,因为多任务处理才是真正会降低你工作质量的东西。
we go into the orchestrator and sub-agent design that a lot of tools are using, including factory, and talk about why skills, we're not using skill packs as much because reading a tool result is almost as good as injecting a user message at this point with today's frontier models.
我们会聊聊很多工具都在采用的编排器和子代理设计,包括 Factory;还会谈谈为什么我们现在没那么常用技能包了,因为在如今的前沿模型中,读取工具结果几乎和注入一条用户消息一样好。
and then we want to do a design for a little voice agent that we want to build that watches a live recording and then turns it into updated live drawing diagrams.
然后我们想设计一个小型语音代理:它会观察实时录制内容,并将其转化为不断更新的实时绘图示意图。
sort of like what we've been doing by hand on this show forever.
有点像我们在这个节目里一直以来手动做的事。
and then we talked about lucas meyer's l-plan system, where rather than having the model interview you, we go through the design and the alternatives are kind of collapsed and hidden and how to work with a model in a way where you're not constantly just answering questions when most of its default answers are correct and you only need to interfere on certain things.
接着我们聊了 Lucas Meyer 的 L-plan 系统。它不是让模型采访你,而是通过设计过程,把各种备选方案折叠起来并隐藏掉。我们还会聊聊如何与模型合作:当它的大多数默认答案都是正确的,而你只需要在某些地方介入时,就不必一直回答问题。
so really fun.
真的很有意思。
we dug into some how i use this stuff in factory and orchestrator and how you can get started with the new version of rpi, which is just one skill.
我们深入聊了我如何在 Factory 和编排器中使用这些东西,以及如何开始使用 RPI 的新版本——它其实就是一项技能。
and vibhav also shared, i don't have the live thing, but he shared a ton of cool stuff.
Vibhav 也分享了很多很棒的东西;虽然我没有现场展示,但他确实分享了不少。
they're doing a baml on analyzing their test usage and figuring out how to only run certain tests in ci based on what code changed.
他们正在用 BAML 分析测试的使用情况,并弄清楚如何根据代码改动,只在 CI 中运行特定测试。
super exciting episode.
这期节目太令人期待了。
i'm really excited to get into it.
我真的很期待开始聊这些内容。
let's do it.
开始吧。
this is ai that works, where we teach you about ai that works beyond the demo, real stuff.
这里是《AI That Works》,我们会带你了解超越演示、真正能用的 AI。
a lot of systems design.
还有很多系统设计内容。
turns out a lot of ai is just good engineering.
事实证明,很多 AI 其实就是优秀的工程。
and building cool ai experiences is... There's a lot more than just the models.
打造酷炫的 AI 体验……涉及的可远不止模型。
Uh, I'm Dex, I'm a member of technical staff at Factory, and I'm joined by Vybob.
呃,我是 Dex,是 Factory 的技术团队成员,今天和我一起的是 Vybob。
What's up guys?
大家好啊!
I'm Vybob.
我是 Vybob。
I work on a new programming language and uh new uh almost a new software stack over that we build over at Boundary.
我在 Boundary 参与开发一种新的编程语言,以及一种几乎可以说是全新的软件技术栈,我们正在其上进行构建。
It's very exciting.
这非常令人兴奋。
I I think next week's episode we should do a deep dive on your performance stuff that you did.
我、我觉得下周的节目,我们应该深入聊聊你做过的那些表演相关的事。
I think that would fit nicely.
我觉得那样安排挺合适的。
Okay.
好。
We I think that would be a very fun episode.
我、我觉得那会是一集非常有趣的节目。
But today's episode is not about that.
但今天这集不是聊这个的。
Every few weeks, every now and then, Dexter and I get the we get the urge to basically just code for a while and turn this podcast into a live stream of us working.
每隔几周,偶尔我和 Dexter 就会突然想写一会儿代码,基本上把这个播客变成我们工作的直播。
And one of the most useful things that we have done, and I have found extremely useful every single time we trade notes, is just watch how each of us work.
我们做过的最有用的事情之一,而且每次交流心得时我都觉得特别有用,就是看看彼此是怎么工作的。
We call that uh no vibes allowed.
我们把这个叫作“禁止凭感觉”。
The whole point is we pick a problem and we just work through it.
重点就是选一个问题,然后一起把它解决。
Uh so you'll get to see our exact same workflow, exactly how we go do things, and every time, every every few months, the workflow changes.
你会看到我们一模一样的工作流程,确切地了解我们是怎么做事的。而且每次,差不多每隔几个月,工作流程都会变。
Uh, I made a post just yesterday about how my main workflow has fundamentally shifted now.
呃,就在昨天,我发了一篇帖子,讲我的主要工作流程现在发生了根本性的变化。
Uh, here, let me just pull that up really fast.
呃,我来,马上把它调出来。
There we go.
好了。
i made a post just yesterday about how my main workflow is fundamentally shifted to where all i'm really doing most of the time is i literally just dump stuff into a main chat thread and i just have it drive every single task itself.
我昨天刚发了一篇帖子,讲我的主要工作流程发生了根本性的变化:现在大多数时候,我真正做的就是把东西一股脑丢进一个主聊天线程里,然后让它自己处理每一项任务。
and a lot of people do this per topic.
很多人会按主题来这么做。
a lot of people do this in other ways.
很多人也会用其他方式这么做。
for me, it's per chat thread.
对我来说,是按聊天线程来分。
and i just, i actively read every single word in that chat thread.
而且我会认真阅读那个聊天线程里的每一个字。
and sometimes i even peruse the sub-agents, but i am more engaged than ever before and i'm able to do more than ever before.
有时我甚至会浏览一下子代理,但我比以往任何时候都更投入,也能做得比以往更多。
i think today's episode is actually something that dex has been doing with how he uses some of the tools that he's been thinking about and what his engineering workflow looks like.
我觉得今天这一集,其实会聊聊 Dex 最近在做的事:他如何使用自己一直在琢磨的一些工具,以及他的工程工作流程是什么样的。
so we've actually picked together a sample problem and we're going to take that sample problem and then just work through it for the next couple hours.
所以我们一起选了一个示例问题,接下来几个小时就围绕这个问题一步步解决。
you'll see us time in real time and we'll just yap.
你们会实时看到我们,我们就随便聊聊。
if you have questions, just post them in the chat stream.
如果有问题,就发到聊天区里。
we'll try and be as engaged as possible with that.
我们会尽量积极地回应大家。
but really, we're just going to try and solve problems with ai.
不过说到底,我们就是要试着用 AI 解决问题。
This is AI that works.
这就是能真正派上用场的 AI。
Dex, you ready to get started?
Dex,准备好开始了吗?
I'm ready to get started.
我准备好了。
Um, this is gonna be a little bit less of a demo than I wanted it to be, uh, because I'm having a technical difficulty, but I think we should just talk through it and maybe this will be a shorter episode.
嗯,这次的演示会比我原本想的少一些,因为我遇到了技术问题。不过我觉得我们可以边聊边讲,说不定这一集会短一点。
I'll just screen share and show what I've been doing.
我来共享屏幕,给大家看看我最近在做什么。
I think that'll be really interesting.
我觉得这会很有意思。
Okay.
好。
I've been doing something recently where a lot of my work stream has been doing something kind of silly.
最近我一直在做一件事,工作的大部分内容都有点傻乎乎的。
Um, where I basically rewrote our entire compiler.
嗯,基本上就是把我们的整个编译器
from scratch in our programming language.
用我们自己的编程语言从头重写了一遍。
part of that workflow has really been forced me to adapt the latest version of claude.
这个工作流程有一部分确实是逼着我去适应 Claude 的最新版本。
and it really came inspired by, in many ways, jared from bun, who did some incredible things over the last six months.
这在很多方面都受到了 Bun 的 Jared 的启发,他在过去六个月里做了些了不起的事。
he first migrated bun from zig to rust and apparently got better.
他先把 Bun 从 Zig 迁移到了 Rust,据说效果还更好了。
he then did another thing where he was like, i'm going to build aot for bun.
然后他又做了件事,说:我要给 Bun 构建 AOT。
and it works surprisingly well.
而且效果出奇地好。
so, and i think a lot of people are right to be skeptical about these problems.
所以,我觉得很多人对这些问题抱持怀疑是有道理的。
and to be honest, i was as well.
说实话,我也一样。
it's like, how does stability work in that world?
这就像是在问:在那样的世界里,稳定性是怎么运作的?
but i challenged myself more recently.
不过最近我给自己出了个难题。
and i said, how is someone able to do this scale of problem as a solo man job?
我问自己:一个人怎么可能独自完成这种规模的工作?
and i think one of the things that i pushed myself to over the last week and a half where i've been playing around, or i guess like four or five days where i've been playing around with this.
我觉得,过去一个半星期里我一直在摸索——或者说,大概四五天吧——我努力尝试的一件事,
is pushing myself to solve the same scale of problems.
就是逼自己去解决同等规模的问题。
And I want to show kind of the depth that we had to go into to solve some of these problems and how we adapted to them.
我想展示一下,为了解决其中一些问题,我们必须深入到什么程度,以及我们是如何应对的。
Let me see if I can pull up the chat threads all from the very beginning and what the process has been like to do that.
我看看能不能调出从最开始的所有聊天记录,看看整个过程是怎样的。
Because surprisingly, it's been mostly just using the Claude sessions.
说来也挺意外,基本上我只用了 Claude 的会话。
A station is too large to load.
一个站点太大,加载不了。
Keep on loading.
继续加载。
Come on.
快点。
And the main thing that I've found, actually have some like slides and stuff to show as well, but the main thing that I've found is almost anyone can use Opus to solve effectively any kind of problem.
我发现最重要的一点是,几乎任何人都能用 Opus 有效地解决各种问题。我其实还有一些幻灯片之类的东西可以展示,不过最重要的发现就是这个。
And this works with Astra as well.
Astra 也一样适用。
I haven't tried Neon yet.
我还没试过 Neon。
The plan is to go try Neon really quickly as well while I go do this.
我打算一边做这个,一边很快也试试 Neon。
But my basic workflow is the following.
不过我的基本工作流程是这样的。
I basically will start working.
我通常会先开始着手处理。
I'll just basically tell a prompt something, I'll start doing things.
我基本上只要给它一个提示,它就会开始做事。
And once it's done things, it'll basically just spawn infinity sub-agents constantly over time.
一旦它开始做事,随着时间推移,它基本上就会不断生成无限多个子代理。
And I take every single sub-agent while that is going on, I will constantly have it dump design concept, um, wait, let me go to the more recent part of it that I can actually organize and chat through.
在这期间,我会逐个处理每一个子代理,不断让它们输出设计构想,嗯,等等,我找一下比较近的部分,那部分我可以实际整理并展开讨论。
Sorry, I wasn't prepped to show this today.
抱歉,我今天没准备好展示这个。
Right away, but.
马上就来,不过……
What I will do is show some of this.
我会展示其中一些内容。
What I'll basically do is I'll go through the entire source conversation every single time I have a design statement.
基本上,每当我有一个设计想法,我都会从头到尾过一遍整个源对话。
So in this case, I uh I had a design statement.
比如这次,我有一个设计想法。
I'll basically go create a sub-agent or a side chat.
我会创建一个子代理或一个侧边聊天。
I'll start chatting about that specific question one at a time in detail.
然后我会一次针对一个具体问题,详细地展开讨论。
And then I'll bring back a large summary of that to my main agent and then I'll start discussing again.
接着,我会把一份长篇总结带回给主代理,然后继续讨论。
And I will do this while the agent is working on other tasks on the book.
而代理在处理这本书的其他任务时,我也会这样做。
And in this specific case, the specific task that I've been doing is how do I make our compiler and our runtime blazing fast.
在这个具体案例中,我一直在做的任务是:如何让我们的编译器和运行时快如闪电。
and specifically what i've been focusing on is we have a large code base.
具体来说,我一直关注的是,我们有一个庞大的代码库。
our cicd bill is on the order of like $10,000 a month based on how our code base works.
按照我们代码库的运作方式,我们每月的 CI/CD 账单大约是 10,000 美元。
we have like hundreds of thousands of lines of pure rust code and we rely on rust because of level correctness that it provides.
我们的纯 Rust 代码有几十万行,而且我们依赖 Rust,因为它能提供相应级别的正确性保障。
but our dev times are effectively bottlenecked by agentic development.
但我们的开发速度实际上受到了代理式开发的瓶颈限制。
what ends up happening is we ask a need to do a task.
最终的情况是,我们让代理去做一项任务。
it uses a shit ton of storage.
它会消耗大量存储空间。
it uses a shit ton of cpu just for the rust compiler itself.
光是 Rust 编译器本身就会占用大量 CPU。
and now i'm here iterating on problems at effectively one-tenth the rate that i feel like i should be because i'm waiting on like 10, 15-minute builds.
现在我在这里迭代解决问题,速度只有我觉得应有速度的十分之一,因为我得等那些耗时 10 到 15 分钟的构建。
and then ci is slower because ci has a 40-minute build time or 30-minute build time.
而且 CI 更慢,因为 CI 的构建要花 40 分钟,或者 30 分钟。
and i'm sure we could do things to optimize it, but there's very little i can probably do to optimize our cicd time from like 40 minutes down to two.
我相信我们可以想办法优化,但考虑到我们目前的技术栈,我大概很难把 CI/CD 的耗时从 40 分钟降到两分钟。
Fundamentally, just given what our current stack is.
从根本上说,问题就在于我们目前的技术栈。
So I had this stupid idea of why don't I just, what if I just made BAML incredibly fast?
于是我冒出了一个愚蠢的想法:我为什么不……如果我让 BAML 变得快得惊人呢?
And if BAML became really fast, could I write the BAML compiler purely in BAML?
如果 BAML 变得非常快,我能不能完全用 BAML 来编写 BAML 编译器?
And if I did that, then could I make our CI/CD build really, really low?
如果我这么做,能不能让我们的 CI/CD 构建时间变得非常非常短?
and as i went down this road, i just started exploring.
顺着这个思路探索下去时,我就开始着手尝试了。
and a large part of this task you'll see is literally just me writing assembly and reading and writing assembly code behind the scenes.
你会看到,这项任务很大一部分实际上就是我在幕后编写、阅读和修改汇编代码。
and what the model is effectively doing is the model, i've told the model that consider me an oracle for highly optimized assembly code.
模型实际上在做的是——我告诉模型,把我当作高度优化汇编代码方面的专家预言家。
and you can still run experiments, just run through rational thoughts of being through me.
你仍然可以做实验,只要通过我来进行理性推演就行。
so what the model does is for every subtask that it runs, it makes a lot of decisions, it makes a lot of things, but every single time it has major questions or design questions, it just logs them into a specific file that it's keeping track of.
模型的做法是,每当它执行一项子任务时,都会做出很多决定、处理很多事情;但每当遇到重大疑问或设计问题,它就会把问题记到一个专门的文件里,并持续记录。
and it'll propose them to me and i'll specifically just read that file manually myself.
它会把这些问题提给我,而我会亲自手动阅读那个文件。
Secondarily, what I will do is while the model is doing work, I'll just say keep showing me code.
其次,模型在工作时,我会让它不断给我看代码。
Like show me parts of the code about this problem or show me things that are um how to do this.
比如,让我看看关于这个问题的部分代码,或者看看该怎么做之类的内容。
I think I have a message more recently here.
我记得最近这里还有一条消息。
i was just like, what i end up doing is effectively a message like this one.
我最后做的基本上就是发这样一条消息。
nope, this was when i was actually engaged.
不,这条是我当时真的在参与处理的时候发的。
effectively, when subtasks end up happening, i'm just, just start showing me code.
基本上,只要有子任务开始执行,我就会说:‘给我看看代码。’
i don't think i have the exact, i don't think the exact message.
我想我没有那条原话,我不记得准确的消息内容了。
what i end up saying is, as the model task is happening, i just say, hey, you're doing this work while that work is happening in a background agent.
最后我会说,在模型执行任务的同时,我会说:嘿,你在后台代理执行另一项工作时,先做这项工作。
why don't you just show me code that we should just look at that might be suspicious or might be good or might be relevant for design?
你为什么不直接给我看看代码?我们可以看看哪些地方可能有可疑之处、可能写得不错,或者可能与设计有关。
and i just start reading and designing that myself.
然后我就开始自己阅读并设计。
and as soon as that ends up working, what that leads to is i find tons of bugs in the whole stack as i'm going through it.
一旦这套做法奏效,我在检查整个技术栈的过程中就会发现一大堆 bug。
and then boom, i'm able to go ahead and just constantly review various things.
然后,砰的一下,我就能不断地审查各种东西。
like our concurrency design didn't really work in the beginning.
比如,我们一开始的并发设计就不太行。
so i was like, the model had a solution for concurrency, but it wasn't very good.
当时我就想,模型提出了一个并发解决方案,但不怎么好。
like the number of instructions that it took was like 10x what it needs to take.
它需要的指令数量大约是实际所需的 10 倍。
so it was just slow.
所以运行起来很慢。
the way that we're doing default parameters, it wasn't designed correctly.
我们处理默认参数的方式,设计得不对。
so i found this flaw and i just started discussing with it.
所以我发现了这个缺陷,就开始和它讨论。
and eventually i got to a point where it wasn't actually good enough.
最后我发现,它给出的方案其实还不够好。
so i had to make a side task and start discussing just that part of the code base until i got to a good solution.
所以我不得不单独开一个任务,只讨论代码库的那一部分,直到找到好的解决方案。
and then once that actually worked, And the side task work, I actually gave it the entire design that I came up with independently.
等这部分真的做好之后,关于这个独立任务,我把自己独立构思出的完整设计交给了它。
And then I just told it to, was like, here's some thoughts from a subagent, go see if that's correct.
然后我就告诉它,大概是这样:这是某个子代理的一些想法,去看看是否正确。
And then I was able to go ahead and make some progress from their point onwards.
之后我就能从它们做到的那一步继续推进了。
But I think the general philosophy that I found is you use one main task.
不过我觉得,我总结出的一般思路是:用一个主要任务。
it drives a bunch of subtasks and i want to show some of like these small tickets that i make along the way and the types of files that i make.
它会驱动一堆子任务。我想展示一下我一路上创建的这些小工单,以及我会创建哪些类型的文件。
let me share this really fast.
我很快分享一下。
and that's actually ready.
而且这实际上已经准备好了。
if you're ready to go.
如果你准备好了要走。
let me know by the way.
顺便告诉我一声。
i am not ready.
我还没准备好。
you should keep going.
你应该继续。
i am technical difficulties here.
我这边遇到技术问题了。
that's funny.
真有意思。
the way that i make these tasks end up boiling from different ways.
我做这些任务的方式,最后会从各种不同的角度展开。
like this read me is absolute garbage.
比如这个 README,简直一塌糊涂。
like i just i don't know why the model always produces a giant read me, but if i tell it not to and i tell it to delete it, it'll eventually add it again.
我就是不明白为什么模型总会生成一大篇 README,但如果我让它别生成,还让它删掉,它最后还是会把它加回来。
so i just leave it there from now on.
所以从现在起我就把它留在那里了。
Uh, but like for example, the way that I was designing like our memory model, this literally required us to look at the object layout of exactly how things are designed.
呃,比如说,我当时设计我们的内存模型时,确实需要查看对象布局,弄清楚这些东西具体是怎么设计的。
And once I did this... Yeah.
我做完之后……是啊。
Nice.
不错。
I know.
我知道。
I'm back on Obsidian.
我又开始用 Obsidian 了。
And the reason I'm back on Obsidian is I just produce a shit ton of markdown files.
我又用回 Obsidian 的原因是,我会生成一大堆 Markdown 文件。
There's no better... I just didn't want to open Zed for some reason.
没有更好的……我只是不知道为什么,就是不想打开 Zed。
I don't know why.
我也不知道为什么。
Do you use it daily?
你每天都用它吗?
yeah, this is handwritten.
是的,这是手写的。
this is handwritten.
这是手写的。
not handwritten.
不是手写的。
i read.
我读了。
so this is the thing i've been seeing a lot lately is i think the newer models, they really love using tables.
所以,最近我经常看到这种情况:我觉得新款模型特别喜欢用表格。
and i have found myself steering them to not use tables as much.
我发现自己一直在引导它们少用点表格。
really?
真的吗?
i love these tables.
我喜欢这些表格。
so that table is fine, but the next one, it's not all of them.
所以这张表还行,但下一张就不太行了,不是所有表格都这样。
like, it seems okay.
比如说,看起来还不错。
it's just a kind of a weird form factor for reading.
只是这种形式读起来有点奇怪。
like, i feel like these would be... Much.
我觉得这些会……很多。
Oh no, I love this.
哦不,我喜欢这个。
I don't know.
我不知道。
All right.
好吧。
Okay.
好。
For me, I actually love this style because it's super dense.
对我来说,我其实很喜欢这种风格,因为它信息密度很高。
Like all I want to do is like I want to go through and like be like how a string slice is held.
我只想通读一遍,看看字符串切片是怎么存放的。
And I want to literally be like this is how we do it, this is how Go does it, and this is how many bytes Go takes.
我想清楚地看到:我们是怎么做的,Go 是怎么做的,以及 Go 会占用多少字节。
and i want to know the concept because we're mapping to go for a lot of our stuff.
而且我想了解这个概念,因为我们的很多东西都要映射到 Go 上。
and when i go into this, i just start reading this.
我看到这里时,就会直接开始读。
i'm like, literally, how many assembly instructions is this?
我当时就想,这到底有多少条汇编指令?
so i just need to go read this shit and be like, is this good or is this bad?
所以我只需要去读这堆东西,然后判断这是好还是坏?
can i give the model something better that it can go do?
我能不能给模型更好的东西,让它去做?
and that's kind of how i approach this problem at least.
至少我是这样处理这个问题的。
and it's, i have found that this works extremely well for us.
我发现这对我们来说效果非常好。
like in this case, like i was actually able to make our instruction count for doing most things.
就拿这个例子来说,我实际上能够减少我们做大多数事情所需的指令数。
much, like in the case of go, for example, it takes like 151 assembly instructions to do store, to do allocation stores.
减少很多。比如说 Go,执行存储操作,也就是分配内存并存储,需要大约 151 条汇编指令。
it takes us 26.
而我们只需要 26 条。
The prices are uh storing an int costs a little bit more.
代价是,存储一个整数会稍微多花一点。
But like we give this trade-off anytime because most of the time people are allocating memory for like application level code.
但我们随时都愿意接受这种权衡,因为大多数时候,人们分配内存都是为了应用层代码。
Uh, and that's been I think really fascinating.
嗯,我觉得这确实很有意思。
Same with Node.
Node 也是一样。
Uh, and this is where like the performance basically comes from.
嗯,这基本上就是性能提升的来源。
And like once you're able to make something this fast, like literally make it like five times faster, your C, uh, like CI/CD stops being a real problem in the same way.
而且一旦你能把某样东西做得这么快,比如真的快上五倍,你的 C 和 CI/CD 就不会再像以前那样成为真正的问题了。
And then I'm just going through and like going through all sorts of decisions as we go through this.
然后我就会继续梳理各种决策,一路做下去。
But um I have a couple I think more practical things to show.
不过,我觉得还有几件更实际的事情可以展示。
The other thing that has been happening that I think has been really relevant, oh it's not showing Slack.
另外一件一直在发生、我觉得也很相关的事——哦,Slack 没显示出来。
The other thing we've been doing is and I think more people should be doing this is you we run.
我们一直在做的另一件事,而且我觉得更多人也应该这么做,就是我们会进行……
a lot more experiments on the tests.
更多测试实验。
Oh we're removing tests?
哦,我们是在移除测试吗?
Or we're deleting tests now?
还是说我们现在要删测试了?
Yeah so...
是啊,所以……
So exactly.
没错,就是这样。
So we've started to do a lot more experiments on team.
所以我们已经开始在团队里做更多实验了。
I think running experiments is the best way to define how you go make decisions.
我认为,开展实验是决定如何做决策的最佳方式。
So instead of actually doing something like.
所以,不要真的去做那种事,比如……
And instead of actually doing something like randomly go uh randomly just decide if features are good or not, sometimes super ambitious features can start off as mere experiments.
也不要真的去做那种事,比如随便……呃,随便决定某个功能好不好。有时候,雄心勃勃的功能一开始也可以只是实验。
so in this case, like one of the things that we did was that we just like ported pi to baml just to see what ends up happening.
所以在这个案例里,我们做的一件事就是把 Pi 移植到 BAML,看看最后会发生什么。
we wanted to just analyze what is good or bad.
我们只是想分析一下哪些地方好,哪些地方不好。
and we're like just port every file, file by file to every single part of the language.
然后我们就想,把每个文件都移植过来,一个文件一个文件地移植到语言的各个部分。
i'm going to make every single decision on that end.
这方面的每个决定都由我来做。
and instead of actually like, we assume that this code is going to be slop.
而且,我们其实觉得这段代码肯定会很糟糕。
we don't care.
我们不在乎。
it's totally fine.
完全没关系。
And we just want to have a proxy of understanding what's going on.
我们只是想借此大致了解一下发生了什么。
So as we go down this road, we learned a lot of things.
沿着这条路走下去,我们学到了很多东西。
And I think actually.
而且我觉得,实际上……
And like I think the general approach...
而且我觉得,总体思路是……
This entire script had zero tests.
整个脚本一个测试都没有。
Yeah.
是啊。
Nice.
不错。
Hell yeah, Mario.
太棒了,马里奥。
Um, yeah, I mean we learn a lot of things about a lot of code bases when we do these kinds of PHAs.
嗯,是啊,我的意思是,做这类 PHA 时,我们会了解很多代码库的情况。
And then you get all sorts of other behaviors.
然后你还会发现各种各样的其他行为。
Like for example, like how much of the code actually lives in functions versus global variables and like what what do we do?
比如,代码中有多少实际上写在函数里,而不是全局变量里;还有我们该怎么做?
Right?
对吧?
How much of the like how many lines of code are literally just closing bracket only?
比如,代码里有多少行真的就只有一个右花括号?
And this is just interesting to go down this.
顺着这个思路继续探究还挺有意思的。
It's how can you take a giant inscrutable data set and like pull insights out of it, whether it's code or SQL or whatever.
关键是,怎样从庞大而难以理解的数据集中提取洞见,不管它是代码、SQL 还是别的什么。
Exactly.
没错。
Like how many type declarations do you have to make?
比如,你得写多少个类型声明?
And like TypeScript has a lot less.
而且 TypeScript 需要的声明少得多。
And why?
为什么呢?
Well, because we don't have anonymous types.
因为我们没有匿名类型。
TypeScript has anonymous types.
TypeScript 有匿名类型。
So you can get away with a lot less because you don't have to declare everything.
所以需要声明的东西少得多,因为你不必把所有东西都声明一遍。
You can just like declare shapes and start using them.
你可以只声明结构,然后直接开始使用。
But that comes with good and bad trade-offs.
不过这也有利有弊。
So you have to decide what you want out of that.
所以你得决定自己想从中得到什么。
and then we just manually actually literally read the code as well.
然后我们就真的手动把代码逐行读了一遍。
we literally just like take the equivalent code in one and the other and we do a human level of it.
我们实际上就是把两边对应的代码拿来,然后由人来判断。
like which part of this code actually is better or worse?
比如,这段代码的哪一部分实际上更好或更差?
i don't know.
我不知道。
and i don't think i make a super strong stance on what's better or worse.
我也不认为自己对什么更好或更差有特别强烈的立场。
but we do try and read it to see what is going on.
不过,我们确实会试着读代码,看看里面发生了什么。
And see if this makes sense as a end user.
并看看对最终用户来说,这样是否说得通。
And there is still a human and taste element to this along the way.
而在这个过程中,人的判断和品味仍然很重要。
But sometimes we do super ambitious bets.
但有时候,我们会做一些特别大胆的尝试。
Like, for example, what if you could leverage a language to not run every single test along the way?
比如说,如果能利用一种语言,不必每次都运行所有测试,那会怎么样?
So like if you, I think this is actually a live demo.
我想,比如说,这其实是一个现场演示。
So this is a, and this is again, the most incredible thing about agents.
所以,这是……而这又是智能体最不可思议的地方。
Before doing something correctly, you can just half-ass do it.
在把事情做好之前,你可以先马马虎虎地做一下。
so like in this case, i'm going to change what percent, i'm going to change what apply does.
比如在这个例子里,我要改一下百分比,我要改一下 apply 的功能。
and so i divide by 100, i'm going to divide by 10.
我原本是除以 100,现在要改成除以 10。
and it literally tells you, it's like, here's all the tests you have to run now.
它会直接告诉你:“现在需要运行这些测试。”
and it marks all the cards that are dirty.
它还会标出所有受影响的卡片。
so you're tracing the whole ast to find like all the dependencies of that.
所以你要遍历整个 AST,找出它的所有依赖项。
like all the tests that touch that code.
也就是所有涉及这段代码的测试。
and you can see like if this thing doesn't change, like this thing has now changed.
你可以看到,如果这个东西没有变化——现在它已经变了。
so therefore, here's all the things that have to change now.
所以,这些就是现在需要跟着改变的所有内容。
And this is all compile time checks.
这些都是编译时检查。
This is not based on like runtime data that was baked in the past.
这不是基于像过去那样烘焙进去的运行时数据。
Like it's not a coverage report.
它不像覆盖率报告。
It's literally, yeah, okay, cool.
它就是,嗯,好吧,挺酷的。
And if I had a new test, you see that I added this new test.
如果我有一个新测试,你看,我加了这个新测试。
and like this is just a new test that you have to run.
这只是一个需要运行的新测试。
and it's able to tell you that this is a new test.
它能够告诉你这是一个新测试。
so it has to go execute.
所以它必须执行。
so the fact that you can build this kind of bet really quickly and you can like, this is a, i mean, this is pure slop, just to be very clear.
所以,能很快搭建出这种东西,还能……这只是个,我是说,这纯粹是个粗制滥造的东西,先说清楚。
but we can build a fully working demo end to end, see what's good, and then actually go ahead and design this afterwards by throwing away this and just taking all the learnings from this implementation work.
但我们可以从头到尾搭建一个完全可用的演示,看看效果怎么样,然后再着手设计正式版本,把这个扔掉,只吸收这次实现工作中的所有经验。
and what's interesting about the way that this works is, again, this is just a cloud task.
有意思的是,这套东西的工作方式是——再说一遍,这只是一个云端任务。
you build a cloud agent, and this one wasn't done by me.
你搭建一个云端智能体,而这个不是我做的。
it was done by aaron on our team.
是我们团队的 Aaron 做的。
but what we basically do is it just describes how it works.
我们基本上就是把它的工作原理描述出来。
and this is great for anyone else on the team as well.
这对团队里的其他人也很有帮助。
so if someone wants to go understand this, you literally just go ahead, and we can walk through this ourselves really quickly on this podcast without any of you having any background on how baml works.
所以,如果有人想了解它,你只要直接打开就行。我们可以在这个播客里很快过一遍,不需要你们任何人事先了解 BAML 的工作原理。
and be able to answer this question, which is you take the source code, you break it down to a bunch of tokens, then you go ahead and just build a hash of this for all the significant tokens.
然后就能回答这个问题:拿到源代码后,把它拆成一堆词元,再为所有重要词元生成哈希。
so that means we delete comments and stuff.
也就是说,我们会删掉注释之类的东西。
oh.
哦。
this is cool.
这挺酷的。
and then what you do is you start linking them.
然后你要做的就是开始把它们关联起来。
you start basically saying like what functions call what functions, what functions depend on what classes, all the way down for every single test.
基本上,你要开始说明哪些函数调用了哪些函数,哪些函数依赖于哪些类,一直追溯下去,覆盖每一项测试。
and now you build a fingerprint that says this test has a fingerprint of this dependency class.
现在,你可以建立一个指纹,说明这项测试对应着这个依赖类的指纹。
and then you say you edit total.
然后你说,你编辑了总计……
well, then, therefore, all of these things upstream of it must change.
好,那么因此,它上游的所有这些东西都必须改变。
and this becomes super easy to go detect.
这样一来,就特别容易检测出来。
and i think this kind of problem exists for a while.
我觉得这类问题已经存在一段时间了。
like, i think people have tried to go do something like this, vtest or something like this.
我觉得有人试过做类似的东西,比如 VTest 之类的。
But the thing is, the solution over here is only ever going to be as good as whatever you can do.
但问题是,这里的解决方案终究只能达到你所能做到的程度。
whenever the actual runtime is actually dealable.
前提是实际运行时确实可处理。
so for example, like dynamic imports don't work in typescript, and that makes sense because the language doesn't support it.
举个例子,TypeScript 里动态导入行不通,这也合理,因为这门语言并不支持它。
testmon is actually the first thing that inspired this for me.
Testmon 实际上是最初启发我做这件事的东西。
it's really freaking cool.
它真的酷得不得了。
but it doesn't work because of global variables and a bunch of other stuff that python makes really hard because it's a constraint built into the system.
但它行不通,因为有全局变量,还有很多其他问题,而 Python 让这些事情变得特别棘手,因为这是系统本身的限制。
and i think this is one of the most impressive things that i've seen be done with ai more recently.
我觉得这是最近我见过的、用 AI 做出来的最令人印象深刻的东西之一。
it's like two years ago, it would not have been possible to even explore this kind of experimentation.
就在两年前,甚至连探索这类实验都还不可能。
now aaron can literally, on top of his main work, be like, i'm inspired.
现在,Aaron 完全可以在做主业之余说:我有灵感了。
i want to, i have this idea and i want to see something tangible out of it.
我有个想法,想看看能不能做出点看得见的成果。
guide an agent to solve the problem and like really just define the problem extremely well.
引导一个智能体解决问题,并且真正把问题定义得非常清楚。
build a working demo, build an explanation of exactly what's working, and then even push back and be like, okay, actually, these are the things that we want to change.
做出一个能运行的演示,详细说明哪些部分确实可行,然后甚至还能提出异议,说:好吧,实际上这些才是我们想要改动的地方。
so in this case, some of the stuff that we know doesn't work is like, what's it called?
所以在这种情况下,有些我们知道行不通的东西,比如,叫什么来着?
reflection doesn't work as well.
反射也不太行。
so when you do reflection, you kind of end up running all the tests.
所以用反射时,最后基本上就得运行所有测试。
if you use reflection, everything above it is poisoned effectively at all times, and it can never be cached.
如果你用了反射,它上面的所有东西实际上就会一直受到污染,而且永远无法缓存。
if you call a network call, it is poisoned, and nothing above it can be cached.
如果你调用网络请求,它就会受到污染,而它上面的东西也都无法缓存。
And there's all sorts of things like this.
类似这样的情况还有很多。
Certain functions are just marked always dirty effectively.
实际上,有些函数会被标记为始终处于脏状态。
But again, what's cool about this is you can tell exactly why something is running.
不过话说回来,这一点很棒:你可以确切地知道某件事为什么会运行。
So if some test is always running, you can literally know.
所以,如果某个测试总是在运行,你完全可以知道原因。
Go ahead.
请继续。
And but knowing that is super important because it constrains how you design stuff.
而且,知道这一点非常重要,因为它会约束你如何设计东西。
It's like if you set up your incentive so like, hey, if you write code in this way, if the important parts of what you're changing live beneath the network layer or live outside of reflection, suddenly you're eligible for much faster CI and much faster test running, all this kind of stuff.
这就像是,你可以这样设置激励机制:嘿,如果你按这种方式写代码,比如你要改动的关键部分位于网络层之下,或者不涉及反射,那么你突然就能享受快得多的 CI 和测试运行速度,诸如此类。
i saw a parallel of this.
我见过一个类似的例子。
i've talked about this before.
我以前也谈过这个。
it's like i've seen, i talked to one cto who basically put in a like auto merge policy for his whole engineering team.
我认识一位 CTO,他基本上为整个工程团队制定了一套自动合并策略。
it was like 40 or 50 engineers.
团队大概有四五十名工程师。
and basically the rule was if it doesn't touch certain parts of the code base, if it's under a certain size and complexity, then, and it's like, you know, it passes some automated review, then it is eligible to merge without human review.
基本规则是,如果改动不涉及代码库的某些特定部分,规模和复杂度低于一定标准,而且通过了一些自动化审查,那么就可以在未经人工审查的情况下合并。
which means you can ship way faster.
这意味着你能更快地发布。
and i actually pulled a bunch, i don't have the dashboard here, but i pulled a bunch of data.
我其实调取了不少数据,不过我现在手边没有那个仪表盘。
it was like prs that are reviewed by ai and like pass that threshold because we do similar thing at factory.
数据是关于那些经过 AI 审查、并达到该门槛的 PR 的,因为我们在 Factory 也做类似的事。
but it's like takes one and a half hours on average rather than, you know, the average with a human review in the loop on a team of, you know, 50 engineers is like six, it's like median six hours and sometimes like more than a day.
但平均只要一个半小时,而团队中有人工审核介入时,50名工程师的平均耗时大约是六小时,中位数也是六小时,有时甚至要超过一天。
versus one and a half hours.
相比之下,只要一个半小时。
and what happened on this team, the cto that i was talking to, is basically like, not only did we ship more prs, but at the start of, i took the data before we made the rule, and like 20% of the prs matched that criteria.
这支团队发生的情况是,我聊过的那位 CTO 基本上是说,我们不仅提交了更多 PR,而且在一开始、制定规则之前,我看了数据,只有大约 20% 的 PR 符合这个标准。
like they would have been back test eligible for auto merge.
也就是说,它们符合回测后自动合并的条件。
and within like two weeks of that policy being in place, suddenly 80% of the prs matched that criteria.
而这项政策实施大约两周后,突然就有 80% 的 PR 符合这个标准了。
people were making more prs, smaller prs, because you changed the incentives.
人们提交了更多、更小的 PR,因为你改变了激励机制。
yeah, exactly.
对,没错。
it's like you need to make sure that people are aligned with what you're doing.
关键是要确保大家和你正在做的事情目标一致。
i think we're to summarize like the number one things of today.
我想我们来总结一下今天最重要的几点。
i think the number one thing in general is this.
我觉得总体来说,最重要的一点是:
I think more people need to be ambitiously engineering is kind of the general gist of what I would say is like you can do a lot.
我觉得更多人需要积极大胆地做工程;这大概就是我想表达的核心意思:你能做很多事情。
I was amazed by what I could do with Claude and also like Astro models and also the Neon models like I haven't tried the Neon ones but I suspect them even now people are raving about them.
Claude 让我很惊讶,还有 Astro 模型,以及 Neon 模型。我还没试过 Neon 的那些模型,但我猜它们也很厉害,现在已经有很多人在盛赞它们了。
I'll try it.
我会试试。
My plan is to actually try them later today.
我打算今天晚些时候就试试它们。
But like generally it's like flip your mindset and just flip it to being ambitious.
但总的来说,就是要转换你的思维方式,让自己变得更有野心。
A lot of times when you say you can't do something just like be like what if and just go try.
很多时候,当你觉得自己做不到某件事时,就想想“要是能做到呢?”,然后去试试。
And I think you'll be surprised by how much you can go do.
我想你会惊讶于自己能做到这么多。
Uh here I'll send you the link to this one Dexter.
呃,我把这个的链接发给你,Dexter。
Is that the one we're using?
我们用的是那个吗?
Okay.
好。
Let me open it.
我来打开它。
Sorry.
抱歉。
Uh, yes, be ambitious here.
呃,对,要有远大的目标。
I can take the screen share.
我可以接手屏幕共享。
I'm I'm I'm ready to show the thing I was gonna show.
我、我、我准备好展示我本来要展示的东西了。
Okay.
好。
Get me in here.
让我进来。
So, all right.
那么,好吧。
let me finish my point right here.
让我在这里把我的观点说完。
So I said definitely be ambitious.
所以我说,一定要有远大的目标。
Also, I will add on like be skeptical also.
还有,我想补充一点:也要保持怀疑。
Yeah.
对。
Like continually challenge like just because the model did a thing and it looks good from the outside does not mean it's perfect.
要不断地挑战它。不能因为模型做成了一件事,而且表面上看起来不错,就觉得它完美无缺。
Like you should always be asking the model to do a thing that you don't think it can do, especially in a new generation.
你应该总是让模型做一些你认为它做不到的事,尤其是在新一代模型上。
I think this is from Simon Willison.
我想这是 Simon Willison 说的。
It was like constantly like trying to push the boundaries.
就是不断尝试突破边界。
But also like, don't just assume like be very skeptical.
但也别想当然,要保持高度怀疑。
It's like trust but verify, right?
就是要信任,但也要核实,对吧?
Yeah.
对。
And like what I recommend is have your main chat thread have three jobs.
我建议让你的主聊天线程承担三项任务。
Job number one is like drive sub.
第一项工作就像是驱动子代理。
Job number true is.
真正的第一项工作是……
show you uh show you things and I I leave that very uh vague but because it's really leading into what Dex is saying about be skeptical.
给你看看……呃,给你看看一些东西。我把这说得很模糊,因为这其实是为了引出 Dex 所说的那点:要保持怀疑。
Why is this main chat thread showing me things?
为什么这个主聊天线程要给我看东西?
Because while the sub-agents are doing things, this means downtime.
因为子代理在做事的时候,这段时间就是空档。
and once you have downtime over here, that means you're just wasting a shit ton of time.
而你这边一有空档,就意味着你会白白浪费一大堆时间。
and you're going to get distracted.
然后你就会分心。
you're going to go on twitter.
你会去刷 Twitter。
you're going to do other things.
你会去做别的事。
and what that's going to lead to is when this model comes... you're going to start other agents.
结果就是,等这个模型出现……你就会开始启动其他代理。
yeah, you're going to start other agents.
对,你会开始启动其他代理。
you're going to go do things.
你会跑去做别的事。
but what that's going to lead to is your brain is going to leave the context window of what this main chat thread was supposed to do.
但结果就是,你的大脑会脱离这个主聊天线程原本应该完成的任务所处的上下文。
and then now when you come back, you're just going to do the same thing that we all do, which is we're going to get lazy.
然后你回来时,就会像我们所有人一样,开始犯懒。
You're gonna get lazy and you're gonna put next, good enough, good enough, and you'll just make a lot of default decisions.
你会犯懒,然后就会说“下一步”“够好了,够好了”,接着做出一大堆默认选择。
So don't do that.
所以别这么做。
Instead, leverage this downtime to have the model to show you things.
相反,要利用这段空档,让模型给你展示一些东西。
Understand the problem, understand the solution, understand the state of the art.
理解问题,理解解决方案,了解最先进的技术水平。
Yeah, stay, stay in sync with what the model knows, uh, so that when it asks you a long ass question of like, do you want to handle it this way or this way or this way, you actually know what the hell it's talking about.
对,跟上模型掌握的信息,这样它抛给你一个超长的问题,比如“你想用这种方式、那种方式,还是另一种方式来处理?”时,你才真的知道它在说什么。
Yeah.
对。
And this thing was actually stolen.
而且这东西其实是偷来的。
This is not my creative thinking.
这不是我自己的创意。
Jared from Bun actually, in one of his tweets somewhere, he actually talked about it.
Bun 的 Jared 其实在某条推文里提到过这件事。
He's, people, someone was asking like, what does he do?
他……有人问他,比如说,他是做什么的?
And this was.
然后就是这样。
A real unlock for me.
这让我豁然开朗。
He was like, I just randomly scrolled through the code.
他说,我只是随便浏览了一下代码。
and i was like, holy crap, that is so freaking genius.
然后我就想,天啊,这也太他妈有才了。
so like when you ask the model to be ambitious, it's going to be ambitious, but it's going to make a ton of mistakes.
所以,你让模型有野心,它就会有野心,但也会犯一大堆错误。
so while this thing is doing its own thing and making decisions in that downtime, you just start scanning random parts of it and start doing things and be like, and then what you do is along the way, you will discover a lot of log important but not urgent tasks.
所以,当它在空档时间里自己干活、做决定时,你就开始随便扫一眼它的不同部分,动手做些事情,然后你会发现,在解决这个任务的过程中,你会注意到很多重要但不紧急、值得记录下来的任务。
along the way of solving this task, you will come up with a lot of design things about how it can be better.
在解决这个任务的过程中,你会想到很多能让它变得更好的设计方案。
and when you go do that, just pause and have the model like go solve all of those things, but just log them.
这时候就停下来,让模型把这些问题都解决了,不过只要记录下来就行。
it's like, okay.
这就像,好吧。
i'm not going to actually solve these, but i have a solution for this stuff.
我不会真的去解决这些问题,但我有解决办法。
i'm just going to write it down and the model can do this later after we get the whole thing working.
我只要把它们记下来,等整个东西都能正常运行之后,再让模型处理。
and this tracking urgency is basically your task.
而跟踪紧急程度基本上就是你的任务。
like what is urgent versus important?
比如说,什么是紧急的,什么是重要的?
because the model can't, at least today's models are not good at making that decision of important versus urgent.
因为模型做不好这个判断,至少现在的模型还不擅长区分重要和紧急。
Yep.
没错。
And then like you can do so much if you work on this loop.
然后,只要你在这个循环上持续投入,就能做很多事情。
Yep.
是的。
Okay.
好。
Uh, I agree.
嗯,我同意。
I want to like kind of zoom out.
我想稍微退一步,从更宏观的角度看看。
I'm really glad you said be ambitious and do more sub agents.
我很高兴你说要有雄心,多用一些子代理。
Basically, yeah, the the title of this episode is, and I know you probably can't stay for the whole thing, but I'm going to do some live coding today.
基本上,没错,这期节目的标题是——我知道你可能没法全程参与,但今天我要进行一些现场编程。
Uh, how we're shipping in the opus 5.5 era, because some things are different, right?
嗯,聊聊我们在 Opus 5.5 时代如何交付,因为有些事情不一样了,对吧?
like the models go a little bit smarter.
比如模型变得更聪明了一点。
they're a little bit more autonomous.
它们也更加自主了。
one thing that i think has become very popular, you see this in OpenAI, you see this in cursor, you see this in dots, you see this in devin.
我觉得有一件事现在很流行,你能在 OpenAI、Cursor、Dots 和 Devin 看到这种做法。
i'm going to show off how we think about it in factory today.
今天我会展示一下 Factory 是如何看待这件事的。
but basically, this model where you go one layer up.
基本上,这种模式就是往上提升一个层级。
so in the old world, you had like main chat, and then it would drive, you know, end sub agents.
过去的模式是,你有一个主聊天窗口,然后它会调度,嗯,子代理。
and these were basically like read only or like they were they were not in like they were not interactive, right?
而这些子代理基本上是只读的,或者说它们并不具备交互性,对吧?
like in general, you don't in most harnesses, you don't really you're not intended to talk to the sub agents themselves.
一般来说,在大多数工具框架里,你并不会真的直接和子代理对话;设计上也不是让你这么做的。
they're just kind of go off and do the thing.
它们只是自己去把事情做完。
and then it would, you know, the sub agent would come back to the main chat with an answer.
然后,子代理会带着答案回到主聊天窗口。
and then the main chat would talk to you.
接着主聊天窗口再跟你对话。
right.
对吧。
yeah.
对。
and a pattern that i've seen that has become really, really common is actually like to have an orchestrator.
我看到一种已经变得非常、非常常见的模式,其实就是使用一个编排器。
and you can build this on any harness.
而且你可以在任何运行框架上构建这个。
you can do this with tmux and stuff.
你可以用 tmux 之类的工具来做。
but then you have sub agents that are actually like top level chats.
然后你会有一些子代理,它们实际上是顶层聊天会话。
interesting.
有意思。
that's how you do it.
这就是做法。
interactive.
交互式的。
and then these sub-agents still get use of the, you know, like, you know, one shot.
而且这些子代理仍然可以使用那种,你知道的,像一次性调用这样的方式。
i'll call it one shot slash non-interactive sub-agents.
我把它叫作一次性/非交互式子代理。
but like the way i think about this is like in the old world where we would talk about rpi and i'm going to dig into kind of the new rpi as we might call it is, you know, in the old world, it was like research.
不过我对这件事的看法是:在过去,我们会谈到 RPI;接下来我会深入聊聊我们或许可以称作新 RPI 的东西。你知道,在过去,它就像是研究。
and then you had to like then, you know, start a new session and say design and the like output of the research would be some doc.
然后你得……你知道,开启一个新会话,说“设计”,而研究的输出会是一份文档。
Right?
对吧?
Or like, you know, some doc, doc, plural that would go into your design and then the model would chat with you and then you would come out with a design doc.
或者说,你知道,一份文档,或者多份文档,这些会作为设计的输入;然后模型会和你交流,最后你会得到一份设计文档。
and then you would, you know, start another session and call another skill.
然后你会……你知道,再开启另一个会话,调用另一个技能。
so like this would be, you know, slash create research, slash create design.
所以这会是“/create research”、“/create design”这样的命令。
i'm talking about a very like specific opinionated way to do this.
我说的是一种非常具体、观点鲜明的做法。
and then, you know, slash create, i would call it an outline, but it was, you know, outline slash planning of like, hey, what order are we going to do the work?
然后是“/create”,我会把它叫作大纲;不过它其实是大纲/规划,比如说:嘿,我们要按什么顺序开展工作?
and like, how am i going to test it along the way?
还有,我们要怎么一路测试?
Uh, and then eventually you would go build it.
呃,然后最终你就会去构建它。
So the new world is like, so I had actually sketched out a spec for like, okay, how do we build like a JSON object that stitches all these together?
所以新的做法是这样的:我其实已经拟了一份规范,想的是,好吧,我们要怎么构建一个 JSON 对象,把这些都串联起来?
Uh, but the new world is basically we take all of this stuff.
呃,不过新世界基本上就是把这些东西全部拿过来,
and we put it behind an orchestrator.
放到一个编排器后面。
and so the user just says, like, hey, here's all the skills and how they fit together.
这样用户只要说:嘿,这里有所有技能,还有它们如何配合使用。
like, go help me, like, run this pipeline.
比如,帮我运行这条流水线。
and so it's a lot less of, like, learning which skills to run and when do i start a new context window.
这样一来,就不用花那么多精力去学习该运行哪些技能,以及什么时候该开启新的上下文窗口。
the orchestrator kind of understands all of that.
编排器会处理这些事情。
can i ask a different?
我能问个别的问题吗?
okay, go ahead.
好,你说吧。
No, go ahead.
不,你先说。
Ask a question.
问吧。
I there's there's there's like four layers to this, so I will I will keep moving, but uh...
我……这个有四层,所以我会继续讲下去,不过,呃……
How often do you use specific skills now?
你现在多常用特定技能?
I find that any specific skill, I've nuked all my skills.
我发现我已经把所有特定技能都删掉了。
I have no skills, I have nothing integrated and I just I basically just use the raw model to produce.
我没有技能,也没有整合任何东西,我基本上就是直接用原始模型来生成内容。
Um, really good docs along the way effectively.
嗯,过程中产出的文档确实很棒。
yeah, so one of the things here is like, if you look at most skill packs, i'm going to go ahead and like share my whole browser or let's do the whole window at least.
对,这里有一点是,如果你看看大多数技能包,我现在要分享整个浏览器,或者至少分享整个窗口。
one of the things that's interesting here is like, if you go to matt.
这里有件有意思的事,比如你去看看 Matt。
matt pocock.
Matt Pocock。
yeah, he's got some awesome skills.
对,他有一些很棒的技能。
he's got some awesome skills.
他有一些很棒的技能。
i use them.
我用它们。
i love them.
我喜欢它们。
where is the github repo?
GitHub 仓库在哪儿?
oh, my god.
哦,我的天啊。
skills that i need right there.
我正需要这些技能。
okay, great.
好,太棒了。
so there's a bunch of skills in here.
所以这里面有一大堆技能。
and so there's like productivity.
比如说,有提高效率的技能。
so there's like grill me.
比如有个叫“盘问我”的技能。
and this is a skill that is like, you know, ask me questions.
这是一个技能,大概就是,嗯,向我提问。
okay.
好。
i guess i got moved into this one.
我想我被转到这一个了。
but it's like, hey, here's how to ask me questions.
但它的意思就是,嘿,这是向我提问的方法。
and then there's like, you know, writing for agents of like, here's how to do writing.
然后还有像是为智能体写作之类的,比如,这就是写作的方法。
and then there's engineering stuff like, you know, code review.
还有工程方面的内容,比如代码审查。
and there's a skill here.
这里还有一个技能。
i think that this idea of having this like big bundle of like, you know, this skill pack.
我觉得,把这些技能打包成一个大礼包的想法挺不错的。
and like g stack and p stack are also like similar.
而且 G Stack 和 P Stack 也挺类似的。
yeah.
是啊。
make these white.
把这些弄成白色。
it like leans on the user a little bit to decide when to invoke all of these.
它有点依赖用户来决定何时调用这些东西。
and so i'm going to show, i have, i'm prototyping this stuff here.
所以我来展示一下,我正在这里把这些东西做成原型。
so if you want to see my private secret skill, skill pile, it's, it's here.
所以如果你想看看我私人的秘密技能、技能合集,就在这里。
but you made a new github account?
但你新建了一个 GitHub 账号?
Why don't you just use your own GitHub account?
你为什么不直接用自己的 GitHub 账号?
What is wrong with you?
你怎么回事?
Enterprise controls, my.
企业管控,我的……
friend.
朋友。
No, I'm pretty sure GitHub has it illegal to have two GitHub accounts.
不,我很确定 GitHub 规定有两个 GitHub 账号是违法的。
but that's separate.
不过那是另一回事。
Uh, yeah, okay, buddy.
呃,好吧,老兄。
No, I know, 'cause my one of my accounts got flagged once 'cause I had two accounts.
不,我知道,因为我有一个账号曾经被标记过一次,就因为我有两个账号。
Yeah.
对。
Uh, it's fine.
呃,没事。
There's also this is like a early like alpha version of what.
另外,这也算是一个早期的、类似 Alpha 版的东西。
's also at github.
也在 GitHub 上。
com/humanlayers.
com/humanlayers。
I know.
我知道。
I'm just giving you shit.
我只是在损你。
I'm just giving you shit.
我只是在损你。
Bro, I'm trying to get through a lot of content here.
兄弟,我这儿还有很多内容要讲。
We're already 30, 45 minutes in.
我们已经讲了30、45分钟了。
Uh... so in here there is in the human layer skills too.
呃……这里的人类层里也有技能。
i published this a little while ago.
我不久前发布了这个。
i think these from time to time, but there's actually just one skill, which is, you know, here's how to, here's what all the other stuff is.
我时不时会想到这些,不过实际上只有一个技能,就是,嗯,告诉你该怎么做,以及其他所有东西是什么。
and then everything else that used to be skills is just reference files.
然后以前属于技能的其他所有内容,现在都只是参考文件。
and i think the idea is like when skills were first launched, there was a difference between, let's say you're in your context window, right?
我觉得这个想法是这样的:技能刚推出时,假设你处在上下文窗口里,对吧?
there was a big difference between.
当时两者之间有很大区别。
Like, you know, you have your system message and then the user says something.
比如说,你有系统消息,然后用户说了些什么。
Let's get our colors here.
我们来把颜色调出来。
And then the model would like use the skill like the skill tool.
然后模型会使用技能,比如技能工具。
Yep.
没错。
And the skill tool was like a magic thing, the like reference implementation for doing this in a harness was it would read your skill.
技能工具就像一个神奇的东西;在执行框架中实现这种功能的参考方案,就是读取你的 skill。
md.
md 文件。
And it would actually inject it as a user message.
然后它实际上会把文件内容作为一条用户消息注入进去。
plus base directory.
再加上基础目录。
So it would tell it where it was so if it needed to find references and stuff.
这样它就会告诉模型文件所在的位置,以便它需要查找参考资料之类的内容时使用。
And the idea here was like the naive way to do this before skills and like we actually built this, uh, by I built this by accident where you might just say like read instructions.
这里的想法是,在有技能之前,最简单的做法是——我们确实也做过这个;呃,我是无意中做出来的——你可以直接说“读取 instructions”。
md and it would have a tool and it would just read the file.
md 文件,然后它会调用一个工具,直接读取该文件。
아.
啊。
And this would come back as a tool result.
然后它会以工具结果的形式返回。
and the idea was like the models were tuned to follow instructions from user messages.
当时的想法是,模型经过调优,会遵循用户消息中的指令。
so if you had a skill with like, you know, 10 different like little things to do in it, like it was more likely to follow every single instruction more closely if you injected it as a user message versus if it was tool response content, basically.
所以,如果某项技能里有大概 10 个不同的小任务,那么基本上,把它作为用户消息注入进去,比把它作为工具响应内容,模型更有可能严格遵循每一条指令。
yes.
是的。
this was like a little magic.
这就像个小魔法。
it wasn't complicated, but it was a magical thing in the harness.
它并不复杂,但在这个运行框架里确实像个魔法。
and i remember when this came out, i was like.
我记得这东西刚推出时,我就想:
oh, that's awesome.
哦,太棒了。
because that's what i liked about slash commands is like, when you run a slash command, it injects the context of the command as a user message.
因为我喜欢斜杠命令的一点就是,运行斜杠命令时,它会把该命令的上下文作为用户消息注入进去。
and so it would follow all my instructions.
所以它就会遵循我所有的指令。
nowadays, the models are smarter.
如今,模型更聪明了。
and i don't think there's like, unless you're doing like a thousand step process, which if you are, you should rethink your process.
而且我觉得,除非你要做上千步的流程——要真是这样,你就该重新考虑一下流程了——
it's actually fine to just literally like tell it to go read.
否则直接告诉它去读就完全没问题。
like i literally don't even install this skill sometimes.
有时候我甚至都不安装这个技能。
i literally just say clone that repo, read the skill file and do the stuff.
我真的只会说:克隆那个仓库,阅读技能文件,然后照着做。
and like opus 5.5 and soul models can just do it.
而且 Opus 5.5 和 Soul 模型就能做到。
and so there's no more like, so i just give my orchestrator this rpi skill and i tell it like, go do this stuff.
所以也就不需要再……我只要把这个 RPI 技能交给我的编排器,然后告诉它去做这些事。
and then it's got other references too.
它还有其他参考资料。
like i have this thing here for like writing.
比如我这里有个用于写作的东西。
i think the writing of models has gotten, now that they can do more, the actual, i need them to be very, very good communicators and not like give me walls of bullshit.
我觉得现在模型的写作能力变强了,既然它们能做更多事,我实际需要的是它们成为非常非常出色的沟通者,而不是给我一大堆废话。
this is one that kyle actually wrote that i dropped in here.
这是凯尔实际写的一个,我把它放在这里了。
Um, if you come in here, there's a couple other interesting because you ask like, what do i actually put skills in?
嗯,如果你进来看看,还有几个挺有意思的东西,因为你问过,比如说我到底该把什么放进技能里?
What do i actually use for skills?
我实际会用哪些技能?
I use skills for things that the model anytime i'm working with the model and it doesn't do a thing that i like i make a hell it.
我会把技能用在这些事情上:每当我和模型一起工作时,如果它没按我喜欢的方式做某件事,我就会让它……
I make i i make her update a skill and so like.
我会让它更新一个技能,所以,就像……
this is one called shipping.
这是一个叫“发布”的技能。
Yeah, that's so fascinating.
是啊,这太有意思了。
I have a totally different approach for this.
我的做法完全不一样。
Um, so my challenge is like I'm now on a team of 50 people, uh, and I need to get code reviews on my stuff.
嗯,我现在面临的挑战是,我加入了一个有50人的团队,而且我需要别人审查我的代码。
And like I think that actually I like the the code review culture at Factory is is pretty good.
我觉得 Factory 的代码审查文化其实挺不错的。
There's certain parts of the code base that are kind of like, yeah, just skim it and go, just like there was before AI.
代码库里有些部分,大概就是扫一眼就行,跟 AI 出现之前一样。
But there's other parts of the code base that we take a lot of care about, like the core agent loop and the harness and things like that.
但代码库的其他部分我们会格外谨慎,比如核心代理循环、执行框架之类的东西。
We are very, very like careful about where we make changes and where we add scope.
我们对在哪里做改动、在哪里扩大范围都非常非常谨慎。
Um, and so this is my thing of like, okay, when you make a PR, we're actually gonna slice it up.
嗯,所以我的做法是:好,你提交 PR 的时候,我们会把它拆分开。
We wanna make the PRs as small as possible because we wanna optimize to make it easy for our human reviewers.
我们希望 PR 尽可能小,因为要让人工审查者更容易审查。
if i send someone a 4k line pr, it's going to take longer to get it merged, like exponentially longer than if i send them even, you know, 10 200 line prs.
如果我给别人发一个4000行的 PR,它合并起来会花更久,甚至比我发10个200行的 PR 要久得多。
yeah, exactly.
对,没错。
or 10 400 line prs.
或者10个400行的 PR。
and so it's like, okay, when you make a pr, give the person the context of like every single thing that's going into this.
所以就是,好,你提交 PR 的时候,要把其中每一项改动的背景都告诉对方。
and it's like, this is this pr and how it fits in the thing.
也就是说,这是这个 PR,以及它如何融入整个项目。
so that's the kind of thing i put in skills because i'm just like, the model didn't do that.
所以这类东西我会放进技能里,因为我会想,模型没做到这一点。
i got tired of telling it that over and over again.
我已经受够了反复跟它说这件事。
i was like, people see this and they don't know what the fuck it's about.
我当时想,人们看到这个根本不知道它他妈是干什么的。
you know what's like use linear and track the slices as sub issues.
你知道吗,就像用 Linear,把这些切片作为子问题来跟踪。
and then there's like polish passes that need to happen, things like this.
然后还有一些需要润色的地方,诸如此类。
so like, but again, all of this, none of these are their own skills.
所以,不过话说回来,这些东西没有哪一个是独立的技能。
it's literally one skill with every single thing that i'm, anytime i tell an agent something three times, i just have a side chat where i'm like, okay, update and push the skills so that we don't, this doesn't happen again.
这其实就是一个技能,里面涵盖了所有这些事情。每当我不得不把同一件事告诉某个代理三次,我就会开个单独的聊天,跟它说:好,更新并推送这些技能,这样我们就不会再遇到这种情况了。
you know, it's interesting.
你知道吗,这挺有意思的。
we have actually, in some ways, like i do some of the stuff, but i have a slightly different approach.
其实在某些方面,我也会做一些类似的事,但我的做法稍微有点不同。
and i think it's fascinating.
我觉得这很有意思。
it feels like what you do is when you encounter the model, you actually try and constrain the model in a really nice and reliable way so you can get the same pattern happening over and over again.
感觉你做的事情是,在遇到模型时,你会想办法以一种很巧妙、可靠的方式约束模型,这样它就能一遍又一遍地遵循同样的模式。
And the thing that I've shifted my brain towards doing is like whenever the model doesn't do something right and I have to steer it, I just change how I work with the model instead.
而我现在转变了思路:每当模型没做好某件事、我不得不引导它时,我就改变自己与模型合作的方式。
I change me instead of the model, instead of the harness or the model.
我改变的是自己,而不是模型,也不是工具框架或模型本身。
And like some of the stuff like that, what I mean is like if I find certain phrasing works better the second time around, of course, I just switch to using that phrasing every single time myself.
比如有些时候,我发现某种说法第二次用起来效果更好,那我当然就会改成每次都用这种说法。
And I'm sure you do that too.
我相信你也会这么做。
Yeah, some of these things are like... very small, very small little things.
对,有些事情就是……非常小,非常细微的小事。
i'm like, you know, give me, i'll just type, give me, give me a diff block to explain this.
我会想,你知道吗,给我——我就直接打字说:给我一个 diff 块来解释这个。
and then it did it wrong and it did it again.
结果它做错了,然后又做了一次。
but like now i'll just say like, give me a show me block that explains this pr or explains this question you're asking me.
但现在我会直接说:给我一个展示块,解释一下这个 PR,或者解释一下你问我的这个问题。
and it's nice to have, it's mostly like almost everything in my skills is now output templates.
这样挺好的;我技能里的内容现在基本上几乎全都是输出模板。
it's like, how do i want you to communicate with me?
就像是,我希望你怎么跟我沟通?
and how do i want you to write the things that other humans are going to see?
我希望你怎么写那些其他人会看到的内容?
and part of that is code, but a lot of it is also writing.
其中一部分是代码,但很大一部分也是写作。
i like that idea a lot, to be honest.
说实话,我很喜欢这个想法。
i think that way of like getting into communicators and styles is very, very important.
我觉得,这种了解沟通者及其风格的方式非常、非常重要。
we've been the biggest bottleneck now is, again, like there's the grilling and the interviewing and the interactive planning stuff that i think is still important.
我们现在最大的瓶颈一直是——再说一次,那种刨根问底、面试式提问和互动规划的过程,我觉得仍然很重要。
but there is also the, the like.
但还有一方面,就是……
how do i, it's like, how do i pull context out of the human as cleanly and painlessly and effectively as possible?
我该怎么做?就像是,我该如何尽可能清晰、轻松又有效地从人那里获取上下文?
and then once the work has been done, how do i pull context back out of the agent to the human in the most clean, low effort?
然后工作完成后,我又该如何以最清晰、最省力的方式,把上下文从智能体那里传回给人?
like reading a wall of clodslop is painful to me.
读一大堵 clodslop 对我来说很痛苦。
i do it still a lot.
但我现在还是经常这么做。
but it's like, how do i make this as comfortable as possible?
但问题是,怎么才能让这个过程尽可能轻松?
not just for me, but also like.
不仅是对我而言,也包括……
For the person I'm asking to take time out of their day to help me get something in.
对那些我请来抽出时间帮我把事情做好的人而言。
And you know what's really interesting?
你知道有什么特别有意思吗?
There's actually a I built this internal slop meter for every person I communicate with about like how often do they send me something that's good versus bad.
其实我做了一个内部的“垃圾内容计量器”,针对每个跟我沟通的人,记录他们发给我的内容有多常是好的、又有多常是差的。
And the more often they send me something that's bad, I just don't read their stuff as much.
他们发来的内容越常是差的,我就越不看他们发的东西。
I just literally put before I even before I even uh open their links.
我真的会在打开他们的链接之前——甚至在我打开之前——先这么做。
Is there a real thing for this?
真的有这种东西吗?
That's so funny.
太好笑了。
Slopmanifesto.
Slop宣言。
com.
com。
I wrote this with the AI engineer speakers.
我和那些AI工程师演讲者一起写了这个。
It's like literally the Agile Manifesto but for slop.
它简直就是专为slop写的《敏捷宣言》。
And one of these things is like.
其中有一条大概是这样的。
the more slop flying around a team, the more we lose the will to fight it.
一个团队里到处都是slop,我们就越会失去抵抗它的意愿。
and so the more people sling slop, the less you just stop caring and then everything just gets worse because no one has the energy to review.
所以,越多人往外丢slop,大家就越不在乎,最后一切都会变得更糟,因为没人有精力审核这些东西。
shit.
破玩意儿。
exactly.
没错。
because like what i've told is like i basically, for some people, like if they send me some stuff and like some people do all the time, which is i literally ping them like, did you read this yourself?
因为我跟人说过,基本上,有些人给我发东西——而有些人总是这么做——我就会直接问他们:你自己读过这份东西吗?
i actually specifically asked, did you read 100% of every word yourself?
我还特意问过:每个字你都自己从头到尾读过了吗?
and it sounds like a really mean question, but it's like, i think this is like, i have to ask that question for some people and i don't have to ask for others.
这听起来像个很刻薄的问题,但我觉得,对有些人我不得不问这个问题,对另一些人就不必。
this is another one.
这是另一条。
it's like, if someone sends you slop, tell them kindly and ask them to like fix it.
如果有人发给你slop,就友善地告诉他们,并请他们改好。
and like admits that a lot of us have done this too.
还要承认,我们很多人也都做过这种事。
and it takes time and it's learning.
这需要时间,也是一个学习的过程。
yeah.
是啊。
it's also just a frequency.
这也只是频率问题。
like i think it's fine.
我觉得这样没问题。
like the dashboards i showed earlier where i was showing like the metrics of the testing stuff.
比如我之前展示的那些仪表盘,里面展示了测试相关的指标。
those are slop artifacts.
那些都是粗制滥造的产物。
aaron deliberately made slop artifacts.
Aaron 故意做出了那些粗制滥造的产物。
but those were shared with the context of he vibe coded an experiment was just to showing a point.
但分享那些内容时,也说明了他是在进行氛围编程,做的只是一个用来说明观点的实验。
and like as long as he prefaces that with the message of, hey, this is a vibe coded slop artifact, but it's cool.
只要他先说明一下:“嘿,这是氛围编程做出来的粗制滥造产物,不过挺酷的。”
here's what i want you to take away from this.
这是我希望你从中领会的内容。
here's the output i want you to have when you read this.
这是我希望你读完后得到的结果。
i can go through and skim it with that same exact mindset.
我也可以带着完全相同的心态浏览一遍。
yeah.
对。
so i want to talk through a little bit more of like, basically like, again, so we have this orchestrator.
所以我想再多聊一点,基本上,还是回到我们有这个编排器这件事。
it pulls in the single skill.
它会加载单个技能。
it knows how to do this whole rpi flow.
它知道如何完成整个 RPI 流程。
and the other really cool thing that i think is important to this that is like not out of the box and is like a little bit non-trivial to build is this idea we call like automations.
我觉得其中另一个非常酷、也很重要的东西是自动化。它不是开箱即用的功能,实现起来也有点复杂。
Um, and automations is basically the simplest version of an automation is like send a message to agent or the orchestrator on cron, you know, on some cron string.
嗯,自动化最简单的形式基本上就是按 cron 定时任务的规则,向智能体或编排器发送一条消息。
Sure.
当然。
With content, right?
并附上内容,对吧?
Uh, and so this is kind of like your poor man's Ralph loop.
呃,这有点像简易版的 Ralph 循环。
This could be wake up daily and check what PRs I need to review.
比如每天唤醒一次,检查有哪些 PR 需要我审核。
This could be, you know, every 30 minutes, like check the PR status, but it's a way to basically build something deterministic outside of the agent loop.
也可以是每 30 分钟检查一次 PR 的状态。这是一种在智能体循环之外构建确定性流程的方式。
that will wake it back up.
这样就能再次唤醒它。
and there's other versions of this, like, you know, when a github pr review comes in, like send the, you know, webhook object.
还有其他实现方式,比如收到 GitHub PR 审核时,把 webhook 对象发过来。
yeah, you're basically building a trigger.
对,你基本上是在构建一个触发器。
like what is a triggering system?
比如,什么是触发系统?
like what causes a trigger?
比如,是什么导致了触发?
is it a cron?
是 cron 定时任务吗?
is it a reaction to something else that happens?
是对其他事件的响应吗?
is it event driven?
是事件驱动的吗?
like, yep.
就像,没错。
makes sense.
有道理。
yeah.
是啊。
and so what i've been able to do with this is basically like, i will start, i will do planning.
所以我用这个能做到的,基本上就是,我会先开始做规划。
and then once we're in design, i will actually have this thing fan out like a, we use linear, but basically like draw the slices in linear of like ticket one, dot, dot, dot.
然后进入设计阶段后,我会让这个东西展开成一系列任务。我们用 Linear,但基本上就是在 Linear 里把各个部分画出来,比如任务一,等等。
and then it's like 1.1 is this, 1.2 is this.
然后就是 1.1 是这个,1.2 是那个。
so all the slices become reflected in our tracker.
这样所有的部分都会反映在我们的任务跟踪器里。
and then as the agent is working, the orchestrator's job is to keep the tracker up to date and say, oh, 1.2 came out to like 4k lines.
然后代理工作时,编排器的职责就是让任务跟踪器保持最新,并指出:哦,1.2 最后写了大概 4k 行代码。
4k lines.
4k 行。
so we're going to split that up into 1.2.1, 1.2.2.
所以我们要把它拆成 1.2.1、1.2.2。
so it's all about like, how do you ship faster?
所以关键就是,怎样才能更快交付?
well, you ship faster by doing it in smaller pieces.
嗯,把工作拆成更小的部分,就能更快交付。
there is, of course, like a failure mode there where you're like shipping things where someone's reviewing.
当然,这里也有一种失败模式:你不断交付东西,而有人在审查。
it's like, i don't even have enough context from this pr to know if this is the right thing or what it's going to touch or what it's going to impact.
对方会觉得:我光看这个 PR,还没有足够的上下文来判断这是不是正确的做法、会涉及什么,或者会造成什么影响。
so there's a balance here.
所以这里需要保持平衡。
but i'm going to pop open, i just want to kind of like show you like how this looks in like how i've been working lately.
不过我准备打开它,我只是想大致给你们看看它是什么样子,以及我最近是怎么工作的。
so there's our whole screen.
这就是我们的整个屏幕。
so i started an rpi.
我开始做了一个 RPI。
so the thing i wanted to build, actually, i will let me go back to the excel drawer real quick.
其实,我想做的东西是……让我先快速回到 Excel 抽屉。
the thing i wanted to build was basically something that we do live every day, which is to take a like voice stream.
我想做的东西,基本上就是我们每天都会现场做的事:获取一段语音流。
Not every day, but we do on this podcast manually and then like put that into an app, some app or pipeline.
不一定是每天,不过我们在这个播客里会手动做这件事,然后把内容放进某个应用或流程里。
That then would like basically update.
然后它就能基本上自动更新。
update like an excalidraw, some kind of drawing.
更新一张 Excalidraw 之类的图。
and so i started like trying to system design this out.
于是我开始尝试把这个系统设计出来。
i was like, okay, i need to do this with an agent because there's all kinds of stuff of like, okay, we have like chunk one.
我当时想,好吧,这得用一个智能体来做,因为这里面有各种各样的东西。比如,我们有第一个分块。
and then we kind of want to like chunks with overlap, chunk two.
然后我们希望分块之间有重叠,这是第二个分块。
and the core loop is like you have a some chunk that comes in and that comes in with, you know.
核心循环是:有一个分块传进来,它会带着……你知道的。
I guess so I'm like designing this live.
我想,我就是在现场设计这个。
So what else I would put in is like what is the current diagram.
我还会加入当前的图是什么样的。
what is like the conversation so far?
到目前为止的对话内容是什么?
i'm going to pause really fast.
我先暂停一下。
describe the problem again really fast, just to catch everyone up.
我再快速描述一遍问题,让大家跟上。
what is the problem?
问题是什么?
what are we trying to do?
我们想做什么?
we're sitting on this show and i manually transcribe everything we talk about into diagrams.
我们在做这个节目时,我会把我们聊的所有内容手动转录成图表。
and like, it's a nice way to convey it.
而且,这是一种很好的表达方式。
i want to be able to be sitting with you riffing with a voice recorder on or sit in a meeting with my team and everybody's different people are talking, different people are having ideas.
我想能够和你坐在一起畅聊,开着录音机,或者和团队一起开会;每个人都是不同的人,都在发言,都在提出想法。
the conversation moves from topic to topic.
话题从一个转到另一个。
And I want at the end of the conversation to have a diagram that shows everything we talked about and how they relate and the mind map and action items and like all the stuff that all the decisions that were made, all the open decisions that need follow-ups.
我希望谈话结束时,能有一张图表展示我们聊过的所有内容、它们之间的关系、思维导图和待办事项,还有所有那些内容、做出的所有决定,以及需要后续跟进的未决事项。
Yeah, we want to take a live conversation.
对,我们想把实时对话记录下来。
increment it live as we're talking.
我们边聊边实时更新。
yeah, i want to take a live conversation and basically build the perfect whiteboard for it.
对,我想把实时对话记录下来,基本上为它构建一块完美的白板。
yeah, have the ai draw out the whiteboard as we go.
对,让 AI 随着我们的讨论把内容画到白板上。
and so the idea is like, you would chop these up into, you know, like, i don't know, like 10 second chunks.
所以这个想法是,你可以把这些内容切成一段段,比如说,我也不知道,大概 10 秒一段。
and so you would have the latest chunk, the conversation so far, the current diagram, and the model would output like a tool call.
这样你就会有最新的一段、截至目前的对话、当前的图表,然后模型会输出一个类似工具调用的指令。
Update diagram.
更新图表。
that like basically makes a bunch of changes to to what it should be.
也就是基本上对图表做出一系列应有的修改。
Either outputting the new end state or outputting code mode to make the changes.
要么输出新的最终状态,要么输出代码模式来进行修改。
Uh and then that gets applied and you see it live in the in the in the UI.
然后应用这些修改,你就能在 UI 里实时看到变化。
Is this the thing you're going to be building today?
这是你今天要做的东西吗?
So this is the thing I started building today.
这是我今天开始做的东西。
So here I have um a what like in.
所以这里我有一个,呃,什么,就像在……
And where where are we at with this today?
那今天这个项目进展到哪一步了?
I literally was having a bunch of technical issues, so I just started it and it is working on the.
我当时遇到了一堆技术问题,所以就先启动了它,现在它正在处理……
okay, so it's awesome.
好吧,这很棒。
so we just i am on the research phase of rpi.
所以,我们现在正处于 RPI 的研究阶段。
and so i can come in here and i can look at the files and i can come and see like, okay, cool.
所以我可以进来看看这些文件,然后看看,比如说,好,酷。
like we did some research.
我们做了一些研究。
we have the actual like, here's all the prior art shit of like how things work and like how excalidraw works internally and the elements get skeleton.
我们有实际的东西,比如这里有所有关于事物如何运作的先例资料、Excalidraw 内部如何运作,以及元素如何生成骨架。
and then there's a bunch of stuff here as like.
然后这里还有一堆东西,比如……
here's how you merge stuff.
这是合并内容的方法。
i think i had to go read some like voice agent stuff.
我想我得去读一些语音代理方面的资料。
yeah, code mode.
对,代码模式。
how does code mode work?
代码模式是怎么运作的?
i basically just gave it a prompt of like a bunch of shit to go.
我基本上就是给它一大堆提示,让它去做。
this is a greenfield project.
这是一个从零开始的项目。
so our research is not go learn how the code base works.
所以我们的研究不是去了解代码库是怎么运作的。
it's a lot more like go figure out what apps.
而更像是去弄清楚有哪些应用程序……
and subsystems you can use as a part of this project to be successful.
以及有哪些子系统可以用于这个项目,帮助我们取得成功。
yeah.
对。
Exactly.
没错。
What are the patterns that we can follow?
我们可以遵循哪些模式?
I think this research will probably take some time.
我觉得这项研究可能要花些时间。
So why don't we let the research do the design phase?
那我们为什么不让研究来完成设计阶段呢?
Where are we at?
现在进展到哪儿了?
i'm sorry.
抱歉。
i also had like a meta agent that was, let's see, asking me for something, but go make the prd now.
我还开了个元代理,嗯,看看,它在问我要一些东西,不过现在去写 PRD 吧。
so again, this is going to now go write a like, here's how the thing works.
所以再说一次,现在它要去写一份类似这样的文档:这个东西是怎么运作的。
prd is product requirements doc.
PRD 指的是产品需求文档。
we've talked about this before on the show.
我们之前在节目里聊过这个。
but it's like, hey, okay, cool.
不过这就像是在说:好,没问题。
like, let's align on what we want this thing to look like.
我们来统一一下对这个东西的设想。
And then after that, we go into like, okay, cool, what's the architecture and the tech design basically.
然后之后,我们再讨论:好,没问题,基本的架构和技术设计是什么。
but this orchestrator is going to go launch a new agent to actually go do that prd flow.
不过这个协调器会启动一个新的代理,实际去执行 PRD 流程。
so i never have to invoke like the slash command skills anymore.
这样我就再也不用调用那些斜杠命令技能了。
i just tell the orchestrator we're doing an rpi and it's going to come through and like read all the references and read the research and go start working on stuff until it's ready for me to review.
我只要告诉协调器我们要做一个 RPI,它就会去读取所有参考资料和研究内容,然后开始处理,直到可以让我审阅为止。
So what are you doing in the meanwhile?
那你这段时间在做什么?
Well, that's going, I do have another thing I can share that is I'm doing differently now.
嗯,它在运行的时候,我确实还有件事可以分享,那就是我现在做事的方式有些不同。
but... What do you typically do in the meanwhile?
不过……你通常这段时间会做什么?
Do you just wait and usually you paralyze tasks?
你就等着吗?通常你会把任务并行处理吗?
But yeah, I mean, I have too many things going right now.
不过,是啊,我现在手头同时在做的事太多了。
If I was in my like, you know, factory account, I'd have like seven of these, which I would, I would prefer to only have like two large things going in parallel at a time and just focus.
如果我在我的那个,呃,你懂的,工厂账号里,我会有大概七个这样的任务;但我更希望同时只并行做两件大事,然后专注处理。
Um, but I also have some of these like... some of these are like projects.
嗯,不过我也有一些这样的……有些算是项目。
there's a couple.
有几个。
so can i ask you a couple of questions about that workflow that you have, where you have a lot of stuff running in parallel?
那我能问你几个关于你这种工作流程的问题吗?就是你同时有很多事情在并行推进的那种。
yeah.
可以。
i'm curious, do you feel like when you say you do a lot of these smaller tasks in parallel versus like two large tasks, was that an active choice that you made or was that one that's being passively made.
我很好奇,你说自己会并行处理很多较小的任务,而不是同时做两项大任务时,你觉得这是你主动做出的选择,还是一种被动形成的状态?
do you think?
你觉得呢?
that was like priorities change and then the thing you were working on becomes lower priority and you slot something new on at the top.
是不是因为优先级变了,然后你正在做的事情优先级降低了,于是你把新的事情排到了最前面?
okay, that's kind of what i feel.
好,这差不多就是我的感觉。
i realized for me, one of the decisions that i've had to make now more actively is like exactly what tasks i'm taking on in any given moment.
我发现,对我来说,现在有一项决定必须更主动地去做,那就是每个当下究竟要接手哪些任务。
before, i think i just like, i just slop fast and i just keep doing it.
以前,我想我就是……我只是快速地胡乱做一通,然后一直做下去。
but it's made a huge decision for me of like, oh shit, now i feel like what i choose to work on is the most important decision i make every day.
但这让我做出了一个重大的决定:哦,天哪,现在我觉得自己选择做什么,就是我每天做的最重要的决定。
Yup.
对。
Yup.
对。
I uh I I agree with you man.
呃,我……我同意你的看法,老兄。
It's uh priorities are more important than ever.
呃,优先级比以往任何时候都重要。
Um...
嗯……
What's your max parallel number that you you're able to do now?
你现在最多能并行处理几件事?
I know before you used to say two or three, but it sounds like the number is way more now.
我记得你以前说过两三件,但听起来现在数量多得多了。
no, i think you can only seriously do two or three things, especially if you're also jumping on meetings and talking to customers and things like that.
不,我觉得你认真做的话,最多只能同时做两三件,尤其是还要参加会议、和客户沟通之类的时候。
it might even be like one.
甚至可能只有一件。
but things break and there's bugs.
不过总会出故障,也会有漏洞。
you've got to go triage.
你得去排查处理。
you've got to figure out.
你得想办法弄清楚。
so i have a whole other framework that i probably don't have time to get into that is like how i manage a rolling inbox and top items list.
所以,我还有一整套别的框架,可能没时间细讲,就是我如何管理滚动收件箱和重点事项列表。
but i don't think we have time for that today.
不过我觉得今天没时间讲这个。
Would you like to hear how I'm doing planning nowadays?
你想听听我现在是怎么做规划的吗?
Yeah, tell me.
好啊,说说看。
So for whether it's tech design or product design, I got this from Lucas Meyer.
无论是技术设计还是产品设计,这个方法都是我从 Lucas Meyer 那里学来的。
So Lucas Meyer.
就是 Lucas Meyer。
It's called L plan.
它叫 L plan。
Good luck.
祝你好运。
You might want to put that in quotes.
你可能得把这个放进引号里。
Yeah, I think it got.
对,我觉得它已经……
Um, so this is, I think, an older version of this, but I kind of adapted this.
嗯,我想这是它的一个旧版本,不过我稍微改编了一下。
This is in the, um, this is in our skills now, but basically the idea is, um, I'm not gonna go, I'm just gonna talk about what this means, but this is something he came up with where like, The old flow was like, ask for a thing.
这个现在在我们的技能库里了。基本思路是——我不打算展开讲,只说说它的含义——这是他想出来的一种方法。以前的流程是:提出一个需求。
you have some kind of context building, whether it's like formal research or the model just reads a bunch of things, reads a bunch of files.
然后会有某种上下文构建,不管是正式研究,还是模型读取一堆内容、读取一堆文件。
and then it's like question one, question two, and you're sitting there asking questions.
接着就是问题一、问题二,你坐在那里回答问题。
and every question kind of looks like this.
而且每个问题看起来都差不多是这样。
it's like, how do you want to x?
比如:你想怎么做 X?
option a, option b, option c, recommendation.
选项 A、选项 B、选项 C,还有推荐方案。
etc.
等等。
and like it feels at the beginning, it feels very productive to have the model like pulling context out of you like one step at a time.
刚开始的时候,会觉得让模型一步一步从你这里提取上下文非常有效率。
it's easy way to focus and make one decision at a time.
这是集中注意力、一次做一个决定的简单方法。
but at the end of the day, it's like, yeah, i agree with 80% of the recommendations.
但说到底,我大概有80%都赞同这些建议。
why am i waiting like, you know, 60 seconds for an inference turn in between, you know, 30 to 60 seconds for an inference turn in between every question.
为什么我每次推理都要等大概60秒呢?也就是说,每个问题之间都要等30到60秒。
sometimes it's faster, but a lot of times there's like some thinking and some and some working and it's got to like.
有时候会快一些,但很多时候它得思考、处理一番,然后还得……
Flush your decision to a doc.
把你的决定写入文档。
And so it was like basically what Lucas came up with was this idea where like instead of this interview phase.
所以基本上,卢卡斯想到的是这么个办法:不再进行这个访谈阶段……
you have, you just generate the plan doc.
而是直接生成计划文档。
the model just writes it.
由模型来写。
and it basically writes each decision in as if it's already been made, like with the default recommendation.
它基本上会把每项决定都写成已经做出的决定,并采用默认建议。
so it's like decision one, and then it's like an outline of what we do with the code snippets and all of this, like show me stuff, whatever it is.
比如,决定一,然后列出我们要怎么做,附上代码片段之类的,还有所有这些内容,比如给我看看具体内容什么的。
and then what he'll do is he'll put like, you know, alternatives.
然后他会列出一些替代方案。
why not x, you know, why not y, right?
为什么不选X?为什么不选Y?对吧?
and this becomes like a collapsed like details tray, which you can then like expand, but you don't read it.
这样一来,这些内容就会折叠在一个详情栏里,你可以展开查看,但不用读。
if you like the first decision, you just read it and then you keep reading down to decision two, right?
如果你认可第一个决定,就读完它,然后继续往下看决定二,对吧?
and then this one has alternatives and stuff.
这个决定也有替代方案之类的。
and so, and then the cool part of this prompt is that it's basically, if i say, you know, if i, so i'm reading this and let's say i don't like the answer to decision three.
这个提示词很巧妙的一点是,如果我说——比如我正在读这份内容,假设我不喜欢决定三的答案。
and i go in here and i look and i say like, oh, actually i want like alternative, i want alternative b here.
我就可以到这里看一看,然后说:“哦,其实我想选替代方案,我想选这里的B方案。”
or i say like, oh, none of the alternatives work easy either.
或者我会说:“哦,这些替代方案都不太行。”
or like, i need to understand this better.
或者说:“我需要更深入地了解一下。”
Basically, if I come into the chat and I say like.
基本上,如果我进入聊天窗口,然后说……
for d3, let's do, you know, abc instead.
对于 D3,我们就用 ABC 来代替吧,你懂的。
the model interprets that as like, cool, decisions one and two are more or less accepted unless something else happens, but everything else beyond this is invalidated.
模型会把这理解成:好,决定一和二基本上已经被接受了,除非之后发生别的情况;但除此之外的内容都作废。
that's like the interesting part of the prompt is the ux here.
提示词有意思的地方就在于这里的用户体验。
Wait, so okay, so the problem that I have, I so I tried this.
等等,好吧,我的问题是……我试过这个。
I actually tried this a lot and I ran into this exact same problem where when I started commenting on things and I comment about decision uh three when there's like seven, eight, nine below all the way down below it as well, the model sometimes assumes that everything else is fine too.
我其实试过很多次,也遇到了完全一样的问题:我开始对一些内容发表评论,比如评论决定三,而下面还有七、八、九,甚至更多内容时,模型有时会以为其他内容也都没问题。
Yeah, it fixes three but it doesn't fix everything else.
是的,它会修正第三项,但不会修正其他所有内容。
Or it assumes that I was okay with everything down below it even though I haven't read it yet.
或者它会以为我认可了下面所有内容,尽管我还没看过那些内容。
So I've actually had to slow myself down and not press enter unless I've commented on all of it.
所以我其实不得不让自己慢下来,在对所有内容都发表评论之前,不按回车。
yeah.
是啊。
and so this is like a guide for the model on how to interpret the human's responses.
所以,这就像是给模型一份指南,告诉它该如何解读人类的回复。
like, except, but i don't know about four is like, excepts one, two, and three, assumes you have not read five.
比如,“除了第四项之外”,意思是接受一、二、三,并假设你还没读到第五项。
six, or seven.
第六项或第七项。
yeah.
是啊。
that's cool.
挺不错的。
that's cool.
挺不错的。
okay.
好。
this is like the important high leverage.
这才是重要、影响力大的部分。
it's not that like cool a piece of technology, but it's like when we talk about how do i maximize like the human's ability to make good decisions.
它不是什么特别酷的技术,但当我们讨论如何最大限度地提升人类做出好决策的能力时,关键就在这里。
without wrangling with the implementation details of like what's physically in the document.
而且不必费心去处理文档里具体写了什么这类实现细节。
so i have a second follow-up to this.
我对此还有一个后续问题。
here's what i run into again.
这是我又遇到的问题。
when decisions, when i'm making seven decisions at once and i go down a path of decision three, what ends up happening that i run into is like decisions four, five, six end up getting forgotten or not given as much care by the time i've resolved decision three.
做决定的时候,如果我同时要做七个决定,而我沿着第三个决定的一条思路往下走,结果往往就是,等我解决了第三个决定,第四、第五、第六个决定就被忘了,或者没有得到足够的关注。
If I do it the same way.
如果我用同样的方式来做。
Well, that's the idea is also, there's prompting in here is like that this must be top down.
嗯,这个思路也是,这里有提示要求必须自上而下。
Like any later decision can only depend upwards.
比如,后面的决定只能依赖前面的决定。
Decision two cannot depend on decision four.
第二个决定不能依赖第四个决定。
that's interesting.
这很有意思。
i'll have to try this kind of prompt thing.
我得试试这种提示方式。
no, no, no.
不,不,不。
yeah, because what i end up having to do is i just spin up side tasks.
对,因为我最后不得不做的就是另开一些辅助任务。
if i know i'm going to have more than two chats about any one decision, i have to spin up a side task.
如果我知道某个决定要聊超过两次,我就得另开一个辅助任务。
well, and that's what's also nice about this orchestrator flow is that, like, if i'm like, okay, for d3, i actually want to do, i need to go research x, the orchestrator can just, like, fire off a new agent to, like, you know, research d3.
嗯,而且这个编排器流程也有个好处,比如说,如果我想,好的,针对 D3,我其实想做的是去研究 X,那么编排器就可以直接派一个新代理去研究 D3。
that's cool.
这挺酷的。
alternatives and how baml does it or whatever.
比如研究各种替代方案,以及 BAML 是怎么做的,等等。
that can just be a new agent that goes.
这只要派一个新代理去做就行。
and i'm still just one-on-one chatting with the orchestrator with a fairly clean context.
而我仍然只需要和编排器一对一聊天,保持上下文相当清晰。
and so i make decisions in the main chat or i might comment on a doc.
所以我会在主聊天里做决定,或者在文档上发表评论。
but the idea is like the main conversation happens with the orchestrator, but all of the work happens in these sub-agents.
但核心思路是,主要对话由编排器负责,而所有工作都由这些子代理完成。
and at any given point, i might actually step into one of these agents.
而且在任何时候,我都可以直接介入其中一个代理。
like, so we have this agent that's doing the prd.
比如,我们有个代理正在做 PRD。
It's asking me questions and Steve.
它在问我和史蒂夫一些问题。
How often do you, how often do you step into a sub-agent?
你多久会进入一个子代理?多久一次?
What's the percentage of.
占多少比例……
percentage of tasks?
任务的百分之多少?
Uh, if there's a lot of back and forth planning, I will, I will absolutely step into a sub-agent.
呃,如果需要来回进行很多规划,我绝对会进入子代理。
Um, but uh.
嗯,不过,呃……
what percentage of tasks uh, cause you to step into a sub-agent?
什么比例的任务会让你进入子代理?
Sorry, I have a I'm on a train right now where I don't like don't don't like ask user questions.
抱歉,我现在在火车上,不太喜欢……不喜欢向用户提问。
So if I'm interviewing and making a bunch of decisions, I will jump into the sub-agents.
所以,如果我在进行访谈并做出一堆决策,我就会切换到子代理。
If I have a large task where it's like I just want to polish one PR, I'd say about 80% of my chatting happens with the orchestr.
如果我有一个大型任务,比如只想完善一个 PR,我会说,我大约 80% 的聊天都是和编排器进行的。
ator.
……器。
Okay.
好。
Um, because I want to have kind of the overall context of the status of everything else.
嗯,因为我想大致了解其他所有事情的整体背景和状态。
These agents will also message the orchestrator though.
不过,这些代理也会给编排器发消息。
So like when it's done, I believe, yeah, so it'll send a message back to the orchestrator.
所以,比如任务完成时,我想是的,它会给编排器发回一条消息。
The sub agents have a tool that they can use to message the orchestrator.
子代理有一个工具,可以用来给编排器发消息。
Yeah, I think every time there's been.
是的,我觉得每次都……
an interesting hill climbing eval thing of like how do we get the like verbosity of this correct and things like that.
有个挺有意思的爬山式评估问题,比如我们该如何正确调整这个的冗长度之类的。
But.
但是……
Yeah.
是的。
that's cool.
那挺不错的。
i think it's now we're here.
我觉得现在我们已经到这一步了。
i will jump in and like do the l plan thing from rpi, right?
我会直接上手,像从 RPI 那样做 L 计划,对吧?
the whole thing with decision headers.
整套东西都带有决策标题。
sorry.
抱歉。
some of my skills are still competing.
我的一些技能还在互相冲突。
like the main prd skill is still like write this doc one thing at a time.
比如主要的 PRD 技能还是一次只写文档的一部分。
but i also have steering to like make all the decisions and then i will review them.
但我也有 steering,可以先做出所有决定,然后我再审核。
It's really, I must say it's pretty validating that we both independently came to approximately the same ratio, like 20% is in sub-agents.
说真的,我们俩各自独立得出了大致相同的比例,这让我很受鼓舞——大约 20% 放在子代理上。
But it is, it is non-zero and I think more people should be doing that.
不过,确实不是零。我觉得应该有更多人这么做。
Uh.
呃。
very few people actually... And the other cool thing that we just shipped that I'm really excited about is I can now comment on this and I'm like... That's funny.
其实很少有人真的……还有一件我们刚上线、让我特别兴奋的酷事:我现在可以在这上面发表评论,然后我就会说……真有意思。
Let's make this focused on.
我们把重点放在……上吧。
what agent does this go to?
这会交给哪个代理?
Multiplayer meetings.
多人协作会议。
Does this go to the sub-agent or?
这是交给子代理吗?还是……
So it goes as a comment.
它会作为一条评论发出去。
So I can tell this one to check comments on the doc.
所以我可以让这个代理检查文档上的评论。
I see.
明白了。
They all have tools to like list the comments, but I can also just like inject this as a steering message.
它们都有列出评论的工具,不过我也可以直接把这条消息作为 steering 指令注入进去。
i see.
我明白了。
got it.
懂了。
nice.
不错。
and so this will come in.
然后这个就会进来。
and what's actually really cool is i haven't, i don't think i have a demo for this.
真正很酷的是,我还没有——我不认为我有这个的演示。
i did invite you to this oregon factory, but if you wanted to, you could jump into this chat and like prompt the orchestrator with me.
我确实邀请你去了这家俄勒冈工厂,不过如果你愿意,也可以加入这个聊天,和我一起向编排器输入提示。
because the other cool thing that this allows is all of these agents, the orchestrator and each of the sub agents run in their own like cloud sandboxes.
因为它带来的另一个很酷的地方是,所有这些智能体——编排器和每个子智能体——都在各自独立的云端沙盒中运行。
and so you can steer it to run co-located agents.
所以你可以引导它运行部署在同一位置的智能体。
But the idea here is you can kind of scale your compute.
不过这里的想法是,你可以按需扩展计算能力。
This all runs, it keeps running if I close my laptop, all that.
这一切都在运行,就算我合上笔记本电脑,它也会继续运行,诸如此类。
All the... Though my build, though my uh, though my build times would be atrocious 'cause it's got to do a clean build if it's on a new machine every single time, unless they use like NFS uh behind the scenes.
所有这些……不过我的构建……呃,我的构建时间会糟糕透顶,因为如果每次都在一台新机器上运行,就得从头干净地构建,除非他们在幕后用了类似 NFS 的东西。
Um.
嗯。
so what you can do is.
所以你可以这么做。
you can bake a base image and then have it launch from those.
你可以制作一个基础镜像,然后让它从这些镜像启动。
So actually I have an agent here that is running through the um.
所以其实我这里有个智能体,正在运行……嗯。
Running through the actually.
正在运行……其实吧。
uh creating a specific environment.
呃,正在创建一个特定的环境。
So you can you can seed it with a cache and you can rebuild that environment every hour if you want to.
所以你可以给它预置一个缓存,也可以按需每小时重建一次环境。
Um this is the default one but like I can edit this and give it like a a setup script.
嗯,这是默认配置,不过我可以编辑它,给它添加一个设置脚本之类的。
So you can give it scripts and and and and Androids can manage these for you.
所以你可以给它配置脚本,而且 Androids 可以替你管理这些。
I'm still I'm still wrapping my head around this part.
我还在……我还在消化这一部分。
Um but it I mean my computer is a.
嗯,不过,我的意思是,我的电脑是……
waste of skills.
浪费技能。
Clones all the repos.
把所有代码仓库都克隆下来。
Say what?
你说什么?
Cloud compute is the way to go.
云计算才是正道。
We should do an episode on like why cloud compute is really good for these kind of stuff.
我们应该做一期节目,聊聊为什么云计算特别适合这类事情。
Like the system design and all the hard problems in like building cloud agents.
比如系统设计,以及构建云端智能体时遇到的所有难题。
Yeah.
对。
I think that would be fun.
我觉得那会很有意思。
No, not even that.
不,不止是那样。
I mean not even that, just like why it's important.
我的意思是,不止是那样,只是聊聊为什么这很重要。
Like there's like a architectural thing that people like there's a huge burden to setting up cloud agents for your org.
这涉及一些架构方面的问题。很多人会觉得,为组织搭建云端智能体是个沉重的负担。
If anyone's ever tried to go do it, you'll you'll probably quickly run into like all the logistical problems, the security problems, the cost problems.
如果有人试着去做,大概很快就会遇到各种后勤问题、安全问题和成本问题。
The like all the shit that you typically in the process problem, you got to teach engineers something new and there's yeah.
还有那些你通常会碰到的各种破事。这个过程中,你得教工程师一些新东西,而且……是啊。
And like how do you overcome that?
还有,要怎么克服这些问题?
And like is it worth even like doing this process change?
而且,这种流程变更到底值不值得做?
And what does that look like?
这会是什么样子?
And look what the upside is.
看看它的好处是什么。
I think like people need to really think about this stuff.
我觉得大家真的需要好好想想这些事。
Yeah.
是的。
Um, I I actually just recently bought some MacBooks to deploy us to our own personal cloud that we can have.
嗯,我最近其实刚买了几台 MacBook,打算部署成我们自己的私人云,这样我们就能用了。
That's just like a... Yeah, a cloud in the office that runs all your... 'cause that was how ATP worked, right?
那就像是……对,办公室里有个云端,运行你所有的……因为 ATP 当时就是这么运作的,对吧?
Yeah, but we want to change it now to be like, I don't ever want to run anything on my machine.
对,不过现在我们想改成这样:我再也不想在自己的机器上运行任何东西。
Now that now that our runtimes are running all the time, I never want to run anything on my personal machine.
现在,既然我们的运行时一直在运行,我就再也不想在自己的个人电脑上运行任何东西。
I only want things running on cloud machines at all times.
我只想让所有东西始终运行在云端机器上。
And I want those cloud machines saturated 100% of the time.
而且我希望那些云端机器一直保持 100% 满负载。
you want them always running.
你希望它们一直运行。
well, what's also nice about this is like the thing of like, how do you sleep a machine and then wake it back up?
嗯,这还有个挺好的地方:比如,怎么让一台机器休眠,然后再唤醒它?
and then if it went to sleep with a like ask question pending, like how do you make sure the question gets like the tool gets recalled and the question gets re-asked and that kind of stuff.
如果它休眠时正有个待处理的提问,那要怎么确保工具会再次被调用、问题会重新提出,诸如此类的事情?
oh, yeah.
哦,对。
there's also like a really interesting system design of how do you design this in a good way.
这其中还有个非常有意思的系统设计问题:怎么把它设计好。
yeah.
对。
so i don't think we have time to dig into that.
所以我觉得我们没时间深入聊这个。
but yeah, the whole cloud agent thing, i'm really stoked.
不过,云端智能体这整件事让我特别兴奋。
i've been using it a ton and waking things up.
我已经大量使用它,也在不断唤醒各种东西。
so here's our prd.
那么,这是我们的 PRD。
it's like, okay, the web page is the meeting room, a link of voice call, one shared board.
大概是这样:网页就是会议室,有个语音通话链接,还有一块共享白板。
Nope, I'm just gonna make a web app.
算了,我还是直接做个 Web 应用吧。
it sounds like you're going to be coding for most of it.
听起来大部分代码都得你来写。
i actually do have to hop.
我确实得先走了。
it's been about an hour and a half, sadly.
很遗憾,已经过了大约一个半小时了。
but i think i'll leave the stream on.
不过我想我会让直播继续开着。
people can definitely keep watching.
大家肯定可以继续看。
i think it's going to be really interesting to see exactly how you're coding and what you're going to be building out here.
我觉得看看你具体是怎么编写代码、打算在这里构建什么,会非常有意思。
i might hop in later in the day after my calls.
我办完电话会议后,晚些时候可能会再来。
i've just got one i've got to prep for at 1230.
我12点30分有个会,得为它做准备。
yeah.
嗯。
okay, cool.
好,太棒了。
so it actually made a little, it made a little mockup of like what this app might look like.
所以它确实做了一个小样稿,展示这个应用可能是什么样子。
and i think this just blows on like what, again, like why the show me skill is really interesting.
我觉得这正好说明了,为什么“展示给我看”这个技能真的很有意思。
because like the show me skill is like, it lets it know this kind of stuff is like exists.
因为“展示给我看”这个技能会让它知道,这类东西是存在的。
even if it doesn't use it, just knowing that the user has a care for how visual content is displayed is relevant.
即使它不使用这些信息,仅仅知道用户在意视觉内容的呈现方式,也很重要。
yeah.
是啊。
Um, cool.
嗯,好。
I actually, why don't we end the stream here?
其实,我们要不就在这儿结束直播吧?
I think I think I got out what I wanted to get out.
我觉得我已经把想说的都说出来了。
I will I will maybe just do another live stream later of of me actually like working through and and building something because we got we got a little delayed here and uh I know you gotta run.
我之后可能会再开一场直播,实际演示我如何一步步处理并构建一个东西,因为我们这里稍微耽搁了一下,而且我知道你得赶时间。
Cool.
好。
All right folks, thank you for joining today.
好,各位,谢谢大家今天的参与。
视频围绕新一代模型如何改变工程工作展开:既要主动尝试过去觉得做不到的项目,也要持续审查模型输出。讨论从主聊天协调子代理、人工参与设计与代码审阅,延伸到编译器性能实验、依赖关系驱动的测试选择、精简 PR、技能与编排器的调整。后半段展示如何用自动化和任务拆分推进工作,并探讨用 L-Plan 减少逐题访谈、设计实时语音白板,以及借助云沙箱运行代理。核心价值在于把模型能力转化为可验证、可协作、可持续迭代的工程流程。
使用更强模型时,应把心态从“这做不到”转向“试试看”,并主动挑战模型能力;但外观看起来正确的结果仍可能有缺陷,需要理解模型正在做什么并验证输出。一个主聊天线程可以负责调度子代理、持续展示工作进展,并记录重要但不紧急的事项,帮助人保持在任务上下文中,而不是在等待时分心或盲目开启并行任务。
Vaibhav 分享了从零用自有语言重写整个编译器的尝试,并将其与 Bun 等项目的大规模工程实践相联系。他通过主会话持续驱动子代理:遇到具体设计问题时,为该问题开侧边会话深入讨论,再把总结带回主会话;代理处理其他任务时,他也会主动检查设计记录和代码。这个流程让大型工程问题可以拆解探索,同时保留人的持续参与。
项目有数十万行 Rust 代码,CI/CD 每月成本约一万美元,开发者常等待 10 至 15 分钟构建,CI 构建则约需 30 至 40 分钟。Vaibhav 因此尝试让 BAML 更快,并探索用 BAML 编写编译器;过程中让模型提出重大设计问题并记录下来,自己检查对象布局、汇编指令和实现细节。通过持续查看代码,他发现并修正并发设计和默认参数等问题;他举例说,某类分配存储操作从 Go 的约 151 条汇编指令降到 26 条,并认为性能改善能减轻 CI/CD 瓶颈。
工程决策可以先通过实验获得依据,而不必一开始就把功能做成正式产品。团队把 Pi 按文件移植到 BAML,以便观察语言特性和代码结构上的得失,并明确接受实验代码可能粗糙、甚至没有测试;目标是形成可供讨论的具体样本,再据此决定是否重新设计实现。比较过程中,他们还会统计代码结构、类型声明等差异,并由人实际阅读等价代码,保留用户体验和工程判断中的“品味”因素。
团队探索依据代码依赖关系选择 CI 测试:对源代码的显著 token 建立指纹,再追踪函数调用、类依赖及测试关联;代码变化后据此标出需要运行的测试,而不是依赖历史覆盖率。反射、网络调用等动态行为会使相关依赖持续变脏,因此系统也能解释某些测试为何总要运行。Dex 还举例说明,某团队将小型、低复杂度且通过自动审查的 PR 纳入自动合并资格后,两周内符合条件的 PR 从约 20% 升至 80%;这说明清晰的审查规则和激励能促使团队拆分改动、加快交付,同时仍需给审阅者足够上下文。
雄心与审慎需要结合:主会话不只派发子任务,也应展示相关代码和设计,让工程师在代理工作时检查方案、理解问题与技术现状。审阅中发现的重要改进可以先记录而不立即打断当前工作,因为模型未必能可靠地区分“重要”与“紧急”;由人决定哪些事项现在处理、哪些留待后续。这样的安排也能减少等待时分心造成的上下文流失和仓促接受默认方案。
传统 RPI 流程通常要分别启动研究、设计、规划和实现会话,并在阶段之间传递文档;新的做法是在编排器后组织这些步骤,由用户说明目标和流程,编排器再协调技能与代理,减少人手动选择命令和切换上下文的负担。代理可以是可交互的顶层会话,也可以是一次性、非交互子代理;编排器负责把它们的工作串联起来。
Dex 表示,随着模型更能理解文件内容,很多过去封装成技能包的操作可以改为让模型直接读取技能文件或参考资料;他的配置更倾向于保留一个说明 RPI 流程的技能,其余内容作为参考文件。技能仍适合保存反复出现的要求,尤其是输出格式和沟通偏好。Vaibhav 则强调,遇到模型反复犯同类错误时,可把纠正经验写入技能,减少重复指导;双方都在探索如何让模型更可靠地遵循人的工作方式。
面向团队协作的技能可以明确要求把 PR 拆小、逐项记录到 Linear,并向审阅者说明每个改动的上下文和整体关系;大型 PR 会显著增加审查耗时。Dex 更常通过改变自己的提示方式来适应模型,而不是每次都改模型或工具;他的技能内容越来越像沟通模板,例如要求用清晰区块解释 PR 或问题。双方也指出,未经说明的 AI 粗糙产物会消耗团队审阅意愿;若明确标注它是实验性产物、说明希望读者关注什么,就更容易有效评估。
编排器可以通过定时任务或事件触发被唤醒,例如定期检查待审 PR,或在收到 GitHub 审查事件后继续处理。规划阶段生成的任务切片可以同步到 Linear;执行中若某个切片膨胀到约 4000 行,就继续拆分为更小的子任务。小块交付有助于提速,但不能只追求尺寸小,还要给审阅者足够信息,说明改动目的、影响范围和上下文。
Dex 设想把实时对话转成持续更新的白板:系统按约 10 秒切分语音片段,结合此前对话和当前图表,让模型输出更新图表的工具调用,并即时呈现在界面中;最终白板应整理主题关系、思维导图、行动项、已做决定和待跟进问题。为推进设计,RPI 编排器先做外部资料研究,再安排 PRD 和技术设计代理。规划方面,L-Plan 让模型先写出带默认建议的决策文档,把替代方案折叠起来供有需要时查看;用户可以只指出要修改的决策,但必须让模型明确哪些后续决策尚未审阅、哪些因前序变化失效。复杂讨论可交给子代理研究,主会话则保留整体状态。
参与者指出,真正需要同时重点处理的任务通常只有两三个,会议和客户沟通多时甚至只能有一个,因此需要主动管理优先级,而不是不断叠加并行工作。编排器中的代理可以各自在云沙箱运行,用户也能进入子代理直接协作;预置基础镜像和缓存可以减少新环境的启动成本。云代理持续运行还带来新的系统设计问题,例如机器休眠后如何恢复待处理问题和工具调用。直播后段展示了语音白板的 PRD 与界面草图,但实际编码演示因时间和技术问题未完整展开。
22:28 面对更强的模型,应主动尝试过去认为难以完成的工程问题,同时持续检查其实现与设计,而不是把表面正确当作可靠。
23:17 让主会话协调子代理,并在代理工作期间保持人工参与,有助于推进复杂任务、保留上下文并及早发现问题。
13:51 先用实验验证大胆想法,再依据可运行的样本和人工审阅决定是否正式实现,可以降低探索新方案的成本。
16:04 按依赖关系缩小测试范围、拆分 PR 并提供充分上下文,可以让验证和代码审阅更高效。
51:20 规划工具应把默认决策与替代方案清楚呈现,并标明尚未审阅或因前序变化而失效的内容,避免把沉默误当成认可。
47:46 自动化与云代理能扩大可持续运行的工作量,但任务并行仍受人的注意力和优先级管理能力限制。