M0X Docs
M0X Docs

Get Started

Quickstart GuideCore ConceptsAI ModelsPricing Plans

Core Features

Feature OverviewThe CoderX AgentOperating ModesReviewTerminal IntegrationBrowserSecurity

Customization

Lifecycle HooksContext ManagementRules & InstructionsCommandsSkills & Custom ToolsSub-Agents & Parallel OrchestrationSemantic Search@ Mentions

MCP

Model Context Protocol (MCP)MCP FeaturesMCP Tab

Tools

Cloud FeaturesCLIInline Edit (Ctrl+K)BugbotShared TranscriptsSlack IntegrationLinear IntegrationGitHub IntegrationGit SupportGitLab IntegrationDeep Links

Settings

ConfigurationIgnore FilesExtensionsKeyboard ShortcutsShell Commands

Advanced

Parallel AgentsBring Your Own Key (BYOK)Language SupportMigrations

Account

Account ManagementBilling & SubscriptionsUpdate AccessTeamsEnterprise

Guides

CookbookAgent WorkflowsWeb DevelopmentData ScienceLarge Codebases & MonoreposMermaid DiagramsBugbot Rules

Support

TroubleshootingCommon IssuesRequest IDTroubleshooting GuideDownload
Documentation

Rules & Instructions

Customize the AI's coding style, conventions, and workspace permissions using rules.

You can customize how the CoderX agent and editor assistant write code by defining global or project-specific instructions. This helps enforce consistency with your team's programming styles, framework preferences, and codebase conventions.


Instructions Hierarchy

CoderX evaluates instructions in the following order of priority:

  1. Project Rules (.m0xrules or .cursorrules): File placed in the root of your workspace. Defines constraints specific to this repository.
  2. Global Instructions: Configured in your user settings. Applies across all workspaces on your local machine.
  3. Default Agent Persona: CoderX's built-in system prompt.

[!NOTE] Project rules (.m0xrules) override your global user settings, ensuring that collaborators on the same repository share the exact same AI styling guidelines.


Writing a .m0xrules File

Create a file named .m0xrules (or .cursorrules) in your repository's root directory. Define rules using clear, action-oriented directives.

Rules Example

Here is a recommended .m0xrules template for a modern Next.js/React project:

.m0xrules
# CoderX Project Coding Standards

# Technical Preferences
preferred_stack:
  framework: Next.js 15 App Router
  styles: Tailwind CSS v4
  state: Zustand
  testing: Vitest

# Coding Style Guidelines
coding_style:
  - "Always write functional React components. Do not write class components."
  - "Use TypeScript strictly. Avoid using 'any' types; prefer interfaces or types."
  - "Use lucide-react for icons. Do not import raw svg paths manually."
  - "Keep components modular and separate concerns: place logic inside hooks and UI inside presentation views."

# Test Requirements
testing_rules:
  - "When adding a new feature file, always create a corresponding test file in the 'tests/' directory."
  - "Use render utilities from '@testing-library/react'."
  - "Ensure coverage matches or exceeds 80%."

Injecting Context-Specific Rules

You can also create folder-level rules. If a sub-directory has its own .m0xrules file, any file changes requested inside that directory will automatically inherit those local rules.

For example, src/components/.m0xrules can focus strictly on component design systems, while src/api/.m0xrules can focus on schema validation and database query speeds.

Context Management

Learn how to manage the files, symbols, and codebase resources the AI sees.

Commands

Custom slash commands.

On this page

Instructions HierarchyWriting a .m0xrules FileRules ExampleInjecting Context-Specific Rules