Building Software with Cursor: Mastering AI-Assisted Development
AI-assisted coding tools have quickly become standard, and Cursor is one of the most exciting products in this space. But to truly leverage its potential, you need to understand how it fits into your workflow—especially its strengths and weaknesses.
I've been building software using Cursor with Claude-3.5-Sonnet, complemented occasionally by ChatGPT 4.5, and here's my guide on how to make it work for you.
Setting Context: Product Brief & Jobs to be Done
Before diving into implementation, always clearly define:
- Product Brief: What's the problem we're solving, who is it for, and why does it matter?
- Jobs to be Done: What specific tasks or outcomes are users hiring our product to achieve?
This upfront clarity helps Cursor understand exactly what you're trying to achieve, leading to more relevant outputs.
Technical Planning Before Coding
Never jump directly into coding. Always ask Cursor for a technical plan first.
Here's how I approach it:
- Prompt: “Outline a technical plan to implement [feature/task]. Include data models, API endpoints, frontend components, and any necessary logic or services.”
- Review: Carefully evaluate Cursor's plan, refining as needed until it aligns perfectly with your vision.
- Iterate: Once the plan looks solid, you’re ready to start coding.
A thoughtful technical plan saves hours of debugging and refactoring later.
Managing Cursor's Forgetfulness with .cursorrules
Cursor is powerful—but forgetful. It frequently overlooks your existing codebase patterns and conventions, even when clearly defined.
Here's how I manage this:
- Explicit Rules: Constantly update your
.cursorrules
file with explicit guidelines about your codebase structure, naming conventions, patterns, and frameworks. - Regular Refresh: Don’t assume rules set last month are sufficient today. Update often based on gaps Cursor exhibits in its implementation.
- Know Your Code: Even with rules, never rely fully on Cursor remembering your patterns. You must deeply know your own codebase and architecture to catch issues.
Leveraging AI for Architectural Decisions
While Cursor (with Claude-3.5-Sonnet) does great day-to-day implementation, I often consult ChatGPT 4.5 for high-level architectural decisions:
- Second Opinions: Validate critical architectural paths or refactoring ideas.
- Contrasting Views: Use differences in recommendations to explore multiple approaches before committing to one.
This complementary usage ensures thoughtful architectural choices.
Code Review Discipline: Never Skip the Details
You absolutely cannot shortcut code reviews when using Cursor. Even simple CRUD methods may contain subtle errors.
My review process:
- Slow Walkthroughs: Carefully step through every line of generated code. Double-check naming, logic, and integrations.
- Test Often: Write and run tests frequently, ensuring every feature performs exactly as intended.
- Stay Vigilant: Cursor’s speed can tempt you into complacency. Resist this urge—know your stuff and stay disciplined.
Being meticulous ensures high-quality, reliable software.
Example Workflow: Implementing a Controller
Here's a typical example:
- Technical Plan: Cursor generates an initial outline.
- Refine Plan: Adjust endpoints, clarify data handling, ensure alignment with existing patterns.
- Code Generation: Cursor produces initial controller code.
- Detailed Review: Check every function carefully—especially create/update methods which frequently have subtle mistakes.
- Update
.cursorrules
: Add new clarifications discovered during review.
Repeat this cycle consistently.
Summary: Maximizing Cursor’s Potential
AI tools like Cursor significantly speed up development—but only if used correctly. Plan first, review deeply, complement with ChatGPT when necessary, and maintain clear .cursorrules
to combat forgetfulness.
In short, embrace Cursor’s strengths, acknowledge its limitations, and remain actively engaged at every step.