All Products
Search
Document Center

AI Coding Assistant Lingma:AI rules

Last Updated:Jun 09, 2025

Learn how to configure Lingma AI rules. This feature lets you define your own rule prompts to help models generate code or answers that are more accurate, personalized, and project-specific.

image

To get best practices for system prompts, visit the Lingma rule library.

Before you start

Make sure you have updated Lingma to the latest version. See Install Lingma for details.

  • JetBrains plugin: v2.1.5 or later.

  • VS Code plugin: v2.1.6 or later.

  • Visual Studio plugin: v0.4.4 or later.

  • Lingma IDE

What is a project rule?

Lingma project-specific rules are stored in the .lingma/rules directory and only apply to the current project. These rules help models understand the project's framework and your coding preferences.

莫3@1x (8)

Important

Applicable scenarios

These rules apply to all requests in Ask, Edit, and Agent modes, except for the following:

  • Slash commands (such as /debug)

  • Commit messages

Note: Inline code completion does not follow these rules.

Limits

  1. Currently, only one rule file is supported. The file can have up to 10,000 characters. Any extra content will be cut off upon saving or synchronization.

  2. Use simple descriptions in your rule files. Images and links are not allowed.

How to configure rules

  1. Open the configuration file and click Edit to open the file editing page.

    • If the file does not exist, it will be created automatically.

    • If it does exist, you can edit it.

    • VS Code:

      1. Click the image icon to open the Lingma plugin.

      2. Click the image icon to go to the Settings page.

      3. Navigate to AI Rules: Project Rules to edit the rule file. 莫3@1x (5)

    • JetBrains:

      1. Click Settings to go to the Settings page.

      2. Navigate to AI Rules > Enable Project Rules to edit the rule file. 0E898DBA-1F49-4F9A-A820-D8170B885736

  2. Rule files for your project are synced with your local code and apply only to that project. If you want the rules to apply only to your personal project, add the rule file to the .gitignore file.莫3@1x (6)