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.
CoderX evaluates instructions in the following order of priority:
.m0xrules or .cursorrules): File placed in the root of your workspace. Defines constraints specific to this repository.[!NOTE] Project rules (
.m0xrules) override your global user settings, ensuring that collaborators on the same repository share the exact same AI styling guidelines.
.m0xrules FileCreate a file named .m0xrules (or .cursorrules) in your repository's root directory. Define rules using clear, action-oriented directives.
Here is a recommended .m0xrules template for a modern Next.js/React project:
# 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%."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.