1
00:00:00,000 --> 00:00:06,400
Okay, so the next set of commands I'm going to look at are all around managing your workflow,
好的，我要查看的下一组命令都是围绕管理您的工作流程，

2
00:00:06,400 --> 00:00:11,199
your journey within Cloud Code, and it's very flexible. There are a lot of different ways of
您在 Cloud Code 中的旅程非常灵活。有很多不同的方法

3
00:00:11,199 --> 00:00:14,399
doing it and it can be muddling because it's almost like there's too many different ways
这样做可能会很混乱，因为几乎有太多不同的方法

4
00:00:14,399 --> 00:00:18,559
of doing something that's quite similar, which is just sort of taking checkpoints
做一些非常相似的事情，这只是采取检查点

5
00:00:18,559 --> 00:00:21,920
of how you're going or being able to get back to where you were before.
你将如何前进或能够回到之前的位置。

6
00:00:21,920 --> 00:00:25,520
There's a few different ways of doing it and I'm going to explain them and how they fit together
有几种不同的方法可以做到这一点，我将解释它们以及它们如何组合在一起

7
00:00:25,520 --> 00:00:29,360
and then I'm going to tell you how I do it myself. You could do it the way I do it or
然后我会告诉你我自己是怎么做的。你可以按照我的方式做或者

8
00:00:29,360 --> 00:00:32,319
do it your own way. That's the whole idea of it being flexible.
按照你自己的方式去做。这就是灵活的整体理念。

9
00:00:32,319 --> 00:00:38,720
Okay, so Cloud has two levels of granularity of how you can think about the journey you're
好的，云有两个粒度级别，让您可以思考自己的旅程

10
00:00:38,720 --> 00:00:42,880
having with Cloud and go back to different points in time. And the first of them,
与云一起并回到不同的时间点。其中第一个，

11
00:00:42,880 --> 00:00:47,759
the highest level of granularity, are things called sessions. And a session represents a
最高级别的粒度称为会话。一个会话代表一个

12
00:00:47,759 --> 00:00:54,000
complete state of your conversation with Cloud, of the context with the conversations got in it
您与 Cloud 对话的完整状态，以及对话的上下文

13
00:00:54,000 --> 00:00:59,759
and other stuff you're doing. That is the session. And you can name your session at any point,
以及你正在做的其他事情。这就是会议。您可以随时命名您的会话，

14
00:00:59,759 --> 00:01:04,160
give it a name, and then that sort of records the state of the session at that point when
给它一个名字，然后记录当时的会话状态

15
00:01:04,160 --> 00:01:10,480
you named it. And then later you can choose to resume from any named session and it will go back
你给它命名了。然后您可以选择从任何指定的会话中恢复，它将返回

16
00:01:10,480 --> 00:01:15,760
to that state of the context at that point. And that is a session. In fact, you can just
到当时的上下文状态。这就是一次会议。事实上，你可以只

17
00:01:15,760 --> 00:01:20,720
choose to resume Cloud from wherever you were when you last quit Cloud. This is so that just
选择从上次退出 Cloud 时所在的位置恢复 Cloud。这样就可以了

18
00:01:20,720 --> 00:01:26,319
resume from where I just was. Or you can name a session and resume from that session. That's the
从我刚才所在的地方恢复。或者您可以命名一个会话并从该会话继续。这就是

19
00:01:26,319 --> 00:01:30,720
idea behind a session. That sounds like the easy one. That makes total sense, right? Just worth
会议背后的想法。这听起来很简单。这完全有道理，对吧？刚刚值得

20
00:01:30,720 --> 00:01:35,519
noting that when you do that, you're resuming to the conversation. You're not resuming to the state
请注意，当您这样做时，您将继续对话。你没有恢复到状态

21
00:01:35,519 --> 00:01:40,319
of the code and the repo at that point, just the context and conversation. All right, hopefully
此时的代码和存储库，只是上下文和对话。好吧，希望

22
00:01:40,319 --> 00:01:43,919
that's clear. So you're thinking, what's the other one then? That can't be anything more than that.
很清楚。所以你在想，那么另一件事是什么？仅此而已。

