YC's Vibe Coding experience is compiled from YC's video 'How To Get The Most Out Of Vibe Coding | Startup School', shared by YC partner Tom Blomfield, and is a new way of developing software based on artificial intelligence (AI) tools such asClaude Code、Windsurfand Aqua. Through this approach, AI can write full-stack applications, debug code by pasting error messages, and become a true partner in the development process. Tom provides a complete guide to help developers throughvibe codingto improve development speed and efficiency.
Core Content
Planning Process
-
Create a Comprehensive Plan: First, collaborate with AI to write a detailed implementation plan, saved in a Markdown file.
-
Review and Refine: Remove unnecessary items, flag overly complex features for later handling.
-
Maintain Scope Control: Keep a separate section for future ideas to maintain focus on the current project.
-
Incremental Implementation: Implement the plan step by step in parts, not building everything at once.
-
Track Progress: Have AI mark sections as complete after successful implementation.
-
Commit Regularly: Ensure each working part is committed to Git so that version control can be done before moving to the next part.
Version Control Strategy
-
Strictly Use Git: Do not rely entirely on AI tools' rollback features, always start each new feature from a clean Git state.
-
Start Clean: Start each new feature from a clean Git state so that you can roll back if AI goes off track.
-
Reset When Problems Arise: If AI gets stuck on a task, use
git reset --hard HEADto reset. -
Avoid Accumulating Problems: Multiple failed attempts will accumulate bad code, so this needs to be avoided.
-
Clean Implementation: When you finally find a solution, reset and implement it in pure code.
Testing Framework
-
Prioritize High-Level Testing: Focus on end-to-end integration tests, not unit tests.
-
Simulate User Behavior: Test features by simulating user clicks to ensure they work as expected.
-
Catch Regressions: LLMs may make unnecessary changes to unrelated logic, and tests are needed to catch these regressions.
-
Test Before Proceeding: Ensure tests pass before moving to the next feature.
-
Use Tests as Guardrails: Start with test cases to provide clear boundaries and ensure feature correctness.
Effectively Fix Bugs
-
Utilize Error Messages: Copy and paste error messages directly into the LLM, usually enough to identify and fix the problem.
-
Code After Analysis: Have AI consider multiple possible causes before writing code.
-
Reset After Failure: Start from a clean state after each failed attempt to avoid accumulating bad code.
-
Implement Logging: Adding strategic logging can better understand what is happening.
-
Switch Models: Try different AI models to see which one is more suitable for the current task.
-
Clean implementation: Fix precise errors on a clean foundation to avoid accumulating unnecessary code.
AI tool optimization
-
Create instruction files: Write detailed instructions for AI so it better understands your intent.
-
Local documentation: Download API documentation to the project folder so the LLM can access and use it more accurately.
-
Use multiple tools: Run multiple AI tools at the same time, such as Cursor and Windsurf, to improve efficiency.
-
Tool specialization: Choose tools based on their strengths, for example Cursor is suitable for front-end work, and Windsurf is suitable for longer thinking.
-
Compare outputs: Generate multiple solutions and choose the best one to ensure code quality.
Complex feature development
-
Create independent prototypes: Build complex features in a clean codebase for better control and testing.
-
Use reference implementations: Point AI to working examples so it has a clear implementation direction.
-
Clear boundaries: Keep external APIs consistent, allow internal changes, and maintain code flexibility.
-
Modular architecture: Service infrastructure with clear boundaries is better suited for large projects.
Technology stack considerations
-
Mature frameworks: For example, Ruby on Rails performs well because of its consistent conventions and is suitable for AI development.
-
Training data matters: New languages may have less training data, so choosing a language with a large amount of training data may be more advantageous.
-
Modularity is key: Small files and modular files are easy to work with and help keep code clear and maintainable.
-
Avoid large files: Avoid files with thousands of lines of code to improve code readability and maintainability.
Beyond coding
-
DevOps automation: Use AI to configure servers, DNS, and hosting to improve deployment efficiency.
-
Design assistance: Generate design elements, such as favicons and other design components.
-
Content creation: Draft documentation and marketing materials to support project promotion.
-
Educational tools: Explain implementations line by line to help team members better understand the code.
-
Use screenshots: Share UI bugs or design inspiration for better communication and collaboration.
-
Voice input: Use tools such as Aqua for voice input to improve input efficiency.
Continuous improvement
-
Regular refactoring: Once tests are in place, refactor code frequently to keep it clear and maintainable.
-
Identify opportunities: Let AI find refactoring candidates to improve code quality.
-
Stay up to date: Try every new model release to take advantage of the latest technology.
-
Identify strengths: Different models perform well on different tasks, and these strengths need to be identified and leveraged.
Video address
- Official video address:https://www.youtube.com/watch?v=BJjsfNO5JTo