Key Tips for Vibe Coding

Vibe Coding with Structure: Test, Plan, and Iterate

  1. Planning First: Building with Clarity Before Code
    • Planning offers a structured way to maintain control and ensure code quality
    • the planning process itself helps clarify one’s thinking—turning vague ideas into concrete steps through deliberate dialogue and reflection
  2. TDD(Test-Driven Development): Let your tests define the coding.
    • Before writing any implementation, describe the expected behavior in tests (Could done by AI).
  3. Do Small Interations: Start Small, Iterate Fast
    • After testing, begin with a minimal but well-organized structure—just enough to hold the shape of your ideas.
    • Build incrementally from there, ensuring each step is stable before moving forward.
  4. Let tests and iterations evolve together.
    • Use tests to drive each iteration—start with a failing test, make it pass, then refactor.
    • After each iteration, revisit and update your tests to reflect new behaviors or constraints. This keeps development aligned and adaptive.

Corresponding Prompts

Ungrouped:

  1. 运行测试,如果有失败自动尝试修复
  2. 对当前修改进行代码审查,给出改进建议
  3. 分析改动,生成合适的 commit message 并提交
  4. 提交代码时请使用规范的 commit message

Reference