feat: extend ADR detection with additional directory paths and CLAUDE.md partial credit#419
Conversation
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Enterprise Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
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 |
5c03fd6 to
77efebe
Compare
77efebe to
8440e83
Compare
8440e83 to
0461eb2
Compare
3cde9f1 to
3667f0b
Compare
0461eb2 to
960e005
Compare
11a6b86 to
0455d49
Compare
91aa5a4 to
fd2be32
Compare
- architecture_decisions: recognize docs/architecture/, docs/design/, docs/specs/, and specs/ in addition to docs/adr/ variants (closes #414) - architecture_decisions: award 60/100 partial credit when CLAUDE.md or AGENTS.md contains an architecture section or external ADR repo link, with full credit still requiring an inline directory (closes #392) - docs/attributes.md: full write-up for architecture_decisions replacing the one-liner, including scoring table, recognized paths, and partial credit explanation - docs/attributes.md: note GNUmakefile/makefile variants in one_command_setup Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
0455d49 to
2a38344
Compare
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
📈 Test Coverage Report
Coverage calculated from unit tests only |
🤖 AgentReady Code ReviewPR Status: 4 issues found (0 🔴 Critical, 2 🟡 Major, 2 🔵 Minor) 🟡 Major Issues - Manual Review Required1. Partial-credit regex triggers on structural headings, not just ADR summariesAttribute: Validated against two real repos assessed on the PR branch vs
Neither repo has any ADRs. The false positive is triggered solely by the The root issue is in section_header = re.compile(
r"^#{1,3}\s.*(architecture|decision|adr|rfc|design)",
re.IGNORECASE | re.MULTILINE,
)Suggested fix: require a more specific phrase rather than the bare word "architecture": section_header = re.compile(
r"^#{1,3}\s.*(architecture.decision|architectural.decision|adr|decision.record|rfc)",
re.IGNORECASE | re.MULTILINE,
)Or: require both section heading AND an external link before awarding partial credit (removing the 2.
|
…nal link Removes false positives where a bare ## Architecture heading (common in CLAUDE.md for describing codebase layout) triggered 60-point partial credit with no actual ADR documentation present. Also removes unused adr_keywords variable, fixes error message to include docs/design/ in checked path list, and adds tests covering section-only, link-only, and keyword-only cases. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Thanks for the review. Here's how each issue was addressed: #1 (Major) — Partial-credit gate too broad: Fixed. Changed the condition #2 (Major) — External link regex matches generic URLs: Left as-is. With the #3 (Minor) — Error message missing #4 (Minor) — Missing keyword-only test: Fixed. Added Replied by Claude Code under the supervision of Bill Murdock. |
|
Re-ran the two false-positive repos against the updated branch (
Both false positives are resolved. The AND gate ( Reviewed with Claude Code under the supervision of Bill Murdock. |
|
🎉 This PR is included in version 2.37.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Summary
Smarter path matching (ADR check: support additional directory paths (specs/, docs/design/, etc.) #414): splits ADR detection into two name sets.
`docs_target_names` (broader, used under `docs/`) covers `architecture/`,
`design/`, `specs/`, and the existing `adr/` family. `root_target_names`
(narrower, used at repo root) excludes `architecture/` and `design/` to
avoid false positives from common top-level directories.
CLAUDE.md/AGENTS.md partial credit (architecture_decisions: credit ADR summaries in CLAUDE.md/AGENTS.md as a compliance path #392): when no inline ADR directory
exists, the assessor awards 60/100 if `CLAUDE.md` or `AGENTS.md` contains
an architecture/decisions section heading or a link to an external ADR/RFC
repo. Full credit still requires an inline directory.
Docs: `docs/attributes.md` entry for `architecture_decisions` expanded
with a scoring table, recognized path list, and partial credit explanation.
Tests
31 tests in `tests/unit/test_doc_scoring_precision.py`, including 18 new ones
covering extended path variants (including case variants and hidden `.adr/`),
CLAUDE.md/AGENTS.md section detection, external link detection, and
inline-directory-takes-priority behavior.
Closes #414, #392
🤖 Generated with Claude Code under the supervision of Bill Murdock