From 82b08c3377edfb60681fe6b63e5b0d8be6d6c03b Mon Sep 17 00:00:00 2001 From: Bill Murdock Date: Fri, 8 May 2026 14:01:49 -0400 Subject: [PATCH 1/4] fix: sync assessor default_weight values with default-weights.yaml The yaml is the authoritative weight source. Several assessors had stale default_weight values that no longer matched, causing misleading fallback weights if the yaml were ever bypassed. - DependencyPinningAssessor: 0.10 -> 0.05 - DependencySecurityAssessor: 0.04 -> 0.05 - CyclomaticComplexityAssessor: 0.03 -> 0.02 (anticipates PR #407) - StructuredLoggingAssessor: 0.015 -> 0.02 (anticipates PR #407) Also updates stale "1.5% weight" docstrings in StructuredLoggingAssessor, ArchitectureDecisionsAssessor, and OpenAPISpecsAssessor. Co-Authored-By: Claude Sonnet 4.6 --- src/agentready/assessors/code_quality.py | 6 +++--- src/agentready/assessors/documentation.py | 4 ++-- src/agentready/assessors/security.py | 2 +- src/agentready/assessors/stub_assessors.py | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/agentready/assessors/code_quality.py b/src/agentready/assessors/code_quality.py index c0b5ff69..79f339a0 100644 --- a/src/agentready/assessors/code_quality.py +++ b/src/agentready/assessors/code_quality.py @@ -279,7 +279,7 @@ def attribute(self) -> Attribute: tier=self.tier, description="Cyclomatic complexity thresholds enforced", criteria="Average complexity <10, no functions >15", - default_weight=0.03, + default_weight=0.02, ) def is_applicable(self, repository: Repository) -> bool: @@ -423,7 +423,7 @@ def _create_remediation(self) -> Remediation: class StructuredLoggingAssessor(BaseAssessor): """Assesses use of structured logging libraries. - Tier 3 Important (1.5% weight) - Structured logs are machine-parseable + Tier 3 Important (2% weight) - Structured logs are machine-parseable and enable AI to analyze logs for debugging and optimization. """ @@ -444,7 +444,7 @@ def attribute(self) -> Attribute: tier=self.tier, description="Logging in structured format (JSON) with consistent fields", criteria="Structured logging library configured (structlog, winston, zap)", - default_weight=0.015, + default_weight=0.02, ) def is_applicable(self, repository: Repository) -> bool: diff --git a/src/agentready/assessors/documentation.py b/src/agentready/assessors/documentation.py index 71d7e36f..ac294e92 100644 --- a/src/agentready/assessors/documentation.py +++ b/src/agentready/assessors/documentation.py @@ -517,7 +517,7 @@ def _create_remediation(self) -> Remediation: class ArchitectureDecisionsAssessor(BaseAssessor): """Assesses presence and quality of Architecture Decision Records (ADRs). - Tier 3 Important (1.5% weight) - ADRs provide historical context for + Tier 3 Important (3% weight) - ADRs provide historical context for architectural decisions, helping AI understand "why" choices were made. """ @@ -1271,7 +1271,7 @@ def calculate_discount(price: float, discount_percent: float) -> float: class OpenAPISpecsAssessor(BaseAssessor): """Assesses presence and quality of OpenAPI specification. - Tier 3 Important (1.5% weight) - Machine-readable API documentation + Tier 3 Important (3% weight) - Machine-readable API documentation enables AI to generate client code, tests, and integration code. """ diff --git a/src/agentready/assessors/security.py b/src/agentready/assessors/security.py index 29f5f0f9..0c0564e9 100644 --- a/src/agentready/assessors/security.py +++ b/src/agentready/assessors/security.py @@ -34,7 +34,7 @@ def attribute(self) -> Attribute: tier=self.tier, description="Security scanning tools configured for dependencies and code", criteria="Dependabot, Renovate, CodeQL, or SAST tools configured; secret detection enabled", - default_weight=0.04, # Combined weight + default_weight=0.05, ) def assess(self, repository: Repository) -> Finding: diff --git a/src/agentready/assessors/stub_assessors.py b/src/agentready/assessors/stub_assessors.py index 9679b007..dbec8079 100644 --- a/src/agentready/assessors/stub_assessors.py +++ b/src/agentready/assessors/stub_assessors.py @@ -40,7 +40,7 @@ def attribute(self) -> Attribute: tier=self.tier, description="Dependencies pinned to exact versions in lock files", criteria="Lock file with pinned versions, updated within 6 months", - default_weight=0.10, + default_weight=0.05, ) def assess(self, repository: Repository) -> Finding: From 8c3b1cd6522ff6d1710ac89aff85a1e6fb621f3e Mon Sep 17 00:00:00 2001 From: Bill Murdock Date: Fri, 8 May 2026 14:46:13 -0400 Subject: [PATCH 2/4] fix: convert Path.glob() generators to lists before concatenation `Path.glob()` returns a generator, not a list. Concatenating two generators with `+` raises TypeError, silently swallowed by the bare except, causing actionlint detection via workflow files to never work. Co-Authored-By: Claude Sonnet 4.6 --- src/agentready/assessors/code_quality.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/agentready/assessors/code_quality.py b/src/agentready/assessors/code_quality.py index 79f339a0..2368cac0 100644 --- a/src/agentready/assessors/code_quality.py +++ b/src/agentready/assessors/code_quality.py @@ -668,8 +668,8 @@ def _has_actionlint(self, repository: Repository) -> bool: workflows_dir = repository.path / ".github" / "workflows" if workflows_dir.exists(): try: - for workflow_file in workflows_dir.glob("*.yml") + workflows_dir.glob( - "*.yaml" + for workflow_file in list(workflows_dir.glob("*.yml")) + list( + workflows_dir.glob("*.yaml") ): content = workflow_file.read_text() if "actionlint" in content: From 6084c28563d62a81a60d8cbbdb9f5a3eb8f935ce Mon Sep 17 00:00:00 2001 From: Bill Murdock Date: Mon, 11 May 2026 11:36:52 -0400 Subject: [PATCH 3/4] fix: correct IssuePRTemplatesAssessor to Tier 4 / 1% weight MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The assessor was implemented as Tier 3 / 1.5% but the yaml has had it at Tier 4 / 1% since the original MVP. Nati's PR #382 explicitly aligned the docs to Tier 4 / 1% — the assessor code was the bug. - structure.py: tier 3 -> 4, default_weight 0.015 -> 0.01 - __init__.py: move registration from Tier 3 block to Tier 4 block Co-Authored-By: Claude Sonnet 4.6 --- src/agentready/assessors/__init__.py | 2 +- src/agentready/assessors/structure.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/agentready/assessors/__init__.py b/src/agentready/assessors/__init__.py index 4aaf8864..fc815510 100644 --- a/src/agentready/assessors/__init__.py +++ b/src/agentready/assessors/__init__.py @@ -108,12 +108,12 @@ def create_all_assessors() -> list[BaseAssessor]: RepomixConfigAssessor(), # 2% CyclomaticComplexityAssessor(), # 3% ArchitectureDecisionsAssessor(), # 3% - IssuePRTemplatesAssessor(), # 3% StructuredLoggingAssessor(), # 3% OpenAPISpecsAssessor(), # 3% # Tier 4 Advanced — 4% total (1% each) BranchProtectionAssessor(), CodeSmellsAssessor(), + IssuePRTemplatesAssessor(), # 1% ContainerSetupAssessor(), ProgressiveDisclosureAssessor(), # NEW ] diff --git a/src/agentready/assessors/structure.py b/src/agentready/assessors/structure.py index 6cc17023..6409ecf4 100644 --- a/src/agentready/assessors/structure.py +++ b/src/agentready/assessors/structure.py @@ -611,8 +611,8 @@ def _create_remediation(self) -> Remediation: class IssuePRTemplatesAssessor(BaseAssessor): """Assesses presence of GitHub issue and PR templates. - Tier 3 Important (1.5% weight) - Templates provide structure for AI - when creating issues/PRs and ensure consistent formatting. + Tier 4 Advanced (1% weight) - Templates are a nice-to-have process + improvement but not fundamental to agent code comprehension. """ @property @@ -621,7 +621,7 @@ def attribute_id(self) -> str: @property def tier(self) -> int: - return 3 # Important + return 4 # Advanced @property def attribute(self) -> Attribute: @@ -632,7 +632,7 @@ def attribute(self) -> Attribute: tier=self.tier, description="Standardized templates for issues and PRs", criteria="PR template and issue templates in .github/", - default_weight=0.015, + default_weight=0.01, ) def assess(self, repository: Repository) -> Finding: From 8ac286a0af68abf7a09a4c4fe15915483ae89d8a Mon Sep 17 00:00:00 2001 From: Bill Murdock Date: Mon, 11 May 2026 12:26:06 -0400 Subject: [PATCH 4/4] fix: update stale weight comments for Cyclomatic and StructuredLogging assessors Both were reduced from 3% to 2% in this PR but their inline comments in __init__.py still said # 3%. Co-Authored-By: Claude Sonnet 4.6 --- src/agentready/assessors/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/agentready/assessors/__init__.py b/src/agentready/assessors/__init__.py index fc815510..b77af3a3 100644 --- a/src/agentready/assessors/__init__.py +++ b/src/agentready/assessors/__init__.py @@ -106,9 +106,9 @@ def create_all_assessors() -> list[BaseAssessor]: # Tier 3 Important — 14% total DesignIntentAssessor(), # NEW (2%) RepomixConfigAssessor(), # 2% - CyclomaticComplexityAssessor(), # 3% + CyclomaticComplexityAssessor(), # 2% ArchitectureDecisionsAssessor(), # 3% - StructuredLoggingAssessor(), # 3% + StructuredLoggingAssessor(), # 2% OpenAPISpecsAssessor(), # 3% # Tier 4 Advanced — 4% total (1% each) BranchProtectionAssessor(),