main
md 30 lines 1.3 KB
Rendered Raw
1 ---
2 name: compiler-review
3 description: Review Rust port code for port fidelity, convention compliance, and error handling. Compares against the original TypeScript source.
4 ---
5
6 # Compiler Review
7
8 Review Rust compiler port code for correctness and convention compliance.
9
10 Arguments:
11 - $ARGUMENTS: Optional commit ref or range (e.g., `HEAD~3..HEAD`, `abc123`). If omitted, reviews uncommitted/staged changes.
12
13 ## Instructions
14
15 1. **Get the diff** based on arguments:
16 - No arguments: `git diff HEAD -- compiler/crates/` (uncommitted changes). If empty, also check `git diff --cached -- compiler/crates/` (staged changes).
17 - Commit ref (e.g., `abc123`): `git diff abc123~1..abc123 -- compiler/crates/`
18 - Commit range (e.g., `HEAD~3..HEAD`): `git diff HEAD~3..HEAD -- compiler/crates/`
19
20 2. **If no Rust changes found**, report "No Rust changes to review." and stop.
21
22 3. **Identify changed Rust files** from the diff using `git diff --name-only` with the same ref arguments.
23
24 4. **Launch the `compiler-review` agent** via the Agent tool, passing it the full diff content. The agent will:
25 - Read the architecture guide
26 - Find and read the corresponding TypeScript files
27 - Review for port fidelity, convention compliance, and error handling
28 - Return a numbered issue list
29
30 5. **Report the agent's findings** to the user.