chore: configure dual-mode AI code review#1511
Conversation
📝 WalkthroughWalkthroughThis pull request adds a centralized code review ruleset at Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Before merging this branch in we need to install Augment Code Review in this repo. |
There was a problem hiding this comment.
Actionable comments posted: 8
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (3)
.coderabbit.yaml (3)
16-16:⚠️ Potential issue | 🟠 MajorMisleading comment contradicts actual behavior.
The comment says "always review the whole PR, not just new commits" but
auto_incremental_review: falseactually means CodeRabbit will NOT automatically re-run reviews on new commits pushed to the PR. It doesn't control whether the review covers the "whole PR" vs "partial" — it controls whether reviews trigger on subsequent pushes.If you want full-PR reviews on every push, you'd want
auto_incremental_review: true, notfalse.
19-20:⚠️ Potential issue | 🟡 MinorIncomplete path_filters — missing .augment exclusion.
The
path_filtersexcludes only**/node_modules/**, but.gitignoreandeslint.config.mjsin this same PR explicitly handle.augment/**. If CodeRabbit should ignore the Augment config directory (which contains AI review guidelines that shouldn't be recursively reviewed), this filter is incomplete.Proposed fix
path_filters: - "!**/node_modules/**" + - "!.augment/**"
11-11:⚠️ Potential issue | 🟡 MinorInvalid configuration property
walkthrough.The property
walkthroughdoes not exist in the CodeRabbit schema. This configuration will be silently ignored, meaning whatever behavior you intended is still active by default.Did you mean one of these existing properties?
collapse_walkthrough(boolean, collapses the walkthrough section in reviews)high_level_summary_in_walkthrough(boolean, controls whether the high-level summary appears in the walkthrough)
🤖 Fix all issues with AI agents
In @.augment/code_review_guidelines.yaml:
- Around line 164-166: The rule with id "path_placeholders_required" uses
inconsistent placeholder formats ({project-root}, {installed_path},
{output_folder}) which conflicts with the templates guidance that allows
{variable_name} or {{variable_name}}; update the rule and the templates section
to one canonical placeholder convention (recommend {variable_name} with
underscores) and make all occurrences match that style (e.g., change
{project-root} to {project_root}), and clarify whether single or double braces
are allowed by choosing one and updating the templates and any references to use
that single standard consistently.
- Around line 82-84: The rule "step_goal_required" is ambiguous because it
permits three different formats (## STEP GOAL, ## YOUR TASK, or step n='X'
goal='...'); update the rule's description to mandate a single canonical format
(choose one, e.g., "## STEP GOAL") and remove the other two options from the
allowed list, then add a brief example and a note about when to use that format;
locate the rule by id "step_goal_required" and modify its description string to
explicitly state the required format and include one concrete example so
validators and authors have no ambiguity.
- Around line 5-17: The file_paths_to_ignore list is missing several patterns
present in eslint.config.mjs and uses an overly specific CHANGELOG entry; update
the file_paths_to_ignore key to add the missing patterns (_bmad/**, _bmad*/**,
website/**, z*/**, .claude/**, .codex/**, sample-project/**, .bundler-temp/**)
or explicitly document why Augment should differ from eslint.config.mjs, and
broaden the changelog/historic ignore entries (e.g., match CHANGELOG.* and
HISTORY.*) so the ignore set is consistent and maintainable; reference the
file_paths_to_ignore block and eslint.config.mjs when making these edits.
- Around line 237-238: The glob "tools/**" is too broad for the rule set (it
applies script_error_handling to non-executable files); update the glob to
target only executable script types or add file-type specific rules: replace
"tools/**" with narrower patterns such as "tools/**/*.sh", "tools/**/*.py", and
"tools/**/*.pl" (or a single executable-only pattern if supported) or split the
rules section to apply "script_error_handling" only under those specific globs
and create separate rules for other file types; ensure you update the "rules"
mapping to reference the narrower glob(s) and retain the "script_error_handling"
rule name as-is.
- Around line 206-207: The two glob patterns "src/**/template*.md" and
"src/**/templates/**/*.md" overlap (e.g., src/foo/templates/template-foo.md) so
make them mutually exclusive by adding an exclusion rule: keep
"src/**/templates/**/*.md" for templates directories and change the other set to
exclude files under any templates folder (e.g., add a negation like
"!src/**/templates/**/template*.md" or equivalent) so that "src/**/template*.md"
no longer matches files inside "templates/" directories.
In @.coderabbit.yaml:
- Around line 24-31: The instruction block in .coderabbit.yaml contains
contradictory and problematic directives: remove or rephrase the insulting
phrase "clueless weasel", replace the quota mandate "Find at least 10 issues"
with a quality-focused guideline (e.g., "Find substantive issues as present"),
and reconcile tone by keeping the professional mandate "no profanity or personal
attacks"; update the escape hatch line (e.g., the "re-analyze — this is
suspicious" text) to clarify when re-analysis is appropriate rather than
prompting noise. Locate and edit the offending strings ("clueless weasel", "no
profanity or personal attacks", "Find at least 10 issues", "re-analyze — this is
suspicious") so the block enforces a skeptical but professional review without
quotas or insults.
In @.gitignore:
- Around line 45-46: The .gitignore entry uses the fragile pattern ".augment/*"
with an exception for "!.augment/code_review_guidelines.yaml" which will
silently ignore any new files added to .augment; update this by either
documenting intent with a comment above those lines or replacing the pattern
with an explicit allowlist (e.g., list each allowed file instead of a blanket
wildcard) so new files won't be silently excluded, and reconcile the
inconsistency with eslint.config.mjs (which ignores ".augment/**") by aligning
the ignore behavior there (remove or adjust the .augment/** rule or explicitly
whitelist the same code_review_guidelines.yaml in eslint.config.mjs) to ensure
both ignore configs are consistent.
In `@eslint.config.mjs`:
- Around line 39-40: The inline comment above the ignore pattern '.augment/**'
is misleading (it references "Augment Code Review config uses underscores per
their spec" while the pattern uses a dot prefix and the underscores in
code_review_guidelines.yaml are unrelated); update the comment to accurately
describe the pattern or remove it entirely—locate the string '.augment/**' in
eslint.config.mjs and either delete the incorrect comment or replace it with a
short accurate note (e.g., "ignore Augment workspace files" or similar) so the
comment matches the actual ignore pattern.
🧹 Nitpick comments (3)
eslint.config.mjs (1)
14-16: Redundant ignore patterns.
'test/template-test-generator/**'on line 14 already covers all files recursively, making lines 15-16 (**/*.jsand**/*.mdwithin the same directory) completely redundant. The**glob matches all nested files regardless of extension.Proposed cleanup
'test/template-test-generator/**', - 'test/template-test-generator/**/*.js', - 'test/template-test-generator/**/*.md', 'test/fixtures/**', - 'test/fixtures/**/*.yaml',.augment/code_review_guidelines.yaml (2)
119-121: Rulehalt_before_menuis unverifiable.This rule requires steps with menus to "HALT and wait for response" but there's no way to statically verify that an AI agent actually halts. This is a runtime behavior that depends on the LLM's interpretation of the workflow, not something that can be validated by scanning file contents.
This rule belongs in agent execution documentation, not in a code review validation config.
1-3: Missing config version field.Configuration files that evolve over time should include a version field to support backward compatibility and migration. This file has no
versionorschema_versionfield, making it difficult to handle breaking changes in the future.Proposed addition
# Augment Code Review Guidelines for BMad-CORE # https://docs.augmentcode.com/codereview/overview # Focus: Workflow validation and quality +version: "1.0" file_paths_to_ignore:
Add documentation comment to .gitignore explaining the .augment/* exception pattern, and replace misleading eslint comment about "underscores per their spec" with accurate description of vendor config directory exclusion. Addresses CodeRabbit findings F10 and F11 from PR bmad-code-org#1511 review. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Expand path exclusions in both PR review tools to a shared baseline: - Mutual config exclusions (each tool ignores its own and others configs) - Build output, vendored/generated files, package metadata, binary/media - Test fixtures, non-project dirs, AI assistant dirs, build temp - Generated reports CodeRabbit goes from 1 exclusion to 32; Augment from 12 to 32. ESLint already had comprehensive ignores and is unchanged. Addresses CodeRabbit findings F2 and F4 from PR bmad-code-org#1511 review. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
17ad5cd to
966b429
Compare
|
@CodeRabbit review |
✅ Actions performedReview triggered.
|
🤖 Augment PR SummarySummary: Configures dual-mode AI code review for this repo by adding Augment “audit mode” guidelines and updating CodeRabbit to an “adversarial mode” persona. Changes:
Technical Notes: Augment rules emphasize step sequencing/JIT loading and explicit HALT behavior for user prompts/menus; CodeRabbit relies on 🤖 Was this summary useful? React with 👍 or 👎 |
Add Augment Code Review (audit mode) and CodeRabbit (adversarial mode): Augment (.augment/code_review_guidelines.yaml): - Workflow structure and step validation rules - Agent definition validation - Path placeholder enforcement - JIT loading and HALT requirements CodeRabbit (.coderabbit.yaml): - Raven-style adversarial reviewer persona - Finds logical contradictions and missing implementations - No rule anchoring - reasons freely Supporting changes: - .gitignore: exclude .augment/ from ignore - eslint.config.mjs: ignore .augment/ directory fix: clarify .augment gitignore pattern and eslint comment Add documentation comment to .gitignore explaining the .augment/* exception pattern, and replace misleading eslint comment about "underscores per their spec" with accurate description of vendor config directory exclusion. Addresses CodeRabbit findings F10 and F11 from PR bmad-code-org#1511 review. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> fix: remove redundant eslint ignore patterns The broader glob patterns (dir/**) already match all files recursively, making the more specific sub-patterns (dir/**/*.js, dir/**/*.md, etc.) completely redundant. Similarly, _bmad*/** already covers _bmad/**. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> fix: synchronize ignore baselines across CodeRabbit and Augment configs Expand path exclusions in both PR review tools to a shared baseline: - Mutual config exclusions (each tool ignores its own and others configs) - Build output, vendored/generated files, package metadata, binary/media - Test fixtures, non-project dirs, AI assistant dirs, build temp - Generated reports CodeRabbit goes from 1 exclusion to 32; Augment from 12 to 32. ESLint already had comprehensive ignores and is unchanged. Addresses CodeRabbit findings F2 and F4 from PR bmad-code-org#1511 review. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> fix: correct project name in Augment review guidelines fix: remove instruction that explicitly encourages false positives
075d22d to
5c87801
Compare
Add Augment Code Review (audit mode) and CodeRabbit (adversarial mode):
Augment (.augment/code_review_guidelines.yaml):
CodeRabbit (.coderabbit.yaml):
Supporting changes: