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_

Jun 27
This is how I made Cursor 10x more accurate.

GitMCP turns any GitHub repo into an MCP server.

Here’s how ↓
1/ Cursor breaks when the context is messy

When you link a GitHub repo, Cursor loads everything even the junk.

That overloads the model.

And you get:

- Confused completions
- Useless suggestions
- Wrong assumptions
2/ GitMCP solves this with clean, scoped context

GitMCP is a smart filter.

It turns any GitHub repo into a focused MCP server.

Cursor pulls only the context it needs, no bloat.

The result?

Clean code. Accurate answers. Fewer bugs.
Read 11 tweets
Jun 26
I’ve vibe coded 18+ MVPs for clients using Cursor.

Security was the one lesson I learned the hard way.

Here’s the checklist I wish I had from day one ↓
1. Rate limit your endpoints

If you skip this, bots or bad actors can hit your backend 100s of times per second.

This can:
• Crash your database
• Drain your Supabase usage
• Spike costs or open you to attacks

Tools to use:
• Supabase Edge Functions with a rate limiter
• Vercel Middleware
• Basic IP throttling with Next.js middleware
2. Enable Row-Level Security (RLS)

If you’re using Supabase, turn on RLS on every table from day one.

Without it, users can query other people’s data.
And yes, this happens way more than you’d think.

To set it up:
• Go to Table → RLS → Enable
• Use policies like user_id = auth.uid()

No RLS = no data security.

Pro Tip: Try asking Cursor for these policies based on your DB design and PRD. It will help you write them correctly.
Read 13 tweets
Jun 24
Cursor just got 100x more powerful.

And it wasn’t because I used a bigger model.

It was because I gave it better memory.

Here’s how I fixed it with Context 7 MCP ↓
1. The core problem: outdated context kills your agent

Every LLM has a training cutoff.

Ask it to install expo and it runs a broken command.

Not because the model is bad. It just doesn’t know recent changes.
2. “+ Add Docs” works... until it doesn’t

Cursor has a “+ Add Docs” option.

Works fine for small libraries (like a single README)

Breaks for big projects

Because it dumps everything into memory and overloads the context.
Read 11 tweets
Jun 23
What I learned after building 2 MVPs with Claude Code (and why I might not go back to Cursor)

Here’s what I wish someone told me earlier ↓
1/ Claude isn’t a one-shot coder

Don’t just ask it to “add feature X.”

Start in plan mode.

Let it think first.

Then review the plan and run it.

It’s slower, but the code is way cleaner.
2/ Create a file before you build

This is where you define your project:

- Goal
- Tech stack
- Folder structure
- App flow

Claude keeps referring to this throughout.

Without it, the context gets lost fast.claude.md
Read 12 tweets
Jun 19
How I Make Cursor Write Perfect Code Every Time

This thread breaks down how I generate rules that make Cursor code cleaner, faster, and way more accurate ↓
TLDR:

• Set Global Rules for coding style
• Generate Project Rules using /generate cursor rules
• Use 5–6 custom .mdc files per MVP
• Attach rules as “Always”
• Let Cursor code with real context
1/ Why Cursor Rules Matter

Most people think Cursor just writes code for you.

But the truth is: the AI only works well when you train it right.

Cursor Rules are how you do that.

They tell the AI how to behave, what your project is about, and how you like your code written.
Read 12 tweets
Jun 18
The workflow I wish I had when I started building MVPs

I use this to plan, design, build, and ship full MVPs in 2-3 weeks.

After 18 builds, here’s the exact system that works.

Bookmark this ↓
1/ Plan with ChatGPT or Gemini

Before diving into the code, fully grasp the idea.

This phase is about achieving clarity. By its end, you should understand every aspect of the idea: the tech stack, core features, target audience, EVERYTHING.

Use ChatGPT or Gemini to create these docs:
- PRD/ MVP Plan
- UI Development Plan
- Database Design
- Implementation Plan
- Launch Checklist (you can generate this later, but use the same conversation)

Spend time here; it saves you from chaos later.
2/ Design with @uxpilotai

Once the plan is ready, I go to UX Pilot.

Use your UI development plan for building out all the screens.

Why I use it:
- Faster than dragging UI blocks manually
- Prompt to UI in minutes
- Gives clients something visual in hours, not days

It’s like an AI-powered product designer.

Once happy, take the screens one by one into lovable and build out the entire UI in a day.
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!

:(