Kode supports project-scoped instruction files that are automatically loaded and provided as additional context during runs.
AGENTS.md: primary project instruction file.AGENTS.override.md: optional override that replacesAGENTS.mdin the same directory.CLAUDE.md: legacy compatibility file; read and included as a separate “legacy” section when present.
When Kode needs project instructions, it discovers instruction files from:
- Git root → current working directory, walking one directory at a time.
- In each directory:
- If
AGENTS.override.mdexists, it is used (andAGENTS.mdin the same directory is ignored). - Otherwise, if
AGENTS.mdexists, it is used.
- If
This produces a deterministic, ordered stack like:
AGENTS.mdsubdir/AGENTS.mdsubdir/nested/AGENTS.override.md
Discovered instruction files are concatenated in order. By default, Kode includes a heading per file:
# AGENTS.md/# AGENTS.override.md_Path: <relative path from git root>_
To keep prompts bounded, Kode enforces a total byte budget while concatenating instruction files.
- Default: 32 KiB
- Override via env var:
KODE_PROJECT_DOC_MAX_BYTES=<number>
If the budget is exceeded, the final content is truncated with a suffix indicating truncation.
If a CLAUDE.md exists in the current working directory, Kode appends it after AGENTS content under:
# Legacy instructions (CLAUDE.md)
CLAUDE.md is supported for compatibility; prefer using AGENTS.md for new projects.