While major models have a million-token context, the general consensus is that context stuffing is typically not the best way to develop a product or to code. This means that a large CLAUDE.md or other context files are no longer the best practice. Maintaining those documents, or having one context doc for a product as the product grows and the codebase grows, is also not really sustainable.
The solution there is to teach the agent what to look for and how to find the right context. We're seeing this thinking become pervasive across other forms of AI coding and AI-assisted tools.
How does Harbor find the right context?

For Harbor, our development has long used a decision tree, or an architecture markdown, that essentially dictates where to find context. When a new feature or a new epic is added, its file paths and their respective documentation are created with it.
After testing it over many, many commits and PRs, we've brought this logic to the client level for document management. We've built navigation that lets reviews traverse the tree to find all relevant context across a client's documents, giving clients the following benefits:
- It finds relevant text, not just similar wording, giving clients more comprehensive recommendations across their entire library.
- Traceable results. Each result comes with the document, the section and the passage, kept only after a decision model scores it by theme and a frontier model reviews it a second time, so the reasoning can be followed ("picked doc 3 because its summary covers X").
- No extra infrastructure. No embeddings to compute, store, keep in sync or re-run when the model changes.

Why not a traditional RAG pipeline?
There are a few reasons we chose a decision tree over a traditional RAG pipeline:
- No chunking. Context is better managed with the decision tree because we don't rely on any chunking, and chunking is commonly known to lose context.
- No similarity scores. Maintaining and using similarity scores is also somewhat inconsistent.
- No reliance on similar wording. The tree finds the right section even when it doesn't use the same words as the question.
Having said that, there are trade-offs:
- Latency. Walking the tree takes longer than a similarity lookup.
- Summaries need careful architecture. The tree is only as good as its summaries, so each one has to sum up its document comprehensively (we do handle this, though).
What can Harbor do for you?
In effect, with this decision tree, context management is no longer a significant issue, and the burden of it no longer falls on the user. The user also no longer bears the responsibility of selecting the right documentation, which would require prior knowledge and memory of what each document says.
What Harbor can do with this decision tree is be a reliable wiki, and not just for your own documents, opinions and content. With Harbor's existing functionalities, we can also give you:
- Content references your competitors are featured for in the media.
- Content references that AI searches cite and reference.
- Themes and talking points you've used before, so you can rediscover them and re-establish your authority.
Fundamentally, none of this relies on sensitive or confidential information to work.
What did Code Mode change?
When MCP was popularised last year, it was extremely useful because it taught agents how to call tools to interact with the different functionalities of the MCP provider. Today, I still use a lot of MCPs (including our own) to enhance my agent's capabilities. However, when a product is complex or a service like Cloudflare has thousands and thousands of endpoints, tool calling becomes prohibitively expensive.
Cue Cloudflare's Code Mode. Instead of requesting or interacting with each operation separately, the agent writes code, which reduces the number of round trips between the agent and the MCP server. Cloudflare's API has more than 2,500 endpoints, and Code Mode gives an agent all of it through two tools and about 1,000 tokens.
Some stats regarding our own use of Cloudflare's MCP in Code Mode:
- 200+ calls across 24 sessions, across execute, search and docs.
- About 175 tokens for a typical execute result, because the script filters the API's reply before it comes back.
- About 218k tokens of results in total, plus about 38k tokens of code and queries written for the calls.
- About $8.50 for the month.
Without Code Mode (an estimate):
- Every endpoint as a tool would mean about 2,500 tools and about 1.17M tokens of definitions, which is more than the 1M context window.
- execute results would come to about 475–950k tokens instead of about 95k.
- The month would cost about $14–30 more, or 2.5–4.5 multiple on the Code Mode cost in total.
What is Harbor AI?
Harbor AI is an AI visibility (AEO and GEO) and content platform for PR agencies and communications teams, built by Harbor Group in Hong Kong. It tracks how five AI engines answer buyer questions about a brand, shows which topics audiences want and the press has left open, and drafts cited fixes from the brand's own materials. See how it works.