1
00:00:00,000 --> 00:00:04,019
Okay. So here I am back in Jira.

2
00:00:04,019 --> 00:00:07,579
Remember Jira? I'm going to create another issue,

3
00:00:07,579 --> 00:00:09,779
another work item, whatever they call now,

4
00:00:09,779 --> 00:00:11,680
a task, what needs to be done?

5
00:00:11,680 --> 00:00:13,420
I'm going to describe a more

6
00:00:13,420 --> 00:00:16,340
sophisticated task than that simple website thing.

7
00:00:16,340 --> 00:00:17,860
Let's put something in here that's

8
00:00:17,860 --> 00:00:20,180
some real functionality that we want to build.

9
00:00:20,180 --> 00:00:22,059
Okay. So I'm going to create a new task,

10
00:00:22,059 --> 00:00:25,739
and the task is going to be to create

11
00:00:25,739 --> 00:00:34,319
a dataset of legal document templates

12
00:00:34,319 --> 00:00:43,540
that the system will later be able to modify for the user.

13
00:00:43,540 --> 00:00:45,540
That explains what we need to do.

14
00:00:45,540 --> 00:00:47,139
There we go. That is the item.

15
00:00:47,139 --> 00:00:50,979
Let's double-click into it to bring it up and add some details.

16
00:00:50,979 --> 00:00:52,299
First, just to show you,

17
00:00:52,299 --> 00:00:54,880
we're going to be tapping into this resource

18
00:00:54,880 --> 00:00:56,939
by a company called Common Paper,

19
00:00:56,939 --> 00:00:58,520
which is a fabulous resource.

20
00:00:58,520 --> 00:01:01,919
It is a set of repos that this company has,

21
00:01:01,919 --> 00:01:04,980
which contains draft legal documents

22
00:01:04,980 --> 00:01:08,400
like a mutual NDA, a classic document.

23
00:01:08,400 --> 00:01:10,879
In each case, in these repos,

24
00:01:10,879 --> 00:01:13,440
they've got a markdown version of it,

25
00:01:13,440 --> 00:01:17,639
which is exactly what LLMs love for these things.

26
00:01:17,639 --> 00:01:19,900
It's got a markdown version of it,

27
00:01:19,900 --> 00:01:23,760
and also they're all under the Creative Commons license,

28
00:01:23,760 --> 00:01:28,760
which means that you can use them and modify them for free, which is great.

29
00:01:28,760 --> 00:01:32,559
So this is a good source of data for us for this project.

30
00:01:32,559 --> 00:01:34,599
That is precisely what I'm going to

31
00:01:34,599 --> 00:01:37,319
tell in the description of this task.

32
00:01:37,319 --> 00:01:41,559
The task is create a dataset of legal document templates

33
00:01:41,559 --> 00:01:44,120
that the system will later be able to modify for the user.

34
00:01:44,120 --> 00:01:46,839
I'm going to paste in here some text that I just wrote,

35
00:01:46,839 --> 00:01:48,480
so you don't have to watch me typing it.

36
00:01:48,480 --> 00:01:51,879
This task is a one-time data curation project.

37
00:01:51,879 --> 00:01:55,400
I call it data curation task just to avoid getting confusing there,

38
00:01:55,400 --> 00:01:58,160
to prepare data for the pre-legal project.

39
00:01:58,160 --> 00:02:01,279
For context, the common paper GitHub account at,

40
00:02:01,279 --> 00:02:03,239
and then a link to it, contains a number of

41
00:02:03,239 --> 00:02:05,720
repos with legal agreement templates that can

42
00:02:05,720 --> 00:02:08,479
be copied and modified under a CC license.

43
00:02:08,479 --> 00:02:10,960
We will use this as the source of data.

44
00:02:10,960 --> 00:02:13,919
For this task, we will need to browse these repos.

45
00:02:13,919 --> 00:02:16,279
We will need to pull down the markdown files,

46
00:02:16,279 --> 00:02:18,639
put in a directory called templates.

47
00:02:18,639 --> 00:02:20,979
Additionally, make a JSON file to

48
00:02:20,979 --> 00:02:23,259
describe the different templates that we've got,

49
00:02:23,259 --> 00:02:27,179
and finally put in a license file to recognize the license.

50
00:02:27,179 --> 00:02:28,220
Let me save that.

51
00:02:28,220 --> 00:02:30,259
That is the description of the action.