23
00:01:43,919 --> 00:01:48,559
There is something else. There's something called checkpointing. And checkpointing applies to a
还有别的事。有一种东西叫做检查点。检查点适用于

24
00:01:48,559 --> 00:01:52,879
specific session, the session that you're currently on. You're there using Cloud Code.
特定会话，即您当前所在的会话。您正在使用 Cloud Code。

25
00:01:52,879 --> 00:01:58,639
Every single prompt that you send to Cloud Code, every one of those is considered a sort of step
您发送到 Cloud Code 的每一个提示，每一个提示都被视为一种步骤

26
00:01:58,639 --> 00:02:05,120
in time. Each prompt, each one is considered a checkpoint. And you can do what's called rewinding,
及时。每一个提示，每一个都被视为一个检查点。你可以做所谓的倒带，

27
00:02:05,120 --> 00:02:11,360
which is going back step by step in the conversation you're having to that point in time.
这是在你正在进行的对话中一步步回到那个时间点。

28
00:02:11,360 --> 00:02:15,759
And that process of having this sort of step by step prompt and being able to rewind is called
而这种一步步提示并能够倒带的过程就叫做

29
00:02:15,759 --> 00:02:21,440
checkpointing. And you can see it's a much finer granularity than sessions, which are big things.
检查点。您可以看到它的粒度比会话要细得多，而会话是一件大事。

30
00:02:21,440 --> 00:02:25,600
But the nice thing about these checkpoints that you can rewind is that you can choose,
但这些可以倒带的检查点的好处是你可以选择，

31
00:02:25,600 --> 00:02:30,240
do I just want to rewind just the conversation to go back to where I was with Claude? Or do I
我是否只想倒回对话回到我和克劳德在一起的地方？还是我

32
00:02:30,240 --> 00:02:36,399
want to actually revert the code back to where it was back then? If Claude made a bunch of changes,
想要将代码恢复到当时的状态吗？如果克劳德做了一堆改变

33
00:02:36,399 --> 00:02:41,600
I wanted to undo those changes and get back to the state, how is that right there? Then you can
我想撤消这些更改并返回到状态，那是怎么回事？那么你可以

34
00:02:41,600 --> 00:02:47,679
do that. And that's pretty cool. But there is a catch. When you go back, Claude knows about the
这样做。这非常酷。但有一个问题。当你回去的时候，克劳德就知道了

35
00:02:47,679 --> 00:02:52,880
changes it's just made. And those are the ones that it can revert to take you back to where you were.
刚刚所做的更改。这些是它可以恢复的，带你回到原来的地方。

36
00:02:52,880 --> 00:02:59,520
But if as part of this particular prompt, Claude ran a script, say, on your computer, and that
但是，如果作为此特定提示的一部分，克劳德在您的计算机上运行了一个脚本，那么

37
00:02:59,520 --> 00:03:04,240
script did a few things, which included changing some files, then Claude can't revert those.
脚本做了一些事情，其中​​包括更改一些文件，然后克劳德无法恢复这些文件。

38
00:03:04,240 --> 00:03:07,759
It doesn't know about those. Or if you did something that ran a script that made some
它不知道这些。或者如果你做了一些运行脚本的事情，该脚本产生了一些

39
00:03:07,759 --> 00:03:12,479
changes to files, Claude isn't actually keeping a copy of your disk at each of these points.
当对文件进行更改时，克劳德实际上并没有在每个点上保留磁盘的副本。

40
00:03:12,479 --> 00:03:17,199
So all it can do is undo the changes it knows about. So you have to be quite aware of what's
所以它所能做的就是撤消它所知道的更改。所以你必须非常清楚什么是

41
00:03:17,199 --> 00:03:22,000
going on and exactly how you're going backwards if you choose to go backwards in terms of the
正在发生的事情以及如果你选择倒退的话你将如何倒退

42
00:03:22,000 --> 00:03:26,639
code as well as the conversation. But that's the difference between the session and the
代码以及对话。但这就是会议和会议之间的区别

