Skip to main content

Project rules

Project rules are stored in .kombai/rules. Monorepos can include separate ./kombai/rules directories for each project. Project rules allow you to enforce crucial project-specific instructions like naming conventions, folder structure, and internationalization. Examples of project rules:
  1. Generate new UI components only inside src/ui/components/ and route files only inside src/app/routes/.
  2. All visible text must be sourced from a translation system, not hard-coded strings.

User rules

User rules are global instructions defined in your system’s home directory (~/.kombai/rules/). They allow you to enforce instructions you want to apply across all your projects. Examples of user rules:
  1. Always respond in Turkish. Write all the texts and alt-texts used in the code in Turkish.
    Only the LLM responses will be in the specified language. The rest of the tool’s interface will remain in English.
  2. Use a default dark theme on all new components and pages.

Organizing rules

You can keep multiple rule files side by side in the .kombai/rules directory to organize your rules across separate files.
Rules are loaded from the direct contents of the .kombai/rules directory only. Rule files placed in nested subfolders are not picked up.

AGENTS.md

AGENTS.md is a rule file for AI agents. Use it as an alternative to .kombai/rules. It can be global or local to a project. Kombai automatically picks up the AGENTS.md file stored in the project (as a Project Rule). For global instructions, create an AGENTS.md file in your system’s home directory (~/AGENTS.md); Kombai auto-detects it as a User Rule. If you don’t want an auto-detected AGENTS.md applied, you can exclude it from the Rules, Commands & Skills page in Settings by clicking the icon next to it and confirming. This only excludes the file; it is not deleted from disk.

Manage rules

Rules can be managed through the Rules, Commands & Skills page in Settings. Kombai automatically picks up any rule file stored in the project, and lists rules under the Individual tab, grouped as User Rules (global rules stored in ~/.kombai/rules/) and Project Rules (stored in .kombai/rules/). Click Refresh at the top of the page to re-scan the lists from disk.

Create a rule

To create a rule:
  1. Click the gear icon below the chat input box to open Settings.
  2. Select the Rules, Commands & Skills tab from the left menu.
  3. Click the + Add dropdown next to Rules and select Create User Rule or Create Project Rule.
  4. Enter a name for the rule and click Create. Kombai creates a markdown file for it in your home .kombai folder (User Rule) or your project’s .kombai folder (Project Rule).

Import a rule

Use this to bring in an existing rule file or folder, such as an AGENTS.md or a rules file from another tool.
  1. Click the gear icon below the chat input box to open Settings.
  2. Select the Rules, Commands & Skills tab from the left menu.
  3. Click the + Add dropdown next to Rules and select Import User Rules or Import Project Rules.
  4. Browse to and select the rule file or folder you want to import.

Delete a rule

To delete a rule:
  1. Click the gear icon below the chat input box to open Settings.
  2. Select the Rules, Commands & Skills tab from the left menu.
  3. Click the icon next to the rule you want to remove, under User Rules or Project Rules, and confirm.

Modify a rule

To modify a rule:
  1. Click the gear icon below the chat input box to open Settings.
  2. Select the Rules, Commands & Skills tab from the left menu.
  3. Click next to the rule you want to modify, under User Rules or Project Rules.
  4. Edit the newly opened rule file and save it.

Team rules

Team rules let you share and discover rules across your team. Publish your local rules for team members to use, or use rules shared by others.
You need to be part of the Team plan to use team rules.

Publish a rule

You can publish any local rule from your repo to your team. To publish a rule:
  1. Click the gear icon below the chat input box to open Settings.
  2. Select the Rules, Commands & Skills tab from the left menu.
  3. Switch to the Team tab and go to the Team Rules section.
  4. Under Publish Your Rules, select the local rules you want to publish from the dropdown.
  5. Click the Publish button.
The rule will now be available to all members of your team.
You must have local rules added in the Rules tab before you can publish them.

Discover and use team rules

The Team Rules section (in the Team tab) lists all rules published by members of your team. You can search for rules by name or author using the search bar at the top of the list.