with AI is an efficient way of accelerating coding speed. AI agents can handle numerous the straightforward and repetitive tasks, while you’ll be able to act as an orchestrator in your agents.
An issue I often encounter, nevertheless, is that I even have more context in my head than an AI agent could ever have. This might, for instance, be:
- Business objective with a feature
- Technical discussions are happening orally within the office
- Meetings where we discussed different topics
- Historic knowledge
The similarity between all of those is that this information typically isn’t written down, and is unquestionably not available to your AI agent when implementing code.
Nonetheless, everyone knows that to be as effective a programmer as possible, you would like extensive context. You have to know why a feature is being built to make the proper decisions when implementing the code. The technical discussions within the office are necessary to understanding the codebase, and projects are sometimes shaped in meetings. The query then is:
How can we make AI have the identical context as human programmers?
I’d argue the reply is to be strict about writing down all knowledge (which is now quite a bit simpler using AI tools), and providing tooling for the AI to have access to this information.
In this text, I’ll discuss how I’m attempting to facilitate my coding agent to be as efficient as possible. I imagine a big a part of this is just to make certain the AI has access to the identical information I even have, and I’ll discuss three specific techniques I take advantage of on daily basis to make this occur.
I feel a vital point in why coding agent isn’t simpler, is just because they don’t have access to the identical context humans have access to
Why provide all context to the AI
The foremost reason for providing your AI coding agent as much context as possible is that the more information the AI has, the higher it’ll perform.
Imagine you desired to implement a feature, say, for instance, a tool to summarize meetings. Developing this feature is incredibly difficult in the event you don’t know:
- Which repository should the code belong to?
- Should it summarize all meetings, or simply external meetings?
- How briskly does the summarization must occur? 5 seconds, or 5 minutes?
These questions are all contexts that you just get as a human that a coding agent doesn’t natively have access to.
You recognize which code repository to implement the code in, since you’ve worked within the repository before.
You recognize it should only summarize external meetings, and that it only must summarize in 5 minutes, since it was discussed through the shaping meeting last week.
Nonetheless, in the event you don’t provide your coding agent with this context on implementation, it’ll never have the option to implement the feature the best way you would like it implemented.
If the agent lacks context that you may have, you’ll notice the agent starts performing undesired actions. That is frustrating and time-consuming, but may be eliminated by syncing your context, with the coding agent’s context
3 Techniques to Provide Context to AI
On this section, I’ll cover specific techniques I take advantage of in my day-to-day to supply my coding agents as much context as possible. I imagine these techniques are critical to creating me efficient as a programmer, and I’m consistently searching for more techniques to turn out to be even simpler.
Store IaC schema in a Markdown file
A straightforward technique you should use to offer the AI more context is to store your Infrastructure as Code in a simple-to-access file.
IaC is the code representing information comparable to:
- Table names
- S3 buckets and prefixes
- Production logs
- Permissions,
If you’ve been working in an organization for some time, you almost certainly have all of this information memorized. You remember the table names of crucial tables, and which S3 buckets store what, and through which prefixes.
Nonetheless, your coding agent doesn’t have easy access to this, unless you provide them access. The only strategy to do that is:
- Store all of your IaC repositories in a single folder
- Tell a coding agent to undergo all of those repositories and summarize all of the IaC in a single Markdown file
- Now you’ll be able to consult with this Markdown file each time you would like your agent to work with anything IaC
It’s difficult to elucidate how much time this has saved me. My agent doesn’t must list all database tables before finding the proper table storing the knowledge it’s searching for. As an alternative, it simply knows all of those table names and directly accesses the proper information. This makes the agent quite a bit faster and likewise cheaper, because it’s spending fewer tokens to search out the knowledge it’s searching for.
Notice when your coding agent is missing context
One other necessary point is to be alert to when your AI is missing context. In case you didn’t summarize your IaC (as explained within the last section), you’ll probably notice the agent is at all times:
- Listing all table names
- Reasoning about which table is the right one to access now
- Try accessing one table, and sometimes be mistaken, and must try one other table
This can be a results of your coding agent missing necessary context. At any time when you notice a pattern like this, you need to immediately interrupt and inform the coding agent:
If you search for documents, you could find them within the table called
DocumentTable. Memorize this in AGENTS.md
Now the agent will remember this for next time, and also you’ll save numerous time and tokens.
I urge you to at all times search for situations where your coding agent is struggling. If it’s taking longer than usual for a task, it’s actually because it’s missing context, and it’s your job to supply that context to the AI coding agent.
Summarize meetings with AI tools
One other easy technique you should use to supply your coding agent more context is to summarize meetings with AI tools, comparable to Granola, and supply this as context in your coding agent.
For instance, in the event you had a shaping meeting discussing implement a feature, you’ll be able to summarize that meeting and supply it as context to your coding agent when implementing the feature.
This fashion, the agent has access to all of the knowledge you do about how the feature needs to be implemented. That is an affordable and straightforward technique you’ll be able to utilize to enhance the context of your coding agent.
To amend the last section, I also want to spotlight that shaping meetings should typically end in properly shaped tasks in project management tools comparable to Linear.
The feature you’re implementing, for instance, needs to be summarized and shaped completely right into a single Linear issue or project. If that is so, you need to only have to supply for AI agent access to the Linear issue (which you’ll be able to do with the Linear MCP), to make sure it has access to all of the relevant information.
Conclusion
In this text, I’ve covered facilitate simpler programming with AI coding agents. I’ve discussed how a quite common problem for coding agents is that they don’t have access to the identical context human programmers have. This is straightforward because topics are discussed in meetings and across the office, and this information shouldn’t be written down. I’ve highlighted three specific techniques I take advantage of to offer my coding agent as much context as possible. I imagine that in the approaching years, we’ll see great improvements in coding agents’ performance, just because we’re higher capable of provide all of them the context that is required to effectively complete tasks.
👉 My Free Resources
🚀 10x Your Engineering with LLMs (Free 3-Day Email Course)
📚 Get my free Vision Language Models ebook
💻 My webinar on Vision Language Models
👉 Find me on socials:
🧑💻 Get in contact
✍️ Medium
