Skip to content

[Change] code-review-10 - Add review scope modes and path filters to specfact code review run #416

@djm81

Description

@djm81

Add Review Scope Modes and Path Filters to specfact code review run

Why

specfact code review run currently defaults to reviewing changed files when no explicit targets are passed. That is safe for automation, but it does not give users a governed way to switch between a quick changed-only pass and a full codebase review, or to narrow either mode to a specific subtree when they want to pay down legacy review debt incrementally.

This change adds explicit review-scope modes plus recursive path filters so the same command can cover both automation-friendly changed-file reviews and thorough existing-code reviews without ad hoc shell scripting.

What Changes

  • Add an explicit --scope flag to specfact code review run with changed and full modes.
  • Keep changed as the default when the command auto-discovers files, so automation flows from code-review-09 stay backward-compatible.
  • Add repeatable --path filters that recursively constrain the selected review set to one or more repo-relative directories or file prefixes.
  • Define deterministic file-selection behavior for --scope and --path, including no-match handling and invalid scope/path combinations.
  • Extend documentation and command contracts to show how changed-only reviews, full reviews, and subtree-limited reviews are invoked.
  • Carry the same governed review-scope contract into the modules repository where the bundle command is implemented and validated.

Capabilities

New Capabilities

None.

Modified Capabilities

  • review-run-command: add explicit review-scope selection and repo-relative path filtering for auto-discovered review targets

Impact

  • Affects the specfact code review run CLI contract, documentation, and downstream automation expectations in code-review-09-f4-automation-upgrade
  • Requires bundle-side implementation in nold-ai/specfact-cli-modules for the actual command behavior, fixtures, and cli-val scenarios
  • Preserves current automation safety by keeping changed-only review as the default auto-discovery mode

OpenSpec Change Proposal: code-review-10-review-scope-modes

Metadata

Metadata

Assignees

Labels

QAQuality Assurancechange-proposalProposal for a new changecode-reviewCode review automation and quality governanceenhancementNew feature or requestopenspec

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions