跟读练习: I was an AI skeptic. Then I tried plan mode - 通过视频学习英语口语

正在创建课程...
1
My interest in AI coding started when I tried plan mode.
2
Before I tried plan mode, I was a total AI skeptic.
3
I thought, there's no way that AI can write decent code.
4
It's certainly not at the speed that I can.
5
There's no way that AI can understand my code base as well as I can.
6
And there's no way that AI can mimic the instincts that I've built up over a long career doing this stuff.
7
And then Claude Code released plan mode.
8
And I tried it, and I've never gone back.
9
Every piece of code I write now goes through this loop, where I first plan it in plan mode with an AI.
10
I then get the AI to execute the plan, basically write the code that was in the plan.
11
We then test it together, either by running unit tests or by type checking or by manual QA.
12
Then we commit the code and the process starts again and we start planning the new thing.
13
I believe this process is completely indispensable to getting decent outputs from an AI.
14
And if you drop this plan step altogether, then you are really hampering yourself in terms of what you can do.
15
Now, for folks who want to skip to the end and get the good stuff immediately, I've added a link below that shares my rules for creating really great plans in my claw.md file.
16
We're going to be going through some of these and why I have them in here, but if you want to get them right now and start using them, then follow the link below.
17
And if you don't want to miss out on any more of this stuff, then sign up to my newsletter there too.
18
But let's actually get talking about what plan mode is, first of all.
19
When you run claw code or any kind of AI coding assistant on your computer, it can do four main things.
20
It can write to the file system.
21
It can read from the file system, or it can read websites and documentation and go and ping URLs, or it can run bash scripts on your local machine, or if you're on Windows,
22
you know, PowerShell or anything like that.
23
Or it can use MCP servers that are either running locally
24
or are remote and call tools on them to do things and find out information.
25
The way that plan mode works is you essentially disable the write functionality.
26
In plan mode, the AI agent isn't allowed to write files, and the agent has a different system prompt telling it to
27
do different things to actually create a plan before making any changes.
28
And if it tries to make changes, then it should actually encounter an error.
29
So it's being stopped from making changes.
30
So because the agent can't do any writes to the file system, it then goes into a mode where it explores your code base, looks for all the information it might need,
31
and puts that into a detailed plan that it will then go to execute on afterwards.
32
You can get into plan mode really easily by just taking clawed code and just shift-tabbing until you reach plan mode.
33
Clawcode was the first place that I saw plan mode, I don't know, about nine months ago, let's say.
34
But now other places like Cursor and VS Code also have plan mode.
35
So I've told you what it is, but I haven't really told you why this plan step here is so crucial.
36
What happens if you don't plan and instead go straight into executing?
37
Well, let's start off with the agent first.
38
I want you to imagine for a second
39
that you had a colleague who every time they made a commit forgot everything they'd ever learned about the repo.
40
How would you make that colleague productive?
41
Well, probably what you'd tell them is to explore the repo first before they went and made any changes.
42
And that's what PlanMode does here.
43
It loads up the LLM's context with all the relevant info.
44
It helps the LLM look at your codebase to see code patterns that you're using.
45
And not only that, it will often use a really cheap, fast model to do this.
46
Claude Code often uses 4.5 Haiku, which is really cheap and really, really quick, and launches it in a sub-agent so Haiku can go
47
and ping out loads and loads of requests for different files, and then it sends back a summary to the parent, more expensive agent.
48
If you had no idea what I just said, I will explore that in a future video.
49
But all of this to say that planning helps the agent.
50
Now if you don't do this then the context won't be loaded with relevant information.
51
The LLM might make a stupid mistake because it just doesn't have all the information.
52
It might use patterns or context that aren't actually used in your codebase.
53
And so lots of the failure modes that you might be seeing
54
while using these tools might be down to the fact that you're not planning.
55
But let's talk about the other side of the coin, that planning actually helps the developer.
56
There's a great maxim from the pragmatic programmer that says no one ever knows what they want.
57
planning out a new feature or a new idea you probably don't fully know exactly what you want.
58
If you're planning a refactor you might not fully understand the ramifications of your change.
59
When you've got a UI thing to tweak you might have three different options that you're considering in your head.
60
The way around this for most developers is rubber ducking, is literally talking it out with someone else
61
or a rubber duck in front of you until you've figured
62
out the best solution by talking through it considering all the options.
63
And so an actual planning process helps the the developer by making sure they have a strong idea of what they want.
64
And this process is iterative.
65
In other words, you loop back
66
and forth with the AI until you have a plan that you feel that you can depend on.
67
And that process of the AI suggesting something and you saying, no, not quite.
68
By the end of that, both you and the AI are going to have a clearer idea of what actually needs to be done.
69
And then the doing of it is really simple and you can mostly let the AI go on autopilot.
70
Now, if you don't do this, then the AI is not going to know quite what you want.
71
You in this situation are like a demanding client, demanding something gets fixed, but the AI doesn't quite know how to implement it.
72
Or the AI isn't sure how to please you.
73
And if you don't talk out the requirements, you're not going to fully know what they are.
74
Hashing out the requirements before you get to code is something we've been doing for 50 years as developers.
75
And there's no reason why we should stop now.
76
So hopefully I've convinced you that plan mode is really useful.
77
Let's actually walk through a recent trace of mine so we can see it working.
78
I've been working on my course video manager which you've probably seen a few times if you've been looking at this channel.
79
The first thing I did was I entered plan mode and I described a bug that was happening.
80
Essentially in my database I've just moved from repos into repo versions
81
but not all of the code had been migrated yet so something weird was happening when I added a repo.
82
I didn't type this out I just dictated this in.
83
And by the way if you're not using a dictation tool like whisper flow
84
or super whisper you absolutely have to but that's probably a topic for another video.
85
So what it did is it then ran and explore subagent to explore the codebase, understand the current schema and how repos are created.
86
Doing this, it burned around 40,000 tokens.
87
But bear in mind, it wasn't using Opus 4.5 for this, it was using Haiku 4.5.
88
And then it said, now I can see the issue clearly.
89
The API.repos.add.ts creates sections without a version.
90
Let me explore how versions are created elsewhere.
91
Understand that create sections method signature.
92
So the explore subagent just gave it a little hint as to what was going wrong
93
and then it went and looked itself by searching in the repo with search create repo version,
94
let me check the exact schema definition and then once it had a full understanding it said let me write the plan.
95
It saves these plans on the file system so that you can actually read them yourselves.
96
And in fact you can see in this directory I have dozens
97
and dozens of plans from all of my plan mode usage.
98
One thing it then did is it asked me some questions, It asked should new repos default to v1.0 as the initial version name and I said yes.
99
So in other words it was iterating with me towards the solution.
100
This was a question that I hadn't answered in my initial like two line prompt
101
and it figured out it needed that information and it asked me the information.
102
In other words I was behaving like a crappy client not providing all the information up front
103
and so I had a question from the developer and I answered it.
104
So I then approved the plan and moved out of plan mode into actual pushing mode.
105
And from there it was then able to actually make the changes.
106
Funnily enough it turned out that there was something
107
that neither of us had considered which was the sections still had a repo ID on them from the previous iteration.
108
I said surely they can just have a repo version ID and then resolve any dependencies through that.
109
So for this I actually kicked off plan mode again.
110
It went and did some more exploration here and then it found
111
that it was a completely different tasks so it updated the plan file with this refactor.
112
Further down it then answered or I answered some more questions
113
and it then went and did it and executed the code changes.
114
So that's what the plan mode execution loop actually looks like.
115
And this scales from small changes as we saw there to actually large scale architectural changes.
116
One really cool thing I've seen people doing is taking their plans
117
and putting them in GitHub issues so other people can comment on them.
118
Kind of like a request for comment RFC proposal where you just put it up, people ping their ideas up there and then you reach a shared solution together.
119
It's even great to put them on GitHub PRs so
120
that someone reviewing your code can understand what the plan was when you made the code.
121
But there's probably one question that's coming to your head immediately.
122
Isn't this just like a huge amount of reading?
123
Like I don't want my job to become just reading product requirement documents all day.
124
Well, let me show you the single line of text
125
that I added to my claw.md file that has made my plan so much easier to read.
126
Here it is right here.
127
Make the plan extremely concise, sacrifice grammar for the sake of concision.
128
Now I've talked about this before but this is an absolutely key part to my workflow.
129
This takes plans that are like 2000 words long and puts them in 400 words.
130
It gives you a really detailed high level overview of the changes
131
and actually means you can skip through loads of the plan really really fast
132
and just scan it to see if anything looks wrong.
133
And finally I I say at the end of each plan, give me a list of unresolved questions to answer, if any.
134
This gives the agent an extra little nudge just to ask me anything that it's confused about or not sure about.
135
And it puts it in more of an exploratory, sort of slightly worried, paranoid mode, which is where I want it.
136
I strongly recommend you take these literally three lines of text here, take them, put them in your claw.md and you will notice a massive difference in plan mode.
137
I could make this set up longer, right?
138
I could really go into detail here, but I don't want to overforce the LLM and this claw.md will be put into every single session I use.
139
So I find that the concision here is actually really essential for steering the LLM better.
140
The fewer instructions you use inside your claw.md, the more instruction budget the LLM has to do other things.
141
But instruction budget is probably the topic for another video, I think.
142
Now there's one One final thing to cover here, which I can hear you typing out in the comments immediately.
143
I got loads of these comments on my Claude Code video as well, which covered some similar ground.
144
And what you're probably typing is, I can do this faster myself.
145
Going through the whole plan mode rigmarole, then just to get the AI ready to do the work, I can just go into the codebase myself, change the files and actually just do it.
146
And guess what?
147
In some cases, you are absolutely right.
148
When you know the codebase inside out, when you know exactly the change that needs to made, you go into the codebase with a massive advantage over the LLM, which is you have all the context already.
149
You don't need to send off an explore subagent to burn tokens to actually understand the codebase, you know it already.
150
And in those cases you should absolutely go through and make the change yourself.
151
But here's the thing you should think about, which is those cases are going to be relatively limited.
152
In a large organisation you only have so many repos that you understand deeply.
153
PlanMode allows you to contribute effectively to repos you don't know that well.
154
Because you and the LLM walk in with the same amount of context.
155
And plan mode allows you to work your way through the repo, figure out exactly what change needs to be made, even if it's in a language that you're not quite that familiar with.
156
And here's the other thing.
157
In this situation, where you can do it faster than the LLM, it's probably quite a simple change.
158
If it's a big architectural tweak, then you probably still want to go through the rubber duck process.
159
You can do that with a colleague, of course, but then you're taking up your colleague's time.
160
Wouldn't it be better to rubber duck with an AI that can scan the codebase, understand what's going on, create a plan document, send that plan document to your buddy and say I've got this plan, what do you think?
161
Or you might find with the AI
162
that actually the requirements are more solid than you thought and you can just get the AI to bash it out.
163
The final point here is that these tools are only going to get faster.
164
It's an open question as to whether the tools are going to get smarter.
165
I think they're going to get a bit smarter but not a lot smarter.
166
But what's guaranteed is that they will get faster.
167
And so if your only advantage over AI is your speed, then that advantage will get eroded more and more and more.
168
And so for me, I'm using plan mode every single time because I want to develop familiarity with these tools.
169
I want to understand how they work and what their weaknesses are, because there are weird weaknesses baked into the cake that are not going to be removed however long this goes on for.
170
And the more feel I can get for AI, I know the more secure my career is going forward.
171
So that's plan mode, this loop where you plan before you execute
172
and test that loads up the LLM with context and makes your requirements clearer to yourself.
173
If I had one tip to give to anyone that's doing AI coding, it is to use plan mode.
174
It is a phenomenal tool for working with AI and I honestly could not live without it.
175
And if you want to get the most out of plan mode, then you've got to follow the link below to get my agents.md file.
176
Thanks for following along, folks.
177
I've been really enjoying making these AI coding videos.
178
I'll see you in the next one.

