back to indexPiloting agents in GitHub Copilot - Christopher Harrison, Microsoft

00:00:15.000 |
So a couple of real quick things for those who are just getting settled in or just roaming in. 00:00:20.000 |
First of all, if you're sitting in the back and hoping for a seat, 00:00:35.000 |
and I want to make sure that I'm clear about this. 00:00:37.000 |
So if you're working on something else, now is not the time to multitask. 00:00:40.000 |
But instead, pay attention to the person that's babbling up in front of the room. 00:00:44.000 |
We are going to be running the exact same lab. 00:00:52.000 |
I'm going to say that one more time for effect. 00:00:54.000 |
But we are going to be running the exact same lab this afternoon at 3:30. 00:01:00.000 |
So even though that 3:30 lab has a different title, a different abstract, 00:01:03.000 |
I am here to tell you it is the exact same lab. 00:01:17.000 |
So if you're hanging out in the back, really wanting to do this, check back. 00:01:20.000 |
This room, 3:30, you'll be able to do the exact same thing. 00:01:23.000 |
Second of all, we are running around and getting everybody added into a particular organization. 00:01:29.000 |
That organization is going to give you access to GitHub Copilot. 00:01:33.000 |
Now, when you get added into an organization in GitHub, you do need to accept that invitation. 00:01:41.000 |
So please go in, check your email that's associated with your GitHub account, and accept that invitation. 00:01:58.000 |
And while you're doing that, I'm going to make the announcement one more time for those in the back of the room. 00:02:04.000 |
If you want to do this lab, come on back at 3:30. 00:02:07.000 |
We're going to be doing the exact same lab at 3:30. 00:02:13.000 |
In your email that you have associated with your GitHub account. 00:02:51.000 |
If you get a phone call, you're more than welcome to take that phone call behind outside those doors there. 00:02:58.000 |
So while we are getting everything situated, here's what I'm going to do. 00:03:05.000 |
Is I am going to-- there we go-- start tracking through this little thing called GitHub Copilot, 00:03:12.000 |
and then begin to introduce the lab, and then get you turned over to the first exercise. 00:03:18.000 |
Basically, what's going to wind up happening is I'll do a little bit of babbling, and then you'll do a little bit of work, 00:03:24.000 |
and then I'll do a little bit of more babbling, and then lather, rinse, repeat until we have run out of time here. 00:03:32.000 |
Should we actually still able to get through the bulk of the lab, or at the very least, we'll be able to get through the cool parts of it? 00:03:39.000 |
We might skip something just so we can make sure that we can get to the end, but we'll explore and we'll play with all of that as we go here. 00:03:48.000 |
So without any further ado, let's talk about this little thing called GitHub Copilot. 00:03:53.000 |
If you're not already familiar with GitHub Copilot, GitHub Copilot has been given this tag of your AI pair programmer. 00:04:01.000 |
Now, not only is that wonderful marketing, because it is kind of wonderful marketing. 00:04:06.000 |
It's actually, I think, honestly, the best way to describe and to think about GitHub Copilot. 00:04:13.000 |
That just as I'm working with a pair programmer, I'm going to ask them to perform different tasks. 00:04:18.000 |
I'm going to ask them to do different things, and we're going to work together. 00:04:21.000 |
We're going to collaborate to build out a solution to solve problems. 00:04:26.000 |
I'm going to do that exact same thing when we're talking about Copilot. 00:04:31.000 |
And just like an AI pair programmer, it's going to have certain strengths, going to have certain weaknesses, 00:04:36.000 |
and there are going to be specific workloads that it's going to be able to help out with. 00:04:42.000 |
And that's exactly what we're going to see here. 00:04:45.000 |
We're going to take a look at a couple of different modes with agent mode locally, with edit mode, with ask mode. 00:04:51.000 |
We're also going to take a look at what we announced at Build, our brand new Copilot coding agent, 00:04:56.000 |
which actually allows you to assign issues to Copilot. 00:05:00.000 |
And then we're also going to spend an awful lot of time talking about context. 00:05:04.000 |
Because as I mentioned, again, AI pair programmer, context is really key. 00:05:09.000 |
It's key across many aspects of life, and it's certainly going to be key whenever we're working 00:05:14.000 |
with any form of AI, and that does include GitHub Copilot. 00:05:20.000 |
So without any further delay, let's go ahead and get into it. 00:05:32.000 |
And the way that I always like to introduce context is by giving a little bit of a quick story. 00:05:43.000 |
She looks at me and says, let's go get brunch. 00:05:50.000 |
And then she says, but here's the thing, is we've been there an awful lot lately and I'm kind of burnt out on it. 00:05:59.000 |
And so then I recommended at a different spot. 00:06:01.000 |
And then she thinks for a minute and she says, you know, I'm really kind of craving waffles. 00:06:08.000 |
And so then I recommended another spot and off we went. 00:06:11.000 |
Now that back and forth is like very normal to human conversation. 00:06:18.000 |
And then I gave, based on the context that I had, a perfectly valid answer. 00:06:23.000 |
And then a little bit more information was provided. 00:06:27.000 |
And then eventually we found the solution that we were driving towards. 00:06:31.000 |
And that's exactly how we're going to work with Copilot. 00:06:37.000 |
We're going to help point it in the right direction. 00:06:39.000 |
And then we're going to work together to get to the solution that we are looking for. 00:06:45.000 |
Now, whenever we're talking about context, there's oftentimes a lot of focus on the prompt. 00:06:53.000 |
The prompt that we use for Copilot when we're using chat, when we're creating an issue, 00:07:00.000 |
But it really goes beyond just that prompt that we give to Copilot. 00:07:05.000 |
And I honestly find that a lot of times when people are first getting started with Copilot, 00:07:11.000 |
that there's a little bit too much focus on that prompt itself. 00:07:15.000 |
Because what Copilot is going to use for context is everything that it sees. 00:07:23.000 |
So making sure that your code is readable is extremely important. 00:07:29.000 |
Unlike a lot of other tools that you're going to be using, 00:07:31.000 |
well, there'll be a script where it's going to build your code or scan all of your code 00:07:35.000 |
and look for different patterns and so forth. 00:07:41.000 |
it's going to behave an awful lot like another programmer coming along and reading your code. 00:07:46.000 |
And if your code isn't readable, if you're using a lot of abbreviations, 00:07:49.000 |
you're using names that aren't clear, you're using single letter variable names, 00:07:55.000 |
Copilot's not going to be able to easily understand that. 00:08:03.000 |
Now, I do have a little bit of a belief that code that's easy to read shouldn't need comments. 00:08:12.000 |
That the code should describe well enough what it is that it's doing. 00:08:17.000 |
But we all know that that's not always the case. 00:08:21.000 |
And that a couple of lines of comments left behind 00:08:24.000 |
is not only going to help you six months later when you go back to that code base 00:08:29.000 |
and trying to figure out what it is that you're doing, 00:08:31.000 |
but it's going to help, again, that pair programmer and that AI pair programmer. 00:08:38.000 |
And then last but not least is having a good project structure. 00:08:43.000 |
Allowing Copilot to be able to quickly find the different resources 00:08:48.000 |
that it's going to need is also really important. 00:08:54.000 |
And that brings us into this spot right here of helping Copilot help you. 00:08:59.000 |
I sort of like to say, don't be passive aggressive with Copilot. 00:09:05.000 |
That don't throw something at Copilot and kind of like hope that it figures out what you really, really meant. 00:09:11.000 |
That if you know something or if you know that there's a particular piece of information that Copilot should be considering, 00:09:20.000 |
And what you're going to see is you've got a lot of great tools with which to do that. 00:09:25.000 |
So again, that context, all that background information. 00:09:28.000 |
And we're going to see a lot of different ways that we can do this. 00:09:31.000 |
Through like instruction files or again those comments, again that good project structure. 00:09:35.000 |
The intent, be clear about what it is that you're trying to do and be clear about it. 00:09:42.000 |
And when we're talking about clarity, for those of us that have maybe worked around with like old chatbots, 00:09:48.000 |
and we got very used to just sending very terse commands because natural language processing back a few years ago 00:09:57.000 |
So we were effectively using it like a command line interface. 00:10:00.000 |
We want to be a bit more verbose, be a bit more flowery, make sure that we're easy to understand. 00:10:06.000 |
And then last but not least, that specificity. 00:10:08.000 |
If we want something done a particular way, let's be clear about it. 00:10:15.000 |
So let's introduce real quickly here the different workloads that we have available to us. 00:10:21.000 |
Now the glowing one on the right is not necessarily to indicate that, hey, that is the best, 00:10:28.000 |
but rather just simply that that's new and new things are shiny. 00:10:37.000 |
And this is sort of the original version, if you will, of GitHub Copilot. 00:10:43.000 |
And then Copilot right in line is going to start making suggestions about what my next line, 00:10:50.000 |
my next block, my next class, my next function is going to be. 00:10:55.000 |
If you're in the zone, you know what you're doing. 00:11:00.000 |
And then we get into chat and we get into edit mode. 00:11:03.000 |
You know, chat originally just had ask, which is going to be for single shot. 00:11:10.000 |
Whereas with edits mode, what that's going to allow me to do is that's going to allow me to edit multiple files in one shot. 00:11:20.000 |
Because when we think about even the most basic of updates, say like I'm just updating a web page. 00:11:27.000 |
I'm going to update an HTML file, CSS file, and a JavaScript file. 00:11:31.000 |
There's very few, if any, code updates that are single file anymore. 00:11:36.000 |
And so with edits, I can then guide Copilot through editing multiple files. 00:11:41.000 |
And then we can get into local agent mode, where now Copilot's going to kind of lead the way. 00:11:48.000 |
But what we're really going to see with agent mode is that it's going to behave an awful lot like a developer. 00:11:53.000 |
That it will be able to explore your project. 00:12:04.000 |
And if it detects that anything has gone wrong, it'll actually be able to self-heal. 00:12:09.000 |
I'm going to come back to questions in a little bit. 00:12:15.000 |
And with Copilot coding agent, what I'm going to be able to do is take an issue in my repository, assign that to Copilot, 00:12:23.000 |
and then I get to go on about doing something else. 00:12:27.000 |
So if I have like little tasks, little things that I just haven't been able to get to, I can go ahead and assign that issue. 00:12:33.000 |
Then I can focus my attention on the bigger problems. 00:12:37.000 |
And so those are the different workloads that are available to us with Copilot. 00:12:47.000 |
So without any further delay, I'm going to actually kind of leave that there. 00:12:56.000 |
So first thing before you click on that URL, this is going to be a real quick test. 00:13:00.000 |
You know how you were probably in elementary school and you got handed that sheet with like 40 steps on it. 00:13:07.000 |
And step one was read all the instructions to the end. 00:13:13.000 |
And then step 40 was just do steps one and two. 00:13:22.000 |
So in any event, this is going to be one of those tests. 00:13:25.000 |
So first thing is first, before you go there, make sure that you have gone to your email that's associated with your GitHub account. 00:13:38.000 |
And when you got asked, hey, do you want a copilot license? 00:13:57.000 |
And they should see if they have these accepted animations. 00:14:07.000 |
So if you did not get your invite for whatever reason, then you're going to go there. 00:14:30.000 |
So if you did not get your invite for whatever reason, you can actually just go directly to 00:14:35.000 |
github.com/octahol and then accept your invite. 00:14:39.000 |
Now, I'm going to give you a minute to do that in the background. 00:14:42.000 |
And then I'm going to address the people that are hanging out in the back of the room here. 00:14:47.000 |
We are going to be doing the exact same lab at 3:30. 00:14:55.000 |
So if you want to do the lab, you want to have a seat, you want to be comfortable. 00:15:02.000 |
The 3:30 session is going to be an exact repeat of everything that we are doing here. 00:15:11.000 |
Now, if you do not have access yet to octahol, then hang on. 00:15:19.000 |
We'll be around to help troubleshoot all of that in a minute. 00:15:22.000 |
Assuming that you do have access, if you head on over to that URL right there, what that 00:15:29.000 |
will do is that will take you to-- let's-- let me go to the right spot. 00:15:49.000 |
So that will take you to this little readme file right here. 00:15:52.000 |
This is going to give you an overview of the lab and everything that you're going to be doing. 00:15:59.000 |
You're going to configure and interact with some external services, provide context, co-pilot, 00:16:03.000 |
complete a site-wide update, and then review co-pilot's work. 00:16:08.000 |
And you'll notice all the way down at the very bottom, get started. 00:16:11.000 |
We're going to do this by getting everything set up right here. 00:16:14.000 |
We are going to be using code spaces, so you don't need any local installation. 00:16:20.000 |
So the first part is going to be setting all of that up. 00:16:26.000 |
When it comes to this spot right here-- and this is now where I'm going to need everybody 00:16:33.000 |
So when you go in to create your lab, where you're going to want to create it 00:16:41.000 |
and how you're going to want to create it-- let me create a real quick new slide here. 00:17:04.000 |
Typing skill is inversely proportional to the number of people watching. 00:17:09.000 |
When you go to create your repo, that's going to be the owner that you're going to want. 00:17:27.000 |
It will need to be inside that organization, because otherwise it's not going to work. 00:17:38.000 |
It will kind of make it real nice and easy for everybody. 00:17:44.000 |
And again, if you did not see where to access the lab, that's where to access the lab. 00:17:49.000 |
I'm going to leave this slide up for a minute here. 00:17:51.000 |
That's where you're going to access the lab from. 00:17:56.000 |
That's going to be going away in five, four, three, two, one. 00:18:07.000 |
And then finally, that's where you can go ahead and create your repo. 00:18:17.000 |
So I'm going to let you start roaming through exercise zero. 00:18:20.000 |
I'm going to let you start roaming through exercise one. 00:18:23.000 |
If you have questions, that is exactly what John and I are here for. 00:18:27.000 |
Now, please do keep one big thing in mind, which is the fact that there are roughly about 80 of you. 00:18:38.000 |
We are doing our absolute best to run around as quickly as possible. 00:18:43.000 |
Does everybody know what they should be doing right now? 00:18:51.000 |
I always assume that silence is a, hey, everything is fantastic. 00:18:59.000 |
So if something isn't going quite right, please, please, please say something. 00:19:15.000 |
Has anybody been able to assign an issue to co-pilot? 00:19:34.000 |
Has anybody been able to successfully have co-pilot start work on the issue? 00:19:48.000 |
Of those that just raised their hands, how many already had access to either co-pilot Enterprise 00:20:11.000 |
The org that we put everybody into is supposed to have that level of access. 00:20:16.000 |
Apparently, that doesn't seem to quite be the case. 00:20:20.000 |
So in the meantime, here's what I'd like to go ahead and do is kind of just start walking 00:20:28.000 |
through the exercises here so that way you can at least see it. 00:20:31.000 |
The other thing that I do want to highlight-- and let me put this URL back up here. 00:20:36.000 |
Now, granted, again, to assign issues to co-pilot coding agent, you are going to need ProPlus 00:20:44.000 |
So like that part of the lab you won't be able to do unless you have access to that. 00:20:48.000 |
But if you have even co-pilot free, you'll be able to perform the rest of the lab. 00:21:00.000 |
And you can go back and play with it all on your own later on there. 00:21:10.000 |
What I'm actually going to do is there was a question here. 00:21:12.000 |
I'm assuming the question was about co-pilot. 00:21:22.000 |
I was curious, do you consider any of the modes vibe coding? 00:21:27.000 |
And I would say to a certain extent, basically anything that's going to be agent driven, where 00:21:43.000 |
you're going to have co-pilot driving the operation rather than you driving the operation, that would 00:21:51.000 |
certainly fall under that category of vibe coding. 00:21:56.000 |
So whether or not that's an approach that you want to take of vibe coding all up, I will 00:22:01.000 |
Everybody sort of has their own opinions on that. 00:22:04.000 |
And one thing that you will notice about me is I typically don't share a whole lot of strong 00:22:13.000 |
So I don't necessarily have a strong opinion one way or another on that. 00:22:23.000 |
So I'm bringing this up in the background here. 00:22:28.000 |
How does it differentiate from Cascade and Windsurf? 00:22:31.000 |
So I'm going to answer Cascade, Cursor, Windsurf, and all of those questions all up. 00:22:37.000 |
Which is to say that there's a limited number of hours in the day. 00:22:46.000 |
I can't keep up with what anybody else is doing. 00:22:49.000 |
So I honestly am not familiar at all with any of the feature sets of any of the alternatives 00:22:59.000 |
And honestly, going out bashing competition and things like that is not necessarily my vibe. 00:23:08.000 |
So what I would say is, if you're going, hey, Windsurf does this. 00:23:19.000 |
But if you're looking for a feature comparison or things like that, I'm really not able to do 00:23:23.000 |
that because, again, I just don't know those well enough. 00:23:27.000 |
As you're showing that co-pilot can be more aware of the environment. 00:23:34.000 |
Can it be connected to your SQL or some other data source? 00:23:40.000 |
So the question is, can co-pilot be aware of external data sources? 00:23:50.000 |
But with a little thing called MCP or model context protocol, it can. 00:23:54.000 |
So if you're not already familiar with model context protocol, he says, bringing up the slide 00:23:58.000 |
right here, the whole goal is to be able to expand co-pilot's capabilities. 00:24:04.000 |
So co-pilot is built on top of an LLM, large language model. 00:24:11.000 |
And so what MCP allows you to do is it allows you to give co-pilot the ability to call out to external 00:24:20.000 |
And the diagram looks a little bit like this. 00:24:25.000 |
There's going to be a quiz on this in about 15 minutes. 00:24:29.000 |
And basically what you're going to notice if you look at this is that your request is going to go to co-pilot. 00:24:35.000 |
Then it's going to call out to the MCP server, which is then able to access external resources. 00:24:43.000 |
So one of the MCP servers that's available, for example, is GitHub. 00:24:47.000 |
And so what I can actually do then with that MCP server is I can then go to co-pilot and I can say, hey, create an issue on this. 00:24:58.000 |
And I realize, hey, there's something I want to be able to look at later. 00:25:00.000 |
Let me just go ahead and create a real quick issue on that. 00:25:09.000 |
And I want to be able to get that schema or I want to be able to get that data from there. 00:25:16.000 |
Now, a couple of real quick things on MCP servers. 00:25:19.000 |
Number one is that there are a bunch of first party ones that are created. 00:25:29.000 |
And then there's a lot of community ones that are out there. 00:25:34.000 |
Now, here's the catch is that MCP servers are not only able to access data on your behalf, 00:25:41.000 |
but they're also able to perform tasks on your behalf. 00:25:46.000 |
So as a result, before you utilize a third party MCP server, make sure it is something that you trust. 00:25:58.000 |
Or you can consider creating one on your own. 00:26:01.000 |
I'm going to admit I haven't yet created one on my own. 00:26:04.000 |
But it is something that is-- sorry, I got thrown. 00:26:21.000 |
And it does seem to be something that's relatively straightforward as far as setting it up that you can just capture the request, process it, and then send it off from there. 00:26:28.000 |
And then you basically just create a set of endpoints for Copilot to figure out. 00:26:34.000 |
If you have a backup for your database that's in like a .sql file, can it consume that? 00:26:43.000 |
And in fact, you wouldn't even necessarily-- like, if what you're looking for is to help Copilot write database queries really well, all that Copilot really needs at that point is your DDL, 00:26:54.000 |
And that's actually something that you can do internally inside of-- where do I want to go? 00:27:09.000 |
I'm trying to remember this off the top of my head, so I'm probably going to get the exact-- 00:28:25.000 |
So what you could do, if all you have is just the DDL, is you could actually just include that with your instructions. 00:28:32.000 |
And then that way, anytime that I talk to chat, then Copilot can go ahead and use that and be able to generate it that way. 00:28:38.000 |
And that's honestly the simplest thing that works. 00:28:44.000 |
He's talking about like agents MD or Copilot structure MD and scope of the . 00:29:06.000 |
Yeah, unfortunately, between Wi-Fi issues, access issues, and things like that, 00:29:17.000 |
I'm turning this into sort of like live Q&A and live demos. 00:29:20.000 |
I'm trying to give everybody the best possible value that I can, given the situation that we have. 00:29:53.000 |
So, let's talk a little bit about Copilot coding agent. 00:29:56.000 |
So, let's talk a little bit about Copilot coding agent. 00:30:01.000 |
So, let's talk a little bit about Copilot coding agent. 00:30:05.000 |
So, what I've got here is I have an issue that I've created. 00:30:18.000 |
And this is just copy and paste the tree from the lab, to have it create endpoints for creating 00:30:34.000 |
And the first thing that I want you to notice about the issue here is, again, the context. 00:30:38.000 |
That the whole goal of coding agent is to act asynchronously. 00:30:47.000 |
That I assign an issue to it, and I just let it do its thing. 00:30:52.000 |
And off, Copilot does, and it does its thing, and then it will eventually come back to me. 00:30:58.000 |
Because, how do I then know whether or not Copilot has everything that it needs to be able 00:31:18.000 |
That's the little indication that Copilot's now on the test. 00:31:22.000 |
So, the first thing I want to highlight is the issue. 00:31:26.000 |
And you'll notice, again, I'm not being passive aggressive with Copilot. 00:31:29.000 |
If I know what I want it to do, if I even know how I want it to approach the task, I'm going 00:31:36.000 |
That the more that you leave for ambiguity's sake, the more that you leave for the other party 00:31:41.000 |
to figure out, this is human or this is AI, the more chance that you're going to come back 00:31:47.000 |
to something that you really didn't exactly want. 00:31:50.000 |
So, if you want the wall painted a particular shade of red, then say that you want the wall painted 00:31:59.000 |
But again, as I highlighted, it goes beyond just the prompt. 00:32:02.000 |
And effectively, that's what this is, is this is a prompt. 00:32:05.000 |
And so, Copilot supports some different instructions files. 00:32:10.000 |
Now, right now, it does depend a little bit on where you are and what you're doing. 00:32:17.000 |
But with chat and with coding agent, all of them support copilot-instructions.md. 00:32:26.000 |
So, if you're using chat and if you're using coding agent, this supports copilot-instructions.md. 00:32:34.000 |
And if we take a look at this file, what I want you to notice is just a markdown file. 00:32:41.000 |
And what I've done inside of this file is I've given it high-level overviews of what we're 00:32:47.000 |
building, how we're building it, and my project structure. 00:32:51.000 |
So, you'll notice, for example, that I've got some guidelines right up top. 00:32:56.000 |
So, this is a crowdfunding platform with a developer theme, the application uses, yada, yada, yada. 00:33:01.000 |
You'll also notice I've given it coding standards. 00:33:04.000 |
This is what's required before we each commit. 00:33:08.000 |
And I've also told it how it is that I want my Python and Flask to be created, 00:33:13.000 |
how I want my Svelte and Astro to be created, how I want my style, my actions. 00:33:18.000 |
I've given it information about the scripts that are available. 00:33:21.000 |
And I've also documented my repository structure. 00:33:25.000 |
Chances are you already have this inside of your projects. 00:33:33.000 |
And if you don't, here's a good opportunity to create it. 00:33:40.000 |
And so now, any time I make a chat request locally, or when Coding Agent does its thing, 00:33:49.000 |
Now, going one step further with Coding Agent, another big question becomes, 00:33:55.000 |
So, as it turns out, Coding Agent behind the scenes is using GitHub Actions. 00:34:00.000 |
And you'll notice right here I've got a special action that's created that's called 00:34:06.000 |
And so in here, I'm now having it install everything that I think it's going to need 00:34:14.000 |
So if there are any libraries, any frameworks, any services, anything like that 00:34:17.000 |
that you need to have installed, any scripts that you need run, 00:34:22.000 |
So now, Copilot is going to have this as its environment to get in and do its work. 00:34:28.000 |
And it's also going to have this instructions file that we highlighted a minute ago 00:34:38.000 |
Now, on top of that, let me go over here to my pull requests. 00:34:43.000 |
Is I can see the pull requests that Copilot made. 00:34:52.000 |
And if I open this up and I scroll on down, I can view the session here. 00:35:00.000 |
And this will show me Copilot doing its thing behind the scenes. 00:35:09.000 |
What I can see is it's actually going out and it's exploring the project. 00:35:13.000 |
And it's digging up information on its own as well. 00:35:17.000 |
So again, as we were talking, good code, clear code, good comments, 00:35:25.000 |
And all of that is going to help Copilot out as well. 00:35:29.000 |
So I can give it information through the issue. 00:35:31.000 |
I can give it information through my instructions. 00:35:34.000 |
I give it information kind of implicitly through the project itself. 00:35:38.000 |
And then I can also create that environment by setting up 00:35:47.000 |
For the custom instructions, are they available in like edit mode 00:35:56.000 |
And I'm going to answer the second part of that at workspace as well. 00:35:59.000 |
So when it comes to Copilot instructions, those are always going to be available. 00:36:07.000 |
Those are always going to be available inside of chat here. 00:36:19.000 |
And by the way, I do not have a stance on which model is better than any other model. 00:36:29.000 |
So update the website to allow for filtering by publisher and category. 00:37:14.000 |
oh, I put it into agent mode, so it's not going to-- 00:37:16.000 |
I promise you it is going to use the instructions. 00:37:19.000 |
It's just not going to show it to me, unfortunately. 00:37:26.000 |
There's my copilot instructions under my references. 00:37:32.000 |
The other thing that I want to highlight is-- 00:37:34.000 |
and this right now is particular to local chat-- 00:37:51.000 |
understand kind of the first time that you see it. 00:37:58.000 |
Every single chat request, this is going to go. 00:38:01.000 |
The dot instructions files-- these become manual. 00:38:05.000 |
So I can add these in manually to a task that I'm performing inside of chat. 00:38:11.000 |
He says, delaying long enough for it to finally open. 00:38:14.000 |
So what you're going to notice-- again, a markdown file-- 00:38:17.000 |
but this is now particular to a type of task. 00:38:23.000 |
And so you'll notice in here that I've given it information about the endpoint. 00:38:27.000 |
I've given it information about my unit test. 00:38:30.000 |
I've given it a couple of notes about the project. 00:38:33.000 |
And I've even linked to files that it should use as a prototype. 00:38:42.000 |
So if I brought this in, now what it would do 00:38:45.000 |
is it would follow all of those instructions there. 00:38:48.000 |
But let's say, for example, with React components-- just to use that as an example-- 00:38:54.000 |
that I want to make sure that React components 00:38:57.000 |
always follow the exact same patterns and practices. 00:39:01.000 |
So what I can do there is, up at the very top, 00:39:12.000 |
asterisk.jsx or tsx if you're using TypeScript. 00:39:16.000 |
And now, any time that you're working with a file that matches that pattern, 00:39:21.000 |
it will then automatically apply that instructions file. 00:39:24.000 |
So in this case here, it's going to look inside of server tests. 00:39:27.000 |
And any time that it finds a file that matches, test underscore. 00:39:30.000 |
And you'll notice, if I go into my server tests, 00:39:43.000 |
So any time that I was working with a test file, 00:39:50.000 |
is that all of this becomes part of your repository. 00:39:55.000 |
So is creating these files going to take a little while? 00:40:02.000 |
But this is very much like spending three hours to write a script 00:40:07.000 |
for that task that constantly takes you a couple of minutes, 00:40:10.000 |
that after a little while you're going to get your money back on it, 00:40:15.000 |
So the time that you spend here is going to help improve productivity 00:40:22.000 |
is going to be the way that you want it to be. 00:40:27.000 |
If you're using the workflow for setting up coding agent, 00:40:31.000 |
And for like the custom-in-structing command, 00:40:37.000 |
And then you can do something to do something. 00:40:40.000 |
So the question is, hey, about these standards, 00:40:47.000 |
If you can do something, you can do something to do. 00:40:48.000 |
And then you can do something to do something to do. 00:40:51.000 |
So the question is, hey, about these standards, 00:40:54.000 |
So there's a few different ways now that you can approach that. 00:41:15.000 |
Number one is there is an ability to set instructions at the org level as well. 00:41:22.000 |
You can also, again, stand up an MCP server in front of that and allow for searching that way. 00:41:28.000 |
And then the last thing that I would mention, and we just recently, like literally yesterday, 00:41:33.000 |
I think it was, announced this, is Copilot Spaces, where this is specifically on github.com, 00:41:41.000 |
that what you can do is basically point it at a repository, point that at specific files, 00:41:53.000 |
And then that way, when a developer comes along and they do searches on github.com, 00:41:58.000 |
they'll be able to then raise the information from there. 00:42:07.000 |
So, I want to understand, the code agent is using the workflow set of this environment. 00:42:27.000 |
So, the question is, hey, about this workflow file, is this able to be automatically created 00:42:42.000 |
Now, if I was, like, working locally, like, let's say I'm not overly familiar with actions, 00:42:47.000 |
which I'm not, then I could go in through Copilot manual and I could say, hey, 00:42:53.000 |
I need to create an environment that's going to install this, this, this, and this, and let Copilot generate this for me. 00:42:59.000 |
But once I launch this into agent mode, agent mode is not going to be going back in and editing that. 00:43:06.000 |
Now, keep in mind, and I'm going to kind of lead this right into the next kind of, like, logical question here. 00:43:14.000 |
So, keep in mind that agent mode, or coding agent, so when it's doing its thing in the background here, 00:43:20.000 |
it does have an ability to, like, run scripts. 00:43:23.000 |
So, it can, like, run tests and things like that. 00:43:33.000 |
Here, and here, and let me scroll on down to view session here. 00:43:50.000 |
I'm going to zoom out, because, ironically, I think it's going to make it a little easier read. 00:44:07.000 |
It looks like all the test fails, although we're getting-- oh, that's cool. 00:44:18.000 |
I'll have to go back and now update the project. 00:44:18.000 |
But, in any event, the takeaway that I want you to get out of this is the fact that this is running 00:44:44.000 |
And so, that then kind of raises the next big question, which I think is very directly related 00:44:49.000 |
to, hey, could it go in and, like, modify that initial setup workflow? 00:44:59.000 |
And it also is not able to access any external resources. 00:45:04.000 |
When it comes to Coding Agent, Coding Agent was very much built with security in mind. 00:45:10.000 |
So, the first big thing is it's built on top of GitHub Actions. 00:45:15.000 |
And if you're not already familiar with GitHub Actions, when you spin up a brand new action 00:45:20.000 |
to start running, it does so in an ephemeral space. 00:45:24.000 |
So, it creates the one space that it's going to work in, it does all of its work in there, 00:45:28.000 |
and then once that's done, all of that's torn down. 00:45:31.000 |
So, that's the only space in which it can work. 00:45:33.000 |
Copilot only has read access to your repository, save for the branch that it's going to create, 00:45:45.000 |
So, in this case here, it's going to be copilot-fix-2. 00:45:49.000 |
Copilot-fix is what it's always going to start with, dash, and then the number of the issue 00:45:58.000 |
So, in this case, it was issue number two, so that's why it's copilot-fix. 00:46:04.000 |
So, that's the only thing that it's going to have write access to. 00:46:07.000 |
On top of that, it does not have access to any external services unless you open up the firewall. 00:46:16.000 |
So, the firewall is going to be completely locked down. 00:46:22.000 |
That includes, by the way, installing packages. 00:46:25.000 |
So, let's say there was a library that needed to be installed, and it tries to install that. 00:46:29.000 |
It's going to fail on that unless I've specifically punched open a hole on that. 00:46:34.000 |
Now, the exception to that, the workflow that I create. 00:46:38.000 |
That initial setup workflow that we talked about. 00:46:41.000 |
That workflow, because now I can install those services. 00:46:43.000 |
So, if there's anything that I know that it needs, then I can go ahead and do that. 00:46:46.000 |
But, otherwise, it's not going to have access to any external resources. 00:46:50.000 |
So, very much designed with that security in mind. 00:46:53.000 |
So, very long-winded answer, but there's everything you ever wanted to know. 00:46:57.000 |
So, with that in mind, you have a workflow run test YAML that will get an action on the master 00:47:07.000 |
Yeah, so, let's actually go kind of one step further with this. 00:47:20.000 |
And so, when I create a PR into main, so I'm going to use this one here, dependent bot wanting to bump a version number. 00:47:26.000 |
And we're going to notice, we're going to notice, there we go, that I have a workflow set up here to perform some testing. 00:47:39.000 |
So, it runs unit tests and it runs some end-to-end tests. 00:47:43.000 |
So, that way somebody goes in, they create a pull request, and we're going to confirm all of that. 00:47:48.000 |
Every organization should, hopefully, have some level of validation that PRs look good before they start merging them in. 00:48:02.000 |
Again, thinking with our security cap, I want to make sure that any of that code is always going to be something that I trust. 00:48:11.000 |
So, hopefully, anyway, I can trust all my developers. 00:48:14.000 |
But when it comes to AI, I'm not entirely certain. 00:48:18.000 |
So, what we'll notice is that here's the PR that it finished. 00:48:23.000 |
And you'll notice, if I scroll on down here, and I get to that section on workflows, that it has not run those tests. 00:48:35.000 |
And it's only going to run those tests if I click that button right there. 00:48:39.000 |
And, of course, before I do that, I should go in and review the code and everything else there. 00:48:44.000 |
So, my question is, is your code working in the script? 00:48:52.000 |
So, the question is, so, Copilot, when it did its work behind the scenes-- we saw this already-- that it ran all of those unit tests locally. 00:49:11.000 |
And then, now, we're going to notice here that I'm going to have it run those unit tests again. 00:49:16.000 |
So, I do the exact same thing with Copilot as I do with all of my other developers, which is that belt and suspenders approach. 00:49:29.000 |
Just because I introduce AI does not mean that any of the fundamentals of DevOps change. 00:49:36.000 |
So, let's think about how I wrote code before AI. 00:49:39.000 |
So, some of it would be from my own knowledge. 00:49:42.000 |
Some of it would be grabbed from documentation. 00:49:45.000 |
Some of it would be copied and pasted from Stack Overflow and changing it and hoping and praying that it actually did what I wanted it to do. 00:49:53.000 |
And then, eventually, I'm going to go ahead and I'm going to run my test locally, hope that all of them work, and then I'm going to create a PR. 00:50:03.000 |
Now, after we do that PR, now what are we going to do? 00:50:06.000 |
Well, we're going to get another developer to come along and review the code. 00:50:10.000 |
We're going to run all of our actions, and we're going to make sure that our test pass, that our linters check out, that all of our security scans are run, that we're going to do all of those core fundamentals, regardless of how my code is being generated. 00:50:30.000 |
But am I still going to go in and double check? 00:50:57.000 |
So, let's say I'm working on a larger project. 00:51:01.000 |
So, when I run my unit or even my end-to-end test, it's going to take like 30, 40 seconds. 00:51:06.000 |
But if you've got a larger project, where now that's going to be taking minutes. 00:51:09.000 |
So, in agent mode, then I can go ahead and direct it. 00:51:13.000 |
Like, hey, only run the tests on what you're working on until you get to the very end, and then go ahead and run everything. 00:51:21.000 |
So, I could either just include that in the prompt. 00:51:24.000 |
Again, don't be passive-aggressive or co-pilot. 00:51:25.000 |
If you want it to do something, tell it to do it. 00:51:27.000 |
That might also be something that I would consider including in the instructions file. 00:51:32.000 |
of like, hey, you know, make sure that you always do that. 00:51:35.000 |
And then on top of that, one of the things that I've noticed about Claude 4, or Claude Sonnet 4, or whatever the naming structure it is they're using on that, is it tends to sort of like do that on its own, where it will go ahead and like run a smaller set of tests and then like branch out and do the whole one. 00:51:54.000 |
the whole one, which it's doing that on its own, but again, like if you wanted to do something specifically, always tell it. 00:52:02.000 |
All right, I'm going to go over to this side real quick, and then I'll come back to the middle. 00:52:18.000 |
If you're going to be using that with coding agent, it will support that with coding agent as well. 00:52:23.000 |
But I need to open up a hole in the firewall for it to be able to access that remote service. 00:52:37.000 |
That right here, if I go to settings, and I go to coding agent, 00:52:54.000 |
I can go ahead and set the list of my MCP servers there. 00:53:09.000 |
In here, there's different variables that you could then go ahead and set to open up your firewall. 00:53:19.000 |
That's in the documentation, but that's where you would go to go ahead and do that. 00:53:25.000 |
So, right now, the controlling agents work for issues that are set up in . 00:53:36.000 |
So, the question is, hey, we're using ADO, we're using Jira, we're using, you know, 00:53:51.000 |
How can I then use that to assign a co-pilot? 00:53:53.000 |
So, unfortunately, as of right now, it's going to be GitHub only. 00:53:58.000 |
I don't know whether or not it will stay GitHub only or what a future plan might look like. 00:54:04.000 |
Now, one thing that you might want to consider is if there is something in Jira that you want 00:54:11.000 |
to assign to co-pilot, you could create a relatively straightforward script to just copy that issue 00:54:16.000 |
over and then go ahead and assign it to co-pilot from there. 00:54:21.000 |
But right now, the issue does have to be inside of GitHub. 00:55:00.000 |
So, the question is, hey, we have internal libraries. 00:55:07.000 |
And we want to make sure that co-pilot is going to use those external libraries when it goes 00:55:15.000 |
So, first thing that you can do is make sure that co-pilot sees you doing it. 00:55:28.000 |
And in order for co-pilot to be able to use an external library or an external framework, 00:55:36.000 |
Like, think about all the frameworks that you use on a day-to-day basis. 00:55:40.000 |
Do you really know how they work behind the scenes? 00:55:44.000 |
I have no idea how Svelte works behind the scenes. 00:55:46.000 |
But I know how to use Svelte because I've read all the docs and I've written all the code 00:55:51.000 |
and I can get it to do everything that I want it to do. 00:55:54.000 |
But I have no idea what it's doing behind the scenes. 00:55:56.000 |
I want to think of the exact same thing when it comes to co-pilot. 00:55:59.000 |
Co-pilot doesn't need to see the source code. 00:56:03.000 |
And then it can best understand that, in turn, how to do that. 00:56:14.000 |
The next thing that you can then do is, again, take advantage of your instructions files. 00:56:24.000 |
So, if I'm using a particular library and I know that there's always certain file types that are going to be using that, 00:56:33.000 |
then I could create that .instructions file or I could list that inside my instructions file. 00:56:37.000 |
Or, again, if it's a bigger set of libraries, put an MCP server in front of it. 00:56:42.000 |
And then I can go ahead and allow it to search that way and be able to see it that way. 00:56:47.000 |
So, kind of show it how it is that you're using it. 00:56:53.000 |
And there was something else that I wanted to add there that will come to me in a minute. 00:57:09.000 |
There's something else and I just cannot remember what it is now. 00:57:24.000 |
And the short answer is, right now, we don't support fine tuning. 00:57:30.000 |
Fine tuning, as it turns out, is very tricky. 00:57:35.000 |
Because one of the things that we've discovered in, like, working with customers and so forth, is customers have code bases where they're proud of a lot of it, and then they've got a lot of it that they're not necessarily proud of. 00:57:46.000 |
And so, training co-pilot to understand, hey, this is the good stuff, this is the good stuff, this is the stuff you don't want to look at, becomes a little tricky. 00:57:55.000 |
So, this is again where standing up an MCP server really comes into play because now I can then better control, this is what I want you to be looking at, this is what I don't want you to be looking at. 00:58:08.000 |
I don't want to read them about the cost of assigning . 00:58:13.000 |
Meaning, my understanding is that if you're on the enterprise plan, you get some amount of premium requests, and the co-pilot agent is going to some numbers, right? 00:58:34.000 |
We've hit noon, so why don't we let most people go-- 00:58:55.000 |
You can go ahead and check out the lab from there.