Skip to content

Kodik Rules

Kodik Rules are persistent instructions included in the agent’s system prompt on every conversation. Use them to set coding style, documentation requirements, pattern conventions, or any other preferences — for a specific project or globally.

A file or folder at .kodik/rules in your project root.

  • File: .kodik/rules — a single markdown file with instructions.
  • Folder: .kodik/rules/ — a directory containing any number of .md files. Kodik automatically reads all files recursively and merges them into a single rule set. Files are sorted by name, so numeric prefixes (01-coding.md, 02-docs.md) let you control the order.

Example folder structure:

your-project/
.kodik/
├── rules/
│ ├── 01-coding.md
│ ├── 02-documentation.md
│ └── current-sprint.md

The global rules directory location depends on your OS:

OSDefault locationNote
WindowsDocuments\Kodik\RulesSystem Documents folder
macOS~/Documents/Kodik/RulesUser Documents folder
Linux / WSL~/Documents/Kodik/RulesMay be ~/Kodik/Rules on some systems

The global directory is always a folder (not a file). Kodik reads all .md files inside it recursively.

Linux/WSL users: if global rules are not at ~/Documents/Kodik/Rules, check ~/Kodik/Rules.

Installed and enabled plugins can provide their own rules. These are added to the system prompt automatically under the heading # Plugin Rules — no manual editing needed. Disabling a plugin removes its rules.

Each rule file can be toggled individually via the popup panel below the chat input. The panel shows:

  • Global rules (from your user preferences)
  • Workspace rules (from .kodik/rules/ in the current project)

A single click enables only the rules you need — for example, react-rules.md when working on React components, or memory-bank.md when using a memory bank pattern. Changes take effect on the next request.

Click the + button on the Rules tab, and simply tell Kodik what the rule should do — Kodik will create it for you and it will automatically appear in the active rules list.

Image

  • Be specific, not generic. Instead of “write good code” — “all public functions must have JSDoc comments.”
  • Keep files focused. One file per area (e.g. code style, testing, documentation).
  • Avoid redundancy. Rules occupy space in the system prompt; long or duplicate rules degrade response quality.
  • Iterate. Check how rules affect agent responses and refine the wording.
# Project Guidelines
## Code style
- Prefer functional components over classes (React)
- All functions must have JSDoc comments
- Use `const` wherever possible
## Testing
- Unit tests required for business logic
- Integration tests for API endpoints
## Documentation
- Update `/docs` when changing the public API
- Maintain entries in CHANGELOG.md

AGENTS.md is a separate, complementary mechanism. It describes high-level architecture, conventions, and commands for agents. .kodik/rules is better suited for detailed style instructions; AGENTS.md is for architectural context.