Skip to content

Release dev to main#280

Merged
djm81 merged 23 commits into
mainfrom
dev
May 21, 2026
Merged

Release dev to main#280
djm81 merged 23 commits into
mainfrom
dev

Conversation

@djm81
Copy link
Copy Markdown
Contributor

@djm81 djm81 commented May 21, 2026

Summary

  • release the code-review simplification feedback loop from dev to main
  • add simplify-focused review reports with deterministic simplification metadata
  • update code-review docs, prompt templates, bundled Codex skill guidance, and module signatures
  • address release PR review feedback for simplify tool errors, dataclass noise suppression, direct request normalization, and simplify artifact consistency

Verification

  • openspec validate code-review-11-simplification-feedback-loop --strict
  • hatch run format
  • hatch run type-check
  • hatch run lint
  • hatch run yaml-lint
  • hatch run check-bundle-imports
  • hatch run validate-prompt-commands
  • hatch run verify-modules-signature --payload-from-filesystem --enforce-version-bump
  • hatch run pytest tests/unit/specfact_code_review/run/test_runner.py tests/unit/specfact_code_review/run/test_commands.py tests/unit/specfact_code_review/run/test_scorer.py tests/unit/specfact_code_review/review/test_commands.py tests/unit/specfact_code_review/rules/test_updater.py tests/unit/docs/test_code_review_docs_parity.py tests/unit/test_check_prompt_commands_script.py tests/unit/test_check_docs_commands_script.py tests/unit/test_bundle_resource_payloads.py -q
  • hatch run pytest tests/unit/specfact_code_review/run/test_commands.py --cov=specfact_code_review.run.commands --cov-report=term-missing -q
  • SPECFACT_MODULES_ROOTS=/packages SPECFACT_ALLOW_UNSIGNED=1 hatch run specfact code review run --bug-hunt --json --out .specfact/code-review.json --scope changed
  • pre-commit on 0def4af: signature check, format, yaml-lint, check-bundle-imports, lint, docs validation, prompt validation, staged SpecFact review, and contract-test all passed (732 passed, 2 warnings)

Notes

  • Registry checksum comment was verified as not valid: registry/index.json and the .tar.gz.sha256 sidecar both match the actual specfact-project tarball; the module manifest integrity checksum is the signed payload checksum, not the tarball checksum.
  • Normal DRY/KISS scoring remains deductive by default; only simplify-focused deterministic high-confidence simplification findings are score-neutral.

@strix-security
Copy link
Copy Markdown

Strix is installed on this repository, but we could not run this PR security review because this workspace does not have an active plan. If you'd like to continue receiving code reviews, you can add a payment method or manage billing here.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 21, 2026

Review Change Stack

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

Adds a deterministic simplification feedback loop: optional per-finding simplification metadata, CLI support via --focus simplify, deterministic duplicate-intent grouping, expanded ai-bloat/AST analyzers to emit simplification findings, schema bump to 1.1, scoring neutrality support, docs/prompts updates, package/version bumps, and comprehensive tests.

Changes

Simplification Feedback Loop

