specfact-code-review Module Scaffold with Pydantic Models
Parent Feature: #403
Why
The current coding automation pipeline runs a generic codex review pass but has no structured scoring, no persistent quality ledger, and no contract-bound enforcement gates. A dedicated nold-ai/specfact-code-review installable module closes these gaps by providing a governed entry point for all code-review subcommands under specfact code review.
This change establishes the foundation: the module package scaffold, the governance-01-compatible evidence envelope (ReviewReport), the ReviewFinding Pydantic model, and the scoring algorithm - everything SP-002 through SP-009 depend on.
What Changes
- NEW:
packages/specfact-code-review/ module package in specfact-cli-modules
- NEW:
module-package.yaml with bundle_group_command: code, tier official, core_compatibility: >=0.40.0,<1.0.0
- NEW:
ReviewFinding Pydantic model with fields for category, severity, tool, rule, file, line, message, and fixable
- NEW:
ReviewReport governance-01-compatible evidence envelope with scoring extensions
- NEW:
scorer.py scoring algorithm with reward_delta = score - 80
- NEW: Typer app wired to extend
specfact code with a review subgroup
- NEW: Unit tests for
ReviewFinding, ReviewReport, and scorer.py
OpenSpec Change Proposal: code-review-01-module-scaffold
specfact-code-review Module Scaffold with Pydantic Models
Parent Feature: #403
Why
The current coding automation pipeline runs a generic
codex reviewpass but has no structured scoring, no persistent quality ledger, and no contract-bound enforcement gates. A dedicatednold-ai/specfact-code-reviewinstallable module closes these gaps by providing a governed entry point for all code-review subcommands underspecfact code review.This change establishes the foundation: the module package scaffold, the governance-01-compatible evidence envelope (
ReviewReport), theReviewFindingPydantic model, and the scoring algorithm - everything SP-002 through SP-009 depend on.What Changes
packages/specfact-code-review/module package inspecfact-cli-modulesmodule-package.yamlwithbundle_group_command: code, tierofficial,core_compatibility: >=0.40.0,<1.0.0ReviewFindingPydantic model with fields for category, severity, tool, rule, file, line, message, and fixableReviewReportgovernance-01-compatible evidence envelope with scoring extensionsscorer.pyscoring algorithm withreward_delta = score - 80specfact codewith areviewsubgroupReviewFinding,ReviewReport, andscorer.pyOpenSpec Change Proposal:
code-review-01-module-scaffold