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 followsa file it reads again
A new version arrivesas a session runs
Set upwatch, and its settings
Checked againstKilo Code 7.8.27, from its documentation
SystemsWherever 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.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
Shell
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.
  • watch takes 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:

Shell
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.md and the instruction-md server from kilo.jsonc.
  • Delete .instruction/current.md.

If it doesn't work

What you seeWhyWhat to do
A new version doesn't reach the toolinstruction watch isn't running, so the file keeps the version it last wroteStart 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 updatesNothing breaks: watch reads every 60 seconds (Plans and live updates)
A private instruction isn't readThe command isn't signed ininstruction login (--device on a machine without a browser)
Still stuckAsk us

Last checked against the product:

Was this page helpful? Report a problem