Vibe Coding
- See also: Artificial intelligence terms
Introduction
Vibe coding is an AI-driven software development approach that emerged in early 2025, enabling users to create functional applications by describing their goals in natural language rather than writing code manually. Leveraging large language models (LLMs) and AI-powered tools, vibe coding allows both non-programmers and experienced developers to rapidly prototype and deploy software through an iterative, conversational process. Coined by AI researcher Andrej Karpathy, the term reflects a shift toward an intuitive, creative style of programming that blends the flexibility of traditional coding with the accessibility of no-code platforms.
Origins and Terminology
The term "vibe coding" was first coined by Andrej Karpathy in a tweet on February 3, 2025, where he described using AI tools like Cursor Composer to build software by casually instructing the AI, e.g. "halve the sidebar padding", without directly editing code. Karpathy noted how he accepted AI suggestions, ignored diffs, and fed errors back to the assistant, resulting in a codebase that grew “beyond his usual comprehension.” This playful remark sparked interest in AI-assisted development.
A structured framework built on three pillars: specification (defining goals), rules (setting constraints), and oversight (steering the process). Community contributions from platforms like Reddit and YouTube further refined vibe coding into a collaborative, repeatable methodology. It builds on the lineage of no-code and low-code platforms, distinguishing itself with natural language input and a modular rule-based system, powered by LLMs like ChatGPT, Claude, and GitHub Copilot.
Core Principles
Vibe coding is defined by the following principles:
- Natural Language Input: Users articulate project goals in plain English (e.g. "Build a note-taking app with save functionality") rather than writing code.
- Iterative Refinement: Development occurs through dialogue with AI, with users reviewing outputs and refining via prompts (e.g. "Add tests" or "Simplify the layout").
- Minimal Manual Coding: AI generates most or all code, often requiring no direct source edits—some users rely entirely on prompts.
- Rapid Prototyping: Projects materialize in minutes to hours, fostering experimentation and quick validation.
- Accessibility: Non-technical users can participate by clearly expressing ideas, no coding expertise needed.
- Rule-Based Control: Users set explicit constraints (e.g. "Use Python, keep it simple") to guide AI behavior, ensuring consistency and clarity.
Workflow
The vibe coding process typically follows these steps:
- Initial Specification: The user provides a high-level goal (e.g. "Create a Twitter clone with login").
- Rule Definition: Users establish preferences (e.g. "Use Python, prioritize simplicity") via a four-file framework (see below).
- Code Generation: AI produces functional code—front-end, back-end, or both—based on prompts and rules.
- Review and Oversight: The user tests the output, monitors logs (e.g. progress.md), and requests refinements (e.g. "Add error handling").
- Iterative Execution: AI breaks tasks into stages, pausing for approval (e.g. "Backend done—proceed to frontend?").
- Deployment: Platforms often enable one-click publishing for instant sharing or hosting.
A key innovation is the four-file framework (stored in a `.cursor/rules` directory or equivalent):
- Coding Preferences: Ensures clean code (e.g. "Keep files under 300 lines, document in /docs").
- Technical Stack: Locks tools (e.g. "Backend in Python, SQL storage").
- Workflow Preferences: Governs process (e.g. "Pause after major steps, log in progress.md").
- Communication Preferences: Sets interaction style (e.g. "Summarize changes as Small, Medium, or Large").
This structure tames AI chaos, enhances transparency, and scales from simple scripts to complex apps.
Comparison with Other Development Approaches
Aspect | Traditional Coding | Low-Code Platforms | Vibe Coding |
---|---|---|---|
Skill Required | Strong programming knowledge | Basic technical familiarity | Ability to describe ideas |
Process | Manual coding and debugging | Drag-and-drop modules | Conversational AI prompts + rules |
Flexibility | High, fully customizable | Limited by platform | High, within AI and rule constraints |
Time to Build | Days to months | Hours to days | Minutes to hours |
Main Benefits | Fine control, robust output | Ease of use, speed | Fast iteration, low barrier, guided AI |
Key Drawback | Steep learning curve | Restricted customization | Potential quality/consistency issues |
Vibe coding merges traditional coding’s flexibility with low-code’s accessibility, enhanced by AI and user-defined rules.
Benefits
- Empowerment: Non-developers (e.g., marketers, educators) build custom tools without coding skills.
- Speed: Prototypes emerge in hours, accelerating idea validation.
- Creativity: Automation of tedious tasks shifts focus to design and functionality.
- Control: Rules ensure AI aligns with user intent, reducing scope creep.
- Maintainability: Documentation and logs (e.g. /docs, progress.md) support long-term viability.
Limitations
- Code Quality: AI-generated code may lack optimization or scalability without expert review.
- Security Risks: Novices might overlook vulnerabilities if not explicitly addressed in rules.
- Context Limits: LLMs (e.g. Claude’s 200k token cap) may lose coherence in large projects unless managed (e.g. via context-summary.md).
- Complexity Challenges: Intricate logic or edge cases may require traditional coding.
- Oversight Dependency: Success hinges on clear specifications and active user guidance.
Tools and Platforms
As of 2025, vibe coding is supported by:
- Replit Agent: Web-based IDE with AI code generation and deployment ($20/month).
- Cursor: AI-enhanced editor with rule-based support, built on Visual Studio Code (free tier; paid plans).
- GitHub Copilot: Inline/chat-based code suggestions ($10/month individual plan).
- Bolt.new: Browser-based prototyping with Netlify integration (free with limits).
- Rosebud AI: Creative apps and games, with AI image generation (free tier; $10/month+).
- Databutton: Business tools with database support ($20/month+).
General-purpose LLMs like Claude and ChatGPT also power vibe coding, especially with custom rules.
Real-World Examples
- Note-Taking App: Using Cursor, a user built an app with save functionality in 45 minutes (Python backend, SQL storage, documented in /docs/notes.md).
- Content Genie: A marketer created a LinkedIn post generator from YouTube links in 30 minutes via Cursor.
- JustBuildThings.com: Non-developer Rasit launched 100 web utilities with Cursor, ranking on Product Hunt in 2025.
- Multiplayer Flight Simulator: Indie developer Pieter Levels prototyped a simulator in one day using AI prompts.
Tips and Tricks
- See also: Vibe Coding Tips and Tricks
Planning and Preparation
Requirements, Not Solutions
- Concept: LLMs fill unspecified gaps with guesses from their training data, which might not align with your needs.
- Tip: Always spell out your requirements clearly before asking an LLM to code. For example, asking for a visualization might get you an SVG unless you specify "interactive," prompting a React app instead. Clear specs prevent chaos for both AI and human teams.
Preparatory Refactoring
- Concept: Refactoring first makes changes easier, but LLMs tend to mash everything together without a plan.
- Tip: Refactor your code before tasking the LLM with new features. Without guidance, an LLM might fix an import error but also add unrelated (sometimes wrong) type annotations. Divide and conquer is key. Avoid letting the AI rewrite everything at once.
Mise en Place
- Concept: A broken setup derails LLMs, much like missing ingredients ruin a recipe.
- Tip: Set up your environment (rules, MCP servers, docs) beforehand. Vibe coding a live production environment is like "randomly copy-pasting StackOverflow commands," disaster awaits.
Walking Skeleton
- Concept: A minimal end-to-end system helps identify next steps early.
- Tip: Build a basic working system first, then flesh it out. LLMs shine here, letting you see what's next. This approach, credited to lessons from Stanford, has never been easier with AI.
Code Structure and Management
Keep Files Small
- Concept: Large files overwhelm LLM context windows and slow down tools.
- Tip: Split big files (such as 471KB) into smaller ones. Some LLMs struggle with 128KB files given a 200k token limit. Applying 55 edits to a 64KB file in Cursor 0.45.17 lags too. LLMs can handle the import drudgery.
Use Static Types
- Concept: Static types catch errors LLMs might miss, though Python and JavaScript dominate their training.
- Tip: Use strict type checker settings (for example TypeScript, mypy) to guide LLMs via type errors. Some suggested types could auto-generate code from specs, which is worth exploring.
Rule of Three
- Concept: Duplication is fine once or twice, but three times call for refactoring. LLMs don't naturally do this.
- Tip: Prompt LLMs to refactor after the third instance. They'll copy-paste endlessly otherwise. Some argue that AI might stretch this to "10ish" within a file, but across files, three keep truth singular.
Use Automatic Code Formatting
- Concept: LLMs falter at mechanical style rules (such as no trailing spaces).
- Tip: Use tools like gofmt or black to save LLM capacity for harder tasks. Don't waste tokens on lint fixes. Automation's better.
Stateless Tools
- Concept: Tools with state (for example shell's working directory) confuse LLMs.
- Tip: Avoid stateful tools or run commands from one directory. Some LLMs can't track "cd" commands, so isolating workspaces (such as one per NPM module) helps.
Task Execution
Stop Digging
- Concept: LLMs grind away at bad tasks instead of pivoting.
- Tip: Pre-plan with a reasoning model or use a watchdog LLM to catch trouble. A Monte Carlo test fix once spiraled into relaxed conditions instead of a deterministic refactor.
Bulldozer Method
- Concept: LLMs excel at brute-force tasks humans avoid.
- Tip: Let them plow through mass refactoring (for example in Haskell). Inspect the output and they won't self-improve like humans.
Black Box Testing
- Concept: LLMs peek at implementations, breaking black-box principles.
- Tip: Mask internals to enforce boundaries. One case saw an LLM compute a test constant from code instead of preserving it.
Respect the Spec
- Concept: LLMs might tweak APIs or delete tests unless constrained.
- Tip: Review changes to keep specs intact. An LLM once replaced a test with "assert True".
Debugging and Review
Scientific Debugging
- Concept: LLMs guess fixes instead of reasoning systematically.
- Tip: Use reasoning models (such as Grok 3) or root cause yourself and guide the AI. Avoid vibe-guessing loops.
Memento
- Concept: LLMs lack memory beyond context, like the movie Memento’s protagonist.
- Tip: Feed docs and context explicitly. A misloaded file can derail an LLM, like rewriting a README for testing.
The Tail Wagging the Dog
- Concept: Irrelevant context distracts LLMs from the main goal.
- Tip: Prompt carefully. Claude Code's subagent trick keeps focus.
Know Your Limits
- Concept: LLMs won't admit ignorance without prompting.
- Tip: Give tools or refine prompts to avoid tangents. An LLM once faked shell calls with scripts.
Culture and Style
Culture Eats Strategy
- Concept: LLMs reflect their "latent space" (prompts, codebase, fine-tuning).
- Tip: Shift its culture to match your style. One case async'd a codebase to steer an LLM off-sync Python.
Read the Docs
- Concept: LLMs hallucinate without docs for niche frameworks.
- Tip: Feed manuals via Cursor's URL drop. One fix resolved YAML errors this way.
Use MCP Servers
- Concept: Model Context Protocol servers enhance context fetching.
- Tip: Use Cursor Agent mode with Anthropic's built-ins; they're safer than shell YOLO mode.
Examples from Practice
- Nondeterministic Chaos: An LLM was asked to fix Monte Carlo tests, but it relaxed conditions instead of spotting nondeterminism, plan ahead.
- Test Overhaul: An LLM turned a hardcoded test constant into a computed one, breaking black-box rules and mask implementations.
- Directory Confusion: In a TypeScript monorepo, an LLM lost track of cd commands, single-directory setups saved the day.
- Type Annotation Mess: Fixing an import, an LLM added wrong type hints, pre-refactor or limit scope.
- Spec Violation: An LLM renamed a dict key pass to pass_ in a public API, review for alignment.
Community Insights and Workflow Recommendations
Community discussions highlight:
- LLMs err differently from humans: our intuition fails, so design workflows to catch AI-specific mistakes.
- They're like "very smart junior programmers": broad knowledge, weak big-picture thinking.
- Pairing with an LLM feels like arguing with a stubborn intern: great for tedium, awful for precision.
- Don't bank on future fixes: these issues might linger, so plan for today.
Workflow Recommendations:
- Plan Before Coding: Use a reasoning model to outline tasks and break them into small, clear steps.
- Sandbox Changes: Test LLM outputs in isolation (for example, a branch) before merging.
- Iterate and Review: Refine prompts iteratively, checking each change against specs.
- Leverage Automation: Pair LLMs with linters and formatters for mechanical fixes.
- Maintain Context: Keep docs and rules handy. LLMs need constant grounding.
Tools and Models
- Cursor: A go-to tool with integration and agent mode, praised for QoL (like TAB completion).
- Sonnet 3.7: Strong for coding but quirky, excels at brute force, falters at reasoning.
- "MCP Servers": Enhance context fetching, which is safer than raw shell access.
Advanced Techniques
For complex projects:
- Coding Quality: Enforce SOLID principles, ban mock data in production, and use emojis (e.g. 🐙) to verify context retention.
- Workflow Mastery: Add tests for edge cases, summarize context at 100k tokens, and adjust checkpoint frequency.
- Communication Precision: Classify changes (Small <50 lines, Large = architecture shift) and prioritize urgency cues (e.g. “This is critical!”).
Impact and Criticism
Vibe coding has democratized software creation, fueling rapid innovation. Critics, including seasoned engineers, highlight:
- Technical Debt: Unreviewed AI code may become unmaintainable.
- Security Oversights: Novices may deploy insecure apps without rule-based safeguards.
- Skill Erosion: Overreliance might hinder learning core concepts.
Supporters argue it boosts productivity and empowers amateurs, with flaws offset by oversight and education. As of March 2025, forums like X and Reddit buzz with success stories and refinements.
Future Outlook
Vibe coding may evolve with:
- Smarter AI: Enhanced models will produce secure, efficient code.
- Voice Integration: Speech-driven prompts (e.g., “Build a quiz app”) could dominate.
- Enterprise Use: Businesses may adopt it for internal tools with stronger security.
- Education Shift: Curricula might prioritize problem-solving over syntax.
While unlikely to replace traditional coding for critical systems, vibe coding is set to lead prototyping and small-scale development.
See Also
References
- Karpathy, Andrej. "Personal Tweet on Vibe Coding," February 3, 2025. https://x.com/karpathy/status/1886192184808149383
- Vibe Coding Manual March 2025 https://www.reddit.com/r/ChatGPTCoding/comments/1j5l4xw/vibe_coding_manual