Up & Running with GitHub Spec Kit #7 - The /analyze Command
Key Takeaways
The video demonstrates the use of the /analyze command in GitHub Spec Kit to analyze artifacts created for a spec-driven workflow with AI coding agents like Copilot, identifying inconsistencies, ambiguities, and coverage gaps.
Full Transcript
All right then. So now we've run the tasks command to make a kind of road map of things the coding agent needs to do to actually implement the feature. So we're almost at the point of telling copilot to do exactly that. But there's also this optional analyze command that we can run around about now which analyzes all the artifacts created so far. So the constitution, the spec file, the plan files, etc. And it analyzes the files for any inconsistencies where there might be conflicting information or any ambiguities or coverage gaps, those kinds of things. So, it's like someone taking a final glean over everything done so far, just to make sure we're absolutely ready to start running the tasks. Okay, so before we run this analyze command, I thought we'd just take a very quick look at the prompt file first of all, just to see what's actually happening under the hood. So, I've already got that file open right here, and we can see right away that again, it takes in the user input as the argument. But in the case of this analyze command, unless there's any specific guidance you want to give to the model, we don't really need to pass anything. At least I've not found so in my experience. So then down here we can see the goal of this instruction is to identify any inconsistencies, duplications, ambiguities, etc. It also says that this is strictly a read only action. So the coding agent won't be making any changes to the code. It's just going to analyze it. And then it also mentions the constitution file down here as well. And it tells the agent to flag any conflicts with that constitution in any of the other artifacts. We've also got a full breakdown of the different steps down here, starting with this script, which essentially grabs the feature directory and all the available documents in that directory. And then once the model has those, it can follow the rest of the steps down here as well to analyze them. Now, I'm not going to walk through this whole prompt file right now because it's a long one and that would take ages, but it generally asks the agent to flag any issues and report them back to us in a table format within the chat. All right, so let's give this a whirl. Let's close that down and open up the chat again and make sure we're in agent mode. And then we're going to say forward slashanalyze. In fact, I think it could be in ask mode this because it's not going to change any of the content. It is just reading them all and making sure everything looks correct. But anyway, we're going to press enter now and see what this does. [Music] All right, so it looks like this is all done. I'm going to make this bigger so we can read it properly. And I'm going to go up to the very top. I'm not going to read all this because it spat out an absolute ton of stuff. But this is where it finished. So we can see right here the executive summary analysis completed for doit goal tracking gap across spec.md and tasks.mmd. No critical constitutional violations found. So that's good. Everything we put in the constitution file has been adhered to. The artifacts demonstrate strong alignment with constitutional principles and comprehensive coverage of requirements. All right, good. So, we've got this table here, which is quite nice. And you can see, let me make this a little wider. We've got an ID for each of these items, I suppose. And we've got a category. So, this is an ambiguity. The severity is medium inside spec. MD. And it even says which functional requirement. And it says fun pastel colors lacks specific color values. Define specific color palettes in the plan or defer to a div uh design phase. So yeah, I mean I guess I could have provided actual colors. Um but I would just be happy to leave that to the AI to do later on. It doesn't bother me if they choose pink or green or whatever. I'm really not interested. So the second one is an ambiguity again inside pland this uh this time and it says the fast initial load smooth interactions is not quantified. Okay, so it wants some kind of measurable target. Again, I'm not really concerned with that at the minute. This is a throwaway app. But if we wanted to solve these ambiguities, we could do so. Right now, down here, we've got some inconsistencies, or rather just one. And the severity this time is low. It's in the tasks file, and it's T02 versus 06. And it says right here, date utils.ts referenced in both tasks. clarify T002 focuses on installation and T006 on utilities. So I would have to have a look at that. It does say it's a low severity. So I think that the AI would be capable of figuring this out. Then we've got under specification right here inside the tasks file from task 11 to 13. So it says the business logic tasks lack specific file paths. Add file paths, use goals.ts or separate service files. So again, I would have to have a look at that and I could add them in if I wanted to, but again, you know, AI models are smart and if they need to find a file, a lot of the time they will just do it. And then finally, we've got this coverage gap for FR015 that is a low priority and is to do with the local storage error handling. No specific task for error message implementation. And we should according to this add a task for local storage error UI component. So yeah, I mean we could do that. So we've got a coverage summary table right here as well. So all these key requirements have tasks. The only one that doesn't by the look of it is this thing which we just saw up here. So this coverage gap is also listed here, local storage error handling. Okay, so it's flagged it there. The constitutional alignment analysis says that it's compliance. So the clean code principle is specified in the tasks blahy blahy blah simple UX responsive design principle. So all of these things have been hit which is good especially at this one right here because if we had a lot of testing in place it would take a long time to do. So down here we've got some metrics. So total requirements 19 functional requirements we have 22 implementation tasks a coverage of almost 95% and we have two ambiguities and down here we've got some more detailed findings. We've got basically just the different issues again. So the next actions it says proceed with the implementation. So even though we've got those small ambiguities it's still advising that we just proceed with the implementation. So, we could do these improvements if we wanted to, but again, we don't have to. So, if we scroll right down, it says, "Would you like me to suggest concrete remediation edits for the top three issues?" So, we could do that if we wanted to. We could go in, we could edit all of these files. I don't really want to do that. I just wanted to show you that we can analyze these files. If there's anything in your analysis that you want to change in the plan or the spec, you could do it now and in the tasks before you go ahead and implement those tasks in the next lesson.
Original Description
In this Spec Kit tutorial series / crash course, we'll see how it can be used to implement a spec-driven workflow with various AI coding agents like Claude Code and Copilot (we'll be using Copilot).
🍿🥷🏼 Get early access to this entire course:
https://netninja.dev/p/up-running-with-spec-kit
🧠🥷🏼 Get the Git and GitHub Masterclass Course:
https://netninja.dev/p/git-github-masterclass
🔥🥷🏼 Get instant access to ALL premium courses on NetNinja.dev:
https://netninja.dev/
Other Course Links:
🔗👇 Get Spec Kit:
https://github.com/github/spec-kit
🔗👇 Spec Kit docs:
https://github.github.io/spec-kit/
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from Net Ninja · Net Ninja · 0 of 60
← Previous
Next →
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Regular Expressions (RegEx) Tutorial #14 - Matching a Username
Net Ninja
Regular Expressions (RegEx) Tutorial #15 - Email RegEx Pattern
Net Ninja
Regular Expressions (RegEx) Tutorial #16 - Finishing Touches
Net Ninja
GraphQL Tutorial #1 - Introduction to GraphQL
Net Ninja
GraphQL Tutorial #2 - A Birdseye View of GraphQL
Net Ninja
GraphQL Tutorial #3 - Project (stack) Overview
Net Ninja
GraphQL Tutorial #4 - Making Queries (front-end preview)
Net Ninja
GraphQL Tutorial #5 - Express App Setup
Net Ninja
GraphQL Tutorial #6 - Setting up GraphQL
Net Ninja
GraphQL Tutorial #7 - GraphQL Schema
Net Ninja
GraphQL Tutorial #8 - Root Query
Net Ninja
GraphQL Tutorial #9 - The Resolve Function
Net Ninja
GraphQL Tutorial #10 - Testing Queries in Graphiql
Net Ninja
GraphQL Tutorial #11 - GraphQL ID Type
Net Ninja
GraphQL Tutorial #12 - Author Type
Net Ninja
GraphQL Tutorial #13 - Type Relations
Net Ninja
GraphQL Tutorial #14 - GraphQL Lists
Net Ninja
GraphQL Tutorial #15 - More on Root Queries
Net Ninja
GraphQL Tutorial #16 - Connecting to mLab
Net Ninja
GraphQL Tutorial #17 - Mongoose Models
Net Ninja
GraphQL Tutorial #18 - Mutations
Net Ninja
GraphQL Tutorial #19 - More on Mutations
Net Ninja
GraphQL Tutorial #20 - Updating the Resolve Functions
Net Ninja
GraphQL Tutorial #21 - GraphQL NonNull
Net Ninja
GraphQL Tutorial #22 - Adding a Front-end
Net Ninja
GraphQL Tutorial #23 - Create React App
Net Ninja
GraphQL Tutorial #24 - Book List Component
Net Ninja
GraphQL Tutorial #25 - Apollo Client Setup
Net Ninja
GraphQL Tutorial #26 - Making Queries from React
Net Ninja
GraphQL Tutorial #27 - Rendering Data in a Component
Net Ninja
GraphQL Tutorial #28 - Add Book Component
Net Ninja
GraphQL Tutorial #29 - External Query File
Net Ninja
GraphQL Tutorial #30 - Updating Component State
Net Ninja
GraphQL Tutorial #31 - Composing Queries
Net Ninja
GraphQL Tutorial #32 - query variables
Net Ninja
GraphQL Tutorial #33 - Re-fetching Queries
Net Ninja
GraphQL Tutorial #34 - Book Details Component
Net Ninja
GraphQL Tutorial #36 - Styling the App
Net Ninja
GraphQL Tutorial #35 - Making a Single Query
Net Ninja
Build Apps with Vue & Firebase - Udemy Course
Net Ninja
Updated Vue & Firebase Course (Udemy)
Net Ninja
Vue & Firebase Real-time Chat (Preview) #1 - Intro
Net Ninja
Vue & Firebase Real-time Chat (Preview) #2 - Project Structure
Net Ninja
Vue & Firebase Real-time Chat (Preview) #3 - Firestore Setup
Net Ninja
Vue & Firebase Real-time Chat (Preview) #4 - Welcome Screen
Net Ninja
Vue & Firebase Real-time Chat (Preview) #5 - Props in Routes
Net Ninja
Vue & Firebase Real-time Chat (Preview) #6 - Route Guards
Net Ninja
Vue & Firebase Real-time Chat (Preview) #7 - Chat Window
Net Ninja
Vue & Firebase Real-time Chat (Preview) #8 - New Message Component
Net Ninja
Object Oriented JavaScript Tutorial #1 - Introduction
Net Ninja
Object Oriented JavaScript Tutorial #2 - Object Literals
Net Ninja
Object Oriented JavaScript Tutorial #3 - Updating Properties
Net Ninja
Object Oriented JavaScript Tutorial #4 - Classes
Net Ninja
Object Oriented JavaScript Tutorial #5 - Class Constructors
Net Ninja
Object Oriented JavaScript Tutorial #6 - Class Methods
Net Ninja
Object Oriented JavaScript Tutorial #7 - Method Chaining
Net Ninja
Object Oriented JavaScript Tutorial #8 - Class Inheritance
Net Ninja
Object Oriented JavaScript Tutorial #9 - Constructors (under the hood)
Net Ninja
Object Oriented JavaScript Tutorial #10 - Prototype
Net Ninja
Object Oriented JavaScript Tutorial #11 - Prototype Inheritance
Net Ninja
Related Reads
📰
📰
📰
📰
TypeScript for Python Developers: A Practical Guide
Dev.to · qing
How to Build a Good Human-in-the-Loop for AI Coding Agents
Dev.to · Brenn Hill
Architecture Is Even More Essential in the Age of AI
Dev.to · Bohdan Turyk
Top Open Source AI Developer Resources Worth Exploring in 2026
Dev.to AI
🎓
Tutor Explanation
DeepCamp AI