43
00:03:26,639 --> 00:03:31,279
checkpointing. Session resuming, checkpoint rewinding. It can be a bit confusing until
检查点。会话恢复，检查点倒带。这可能有点令人困惑，直到

44
00:03:31,279 --> 00:03:34,639
you've heard it clearly like this and you've thought about it and you've got it clear in your mind.
这样你听得很清楚，你也想过，你心里也清楚了。

45
00:03:34,639 --> 00:03:38,800
Just always come back to this if you're doing one or the other to be clear on what you're doing.
如果您正在做其中一项，请务必回来看看这一点，以便清楚自己在做什么。

46
00:03:38,800 --> 00:03:42,800
And we will try out both. But there is something else as well. There is something else. And
我们将两者都尝试一下。但还有其他一些事情。还有别的事。和

47
00:03:42,800 --> 00:03:46,320
hopefully you're already thinking about that something else. That something else, a different
希望您已经在考虑其他事情了。那是别的东西，不同的东西

48
00:03:46,320 --> 00:03:53,839
level of granularity, again, it's sort of just orthogonal really, is the bulletproof, the proper
粒度级别，再次，它实际上是正交的，是防弹的，正确的

49
00:03:53,839 --> 00:04:00,559
way to manage your code. It's Git. You've got Git, which is taking a snapshot of your code at each
管理代码的方式。这是吉特。你已经有了 Git，它会在每次更新时为你的代码生成快照。

50
00:04:00,559 --> 00:04:05,679
point. That's not related to the context of your conversation with Claude, but it's related to
观点。这与你和克劳德谈话的背景无关，但与

51
00:04:05,679 --> 00:04:12,240
your code. And Git commits are the proper way to take a full snapshot of where you are from the
你的代码。 Git 提交是获取您来自何处的完整快照的正确方法。

52
00:04:12,240 --> 00:04:18,079
code point of view and be able to revert back to any one point. So you've really got these sort of
代码观点并能够恢复到任何一点。所以你真的有这些

53
00:04:18,079 --> 00:04:22,399
three toolings. You've got the sort of the management of the session in terms of your
三个工具。您已经根据您的需要对会话进行了管理

54
00:04:22,399 --> 00:04:26,640
overall framing with Claude. I'm able to go back to how we were talking to Claude a month ago.
克劳德的总体框架。我可以回顾一个月前我们和克劳德的谈话。

55
00:04:27,279 --> 00:04:30,880
Checkpointing, which is really about stepping forwards and backwards through the current
检查点，实际上是在当前状态中前进和后退

56
00:04:30,880 --> 00:04:37,600
conversation. And then Git, of course, which is the long-term way of managing every single
对话。当然还有 Git，这是管理每个人的长期方式

57
00:04:37,600 --> 00:04:42,799
possible point. And you could be doing a Git commit many times, even during a conversation.
可能的点。而且您可能会多次执行 Git 提交，甚至在对话期间也是如此。

58
00:04:42,799 --> 00:04:47,760
So it's not like that has to be at a higher level of granularity necessarily. So you might be
因此，这并不一定必须处于更高的粒度级别。所以你可能是

59
00:04:47,760 --> 00:04:52,320
forgiven for thinking, with all of these possibilities, how do I know which is the right
请原谅我思考，有了所有这些可能性，我怎么知道哪个是正确的

60
00:04:52,320 --> 00:04:58,160
one to do? Which one do I do? And the short answer is that really it should depend on what
一件要做的事？我该做哪一项呢？简而言之，这实际上应该取决于什么

61
00:04:58,160 --> 00:05:04,079
works best for your mode of working. I can tell you the way I like to work, and you can choose
最适合您的工作模式。我可以告诉你我喜欢的工作方式，你可以选择

62
00:05:04,640 --> 00:05:08,720
to do what I do or do something completely different. These tools are designed to work
做我所做的事情或做完全不同的事情。这些工具旨在工作

63
00:05:08,720 --> 00:05:16,640
around your workflow, not the other way around. My personal workflow, so very much I use Git a lot.
围绕您的工作流程，而不是相反。我个人的工作流程，所以我经常使用 Git。

