Rules
Custom rule configuration and management for AIRGAP Assistant
Overview
Rules are configuration files that control the AI assistant's behavior to match your project needs. By defining coding conventions, prohibited patterns, response formats, and more in a .airgaprules file, the AI will follow them as it works.
Rule File Location
Rules can be set at two scopes.
| Scope | File Location | Applies To |
|---|---|---|
| Project Rules | .airgaprules at the project root | Current project only |
| Global Rules | Custom Instructions in AIRGAP Assistant settings | All projects |
When both project and global rules exist, both are applied. In case of conflicts, project rules take precedence.
Rule File Format
The .airgaprules file is written in markdown format. Write rules in natural language and the AI will understand and follow them.
# Project Rules
## Coding Conventions
- Use TypeScript. Do not create JavaScript files.
- Use camelCase for function names, PascalCase for type names.
- Write JSDoc comments for all functions.
## Prohibited Patterns
- Do not leave console.log in production code.
- Do not use the any type.
- Do not write code that makes external network requests.
## Response Format
- Summarize changes when modifying code.
- Specify the file's purpose in a comment when creating files.
Enabling and Disabling Rules
You can toggle rule files individually in the AIRGAP Assistant settings panel.
- Click the settings icon at the top of the AIRGAP Assistant panel.
- Check the detected rule files list in the Rules section.
- Use the toggle switch next to each rule to enable/disable it.
Tip: Temporarily disabling a rule reverts the AI to its default behavior. Since you don't need to delete the rule file, this is useful for experimental work.
Useful Rule Examples
Air-Gap Environment Rules
# Air-Gap Security Rules
- Do not use external CDN links. Serve all resources locally.
- Do not include fetch, axios, or other network request library calls.
- Do not write code that references API keys in environment variables.
Korean Language Project Rules
# Korean Language Project
- Write comments and documentation in Korean.
- Use English for variable and function names, but write JSDoc in Korean.
- Write error messages in Korean when they are displayed to users.
Related Documentation
- Workflows - Automation workflow settings
- Hooks - Event hook settings
- Tips & Tricks - AI assistant usage tips