背景与背景

在这段视频中,讲者分享了他从怀疑人工智能(AI)能否有效编写代码到实际体验'计划模式'的转变。他起初对AI持怀疑态度,认为AI无法理解他的代码体系,也无法模仿他在长时间工作中积累的直觉。然而,在尝试了AI的计划模式后,他发现这种技术在程序开发中不可或缺。通过规划代码,这样不仅让AI能够上下文理解代码库,还能提升工作效率。

日常交流的五个常用短语

  • “AI不能理解我的代码库” - 表达了对AI能力的质疑。
  • “计划模式” - 引导思考如何有效地使用AI进行编程。
  • “每段代码都经过这个循环” - 强调了代码开发流程的重要性。
  • “探索你的代码库” - 指出在做出更改之前,理解现有代码的必要性。
  • “上下文不会被加载” - 形容缺乏规划过程所造成的影响。

逐步跟读指南

为了帮助您更好地理解和应用'计划模式'的概念,您可以采取以下步骤,结合英语影子跟读的方法:

  1. 选择视频或语音材料,确保其内容与您学习目标相关。
  2. 先听一遍,通过听力锻炼您的理解能力。
  3. 在第二遍时,尝试暂停视频,重复视频中说的每一句话,可以借助shadowspeak方法,模仿说话者的语调与节奏。
  4. 记录关键短语,设法应用于您日常的英语口语练习中,增强记忆。
  5. 多次重复以上步骤,目标是将这些短语灵活运用,直到它们变得自然。

通过这种方式,您不仅能提高您的听力和口语能力,还能逐步掌握如何在面对复杂内容时进行有效的计划与执行,从而提升您的整体英语能力。使用这些技巧,您能在看YouTube学英语中获得更多实用的收获。

什么是跟读法?

跟读法 (Shadowing) 是一种有科学依据的语言学习技巧,最初开发用于专业口译员的培训,并由多语言者Alexander Arguelles博士普及。这个方法简单而强大:您在听英语母语原声的同时立即大声重复——就像是一个延迟1-2秒紧跟说话者的影子。与被动听力或语法练习不同,跟读法强迫您的大脑和口腔肌肉同时处理并模仿真实的讲话模式。研究表明它能显着提高发音准确性,语调,节奏,连读,听力理解和口语流利度——使其成为雅思口语备考和真实英语交流最有效的方法之一。