Tell Augment Code Review to check specific areas with guidelines
Some domain knowledge cannot be inferred from code alone. Tell Augment Code Review exactly what to check by adding custom guidelines. Guidelines are most relevant for repositories that contain multiple distinct domains and should be captured as custom review guidelines. Tell Augment Code Review to check specific areas like security vulnerabilities or inside particular directories when relevant. Augment Code Review allows you to outline these special guidelines per repository. Describe any areas of focus using a yaml file entitled code_review_guidelines.yaml inside the .augment folder at the repository root:<repo-root>/.augment/code_review_guidelines.yaml
Scope guidelines to the appropriate sub-directories and focus on objective issues that can cause bugs, expose vulnerabilities, etc. and less on stylistic or subjective things. Augment Code Review uses a unique yaml file instead of relying on markdown guideline files like Agents.md, etc. because it allows the agent to cite a guideline if it was used for a particular comment, and compute per-guideline analytics.
Example Augment Code Review Guidelines
For a complete working example, see the Code Review Best Practices repository.Common globs or pattern matching syntax:
**- Matches any number of directories (recursive wildcard)- Example:
**/test.pymatchestest.py,src/test.py,src/utils/test.py, etc.
- Example:
*- Matches any sequence of characters within a single directory level- Example:
*.pymatchesfile.py,main.pybut notsrc/main.py
- Example:
?- Matches exactly one character- Example:
test?.pymatchestest1.py,testA.pybut nottest10.py
- Example:
- Rules: Areas can contain more than one rule. Each rule contains:
- ID: Double quoted unique identifier
- Description: Double quoted message summarizing intent of the rule
- Severity: Expects double quoted “high”, “medium” or “low”. Sets the priority of review by Augment Code Review
Referencing Existing Rules Files
You can add a custom rule that references an existing rules file (likeAgents.md) to incorporate those guidelines into your code review process. This allows you to reuse existing documentation and standards without duplicating content.
However, it is recommended to use the YAML format to track guidelines, as this enables Augment Code Review to cite specific guidelines in comments and compute per-guideline analytics.
Files Automatically Skipped During Review
Augment Code Review automatically skips certain file types that are not typically code files. This helps focus the review on meaningful code changes and avoids wasting time on binary files, generated content, and other non-reviewable assets.File Extensions Automatically Ignored
File Extensions Automatically Ignored
The following file extensions are automatically skipped during code review:Archive files:
.bz2,.gz,.xz,.zip,.7z,.rar,.zst,.tar,.jar,.war,.nar
.ico,.svg,.jpeg,.jpg,.png,.gif,.bmp,.tiff,.webm
.ttf,.otf,.woff,.woff2,.eot
.pdf,.doc,.docx,.xls,.xlsx,.ppt,.pptx
.csv,.tsv,.dat,.db,.parquet
.DS_Store,.tags
.cscope.files,.cscope.out,.cscope.in.out,.cscope.po.out
.log,.map,.out,.sum,.work,.md5sum
.tga,.dds,.psd,.fbx,.obj,.blend,.dae,.gltf
.hlsl,.glsl
.unity,.umap,.prefab,.mat,.shader,.shadergraph,.sav,.scene,.asset
.pyc,.pyd,.pyo,.pkl,.pickle
.pb.go,.pb.gw.go
.tfstate,.tfstate.backup
.min.js,.min.js.map,.min.css
.lock,.lockb,.lockfile
.trace,.dump
.bak,.backup
.sql.gz
File Patterns Automatically Ignored
File Patterns Automatically Ignored
In addition to specific extensions, the following file patterns are also skipped:
*lock.json,*lock.yaml,*lock.yml- Lock files with specific patternsgo.sum- Go module checksum files*.bundle.js,*.chunk.js- JavaScript bundle files**/generated/**,**/*.generated.*- Generated files*_snapshot.json- Snapshot files
Customizing Files to Skip
You can add additional files or paths to skip during code review by specifying them in your custom guidelines file. This is useful for repository-specific generated files, large data files, or other content that shouldn’t be reviewed.Adding Custom File Paths to Ignore
Use thefile_paths_to_ignore section in your code_review_guidelines.yaml file. This field supports doublestar glob patterns for flexible matching.
Complete Example with Custom Ignores
Complete Example with Custom Ignores