Use Case 1: "I'm asked to add a new feature"
Scenario: Your PM says: "We need a shopping cart. Users should be able to add products, see a count in the nav bar, and view their cart on a dedicated page."
Time: ~30 minutes
Copilot Features: Planning Agent, Agent Mode, Vision
Your Challenge: Build this feature end-to-end, matching a provided design.
Step 1: Understand Requirements with Planning Agent
The planning agent exists to help build a plan and clarify requirements. It improves the quality of your prompt and ultimately the output.
- Open Copilot Chat, switch to
Planmode - Drag
docs/design/cart.pnginto chat (feel free to open it to review first) - Set your model to 'Claude Opus 4.6' or 'Gemini 3.1 Pro'
- Prompt:
I need to implement a shopping cart feature in this application matching this image including routing, navbar badge with item count, state management, and add/remove interactions. - Copilot will ask clarifying questions like:
- Should the cart persist across sessions?
- What data should be stored?
- Any constraints on UI/UX?
- Answer the questions or say "Use standard e-commerce patterns"
- Review the generated plan - iterate if needed
Step 2: Implement with Agent Mode
- Switch to
Agentmode, selectClaude Sonnet 4.6model - Prompt:
Implement the plan you just produced. - Agent will:
- Create Cart component and page
- Add routing
- Implement state management (Context/Provider)
- Add NavBar badge
- Wire up add/remove functionality
You can follow along as files are created/modified and also in the task list. If it doesn't run the application to verify it, you should ask the agent to 'start the application and verify the cart works as expected'.
Step 3: Test & Iterate
- Run the application:
make dev - Test in browser - Click on 'Ports' tab to open port 5137:
- Go to the 'Products' page or click 'Explore Products'
- Increment a quantity of a product and add to cart
- Verify badge updates (shows a count next to the cart icon)
- Click the cart icon to view cart page
- If issues arise, have Copilot help troubleshoot. Example prompt:
The badge doesn't update when I add items. Fix this. - When you are all done, click 'Keep' to save the changes.
What You Learned
✅ Planning Agent - Clarify ambiguous requirements
✅ Vision - Copilot understands UI designs
✅ Agent Mode - Multi-file implementation with iteration
✅ Self-correction - Agent can fix its own mistakes
Time Investment: 30 minutes
Value: A complete feature that would normally take 2-3 hours
Next Steps
Continue to Test Coverage to learn how to improve test coverage with Copilot.