Kilo Code reads every AGENTS.md up to the root
Kilo Code puts every AGENTS.md from your working directory up to the repository root into context, in the VS Code extension and the CLI alike. Ultracite doesn’t add a Kilo plugin, so after an edit Kilo runs the ultracite fix the rules ask for; shell commands outside a short read-only list ask first unless you allow them.
Kilo Code by Kilo CodeChecked against Kilo Code 7.8.8
# Ultracite Code Standards
This project uses **Ultracite**, a zero-config preset that enforces strict code quality standards through automated formatting and linting.
## Quick Reference
- **Format code**: `npx ultracite fix`
- **Check for issues**: `npx ultracite check`
- **Diagnose setup**: `npx ultracite doctor`
Oxlint + Oxfmt (the underlying engine) provides robust linting and formatting. Most issues are automatically fixable.
…- 1
~/.config/kilo/AGENTS.mdYour global instructions. Without it, Kilo falls back to~/.claude/CLAUDE.mduntil you’ve run the Claude Code migration. - 2
AGENTS.mdUltraciteEvery one from the working directory up to the repository root, loaded at session start. - 3
CLAUDE.mdUsed only when noAGENTS.mdturns up anywhere in that chain. - 4
kilo.jsoncExtra files, globs or URLs you list underinstructions. - 5
src/backend/AGENTS.mdLoaded when Kilo reads a file in that folder, and added to the conversation as a<system-reminder>.
How Kilo Code reads the rules
Kilo Code builds its instructions from one global file, the project’s chain of AGENTS.md files and any instructions you list in kilo.jsonc. A subdirectory’s file arrives later, when Kilo reads a file under it.
- Precedence
- An agent’s
prompt, then projectinstructions, thenAGENTS.md, then globalinstructions. - Always on
AGENTS.mdcan’t be disabled on its own; override it withinstructionsor an agent’sprompt.- Edits
- Changes to
AGENTS.mdapply to new tasks, not the current one. - Extra files
instructionsinkilo.jsonctakes more paths, globs or URLs to load alongsideAGENTS.md.- Memory bank
- Deprecated in favor of
AGENTS.md; move.kilo/rules/memory-bank/content into it. - Last fallback
- A project
CONTEXT.mdstill loads, deprecated, when there’s neitherAGENTS.mdnorCLAUDE.md.
Kilo runs the fix; permissions decide when
Ultracite doesn’t install a Kilo plugin, so after an edit Kilo runs the commands in AGENTS.md. Kilo asks before shell commands that aren’t on its read-only list, so allow npx ultracite once in kilo.jsonc. Kilo plugins can handle tool.execute.after and rewrite a tool’s output, but Ultracite doesn’t ship one for Kilo yet.
{
"permission": {
"bash": {
"npx ultracite *": "allow"
}
}
}- 01Kilo edits a file with its
editorwritetool. - 02Following
AGENTS.md, it runsnpx ultracite fixthroughbash. - 03Your
permission.bashrules decide: the last matching pattern wins, and with no allow rule Kilo asks. - 04Kilo reads what’s left and fixes it before moving on.
Worth knowing about Kilo Code
AGENTS.md is write-protected
Kilo won’t let the agent change
AGENTS.mdwithout your approval and asks you to confirm every edit to it, so Ultracite’s rules can’t change without your say.REVIEW.md steers pull request reviews
Turn on the Use REVIEW.md setting and Kilo’s Code Reviews read
REVIEW.mdfrom the pull request’s base branch, so a branch can’t rewrite the policy that reviews it. Files over 10,000 characters are truncated.Order matters in permissions
Permission rules are read in order and the last match wins, so a catch-all
"*": "ask"placed after your Ultracite rule overrides it. Reads of.envfiles keep asking even under a broad allow.The Ultracite skill
Kilo Code loads skills from
.agents/skills/by default, alongside.kilo/skills/, so it finds the Ultracite skill thatinitinstalls. SettingKILO_DISABLE_EXTERNAL_SKILLS=trueturns off.agents/skills/and.claude/skills/.
Kilo Code questions, answered
- Does Kilo Code read AGENTS.md?
- Yes. Every
AGENTS.mdfrom your working directory up to the repository root goes into context at session start, and a subdirectory’s file joins when Kilo reads a file there.ultracite init --agents kilo-codewrites Ultracite’s rules to the root file. - Does Kilo Code read CLAUDE.md?
- Only as a fallback. A project
CLAUDE.mdis used when noAGENTS.mdturns up, and~/.claude/CLAUDE.mdstands in for a missing~/.config/kilo/AGENTS.mduntil you’ve run the Claude Code migration. - Does Kilo Code support hooks?
- Through plugins: TypeScript or JavaScript files in
.kilo/plugin/, or packages listed underpluginin your config, that can handletool.execute.afterand rewrite a tool’s output. They work in the CLI and the VS Code extension. Ultracite doesn’t ship a Kilo plugin yet. - Why does Kilo Code ask before running Ultracite?
- Shell commands ask by default unless they’re on Kilo’s short read-only list, such as
cat,grepandls. Allownpx ultracite *underpermission.bash, then reload the VS Code window or start a new CLI session, since Kilo caches project config. - Is the Kilo CLI the same as OpenCode?
- The Kilo CLI is a fork of OpenCode and takes the same configuration options, but it reads
kilo.jsonand.kilo/, not.opencode/. Move any OpenCode project config into.kilo/to keep it.
Keep going
- AgentOpenCodeOpen-source coding agent for the terminal, desktop and IDEs, with 75+ model providers.
- AgentClineOpen-source coding agent for VS Code, also shipped as a CLI and an SDK.
- AgentGitHub CopilotGitHub’s coding assistant: agent mode in editors, a CLI, and a cloud agent that opens pull requests.
- DocsAgent rulesWhat
initwrites for every agent, and how to keep it current.
Ship less slop
One command sets up your linter, formatter, editor and agents. Works with Oxlint, Biome and ESLint.