5 Rules for Production-Ready AI Code by Travis Media
Travis (from Travis Media) has recently posted a video on how he uses LLM to generate high quality code than getting some slop.
TLDR: The way that you use/guide the LLM can improve/descrease the quality of the output that you’re getting.
Here are some of the rules that he has suggested:
- Force current document - He forces LLM to use latest document using Context7 MCP so that the LLM has latest context.
- Always plan first before doing using LLM - Leverage plan mode in the tool that you’re using.
- Review the plan properly, improvise it based on the needs - If everything is good, then execute it.
- Leverage Rules - Use context file like CLAUDE.md, AGENT.md, GEMINI.md, etc that gets added to every prompt. Using this you can enforce the things that you want in the project like design pattern, workflows like running tests before commiting, etc.
- Ask LLM for code review - LLM are really good in identifying hidden bugs in the code.
Happy coding-with LLM!