Layer / File(s) Summary
OpenSpec proposal, design, tasks, and evidence
openspec/CHANGE_ORDER.md, openspec/changes/code-review-11-simplification-feedback-loop/...
OpenSpec change registration, design, proposal, tasks checklist, and TDD evidence for the simplification feedback-loop feature.
ReviewFinding schema & report version
packages/specfact-code-review/src/specfact_code_review/run/findings.py, tests/unit/specfact_code_review/run/test_findings.py
Add optional simplification metadata fields and validators; helpers to detect metadata presence/determinism; set report schema_version to 1.1 when metadata is present.
CLI input bundling & focus validation
packages/specfact-code-review/src/specfact_code_review/review/commands.py, tests/unit/specfact_code_review/review/test_commands.py
Introduce _ReviewRunCliInputs; validate --focus facets (add simplify), enforce mutual-exclusion with include/exclude-tests, and update CLI help and parity tests.
Review run command & request normalization
packages/specfact-code-review/src/specfact_code_review/run/commands.py, tests/unit/specfact_code_review/run/test_commands.py
Backfill review_focus on ReviewRunRequest from focus_facets; exclude simplify from file-resolution facets; thread review_focus through loop flags and pass focus into run_review.
Runner orchestration & ReviewOptions
packages/specfact-code-review/src/specfact_code_review/run/runner.py, tests/unit/specfact_code_review/run/test_runner.py
Introduce ReviewOptions/ReviewFocus, refactor run_review signature to accept options+overrides, add pylint structural-noise detection, and implement focus-based filtering that keeps simplification-queue findings for focus="simplify".
Scoring: simplification neutrality
packages/specfact-code-review/src/specfact_code_review/run/scorer.py, tests/unit/specfact_code_review/run/test_scorer.py
Add simplification_score_neutral flag to scoring path; neutralize deductions for deterministic high-confidence dry/kiss simplification findings when enabled.
AI-bloat heuristics & simplification findings
packages/specfact-code-review/src/specfact_code_review/tools/ai_bloat_runner.py, tests/unit/specfact_code_review/tools/test_ai_bloat_runner.py
Refactor to _SimplificationCandidate/_simplification_finding; add heuristics (accumulators, verbose returns, redundant branches, table-lookup, stdlib replacements, wrapper-chains) emitting simplification metadata.
DRY duplicate-intent grouping
packages/specfact-code-review/src/specfact_code_review/tools/ast_clean_code_runner.py, tests/unit/specfact_code_review/tools/test_ast_clean_code_runner.py
Tokenize names to derive deterministic intent_key; produce related_locations EvidenceRef entries and populate simplification metadata on duplicate-function DRY findings when intent is available.
Skill, prompts, and bundle docs
packages/specfact-code-review/src/specfact_code_review/resources/skills/specfact-code-review/SKILL.md, packages/specfact-project/resources/prompts/specfact.08-simplify.md, packages/specfact-project/resources/prompts/specfact.03-review.md, docs/...
Update SKILL.md and prompts to reference .specfact/code-review-simplify.json, --focus simplify, intent grouping, related_locations, CLI-grounding guidance, and rules-skill initialization examples; update bundle docs to describe rules skill management.
Module/package bumps & registry
packages/specfact-code-review/module-package.yaml, packages/specfact-project/module-package.yaml, registry/*
Bump module versions and update integrity checksums/signatures and registry entries to match updated artifacts.
Comprehensive tests & docs parity
tests/unit/...
Add and update unit tests for ReviewFinding metadata, focus routing and validation, run_review filtering, ai_bloat and DRY metadata emission, scoring neutrality, SKILL inclusion, and prompt-command validation.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related issues

Possibly related PRs

Suggested labels

module

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 6.80% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'Release dev to main' is generic and does not follow Conventional Commits style (feat:, fix:, docs:, test:, refactor:, chore:) as required. Consider using a Conventional Commits-style prefix such as 'chore: release dev to main' or 'release: code-review simplification feedback loop' to clearly indicate the nature of the release.
✅ Passed checks (3 passed)
Check name Status Explanation
Description check ✅ Passed The PR description provides a clear summary, verification steps, and notes, but omits several required template sections including the Scope checklist, Bundle Impact version table, and full Validation Evidence with required local gates checklist.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ 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 dev

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

chore(registry): publish changed modules
@djm81 djm81 self-assigned this May 21, 2026
@djm81 djm81 added enhancement New feature or request codebase Specfact codebase related topic labels May 21, 2026
@djm81 djm81 moved this from Todo to In Progress in SpecFact CLI May 21, 2026
@djm81 djm81 linked an issue May 21, 2026 that may be closed by this pull request
5 tasks
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2b02fdba13

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/specfact-code-review/src/specfact_code_review/run/runner.py Outdated
Copy link
Copy Markdown
Contributor

@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: 9

Caution

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

⚠️ Outside diff range comments (1)
packages/specfact-code-review/src/specfact_code_review/run/commands.py (1)

575-587: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Direct ReviewRunRequest inputs can silently drop simplify focus.

run_command() trusts a provided ReviewRunRequest as-is. If a caller sets focus_facets=("simplify",) but leaves default review_focus=None, simplify mode is never passed to run_review(). Normalize or validate this at command entry.

Proposed fix
 from collections import defaultdict
 from collections.abc import Callable, Iterable
-from dataclasses import dataclass
+from dataclasses import dataclass, replace
@@
 def run_command(
@@
-    request = (
+    request = (
         request_or_files
         if isinstance(request_or_files, ReviewRunRequest)
         else _build_review_run_request(
             list(request_or_files or []),
             kwargs,
         )
     )
+    if request.review_focus is None and "simplify" in request.focus_facets:
+        request = replace(request, review_focus=_review_focus_from_facets(request.focus_facets))
+
     _validate_review_request(request)

As per coding guidelines, packages/**/src/**/*.py should maintain clear adapter boundaries so core upgrades do not silently break bundles.

