Your AI gives generic advice because it doesn’t know why your priorities are what they are.
Every AI conversation starts over. The model doesn’t know your situation, your constraints, the decisions you’ve already made, or the reasoning behind them. It gives the best advice it can for a generic case — which is usually not the same as the best advice for your specific case. A private, versioned knowledge base that loads into every session fixes this at the source.
What actually happened
At the end of a long day that included a sprint planning session for a civic technology platform I run, I printed a document. It was a GitLab milestone description — one page, formatted for a meeting, listing every priority in the sprint with the reasoning behind each one. It showed which issues were P1 and why, who owned which lane and why that ownership was designed the way it was, and what each sub-sprint was actually for.
The document was accurate. Not in the “it listed the tickets” sense, but in the “it understood the strategy” sense. It knew that one P1 bug was blocking a content workflow that was blocking a partnership timeline. It knew that one collaborator runs their lane autonomously without approval loops — and why that was a deliberate structural choice, not an oversight. It captured the reasoning behind every prioritization call.
I didn’t explain any of this in the session. The model already knew.
The context layer
The reason the model already knew is that I maintain a private, versioned knowledge base — a small set of Markdown files in a git repository — that describes my actual situation. Career strategy. Current projects and their purposes. Financial position and the constraints it imposes. Decisions already made. The relationships and dynamics that shape how work gets done. Anything that would change the advice if the model had it.
This repository loads into every Claude Code session I run. The first message I send is the actual question — not the background. The model doesn’t need me to re-establish context because the context is already there, accurate, and current.
The sprint planning session that night worked because the model could connect the project’s task state (open issues, milestone assignments, current sprint) to the strategic context that explained why those tasks had the priorities they did. The PM system had the what. The knowledge base had the why. Both in the same session produced the combination.
The expensive part of working with AI isn’t the inference. It’s the context-establishment. Every session you re-explain your situation, or you don’t, and the model gives advice for a generic case. The context layer removes that cost.
What the files look like
The structure is simple. A CLAUDE.md at the root tells the model what the repository is for, what the key files are, what to update when things change, and what’s off-limits (specific credentials, identifying details). A knowledgebase.json is the fast-load artifact — a compact summary of current state that any session can read without opening the full prose documents. A knowledge/ directory holds the prose: one file per major domain, written to be read by a model giving advice to the person who wrote it.
The discipline is maintenance. The files are as useful as they are accurate. When something material changes — a decision gets made, a priority shifts, a constraint is added — the relevant file gets updated. A five-minute update after a significant decision makes every subsequent session better. Skipping it makes every subsequent session slightly wrong.
The knowledge files don’t contain everything. They contain what would change the advice. That test is strict: a lot of things feel important but wouldn’t actually change the output. Keeping the files lean is how they stay readable and maintainable.
Three patterns
The context layer shows up in three distinct ways depending on what you’re trying to do.
The exec-assistant pattern is for individuals: a personal knowledge base covering career, finances, projects, and priorities. Makes planning and career advice concrete instead of generic. Works with any AI session, no additional infrastructure.
The sprint planning pattern connects the context layer to a project management system — GitHub Issues, GitLab, Jira. The model reads both the strategic context (why things matter) and the current ticket state (what’s open). Sprint planning becomes something the model can reason about, not just summarize. The document you can print at the end of the session is the artifact: priorities listed with reasoning, ownership explicit, cross-dependencies surfaced.
The content creator pattern is a knowledge base of positions, research, and publication history. When you write, the model knows your voice, your constraints, your previous arguments. A citation layer lets you be opinionated without having to address every nuance — the structured topic overview does the epistemic work; you do the perspective work.
What it works with
The files can live anywhere Claude Code can read: a private GitHub repository, a folder on OneDrive or iCloud, a local git repository. The repository doesn’t need to be on a server. It doesn’t need to be hosted. It just needs to be somewhere your Claude Code session can reach it when it starts.
For the sprint planning pattern, connecting to a PM system requires additional setup: API tokens, project IDs, and some configuration specific to your stack. The exec-assistant and content patterns work immediately without any of that. Start with whichever pattern solves the problem you have today.
The open-source version
I’ve published the templates, pattern documentation, and prompts as an open-source repository: github.com/trentonmercer/context-layer. Everything needed to understand and implement the system is there. The templates are ready to copy. The concepts are documented. The prompts are ready to use.
The assembly — adapting the templates to your specific stack, connecting to your PM system, configuring the session setup for your workflow — is the work that requires someone who’s done it before. That’s what Mercature does.