Generate Stories + Tasks
Generate Stories + Tasks
In this lesson, we're splitting our PRD into stories, so we can build each feature step-by-step in Cursor. Make sure you're starting from the initial state of the project, without any features added yet. The last lesson was only to test the model and get comfortable with the Viber 3D project. Now we'll add features one at a time.
We'll keep our PRD inside the planner folder. I'll go into the AI Builder's Hub in the generator, copy the final PRD we created earlier, paste it here, and remove the old one. That’s all for setup.
I forgot one thing—we’re still on the feature asteroid branch. Let’s move back to the main branch. Now I’ll commit the PRD changes and push them to GitHub. We'll check out the main branch again. Since we've committed and pushed the PRD to the feature branch, but not yet to main, we need to merge the feature branch into main. This way, we include all changes from the asteroid branch into our main branch.
To merge, click on the three dots, select "Branch," then "Merge," and choose the asteroid branch. Now push the merged changes. When we refresh GitHub, both branches will be synced. Since our PRD is added, we can build the stories next. For that, we'll create another branch called "feature stories." Let’s publish and double-check it on GitHub.
The asteroid branch isn't needed anymore, so let's delete it locally and on GitHub. Go to branches, find the asteroid branch, and delete it. Now we have a clean repository. Be careful not to delete any branches you still need. Keeping the repo organized helps us a lot.
Now we're on the feature stories branch, ready to create the stories. Let's create a folder called "stories" and move to our planning agent, named plan MDC. It has two modes: init mode, which we'll use now, sets up stories and the roadmap from scratch. The add mode is for adding extra stories later.
We inform Cursor our stories will be stored in the planner folder under stories. Here we build stories, roadmaps, asset lists, and more. With init mode, we'll create stories directly from our PRD using a predefined template you've seen before in Obsidian diagrams. The roadmap acts as our project's memory, and we'll use a task template—a simple JSON object with status, affected files, and titles.
Check that the Cloudy37 Sonnet Thinking model is selected. We're currently using Cursor 475. If model 37 has issues, you can pick auto mode or work with 365, though it might feel older. I prefer Sonnet Thinking, and soon Sonnet Max will come with larger context windows for better output.
One important setting: go to Cursor settings, enable "large context" under features. It uses more resources but provides much better results. Now let's start the story creation by typing "read the plan MDC." Before beginning, a quick tip I learned from Andrew Jefferson, creator of Cursor Tools—always greet the chat first. It seems to help.
Now we type "read MDC" and follow the steps. You'll see Cursor building each story and populating our roadmap. This takes some time, as we have around 14 or 15 tasks. We'll cover as much as we can in this session.
Some stories we won't need right now, like user registration and spacecraft upgrades. Also, we should rearrange tasks, for example moving the camera story after spacecraft control and before zero-gravity navigation. The enemy AI shooting and spacecraft destruction should come before the leaderboard and pause features. We'll clean up the roadmap accordingly.
Once done, commit your changes to source control. Ensure you're on the feature stories branch. With everything checked in, we can always revert if needed. Now merge your stories into the main branch and sync.
We're starting with the spacecraft movement feature. Players will use W, A, S, D, and spacebar to control movement. Check if we already have mouse movement—search using CMD+Shift+F. Mouse controls seem related to story two, "shooting," and navigating zero gravity. We'll rearrange these accordingly, combining related stories when possible.
After rearranging, save the roadmap, check out the stories branch, commit changes, and then switch easily between branches from the bottom left corner. Merge again to main, create a new branch called "feature US-001 movement," and publish it.
Open a fresh chat for this feature. Instead of the planning mode, we'll use the game agent mode. It reads our roadmap, keeps track of completed tasks, and updates statuses. The feature agent mode in Cursor guides step-by-step how to implement features, helping the agent stay on track.
The agent will work story-by-story from our roadmap. It reads each story file from top to bottom, helping it stay organized. One small issue: Cursor sometimes adds notes about errors or bugs prematurely. Usually, these notes help devs avoid repeating mistakes, but they should initially be empty. We can leave it for now.
Finally, instruct the agent to write developer notes clearly and update roadmap statuses as it works. Now we can start developing our first story.