CJ Zafir Profile picture
Mar 18, 2025 11 tweets 4 min read Read on X
I code with AI tools for 6-7 hours daily.

Built over 36 projects in last 12 months.

Truth: "Build me ........... app" in 1 prompt is not possible.

So, here're all the MISTAKES you might be making with AI code: Image
1. No Planning.

I go from idea to a well written draft for my MVP in few hours with my planning hack.

I just turn on ChatGPT voice and we have one-on-one conversation about what do I want.

15 minute chat then I ask: "write me a well structured draft on all the tings we've finalized in this conversation"

I use ChatGPT voice as my brainstorm buddy, critique, web researcher and then draft writer.

In the end I get the core features of this MVP on one page.

Don't build blindly. Plan before you hunt.
2. NO Knowledge base for AI model

Then I take the idea draft, put it into @CodeGuidedev and write {coding docs} to build a knowledge base for AI coding models.

This step is important to reduce AI hallucinations for coding models.

Docs include:
- PRD
- App flow doc
- Tech Stack doc
- Frontend guidelines
- Backend structure

AI models can refer to these docs at any time to know what to build next and what not to build!Image
3. NOT picking the right tools

Every AI coding tool has it's own superpower. I published my findings on this few days back.

4. Not picking the right tech stack

AI models are trained on certain coding languages. Only use them for best code quality, and less errors.

Use these AI friendly Tech Stacks:
Frontend: NextJS/Vite/Flask
Database: Supabase (PostgreSQL)/Firebase
Auth: ClerkDev/Supabase/Firebase
AI: OpenAI/Claude/Gemini
5. Not building step by step

When you let AI to plan the next steps 8/10 times AI will mess up the codebase.

Use AI models just to execute the plan and implement the code.

Use a detailed plan like @CodeGuidedev 50-step implementation plan to force AI not to miss anything.
6. NO Debug prompting

Degugging is the most frustrating part of AI coding. To make it leas painful use these tricks.

- Attach the error and say "use chain of thought reasoning to find the core issue first and then plan step by step to fix the issue.

- Ask it to "follow the best practices of code. Search the web and find the fix for this issue"

- Only attach relevant files so AI can focus better.
7. No use of multiple AI models

1 AI model can't do everything. Use different models for different scenarios.

In Cursor/Windsurf:

Use Claude sonnet 3.5 for coding (yes for executing code it is better than 3.7.)

Use GPT o1/o3-mini-high to debug complex errors.

Use Gemini Flash 2.0 to scan the complete codebase and update docs.
8. No use if Starter Kits

Why start from scratch everytime and burn requests/tokens and fix unwanted errors.

Use Starter kits (boilerplates) with pre-installed components to build fast.

CodeGuide have 6 boilerplates that're built for just AI coding models. Image
9. Quitting too early

AI coding is fun until you 3rd prompt, then you start fixing errors and refining the layout.

There will be 100s of errors, build issues, and AI will mess up the codebase.

But if you have strong foundation (docs and rules) you can tame AI better.
TL;DR

- Plan the app before you open any AI coding tool
- Write detailed coding docs to provide context using @CodeGuidedev
- Pick best AI tool for your use case
- Use AI friendly Teck stacks only
- Prompt better when debugging
- Use different models for different work

• • •

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

Keep Current with CJ Zafir

CJ Zafir 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 @cjzafir

Aug 16, 2025
Introducing Codespace

A virtual computer that runs custom Claude Code on server.

It is using 2 models: Kimi K2 + Claude Sonnet 4 in a sync.

I achieved same code quality with 2x better reasoning and 53% less model cost.

Access it today @CodeGuidedev
(500 credits for everyone)
We fixed some core issues:
1. It works with new and existing codebases and it won’t touch your existing code.

It can scan large codebases, 10M tokens (250,000 lines of code) and remember all core details.

Just attach your GitHub Account and select the repo you want to work on. Image
Image
2. It works autonomously (you don’t need to hit accept all) everytime.

It generates 7 docs to build a solid knowledge base to refer and create detailed tasks/sub-tasks list on autopilot.