🤖 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 `@packages/specfact-code-review/src/specfact_code_review/run/commands.py`
around lines 575 - 587, run_command currently accepts a ReviewRunRequest and
uses it raw, which lets callers set focus_facets=("simplify",) without
populating review_focus so simplify mode never reaches run_review; update
run_command to normalize/validate the incoming ReviewRunRequest (the
ReviewRunRequest instance created or passed in) so that if request.focus_facets
includes "simplify" and request.review_focus is None or empty, set
request.review_focus to include the corresponding simplify mode before calling
run_review (or delegate to _build_review_run_request behavior), ensuring the
adapter boundary between run_command, _build_review_run_request, and run_review
is preserved.
🤖 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 `@docs/bundles/code-review/run.md`:
- Line 32: The module-level documentation for the --focus option omits the
"simplify" value: update the --focus option description (the list that currently
shows source, tests, docs) to include simplify (i.e., add "simplify" to the
enumerated values and ensure the repeatable/mutual-exclusion wording matches the
bundle run guide), and verify the "Simplification loop" section still references
the same --focus value to keep docs consistent.

In `@docs/bundles/project/overview.md`:
- Line 85: The docs mention two different simplify-report filenames
(.specfact/code-review.json vs .specfact/code-review-simplify.json); update the
simplify prompt reference in docs/bundles/project/overview.md to match the
canonical filename used by the simplify run command and template (change the
text that says `.specfact/code-review.json` to
`.specfact/code-review-simplify.json`), and verify the specfact.08-simplify
prompt template and docs/bundles/code-review/run.md consistently reference
`.specfact/code-review-simplify.json`; if the run command or template uses the
other name instead, change that source to the canonical
`.specfact/code-review-simplify.json` so all references (overview text, run.md,
and specfact.08-simplify prompt) are identical.

In `@docs/modules/code-review.md`:
- Around line 398-415: Add the missing "simplify" facet to the canonical --focus
value list so the docs and the SKILL.md guidance stay consistent: update the
options list where --focus values are enumerated to include "simplify" (matching
the behavior described in SKILL.md and the "Simplification loop" paragraph) and
ensure any examples or CLI usage strings reference --focus simplify; search for
the symbols "--focus" and "SKILL.md" in the document to locate the list and
examples to edit.

In
`@openspec/changes/code-review-11-simplification-feedback-loop/specs/code-review-simplification-feedback/spec.md`:
- Around line 65-71: Update the `/specfact.08-simplify` spec to reference the
correct simplify artifact `.specfact/code-review-simplify.json` (used by the
simplify workflow: `--focus simplify --json --out ...`) instead of
`.specfact/code-review.json`, and ensure the description for grouping by
`intent_key` and showing related locations explicitly states it consumes
`.specfact/code-review-simplify.json`; adjust any mention in the
`/specfact.08-simplify` section so the grouping logic (by `intent_key`, then
file/domain and rule) and the one-confirmed-rewrite flow point at
`.specfact/code-review-simplify.json` to keep the spec aligned with the
implemented workflow.

In `@packages/specfact-code-review/src/specfact_code_review/rules/updater.py`:
- Around line 35-36: The simplify workflow command string in
specfact_code_review.rules.updater currently points to
".specfact/code-review.json" which conflicts with the main review output; update
the command so the simplify queue writes to the dedicated simplify report path
".specfact/code-review-simplify.json" (i.e., replace the output filename in the
string literal used to generate the simplify workflow command in updater.py).

In `@packages/specfact-code-review/src/specfact_code_review/run/runner.py`:
- Around line 240-241: The suppression check is failing on Windows paths because
it matches finding.file against a literal "/commands.py"; normalize the path
before checking by using pathlib.Path or os.path to get the filename (e.g.,
replace the endswith check with Path(finding.file).name == "commands.py" or
os.path.basename(os.path.normpath(finding.file)) == "commands.py"), then apply
the existing rule/message logic (the existing condition on finding.rule and the
"argument"/"local variable" message checks) so the noise matching is
platform-independent.