52
00:02:30,259 --> 00:02:33,300
I'm trying to do this in a way that perhaps could be something that

53
00:02:33,300 --> 00:02:36,740
your product team or business sponsor has put in.

54
00:02:36,740 --> 00:02:38,660
It's a task to be done.

55
00:02:38,660 --> 00:02:40,979
It's something which is human understandable,

56
00:02:40,979 --> 00:02:42,020
it's quite high level,

57
00:02:42,020 --> 00:02:43,860
and it will involve a number of different tasks.

58
00:02:43,860 --> 00:02:48,779
In this case, it's like a one-time task to retrieve data.

59
00:02:48,779 --> 00:02:52,259
This is something that we're going to want to give to Cloud Code.

60
00:02:52,259 --> 00:02:56,020
It's worth taking a look at this and seeing that it's called PL-2.

61
00:02:56,020 --> 00:02:57,940
That is the name of the issue.

62
00:02:57,940 --> 00:02:59,660
Now, we need to go to Cloud Code.

63
00:02:59,660 --> 00:03:02,220
But don't forget, we also need to install

64
00:03:02,220 --> 00:03:04,059
this MCP server in Cloud Code because we

65
00:03:04,059 --> 00:03:06,500
installed it just for the other project.

66
00:03:06,500 --> 00:03:08,259
Now, we need to install it for this project.

67
00:03:08,259 --> 00:03:10,899
Let's go and do that, and then let's kick this whole thing off.

68
00:03:10,899 --> 00:03:12,740
Here we are back in Cloud Code.

69
00:03:12,740 --> 00:03:14,500
I'm going to come out of Cloud Code.

70
00:03:14,500 --> 00:03:16,699
Sorry, Control C twice quickly.

71
00:03:16,699 --> 00:03:20,179
Then I'm going to paste in the Cloud MCP add.

72
00:03:20,179 --> 00:03:23,460
This is to add the Atlassian MCP server.

73
00:03:23,460 --> 00:03:25,020
It is added in there,

74
00:03:25,020 --> 00:03:27,259
and now I go back into Cloud.

75
00:03:27,259 --> 00:03:31,460
Now, I do slash MCP to take a look at our MCP servers,

76
00:03:31,460 --> 00:03:34,419
and we can see that the Atlassian one is there.

77
00:03:34,419 --> 00:03:35,860
It says that it's connected,

78
00:03:35,860 --> 00:03:36,940
but I don't believe it.

79
00:03:36,940 --> 00:03:38,300
We're going to re-authenticate.

80
00:03:38,300 --> 00:03:40,100
In we go, I press Enter.

81
00:03:40,100 --> 00:03:42,660
I am going to say re-authenticate.

82
00:03:42,660 --> 00:03:44,259
Up comes a browser window,

83
00:03:44,259 --> 00:03:49,500
approve, and it's requesting access, accept.

84
00:03:49,500 --> 00:03:51,539
Authentication successful.

85
00:03:51,539 --> 00:03:53,660
You can go back to Cloud Code.

86
00:03:53,660 --> 00:03:55,220
That is what we will do.

87
00:03:55,220 --> 00:03:58,660
Here we are. We believe that we are authenticated.

88
00:03:58,660 --> 00:04:00,500
Now, we're not yet going to use

89
00:04:00,500 --> 00:04:02,580
that feature that we just put in there.

90
00:04:02,580 --> 00:04:06,380
It's a bit much to architect and build and code review this,

91
00:04:06,380 --> 00:04:08,779
which is going to be a one-time data exercise.

92
00:04:08,779 --> 00:04:10,419
We're going to use that next. First up,

93
00:04:10,419 --> 00:04:12,300
we're just going to try and say,

94
00:04:12,300 --> 00:04:20,140
please carry out JIRA issue

95
00:04:20,140 --> 00:04:26,779
PL2 and raise a PR with your changes.

96
00:04:26,779 --> 00:04:29,179
Let's just leave it at that.

97
00:04:29,179 --> 00:04:32,019
Giving it a nice high-level task,

98
00:04:32,019 --> 00:04:34,980
and for the time being,

99
00:04:34,980 --> 00:04:36,140
I'm going to press two.

100
00:04:36,140 --> 00:04:38,019
I'm going to say you can do what you want.

101
00:04:38,019 --> 00:04:41,179
I'm going to let it go off and do things.

102
00:04:41,179 --> 00:04:43,619
It's getting an issue for PL2.

