Prajwal Tomar Profile picture
Apr 20 11 tweets 4 min read Read on X
Cursor is literally the best AI coding tool.

But most AI projects break because of 3 core issues:

- AI hallucinations
- Loop of errors
- Context awareness

Here’s the system I use to fix all 3.

It’s called the Context Boundary Method ↓ Image
1/ Context boundary = Knowledge base for AI

This is the coding doc. system I follow for every build:

- PRD
- App Flow Doc
- Tech Stack Doc
- Frontend Guidelines
- Backend Structure
- Implementation Plan

These docs act like a knowledge base for your AI dev. Without these, it’s chaos.Image
2/ You can generate these AI coding docs with ChatGPT.

I use @CodeGuideDev to generate them because its built to generate AI coding docs.

It supports Claude, GPT-o and Gemini models, and works with all AI coding tools.

It actually saves me a lot of time on every MVP I build.

Here’s a list of docs you need: 👇Image
3/ PRD = Your product map

Before building, I generate a clear Product Requirements Doc.

It answers:
- What is this product?
- Who is it for?
- What problem does it solve?
- What’s in scope vs out of scope?

This keeps AI focused on the core, not every random idea you throw at it.
4/ App Flow Doc = The user journey

This is a plain-English breakdown of the full journey:

- What happens on each screen?
- How does a user move from one screen to the next?
- Where do key actions happen?

Be painfully specific. Don’t say “dashboard”, describe what’s inside it.
5/ Tech Stack Doc = What to build with

Tell AI exactly what tech it should use.

- Frameworks
- APIs
- Auth tools
- SDKs
- Docs for each

This avoids hallucinations like fake libraries and wrong imports.
6/ Frontend Guidelines = Your design system

You want your app to look consistent?

Then teach AI your design language.

Include:

- Fonts
- Color palette
- Spacing system
- Preferred UI patterns
- Icon set

This makes Windsurf/Cursor generate clean, unified UI.
7/ Backend Structure Doc = DB + Auth logic

This doc defines:

- Tables + schema
- Storage rules
- Auth flows
- Edge cases (like retries or errors)

CodeGuide also provide instructions to Cursor Agent to use Supabase MCP to setup backend properly, which is good.
8/ Implementation Plan = Your step-by-step build

This is the most powerful doc in your system.

I write 50+ clear steps to build the app.

Each step is a prompt.

Cursor Agent or Windsurf then builds it like a junior dev, task-by-task.
9/ Run security audits before shipping

To keep your MVP secure by default, I generate a custom security_guideline.mdc doc using @CodeGuidedev

Then inside Cursor or Windsurf:

- Attach this doc to your project
- Switch to Gemini Pro 2.5 (it handles full codebase scans)
- Prompt: “Run a complete security test across the entire codebase. List all vulnerabilities and give clear steps to fix each one.”

It gives you a full audit report before launch, clean, detailed, and dev-ready.
10/ Final Takeaway

AI should never plan your product. That’s your job.

But once you build the right context boundary, it becomes your fastest, cleanest dev copilot.

Build with coding docs. Prompt with clarity. Let AI write the code.

Bookmark this.

It’ll help you for your next project.

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Prajwal Tomar

Prajwal Tomar Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @PrajwalTomar_

Apr 19
The only UI/UX workflow you need for MVPs (ChatGPT + UX Pilot)

Design system + full UI in one flow

Clean, client-ready, fast.

Here’s exactly how I do it ↓
🎥 Full video walkthrough (9 min):

Watch here →
1/ My updated UI/UX workflow

Clients often want a “design phase” before development.

In the past, this used to take weeks. First build the design system. Then design every screen. Then send for feedback. Then iterate.

Now?

You can do all of this in under an hour using AI.

Here’s how ↓
Read 16 tweets
Apr 17
Everyone’s building with Cursor. Almost no one’s doing it right.

It’s not bad prompts that kill MVPs.

It’s the lack of a system.

Here are 7 hard lessons from building 17+ MVPs with Bolt, Cursor, and Supabase.

Bookmark this if you want to ship clean, not just fast.
1/ The wrong stack will break your MVP

AI doesn’t code like humans. It replicates patterns it’s seen before.

So if your stack is rare or messy, it’ll hallucinate.