64
00:05:16,640 --> 00:05:23,200
And so I will like to commit as I go and make sure that I know what my various commits are doing.
因此，我愿意边做边做，并确保我知道我的各种提交正在做什么。

65
00:05:23,760 --> 00:05:29,200
I will occasionally use checkpointing if something's gone wrong as a way to go back.
如果出现问题，我偶尔会使用检查点作为返回的方式。

66
00:05:29,200 --> 00:05:34,799
But it's not like I'm super likely to do that. It can be useful. And I'm less likely to go back for
但我并不是很有可能这么做。它可能很有用。我不太可能回去

67
00:05:34,799 --> 00:05:38,720
the code changes it's made, unless it's something really immediate that it just did wrong that we
代码会发生变化，除非它确实是我们做错了的事情

68
00:05:38,720 --> 00:05:46,480
can just rewind to right away. But more likely than not, I'm more likely to use Git to go
可以立即倒回。但更有可能的是，我更有可能使用 Git 进行操作

69
00:05:46,480 --> 00:05:53,679
back to a previous commit. And I use Markdown files as my way to track progress. It's quite
返回到之前的提交。我使用 Markdown 文件作为跟踪进度的方式。是相当

70
00:05:53,679 --> 00:06:00,239
boring and old school of me. It's very 2025 of me to use things like Claude.md and then Plan.md,
我的无聊和老派。我很喜欢使用 Claude.md 和 Plan.md 这样的东西，

71
00:06:00,239 --> 00:06:06,720
as you saw, and various others to keep note of what's happening. And I like to go back to Claude's
正如您所看到的，以及其他各种记录正在发生的事情。我喜欢回到克劳德家

72
00:06:06,720 --> 00:06:12,959
sort of frame of mind, using these Markdown files, these memory files, as my way of tracking progress
某种心态，使用这些 Markdown 文件，这些内存文件，作为我跟踪进度的方式

73
00:06:12,959 --> 00:06:18,399
in a way that I can really understand. And I honestly recommend you do the same. Using sessions,
以我真正能理解的方式。我真诚地建议你也这样做。使用会话，

74
00:06:18,399 --> 00:06:23,519
and so I can go back to the conversation with Claude as of a week ago, I find that very confusing.
所以我可以回到一周前与克劳德的谈话，我发现这非常令人困惑。

75
00:06:23,519 --> 00:06:28,480
It's hard to keep track of what we were saying and what's in context. I prefer to use files for that
很难跟踪我们所说的内容以及上下文中的内容。我更喜欢使用文件来实现这一点

76
00:06:28,480 --> 00:06:34,799
to have a crystal clear understanding of where we are in this project together. But many people
清楚地了解我们在这个项目中的共同进展。但很多人

77
00:06:34,799 --> 00:06:39,040
use sessions and many people use them successfully. So I don't want to discount it. You should get
使用会话并且许多人成功地使用它们。所以我不想打折。你应该得到

78
00:06:39,040 --> 00:06:44,160
used to whatever works for your workflow. Okay, so here we are back in Claude again. And I'm going
习惯于任何适合您工作流程的方式。好吧，我们又回到了克劳德。我要去

79
00:06:44,160 --> 00:06:56,559
to say, for our conversation today, I'd like you to be witty and snarky with me, please.
想说的是，在我们今天的谈话中，我希望你能幽默一点、尖刻一点。

80
00:06:57,760 --> 00:07:02,160
Let's put that in there. See how it responds to that. It's thinking about that.
让我们把它放在那里。看看它对此有何反应。它正在考虑这个问题。

81
00:07:03,119 --> 00:07:10,239
Thought for a second. Ah, you want the premium Claude experience. Wit included at no extra charge.
想了一下。啊，您想要优质的克劳德体验。包含智慧，无需额外付费。

82
00:07:10,239 --> 00:07:18,720
Consider it done. So what chaos are we driving into today? All right, that's fun. And now with
认为它完成了。那么，我们今天正陷入怎样的混乱呢？好吧，这很有趣。现在与

83
00:07:18,720 --> 00:07:25,839
this, I'm going to name this session, which you do with the rename command. Rename, and we give
我将为此会话命名，您可以使用重命名命令来完成此操作。重命名，我们给出

