Files
Benoît Cortier baa9a65d6c ci(pr-automation): add conditional specialist reviewers (#2188)
Add five optional specialists to the review pipeline, one per newly
adopted review skill, triggered as the `code-review` skill prescribes:

- `intent-drift` (`intent-drift-audit` and `intent-files`): runs when a
changed path is governed by an intent file on `master` or added by the
PR, following the `intent-files` placement rule.
- `intent-review` (`intent-review`, `intent-files`, and its pitfalls
reference): runs when an `INTENT*.md` or `*.intent*.md` is added or
modified.
- `test` (`test-reviewer`, `test-writer` with its references, and
`test-oracle-reviewer`): runs when a changed, non-removed Rust or C#
file is on a test path, or when its content at the PR's merge base or
head contains a test marker. A marker in the added lines decides without
reading either revision. Markers are matched over the whole text, so
multiline attributes work, and include `#[cfg(...)]` predicates naming
`test` other than as `not(test)`. A predicate scan stops at 4 KiB, and
an unclosed one counts as a marker. A production-only edit in a file
that also holds tests selects `test`; that is the accepted cost of not
locating edits inside tests. An unresolvable merge base, an unfetchable
head, or an unreadable file also selects `test`.
- `dependency` (`dependency-reviewer`, `dependency-pruner`, and the
repo-local `public-dependency`): runs when `Cargo.toml`, `Cargo.lock`,
`package.json`, `package-lock.json`, or a `.csproj` gains lines.
- `rust-style` (`rust-style-reviewer`, `rust-style`, and the trusted
`STYLE.md`): runs when a `.rs` file gains lines.

Deterministic analysis derives these at classification time from the PR
file list and patches, plus `git ls-files` on the trusted `master`
checkout to find intent files. Renamed files match path rules under both
their old and new names. The result is persisted in the existing `AI
classification` check state. The classifier schema and the check-state
version are unchanged, so earlier three-reviewer checks stay valid.
`protocol` and `skeptical` remain the only required reviewers; a failed
optional specialist is disclosed as reduced coverage.

The new canonical order is `protocol`, `skeptical`, `intent-drift`,
`intent-review`, `test`, `dependency`, `code-compressor`, `rust-style`.
Required and correctness reviewers start first when more than three are
selected.

Not added: `contract-review`, because the repository has no
`CONTRACT*.md` yet. It joins with the first contract (one agent JSON,
one prompt, one path rule). `test-oracle-reviewer` is not a separate
specialist because `test` runs it.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-10-21 22:22:24 -04:00
..