In `@packages/specfact-code-review/src/specfact_code_review/run/scorer.py`:
- Around line 55-56: The neutralization condition currently zeros deductions for
any `dry`/`kiss` finding when `simplification_score_neutral` is true; update the
condition in scorer.py to only neutralize when the finding is a high-confidence
deterministic simplification by requiring the simplification metadata indicate
high confidence and deterministic (e.g., check
`finding.has_simplification_metadata()` and
`finding.simplification_metadata.get("confidence") == "high"` and
`finding.simplification_metadata.get("deterministic") is True`) in addition to
`finding.category in {"dry","kiss"}`, and apply the same stricter check to the
similar neutralization logic later in the file (the block around the existing
checks at lines 93-101).

In `@registry/index.json`:
- Around line 5-7: Registry index.json's "checksum_sha256" (409b0507...) does
not match the module manifest integrity checksum in
packages/specfact-project/module-package.yaml (cbae2549...), causing install
failures; compute the actual SHA-256 of the tarball for specfact-project 0.41.12
(the file named by download_url or
registry/modules/specfact-project-0.41.12.tar.gz) and then update the incorrect
entry so both places match: either replace registry/index.json's checksum_sha256
value or update the packages/specfact-project module-package.yaml integrity:
checksum field to the verified hex string, and also ensure any registry checksum
file (registry/modules/specfact-project-0.41.12.tar.gz.sha256) reflects the same
checksum in lowercase hex format.

In `@tests/unit/specfact_code_review/run/test_scorer.py`:
- Around line 91-100: The test currently asserts that
score_review(findings=[_dry_simplification_finding()]) yields a deduction, which
enforces non-neutral default behavior; update the test so simplification
findings are treated neutral by default—either change the assertion in
test_score_review_deducts_dry_simplification_findings_by_default to expect 100
(neutral) or explicitly pass simplification_score_neutral=True when calling
score_review (or rename the test to reflect the neutral expectation),
referencing the test function
test_score_review_deducts_dry_simplification_findings_by_default, the helper
_dry_simplification_finding, and the score_review call so callers/tests match
the intended default contract.

---

Outside diff comments:
In `@packages/specfact-code-review/src/specfact_code_review/run/commands.py`:
- Around line 575-587: run_command currently accepts a ReviewRunRequest and uses
it raw, which lets callers set focus_facets=("simplify",) without populating
review_focus so simplify mode never reaches run_review; update run_command to
normalize/validate the incoming ReviewRunRequest (the ReviewRunRequest instance
created or passed in) so that if request.focus_facets includes "simplify" and
request.review_focus is None or empty, set request.review_focus to include the
corresponding simplify mode before calling run_review (or delegate to
_build_review_run_request behavior), ensuring the adapter boundary between
run_command, _build_review_run_request, and run_review is preserved.
🪄 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: CHILL

Plan: Pro

Run ID: d019c4da-2eb7-4ec5-9ae3-229e2c716d1a

📥 Commits

Reviewing files that changed from the base of the PR and between 2220c02 and b990968.

⛔ Files ignored due to path filters (2)
  • registry/modules/specfact-code-review-0.47.18.tar.gz is excluded by !**/*.gz
  • registry/modules/specfact-project-0.41.12.tar.gz is excluded by !**/*.gz
