My AI coding agent is hallucinating. Here is the road to fix it.
As a Tech Lead at #zid, my day is a constant battle of context-switching. Meetings, planning, supporting the team, fixing incidents, and keeping our merchants happy.
In this era, we have the "Power of Thanos" in our hands with LLMs and AI Agents (Kiro, Cursor, terminal-based tools). But that power is a double-edged sword. The main enemy? Hallucinations.
We’ve all been there: you open a tool and start a "fast prompt" because you’re in a hurry. Then, in my best Joker voice: "And here... we... go!" 🤡
You spend the next 10 minutes re-explaining your Docker setup, your .env constraints, and your architectural patterns. Even with MCPs and memory features, it’s never quite "there." It’s slow, and for a Tech Lead, time is the only currency that matters.
Bridging the Gap
Last month was incredibly difficult for me personally after the passing of my mother. My productivity took a hit. I needed a way to bridge the gap between my "hidden self" and the machine to get back on track.
I started experimenting with the power of SKILLs and custom instructions, but I realized the AI needed more than just instructions—it needed a Persona of my Codebase.
Building AGENTS.md
I built a system to generate a single file that represents the "Soul" of a project. It explicitly defines:
I turned this into a meta-prompt called GYO-AGENTS (Generate Your Own Agents). It analyzes your specific git history and codebase to build a manual that your AI agent actually understands.
A 20-30% Productivity Boost
No more repeating myself. The AI finally has the context it needs to stop guessing and start building.
I’m sharing the prompt and the repo today because we shouldn't spend our time "prompt engineering" the same setup every morning. We should be building.
Stop the hallucinations. Give your agent a map. 🗺️
If this was useful, let's connect. I write about engineering leadership, backend architecture, and lessons from building products at scale.
Follow on LinkedIn