Severity levels
| Severity | Effect |
|---|---|
block | Prevents the PR from merging until the issue is resolved |
warn | Posts a comment but allows the merge to proceed |
info | Informational comment only — no action required |
Creating your first rule
Add rules in the rules block
Expand your configuration to include specific rule definitions. Each rule has a name, a description in plain English, and a severity level.The
exceptions field accepts glob patterns. Files matching those paths are excluded from that rule — useful for known legacy code you aren’t ready to migrate.Set severity for each rule
Choose
block, warn, or info for each rule category based on how critical violations are for your codebase. Start conservative — you can tighten severity as your team builds confidence in the rules.Rule examples
These are real rule categories Autter enforces out of the box and through custom configuration:| Rule | Category | Example |
|---|---|---|
| Detect security vulnerabilities | Security | SQL injection, XSS, insecure deserialization |
No direct process.env access | Security | Environment variables must be accessed through the config module |
| Require error boundaries | Reliability | React components that render dynamic data need error boundaries |
| Deprecated API usage | Conventions | AI used legacy.createUser() instead of auth.register() |
| N+1 query detection | Performance | Queries inside loops that should use findMany with in |
Full configuration example
- Blocks merges when security vulnerabilities or deprecated API usage (outside
legacy/**) are detected - Warns when performance anti-patterns are found — the PR can still merge
- Notes convention violations informally without blocking or warning
Convention detection
Autter can learn your existing conventions automatically by analysing your merge history. Runnpx autter init --learn on an established repository and Autter builds a convention model from your merged PRs — no manual rule authoring needed.
Convention catalogue
After runningnpx autter conventions list, you’ll see a table of detected conventions with their compliance rates across your codebase:
Gradual adoption
You don’t need to configure everything on day one. A common adoption path:- Start with
severity: warnon all rule categories — no merges blocked, just visibility - Review Autter’s findings over a sprint to calibrate which rules matter most
- Promote the highest-value rules to
severity: block - Expand rule coverage as your team builds confidence
Next steps
Configuration overview
See all available configuration options for rules, pipeline steps, and file exclusions.
Rules reference
Full reference for rule types, severity options, and exception patterns.
Team Onboarding
Use detected conventions to accelerate new developer onboarding.
Code Review
Learn how Autter’s review engine works under the hood.
