Accessing Dashboard Rules
Navigate to your Dashboard settings:- Go to app.codeant.ai/settings/ai-rules
- Select Rules from the dropdown menu
- Click Add New to create a new custom rule
Creating Rules
Step 1: Select Repositories
Choose which repositories should apply this rule:- Use the search bar to find specific repositories
- Select multiple repositories using checkboxes
- All selected repositories will receive the same rule
Step 2: Configure Rule
Rule Description (Required)- Provide a clear, specific description of what this rule enforces
- Explain the reasoning behind the rule for team clarity
- Specify which files this rule applies to using glob patterns
- Click Add to include multiple patterns
- Use minimatch syntax for pattern matching
Rule Categories
Code Quality Rules
No Console Logs in Production:API and Architecture Rules
REST API Conventions:Pattern Examples
Common File Patterns
Pattern | Description |
---|---|
src/**/*.{js,ts} | All JavaScript/TypeScript in src |
**/*.test.* | All test files |
src/components/**/*.tsx | React components only |
!**/node_modules/** | Exclude dependencies |
{api,routes}/**/*.js | API and route files |
src/{models,entities}/**/* | Data models |
**/*.{css,scss,less} | Stylesheets |
src/utils/**/*.ts | Utility functions |
Advanced Patterns
Pattern | Description | |
---|---|---|
`src/**/!(*.test | .spec).` | Source files excluding tests |
**/*.{config,conf}.{js,ts} | Configuration files | |
{src,lib,app}/**/*.ts | Multiple source directories | |
**/*{Controller,Service,Repository}.* | Specific class types | |
src/**/*.{gql,graphql} | GraphQL files |