← Guides
Extend kcode

Rules, prompts, and output styles

Change what the agent is told, without changing the tools or their permissions.

Project rules establish conventions

Repository instructions tell the agent how to work here: which checks to run, how the code is organized, and what conventions to follow. They contribute context; they are not executable enforcement.

Prompt overrides replace a built-in section

A non-empty file at ~/.kcode/prompt/<name>.md replaces one global section. Supported names are identity, tools, style, rich-output, memory, recall, and control-plane. Missing, unreadable, or blank files fall back to the built-in text. These overrides are deliberately global, not per-project.

Output styles shape the response

An output style supplies additional response instructions—for example, concise answers or a particular reporting structure. It is appended to the assembled prompt rather than replacing the built-in style section.

Give different projects different conventions

A service repository can tell the agent which integration tests to run and how to report failures. A documentation repository can specify terminology and voice. Keep those instructions with the project, while your global output style expresses how you prefer answers across projects.

Explore this area