Skip to content

chore: configure dual-mode AI code review#1511

Merged
bmadcode merged 1 commit intobmad-code-org:mainfrom
alexeyv:chore/dual-mode-code-review
Feb 7, 2026
Merged

chore: configure dual-mode AI code review#1511
bmadcode merged 1 commit intobmad-code-org:mainfrom
alexeyv:chore/dual-mode-code-review

Conversation

@alexeyv
Copy link
Copy Markdown
Collaborator

@alexeyv alexeyv commented Feb 2, 2026

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

@alexeyv alexeyv marked this pull request as draft February 2, 2026 10:06
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Feb 2, 2026

📝 Walkthrough

Walkthrough

This pull request adds a centralized code review ruleset at .augment/code_review_guidelines.yaml and updates reviewer instructions, ignore patterns, and ESLint exclusions to integrate that ruleset into the repository's tooling and review behavior.

Changes

Cohort / File(s) Summary
Augment Framework
.augment/code_review_guidelines.yaml
Adds a comprehensive YAML ruleset defining validation rules across workflow structure, workflow definitions, sharded steps, XML workflows, content quality, agent definitions, templates, documentation, and build tooling (many rules with IDs and severity levels).
Reviewer Configuration
.coderabbit.yaml
Replaces prior reviewer guidance with an aggressive reviewer persona instructing extreme skepticism and requiring identification of >=10 issues; removes earlier split guidance and prohibits formatting/lint comments.
Ignore / Linting
.gitignore, eslint.config.mjs
Changes .gitignore to ignore .augment/* but explicitly re-include .augment/code_review_guidelines.yaml; adds .augment/** to ESLint ignore patterns to align tooling with the new augment config.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • bmadcode
  • pbean
  • muratkeremozcan
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'chore: configure dual-mode AI code review' clearly and concisely summarizes the main change—setting up two AI code review configurations (Augment and CodeRabbit).
Description check ✅ Passed The description is directly related to the changeset, detailing the specific configurations added (Augment audit mode and CodeRabbit adversarial mode) and supporting file changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@alexeyv
Copy link
Copy Markdown
Collaborator Author

alexeyv commented Feb 2, 2026

Before merging this branch in we need to install Augment Code Review in this repo.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 | 🟠 Major

Misleading comment contradicts actual behavior.

The comment says "always review the whole PR, not just new commits" but auto_incremental_review: false actually 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, not false.


19-20: ⚠️ Potential issue | 🟡 Minor

Incomplete path_filters — missing .augment exclusion.

The path_filters excludes only **/node_modules/**, but .gitignore and eslint.config.mjs in 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 | 🟡 Minor

Invalid configuration property walkthrough.

The property walkthrough does 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 (**/*.js and **/*.md within 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: Rule halt_before_menu is 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 version or schema_version field, 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:

@alexeyv alexeyv marked this pull request as ready for review February 6, 2026 19:22
@alexeyv alexeyv marked this pull request as draft February 6, 2026 21:03
alexeyv added a commit to alexeyv/BMAD-METHOD that referenced this pull request Feb 7, 2026
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>
alexeyv added a commit to alexeyv/BMAD-METHOD that referenced this pull request Feb 7, 2026
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>
@alexeyv alexeyv force-pushed the chore/dual-mode-code-review branch from 17ad5cd to 966b429 Compare February 7, 2026 07:16
@alexeyv alexeyv marked this pull request as ready for review February 7, 2026 07:24
@alexeyv
Copy link
Copy Markdown
Collaborator Author

alexeyv commented Feb 7, 2026

@CodeRabbit review

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Feb 7, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@augmentcode
Copy link
Copy Markdown

augmentcode bot commented Feb 7, 2026

🤖 Augment PR Summary

Summary: Configures dual-mode AI code review for this repo by adding Augment “audit mode” guidelines and updating CodeRabbit to an “adversarial mode” persona.

Changes:

  • Added .augment/code_review_guidelines.yaml defining ignored paths plus rule sets for workflow structure, step files, XML workflows/tasks, content quality, agent definitions, templates, documentation, and build tooling.
  • Updated .coderabbit.yaml with an expanded set of path_filters exclusions and replaced prior review instructions with a highly skeptical reviewer persona.
  • Adjusted .gitignore to ignore .augment/ contents while explicitly tracking the new Augment guidelines file.
  • Updated eslint.config.mjs ignores to exclude .augment/** from linting and simplified some fixture/template ignore entries.

Technical Notes: Augment rules emphasize step sequencing/JIT loading and explicit HALT behavior for user prompts/menus; CodeRabbit relies on path_filters to skip non-project and generated content.

🤖 Was this summary useful? React with 👍 or 👎

Copy link
Copy Markdown

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 3 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

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
@alexeyv alexeyv force-pushed the chore/dual-mode-code-review branch from 075d22d to 5c87801 Compare February 7, 2026 15:13
@bmadcode bmadcode merged commit 4c36c94 into bmad-code-org:main Feb 7, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants