CREOR.md Files
The simplest way to add rules is to create a CREOR.md file in your project root. Creor reads this file and injects its contents into the system prompt for every conversation in that project.
Because CREOR.md is a regular file, it gets version controlled alongside your code. Pull requests that change project conventions can update the rules in the same commit.
The .creor Directory
For more granular control, create a .creor/ directory in your project root. Creor scans this directory for config, rules, agents, skills, and plugins.
Directory Structure
You can also place a CREOR.md file inside the .creor/ directory itself. This is equivalent to placing it at the project root.
Instruction Discovery
Creor discovers instructions from multiple sources and injects them into the system prompt. The discovery process works as follows:
- CREOR.md at the project root and any parent directories up to the workspace root
- .creor/CREOR.md in every .creor directory found walking up from the project root
- Markdown files in .creor/rules/ directories
- Files referenced in the "instructions" array in creor.json
- Global instructions from ~/.creor/ (your home directory)
Instructions from all sources are concatenated. Project-level rules appear after global rules, so they take practical precedence when the agent resolves conflicting guidance.
Custom Instruction Paths
You can explicitly list additional instruction files or glob patterns in your config:
Global vs Project Rules
Rules can exist at two levels:
| Level | Location | Applies To |
|---|---|---|
| Global | ~/.creor/CREOR.md or ~/.creor/rules/*.md | Every project on your machine |
| Project | CREOR.md or .creor/rules/*.md in the repo | Only this project |
Global rules are useful for personal preferences — your preferred commit message format, coding style, or communication tone. Project rules are for team-shared conventions that everyone should follow.
Tip
Instruction Metadata
You can attach metadata to instruction files using the instructionMeta field in your config. This controls how each instruction is presented and whether it should always be included.
When alwaysApply is true, the instruction is always injected into the system prompt. When false, the agent may choose to load it on demand using the fetch_rules tool when it seems relevant.
Writing Effective Rules
Good rules are specific, actionable, and scoped. Here are patterns that work well:
Be Specific, Not Vague
| Instead of... | Write... |
|---|---|
| "Write good code" | "Use TypeScript strict mode. All functions must have explicit return types." |
| "Follow best practices" | "Use React Server Components for data fetching. Client components only for interactivity." |
| "Be careful with security" | "Never log or store API keys. Use environment variables via process.env." |
Include File Paths
Referencing specific paths makes rules unambiguous:
State Consequences
Explaining why a rule exists helps the agent make better judgment calls in edge cases: