Teaching kli Your Project
On this page
By default kli knows your code only by reading it. Anything not in the code — the test
command, the project's name, a convention the team keeps — kli has to ask about or
infer. An AGENTS.md at the repository root fixes that: kli reads it into the system
prompt at startup, before your first message reaches the model.
Write an AGENTS.md
Put plain, true facts in AGENTS.md at the repo root — the things you would tell a new
contributor on day one:
# Acme Parser
A command-line tool that parses Acme log files into JSON.
## Commands
- Run the test suite with `make test`.
- Build the binary with `make build`.
## Conventions
- Source lives under `src/`. Tests mirror it under `tests/`.
- We use tabs, not spaces.
kli reads this verbatim, so a wrong fact becomes a wrong assumption later. The filename
is exact: AGENTS.md.
Pick it up
A running session has already built its system prompt, so it will not see a file you
just wrote. Start a fresh session from the same directory and the new one reads
AGENTS.md as it boots. Ask something only the file knows:
How do I run the tests in this project?The answer comes back as make test, drawn from the file rather than from searching
the tree — kli already had it before you typed.
Where context comes from
AGENTS.md is the cheapest lever, but it is one input among several the system prompt
is assembled from. The agent loop and Context and the
system prompt show the rest, and Inspect
and edit context shows how to see and change what
the model is actually working from.