103
00:04:43,619 --> 00:04:44,980
You could see that. That seems good.

104
00:04:44,980 --> 00:04:46,500
We'll let it get PL2.

105
00:04:46,500 --> 00:04:49,579
We'll let it review what it needs to do.

106
00:04:49,779 --> 00:04:52,859
The main thing to bear in mind here,

107
00:04:52,859 --> 00:04:58,700
it's trying to use the GitHub tool to read the common paper,

108
00:04:58,700 --> 00:05:00,220
which wasn't exactly the plan,

109
00:05:00,220 --> 00:05:02,459
but we'll see what it does.

110
00:05:03,980 --> 00:05:06,019
That all seems fine.

111
00:05:06,019 --> 00:05:07,579
It's getting lots of things.

112
00:05:07,579 --> 00:05:10,820
Let's say, don't ask again, get file.

113
00:05:10,820 --> 00:05:14,299
We'll let it keep going with what it's doing with this access token.

114
00:05:14,299 --> 00:05:16,739
It's using the GitHub tool.

115
00:05:16,739 --> 00:05:18,140
I was thinking it would just browse the web

116
00:05:18,140 --> 00:05:19,459
because these are all public files,

117
00:05:19,459 --> 00:05:23,540
but it's using this, and off it goes.

118
00:05:23,700 --> 00:05:26,100
So much going on.

119
00:05:26,100 --> 00:05:29,739
Crazy. It seems to be doing all the right kinds of things.

120
00:05:29,739 --> 00:05:31,500
It's downloading stuff.

121
00:05:31,500 --> 00:05:34,019
The question is, is it going to be writing it here?

122
00:05:34,019 --> 00:05:35,579
We will soon find out.

123
00:05:35,579 --> 00:05:38,059
I will come back in a minute when it's done its thing.

124
00:05:38,059 --> 00:05:39,459
I'm just going to show you actually.

125
00:05:39,619 --> 00:05:40,579
It hasn't done its thing yet.

126
00:05:40,579 --> 00:05:42,019
It's like halfway through.

127
00:05:42,019 --> 00:05:44,660
It's got everything using the GitHub tools,

128
00:05:44,660 --> 00:05:48,299
and it's now wanting to create the templates directory,

129
00:05:48,299 --> 00:05:49,220
and that sounds great.

130
00:05:49,220 --> 00:05:50,540
That's just what we wanted.

131
00:05:50,540 --> 00:05:52,820
So I'm going to let it do that.

132
00:05:52,820 --> 00:05:54,739
It's now created the templates directory,

133
00:05:54,739 --> 00:05:58,820
and hopefully it's now going to be writing a bunch of markdown files

134
00:05:58,820 --> 00:06:02,140
that it has downloaded from the GitHub repo.

135
00:06:02,140 --> 00:06:04,100
I was thinking it would use web searching for that.

136
00:06:04,100 --> 00:06:05,540
It's used the GitHub tool.

137
00:06:05,540 --> 00:06:07,339
That's what autonomy is all about.

138
00:06:07,339 --> 00:06:09,380
We let Cloud Code do what it does,

139
00:06:09,820 --> 00:06:12,540
and I will see you back here again in a second.

140
00:06:12,540 --> 00:06:17,859
I'm continually completely astonished by Cloud Code.

141
00:06:17,859 --> 00:06:21,940
So what just happened while I watched during that break

142
00:06:21,940 --> 00:06:24,380
that was the second view that was five minutes for me

143
00:06:24,380 --> 00:06:26,579
is that Cloud realized that the way that it was doing it,

144
00:06:26,579 --> 00:06:28,339
which wasn't what I was expecting it to do,

145
00:06:28,339 --> 00:06:29,779
was going to be too slow.

146
00:06:29,779 --> 00:06:33,100
It was going to involve bringing long files into its context,

147
00:06:33,100 --> 00:06:35,339
which wasn't a smart way to do it,

148
00:06:35,339 --> 00:06:37,619
and so it downloaded a few documents,

149
00:06:37,619 --> 00:06:38,940
but it's come up with a better way,

150
00:06:38,940 --> 00:06:40,739
which is what I thought it was going to do originally,

151
00:06:40,739 --> 00:06:43,540
which is just run some commands to download them directly,

152
00:06:43,540 --> 00:06:45,260
and now it's asking me for permission,

153
00:06:45,260 --> 00:06:46,700
and that's just incredible.

154
00:06:46,700 --> 00:06:48,339
It's like it hit a roadblock.

