Directives
Permanent behavioral rules that persist across all sessions. Tell your AI what to always do and never do.
What Are Directives?
Directives are Layer 9 of the ekkOS memory system. They're persistent rules that define how your AI should behave — coding standards, workflow requirements, personal preferences. Once set, they apply to every future session automatically.
Think of them as your AI's constitution. Just say what you want in natural language and ekkOS captures it as a permanent rule.
Four Types of Directives
MUST
Say "always..." in conversation
Rules your AI must always follow. Highest enforcement level.
Examples
- •"Always use TypeScript strict mode"
- •"Always run tests before committing"
- •"Always use snake_case for database columns"
- •"Always include error handling for API calls"
NEVER
Say "never..." in conversation
Actions your AI must never take. Highest enforcement level.
Examples
- •"Never push directly to main"
- •"Never delete production data without backup"
- •"Never expose API keys in code"
- •"Never use var, always use const/let"
PREFER
Say "I prefer..." in conversation
Soft preferences the AI should follow when possible.
Examples
- •"Prefer functional components over class components"
- •"Prefer early returns over nested conditionals"
- •"Prefer named exports over default exports"
- •"Prefer Tailwind over inline styles"
AVOID
Say "avoid..." or "don't..." in conversation
Things the AI should try not to do. Suggestion level.
Examples
- •"Avoid over-engineering simple features"
- •"Avoid adding dependencies for trivial tasks"
- •"Avoid console.log in production code"
- •"Avoid abbreviations in variable names"
Creating Directives
Natural Language
Just tell your AI. It detects directive triggers automatically:
MCP Tool
Use the tool directly for precise control:
ekkOS_Directive({
type: "MUST",
rule: "Use semicolons in TS",
reason: "Team standard",
priority: 85
})Priority System
Each directive has a priority from 0 to 100. When directives conflict, the higher priority wins.
Managing Directives
| Tool | Description |
|---|---|
ekkOS_Directive | Create a new directive |
ekkOS_UpdateDirective | Modify an existing directive (type, rule, priority) |
ekkOS_DeleteDirective | Remove a directive permanently |
ekkOS_UniversalDirectives | View system-wide constitutional rules |
Conflict Detection
Before taking destructive or significant actions, ekkOS checks your directives via ekkOS_Conflict. If an action would violate a directive, you're warned before it happens.