Create Project _ Source Code Rules
Introduction
On the source code generation step page when creating a project, you can choose custom rules for generating source code. If none are selected, the default rule file will be used to generate the source code.
Create Project _ Source Code Rules
- Click "Rules", then click "Add Rule File" to create a new rule.


- Select scope, enter rule name, select type, and input other field information.
Description:
- Scope: Project rules are effective only for this project, with rule files stored under .feisuan/rule. Global rules apply to all projects.
- Model Decision: The model autonomously decides whether to use this rule based on the rule description and requirements, without user selection. Note that rule effectiveness depends on the description content, so please describe clearly.
- Always Effective: This rule will always take effect, meaning the rule will be applied every time a request is made to generate corresponding content, without user selection.
- Effective for Specified Files: The rule will automatically retrieve files that match the user-specified file matching patterns (such as .java, src/*/.ts) and apply the rule, without user selection.
- Manual Import: Manually select the rule file to take effect from the dropdown list.

- Customize and edit your source code generation rules in the editing area.
Description: For rule content and style, please refer to the information in the default template.

- Simply select the rule you just added, and the generated source code will be created according to your rules.
Description: The model has instability, and the generated source code rules may not necessarily be written in the way defined by the rules. If the output does not follow the rule requirements, please readjust the rules and try again. At the same time, multiple rule files can be selected, allowing you to choose multiple different rule files for constraints simultaneously.