155
00:06:48,339 --> 00:06:49,859
It figured out what was going on

156
00:06:49,859 --> 00:06:52,019
and how to work around that properly.

157
00:06:52,019 --> 00:06:54,820
I think this is an example of the inflection point

158
00:06:54,820 --> 00:06:56,899
that we saw last November,

159
00:06:56,899 --> 00:07:01,339
where this kind of intellect wasn't possible before.

160
00:07:01,339 --> 00:07:03,299
So yes, I'm going to say yes, absolutely.

161
00:07:03,299 --> 00:07:05,899
It can do that, and bam, all the files appear,

162
00:07:05,899 --> 00:07:08,459
which is what I thought was going to happen before,

163
00:07:08,459 --> 00:07:11,500
and it now has done a decent job.

164
00:07:11,500 --> 00:07:13,420
It's absolutely staggering.

165
00:07:13,420 --> 00:07:15,339
Cloud Code then went ahead.

166
00:07:15,339 --> 00:07:17,380
It did a pull request.

167
00:07:17,380 --> 00:07:20,980
It first tried to use the GitHub command line tool to do it,

168
00:07:20,980 --> 00:07:22,260
which I don't have installed.

169
00:07:22,260 --> 00:07:24,100
That didn't work, and then it realized,

170
00:07:24,100 --> 00:07:26,940
oh, but I've got the tool through my MCP server,

171
00:07:26,940 --> 00:07:29,260
so it used the tool to make a PR request,

172
00:07:29,260 --> 00:07:31,779
and now when I go into GitHub at the pre-legal,

173
00:07:31,779 --> 00:07:33,260
I go to pull requests.

174
00:07:33,260 --> 00:07:36,380
There is here add legal document templates data set.

175
00:07:36,380 --> 00:07:37,380
I click into this.

176
00:07:37,380 --> 00:07:39,820
It's got all of these details that it put.

177
00:07:39,820 --> 00:07:42,019
It says generated by Cloud Code at the bottom.

178
00:07:42,019 --> 00:07:43,019
These are the templates.

179
00:07:43,019 --> 00:07:44,260
This is the description.

180
00:07:44,260 --> 00:07:45,859
Let's have a look at the code that it wrote.

181
00:07:45,859 --> 00:07:48,899
This is, of course, also sitting on my local box.

182
00:07:48,899 --> 00:07:50,059
There's one commit.

183
00:07:50,059 --> 00:07:51,779
These are the files that it changed.

184
00:07:51,779 --> 00:07:56,660
It built all of these different markdown files.

185
00:07:56,660 --> 00:08:00,779
It also created a license.txt, which I asked it to do,

186
00:08:00,779 --> 00:08:02,779
which describes the fact

187
00:08:02,779 --> 00:08:06,739
that this is a Creative Commons license,

188
00:08:06,739 --> 00:08:09,339
and it made a catalog.json file,

189
00:08:09,339 --> 00:08:11,660
and that is something which I asked it to again

190
00:08:11,660 --> 00:08:15,299
in the JIRA task, which lays out what has to happen.

191
00:08:15,299 --> 00:08:16,579
Absolutely amazing.

192
00:08:16,579 --> 00:08:18,420
Now, back here in Cloud Code, though,

193
00:08:18,420 --> 00:08:19,859
it's struggling a bit.

194
00:08:19,859 --> 00:08:21,739
It's struggling because it realized

195
00:08:21,739 --> 00:08:24,299
that it would be nice for it to also update

196
00:08:24,299 --> 00:08:27,299
the JIRA issue status to mark it as complete,

197
00:08:27,299 --> 00:08:30,019
and it's been sitting there waiting on Atlassian,

198
00:08:30,019 --> 00:08:32,580
and I happen to suspect, because I've seen this before,

199
00:08:32,580 --> 00:08:33,820
that this happens because you have

200
00:08:33,859 --> 00:08:36,780
to continually re-authenticate with Atlassian.

201
00:08:36,780 --> 00:08:38,979
I've seen a lot of complaints about this in the community.

202
00:08:38,979 --> 00:08:40,539
This is something that people know about,

203
00:08:40,539 --> 00:08:42,859
and it just hangs Cloud Code like this.

204
00:08:42,859 --> 00:08:46,380
So what I'll have to do now is do an escape like this,

205
00:08:46,380 --> 00:08:50,419
and I'm going to have to do a slash mcp,

