Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions .github/agents/expert-reviewer.md
Original file line number Diff line number Diff line change
Expand Up @@ -433,12 +433,13 @@ New features must be gated behind language version checks. Breaking changes requ

Execute review in five waves, each building on the previous.

### Wave 0: Orientation
### Wave 0: Orientation & Dimension Dispatch

1. Read the PR title, description, and linked issues.
2. Identify which dimensions are relevant based on files changed.
2. Identify which dimensions are relevant based on files changed — use the `reviewing-compiler-prs` skill dimension table.
3. Use the hotspot table below to prioritize dimensions.
4. Check if existing instructions files apply (`.github/instructions/`).
5. **Dispatch independent subagents** — for each selected dimension, launch a separate background agent (via the task tool) to assess that dimension in parallel. Each subagent receives: the dimension's CHECK rules, the PR diff, and the file paths it should focus on. Collect results before proceeding to consolidation.

### Wave 1: Structural Scan

Expand Down Expand Up @@ -488,10 +489,10 @@ Execute review in five waves, each building on the previous.
gh api repos/{owner}/{repo}/pulls/{number}/reviews \
--method POST \
--field event=COMMENT \
--field 'body=*🤖 This review was generated by AI (@expert-reviewer agent). Findings may contain inaccuracies — please verify independently.*' \
--field body='' \
--field 'comments=[
{"path":"src/Compiler/Checking/CheckDeclarations.fs","line":2750,"body":"**[Test Coverage]** This code path lacks a test. Add a test exercising this branch."},
{"path":"src/Compiler/CodeGen/IlxGen.fs","line":1234,"body":"**[IL Emission]** Call `stripTyEqns` before this match to handle type abbreviations."}
{"path":"src/Compiler/Checking/CheckDeclarations.fs","line":2750,"body":"**[Test Coverage]** This code path lacks a test. Add a test exercising this branch."},
{"path":"src/Compiler/CodeGen/IlxGen.fs","line":1234,"body":"**[IL Emission]** Call `stripTyEqns` before this match to handle type abbreviations."}
]'
```
Each comment needs:
Expand All @@ -501,8 +502,7 @@ Execute review in five waves, each building on the previous.

3. **If no significant issues found**, post an approving review:
```bash
gh pr review {number} --repo {owner}/{repo} --approve \
--body "*🤖 AI review (@expert-reviewer): no significant issues found across applicable dimensions. Please verify independently.*"
gh pr review {number} --repo {owner}/{repo} --approve --body "LGTM"
```

4. **Apply the label and request human review:**
Expand All @@ -516,6 +516,7 @@ Execute review in five waves, each building on the previous.
- Every comment must reference a specific file and line from the diff.
- Never post duplicate content if reviews already exist on the PR.
- If the PR is too large to review fully, note skipped areas in the review body.
- **NEVER write a wall-of-text review body.** The body is either `LGTM` (approve) or empty (with inline findings). All analysis stays in your context — only actionable findings get posted as inline comments. A review body longer than 10 characters (other than `LGTM`) is a bug.

## Folder Hotspot Mapping

Expand Down
10 changes: 5 additions & 5 deletions .github/aw/actions-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
"version": "v8",
"sha": "ed597411d8f924073f98dfc5c65a23a2325f34cd"
},
"actions/github-script@v9.0.0": {
"actions/github-script@v9": {
"repo": "actions/github-script",
"version": "v9.0.0",
"version": "v9",
"sha": "3a2844b7e9c422d3c10d287c895573f7108da1b3"
},
"github/gh-aw-actions/setup@v0.72.1": {
"github/gh-aw-actions/setup@v0.68.3": {
"repo": "github/gh-aw-actions/setup",
"version": "v0.72.1",
"sha": "bc56a0cad2f450c562810785ef38649c04db812a"
"version": "v0.68.3",
"sha": "ba90f2186d7ad780ec640f364005fa24e797b360"
},
"github/gh-aw/actions/setup@v0.67.2": {
"repo": "github/gh-aw/actions/setup",
Expand Down
6 changes: 6 additions & 0 deletions .github/instructions/CcrOptout.instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
applyTo: "**"
excludeAgent: "cloud-agent"
---

If the pull request body/description contains `SKIP CCR REVIEW`, stop any review, do not post any comment, immediately finish and ignore all other instructions for reviewing.
11 changes: 8 additions & 3 deletions .github/skills/reviewing-compiler-prs/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,16 @@ Full dimension definitions and CHECK rules live in the `expert-reviewer` agent.
| `vsintegration/` | IDE Responsiveness, Memory Footprint, Cross-Platform |
| `eng/`, `setup/`, build scripts | Build Infrastructure, Cross-Platform |

## Multi-Model Dispatch
## Subagent Dispatch

Dispatch one agent per selected dimension. For high-confidence reviews, assess each dimension with multiple models (`claude-opus-4.6`, `gemini-3-pro-preview`, `gpt-5.2-codex`). Minimum viable council = 2 models.
For each selected dimension from the table above, the `expert-reviewer` agent MUST launch an independent subagent (background task) to assess that dimension. This is not optional — a single agent doing all dimensions sequentially produces shallow analysis and wall-of-text summaries.

**Claims coverage** — before dimension assessment, cross-reference every claim in the PR description and linked issues against actual code changes. Flag orphan claims (stated but not implemented), orphan changes (code changed but not mentioned), and partial implementations.
Each subagent receives:
1. The dimension's CHECK rules (from expert-reviewer.md)
2. The relevant file diffs (filtered by the dimension's hotspot paths)
3. Instructions to produce a structured finding: `{file, line, severity, dimension, issue, suggestion}` or `LGTM` if no findings

The expert-reviewer consolidates subagent results, deduplicates, applies assessment gates, and posts as inline comments per Wave 5.

**Assessment gates** — apply before flagging:
- Understand execution context before judging (test harness ≠ compiler runtime)
Expand Down
Loading