📒 Files selected for processing (44)
  • docs/bundles/code-review/overview.md
  • docs/bundles/code-review/rules.md
  • docs/bundles/code-review/run.md
  • docs/bundles/project/overview.md
  • docs/modules/code-review.md
  • openspec/CHANGE_ORDER.md
  • openspec/changes/code-review-11-simplification-feedback-loop/.openspec.yaml
  • openspec/changes/code-review-11-simplification-feedback-loop/TDD_EVIDENCE.md
  • openspec/changes/code-review-11-simplification-feedback-loop/design.md
  • openspec/changes/code-review-11-simplification-feedback-loop/proposal.md
  • openspec/changes/code-review-11-simplification-feedback-loop/specs/clean-code-analysis/spec.md
  • openspec/changes/code-review-11-simplification-feedback-loop/specs/code-review-simplification-feedback/spec.md
  • openspec/changes/code-review-11-simplification-feedback-loop/specs/review-finding-model/spec.md
  • openspec/changes/code-review-11-simplification-feedback-loop/specs/review-run-command/spec.md
  • openspec/changes/code-review-11-simplification-feedback-loop/tasks.md
  • packages/specfact-code-review/module-package.yaml
  • packages/specfact-code-review/src/specfact_code_review/resources/skills/specfact-code-review/SKILL.md
  • packages/specfact-code-review/src/specfact_code_review/review/commands.py
  • packages/specfact-code-review/src/specfact_code_review/rules/updater.py
  • packages/specfact-code-review/src/specfact_code_review/run/commands.py
  • packages/specfact-code-review/src/specfact_code_review/run/findings.py
  • packages/specfact-code-review/src/specfact_code_review/run/runner.py
  • packages/specfact-code-review/src/specfact_code_review/run/scorer.py
  • packages/specfact-code-review/src/specfact_code_review/tools/ai_bloat_runner.py
  • packages/specfact-code-review/src/specfact_code_review/tools/ast_clean_code_runner.py
  • packages/specfact-project/module-package.yaml
  • packages/specfact-project/resources/prompts/specfact.03-review.md
  • packages/specfact-project/resources/prompts/specfact.08-simplify.md
  • registry/index.json
  • registry/modules/specfact-code-review-0.47.18.tar.gz.sha256
  • registry/modules/specfact-project-0.41.12.tar.gz.sha256
  • registry/signatures/specfact-code-review-0.47.18.tar.sig
  • registry/signatures/specfact-project-0.41.12.tar.sig
  • tests/unit/docs/test_code_review_docs_parity.py
  • tests/unit/specfact_code_review/review/test_commands.py
  • tests/unit/specfact_code_review/rules/test_updater.py
  • tests/unit/specfact_code_review/run/test_commands.py
  • tests/unit/specfact_code_review/run/test_findings.py
  • tests/unit/specfact_code_review/run/test_runner.py
  • tests/unit/specfact_code_review/run/test_scorer.py
  • tests/unit/specfact_code_review/tools/test_ai_bloat_runner.py
  • tests/unit/specfact_code_review/tools/test_ast_clean_code_runner.py
  • tests/unit/test_bundle_resource_payloads.py
  • tests/unit/test_check_prompt_commands_script.py
📜 Review details
🧰 Additional context used
📓 Path-based instructions (7)
registry/**

⚙️ CodeRabbit configuration file

registry/**: Registry and index consistency: bundle listings, version pins, and compatibility with
published module artifacts.

Files:

  • registry/index.json
  • registry/modules/specfact-code-review-0.47.18.tar.gz.sha256
  • registry/signatures/specfact-project-0.41.12.tar.sig
  • registry/signatures/specfact-code-review-0.47.18.tar.sig
  • registry/modules/specfact-project-0.41.12.tar.gz.sha256
packages/**/module-package.yaml

⚙️ CodeRabbit configuration file

packages/**/module-package.yaml: Validate metadata: name, version, commands, dependencies, and parity with packaged src.
Call out semver and signing implications when manifests or payloads change.

Files:

  • packages/specfact-project/module-package.yaml
  • packages/specfact-code-review/module-package.yaml
docs/**/*.md

⚙️ CodeRabbit configuration file

docs/**/*.md: User-facing and cross-site accuracy: Jekyll front matter, links per documentation-url-contract,
CLI examples matching bundled commands.

Files:

  • docs/bundles/code-review/rules.md
  • docs/bundles/project/overview.md
  • docs/bundles/code-review/overview.md
  • docs/bundles/code-review/run.md
  • docs/modules/code-review.md
openspec/**/*.md

⚙️ CodeRabbit configuration file

openspec/**/*.md: Specification truth: proposal/tasks/spec deltas vs. bundle behavior, CHANGE_ORDER, and
drift vs. shipped modules or docs.

