【AI编程】AI怀疑者尝试plan模式后 · 每个改动都用它
共 2 集
剧集目录
| 集 | 标题 | 时长 |
|---|---|---|
| P1 | 【AI编程】AI怀疑者尝试plan模式后 · 每个改动都用它 | 12:20 |
| P2 | 【AI编程】AI怀疑者尝试plan模式后 · 每个改动都用它 | 12:20 |
P1 · 【AI编程】AI怀疑者尝试plan模式后 · 每个改动都用它 p01 中英字幕 (P1)
字幕摘录
| 时间 | 英文 | 中文 |
|---|---|---|
| 0:00 | My interest in AI coding started when I tried plan mode. | 我对AI编码的兴趣始于我尝试计划模式时. |
| 0:04 | Before I tried plan mode, I was a total AI skeptic. | 在我尝试计划模式之前, 我是一个完全AI怀疑。 |
| 0:06 | I thought there's no way that AI can write decent code. | 我认为AI不可能写出体面的代码. |
| 0:09 | Certainly not at the speed that I can. | 当然不是以我所能的速度。 |
| 0:10 | There's no way that AI can understand my code base | AI不可能理解我的密码基础 |
| 0:13 | as well as I can. | 尽我所能 |
| 0:14 | And there's no way that AI can mimic the instincts | AI不可能模仿直觉 |
| 0:16 | that I've built up over a long career doing this stuff. | 我花了很长的时间做这些事 |
| 0:19 | And then Claude code released plan mode | 然后克劳德代码发布了计划模式 |
| 0:21 | and I tried it and I've never gone back. | 我试过了,我从来没有回去。 |
展开字幕全文(350 条)
| 序号 | 英文 | 中文 |
|---|---|---|
| 1 | My interest in AI coding started when I tried plan mode. | 我对AI编码的兴趣始于我尝试计划模式时. |
| 2 | Before I tried plan mode, I was a total AI skeptic. | 在我尝试计划模式之前, 我是一个完全AI怀疑。 |
| 3 | I thought there's no way that AI can write decent code. | 我认为AI不可能写出体面的代码. |
| 4 | Certainly not at the speed that I can. | 当然不是以我所能的速度。 |
| 5 | There's no way that AI can understand my code base | AI不可能理解我的密码基础 |
| 6 | as well as I can. | 尽我所能 |
| 7 | And there's no way that AI can mimic the instincts | AI不可能模仿直觉 |
| 8 | that I've built up over a long career doing this stuff. | 我花了很长的时间做这些事 |
| 9 | And then Claude code released plan mode | 然后克劳德代码发布了计划模式 |
| 10 | and I tried it and I've never gone back. | 我试过了,我从来没有回去。 |
| 11 | Every piece of code I write now goes through this loop | 我写的每件代码都经过这个循环 |
| 12 | where I first plan it in plan mode with an AI. | 我用人工智能在计划模式下第一次计划 |
| 13 | I then get the AI to execute the plan, | 然后,我得到了AI执行计划, |
| 14 | basically write the code that was in the plan. | 基本上写出计划中的密码 |
| 15 | We then test it together either by running unit tests | 然后我们一起测试 通过运行单元测试 |
| 16 | or by type checking or by manual QA. | 或通过类型检查或人工质量控制。 |
| 17 | Then we commit the code and the process starts again | 然后我们输入代码 程序重新开始 |
| 18 | and we start planning the new thing. | 我们开始计划新的事情。 |
| 19 | I believe this process is completely indispensable | 我认为这个过程是绝对不可或缺的 |
| 20 | to getting decent outputs from an AI. | 从人工智能那里获得体面的产出。 |
| 21 | And if you drop this plan step altogether, | 如果你完全放弃这个计划 |
| 22 | then you are really hampering yourself | 那你真的在妨碍自己 |
| 23 | in terms of what you can do. | 就你所能做的而言 |
| 24 | Now for folks who want to skip to the end | 现在给那些想跳到最后的人 |
| 25 | and get the good stuff immediately, | 并立即得到好的东西, |
| 26 | I've added a link below that shares my rules | 我下面加了一个链接 分享我的规则 |
| 27 | for creating really great plans in my Claude.md file. | 在我的Claude.Md档案里创造出非常伟大的计划 |
| 28 | We're gonna be going through some of these | 我们会经历一些这些 |
| 29 | and why I have them in here, | 和为什么我有他们在这里, |
| 30 | but if you wanna get them right now and start using them, | 但是如果你现在想要他们开始使用, |
| 31 | then follow the link below. | 然后沿着下面的链接。 |
| 32 | And if you don't wanna miss out on any more of this stuff, | 如果你不想错过这些东西 |
| 33 | then sign up to my newsletter there too. | 然后在那里报名我的通讯。 |
| 34 | But let's actually get talking about | 但让我们谈谈 |
| 35 | what plan mode is first of all. | 什么样的计划模式首先是。 |
| 36 | When you run Claude code or any kind of AI coding assistant | 当你运行 Claude 代码或任何类型的 AI 编码助理 |
| 37 | on your computer, it can do four main things. | 在你的电脑上,它可以做四个主要的事情。 |
| 38 | It can write to the file system, | 它可以写入文件系统, |
| 39 | it can read from the file system, | 它可以从文件系统读取, |
| 40 | or it can read websites and documentation | 或者它能读取网站和文件 |
| 41 | and go and ping URLs, | 并且去浏览URL, |
| 42 | or it can run bash scripts on your local machine, | 或者它可以在你的本地机器上运行bash脚本, |
| 43 | 或者如果你在Windows, PowerShell之类的东西上, | |
| 44 | or it can use MCP servers that are either running locally | 也可以使用本地运行的 MCP 服务器 |
| 45 | or are remote and call tools on them | 或者远程的,或者召唤工具 |
| 46 | to do things and find out information. | 做一些事情,找出信息。 |
| 47 | The way that plan mode works | 计划模式的运作方式 |
| 48 | is you essentially disable the write functionality. | 您是基本禁用写入功能。 |
| 49 | In plan mode, the AI agent isn't allowed to write files | 在计划模式下, AI 代理不允许写入文件 |
| 50 | and the agent has a different system prompt | 而代理器有不同的系统提示 |
| 51 | telling it to do different things | 告诉它做不同的事情 |
| 52 | to actually create a plan before making any changes. | 在做出任何改变之前,实际创建一个计划。 |
| 53 | And if it tries to make changes, | 如果它试图改变, |
| 54 | then it should actually encounter an error. | 然后它会遇到一个错误。 |
| 55 | So it's being stopped from making changes. | 因此它被阻止 做出改变。 |
| 56 | So because the agent can't do any writes to the file system, | 所以,因为代理不能做任何 写文件系统, |
| 57 | it then goes into a mode where it explores your code base, | 然后进入一种模式 探索你的代码基础, |
| 58 | looks for all the information it might need | 寻找所有它可能需要的信息 |
| 59 | and puts that into a detailed plan | 并把它纳入一个详细的计划 |
| 60 | that it will then go to execute on afterwards. | 然后,它将随后执行。 |
| 61 | You can get into plan mode really easily | 你很容易进入计划模式 |
| 62 | by just taking Claude code and just shift tabbing | 刚拿了克劳德的密码 换了个位置 |
| 63 | until you reach plan mode. | 直到你到达计划模式。 |
| 64 | Claude code was the first place that I saw plan mode, | 克劳德代码是我第一次看到计划模式的地方 |
| 65 | I don't know, about nine months ago, let's say. | 我不知道,大约9个月前,让我们说。 |
| 66 | But now other places like Cursor and VS Code | 但是现在其他的地方,如光标码和VS码 |
| 67 | also have plan mode. | 也有计划模式。 |
| 68 | So I've told you what it is, | 所以我告诉你是什么, |
| 69 | but I haven't really told you | 但我没告诉你 |
| 70 | why this plan step here is so crucial. | 为什么这个计划在这里 如此关键。 |
| 71 | What happens if you don't plan | 如果你不计划怎么办? |
| 72 | and instead go straight into executing? | 然后直接执行? |
| 73 | Well, let's start off with the agent first. | 先从探员开始 |
| 74 | I want you to imagine for a second | 我希望你能想象一下, 一会儿 |
| 75 | that you had a colleague who every time they made a commit | 你有一个同事,他们每次犯罪, |
| 76 | forgot everything they'd ever learned about the repo. | 忘记了他们从中学到的一切 |
| 77 | How would you make that colleague productive? | 你怎么让那个同事有成果? |
| 78 | Well, probably what you'd tell them | 好吧,也许你会告诉他们 |
| 79 | is to explore the repo first | 是先探索回购 |
| 80 | before they went and made any changes. | 之前,他们去 并做了任何改变。 |
| 81 | And that's what plan mode does here. | 这就是计划模式在这里所做的。 |
| 82 | It loads up the LLM's context with all the relevant info. | 它将LLM的上下文加载了所有相关信息. |
| 83 | It helps the LLM look at your code base | 它帮助 LLM 查看您的代码基础 |
| 84 | to see code patterns that you're using. | 来查看你使用的代码模式。 |
| 85 | And not only that, it will often use a really cheap, | 不仅如此,它还经常用很便宜的 |
| 86 | fast model to do this. | 快速的模型做到这一点。 |
| 87 | Claude code often uses 4.5 Haiku, | 克劳德代码经常使用4.5海库, |
| 88 | which is really cheap and really, really quick | 非常便宜,非常,非常,非常快 |
| 89 | and launches it in a sub agent. | 然后用副剂发射 |
| 90 | So Haiku can go and ping out loads and loads of requests | 所以海库可以去查查要求的负载 |
| 91 | for different files, and then it sends back a summary | 对于不同的文件,然后它发送回一个摘要 |
| 92 | to the parent more expensive agent. | 给父母更贵的经纪人 |
| 93 | If you had no idea what I just said, | 如果你不知道我刚才说什么 |
| 94 | I will explore that in a future video. | 我会在未来的视频中探讨这个问题。 |
| 95 | But all of this to say that planning helps the agent. | 但所有这一切 都是为了说 计划帮助了代理。 |
| 96 | Now, if you don't do this, | 现在,如果你不这样做, |
| 97 | then the context won't be loaded with relevant information. | 然后上下文就不会包含相关信息 |
| 98 | The LLM might make a stupid mistake | LLM可能会犯一个愚蠢的错误 |
| 99 | because it just doesn't have all the information. | 因为它只是没有 所有的信息。 |
| 100 | It might use patterns or context | 它可能使用模式或上下文 |
| 101 | that aren't actually used in your code base. | 这在你的代码基础里并没有使用 |
| 102 | And so lots of the failure modes that you might be seeing | 所以很多失败模式 你可能看到的 |
| 103 | while using these tools might be down to the fact | 在使用这些工具的同时,可能实际上 |
| 104 | that you're not planning. | 说你没有计划。 |
| 105 | But let's talk about the other side of the coin, | 但我们来谈谈硬币的另一面 |
| 106 | that planning actually helps the developer. | 计划实际上帮助了开发者。 |
| 107 | There's a great maxim from the pragmatic programmer | 实用程序员有个伟大的格言 |
| 108 | that says no one ever knows what they want. | 没人知道他们想要什么 |
| 109 | When you start planning out a new feature or a new idea, | 当你开始规划一个新的功能 或一个新的想法, |
| 110 | you probably don't fully know exactly what you want. | 你可能并不完全知道你想要什么。 |
| 111 | If you're planning a refactor, | 如果你在计划重构 |
| 112 | you might not fully understand | 你可能无法完全理解 |
| 113 | the ramifications of your change. | 你改变的后果。 |
| 114 | When you've got a UI thing to tweak, | 当你有一个UI的东西去调整, |
| 115 | you might have three different options | 你可能有三个不同的选择 |
| 116 | that you're considering in your head. | 你脑子里想着 |
| 117 | The way around this for most developers is rubber ducking, | 对大多数开发商来说 绕着这个方向是橡皮鸭 |
| 118 | is literally talking it out with someone else | 就是跟别人说话 |
| 119 | or a rubber duck in front of you | 或橡皮鸭在你面前 |
| 120 | until you've figured out the best solution | 直到你找到最好的解决方案 |
| 121 | by talking through it, considering all the options. | 通过对话,考虑所有的选择。 |
| 122 | And so an actual planning process helps the developer | 因此,一个实际的规划过程 帮助开发者 |
| 123 | by making sure they have a strong idea of what they want. | 确保他们对自己想要什么有强烈的认识。 |
| 124 | And this process is iterative. | 这个过程是迭代的。 |
| 125 | In other words, you loop back and forth with the AI | 换句话说,你和人工智能循环 |
| 126 | until you have a plan that you feel that you can depend on. | 直到你有你觉得可以依赖的计划 |
| 127 | And that process of the AI suggesting something | 人工智能的这个过程暗示 |
| 128 | and you saying, no, not quite. | 你说,不,不完全。 |
| 129 | By the end of that, both you and the AI | 到最后,你和人工智能 |
| 130 | are gonna have a clearer idea | 将会有一个更清晰的主意 |
| 131 | of what actually needs to be done. | 需要做点什么 |
| 132 | And then the doing of it is really simple | 然后做它真的很简单 |
| 133 | and you can mostly let the AI go on autopilot. | 你可以让AI继续自动驾驶 |
| 134 | Now, if you don't do this, | 现在,如果你不这样做, |
| 135 | then the AI is not going to know quite what you want. | 那么人工智能不会完全知道你想要什么 |
| 136 | You in this situation are like a demanding client | 你这样就像个要求很高的客户 |
| 137 | demanding something gets fixed, | 要求一些东西得到修复, |
| 138 | but the AI doesn't quite know how to implement it. | 但人工智能并不知道如何执行 |
| 139 | Or the AI isn't sure how to please you. | 或者人工智能不确定如何取悦你 |
| 140 | And if you don't talk out the requirements, | 如果你不说出要求 |
| 141 | you're not going to fully know what they are. | 你不会完全知道他们是什么 |
| 142 | Hashing out the requirements before you get to code | 在输入密码之前先按下要求 |
| 143 | is something we've been doing for 50 years as developers. | 是我们50年来作为开发者所做的。 |
| 144 | And there's no reason why we should stop now. | 我们没有理由现在停下来 |
| 145 | So hopefully I've convinced you | 希望我说服了你 |
| 146 | that plan mode is really useful. | 那个计划模式真的有用 |
| 147 | Let's actually walk through a recent trace of mine | 让我们从我的最近踪迹走过去 |
| 148 | so we can see it working. | 这样我们就能看到它起作用了 |
| 149 | I've been working on my course video manager, | 我一直在做我的课程录像经理 |
| 150 | which you've probably seen a few times | 你可能见过几次 |
| 151 | if you've been looking at this channel. | 如果你一直在看这个频道。 |
| 152 | The first thing I did was I entered plan mode | 我所做的第一件事是 我进入了计划模式 |
| 153 | and I described a bug that was happening. | 我描述一个虫子正在发生。 |
| 154 | Essentially in my database, | 在我的数据库里 |
| 155 | 我刚刚从Repos转为repo版本, | |
| 156 | but not all of the code had been migrated yet. | 但并非所有代码都已经迁移。 |
| 157 | So something weird was happening when I added a repo. | 所以当我加回扣时 发生了奇怪的事情 |
| 158 | I didn't type this out, I just dictated this in. | 我没有打字,我只是说这个。 |
| 159 | And by the way, if you're not using a dictation tool | 顺便说一句,如果你没有使用拼写工具 |
| 160 | like whisper flow or super whisper, you absolutely have to, | 就像低语流或超级低语, 你绝对必须, |
| 161 | but that's probably a topic for another video. | 但这可能是另一个视频的主题。 |
| 162 | So what it did is it then ran an explore sub agent | 所以它做的是运行一个探索子代理 |
| 163 | to explore the code base, understand the current schema | 来探索代码基础, 了解当前方案 |
| 164 | and how repos are created. | 和如何创造再现。 |
| 165 | Doing this, it burned around 40,000 tokens, | 做这个,它烧了大约4万个代币, |
| 166 | but bear in mind, it wasn't using Opus 4.5 for this, | 但记住,它不是使用 Opus 4.5 为这个, |
| 167 | it was using Haiku 4.5. | 用的是海库4.5 |
| 168 | And then it said, now I can see the issue clearly. | 然后它说,现在我可以清楚地看到这个问题。 |
| 169 | api.repos.add.ts创建没有版本的段落. | |
| 170 | Let me explore how versions are created elsewhere, | 让我探讨一下其他版本是如何创建的, |
| 171 | understand that create sections method signature. | 理解创建分区的方法签名。 |
| 172 | So the explore sub agent just gave it a little hint | 所以,探险子代理刚刚给了它一点提示 |
| 173 | as to what was going wrong. | 至于什么是错的。 |
| 174 | And then it went and looked itself | 然后它走过去,看着自己 |
| 175 | 创建 repo 版本。 | |
| 176 | Let me check the exact schema definition. | 让我检查一下计划的定义 |
| 177 | And then once it had a full understanding, | 然后,一旦它有一个完全的理解, |
| 178 | it said, let me write the plan. | 它说,让我写计划。 |
| 179 | It saves these plans on the file system | 它保存这些计划到文件系统 |
| 180 | so that you can actually read them yourselves. | 这样你们就可以自己读了 |
| 181 | And in fact, you can see in this directory, | 事实上,你可以看到这个目录, |
| 182 | I have dozens and dozens of plans | 我有几十个计划 |
| 183 | from all of my plan mode usage. | 从我所有的计划模式使用。 |
| 184 | One thing it then did is it asked me some questions. | 然后它做了一件事,它问我一些问题。 |
| 185 | It asked, should new repos default to v1.0 | 它询问, 如果新重置默认值为 v1.0 。 |
| 186 | as the initial version name? | 作为初始版本名称? |
| 187 | And I said, yes. | 我说是的 |
| 188 | So in other words, it was iterating with me | 换句话说,它和我在一起 |
| 189 | towards the solution. | 走向解决方案。 |
| 190 | This was a question that I hadn't answered | 我还没回答这个问题 |
| 191 | in my initial like two line prompt, | 在我的开头像两行提示, |
| 192 | and it figured out it needed that information | 它发现它需要这个信息 |
| 193 | and it asked me the information. | 它问我的信息。 |
| 194 | In other words, I was behaving like a crappy client, | 换句话说 我的行为就像一个烂客户 |
| 195 | not providing all the information upfront. | 没有提前提供所有信息。 |
| 196 | And so I had a question from the developer and I answered it. | 于是我从开发商那里得到了一个问题,我回答了这个问题。 |
| 197 | So I then approved the plan and moved out of plan mode | 于是我批准了这个计划 并脱离了计划模式 |
| 198 | into actual pushing mode. | 进入实际推进模式。 |
| 199 | And from there, it was then able | 从那里,它得以 |
| 200 | {\fn黑体\fs22\bord1\shad0\3aHBE\4aH00\fscx67\fscy66\2cHFFFFFF\3cH808080}真的可以改变 | |
| 201 | Funnily enough, it turned out that there was something | 有意思的是,结果发现有什么东西 |
| 202 | that neither of us had considered, | 我们都没想过 |
| 203 | which was the sections still had a repo ID on them | 里面还有他们的身份 |
| 204 | from the previous iteration. | 从之前的重复。 |
| 205 | I said, surely they can just have a repo version ID | 我说,他们当然可以只 拥有一个Repo版本的ID |
| 206 | and then resolve any dependencies through that. | 然后解决任何依赖 通过这一点。 |
| 207 | So for this, I actually kicked off plan mode again. | 因此,我再次放弃了计划模式。 |
| 208 | It went and did some more exploration here, | 它在这里做了更多的探索 |
| 209 | and then it found that it was a completely different task. | 然后它发现这是一个完全不同的任务。 |
| 210 | So it updated the plan file with this refactor. | 所以它用这个重构器更新了计划文件. |
| 211 | Further down, it then answered, | 更进一步,他回答说: |
| 212 | oh, I answered some more questions, | 哦,我回答了一些更多的问题, |
| 213 | and it then went and did it and executed the code changes. | 然后它去做了它 并实施了代码更改。 |
| 214 | So that's what the plan mode execution loop | 这就是计划模式的循环 |
| 215 | actually looks like. | 看起来像 |
| 216 | And this scales from small changes, as we saw there, | 我们从小的变化中看到这些鳞片, |
| 217 | to actually large scale architectural changes. | 事实上是大尺度的建筑改变 |
| 218 | One really cool thing I've seen people doing | 有件很酷的事我见过人做 |
| 219 | is taking their plans and putting them in GitHub issues | 把他们的计划放到GitHub议题上 |
| 220 | so other people can comment on them. | 所以其他人可以评论他们。 |
| 221 | Kind of like a request for comment RFC proposal | 有点像征求对RFC建议的评论 |
| 222 | where you just put it up, people ping their ideas up there, | 在那里,你刚把它, 人们在他们的想法在那里, |
| 223 | and then you reach a shared solution together. | 然后你们一起达成一个共同的解决办法。 |
| 224 | It's even great to put them on GitHub PRs | 把它们放在GitHub公关上就更好了 |
| 225 | so that someone reviewing your code | 让别人审查你的代码 |
| 226 | can understand what the plan was when you made the code. | 能理解你做密码时的计划是什么 |
| 227 | But there's probably one question | 但也许有一个问题 |
| 228 | that's come into your head immediately. | 你马上就想起来了 |
| 229 | Isn't this just like a huge amount of reading? | 这难道不是一大批的读者吗? |
| 230 | Like, I don't want my job to become | 喜欢,我不想我的工作成为 |
| 231 | just reading product requirement documents all day. | 整天看产品要求文件 |
| 232 | Well, let me show you the single line of text | 好吧,让我告诉你 单行文字 |
| 233 | that I added to my claw.md file | 我加入了我的爪子MD文件 |
| 234 | that has made my plans so much easier to read. | 这让我的计划更容易阅读 |
| 235 | Here it is right here. | 就在这里 |
| 236 | Make the plan extremely concise, | 让计划非常简洁, |
| 237 | sacrifice grammar for the sake of concision. | 牺牲语法是为了切口。 |
| 238 | Now I've talked about this before, | 我之前说过了 |
| 239 | but this is an absolutely key part to my workflow. | 但这绝对是我工作流程的关键部分 |
| 240 | This takes plans that are like 2000 words long | 这需要两千字长的计划 |
| 241 | and puts them in 400 words. | 把它们写成400个字 |
| 242 | It gives you a really detailed high level overview | 这给你一个非常详细的高层次的概述 |
| 243 | of the changes and actually means you can skip through loads | 的修改,实际上意味着您可以跳过负载 |
| 244 | of the plan really, really fast | 计划真的,真的,真的很快 |
| 245 | and just scan it to see if anything looks wrong. | 扫描一下看有没有问题 |
| 246 | And finally, I say at the end of each plan, | 最后,我在每个计划的最后说, |
| 247 | give me a list of unresolved questions to answer if any. | 给我一份尚未解决的问题清单,如果有的话。 |
| 248 | This gives the agent an extra little nudge | 这给了特工一个额外的小动作 |
| 249 | just to ask me anything that it's confused about | 只是想问我任何它困惑的东西 |
| 250 | or not sure about. | 还是不确定 |
| 251 | And it puts it in more of an exploratory, | 更像是在试探 |
| 252 | sort of slightly worried paranoid mode, | 有点担心妄想症 |
| 253 | which is where I want it. | 这就是我想要的地方。 |
| 254 | I strongly recommend you take these literally | 我强烈建议你从字面上拿这些 |
| 255 | three lines of text here, | 这里有三行文字 |
| 256 | take them, put them in your claw.md | 带上,放在你的爪子上 |
| 257 | and you will notice a massive difference in plan mode. | 你会发现计划模式的巨大差异 |
| 258 | I could make this setup longer, right? | 我可以做这个设置更长的时间,对不对? |
| 259 | I could really go into detail here, | 我真的可以详谈一下 |
| 260 | but I don't want to overforce the LLM | 但我不想过度使用LLM |
| 261 | and this claw.md will be put | 和这个爪子,md将被放置 |
| 262 | into every single session I use. | 进入我用的每一场课 |
| 263 | So I find that the concision here | 所以我发现这里的切口 |
| 264 | is actually really essential for steering the LLM better. | 实际上,对于更好地指导LLM来说,这是非常必要的。 |
| 265 | The fewer instructions you use inside your claw.md, | 用在爪子内的指示越少. 医生, |
| 266 | the more instruction budget the LLM has to do other things. | 越多的教学预算 LLM不得不做其他的事情。 |
| 267 | But instruction budget is probably the topic | 但教学预算可能是话题 |
| 268 | for another video, I think. | 我想是另一个视频 |
| 269 | Now there's one final thing to cover here, | 现在还有一件事情要处理 |
| 270 | which I can hear you typing out in the comments immediately. | 我听到你在评论中立刻打字 |
| 271 | I got loads of these comments on my claw.code video as well, | 我爪子上有很多评论 密码录像也, |
| 272 | which covered some similar ground. | 它覆盖了一些相似的地方。 |
| 273 | And what you're probably typing is, | 你可能会打字的是, |
| 274 | I can do this faster myself. | 我自己能快点 |
| 275 | Going through the whole plan mode rigmarole, | 通过整个计划模式的硬币, |
| 276 | then just to get the AI ready to do the work, | 然后让人工智能做好工作 |
| 277 | I can just go into the code base myself, | 我可以自己去密码基地 |
| 278 | change the files and actually just do it. | 更改文件, 并做它。 |
| 279 | And guess what? | 你猜怎么着? |
| 280 | In some cases, you are absolutely right. | 在某些情况下,你绝对是对的。 |
| 281 | When you know the code base inside out, | 当你知道里面的密码时 |
| 282 | when you know exactly the change that needs to be made, | 当你确切地知道 需要做的改变, |
| 283 | you go into the code base | 你进入密码库 |
| 284 | with a massive advantage over the LLM, | 与LLM相比有很大优势, |
| 285 | which is you have all the context already. | 这是你所有的上下文。 |
| 286 | You don't need to send off an explore subagent | 你不需要派潜水员去探险 |
| 287 | to burn tokens to actually understand the code base, | 点燃符牌来真正理解密码基础, |
| 288 | you know it already. | 你已经知道了 |
| 289 | And in those cases, you should absolutely go through | 在这种情况下,你绝对应该通过 |
| 290 | and make the change yourself. | 并亲自改变。 |
| 291 | But here's the thing you should think about, | 但你应该想想 |
| 292 | which is those cases are going to be relatively limited. | 这些案件将相对有限。 |
| 293 | In a large organization, you only have so many repos | 在一个大组织里,你只有这么多回扣 |
| 294 | that you understand deeply. | 你们深知。 |
| 295 | Plan mode allows you to contribute effectively | 计划模式允许您有效贡献 |
| 296 | to repos you don't know that well, | 如果你不知道的话 |
| 297 | because you and the LLM walk in | 因为你和LLM走进来了 |
| 298 | with the same amount of context. | 内容相同 |
| 299 | And plan mode allows you to work your way through the repo, | 计划模式允许你通过回购 |
| 300 | figure out exactly what change needs to be made, | 弄清楚需要做哪些改变, |
| 301 | even if it's in a language | 就算是用一种语言 |
| 302 | that you're not quite that familiar with. | 说你不太熟悉 |
| 303 | And here's the other thing, | 还有一件事 |
| 304 | in this situation where you can do it faster than the LLM, | 在这样的情况下,你可以做到这一点 比LLM, |
| 305 | it's probably quite a simple change. | 这可能是一个相当简单的改变。 |
| 306 | If it's a big architectural tweak, | 如果它是一个大的建筑修饰, |
| 307 | then you probably still want to go | 那你可能还想去 |
| 308 | through the rubber duck process. | 通过橡胶鸭工艺。 |
| 309 | You can do that with a colleague, of course, | 你当然可以和同事一起 |
| 310 | but then you're taking up your colleague's time. | 但你要占用你同事的时间 |
| 311 | Wouldn't it be better to rubber duck with an AI | 用人工智能橡皮鸭不是更好吗? |
| 312 | that can scan the code base, understand what's going on, | 它可以扫描代码基础, 了解发生了什么, |
| 313 | create a plan document, | 创建计划文档, |
| 314 | send that plan document to your buddy, | 把计划文件发给你的朋友 |
| 315 | and say, I've got this plan, what do you think? | 我说,我有这个计划,你觉得呢? |
| 316 | Or you might find with the AI | 或者你可能会发现与AI |
| 317 | that actually the requirements are more solid | 事实上,要求是更坚实的 |
| 318 | than you thought, | 比你想象的还要多 |
| 319 | and you can just get the AI to bash it out. | 你可以让人工智能把它打出来 |
| 320 | The final point here is that these tools | 最后一点是这些工具 |
| 321 | are only going to get faster. | 只会加快速度 |
| 322 | It's an open question | 这个问题没有定论 |
| 323 | as to whether the tools are going to get smarter. | 关于这些工具是否会变得更加聪明。 |
| 324 | I think they're going to get a bit smarter, | 我觉得他们会变得更聪明一点 |
| 325 | but not a lot smarter. | 但没那么聪明 |
| 326 | But what's guaranteed is that they will get faster. | 但可以保证的是,它们会更快。 |
| 327 | And so if your only advantage over AI is your speed, | 如果你对AI的唯一优势是速度 |
| 328 | then that advantage will get eroded more and more and more. | 然后,这种优势会越来越受到侵蚀。 |
| 329 | And so for me, I'm using plan mode every single time | 对我来说,我每次都用计划模式 |
| 330 | because I want to develop familiarity with these tools. | 因为我想让大家熟悉这些工具 |
| 331 | I want to understand how they work | 我想知道他们是怎么工作的 |
| 332 | and what their weaknesses are, | 他们的弱点是什么? |
| 333 | because there are weird weaknesses baked into the cake | 因为蛋糕里有怪异的弱点 |
| 334 | that are not going to be removed however long this goes on for. | 不论持续多久,都无法消除。 |
| 335 | And the more feel I can get for AI, | 我越觉得自己可以得到AI |
| 336 | I know the more secure my career is going forward. | 我知道我的职业越安全 |
| 337 | So that's plan mode, | 这就是计划模式 |
| 338 | this loop where you plan before you execute and test | 执行和测试前的这个循环 |
| 339 | that loads up the LLM with context | 用上下文加载 LLM |
| 340 | and makes your requirements clearer to yourself. | 让你的要求更加明确 |
| 341 | If I had one tip to give to anyone that's doing AI coding, | 如果我有一个提示给任何人 谁做AI编码, |
| 342 | it is to use plan mode. | 这是使用计划模式。 |
| 343 | It is a phenomenal tool for working with AI | 这是与AI合作的惊人工具 |
| 344 | and I honestly could not live without it. | 老实说,我不能没有它。 |
| 345 | And if you want to get the most out of plan mode, | 如果你想摆脱计划模式 |
| 346 | then you've got to follow the link below | 那你得跟着下面的链接 |
| 347 | 获取 myagents.md文件。 | |
| 348 | Thanks for following along folks. | 谢谢你跟随大家 |
| 349 | I've been really enjoying making these AI coding videos. | 我一直很喜欢制作这些 AI编码视频。 |
| 350 | I'll see you in the next one. | 后一见. |
该视频共有字幕 350 条。解锁更多字幕为会员功能,请移动到 价格
P2 · 【AI编程】AI怀疑者尝试plan模式后 · 每个改动都用它 p02 无字幕 (P2)
字幕摘录
| 时间 | 英文 | 中文 |
|---|---|---|
| 0:00 | My interest in AI coding started when I tried PlanMode. | 我对AI编码的兴趣始于我尝试PlanMode时. |
| 0:04 | Before I tried PlanMode, I was a total AI skeptic. | 在尝试PlanMode之前,我是一个完全AI怀疑。 |
| 0:06 | I thought, there's no way that AI can write decent code. | 我想AI不可能写得像样 |
| 0:09 | Certainly not at the speed that I can. | 当然不是以我所能的速度。 |
| 0:10 | There's no way that AI can understand my code base | AI不可能理解我的密码基础 |
| 0:13 | as well as I can. | 尽我所能 |
| 0:14 | And there's no way that AI can mimic the instincts | AI不可能模仿直觉 |
| 0:16 | that I've built up over a long career doing this stuff. | 我花了很长的时间做这些事 |
| 0:19 | 然后Claude Code发布了PlanMode 我尝试过 | |
| 0:22 | and I've never gone back. | 我从来没有回去。 |
展开字幕全文(351 条)
| 序号 | 英文 | 中文 |
|---|---|---|
| 1 | My interest in AI coding started when I tried PlanMode. | 我对AI编码的兴趣始于我尝试PlanMode时. |
| 2 | Before I tried PlanMode, I was a total AI skeptic. | 在尝试PlanMode之前,我是一个完全AI怀疑。 |
| 3 | I thought, there's no way that AI can write decent code. | 我想AI不可能写得像样 |
| 4 | Certainly not at the speed that I can. | 当然不是以我所能的速度。 |
| 5 | There's no way that AI can understand my code base | AI不可能理解我的密码基础 |
| 6 | as well as I can. | 尽我所能 |
| 7 | And there's no way that AI can mimic the instincts | AI不可能模仿直觉 |
| 8 | that I've built up over a long career doing this stuff. | 我花了很长的时间做这些事 |
| 9 | 然后Claude Code发布了PlanMode 我尝试过 | |
| 10 | and I've never gone back. | 我从来没有回去。 |
| 11 | Every piece of code I write now goes through this loop | 我写的每件代码都经过这个循环 |
| 12 | where I first plan it in PlanMode with an AI. | 我首先在PlanMode用人工智能计划 |
| 13 | I then get the AI to execute the plan, | 然后,我得到了AI执行计划, |
| 14 | basically write the code that was in the plan. | 基本上写出计划中的密码 |
| 15 | We then test it together either by running unit tests | 然后我们一起测试 通过运行单元测试 |
| 16 | or by type checking or by manual QA. | 或通过类型检查或人工质量控制。 |
| 17 | Then we commit the code and the process starts again | 然后我们输入代码 程序重新开始 |
| 18 | and we start planning the new thing. | 我们开始计划新的事情。 |
| 19 | I believe this process is completely indispensable | 我认为这个过程是绝对不可或缺的 |
| 20 | to getting decent outputs from an AI. | 从人工智能那里获得体面的产出。 |
| 21 | And if you drop this plan step altogether, | 如果你完全放弃这个计划 |
| 22 | then you are really hampering yourself | 那你真的在妨碍自己 |
| 23 | in terms of what you can do. | 就你所能做的而言 |
| 24 | Now for folks who want to skip to the end | 现在给那些想跳到最后的人 |
| 25 | and get the good stuff immediately, | 并立即得到好的东西, |
| 26 | I've added a link below that shares my rules | 我下面加了一个链接 分享我的规则 |
| 27 | for creating really great plans in my Claude.md file. | 在我的Claude.Md档案里创造出非常伟大的计划 |
| 28 | We're gonna be going through some of these | 我们会经历一些这些 |
| 29 | and why I have them in here, | 和为什么我有他们在这里, |
| 30 | but if you wanna get them right now and start using them, | 但是如果你现在想要他们开始使用, |
| 31 | then follow the link below. | 然后沿着下面的链接。 |
| 32 | And if you don't wanna miss out on any more of this stuff, | 如果你不想错过这些东西 |
| 33 | then sign up to my newsletter there too. | 然后在那里报名我的通讯。 |
| 34 | But let's actually get talking about | 但让我们谈谈 |
| 35 | PlanMode是怎样的第一。 | |
| 36 | When you run Claude Code or any kind of AI coding assistant | 当你运行 Claude 代码或任何类型的 AI 编码助理 |
| 37 | on your computer, it can do four main things. | 在你的电脑上,它可以做四个主要的事情。 |
| 38 | It can write to the file system, | 它可以写入文件系统, |
| 39 | it can read from the file system, | 它可以从文件系统读取, |
| 40 | or it can read websites and documentation | 或者它能读取网站和文件 |
| 41 | and go and ping URLs, | 并且去浏览URL, |
| 42 | or it can run bash scripts on your local machine, | 或者它可以在你的本地机器上运行bash脚本, |
| 43 | 或者如果你在Windows, PowerShell之类的东西上, | |
| 44 | or it can use MCP servers that are either running locally | 也可以使用本地运行的 MCP 服务器 |
| 45 | or are remote and call tools on them | 或者远程的,或者召唤工具 |
| 46 | to do things and find out information. | 做一些事情,找出信息。 |
| 47 | The way that PlanMode works | 计划模式的运作方式 |
| 48 | is you essentially disable the write functionality. | 您是基本禁用写入功能。 |
| 49 | 在PlanMode中,AI代理不允许写文件, | |
| 50 | and the agent has a different system prompt | 而代理器有不同的系统提示 |
| 51 | telling it to do different things | 告诉它做不同的事情 |
| 52 | to actually create a plan before making any changes. | 在做出任何改变之前,实际创建一个计划。 |
| 53 | And if it tries to make changes, | 如果它试图改变, |
| 54 | then it should actually encounter an error. | 然后它会遇到一个错误。 |
| 55 | So it's being stopped from making changes. | 因此它被阻止 做出改变。 |
| 56 | So because the agent can't do any writes to the file system, | 所以,因为代理不能做任何 写文件系统, |
| 57 | it then goes into a mode where it explores your code base, | 然后进入一种模式 探索你的代码基础, |
| 58 | looks for all the information it might need | 寻找所有它可能需要的信息 |
| 59 | and puts that into a detailed plan | 并把它纳入一个详细的计划 |
| 60 | that it will then go to execute on afterwards. | 然后,它将随后执行。 |
| 61 | You can get into PlanMode really easily | 你很容易进入计划模式 |
| 62 | by just taking Claude Code and just shift-tabbing | 刚采取克劳德代码 和只是转身 |
| 63 | until you reach PlanMode. | 直到你到达计划模式。 |
| 64 | Claude Code是我第一次见到PlanMode的地方, | |
| 65 | I don't know, about nine months ago, let's say, | 我不知道,大约九个月前,让我们说, |
| 66 | but now other places like Cursor and VS Code | 但是现在其他的地方,如光标和VS代码 |
| 67 | also have PlanMode. | 还有"计划模式" |
| 68 | So I've told you what it is, | 所以我告诉你是什么, |
| 69 | but I haven't really told you | 但我没告诉你 |
| 70 | why this plan step here is so crucial. | 为什么这个计划在这里 如此关键。 |
| 71 | What happens if you don't plan | 如果你不计划怎么办? |
| 72 | and instead go straight into executing? | 然后直接执行? |
| 73 | Well, let's start off with the agent first. | 先从探员开始 |
| 74 | I want you to imagine for a second | 我希望你能想象一下, 一会儿 |
| 75 | that you had a colleague who every time they made a commit | 你有一个同事,他们每次犯罪, |
| 76 | forgot everything they'd ever learned about the repo. | 忘记了他们从中学到的一切 |
| 77 | How would you make that colleague productive? | 你怎么让那个同事有成果? |
| 78 | Well, probably what you'd tell them | 好吧,也许你会告诉他们 |
| 79 | is to explore the repo first | 是先探索回购 |
| 80 | before they went and made any changes. | 之前,他们去 并做了任何改变。 |
| 81 | And that's what PlanMode does here. | 这就是PlanMode在这里的工作。 |
| 82 | It loads up the LLM's context with all the relevant info. | 它将LLM的上下文加载了所有相关信息. |
| 83 | It helps the LLM look at your code base | 它帮助 LLM 查看您的代码基础 |
| 84 | to see code patterns that you're using. | 来查看你使用的代码模式。 |
| 85 | And not only that, it will often use a really cheap, | 不仅如此,它还经常用很便宜的 |
| 86 | fast model to do this. | 快速的模型做到这一点。 |
| 87 | Claude Code often uses 4.5 Haiku, | 克劳德代码经常使用4.5 海库 |
| 88 | which is really cheap and really, really quick | 非常便宜,非常,非常,非常快 |
| 89 | and launches it in a sub-agent, | 然后用一种试剂, |
| 90 | so Haiku can go and ping out loads and loads of requests | 所以海库可以去和 拨出负载和负载的请求 |
| 91 | for different files, and then it sends back a summary | 对于不同的文件,然后它发送回一个摘要 |
| 92 | to the parent, more expensive agent. | 给父母 更贵的经纪人 |
| 93 | If you had no idea what I just said, | 如果你不知道我刚才说什么 |
| 94 | I will explore that in a future video. | 我会在未来的视频中探讨这个问题。 |
| 95 | But all of this to say that planning helps the agent. | 但所有这一切 都是为了说 计划帮助了代理。 |
| 96 | Now, if you don't do this, | 现在,如果你不这样做, |
| 97 | then the context won't be loaded with relevant information. | 然后上下文就不会包含相关信息 |
| 98 | The LLM might make a stupid mistake | LLM可能会犯一个愚蠢的错误 |
| 99 | because it just doesn't have all the information. | 因为它只是没有 所有的信息。 |
| 100 | It might use patterns or context | 它可能使用模式或上下文 |
| 101 | that aren't actually used in your code base. | 这在你的代码基础里并没有使用 |
| 102 | And so lots of the failure modes that you might be seeing | 所以很多失败模式 你可能看到的 |
| 103 | while using these tools might be down to the fact | 在使用这些工具的同时,可能实际上 |
| 104 | that you're not planning. | 说你没有计划。 |
| 105 | But let's talk about the other side of the coin, | 但我们来谈谈硬币的另一面 |
| 106 | that planning actually helps the developer. | 计划实际上帮助了开发者。 |
| 107 | There's a great maxim from the pragmatic programmer | 实用程序员有个伟大的格言 |
| 108 | that says no one ever knows what they want. | 没人知道他们想要什么 |
| 109 | When you start planning out a new feature or a new idea, | 当你开始规划一个新的功能 或一个新的想法, |
| 110 | you probably don't fully know exactly what you want. | 你可能并不完全知道你想要什么。 |
| 111 | If you're planning a refactor, | 如果你在计划重构 |
| 112 | you might not fully understand | 你可能无法完全理解 |
| 113 | the ramifications of your change. | 你改变的后果。 |
| 114 | When you've got a UI thing to tweak, | 当你有一个UI的东西去调整, |
| 115 | you might have three different options | 你可能有三个不同的选择 |
| 116 | that you're considering in your head. | 你脑子里想着 |
| 117 | The way around this for most developers is rubber ducking, | 对大多数开发商来说 绕着这个方向是橡皮鸭 |
| 118 | is literally talking it out with someone else | 就是跟别人说话 |
| 119 | or a rubber duck in front of you | 或橡皮鸭在你面前 |
| 120 | until you've figured out the best solution | 直到你找到最好的解决方案 |
| 121 | by talking through it, considering all the options. | 通过对话,考虑所有的选择。 |
| 122 | And so an actual planning process helps the developer | 因此,一个实际的规划过程 帮助开发者 |
| 123 | by making sure they have a strong idea of what they want. | 确保他们对自己想要什么有强烈的认识。 |
| 124 | And this process is iterative. | 这个过程是迭代的。 |
| 125 | In other words, you loop back and forth with the AI | 换句话说,你和人工智能循环 |
| 126 | until you have a plan that you feel that you can depend on. | 直到你有你觉得可以依赖的计划 |
| 127 | And that process of the AI suggesting something | 人工智能的这个过程暗示 |
| 128 | and you saying, no, not quite. | 你说,不,不完全。 |
| 129 | By the end of that, both you and the AI | 到最后,你和人工智能 |
| 130 | are gonna have a clearer idea | 将会有一个更清晰的主意 |
| 131 | of what actually needs to be done. | 需要做点什么 |
| 132 | And then the doing of it is really simple | 然后做它真的很简单 |
| 133 | and you can mostly let the AI go on autopilot. | 你可以让AI继续自动驾驶 |
| 134 | Now, if you don't do this, | 现在,如果你不这样做, |
| 135 | then the AI is not going to know quite what you want. | 那么人工智能不会完全知道你想要什么 |
| 136 | You in this situation are like a demanding client, | 在这样的情况下,你就像一个要求很高的客户, |
| 137 | demanding something gets fixed, | 要求一些东西得到修复, |
| 138 | but the AI doesn't quite know how to implement it. | 但人工智能并不知道如何执行 |
| 139 | Or the AI isn't sure how to please you. | 或者人工智能不确定如何取悦你 |
| 140 | And if you don't talk out the requirements, | 如果你不说出要求 |
| 141 | you're not going to fully know what they are. | 你不会完全知道他们是什么 |
| 142 | Hashing out the requirements before you get to code | 在输入密码之前先按下要求 |
| 143 | is something we've been doing for 50 years as developers. | 是我们50年来作为开发者所做的。 |
| 144 | And there's no reason why we should stop now. | 我们没有理由现在停下来 |
| 145 | So hopefully I've convinced you | 希望我说服了你 |
| 146 | that plan mode is really useful. | 那个计划模式真的有用 |
| 147 | Let's actually walk through a recent trace of mine | 让我们从我的最近踪迹走过去 |
| 148 | so we can see it working. | 这样我们就能看到它起作用了 |
| 149 | I've been working on my course video manager, | 我一直在做我的课程录像经理 |
| 150 | which you've probably seen a few times | 你可能见过几次 |
| 151 | if you've been looking at this channel. | 如果你一直在看这个频道。 |
| 152 | The first thing I did was I entered plan mode | 我所做的第一件事是 我进入了计划模式 |
| 153 | and I described a bug that was happening. | 我描述一个虫子正在发生。 |
| 154 | Essentially in my database, | 在我的数据库里 |
| 155 | 我刚刚从Repos转为repo版本, | |
| 156 | but not all of the code had been migrated yet. | 但并非所有代码都已经迁移。 |
| 157 | So something weird was happening when I added a repo. | 所以当我加回扣时 发生了奇怪的事情 |
| 158 | I didn't type this out, I just dictated this in. | 我没有打字,我只是说这个。 |
| 159 | And by the way, if you're not using a dictation tool | 顺便说一句,如果你没有使用拼写工具 |
| 160 | like whisper flow or super whisper, you absolutely have to, | 就像低语流或超级低语, 你绝对必须, |
| 161 | but that's probably a topic for another video. | 但这可能是另一个视频的主题。 |
| 162 | So what it did is it then ran an explore sub agent | 所以它做的是运行一个探索子代理 |
| 163 | to explore the code base, understand the current schema | 来探索代码基础, 了解当前方案 |
| 164 | and how repos are created. | 和如何创造再现。 |
| 165 | Doing this, it burned around 40,000 tokens, | 做这个,它烧了大约4万个代币, |
| 166 | but bear in mind, it wasn't using Opus 4.5 for this, | 但记住,它不是使用 Opus 4.5 为这个, |
| 167 | it was using Haiku 4.5. | 用的是海库4.5 |
| 168 | And then it said, now I can see the issue clearly. | 然后它说,现在我可以清楚地看到这个问题。 |
| 169 | api.repos.add.ts创建没有版本的段落. | |
| 170 | Let me explore how versions are created elsewhere, | 让我探讨一下其他版本是如何创建的, |
| 171 | understand that create sections method signature. | 理解创建分区的方法签名。 |
| 172 | So the explore sub agent just gave it a little hint | 所以,探险子代理刚刚给了它一点提示 |
| 173 | as to what was going wrong. | 至于什么是错的。 |
| 174 | And then it went and looked itself | 然后它走过去,看着自己 |
| 175 | 创建 repo 版本。 | |
| 176 | Let me check the exact schema definition. | 让我检查一下计划的定义 |
| 177 | And then once it had a full understanding, | 然后,一旦它有一个完全的理解, |
| 178 | it said, let me write the plan. | 它说,让我写计划。 |
| 179 | It saves these plans on the file system | 它保存这些计划到文件系统 |
| 180 | so that you can actually read them yourselves. | 这样你们就可以自己读了 |
| 181 | And in fact, you can see in this directory, | 事实上,你可以看到这个目录, |
| 182 | I have dozens and dozens of plans | 我有几十个计划 |
| 183 | from all of my plan mode usage. | 从我所有的计划模式使用。 |
| 184 | One thing it then did is it asked me some questions. | 然后它做了一件事,它问我一些问题。 |
| 185 | It asked, should new repos default to v1.0 | 它询问, 如果新重置默认值为 v1.0 。 |
| 186 | as the initial version name? | 作为初始版本名称? |
| 187 | And I said, yes. | 我说是的 |
| 188 | So in other words, it was iterating with me | 换句话说,它和我在一起 |
| 189 | towards the solution. | 走向解决方案。 |
| 190 | This was a question that I hadn't answered | 我还没回答这个问题 |
| 191 | in my initial like two line prompt, | 在我的开头像两行提示, |
| 192 | and it figured out it needed that information | 它发现它需要这个信息 |
| 193 | and it asked me the information. | 它问我的信息。 |
| 194 | In other words, I was behaving like a crappy client, | 换句话说 我的行为就像一个烂客户 |
| 195 | not providing all the information upfront. | 没有提前提供所有信息。 |
| 196 | And so I had a question from the developer and I answered it. | 于是我从开发商那里得到了一个问题,我回答了这个问题。 |
| 197 | So I then approved the plan and moved out of plan mode | 于是我批准了这个计划 并脱离了计划模式 |
| 198 | into actual pushing mode. | 进入实际推进模式。 |
| 199 | And from there, it was then able | 从那里,它得以 |
| 200 | {\fn黑体\fs22\bord1\shad0\3aHBE\4aH00\fscx67\fscy66\2cHFFFFFF\3cH808080}真的可以改变 | |
| 201 | Funnily enough, it turned out that there was something | 有意思的是,结果发现有什么东西 |
| 202 | that neither of us had considered, | 我们都没想过 |
| 203 | which was the sections still had a repo ID on them | 里面还有他们的身份 |
| 204 | from the previous iteration. | 从之前的重复。 |
| 205 | I said, surely they can just have a repo version ID | 我说,他们当然可以只 拥有一个Repo版本的ID |
| 206 | and then resolve any dependencies through that. | 然后解决任何依赖 通过这一点。 |
| 207 | So for this, I actually kicked off plan mode again. | 因此,我再次放弃了计划模式。 |
| 208 | It went and did some more exploration here, | 它在这里做了更多的探索 |
| 209 | and then it found that it was a completely different task. | 然后它发现这是一个完全不同的任务。 |
| 210 | So it updated the plan file with this refactor. | 所以它用这个重构器更新了计划文件. |
| 211 | Further down, it then answered, | 更进一步,他回答说: |
| 212 | oh, I answered some more questions, | 哦,我回答了一些更多的问题, |
| 213 | and it then went and did it and executed the code changes. | 然后它去做了它 并实施了代码更改。 |
| 214 | So that's what the plan mode execution loop | 这就是计划模式的循环 |
| 215 | actually looks like. | 看起来像 |
| 216 | And this scales from small changes, as we saw there, | 我们从小的变化中看到这些鳞片, |
| 217 | to actually large scale architectural changes. | 事实上是大尺度的建筑改变 |
| 218 | One really cool thing I've seen people doing | 有件很酷的事我见过人做 |
| 219 | is taking their plans and putting them in GitHub issues | 把他们的计划放到GitHub议题上 |
| 220 | so other people can comment on them. | 所以其他人可以评论他们。 |
| 221 | Kind of like a request for comment RFC proposal | 有点像征求对RFC建议的评论 |
| 222 | where you just put it up, people ping their ideas up there, | 在那里,你刚把它, 人们在他们的想法在那里, |
| 223 | and then you reach a shared solution together. | 然后你们一起达成一个共同的解决办法。 |
| 224 | It's even great to put them on GitHub PRs | 把它们放在GitHub公关上就更好了 |
| 225 | so that someone reviewing your code | 让别人审查你的代码 |
| 226 | can understand what the plan was when you made the code. | 能理解你做密码时的计划是什么 |
| 227 | But there's probably one question | 但也许有一个问题 |
| 228 | that's come into your head immediately. | 你马上就想起来了 |
| 229 | Isn't this just like a huge amount of reading? | 这难道不是一大批的读者吗? |
| 230 | Like I don't want my job to become | 就像我不想我的工作变成 |
| 231 | just reading product requirement documents all day. | 整天看产品要求文件 |
| 232 | Well, let me show you the single line of text | 好吧,让我告诉你 单行文字 |
| 233 | that I added to my claw.md file | 我加入了我的爪子MD文件 |
| 234 | that has made my plans so much easier to read. | 这让我的计划更容易阅读 |
| 235 | Here it is right here. | 就在这里 |
| 236 | Make the plan extremely concise, | 让计划非常简洁, |
| 237 | sacrifice grammar for the sake of concision. | 牺牲语法是为了切口。 |
| 238 | Now I've talked about this before, | 我之前说过了 |
| 239 | but this is an absolutely key part to my workflow. | 但这绝对是我工作流程的关键部分 |
| 240 | This takes plans that are like 2000 words long | 这需要两千字长的计划 |
| 241 | and puts them in 400 words. | 把它们写成400个字 |
| 242 | It gives you a really detailed high level overview | 这给你一个非常详细的高层次的概述 |
| 243 | of the changes and actually means you can skip through | 更改并实际表示您可以跳过 |
| 244 | loads of the plan really, really fast | 计划真的,真的,真的快 |
| 245 | and just scan it to see if anything looks wrong. | 扫描一下看有没有问题 |
| 246 | And finally, I say at the end of each plan, | 最后,我在每个计划的最后说, |
| 247 | give me a list of unresolved questions to answer, if any. | 如果有的话,请给我一份未决问题清单。 |
| 248 | This gives the agent an extra little nudge | 这给了特工一个额外的小动作 |
| 249 | just to ask me anything that it's confused about | 只是想问我任何它困惑的东西 |
| 250 | or not sure about. | 还是不确定 |
| 251 | And it puts it in more of an exploratory, | 更像是在试探 |
| 252 | sort of slightly worried paranoid mode, | 有点担心妄想症 |
| 253 | which is where I want it. | 这就是我想要的地方。 |
| 254 | I strongly recommend you take these literally | 我强烈建议你从字面上拿这些 |
| 255 | three lines of text here, | 这里有三行文字 |
| 256 | take them, put them in your claw.md | 带上,放在你的爪子上 |
| 257 | and you will notice a massive difference in plan mode. | 你会发现计划模式的巨大差异 |
| 258 | I could make this set up longer, right? | 我可以做这个设置更长的时间,对不对? |
| 259 | I could really go into detail here, | 我真的可以详谈一下 |
| 260 | but I don't want to overforce the LLM | 但我不想过度使用LLM |
| 261 | and this claw.md will be put into | 而这个爪子... 将投入 |
| 262 | every single session I use. | 每一次我用过的课 |
| 263 | So I find that the concision here | 所以我发现这里的切口 |
| 264 | is actually really essential for steering the LLM better. | 实际上,对于更好地指导LLM来说,这是非常必要的。 |
| 265 | The fewer instructions you use inside your claw.md, | 用在爪子内的指示越少. 医生, |
| 266 | the more instruction budget the LLM has to do other things. | 越多的教学预算 LLM不得不做其他的事情。 |
| 267 | But instruction budget is probably the topic | 但教学预算可能是话题 |
| 268 | for another video, I think. | 我想是另一个视频 |
| 269 | Now there's one final thing to cover here, | 现在还有一件事情要处理 |
| 270 | which I can hear you typing out in the comments immediately. | 我听到你在评论中立刻打字 |
| 271 | I've got loads of these comments | 我有很多这些评论 |
| 272 | on my claw.code video as well, | 在我的爪子上。 密码录像也, |
| 273 | which covered some similar ground. | 它覆盖了一些相似的地方。 |
| 274 | And what you're probably typing is, | 你可能会打字的是, |
| 275 | I can do this faster myself. | 我自己能快点 |
| 276 | Going through the whole plan mode rigmarole, | 通过整个计划模式的硬币, |
| 277 | then just to get the AI ready to do the work, | 然后让人工智能做好工作 |
| 278 | I can just go into the code base myself, | 我可以自己去密码基地 |
| 279 | change the files and actually just do it. | 更改文件, 并做它。 |
| 280 | And guess what? | 你猜怎么着? |
| 281 | In some cases, you are absolutely right. | 在某些情况下,你绝对是对的。 |
| 282 | When you know the code base inside out, | 当你知道里面的密码时 |
| 283 | when you know exactly the change that needs to be made, | 当你确切地知道 需要做的改变, |
| 284 | you go into the code base | 你进入密码库 |
| 285 | with a massive advantage over the LLM, | 与LLM相比有很大优势, |
| 286 | which is you have all the context already. | 这是你所有的上下文。 |
| 287 | You don't need to send off an explore subagent | 你不需要派潜水员去探险 |
| 288 | to burn tokens to actually understand the code base. | 以燃烧符号来实际理解代码基础。 |
| 289 | You know it already. | 你已经知道了 |
| 290 | And in those cases, you should absolutely go through | 在这种情况下,你绝对应该通过 |
| 291 | and make the change yourself. | 并亲自改变。 |
| 292 | But here's the thing you should think about, | 但你应该想想 |
| 293 | which is those cases are going to be relatively limited. | 这些案件将相对有限。 |
| 294 | In a large organization, you only have so many repos | 在一个大组织里,你只有这么多回扣 |
| 295 | that you understand deeply. | 你们深知。 |
| 296 | Plan mode allows you to contribute effectively | 计划模式允许您有效贡献 |
| 297 | to repos you don't know that well, | 如果你不知道的话 |
| 298 | because you and the LLM walk in | 因为你和LLM走进来了 |
| 299 | with the same amount of context. | 内容相同 |
| 300 | And plan mode allows you to work your way through the repo, | 计划模式允许你通过回购 |
| 301 | figure out exactly what change needs to be made, | 弄清楚需要做哪些改变, |
| 302 | even if it's in a language | 就算是用一种语言 |
| 303 | that you're not quite that familiar with. | 说你不太熟悉 |
| 304 | And here's the other thing, | 还有一件事 |
| 305 | in this situation where you can do it faster than the LLM, | 在这样的情况下,你可以做到这一点 比LLM, |
| 306 | it's probably quite a simple change. | 这可能是一个相当简单的改变。 |
| 307 | If it's a big architectural tweak, | 如果它是一个大的建筑修饰, |
| 308 | then you probably still want to go | 那你可能还想去 |
| 309 | through the rubber duck process. | 通过橡胶鸭工艺。 |
| 310 | You can do that with a colleague, of course, | 你当然可以和同事一起 |
| 311 | but then you're taking up your colleague's time. | 但你要占用你同事的时间 |
| 312 | Wouldn't it be better to rubber duck | 橡皮鸭不是更好吗? |
| 313 | with an AI that can scan the code base, | 一个能扫描密码基础的AI, |
| 314 | understand what's going on, create a plan document, | 了解发生了什么, 创建计划文件, |
| 315 | send that plan document to your buddy, | 把计划文件发给你的朋友 |
| 316 | and say, I've got this plan, what do you think? | 我说,我有这个计划,你觉得呢? |
| 317 | Or you might find with the AI | 或者你可能会发现与AI |
| 318 | that actually the requirements are more solid | 事实上,要求是更坚实的 |
| 319 | than you thought, and you can just get the AI | 比你想象的还要多 你可以拿到人工智能 |
| 320 | to bash it out. | 击出它。 |
| 321 | The final point here is that these tools | 最后一点是这些工具 |
| 322 | are only going to get faster. | 只会加快速度 |
| 323 | It's an open question as to whether | 是否 |
| 324 | the tools are going to get smarter. | 工具会变得更聪明 |
| 325 | I think they're going to get a bit smarter, | 我觉得他们会变得更聪明一点 |
| 326 | but not a lot smarter. | 但没那么聪明 |
| 327 | But what's guaranteed is that they will get faster. | 但可以保证的是,它们会更快。 |
| 328 | And so if your only advantage over AI is your speed, | 如果你对AI的唯一优势是速度 |
| 329 | then that advantage will get eroded more and more and more. | 然后,这种优势会越来越受到侵蚀。 |
| 330 | And so for me, I'm using plan mode every single time | 对我来说,我每次都用计划模式 |
| 331 | because I want to develop familiarity with these tools. | 因为我想让大家熟悉这些工具 |
| 332 | I want to understand how they work | 我想知道他们是怎么工作的 |
| 333 | and what their weaknesses are, | 他们的弱点是什么? |
| 334 | because there are weird weaknesses baked into the cake | 因为蛋糕里有怪异的弱点 |
| 335 | that are not going to be removed however long this goes on for. | 不论持续多久,都无法消除。 |
| 336 | And the more feel I can get for AI, | 我越觉得自己可以得到AI |
| 337 | I know the more secure my career is going forward. | 我知道我的职业越安全 |
| 338 | So that's plan mode. | 这就是计划模式。 |
| 339 | This loop where you plan before you execute and test | 执行和测试前的循环 |
| 340 | that loads up the LLM with context | 用上下文加载 LLM |
| 341 | and makes your requirements clearer to yourself. | 让你的要求更加明确 |
| 342 | If I had one tip to give to anyone that's doing AI coding, | 如果我有一个提示给任何人 谁做AI编码, |
| 343 | it is to use plan mode. | 这是使用计划模式。 |
| 344 | It is a phenomenal tool for working with AI | 这是与AI合作的惊人工具 |
| 345 | and I honestly could not live without it. | 老实说,我不能没有它。 |
| 346 | And if you want to get the most out of plan mode, | 如果你想摆脱计划模式 |
| 347 | then you've got to follow the link below | 那你得跟着下面的链接 |
| 348 | 获取 myagents.md文件。 | |
| 349 | Thanks for following along folks. | 谢谢你跟随大家 |
| 350 | I've been really enjoying making these AI coding videos. | 我一直很喜欢制作这些 AI编码视频。 |
| 351 | I'll see you in the next one. | 后一见. |
该视频共有字幕 351 条。解锁更多字幕为会员功能,请移动到 价格
