00:00Yo, cursor, build me a sick app
00:00It's got to make at least a million dollars
00:04Make no mistakes or you'll be fired
00:04If that's the way that you're coding with AI, I got to tell you, there is a better way
00:11But you also don't need to spend hours pouring over every single line of code or creating a complex plan with 10 requirements documents in an AI scrum master
00:21After trying lots of different approaches, I found a way that's simple, is quick, and writes highquality code
00:28And today I'll share that workflow with you step by step and then I'll show it to you in action
00:32But before we get further into the video, I want to ask you for your support
00:35I just built a product called Vibe Scan and we're launching on Product Hunt this Saturday, August 9th
00:42If you like the product on our launch day, you can upvote it or leave a comment and I'll show you a demo of it later in this video
00:48Anyway, let's get into the workflow
00:50You might have heard of context engineering and spec driven development, and that is at the heart of what I'm doing here, but I have a very simple approach to it all
01:02There's no additional software to install or any special steps other than setting up what I like to call command prompts, which are really just prompts that you're going to use over and over that you save into a file
01:11And then you can tag those prompts to create a feature, to create a project, and to review code
01:18And that's it
01:18It's just those three prompts and this is what they look like
01:22They're pretty straightforward
01:23Again, stuff that I would just copy paste across multiple chats
01:27So to start a new project, I will create the product brief that's going to give me just enough context so that when I want to build a new feature, I can tag it and cursor is going to understand what the heck I'm working on in the first place
01:39Then I embed the technical guidance into the cursor rules file
01:42The cursor rules file is a set of instructions that cursor follows in every single chat that you have with it
01:51So I like to put the technologies that I'm using in here because it's going to make sure that everything that we build is built consistently
01:57So for example, I give it a list of technologies that I have in here
02:02I tell it what command to use to install new packages
02:05I tell it to use a functional programming style
02:10Different projects are going to have different cursor rules, but I like to use this as a way to keep cursor in line from a technical perspective
02:16And then the last thing I like to do for starting a new project is to use a starter kit like create next app or create Vololo app
02:24That's just going to give you a lot of stuff out of the box that just works
02:29You don't want to spend hours troubleshooting Tailwind version 4 and getting Shad CN set up
02:33Skip all of that
02:36Just run npx create Vololo app dot and you'll have a full stack project configured and you'll be ready to start building features
02:43It's totally free and open source link in the description and you can use any other kind of starter kit but I advise that you start with something because again it'll just result in a much more consistent project
02:54Okay, so you got the project set up but now you need to actually build the different features and iterate on the product
03:00This is where the workflow really kicks into gear and these are the steps that I take
03:04First, I plan a feature using this plan feature command
03:09We'll get it more into the details of that in a moment
03:10The result of this step is going to be a document that looks something like this
03:14It's going to detail all of the technical steps that are necessary to implement the feature that you described
03:20Cursor agents are going to look through your code and find all of the relevant files and figure out what needs to be done and write it into that plan file
03:30Afterwards, you're going to actually review the plan and make sure that everything is aligned
03:35And it's super important to spend a lot of time on this
03:39In fact, I would say that half of my time developing is spent during this plan review phase and then iterating on the plan because I'll find things that need to be aligned and I'll ask Cursor to fix it
03:51Finally, you're going to end up with a plan that you're happy with and then you move on to the implementation phase
03:56And you can just tag the plan and ask Cursor to implement the whole thing
04:00Or if it's a more complicated feature, you could have separate phases
04:04We'll talk about that in a moment as well
04:06Either way, Cursor is going to build out your entire feature and you're going to have a bunch of different files created
04:12The next thing you want to do is have an automated code review
04:16So, we have this other command, code review, and that's essentially going to look for a bunch of common issues that AI likes to create, and we're going to review the code and then create a review document that allows you to see at a high level what was done, what's missing, are there any bugs
04:34This code review is going to look something like this
04:36and the cursor agent will have gone through all of the different files that were modified, checked it against your original plan, and then outlined any specific issues or things that may be missing
04:47This gives you an opportunity to fix problems before you start testing and reviewing the code yourself
04:53And it also gives you a good road map of how the feature was implemented so that you can look at the specific files yourself
04:59Based on the review, I will usually have the agent that created the review fix some of the issues that it identified
05:06Finally, when the changes are made and the review looks clear, I like to do a manual test and just open the app, go through all of the steps for the new feature that I built, and make sure that everything is working properly
05:19Often times there will be bugs and errors that come up in the console log or on your server, and I'll just paste those back into cursor and have it fix them
05:28Eventually, the feature works kind of how I expect
05:30And at that point, I do like to review the code
05:34I use the review document as a road map
05:36And then I also use the cursor navigation to go across the different files and just make sure there's nothing crazy going on
05:43This is also a good point at which you can scan your code for any security, performance, or code quality issues
05:49And that's exactly why I built Vibe Scan because it gives me that extra layer of security and peace of mind knowing that my code is good to go
05:59Okay, now we're going to jump into the code and things are about to get a little bit more technical
06:02And if you're feeling lost and you want to learn how to use all of these AI coding tools step by step, make sure to check out my new course on Skill Leap AI
06:10It's AI coding for entrepreneurs
06:13In that course, we walk through every step of coding with AI, starting with Chad GPT, building a landing page with Lovable, and building a full prototype using Cursor
06:21It's a super useful resource, and there's a 7-day free trial
06:25So, if you're interested, check the link in the description
06:28All right, let's get coding
06:30I'm going to be building the same app that I built in the Curo video, which is a dungeon master assistant for Dungeons and Dragons
06:36And we'll start off with a simple character generator
06:40So, the first thing I'm going to do, I have this empty project
06:41I'm going to run npxcreate volo app dot that's going to initialize the project in this folder and have all of the technologies preconfigured so I get authentication and a database out of the box
06:53In addition, there's already a cursor rules file that comes with it
06:57So, we already have that covered
06:59Okay, looks like it's set up my app
07:01I can start it up
07:01And now, if I go over here, we have the app up and running
07:06I can just use any email to sign in
07:08Okay, so we have the app started
07:10The next thing we need to do to get the whole project kind of initialized is create that product brief
07:16That way I can include it when necessary to let cursor know what are we working on and what's the bigger picture context
07:22So I'm going to go back here to my project
07:24I'm actually going to go open up the docs folder and we'll create another one here called commands
07:28I'm going to copy paste these commands that I have and these are just again simple prompts that are just written directly into a file that I can just quickly use in the chat here
07:39So in the chat over here I'll just say create brief and then I'll provide my product description
07:43We are building an application to help dungeon masters plan their D&D campaigns and it's going to be called Dragon Roll
07:54It will include a variety of different tools such as a random map generator, NPC generator, loot generator, and so on
08:00We will use AI and allow the dungeon master to input certain prompts or use the tools directly
08:06All right, I've submitted the prompt and we should have the product brief ready in a moment
08:11Okay, here we go
08:11Here's the project overview
08:14We got a primary audience, primary some benefits, and we got this high-level overview which includes the information that we already have in our cursor rules
08:24This is a good amount of context
08:26We don't want to have hundreds or thousands of lines of details
08:27We just want to get the point across
08:30Okay, now that the product brief is ready, I'm just going to keep that
08:34We'll open up a new chat and I'm going to start working on the first feature
08:38I'm going to tag plan feature
08:42And this is what that prompt looks like
08:44And then here I'll describe our first feature
08:46We want to add a new page that is going to be our NPC generator
08:49To implement this, we are going to use the OpenAI API to generate the description of the NPC as well as a name
08:57And we'll also generate an image for the NPC using the OpenAI GPT image one model
09:03Okay, let's start out with that
09:07As you see, cursor is going to look through all of the files that we already have to get an idea for how things fit together and what files it needs to change to actually make this feature a reality
09:20Okay, so it's put together the plan
09:20And as you look at this, you'll notice a few things
09:23It doesn't include any sort of business focused or product manager type of stuff
09:28It really just focuses on the technical things that need to be done to implement the feature
09:33I find that this helps the AI focus and really be in that sort of engineering coding mindset and not get carried away building a bunch of stuff because it seems like it would be a nice feature to add
09:44The other thing you'll notice is that we don't have code in this plan
09:49I like to leave the code writing to the AI that actually implements the plan rather than trying to embed it into the plan because again I just find that it distracts the AI and also makes it more difficult for me to read through and understand exactly what we're planning
10:04Reading through the plan, we got a new page that looks good
10:08We're going to hook it up through these other files
10:10We have a new endpoint and on the back end we have a file that is going to do the generation
10:15We'll have a tool which is our open AI wrapper and we have a new database schema
10:21This all makes a lot of sense to me
10:23I see one issue here which is that it wants to use doll E3 because it doesn't know about the GPT image one model
10:29So I'm going to go ahead and update that right here
10:33Okay, overall this looks pretty good to me
10:35I'm going to open a new chat and I'll just say please implement plan one
10:41And given the way that the feature was written, that's really all we need to say
10:45Now, if it was a bigger feature, we might want to break it up into phases
10:50And the way that I like to organize that is to have cursor implement a data layer change
10:54In other words, any sort of changes related to the database
10:59And then I like to run back-end development and front-end development in parallel
11:03This allows you to use multiple agents at the same time
11:09And then afterwards, you can review the code for those phases separately and have one more integration phase that brings it all together
11:15And by the way, you'll notice that cursor now has this task list that they manage on their own
11:21And this is going to drive the AI through implementing all of the aspects correctly
11:25You don't need to create a whole separate task list outside of cursor
11:29Okay, looks like cursor has completed all nine of those tasks
11:32And now we have a couple of final steps to set up the OpenAI API key and then run this command to update our database
11:40So let me go ahead and do that
11:42Okay, the database changes got applied and we have the OpenAI key set
11:47The app is still running
11:50So I'm just going to refresh
11:51And now we got an NPC generator
11:51Take a look at that
11:54And I mean it looks pretty nice
11:56Now before I try this out, let me go ahead and have the AI do an automated code review to make sure that everything was implemented as expected
12:02So, I'm going to actually start a new chat because if you ask the AI that implemented the feature to review it, it's more likely than not going to say that everything was done according to plan because it just did all that work
12:17So, if you open a new chat and ask that to do a review, it's more likely to be unbiased
12:21So, here I'll just tag code review and then I'll tag plan one
12:23And that's it
12:26I don't even need to write anything else
12:28It's going to understand the context that I want to code review on that plan
12:32Okay, the plan has been created
12:35Let's take a look
12:35So, looks like most things are implemented properly, but it did find some issues
12:43Okay, image generation model discrepancy plan specified researching GPT image one, but implementation uses dolly 3
12:51So, although it assesses that this is not a problem, I'm really glad that it caught it because obviously we want to use the actual latest model
12:57And then we got a couple of additional minor issues
13:02So since we have the context of all the files already in this chat, I'm just going to say please implement fixes for all of the issues that were found
13:09The most important one is the use of the new GPT image 1 model, which is a new model by OpenAI and the one that we actually want to use
13:19All right, I'll submit that
13:21Taking this approach with the review allows me to find those issues before I inadvertently run into them or find them on my own during a code review
13:30Okay, great
13:30Cursor has made changes and updated its own review
13:32Now, when we take a look at the OpenAI integration, okay, looks like it's using the right model, but we have this error
13:40I'm going to go ahead and click fix in chat and then ask it, please make sure that we are properly integrating with the image API per the new model requirements
13:50Okay, looks like cursor fixed that problem
13:52But I think these fields aren't supposed to be passed in
13:56So I just went and I pasted in the instructions from OpenAI
13:59And cursor can follow links to documentation
14:01So it can be a great way to fix problems like this
14:05Okay, here we go
14:05Let's give this another try
14:07I'm going to go back to the app
14:10And now we're back at this screen
14:12So let's give it a try
14:12Elf Wizard with a large shield for some reason
14:15Okay, we ran into an internal server error and now I can go back here and see what's going on
14:25I'm going to go ahead and copy all of this and I'll just start a new chat, paste it in, and I'll say getting an error when trying to run the logic for and then I'll tag the plan to give it some additional context
14:37One of the things I like about my workflow is that it slots in really well into the way you would typically work with cursor
14:44When you got some errors, when you've changed some files manually, it doesn't rely on you following a very prescribed and structured approach
14:53You can kind of wing it
14:54So when you run into a situation like this, it's really easy to just iterate on the feature and build outside of the original plan
15:00and you don't have to worry about trying to keep your spec perfectly in line with the code itself because that is a very difficult problem to solve
15:09Let's give it another try
15:11Generate NPC
15:11Okay, here we go
15:14Take a look at that
15:14Got a really nice image
15:16Got a great description
15:18This is working like I wanted
15:18And if I want to iterate on this, like if I want to rearrange this page or make sure we're saving this into a database, I can just plan a new feature or just iterate in a one-off chat with cursor to make some small adjustments
15:31So now is a good time to just go through the files and review the code
15:35And what I'll often do is every time I build a feature, I commit it to GitHub so I can see all of the changes here
15:43And this can be a great way for me to review it
15:45So here I can see the NPC file got created
15:47Here are some changes to the sidebar
15:50This is sort of the difference between my last commit and what's in the code right now
15:58Now before I call it done, I'm going to go ahead and run a scan across all of the code using my product Vibe Scan
16:02So we'll sign in and I'm going to create a new project
16:08I'm going to select the repository, drag and roll four, and we'll run a scan
16:16This is going to go through all of the files in my code, looking for security issues, for code quality, performance issues, and if I configure my launch checklist, it's going to also look for certain things like a terms of service, privacy, and a bunch of other things I would want to be in place before launching this into production
16:35Okay, so the scan has finished and it looks like it found a number of different things
16:38Some of these are going to be false positives, but it's still better to know than to not know
16:44And I'm going to take a look at this one
16:46Looks like we have some default Postgress URL listed here
16:49And what I'm going to do is actually use the new autofix feature
16:54And this is going to actually spin up an instance of clawed code behind the scenes and create a pull request to fix this issue
17:02All right
17:05And look at that
17:05Now we have a fix
17:05So I can actually go over here and you can look at these three issues that it fixed in the code
17:13And here is all the code changes
17:15So if this seems like something that would help you, make sure to check out vibescan.io
17:18And we're launching on product hunt this Saturday, August 9th
17:24And I would love to get your support
17:24So that really covers it
17:25It's a pretty straightforward workflow, but it works really well and gives you the flexibility to modify things quickly or to add a new feature
17:34I found this to be the sweet spot between just winging it in the chat or doing way too much planning
17:40Give it a try and let me know what you think
17:42As always, thanks for watching and I'll see you in the next one
17:45Take care.