feat: add per-file +/− summary and noise-filtered scope to review prompts

Emit a ### Changed Files Markdown table (| File | +/− | Type | rows plus
total added/removed) ahead of the raw diff in both committed and
uncommitted review prompts, parsed from the diff via the shared
parseDiff engine. Add an ### Excluded Files (n) section listing filtered
noise (path, +/− counts, reason), and replace byte-truncation of oversized
diffs with a file-list + read instruction when the cleaned diff exceeds
50KB or touches more than 20 files.

Also: distinguish diff-computation failure from genuinely no changes in the
review loop (tri-state result, never treats a broken base ref as a clean
verified task), map critical→blocker in finding severity parsing, inject a
per-review custom focus/instructions section from config, and make the
noise-filter ignore rules project-configurable via review.extraIgnorePatterns
and review.ignorePaths. Add same-model retry before cycling to the next
model in task/follow-up/fix sessions.
This commit is contained in:
2026-08-08 18:10:08 -04:00
parent 88f6b4df93
commit b86174782f
9 changed files with 698 additions and 95 deletions

View File

@@ -221,8 +221,25 @@ execution:
prompts:
projectContext: "Additional context for all tasks"
reflectionPrompt: "" # custom suffix for reflection extraction
reviewFocus: "" # per-review custom focus/instructions (e.g. "check security only")
review:
extraIgnorePatterns: [] # extra noise-filter exclusion regexes (merged into the default rules)
ignorePaths: [] # pathspec allowlist — files matching these stay in review scope
```
Review prompts (committed + uncommitted) run the diff through a noise filter
before inlining: lockfiles, minified/generated assets, source maps,
snapshots, build output, `node_modules`/`vendor`, and binary/media files are
excluded by default. The prompt gets a per-file `+/` summary table, an
`### Excluded Files (n)` section listing what was filtered (path, counts,
reason), and — when a diff is oversized or touches >20 files — a
file-list + "use `read`" instruction instead of a byte-truncated diff.
`prompts.reviewFocus` injects a `### Custom Review Focus` section into each
review prompt. `review.extraIgnorePatterns` adds exclusion regexes (matched
against file paths), and `review.ignorePaths` is a pathspec allowlist that
keeps matching files in review scope even when a default rule would exclude
them.
> `execution.models` uses slot-aware round-robin: with 3 models and 2 concurrent
> tasks, only the first two models are used. The third model is only touched when
> a third concurrent task starts. Freed model slots are reused before new ones