https://en.wikipedia.org/wiki/Vibe_coding
Business Insider described vibe coding as a new buzzword in Silicon Valley.
Computer scientist Andrej Karpathy coined the term on February 3, 2025. In his X post, Karpathy described that vibe coding is all about completely giving in to the "vibes" of the AI, accepting the exponential power of current LLMs, and forgetting the nitty-gritty details of the code itself:
There's a new kind of coding I call "vibe coding", where you fully give in to the vibes, embrace exponentials, and forget that the code even exists. It's possible because the LLMs (e.g. Cursor Composer w Sonnet) are getting too good. Also I just talk to Composer with SuperWhisper so I barely even touch the keyboard. I ask for the dumbest things like "decrease the padding on the sidebar by half" because I'm too lazy to find it. I "Accept All" always, I don't read the diffs anymore. When I get error messages I just copy paste them in with no comment, usually that fixes it. The code grows beyond my usual comprehension, I'd have to really read through it for a while. Sometimes the LLMs can't fix a bug so I just work around it or ask for random changes until it goes away. It's not too bad for throwaway weekend projects, but still quite amusing. I'm building a project or webapp, but it's not really coding - I just see stuff, say stuff, run stuff, and copy paste stuff, and it mostly works.
Describing his own experience, Karpathy explained how he converses with AI tools almost in a passive manner—merely talking to them (thru superwhisper) and having the AI handle the rest. This method eliminates manually typing code as well as keeping track of all the minute information in the program.
https://www.youtube.com/watch?v=YWwS911iLhg
Matthew Berman provides a tutorial and best practices for "vibe coding" (also called "agentic coding"), which involves using AI agents within IDEs like Cursor or Windsurf to write most or all of the code:
- Detailed Specification: Start with a very detailed specification of the application. Use an AI (like Grok 3 in the video) to help generate this spec, including technical details, database schema, API endpoints, etc.
- Cursor/Windsurf Rules: Crucially, use "rules" (project-specific or user-specific) to guide the AI agent. These rules act like system messages, defining coding preferences, technology stack, and desired workflows. This prevents many common issues. The presenter provides a detailed example of their rules, explaining the rationale behind each one.
- Rule Examples (and why they're important):
- Avoid Code Duplication: The agent tends to duplicate code; rules explicitly tell it to check for existing code.
- Dev/Test/Prod Environments: The agent struggles with environment separation; rules enforce distinct environments.
- Focus on Requested Changes: The agent often makes unrelated, breaking changes; rules emphasize staying focused.
- Avoid New Technologies/Patterns: The agent might introduce new technologies when fixing bugs; rules restrict this.
- Keep Codebase Clean: Rules encourage organization and prevent excessively large files.
- Avoid Mock Data (Except in Tests): The agent overuses mock data, leading to false positives; rules limit this.
- Don't Overwrite .env Files: Prevents accidental API key overwrites.
- Define Tech Stack: Explicitly list allowed technologies (Python, SQL, etc.) to prevent unwanted deviations.
- Coding Workflow Preferences: Reinforce focusing on the task, writing thorough tests, and avoiding major architectural changes without explicit instruction.
- Context Management: Be mindful of the context window within the Cursor/Windsurf chat. Too much context degrades performance. Start new chats strategically, but be aware of losing context.
- Narrow Requests: Make small, specific requests to the agent (fix a single bug, add a small feature). Test frequently.
- Testing: Prioritize end-to-end tests (simulating user actions) over unit tests. Have the agent write tests, and carefully review test fixes, as they can sometimes introduce issues.
- Popular Stacks: Use well-known, widely documented technology stacks (Python, HTML/JS, SQL) for better agent performance.
- Iteration Cycle: The process can be slow (2-15 minutes per iteration). Consider using multiple Cursor windows/branches for parallel work.
- Commit Often: Commit frequently to allow for easy rollbacks. Cursor/Windsurf also has chat history-based versioning.
- YOLO Mode vs. Manual Approval: Cursor offers different execution modes:
- YOLO Mode: Auto-executes everything (risky, but fast for new projects).
- Manual: Requires approval for every change.
- Auto: Agent decides what to execute automatically and what needs approval.
Matthew wishes for a fully hosted, mobile-friendly version of this workflow.
#agentmode #cursor #windsurf #prompts #vibecoding