Files:

  • openspec/changes/code-review-11-simplification-feedback-loop/specs/clean-code-analysis/spec.md
  • openspec/changes/code-review-11-simplification-feedback-loop/specs/code-review-simplification-feedback/spec.md
  • openspec/changes/code-review-11-simplification-feedback-loop/design.md
  • openspec/changes/code-review-11-simplification-feedback-loop/TDD_EVIDENCE.md
  • openspec/changes/code-review-11-simplification-feedback-loop/specs/review-finding-model/spec.md
  • openspec/changes/code-review-11-simplification-feedback-loop/specs/review-run-command/spec.md
  • openspec/changes/code-review-11-simplification-feedback-loop/tasks.md
  • openspec/CHANGE_ORDER.md
  • openspec/changes/code-review-11-simplification-feedback-loop/proposal.md
**/*.{js,ts,tsx,jsx,py,java,cs,go,rb,php,cpp,c,h}

📄 CodeRabbit inference engine (CLAUDE.md)

Preserve the clean-code compliance gate and its category references (naming, kiss, yagni, dry, and solid)

Files:

  • tests/unit/specfact_code_review/run/test_scorer.py
  • tests/unit/test_bundle_resource_payloads.py
  • tests/unit/specfact_code_review/run/test_commands.py
  • tests/unit/docs/test_code_review_docs_parity.py
  • tests/unit/specfact_code_review/rules/test_updater.py
  • tests/unit/specfact_code_review/tools/test_ast_clean_code_runner.py
  • tests/unit/test_check_prompt_commands_script.py
  • packages/specfact-code-review/src/specfact_code_review/tools/ast_clean_code_runner.py
  • tests/unit/specfact_code_review/run/test_findings.py
  • packages/specfact-code-review/src/specfact_code_review/run/findings.py
  • tests/unit/specfact_code_review/review/test_commands.py
  • packages/specfact-code-review/src/specfact_code_review/run/runner.py
  • packages/specfact-code-review/src/specfact_code_review/tools/ai_bloat_runner.py
  • packages/specfact-code-review/src/specfact_code_review/run/scorer.py
  • packages/specfact-code-review/src/specfact_code_review/review/commands.py
  • tests/unit/specfact_code_review/tools/test_ai_bloat_runner.py
  • tests/unit/specfact_code_review/run/test_runner.py
  • packages/specfact-code-review/src/specfact_code_review/rules/updater.py
  • packages/specfact-code-review/src/specfact_code_review/run/commands.py
tests/**/*.py

⚙️ CodeRabbit configuration file

tests/**/*.py: Contract-first and integration tests: migration suites, bundle validation, and flakiness.
Ensure changes to adapters or bridges have targeted coverage.

Files:

  • tests/unit/specfact_code_review/run/test_scorer.py
  • tests/unit/test_bundle_resource_payloads.py
  • tests/unit/specfact_code_review/run/test_commands.py
  • tests/unit/docs/test_code_review_docs_parity.py
  • tests/unit/specfact_code_review/rules/test_updater.py
  • tests/unit/specfact_code_review/tools/test_ast_clean_code_runner.py
  • tests/unit/test_check_prompt_commands_script.py
  • tests/unit/specfact_code_review/run/test_findings.py
  • tests/unit/specfact_code_review/review/test_commands.py
  • tests/unit/specfact_code_review/tools/test_ai_bloat_runner.py
  • tests/unit/specfact_code_review/run/test_runner.py
packages/**/src/**/*.py

⚙️ CodeRabbit configuration file

packages/**/src/**/*.py: Focus on adapter and bridge patterns: imports from specfact_cli (models, runtime, validators),
Typer/Rich command surfaces, and clear boundaries so core upgrades do not silently break bundles.
Flag breaking assumptions about registry loading, lazy imports, and environment/mode behavior.

Files:

  • packages/specfact-code-review/src/specfact_code_review/tools/ast_clean_code_runner.py
  • packages/specfact-code-review/src/specfact_code_review/run/findings.py
  • packages/specfact-code-review/src/specfact_code_review/run/runner.py
  • packages/specfact-code-review/src/specfact_code_review/tools/ai_bloat_runner.py
  • packages/specfact-code-review/src/specfact_code_review/run/scorer.py
  • packages/specfact-code-review/src/specfact_code_review/review/commands.py
  • packages/specfact-code-review/src/specfact_code_review/rules/updater.py
  • packages/specfact-code-review/src/specfact_code_review/run/commands.py
