Skip to content

refactor: remove redundant assessors, realign tiers, rebalance weights#464

Open
jwm4 wants to merge 2 commits into
mainfrom
refactor/remove-redundant-assessors-458
Open

refactor: remove redundant assessors, realign tiers, rebalance weights#464
jwm4 wants to merge 2 commits into
mainfrom
refactor/remove-redundant-assessors-458

Conversation

@jwm4
Copy link
Copy Markdown
Contributor

@jwm4 jwm4 commented May 21, 2026

Summary

  • Remove 4 redundant/stub assessors: RepomixConfig, CodeSmells, BranchProtection, ConciseDocumentation (freeing 6.5% weight)
  • Move DesignIntent from T3 to T2 and ProgressiveDisclosure from T4 to T3 per BP alignment
  • Redistribute freed 4% to test_execution (+2%) and type_annotations (+2%), the highest-evidence T1 attributes
  • New tier totals: 59/27/12/2 (was 55/27/14/4), 24 attributes (was 28)

Implements Proposals C and E from the accepted ADR.

Self-score change: 80.0 Gold -> 74.2 Silver (heavier T1 weighting exposes this repo's test coverage gap at 37%).

Related issues

This is the first of six implementation PRs for the ADR:

  1. This PR - Remove redundant assessors, realign tiers, rebalance weights (Remove redundant assessors, realign tiers, rebalance weights (ADR C.1-4, E.1-2) #458)
  2. Context file assessor improvements (Context file assessor improvements (ADR A.1, A.9, A.4) #459)
  3. Test assessor enhancements (Test assessor enhancements (ADR A.2, A.3) #460)
  4. Enforcement and intent assessor improvements (Enforcement and intent assessor improvements (ADR A.5, A.8) #461)
  5. Code quality assessor enhancements (Code quality assessor enhancements (ADR A.6, A.7) #462)
  6. New assessors for architectural boundaries and threat models (New assessors for architectural boundaries and threat models (ADR B.1, B.2) #463)

Test plan

  • black . && isort . && ruff check . passes
  • pytest tests/unit/ passes (1064 passed, 17 skipped)
  • agentready assess . runs successfully (74.2/100 Silver)
  • Grep for stale references to removed attribute IDs (all cleaned up)
  • Example config, review formatter, and e2e tests updated

Closes #458

Posted by Bill Murdock with assistance from Claude Code.

Summary by CodeRabbit

  • Refactor

    • Assessment framework adjusted to 25 attributes with new tier weights: 59% / 27% / 12% / 2%
    • Reorganized attribute tier assignments and removed several previously-scored checks
  • New Features

    • Added inline documentation assessment for Python and Go repositories
  • Documentation

    • Updated attribute reference docs and default weight configuration; self-score updated 80.0 → 74.2
  • Tests

    • Removed tests covering the removed checks and related integrations

Remove 4 assessors per accepted ADR (Proposals C and E):
- RepomixConfigAssessor (T3, 2%): single-vendor, not universal
- CodeSmellsAssessor (T4, 1%): redundant with complexity/size/SoC
- BranchProtectionAssessor (T4, 0.5%): perpetual stub
- ConciseDocumentationAssessor (T2, 3%): redundant with length/size

Move 2 assessors between tiers:
- DesignIntentAssessor: T3 (2%) -> T2 (3%)
- ProgressiveDisclosureAssessor: T4 (1%) -> T3 (2%)

Redistribute freed 4% to highest-evidence T1 attributes:
- test_execution: 10% -> 12%
- type_annotations: 8% -> 10%

New tier totals: 59/27/12/2 (was 55/27/14/4), 24 attributes (was 28).
Self-score: 74.2 Silver (was 80.0 Gold) due to heavier T1 weighting.

Closes #458

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 21, 2026

📝 Walkthrough

Walkthrough

Removes four assessors, replaces README conciseness with InlineDocumentationAssessor, reassigns two assessors across tiers, and updates default weights, config examples, docs, and tests to produce the v2.1.0 24-attribute set.

Changes

Assessor Set Consolidation and Tier Rebalancing

Layer / File(s) Summary
Assessor removals & factory update
src/agentready/assessors/__init__.py, src/agentready/assessors/code_quality.py
Remove CodeSmellsAssessor, RepomixConfigAssessor, BranchProtectionAssessor, and ConciseDocumentationAssessor from the factory and imports; rebuild create_all_assessors() composition to return the rebalanced set.
Inline documentation assessor & docs updates
src/agentready/assessors/documentation.py, docs/attributes.md, CLAUDE.md
Introduce InlineDocumentationAssessor (AST-based Python docstring + Go godoc coverage); update attribute-counts, per-tier lists, and CLAUDE self-score text.
Tier reclassification and tests
src/agentready/assessors/patterns.py, tests/unit/test_assessors_patterns.py
Reclassify DesignIntentAssessor to Tier 2 and ProgressiveDisclosureAssessor to Tier 3; update Attribute.default_weight values and test assertions to match.
Weight/config data updates
src/agentready/data/default-weights.yaml, src/agentready/data/.agentready-config.example.yaml, src/agentready/github/review_formatter.py
Update default-weights to v2.1.0 (Tier 1:59%, Tier 2:27%, Tier 3:12%, Tier 4:2%, 25→24 attributes reflected), adjust per-attribute weights and remove keyword mapping for repomix.
Tests and E2E adjustments
tests/e2e/test_critical_paths_simplified.py, tests/unit/test_assessors_go.py
Remove CodeSmells-related tests and imports; update E2E excluded-attribute example to container_setup and corresponding assertions.

Possibly related PRs

Suggested labels

released

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 73.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed Title follows Conventional Commits format (type: refactor, scope: absent, description present) and accurately summarizes the main changes: removing assessors, realigning tiers, and rebalancing weights.
Linked Issues check ✅ Passed All objectives from issue #458 are met: four redundant assessors removed [RepomixConfig, CodeSmells, BranchProtection, ConciseDocumentation]; tiers realigned [DesignIntent T3→T2, ProgressiveDisclosure T4→T3]; weights rebalanced in default-weights.yaml and docs updated; tests and configs revised.
Out of Scope Changes check ✅ Passed All changes directly support issue #458 objectives: assessor removals, tier migrations, weight rebalancing, documentation updates, test corrections, and configuration examples—no unrelated modifications detected.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/remove-redundant-assessors-458
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch refactor/remove-redundant-assessors-458

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.

@jwm4 jwm4 requested a review from kami619 May 21, 2026 18:53
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 21, 2026

📉 Test Coverage Report

Branch Coverage
This PR 72.8%
Main 73.7%
Diff ⚠️ -0.9%

Coverage calculated from unit tests only

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: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/agentready/assessors/__init__.py`:
- Line 63: The docstring in src/agentready/assessors/__init__.py incorrectly
states "24 attributes" but the actual tiered list sums to 25 (after adding
inline_documentation and removing repomix_config, code_smells,
concise_documentation, branch_protection); update that docstring to "25
attributes" and then make the same count correction wherever the old "24
attributes" text appears (src/agentready/data/default-weights.yaml,
docs/attributes.md, CLAUDE.md) so all references are consistent, or
alternatively remove one assessor if you intend to keep 24—ensure changes
reference the assessor names (e.g., inline_documentation) and the tier breakdown
in the same files.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 5d89c22c-4a2a-46f1-ae58-c7759266365f

📥 Commits

Reviewing files that changed from the base of the PR and between 871fe25 and f6791fe.

📒 Files selected for processing (16)
  • CLAUDE.md
  • docs/attributes.md
  • src/agentready/assessors/__init__.py
  • src/agentready/assessors/code_quality.py
  • src/agentready/assessors/documentation.py
  • src/agentready/assessors/patterns.py
  • src/agentready/assessors/repomix.py
  • src/agentready/assessors/testing.py
  • src/agentready/data/.agentready-config.example.yaml
  • src/agentready/data/default-weights.yaml
  • src/agentready/github/review_formatter.py
  • tests/e2e/test_critical_paths_simplified.py
  • tests/unit/test_assessors_code_quality.py
  • tests/unit/test_assessors_go.py
  • tests/unit/test_assessors_patterns.py
  • tests/unit/test_repomix.py
💤 Files with no reviewable changes (8)
  • tests/unit/test_repomix.py
  • tests/unit/test_assessors_code_quality.py
  • src/agentready/assessors/repomix.py
  • src/agentready/assessors/code_quality.py
  • tests/unit/test_assessors_go.py
  • src/agentready/assessors/documentation.py
  • src/agentready/github/review_formatter.py
  • src/agentready/assessors/testing.py

Comment thread src/agentready/assessors/__init__.py Outdated
branch_protection was never in default-weights.yaml (intentionally
omitted as a stub), so removing it from the code does not reduce the
weighted attribute count. 28 - 3 (concise_documentation, repomix_config,
code_smells) = 25.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jwm4
Copy link
Copy Markdown
Contributor Author

jwm4 commented May 21, 2026

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 21, 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.

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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/agentready/data/default-weights.yaml (1)

10-13: ⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift

Tier distribution conflicts with repository’s required default weights.

The updated config applies 59/27/12/2, but this repo’s policy for src/agentready/data/default-weights.yaml requires 55/27/15/3. This creates a compliance mismatch in the canonical scoring baseline and should be reconciled before merge.

As per coding guidelines: "src/agentready/data/default-weights.yaml: Use Tier weights from data/default-weights.yaml: Tier 1 (55%), Tier 2 (27%), Tier 3 (15%), Tier 4 (3%)."

Also applies to: 28-59

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/agentready/data/default-weights.yaml` around lines 10 - 13, Update the
tier weight percentages in src/agentready/data/default-weights.yaml so they
match the repository policy: set Tier 1 to 55%, Tier 2 to 27%, Tier 3 to 15%,
and Tier 4 to 3% (replace the current 59/27/12/2 values); also search the same
file for the duplicated tier-distribution block and update any other occurrences
to the same 55/27/15/3 values to keep the canonical scoring baseline consistent.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@src/agentready/data/default-weights.yaml`:
- Around line 10-13: Update the tier weight percentages in
src/agentready/data/default-weights.yaml so they match the repository policy:
set Tier 1 to 55%, Tier 2 to 27%, Tier 3 to 15%, and Tier 4 to 3% (replace the
current 59/27/12/2 values); also search the same file for the duplicated
tier-distribution block and update any other occurrences to the same 55/27/15/3
values to keep the canonical scoring baseline consistent.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: d4c35ecf-0757-4dd7-9617-c7398a511304

📥 Commits

Reviewing files that changed from the base of the PR and between f6791fe and ee504cb.

📒 Files selected for processing (4)
  • CLAUDE.md
  • docs/attributes.md
  • src/agentready/assessors/__init__.py
  • src/agentready/data/default-weights.yaml

Copy link
Copy Markdown
Contributor Author

@jwm4 jwm4 left a comment

Choose a reason for hiding this comment

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

Review: PR #464 — Remove redundant assessors, realign tiers, rebalance weights

Overall this is a clean, well-motivated PR. CI passes, all 1064 unit tests pass, and assessments run correctly on three sample repos (agentready self, Flask, FastAPI) with no crashes or unexpected behavior. A few items to address before merge:

1. Stale attribute count in docs/attributes.md

The fix commit (ee504cb) caught most "24 → 25" references but missed two in docs/attributes.md:

  • Line 6: Still says "all 28 agent-ready attributes" (should be 25)
  • Line 1167: Says "All 24 assessors" (should be "All 25 assessors")

2. Stale tier weights in CLAUDE.md

Lines 54-57 still show the old tier distribution (55/27/15/3) instead of the new one (59/27/12/2).

3. Self-score discrepancy: 74.2 claimed vs 73.3 observed

Running agentready assess . on the PR branch (detached HEAD at ee504cb, editable install) produces 73.3/100 Silver, not 74.2. Manual calculation confirms the scorer IS using the new YAML weights correctly (0.12 for test_execution, 0.10 for type_annotations), so this is not a weight loading issue. The difference must come from individual attribute scores. Can you reproduce 74.2 on a clean checkout of this branch?

4. Class-level default_weight not updated for reweighted attributes

The YAML weights for test_execution and type_annotations were updated (0.10 → 0.12 and 0.08 → 0.10), but the default_weight in the assessor classes was not:

  • src/agentready/assessors/testing.py:37 — still default_weight=0.10
  • src/agentready/assessors/code_quality.py:40 — still default_weight=0.08

The scorer uses the YAML value when present (line 135: weights.get(attr_id, finding.attribute.default_weight)), so scoring is correct. But the class values serve as fallbacks, appear in JSON output, and should stay in sync.

Testing on sample repos

Repo Score Tier Assessed/Skipped Errors
agentready (self) 73.3 Silver 23/6 None
Flask 48.4 Bronze 23/6 None
FastAPI 54.4 Bronze 24/5 None

Posted by Bill Murdock with assistance from Claude Code.

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.

Remove redundant assessors, realign tiers, rebalance weights (ADR C.1-4, E.1-2)

1 participant