Skip to content

Rules

We have two ways to control AI behavior to meet your needs: Personal Rules and Project Rules.

1. Personal Rules

Description

Personal rules are rules set for AI based on personal usage habits and needs, aimed at making AI output more aligned with users' personalized requirements. Personal rules take effect in every conversation across all projects and are configured in CodeFlicker Settings > Rules > Personal Rules. If you want to specify rules that should always be included in every project, such as output language, response length, etc., you can configure personal rules to achieve the corresponding effect.

Example Configuration

Markdown
- Language Style: Answer my questions with concise language.
- Operating System: Provide answers for macOS operating system.
- Content Depth: Include examples in your responses.
- Interaction Style: Output your answer directly without showing intermediate thinking processes.

Personal Rules Limitations

  1. Personal rules file has a maximum limit of 5000 characters, excess content will be automatically truncated.
  2. Only 1 personal rules file is supported, with filename user_rules.mdr, located in the .codeflicker folder under the local user root directory.
  3. When describing, please use natural language description; parsing of images, links, etc. is not supported.

2. Project Rules

Description

Project rules are rules specific to workspace projects. After creating project rules, the corresponding rule files will be stored in the .codeflicker/rules directory under the workspace root directory, with .mdr as the file extension.

Project rules support two configuration modes, controlled by the "alwaysApply" parameter:

  • Manual Reference: Rules that only take effect when manually added in #Knowledge-Rules, in which case "alwaysApply: false" should be configured in the rule file.

Reference Rules

  • Auto Attach: Rules that automatically take effect in every conversation during sessions, in which case "alwaysApply: true" should be configured in the rule file.

Example Configuration

Markdown
---
alwaysApply: false
notes: |
If this rule needs to be triggered in every conversation, please change "false" to "true" in "alwaysApply: false" above. If this rule doesn't need to follow the project for commit, please add this rule file to .gitignore.
---

You are a senior Java expert, please follow these rules during development:

- Strictly follow SOLID, DRY, KISS, YAGNI principles
- Follow OWASP security best practices (such as input validation, SQL injection protection)
- Adopt layered architecture design to ensure separation of responsibilities
- Code changes must be covered by unit tests (test coverage ≥ 80%)

## 1. Technology Stack Specifications
### Technology Stack Requirements
- Framework: Spring Boot 3.x + Java 17
- Dependencies:
	- Core: Spring Web, Spring Data JPA, Lombok
  - Database: PostgreSQL Driver or other relational database drivers
  - Others: Swagger (SpringDoc), Spring Security (if permission control is needed)

Project Rules Limitations

  1. Project rules file has a maximum limit of 5000 characters, excess content will be automatically truncated.
  2. Multiple project rules files are supported. When describing, please use natural language description; parsing of images, links, etc. is not supported.

3. Configuring Rules

Method 1: Create in Settings

  1. Open CodeFlicker Settings

  2. Open Rules Settings

  1. Add Personal Rules: Click "Open" button - fill in content in the file
  2. Add Project Rules: Click "Add" button
    1. Enter rule filename - fill in content

  1. Open the rule file and fill in detailed rules