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.
Where rules are stored
Section titled “Where rules are stored”Workspace rules
Section titled “Workspace rules”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.mdfiles. 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.mdGlobal rules
Section titled “Global rules”The global rules directory location depends on your OS:
| OS | Default location | Note |
|---|---|---|
| Windows | Documents\Kodik\Rules | System Documents folder |
| macOS | ~/Documents/Kodik/Rules | User Documents folder |
| Linux / WSL | ~/Documents/Kodik/Rules | May 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.
Plugin rules
Section titled “Plugin 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.
Enabling and disabling rules
Section titled “Enabling and disabling 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.
Creating a rule
Section titled “Creating a rule”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.

Tips for writing effective rules
Section titled “Tips for writing effective rules”- 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.
Example rule structure
Section titled “Example rule structure”# 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.mdRelationship with AGENTS.md
Section titled “Relationship with AGENTS.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.