Skip to content

Rules

Rules are the most fundamental configuration unit. They are instructions that are “always on” or conditionally applied to guide the AI’s behavior, style, and constraints.

Most editors refer to these as “System Prompts” or “Custom Instructions”. aix unifies them under the concept of Rules.

Define rules in ai.json:

{
"rules": {
"conciseness": {
"activation": "always",
"content": "Be concise. Do not explain code unless asked."
},
"testing": {
"activation": "glob",
"globs": ["**/*.test.ts"],
"content": "Use Vitest. Prefer 'it' over 'test'."
}
}
}
ModeDescriptionEditor Support
alwaysActive for every request.All editors
globActive only when editing files matching the glob pattern.Cursor, VS Code, Windsurf
autoThe AI decides when to activate the rule based on its description.Cursor, Windsurf (Cascade)
manualMust be explicitly referenced by the user.None (future support)

If an editor doesn’t support a specific activation mode (like glob), aix falls back to always for that editor.

Rules can be defined:

  • Inline: content: "string"
  • File: path: "./rules/rule.md"
  • Git: git: { url: "...", path: "..." }
  • npm: npm: { package: "...", path: "..." }
  • Code Style: Indentation, naming conventions, preferred libraries.
  • Workflow: “Always write tests before code”, “Update documentation when changing APIs”.
  • Personality: “Be Socratic”, “Act as a senior engineer”.