Okay. So here I am back in Jira.
Remember Jira? I'm going to create another issue,
another work item, whatever they call now,
a task, what needs to be done?
I'm going to describe a more
sophisticated task than that simple website thing.
Let's put something in here that's
some real functionality that we want to build.
Okay. So I'm going to create a new task,
and the task is going to be to create
a dataset of legal document templates
that the system will later be able to modify for the user.
That explains what we need to do.
There we go. That is the item.
Let's double-click into it to bring it up and add some details.
First, just to show you,
we're going to be tapping into this resource
by a company called Common Paper,
which is a fabulous resource.
It is a set of repos that this company has,
which contains draft legal documents
like a mutual NDA, a classic document.
In each case, in these repos,
they've got a markdown version of it,
which is exactly what LLMs love for these things.
It's got a markdown version of it,
and also they're all under the Creative Commons license,
which means that you can use them and modify them for free, which is great.
So this is a good source of data for us for this project.
That is precisely what I'm going to
tell in the description of this task.
The task is create a dataset of legal document templates
that the system will later be able to modify for the user.
I'm going to paste in here some text that I just wrote,
so you don't have to watch me typing it.
This task is a one-time data curation project.
I call it data curation task just to avoid getting confusing there,
to prepare data for the pre-legal project.
For context, the common paper GitHub account at,
and then a link to it, contains a number of
repos with legal agreement templates that can
be copied and modified under a CC license.
We will use this as the source of data.
For this task, we will need to browse these repos.
We will need to pull down the markdown files,
put in a directory called templates.
Additionally, make a JSON file to
describe the different templates that we've got,
and finally put in a license file to recognize the license.
Let me save that.
That is the description of the action.
I'm trying to do this in a way that perhaps could be something that
your product team or business sponsor has put in.
It's a task to be done.
It's something which is human understandable,
it's quite high level,
and it will involve a number of different tasks.
In this case, it's like a one-time task to retrieve data.
This is something that we're going to want to give to Cloud Code.
It's worth taking a look at this and seeing that it's called PL-2.
That is the name of the issue.
Now, we need to go to Cloud Code.
But don't forget, we also need to install
this MCP server in Cloud Code because we
installed it just for the other project.
Now, we need to install it for this project.
Let's go and do that, and then let's kick this whole thing off.
Here we are back in Cloud Code.
I'm going to come out of Cloud Code.
Sorry, Control C twice quickly.
Then I'm going to paste in the Cloud MCP add.
This is to add the Atlassian MCP server.
It is added in there,
and now I go back into Cloud.
Now, I do slash MCP to take a look at our MCP servers,
and we can see that the Atlassian one is there.
It says that it's connected,
but I don't believe it.
We're going to re-authenticate.
In we go, I press Enter.
I am going to say re-authenticate.
Up comes a browser window,
approve, and it's requesting access, accept.
Authentication successful.
You can go back to Cloud Code.
That is what we will do.
Here we are. We believe that we are authenticated.
Now, we're not yet going to use
that feature that we just put in there.
It's a bit much to architect and build and code review this,
which is going to be a one-time data exercise.
We're going to use that next. First up,
we're just going to try and say,
please carry out JIRA issue
PL2 and raise a PR with your changes.
Let's just leave it at that.
Giving it a nice high-level task,
and for the time being,
I'm going to press two.
I'm going to say you can do what you want.
I'm going to let it go off and do things.
It's getting an issue for PL2.
You could see that. That seems good.
We'll let it get PL2.
We'll let it review what it needs to do.
The main thing to bear in mind here,
it's trying to use the GitHub tool to read the common paper,
which wasn't exactly the plan,
but we'll see what it does.
That all seems fine.
It's getting lots of things.
Let's say, don't ask again, get file.
We'll let it keep going with what it's doing with this access token.
It's using the GitHub tool.
I was thinking it would just browse the web
because these are all public files,
but it's using this, and off it goes.
So much going on.
Crazy. It seems to be doing all the right kinds of things.
It's downloading stuff.
The question is, is it going to be writing it here?
We will soon find out.
I will come back in a minute when it's done its thing.
I'm just going to show you actually.
It hasn't done its thing yet.
It's like halfway through.
It's got everything using the GitHub tools,
and it's now wanting to create the templates directory,
and that sounds great.
That's just what we wanted.
So I'm going to let it do that.
It's now created the templates directory,
and hopefully it's now going to be writing a bunch of markdown files
that it has downloaded from the GitHub repo.
I was thinking it would use web searching for that.
It's used the GitHub tool.
That's what autonomy is all about.
We let Cloud Code do what it does,
and I will see you back here again in a second.
I'm continually completely astonished by Cloud Code.
So what just happened while I watched during that break
that was the second view that was five minutes for me
is that Cloud realized that the way that it was doing it,
which wasn't what I was expecting it to do,
was going to be too slow.
It was going to involve bringing long files into its context,
which wasn't a smart way to do it,
and so it downloaded a few documents,
but it's come up with a better way,
which is what I thought it was going to do originally,
which is just run some commands to download them directly,
and now it's asking me for permission,
and that's just incredible.
It's like it hit a roadblock.
It figured out what was going on
and how to work around that properly.
I think this is an example of the inflection point
that we saw last November,
where this kind of intellect wasn't possible before.
So yes, I'm going to say yes, absolutely.
It can do that, and bam, all the files appear,
which is what I thought was going to happen before,
and it now has done a decent job.
It's absolutely staggering.
Cloud Code then went ahead.
It did a pull request.
It first tried to use the GitHub command line tool to do it,
which I don't have installed.
That didn't work, and then it realized,
oh, but I've got the tool through my MCP server,
so it used the tool to make a PR request,
and now when I go into GitHub at the pre-legal,
I go to pull requests.
There is here add legal document templates data set.
I click into this.
It's got all of these details that it put.
It says generated by Cloud Code at the bottom.
These are the templates.
This is the description.
Let's have a look at the code that it wrote.
This is, of course, also sitting on my local box.
There's one commit.
These are the files that it changed.
It built all of these different markdown files.
It also created a license.txt, which I asked it to do,
which describes the fact
that this is a Creative Commons license,
and it made a catalog.json file,
and that is something which I asked it to again
in the JIRA task, which lays out what has to happen.
Absolutely amazing.
Now, back here in Cloud Code, though,
it's struggling a bit.
It's struggling because it realized
that it would be nice for it to also update
the JIRA issue status to mark it as complete,
and it's been sitting there waiting on Atlassian,
and I happen to suspect, because I've seen this before,
that this happens because you have
to continually re-authenticate with Atlassian.
I've seen a lot of complaints about this in the community.
This is something that people know about,
and it just hangs Cloud Code like this.
So what I'll have to do now is do an escape like this,
and I'm going to have to do a slash mcp,
and I'm gonna have to come in
and re-authenticate against Atlassian
before this is going to work. So here we go.
I select the Atlassian one. I press Enter.
I say re-authenticate.
It's then gonna spin this up. I say approve. I scroll down. I say accept.
It then says I can return to Cloud Code.
I bring back up Cloud Code,
and now I'm going to say,
please try marking the JIRA issue complete again,
and we'll let it have a second shot at that
to see if it works this time
now that we've re-authenticated,
but this is something I can see already.
It's already got passed where it was before.
So that's something to watch out for,
and this is a classic example
that C transition commands that sounds fine to me.
It's a classic example of the slight flakiness of mcp,
which you have to have one eye open for,
and just a sort of try it again kind of line of attack
is usually the one that works,
and check this out.
You can see here it's telling us it's done.
It's telling us about what it created,
and it's telling us about the catalog.json
and the license.txt,
and now with this,
we can just say that it says it's marked PL2 as done.
I think we can probably merge the PR.
So I'll say, please go ahead and merge the PR,
and also then switch the branch to main.
Let's do that. Off it goes.
Oh, that's interesting.
I don't have merge permissions.
So it's got to work around by merging locally
and pushing to main,
which is another way to do it.
Again, ingenious, absolutely ingenious.
So my find token, that doesn't give us access to do that,
but because I locally,
we could do a merge and then push to main,
and that's how it's done it.
Again, it's just phenomenal
how Cloud Code is able to understand
the reason behind problems
and then come up with a rational solution to it.
For all the times that I moan
about how sometimes it jumps to conclusions
and puts on Band-Aids to work around problems,
sometimes it problem solves really effectively,
and that's what we've seen today.