84
00:07:25,839 --> 00:07:34,959
it a name. We will call it snarky Claude. Session renamed to snarky Claude. And what we will now do
它是一个名字。我们称其为刻薄的克劳德。会议更名为尖刻的克劳德。我们现在要做的

85
00:07:34,959 --> 00:07:43,679
is exit Claude code. Gone. All right. And now when we resume Claude, we can decide how we want to do
是退出克劳德代码。走了。好的。现在当我们恢复克劳德时，我们可以决定我们想要怎么做

86
00:07:43,679 --> 00:07:49,679
that. So I can just type Claude. And up comes Claude like this. Please summarize the project.
那。所以我可以输入 Claude。克劳德就这样出现了。请总结一下该项目。

87
00:07:50,640 --> 00:07:55,040
And we will get a summary from Claude that will not be in a snarky style, at least I hope.
我们将从克劳德那里得到一份总结，至少我希望不会是尖刻的风格。

88
00:07:56,640 --> 00:08:03,040
Here we go. Very good. It's a very sensible business-like summary from Claude. Just what
开始了。非常好。这是克劳德的一个非常明智、务实的总结。只是什么

89
00:08:03,040 --> 00:08:09,040
we would expect. We will now come out of this. Control C twice to come out. And we will now try
我们预计。我们现在将摆脱这个困境。控制C两次即可出来。我们现在将尝试

90
00:08:09,040 --> 00:08:15,440
and bring back the ghost of snarky Claude. Okay. And now I'm going to run Claude with Claude
并带回尖刻的克劳德的鬼魂。好的。现在我要和克劳德一起运行克劳德

91
00:08:15,839 --> 00:08:22,399
Okay. And now I'm going to run Claude with Claude dash dash resume. Start up Claude with resume.
好的。现在我要运行 Claude，并执行 Claude dash dash 简历。用简历启动克劳德。

92
00:08:23,040 --> 00:08:30,239
And it tells me I can resume a session, one of eight. The most recent one is please summarize
它告诉我我可以恢复一个会话，八个会话中的一个。最近的一篇请总结一下

93
00:08:30,239 --> 00:08:35,440
the project. The one before that is snarky Claude. You can see it has a name because we named it that
该项目。前面的那位是尖刻的克劳德。你可以看到它有一个名字，因为我们这样命名它

94
00:08:35,440 --> 00:08:42,640
way. We will go into that. We are back inside snarky Claude. And I will now say please summarize
方式。我们将对此进行讨论。我们又回到了尖刻的克劳德内心。我现在要说的是请总结一下

95
00:08:43,440 --> 00:08:49,840
the project. And we will see how snarky Claude decides to summarize the project for us.
该项目。我们将会看到克劳德如何决定为我们总结这个项目。

96
00:08:51,119 --> 00:08:58,479
Here he goes. It's thinking about that. And we'll let it do its thing. Here we go.
他来了。它正在考虑这个问题。我们会让它发挥作用。开始了。

97
00:09:02,640 --> 00:09:05,760
I mean, you can already see the editor. Want me to dig into anything specific?
我的意思是，你已经可以看到编辑器了。想让我深入研究一些具体的东西吗？

98
00:09:05,760 --> 00:09:10,880
Or are we here to break something today? Based on that, here's the gist.
或者我们今天来这里是为了破坏什么？基于此，要点如下。

99
00:09:11,520 --> 00:09:21,200
Kanban board with an AI sidekick that actually does stuff. Very nice. And yeah. The vibe. Keep
看板和一个真正能做事的人工智能助手。很不错。是的。氛围。保持

100
00:09:21,200 --> 00:09:26,320
it simple. Don't overengineer. Prove problems before fixing them. Basically the opposite of
很简单。不要过度设计。在解决问题之前先证明问题。基本上相反

101
00:09:26,320 --> 00:09:34,400
most enterprise projects I've seen. All right. That's snarky Claude. Very nice. That is sessions working for us.
我见过的大多数企业项目。好的。这就是狡猾的克劳德。很不错。这就是为我们工作的会议。
