Documentation Is the Key to Vibe Coding

Documentation is the key to vibe coding success!

The use of LLM AI code assistants (or "copilots") like Github Copilot and Claude has exploded recently. Many non-programmers have taken advantage of this to begin coding their own projects without any past software engineering experience, just "coding on vibes".

However, this is not as easy as it might sound. There's a lot of basic principles and best practices to software engineering that copilots don't steer you away from. If you make a design mistake, your copilot might double down on it and spit out a huge amount of code to solve a simple problem in a wrong, complex way.

Ultimately, the only solution is to actually know how to code, how to use your language, and the library you're using. But there are some things you can do in the meantime to improve your output.

The key to understanding here is that LLMs are input/output machines. The output is shaped heavily by the information and context you give it. If you just give the prompt "Make a full stack calculator app in React", it's going to have to make a lot of assumptions. Some, even most of those assumptions will be fine. But ultimately you won't know the difference, which will lead to pain later on when some of them aren't.

Therefore, for any vibe coding project you're embarking, detail extensively in a document all of the project requirements. Any bit of information you have in your head related to the project, write down. If you feed that into your copilot, it will be able to reference that information when it's relevant and tailor its output to what you give it.

This might seem daunting, especially if you're vibe coding something you don't fully understand yourself. But LLMs can help with that, too! Before you start actually coding, ask the LLM what information it thinks you can provide to help with its output. With just fifteen minutes of preparation and research, you can save yourself hours of debugging later.

If you have any other vibe coding suggestions, please share in the comments!

View the original LinkedIn post