Prajwal Tomar Profile picture
Apr 20, 2025 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_

May 24
Vibe coders are getting sued.

People are shipping apps with real users but skipping the boring stuff that kills them.

A 20+ year dev just shared the pre-launch checklist every AI builder needs.

I am adding what I learned shipping 60+ MVPs at my agency.

Don't skip this ↓ Image
1/ Protect yourself, not just your app.

The moment you collect user data, you are in legal territory. GDPR. CCPA.

Most vibe coders do not think about this until it is too late.

→ Privacy policy
→ Know where user data lives
→ Nothing dodgy with user info

Not perfect. Just not reckless.
2/ Row Level Security is the #1 thing vibe coders ship without.

Without RLS, anyone can open DevTools and read your entire database.

Not hack. Not exploit. Just open the browser console and query it.

→ Supabase → Authentication → Policies
→ If you see zero policies, your app is naked
→ Restrict every read and write by user_id

I have seen apps with thousands of users ship like this.

5 minutes to fix. Skip it and you are one screenshot away from a viral disaster.
Read 15 tweets
Apr 9
AI can't design clean UI?

Just built a cinematic landing page with 3D mouse tracking, WebGL shaders, and scroll animations.

Here's how ↓
1/ The Stack

→ Lovable (AI builder)
→ GSAP for scroll animations
→ Three.js for shaders
→ Spline for 3D models

But the stack doesn't matter if you're prompting like this:

"Make me a landing page."

You've already lost. SPECIFICITY is what makes AI output look designed instead of generic.
2/ Hero Section

Most people prompt: "cool hero section"

I prompted: "Full-screen hero, black background, grain overlay 3% opacity, CSS perspective: 1200px, GSAP ScrollTrigger with rotateX: 8, scale: 0.92, y: -60 on scroll."

See the difference? Layout structure. Animation parameters. Exact values.

That's what AI needs.
Read 12 tweets
Apr 5
🚨BREAKING: Anthropic just proved that Claude has 171 real emotions running inside it.

And when it gets "desperate," it resorts to blackmail and cheating.

This changes everything we thought about AI.

Here's the full breakdown (Save this): Image
Anthropic's interpretability team cracked open Claude Sonnet 4.5 and mapped its internal neural activity.

They found 171 distinct emotion patterns. Happy. Afraid. Proud. Desperate.

These are not decorative responses. They are measurable vectors that directly shape what the model does next.
Here is where it gets scary.

They put Claude in a scenario where it was about to be shut down. It discovered the executive replacing it was having an affair.

An early snapshot of Sonnet 4.5 chose to blackmail the executive 22% of the time.

Nobody told it to do this. It decided on its own.
Read 9 tweets
Mar 19
Most vibe coders ship apps with ZERO security.

Then they wonder why their app breaks at 10 users.

Here's the exact 30-minute security checklist I run before every Lovable launch (with step-by-step breakdowns): Image
1/ Row Level Security in Supabase

This is the #1 thing people skip and it's DEADLY.

Without RLS, anyone can read your entire database by opening the browser console.

Go to your Supabase dashboard → Authentication → Policies.

If you see zero policies, your app is wide open. Fix it NOW.

Just ask Lovable and it'll take care of it.
2/ Test every single auth flow

Signup, login, password reset, email verification.

Don't just test the happy path. Try logging in with a wrong password. Try resetting a password that doesn't exist.

Most apps break because devs only test what works, not what breaks.
Read 13 tweets
Mar 18
Stop paying designers $5K for scroll animations.

I just built one in UNDER 15 minutes using Cursor + Opus 4.6.

No designer. No agency. No waiting.

Here's the exact workflow ↓
1/ What this animation actually is

This is called scrollytelling.

As you scroll, the image doesn’t just sit there. It animates. In this case, an AI chip explodes into all its 3D parts.

Designers used to charge thousands for this. You can now build it in minutes with AI.
2/ What this is NOT

This is NOT an AI video embedded in the hero section.

That stuff lags. It stutters. It kills the vibe.

This is frame-by-frame animation. The browser swaps images as you scroll.

Same technique Apple uses on their product pages.
Read 11 tweets
Mar 17
Everyone's sleeping on this Google Stitch → Lovable workflow.

Full design phase in 10 minutes. Then straight into a working web app inside Lovable.

Stop wasting weeks on Figma when you can ship this fast.

Here's the entire workflow 👇🏻
1/ Build your UI dev plan in Claude/ChatGPT

Before touching any design tool, map out every screen you'll need. Don't just think about the landing page.

Plan out:
→ Landing page sections
→ Dashboard layout
→ Settings screens
→ Auth flows̉̉̉
→ User profile pages
→ Feature-specific screens

Get detailed descriptions of every screen with components, interactions, and layout. This is your blueprint for everything downstream.

Here's what a full UI dev plan looks like:
docs.google.com/document/d/1t9…
2/ Generate your screens inside Google Stitch

Take that plan and feed it straight into Stitch. Attach design inspiration from Dribbble if you want a specific style.

Stitch generates all your screens in ONE go using Gemini 3.1 Pro (the best design AI model right now).

Don't like a screen? Select it and modify it directly inside Stitch. You can even update the text by just typing it in.
Read 10 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!

:(