🧠 Learnings (1)
📚 Learning: 2026-04-02T21:49:07.435Z
Learnt from: djm81
Repo: nold-ai/specfact-cli-modules PR: 136
File: registry/modules/specfact-spec-0.40.17.tar.gz.sha256:1-1
Timestamp: 2026-04-02T21:49:07.435Z
Learning: In nold-ai/specfact-cli-modules, module tarball signature files under registry/signatures/*.tar.sig are produced by the publish-modules GitHub Actions runner during the publish workflow (not committed to the branch). During PR pre-merge review, do not flag missing *.tar.sig files as blockers; treat signatures as publish-time artifacts.

Applied to files:

  • registry/signatures/specfact-project-0.41.12.tar.sig
  • registry/signatures/specfact-code-review-0.47.18.tar.sig
🪛 LanguageTool
openspec/changes/code-review-11-simplification-feedback-loop/design.md

[style] ~27-~27: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...behavior for simplification findings. - No blocking or score penalty for simplific...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~28-~28: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ty for simplification findings in v1. - No cross-language implementation in v1; Py...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~29-~29: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...emains the supported analysis target. - No breaking removal or rename of existing ...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

openspec/changes/code-review-11-simplification-feedback-loop/proposal.md

[style] ~9-~9: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...s, and stdlib replacement candidates. - Add duplicate-intent grouping for functions...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~30-~30: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ds and consumers remain compatible. - Affected prompt resources: `packages/specfact-...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

🔀 Multi-repo context nold-ai/specfact-cli

Linked repositories findings

nold-ai/specfact-cli

  • ReviewFinding model defined/used in pre-commit script:

    • scripts/pre_commit_code_review.py: class ReviewFinding(BaseModel) and findings list usage. [::nold-ai/specfact-cli::scripts/pre_commit_code_review.py]
  • Tests and scripts reference ReviewFinding and schema version 1.1:

    • tests/unit/scripts/test_pre_commit_code_review.py: multiple ReviewFinding usages. [::nold-ai/specfact-cli::tests/unit/scripts/test_pre_commit_code_review.py]
    • tests/integration/sync/test_change_tracking_datamodel.py: asserts bundle.manifest.versions.schema_version == "1.1". [::nold-ai/specfact-cli::tests/integration/sync/test_change_tracking_datamodel.py]
    • src/specfact_cli/models/project.py: reads schema_version == "1.1". [::nold-ai/specfact-cli::src/specfact_cli/models/project.py]
    • tests/e2e/test_openspec_bridge_workflow.py: asserts schema_version == "1.1". [::nold-ai/specfact-cli::tests/e2e/test_openspec_bridge_workflow.py]
  • Documentation/CHANGELOG refer to ai_bloat / simplify and schema_version 1.1 (indicates consumer expectations for new simplify metadata/schema):

    • docs/index.md, docs/modules/code-review.md, README.md, docs/reference/schema-versioning.md, docs/reference/directory-structure.md, CHANGELOG.md. [::nold-ai/specfact-cli::docs/index.md][::nold-ai/specfact-cli::docs/modules/code-review.md][::nold-ai/specfact-cli::README.md][::nold-ai/specfact-cli::docs/reference/schema-versioning.md][::nold-ai/specfact-cli::CHANGELOG.md]

Implication summary:

  • This repository already contains code and tests that expect ReviewFinding usage and schema_version "1.1". The PR's additions of optional simplification metadata and bumping report schema to 1.1 align with existing consumers here; no mismatches discovered in this quick scan. Verify that the new optional fields (confidence, rewrite_hint, canonical_pattern, intent_key, estimated_deletion_lines, related_locations) are acceptable to any strict validators in this repo (e.g., pre-commit script or model loaders) that consume ReviewFinding payloads.
🔇 Additional comments (30)
packages/specfact-project/module-package.yaml (1)

2-2: LGTM!

Also applies to: 30-31

registry/modules/specfact-code-review-0.47.18.tar.gz.sha256 (1)

1-1: LGTM!

openspec/changes/code-review-11-simplification-feedback-loop/.openspec.yaml (1)

1-2: LGTM!

registry/signatures/specfact-project-0.41.12.tar.sig (1)

1-1: LGTM!

registry/index.json (1)

81-83: ⚡ Quick win

Verify checksum consistency for specfact-code-review 0.47.18

  • registry/index.json checksum_sha256 for nold-ai/specfact-code-review matches registry/modules/specfact-code-review-0.47.18.tar.gz.sha256.
openspec/changes/code-review-11-simplification-feedback-loop/specs/clean-code-analysis/spec.md (1)

1-17: ⚡ Quick win

Missing review_comment content: The original review comment (inside <review_comment>...</review_comment>) wasn’t provided, so I can’t rewrite it—please paste the comment text to update.

docs/bundles/code-review/rules.md (1)

15-19: ⚡ Quick win

Missing review comment input: No <review_comment>...</review_comment> content was provided, so I can’t rewrite it. Paste the original review comment (including the diff snippet if any) to proceed.

packages/specfact-code-review/module-package.yaml (1)

2-2: LGTM!

Also applies to: 26-27

openspec/changes/code-review-11-simplification-feedback-loop/specs/review-finding-model/spec.md (1)

1-17: LGTM!

openspec/changes/code-review-11-simplification-feedback-loop/specs/review-run-command/spec.md (1)

1-24: LGTM!

openspec/changes/code-review-11-simplification-feedback-loop/tasks.md (1)

1-55: LGTM!

packages/specfact-project/resources/prompts/specfact.03-review.md (1)

27-40: LGTM!

Also applies to: 731-746

openspec/CHANGE_ORDER.md (1)

104-104: LGTM!

packages/specfact-code-review/src/specfact_code_review/resources/skills/specfact-code-review/SKILL.md (1)

3-3: LGTM!

Also applies to: 7-7, 9-9, 13-16, 29-30

docs/bundles/code-review/run.md (1)

32-32: LGTM!

Also applies to: 90-99, 126-133

tests/unit/specfact_code_review/run/test_commands.py (1)

205-243: LGTM!

packages/specfact-project/resources/prompts/specfact.08-simplify.md (1)

21-93: LGTM!

tests/unit/docs/test_code_review_docs_parity.py (1)

13-14: LGTM!

Also applies to: 66-89

tests/unit/specfact_code_review/rules/test_updater.py (1)

123-124: LGTM!

Also applies to: 138-139

tests/unit/specfact_code_review/tools/test_ast_clean_code_runner.py (1)

56-107: LGTM!

tests/unit/test_check_prompt_commands_script.py (1)

14-15: LGTM!

Also applies to: 243-243, 249-272

packages/specfact-code-review/src/specfact_code_review/tools/ast_clean_code_runner.py (1)

14-14: LGTM!

Also applies to: 19-37, 125-138, 173-200

openspec/changes/code-review-11-simplification-feedback-loop/proposal.md (1)

1-48: LGTM!

tests/unit/specfact_code_review/run/test_findings.py (1)

9-10: LGTM!

Also applies to: 36-41, 66-120, 207-230

packages/specfact-code-review/src/specfact_code_review/run/findings.py (1)

98-113: LGTM!

Also applies to: 115-120, 122-150, 191-193

tests/unit/specfact_code_review/review/test_commands.py (1)

8-9: LGTM!

Also applies to: 14-19, 72-128

packages/specfact-code-review/src/specfact_code_review/tools/ai_bloat_runner.py (1)

20-50: LGTM!

Also applies to: 223-239, 268-305, 307-332, 334-393, 395-421, 423-528, 538-545, 547-579, 600-600

packages/specfact-code-review/src/specfact_code_review/review/commands.py (1)

29-38: LGTM!

Also applies to: 64-90, 102-106, 120-131

tests/unit/specfact_code_review/tools/test_ai_bloat_runner.py (1)

5-6: LGTM!

Also applies to: 91-194, 210-225

tests/unit/specfact_code_review/run/test_runner.py (1)

57-77: LGTM!

Also applies to: 182-252, 254-270

Comment thread docs/bundles/code-review/run.md
Comment thread docs/bundles/project/overview.md Outdated
Comment thread docs/modules/code-review.md
Comment thread packages/specfact-code-review/src/specfact_code_review/rules/updater.py Outdated
Comment thread packages/specfact-code-review/src/specfact_code_review/run/runner.py Outdated
Comment thread packages/specfact-code-review/src/specfact_code_review/run/scorer.py Outdated
Comment thread registry/index.json
Comment thread tests/unit/specfact_code_review/run/test_scorer.py
@djm81 djm81 merged commit 47c3a84 into main May 21, 2026
26 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in SpecFact CLI May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codebase Specfact codebase related topic enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[Change] Code review simplification feedback loop

1 participant