AI Rules & Project Conventions
Many teams set "engineering conventions that AI must always follow." In Tuanjie AI, you can achieve this through a combination of rules in configuration, project description files, and reusable prompts.
rules in Configuration
Use natural language to define rules within your project.
Maintain a CODELY.md file (or a consistent filename agreed upon by your team) in your repository, and reference relevant paths via @ in conversations to provide "architecture descriptions, prohibitions, directory responsibilities" to the model. When referencing files in the CLI, it will also try to attach CODELY.md from the directory chain—see Codely CLI.
In scenarios where you drive Tuanjie AI using YAML or other configuration files, you can use the rules list to write constraints into system messages, with support for automatically attaching rules when matching files via globs. For field descriptions and examples, see the rules section in the configuration reference.
Applicable scenarios:
- Project-wide coding standards (naming, error handling, Unity lifecycle conventions, etc.).
- Specialized rules that only apply to paths like
*.cs,*Tests/.
Reusable Prompts: Commands & Skills
- Custom Commands: Turn common prompts into
/command-name, supporting parameters and script injection. See Commands. - Skills (Experimental): Encapsulate domain capabilities, selected via
@in conversations. See Skills.
Relationship with "Prompt Basics"
For how to write clearer prompts in a single conversation, see Prompts. Rules and Commands address cross-session, cross-team consistency; prompt techniques address whether a single task is clearly communicated.