Documentation
Rules and Learnings
Use rules to guide review behavior and use learnings to preserve team preferences from real code review conversations.
Rule design principles
- Prefer explicit outcomes over vague style preferences.
- Keep each rule focused on one engineering concern.
- Use examples in rule content when behavior is nuanced.
Global rules
- Apply to every connected repository.
- Best for cross-team standards such as security or architecture.
- Support optional file patterns to target code subsets.
Repository rules
- Apply only to a specific repository.
- Useful for framework-specific conventions or service-specific guard rails.
- Can coexist with global rules for layered behavior.
How rule resolution works
- Global rules provide baseline review behavior.
- Repository rules add local context for that codebase.
- File patterns narrow scope to matching files only.
- Inactive rules are ignored until re-enabled.
Learning extraction workflow
- Trevyn posts a comment on a PR.
- You reply with context, correction, or preference.
- Trevyn extracts a reusable learning with source reference.
- Active learnings influence future review suggestions.
Best practices
- Keep rule titles short and explicit.
- Write one concern per rule for easier evolution.
- Disable stale learnings instead of deleting immediately.
- Review active learnings monthly with your team.
- Promote repeated learnings into formal rules when stable.