Resulting in 88% less hallucinations and better code structure. Image
Read 8 tweets
Aug 14, 2025
Every AI startup is focused on "Build me an ........... app" (New projects)

But what about millions of existing codebases on GitHub with billions of lines of code?

To focus on existing codebases, I built a coding environment: Codespace.

(Explained below)
Simple Steps:
1. Connect your GitHub Account
2. Open Codespace and select the repo you want to work on. (AI agent will make an isolated environment for every request)
3. Let AI agent Analyze, generate docs and tasks list
4. analyze the kanban board to track tasks
5. Go have coffee and wait for the agent to email you when done.
I built a Claude Code wrapper that:
- runs on cloud (access it with phone, or laptop)
- can analyze upto 10M token size codebases
- has better visual UI & flow
- generate docs (knowledge base)
- tasks/sub-task list (2x better than claude)
- notifies me when its done via email
Read 5 tweets
Jun 27, 2025
I built "Clade Tasks" to make Claude Code 10x better and 2x cheaper.

I integrated 3 engines in 1 flow:

1. Claude Code (best agentic coding interface)
2. CodeGuide (to provide deep context to AI)
3. Taskmaster (to create detailed implementation plan)

Here's how it works: ↓
Claude Code is the most powerful AI coding tool right now.

Yes better than Cursor/windsurf.

But Claude 4 (the underlying model) can spit out unnecessary files/code and burn tokens.

Also it's plan mode is good but I found a better alternative: ↓
1. Plan before code

"Build me x, y, z." type prompts don't work because of no technical context.

So turn your idea into a set of well structured docs:
- PRD
- Tech stack doc.
- App flow doc
- UI guidelines
- backend structure
etc

@CodeGuidedev write these docs in only 3 steps Image
Read 7 tweets
Jun 15, 2025
The most important document in AI coding: PRD
(Project Requirements Document)

It serves like a blueprint & explains:
- project's overview
- tech stack
- user flow
- core features
- ui details
- backend schema
- security guidelines
- regulations

Here's how you can create PRDs:
Before you create a PRD, brainstorm with ChatGPT voice.

This step will help you finalize what features you want in your version 1.

In the end ask ChatGPT: "now add all approved features in one document and create a detailed draft)

Now it's time to create a PRD.
I use @CodeGuidedev to create all my coding docs including PRD

It uses 03 + 04-mini + Sonnet 4 model to create extensive set of docs

Flow is simple

Step 1: Open "New Project" and paste the feature draft in the input field

Step 2: Now select AI tools & AI models you'll use
Read 8 tweets
Apr 18, 2025
What are AI Agents?

OpenAI just published 30-page guide on AI agents.

I explained the guide in 10 points. Bookmark this: Image
1. Agents ≠ basic workflows

A normal “workflow” just runs a fixed list of steps with an LLM; it doesn’t think for itself.

On the other hand, Agents are systems that independently accomplish tasks on your behalf.

Workflows are linear. Agents are dynamic & autonomous. Image
2. Use agents for the complex jobs

Agents handle changing rules, tricky choices, and unstructured data better than any fixed script.

Pick jobs that need judgment, change a lot, or rely on messy text, images, or PDFs. Image
Read 12 tweets
Apr 10, 2025
I tested Gemini Pro 2.5 as my main coding model for 40+ hours.

Here're 2 documents that are working brilliantly well with Gemini.

"App flow document + App flowchart."

This made my Cursor workflow 10x better. Here's why it is working: ↓
Gemini Pro 2.5 has a 1 million token context window.

In simple terms it can scan upto 100,000 lines of code instantly to understand full codebase.

Claude & GPT models has 200k context window and that's why they struggle with large codebases.
But large context window doesn't mean Gemini doesn't hallucinate or assume things.

That issue is still there but I'm able to fix hallucinations by 95% in Gemini with my 'Context Boundary' technique.

You need to provide context with coding docs:
- PRD
- App flow doc
- Tech stack doc
etc

But here's how 2 docs are working really good with Gemini.Image
Read 7 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!

:(