Building a full-stack app with AI pair programming A developer used Cursor and Claude 3.5 Sonnet to build a full-stack Task Tracker app in under an hour, finding that providing a .cursorrules file and using iterative prompting with vertical slices reduced debugging time from 45 minutes to 2 minutes when the AI hit a wall. The key to success was maintaining shared context and being prescriptive about architecture, such as refactoring a client hook into a separate Client Component. Building a full-stack app with AI pair programming Real AI pair programming is about maintaining a shared state between your brain and the LLM. If you don't feed the AI the right context, you'll spend four hours debugging a hallucinated library version that hasn't existed since 2022. I tried building a simple Task Tracker last Tuesday. I used Cursor /en/tags/cursor/ which is basically VS Code on steroids and Claude 3.5 Sonnet. The goal was to move from a blank folder to a deployed app in under an hour. Setting up the workspace for context The biggest mistake beginners make is starting a chat without providing a roadmap. If you just say "Build me a task app," the AI will guess your tech stack. It might give you Tailwind CSS when you wanted Bootstrap, or use an outdated Next.js API route structure. First, create a .cursorrules file or a project-level instruction file in your root directory. This forces the AI to stick to your specific stack. // .cursorrules You are an expert Full-stack TypeScript developer. Tech Stack: - Frontend: Next.js 14 App Router , Tailwind CSS, Shadcn UI - Backend: Supabase Auth and Database - State Management: Zustand Coding Style: - Use functional components and arrow functions. - Strictly use TypeScript interfaces; avoid 'any'. - Implement error handling for all async calls using try/catch blocks. - Keep components small and modular. With this file in place, the AI stops guessing. It knows exactly which version of Next.js to use. The "Iterative Prompting" loop Don't ask for the whole app at once. You'll get generic, buggy code. Instead, build in "vertical slices." Step 1: The Schema I started by defining the data. I didn't write the SQL; I asked the AI to generate the Supabase migration script. Prompt: Based on the .cursorrules, generate a SQL migration for a 'tasks' table. I need id uuid , created at, title text , is completed boolean , and user id uuid referencing auth.users . Step 2: The Logic Once the DB was live, I needed the fetch logic. Instead of writing the function, I highlighted the empty page.tsx file and used the "Composer" feature Cmd+I in Cursor to generate the server component. js // This is what the AI generated after I provided the Supabase schema import { createClient } from '@/utils/supabase/server'; export default async function TasksPage { const supabase = createClient ; const { data: tasks, error } = await supabase.from 'tasks' .select ' ' ; if error return