What works for me:
- Next/ React for frontend
- Supabase for backend
- Stripe for payments
- Vercel for deploying

AI flows clean when your stack is AI-native.
2/ You don’t need a full team. You need roles and structure.

My builds follow 4 clear stages, all driven by AI:

- Planner: Draft the PRD, user flows, and tech stack using ChatGPT
- Architect: Break down features into tasks and screen logic
- Builder: Load the plan into Cursor or Windsurf and execute task by task
- Reviewer: Run security audits, test flows, clean up UI, and commit builds

Security isn’t optional.

I run this inside Cursor before shipping:
rb.gy/tanzmm

This one prompt has caught dozens of silent bugs before launch.
Read 8 tweets
Apr 16
How to Set Up Cursor the Right Way

Cursor Rules are outdated. Project Rules is the correct way now.

Here’s why it matters and how to set it up properly: Image
1. Why .cursorrules wasn’t enough

Cursor originally used a single .cursorrules file at the root of a project, but this approach had serious problems:

Limited control
→ One rules file applied to the entire project, even when irrelevant.

Context overload
→ Cursor had to process every rule at once, often leading to ignored or misunderstood instructions.

Lack of scalability
→ As projects grew, .cursorrules became bloated and hard to manage.

Inconsistent AI responses
→ The AI often skipped or misapplied rules because the file lacked structure and precision.

Instead of improving code, .cursorrules often caused unpredictable results.
2. Introducing Cursor’s Project Rules (.mdc files)

Cursor solved all of this by introducing Project Rules, stored as modular .mdc files inside .cursor/rules/.

This lets you apply rules per file type, module, or feature, not one giant file.

Why Project Rules are better:

Granular control
→ Rules are split into smaller, targeted files for specific contexts.

Better AI-generated code
→ Cursor loads only relevant rules, improving consistency and accuracy.

Easier rule management
→ Modular rules are easier to edit, scale, and maintain without breaking unrelated parts.

The result: fewer ignored rules, smarter AI, and a cleaner workflow.
Read 11 tweets
Apr 15
You can now automate your browser from inside Cursor or Windsurf.

No more copy-pasting logs or screenshots.

I recorded a full video showing how to set up Browser MCP and use it to debug like a pro.

Watch it here ↓
📺 Watch the full step-by-step video here:
1/ The old way of debugging was painful

You run your dev server.

You test a new feature.

You open the browser…

White screen. Nothing works.

So you:

- Screenshot the bug
- Copy console logs
- Paste all of it inside Cursor or Windsurf
- Ask AI to help

It works, but it’s slow and manual.
Read 11 tweets
Apr 13
In last 6 months, I’ve coded 18 MVPs for clients using Cursor.

Here’s my full workflow:

→ Cursor Project Rules
→ Gemini Pro 2.5 for context
→ Sonnet 3.5 for execution
→ CodeGuide for docs

Bookmark this and copy my Cursor AI workflow: ↓ Image
1/ Without planning, Cursor = Chaos

When it comes to coding with Cursor, context is everything. If you don't spend time planning, AI models will hallucinate

The result?
- Random folder structures
- Broken logic
- Hallucinated layouts

How I fix it:
I don’t rely on prompts. I Build a system that AI can follow.
2/ Don’t use cursorrules file!

.cursorrules is a single file with global rules.

It works… until it doesn’t.

Problems:
- One-size-fits-all logic
- AI can’t the entire file every time
- Hallucinations when rules get too broad

AI needs structure. .mdc Project Rules fix that. Image
Read 11 tweets
Apr 12
Want to steal the UI/UX of top companies and use it in your own app? (Legally?)

Here’s the exact system I use to borrow proven designs and have AI rebuild them into production-ready UI

Mobbin → Figma → Windsurf

From idea to polished frontend in minutes ↓ Image
1/ You don’t need to invent design

You just need to reuse what already works

Products like Uber, Bolt, and Notion have spent millions perfecting their UX

Your job is to study their flow

And use AI to recreate it
2/ Step 1: Mobbin → Find the gold

Go to

Search by keyword: ride, cab, fintech, crm

Pick real apps from real companies

You’re not guessing, you’re following proven UX patternsmobbin.design
Read 12 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(