Qoder enables project-specific rule configuration. Stored in the .Qoder/rulesdirectory, these rules apply exclusively to the current project. They optimize model adaptation to your coding preferences—including project frameworks and code styles.

How rules work

Large language models (LLMs) rely on general knowledge, so they lack your project’s specific context and rules. Qoder rules address this limitation by strategically injecting predefined context into prompts, which helps guide AI responses to more consistently align with your project’s standards and requirements.

Storage and sharing

  • Rule files are stored directly in your project directory and are shared with team members via version control systems like Git, alongside your codebase.
  • For local-only rules (not shared), add the .Qoder/rules directory to your project’s .gitignore file.

Limitations

  • Allows a maximum of 100,000 total characters across all active rule files (excess content will be truncated).
  • Supports natural language only—no images or links.

Rule types

TypeDescriptionUse case
Apply ManuallyApplies manually via #rule in the AI Chat panel or inline chat.On-demand workflows, custom prompts
Model DecisionThe AI evaluates the rule description in Agent mode and decides when to apply it.Scenario-specific tasks (such as generating unit tests or code comments)
Always ApplyApplies to all AI Chat and Inline Chat requests.Enforcing project-wide standards (such as coding style or documentation format)
Specific FilesApplies to all files matching the wildcard patterns (such as .jsor src/**/.ts).Programing language- or directory-specific rules

Best practices

  • Be concise: Keep rules focused and unambiguous.
  • Structure clearly: Use bullets points, numbered lists, or Markdown formatting for readability.
  • Include examples: Provide “good” code samples to guide the model.
  • Iterate and optimize: Refine rules based on model output and feedback.

Configure rules

  1. In the upper-right corner of your Qoder IDE, click the user icon or use the keyboard shortcut ( , (macOS)orCtrl shift ,(Windows)), and select Qoder Settings.
  2. In the left-side navigation pane, click Rules.
  3. Click Add.
  4. In the search bar at the top, enter a unique rule name and press Enter.
  5. Select a rule type:
    • Apply Manually
    • Model Decision: Enter scenario description.
      • Example: “Generate a unit test.”
    • Specific Files: Provide comma-separated file path wildcards.
      • Examples: *.mdsrc/*.java.
    • Always Apply
  6. Close the window to save your changes.

Next steps

To edit or delete an existing rule, click the corresponding icon on the Rules page.