You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(review): exclude catch-all rules when files are specified
When callers narrow review scope to a specific file set (via run_review
files= or get_configured_reviews only_rules_matching_files=), rules
whose include patterns are all pure wildcards (*, **, **/*, */**) are
now dropped — they rarely reflect caller intent and produce noisy
results. Rules with any literal path segment are kept. Catch-all rules
remain in effect when scope comes from git diff.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: doc/architecture.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -937,7 +937,7 @@ Runs the `.deepreview`-based code review pipeline. Registered directly in `jobs/
937
937
The `--platform` CLI option on `serve` controls which formatter is used (defaults to `"claude"`).
938
938
939
939
#### 7. `get_configured_reviews`
940
-
Lists configured review rules from `.deepreview` files without running the pipeline.
940
+
Lists configured review rules from `.deepreview` files and DeepSchema-generated synthetic rules without running the pipeline. When `only_rules_matching_files` is provided, catch-all rules (include patterns composed solely of `*`/`/`, e.g. `**/*`) are excluded.
941
941
942
942
**Parameters**:
943
943
- `only_rules_matching_files: list[str] | None` - Filter to rules matching these files.
Copy file name to clipboardExpand all lines: specs/deepwork/review/REVIEW-REQ-006-cli-review-command.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,3 +60,4 @@ The command supports three sources for the list of files to review, with the fol
60
60
In all cases:
61
61
4. The resulting file list MUST be sorted and deduplicated.
62
62
5. The `--base-ref` option only applies to the git diff source; it MUST be ignored when `--files` or stdin provides the file list.
63
+
6. When the file list is supplied explicitly (via `--files` or stdin), rules whose include patterns are all catch-alls (composed solely of `*` and `/` characters, e.g. `*`, `**`, `**/*`, `*/**`) MUST be excluded from matching. When the file list comes from git diff, catch-all rules MUST be retained. Rationale: when a caller narrows scope to a specific file set, catch-all rules are rarely the intent and produce noisy results.
Copy file name to clipboardExpand all lines: specs/deepwork/review/REVIEW-REQ-008-get-configured-reviews.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,8 @@ The `get_configured_reviews` MCP tool allows agents to query which review rules
23
23
24
24
1. When `only_rules_matching_files` is provided, the tool MUST return only rules whose include/exclude patterns match at least one of the provided files.
25
25
2. When `only_rules_matching_files` is omitted (None), the tool MUST return all configured rules.
26
+
3. When `only_rules_matching_files` is provided, the tool MUST exclude rules whose include patterns are all catch-alls (patterns composed solely of `*` and `/` characters, e.g. `*`, `**`, `**/*`, `*/**`). Rationale: when the caller has narrowed scope to specific files, rules that match every file in the repo are rarely what is wanted and produce noisy results.
27
+
4. When `only_rules_matching_files` is omitted (None), catch-all rules MUST be retained in the result.
0 commit comments