Kilo Code
Make a project follow an instruction in Kilo Code: instruction.md keeps a file current, and Kilo Code reads it as a session runs. The same setup for other tools, and how each one takes a new version, is on Other coding agents.
At a glance
| How it follows | a file it reads again |
|---|---|
| A new version arrives | as a session runs |
| Set up | watch, and its settings |
| Checked against | Kilo Code 7.8.27, from its documentation |
| Systems | Wherever the tool and Node.js 20.19 or later run |
What you need: Node.js 20.19 or later, the instruction.md package
(npm i -g instruction.md, 0.11.0 or later) and @instruction.md/agents 0.4.1 or later, which
instruction agents … runs. Every instruction agents … command also runs, without installing
anything, as npx -y @instruction.md/agents …, and every instruction … command as
npx -y instruction.md ….
Set up
Kilo Code is built on OpenCode and takes the same instructions entry. instruction connect --host kilo <uri> prints its settings and the watch command that keeps the file current:
// kilo.jsonc — Kilo Code reads its instructions files as a session runs; instruction.md keeps .instruction/current.md current
// (git-ignore it): npx -y instruction.md watch instruction://acme/support-agent@stable --out .instruction/current.md --url https://instruction.md/mcp
{
"instructions": [
".instruction/current.md"
],
"mcp": {
"instruction-md": {
"type": "local",
"command": [
"npx",
"-y",
"instruction.md",
"mcp",
"--follow",
"instruction://acme/support-agent@stable",
"--url",
"https://instruction.md/mcp"
]
}
}
}
// sign the bridge in once: npx -y instruction.md login instruction watch instruction://acme/support-agent@stable --out .instruction/current.md --url https://instruction.md/mcp What happens
Kilo Code reads its instruction files as a session runs, and reaches instruction.md's server through the instruction command's stdio server.
Caveats and what isn't verified
- Whether Kilo Code reads the file again before each request, as OpenCode does, is not verified.
watchtakes a live-update place while it runs (see Plans and live updates).
Check it worked
Read the instruction once, as watch does, and write it:
instruction watch instruction://acme/support-agent@stable --out .instruction/current.md --once It prints applied v… and the file it wrote, and exits 0; 6 means nothing could be applied. Then start the tool and ask which instructions it follows.
Stop following
- Stop
instruction watch(Ctrl-C, or the service you made for it). - Remove
.instruction/current.mdand theinstruction-mdserver fromkilo.jsonc. - Delete
.instruction/current.md.
If it doesn't work
| What you see | Why | What to do |
|---|---|---|
| A new version doesn't reach the tool | instruction watch isn't running, so the file keeps the version it last wrote | Start it again, or run it as a service (Keep watch running) |
live updates are taken: … Still reading on schedule. | Another agent or app has your plan's live updates | Nothing breaks: watch reads every 60 seconds (Plans and live updates) |
| A private instruction isn't read | The command isn't signed in | instruction login (--device on a machine without a browser) |
| Still stuck | Ask us |
Related
- Other coding agents: every tool at a glance
- How following works: the follow file, the hooks, offline behaviour
- OpenCode
- Goose
- Aider
- Live updates