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
Add Review Scope Modes and Path Filters to
specfact code review runWhy
specfact code review runcurrently 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
--scopeflag tospecfact code review runwithchangedandfullmodes.changedas the default when the command auto-discovers files, so automation flows fromcode-review-09stay backward-compatible.--pathfilters that recursively constrain the selected review set to one or more repo-relative directories or file prefixes.--scopeand--path, including no-match handling and invalid scope/path combinations.Capabilities
New Capabilities
None.
Modified Capabilities
review-run-command: add explicit review-scope selection and repo-relative path filtering for auto-discovered review targetsImpact
specfact code review runCLI contract, documentation, and downstream automation expectations incode-review-09-f4-automation-upgradenold-ai/specfact-cli-modulesfor the actual command behavior, fixtures, and cli-val scenariosOpenSpec Change Proposal:
code-review-10-review-scope-modes