206
00:08:50,419 --> 00:08:51,460
and I'm gonna have to come in

207
00:08:51,460 --> 00:08:54,739
and re-authenticate against Atlassian

208
00:08:54,739 --> 00:08:56,780
before this is going to work. So here we go.

209
00:08:56,780 --> 00:08:59,500
I select the Atlassian one. I press Enter.

210
00:08:59,500 --> 00:09:01,419
I say re-authenticate.

211
00:09:01,419 --> 00:09:07,140
It's then gonna spin this up. I say approve. I scroll down. I say accept.

212
00:09:07,140 --> 00:09:09,219
It then says I can return to Cloud Code.

213
00:09:09,219 --> 00:09:11,020
I bring back up Cloud Code,

214
00:09:11,020 --> 00:09:12,460
and now I'm going to say,

215
00:09:12,460 --> 00:09:17,460
please try marking the JIRA issue complete again,

216
00:09:23,260 --> 00:09:25,219
and we'll let it have a second shot at that

217
00:09:25,219 --> 00:09:27,020
to see if it works this time

218
00:09:27,020 --> 00:09:29,059
now that we've re-authenticated,

219
00:09:29,059 --> 00:09:30,619
but this is something I can see already.

220
00:09:30,619 --> 00:09:32,619
It's already got passed where it was before.

221
00:09:32,619 --> 00:09:33,659
So that's something to watch out for,

222
00:09:33,659 --> 00:09:35,179
and this is a classic example

223
00:09:36,219 --> 00:09:38,700
that C transition commands that sounds fine to me.

224
00:09:38,700 --> 00:09:42,460
It's a classic example of the slight flakiness of mcp,

225
00:09:42,460 --> 00:09:45,219
which you have to have one eye open for,

226
00:09:45,219 --> 00:09:48,580
and just a sort of try it again kind of line of attack

227
00:09:48,580 --> 00:09:50,260
is usually the one that works,

228
00:09:50,260 --> 00:09:51,179
and check this out.

229
00:09:51,179 --> 00:09:53,460
You can see here it's telling us it's done.

230
00:09:53,460 --> 00:09:55,539
It's telling us about what it created,

231
00:09:55,539 --> 00:09:57,700
and it's telling us about the catalog.json

232
00:09:57,700 --> 00:09:59,539
and the license.txt,

233
00:09:59,539 --> 00:10:00,700
and now with this,

234
00:10:00,700 --> 00:10:04,900
we can just say that it says it's marked PL2 as done.

235
00:10:04,900 --> 00:10:06,859
I think we can probably merge the PR.

236
00:10:06,859 --> 00:10:11,859
So I'll say, please go ahead and merge the PR,

237
00:10:14,260 --> 00:10:19,260
and also then switch the branch to main.

238
00:10:23,739 --> 00:10:27,780
Let's do that. Off it goes.

239
00:10:31,619 --> 00:10:32,659
Oh, that's interesting.

240
00:10:32,659 --> 00:10:34,739
I don't have merge permissions.

241
00:10:36,059 --> 00:10:38,419
So it's got to work around by merging locally

242
00:10:38,419 --> 00:10:39,419
and pushing to main,

243
00:10:39,419 --> 00:10:40,900
which is another way to do it.

244
00:10:40,900 --> 00:10:43,340
Again, ingenious, absolutely ingenious.

245
00:10:43,340 --> 00:10:47,500
So my find token, that doesn't give us access to do that,

246
00:10:47,500 --> 00:10:49,260
but because I locally,

247
00:10:49,260 --> 00:10:51,780
we could do a merge and then push to main,

248
00:10:51,780 --> 00:10:54,219
and that's how it's done it.

249
00:10:54,219 --> 00:10:56,099
Again, it's just phenomenal

250
00:10:56,099 --> 00:10:59,099
how Cloud Code is able to understand

251
00:10:59,099 --> 00:11:00,979
the reason behind problems

252
00:11:00,979 --> 00:11:03,619
and then come up with a rational solution to it.

253
00:11:03,619 --> 00:11:05,020
For all the times that I moan

254
00:11:05,020 --> 00:11:07,179
about how sometimes it jumps to conclusions

255
00:11:07,179 --> 00:11:09,619
and puts on Band-Aids to work around problems,

256
00:11:09,619 --> 00:11:12,539
sometimes it problem solves really effectively,

257
00:11:12,539 --> 00:11:14,179
and that's what we've seen today.