Connect a consumer repository
A consumer repository is a project whose agent needs the knowledge base while it works, such as an application that must follow the team's decisions. You connect that agent to the knowledge base's Reader server. Through this server, the agent can search and read the knowledge base. The only change that the agent can make is to file a report.
For the 9 tools of the Reader server, see MCP servers and tools.
Before you begin
Make sure that the machine that runs the consumer's agent has the following:
- A clone of the knowledge base. The server reads the files in that clone.
- Node.js 22.18 or later. The registration starts the engine with npx, which fetches the package from npm.
The consumer needs no Reasonry plugin. The skills are for the people who maintain the knowledge base.
Register the Reader server
The server reads the knowledge base in the folder where it starts. The registration therefore goes
to the knowledge base's folder first, and then starts the server. If the knowledge base is the
reasonry folder of the consumer repository itself, the server uses it from the repository's
root, and the registration needs no cd command.
-
Add the server to the consumer repository's MCP configuration. For Claude Code, that is the
.mcp.jsonfile at the repository's root. The following entry starts the Reader server on macOS and Linux:{"mcpServers": {"team-knowledge": {"command": "sh","args": ["-c", "cd KB_DIR && exec npx -y @push-based/reasonry@2 serve --reader"]}}}Replace
KB_DIRwith the absolute path of the knowledge base's clone, andteam-knowledgewith the name that the consumer's agent uses for the server. -
Restart your AI coding tool in the consumer repository, and approve the server when the tool asks.
-
Ask the agent which initiatives the knowledge base has. If the agent names them, the connection works.
Note: Don't replace the cd command with the --config flag. The flag names a configuration
file and doesn't change the folder that the server reads, so the agent finds no initiatives and no
documents.
Tell the consumer's agent when to consult the knowledge base
An agent doesn't use a server only because the server is connected. The agent needs a rule in the
instructions that it loads in every session, such as the AGENTS.md file. The engine writes that
rule from each initiative's domain field, and calls it the activation stanza.
-
Ask the consumer's agent to call the
get_activationtool with the initiatives that the repository uses. The following stanza comes from a knowledge base with one initiative,team-tooling:## Knowledge base**KB-01.** Before work in one of these domains, consult the knowledge base first and ground the work in what it says:- `team-tooling`: choosing and changing the team's development tools and working agreementsBefore that work, call the knowledge base's `get_skill` tool with `corpus-navigation`. It says how to search, how far to trust what you find, and when to report a problem. -
Ask the agent to save the stanza in the consumer repository's
AGENTS.mdfile, or in the file that your AI coding tool loads in every session. Theget_activationtool returns the text and writes no file. -
Commit the file.
If the stanza covers too much or too little, change the domain field in the initiative's
initiative.json file in the knowledge base, and get the stanza again.
Collect the reports
The consumer's agent files a report when the code and a decision disagree, when two documents
contradict each other, or when a decision has no evidence. A report is a file in the
source/reports/ folder of the clone on your machine, such as
source/reports/RPT-0001-dec-vt-0001-drift.md. Nothing sends the file to the maintainers.
To deliver a report, commit the file in the clone and push it, or open a pull request. The maintainers then decide what to do with the report: see Close a report.
Keep the clone current
The server reads the files as they are on disk. To give the consumer's agent the current decisions, pull the knowledge base's clone on a regular schedule, and after the maintainers announce a change that affects the consumer.
If the knowledge base doesn't track the graph.json file in git, the clone has no graph, and the
agent's graph queries fail. The Reader server can't build the graph. Build it in the clone after
each pull:
npx -y @push-based/reasonry@2 graph build