feat: Add review path instructions to .coderabbit.yaml#270
Conversation
Fixes #266 Signed-off-by: Richard Murillo <6811113+rjmurillo@users.noreply.github.com>
There was a problem hiding this comment.
Code Review
This pull request adds review path instructions to the .coderabbit.yaml configuration. However, it introduces a duplicate reviews key, which would cause the new instructions to be ignored. My feedback corrects this by merging the two reviews sections into one, ensuring the configuration is valid and both path_instructions and tools are correctly applied.
There was a problem hiding this comment.
Pull request overview
This PR adds path-specific review instructions to CodeRabbit's configuration for agent prompt files in the src/claude/ directory. The instructions define prioritized review criteria (P0, P1, P2) for agent prompts, including checks for required frontmatter, model assignments per ADR-002, and absolute paths in documentation.
Key Changes:
- Adds
path_instructionsconfiguration forsrc/claude/**/*.mdfiles with structured review criteria
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. 📝 WalkthroughWalkthroughAdds path-specific review instructions to Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~5 minutes Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.coderabbit.yaml (1)
25-28: Duplicatereviews:key breaks YAML parsing.YAML forbids duplicate keys. Parser fails at line 25, blocking all CodeRabbit functionality.
🔎 Fix: Merge both sections under one `reviews:` key
reviews: path_instructions: - path: "src/claude/**/*.md" instructions: | ## Agent Prompt Review Criteria ### P0 (Must Fix) - Missing required frontmatter - Model assignment violating ADR-002 - Absolute paths in documentation ### P1 (Should Fix) - Missing Core Identity section - Drift from VS Code/Copilot CLI versions Prefix all comments with: [P0], [P1], or [P2] - -reviews: tools: markdownlint: enabled: false
🧹 Nitpick comments (1)
.coderabbit.yaml (1)
11-24: Make criteria more specific to reduce false positives.The P0/P1 criteria need operational detail to hit the 80%+ actionability target from issue #266:
- "Missing required frontmatter" - list which fields (e.g.,
title,model,version)- "Model assignment violating ADR-002" - state the actual constraint (e.g., "must use claude-3.5-sonnet")
- "Drift from VS Code/Copilot CLI versions" - specify expected versions or reference location
Vague criteria generate false positives when reviewers can't verify compliance.
🔎 Example of more specific instructions
instructions: | ## Agent Prompt Review Criteria ### P0 (Must Fix) - - Missing required frontmatter + - Missing required frontmatter fields: model, version, compatibility - - Model assignment violating ADR-002 + - Model assignment must be claude-3.5-sonnet (per ADR-002) - - Absolute paths in documentation + - Documentation uses absolute paths (must be relative to repo root) ### P1 (Should Fix) - - Missing Core Identity section + - Missing ## Core Identity section in prompt - - Drift from VS Code/Copilot CLI versions + - Model version differs from versions in .vscode/settings.json Prefix all comments with: [P0], [P1], or [P2]Based on PR objectives to reduce false positives and increase actionability.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.coderabbit.yaml
🧰 Additional context used
📓 Path-based instructions (1)
.coderabbit.yaml
📄 CodeRabbit inference engine (.agents/analysis/QUICK-REFERENCE-CODERABBIT.md)
Configure CodeRabbit with tiered enforcement: 'Chill' profile for general code to reduce noise comments, and full enforcement for CI/CD files (
.github/workflows/*) and Git hooks (.githooks/*)
Files:
.coderabbit.yaml
🔍 Remote MCP Context7, DeepWiki
It appears the repository information provided in the context (rjmurillo/dotfiles) is not accessible or may be a private/test repository. Let me search for general information about CodeRabbit configuration best practices and review path instructions that would be relevant to reviewing this PR:Now let me search for information about reducing false positives in code review tools and signal quality improvements:Based on my research, I can now provide you with comprehensive context for reviewing PR #270:
Summary of Additional Context Found
CodeRabbit Path Instructions Configuration Context
Path-based instructions allow you to provide specific review guidelines based on file paths. This enables tailored feedback for different file types, technologies, or code areas. Path-based instructions are configured in the .coderabbit.yaml file under the reviews.path_instructions section.
Paths accept glob patterns. Add custom review instructions using path-based patterns or AST rules. Configure CodeRabbit to follow specific guidelines for different file types and enforce coding standards.
Best Practices for Path Instructions:
- Path Instructions and Code Guidelines serve different purposes. Many users mistakenly put guideline file names in path_instructions, which causes CodeRabbit to review the guideline files instead of using them as reference.
- Use path-based instructions when you want CodeRabbit to follow specific guidelines beyond standard reviews, such as enforcing style guides by file types or directories.
- Make sure your instructions are clear and understandable not only by the coderabbit but also by other developers. Ensure that you use the correct file path to ensure the appropriate review.
P0/P1 Priority Framework Context
The PR references establishing a P0/P1/P2 priority framework for review comments. Industry standards define these as:
P0 (Critical/Must Fix): P0s represent the highest priority items to be completed – a P0 is something so critical that you would hold the release to include or fix it. P0 represents system outage, or system down, or service unavailable to all users, which is business critical. Requires 24/7 response.
P1 (Should Fix): P1 stands as a high-priority level, second only to the critical urgency of P0. P1 tasks are significant. They're like warning lights on your car's dashboard; ignore them, and you're in for a world of trouble, but you don't have to pull over this instant. These issues can affect the project's progress or user experience but typically don't cause a complete breakdown of functionality.
CWE-Specific Security Patterns Context
Unlike CVE (Common Vulnerabilities and Exposures), which documents specific, real-world vulnerabilities, CWE focuses on underlying flaws in code, architecture, or configuration that attackers often exploit. Maintained by the MITRE Corporation with support from industry partners and the U.S. Department of Homeland Security, the CWE project provides a standardized language and structure for identifying, discussing, and preventing common software errors across the development lifecycle.
Integrating CWE into an organization's SDLC allows for consistent tracking of recurring code issues, more accurate root cause analysis, and better communication between engineering and security teams.
Utilize CWE in Code Reviews. Beyond tools, have human reviewers check for CWE-specific weaknesses to ensure comprehensive security.
Reducing False Positives in Code Review
The bigger the context, the higher the chance of missing bugs, slowing reviews, or getting irrelevant AI comments. This aligns with the PR's goal to improve CodeRabbit's actionability rate from 50% to 80%+ by being more prescriptive and reducing false positives.
Markdown File Review Context
The PR targets Markdown documentation files (src/claude/**/*.md), which is appropriate for configuration documentation and guidelines. Markdown files in documentation paths typically require specific guidance around clarity, completeness, and adherence to documentation standards.
[::web_search::],,
Removed duplicate reviews section and adjusted indentation. Signed-off-by: Richard Murillo <6811113+rjmurillo@users.noreply.github.com>
Addresses Copilot review feedback: - Change "frontmatter" to "Front Matter" (matches agent-prompts.instructions.md) - Remove [P2] reference (only P0 and P1 are defined) Comment-IDs: 2641881985, 2641881988
Fixes #266
Pull Request
Summary
Specification References
.agents/planning/....agents/specs/...Spec Requirement Guidelines
feat:,feat(scope):).agents/planning/fix:,fix(scope):)refactor:,refactor(scope):)docs:)ci:,build:,chore:)Changes
Type of Change
Testing
Agent Review
Security Review
.agents/security/)Files requiring security review:
Other Agent Reviews
Checklist
Related Issues