Table of contents
- How vibe coding works
- Vibe coding a simple web app
- Traditional vs. vibe coding
- Role of Graphite Diamond
- Conclusion
Vibe coding is an AI-assisted programming approach where developers describe what they want in natural language, and an AI generates the corresponding source code. Coined in 2025 by Andrej Karpathy, the term reflects a shift from manual coding to guiding and refining AI-generated code. Instead of hand-coding every feature, developers talk to an AI that writes the implementation. For more on AI-assisted development, see our guide on adopting AI tools in your development workflow.
How vibe coding works
Vibe coding uses natural language prompts to generate software. Developers describe what they want, and the AI—powered by large language models trained on code—produces working code in response. For example:
Prompt: "Write JavaScript code to estimate Pi using the Monte Carlo method."
function estimatePi(numSamples) {let insideCircle = 0;for (let i = 0; i < numSamples; i++) {const x = Math.random();const y = Math.random();if (x * x + y * y <= 1) {insideCircle++;}}return (insideCircle / numSamples) * 4;}
The developer can now review and refine this code. The workflow is iterative: you prompt, evaluate, and adjust.
Vibe coding a simple web app
Let's walk through building a to-do list app:
Choose a vibe-friendly environment: Use tools like Replit Ghostwriter, or Cursor. For more on AI pair programming, see our best practices guide.
Describe the app: Outline the features. Example: "A to-do app with task input, checkboxes for completion, and delete buttons. Clean design."
Prompt the AI: Paste your description into the AI interface. The system will generate HTML, CSS, and JS files.
Review generated code: Check that the HTML has inputs and buttons, CSS styles the layout, and JS adds interactivity. Learn more about how to review code written by AI.
Test the app: Run it and confirm functionality. Check task addition, completion toggles, and deletion.
Iterate via prompts: If needed, describe changes like: "Add a button to clear completed tasks." The AI will update the code accordingly.
Review with Graphite Diamond: After generating code, use Graphite's AI reviewer, Diamond, to check for bugs or bad practices. Diamond provides immediate, actionable feedback on your code changes.
Deploy: Use built-in deploy tools or export your code to platforms like Vercel or Netlify.
Traditional vs. vibe coding
Aspect | Vibe coding (AI-assisted) | Traditional coding |
---|---|---|
Code creation | Natural language prompts generate code | Developer writes code manually |
Development speed | Fast prototyping, minimal boilerplate | Slower, especially for full-stack apps |
Required expertise | Lower barrier to entry | Requires programming knowledge |
Control and flexibility | Less granular control; needs prompt tuning | Full control over architecture and implementation |
Code review | Needs tools like Graphite Diamond to assess quality | Human code review, linters, and tests ensure quality |
Role of Graphite Diamond
Graphite Diamond is an AI code reviewer that integrates with your pull request process. Once you've generated your app code, commit it and open a PR. Diamond analyzes the diff, then:
- Flags logical errors
- Suggests improvements
- Identifies potential security issues
This complements vibe coding by validating the AI's output. It acts as an expert reviewer, helping maintain professional code quality. For more on implementing AI code review in your workflow, see our implementation and best practices guide.
Conclusion
Vibe coding allows you to build functional apps by describing what you want in natural language. It speeds up development and lowers entry barriers. However, code quality still matters—tools like Graphite Diamond make sure the AI's output meets professional standards. By combining vibe coding with robust review workflows, developers can ship faster without compromising on reliability. For more on AI-assisted development, explore our comprehensive guide to AI tools in development.