# A shared language with your agent

> Why you need a shared vocabulary and architectural decision records.

By Soufiane El Hamri. Published 2026-12-05, updated 2026-12-05. Source: https://www.soufiane-elhamri.com/blogs/shared-language-with-your-agent

When you're coding with an AI agent, better output depends on clear communication between you, the agent and the codebase. That only works when all three use the same word for the same idea. If you ask the agent to fix the "cart" and the code calls it "basket", it can misunderstand what you want and change the wrong code. It can also use a new name for the same thing, so the codebase ends up with several names for one idea.

So you need a shared vocabulary: a list of the words you use and the idea behind each one. Write it in a glossary file in your project. Eric Evans called this shared vocabulary a Ubiquitous Language in his 2003 book Domain-Driven Design. Once everyone uses the same words, you understand each other and the output gets better.

The agent uses the glossary to understand what you want to build. The file should hold only the meaning of each word, with no code and no implementation details, because the code already shows those. Keep it short and remove entries that no longer fit, since the agent reads all of it and extra entries bury the ones that matter.

A glossary gives the agent your words but can't explain why the project works the way it does. Neither can the code, which shows what you built and hides the options you turned down. An Architectural Decision Record, or ADR, is a short note that records one big choice and why you made it. Without that note, a later reader, human or agent, may "fix" a choice made on purpose. Write one only when the decision is hard to reverse, would surprise a reader, and came from a real trade-off.

The rule that matters most is that the code stays the source of truth, and these notes only add what the code can't say. A glossary entry or an ADR can go stale. When one disagrees with the code, trust the code, then write a new ADR or delete the old one, since git keeps the history.
