Compiler Commit
Verify and commit compiler changes with the correct convention.
Arguments:
- $ARGUMENTS: Commit title (required). Optionally a test pattern after
--(e.g.,Fix aliasing bug -- aliasing)
Instructions
-
Run
/compiler-verifyfirst (with test pattern if provided after--). Stop on any failure. -
Run
/compiler-reviewon the uncommitted changes. Report the findings to the user. If any issues are found, stop and do NOT commit — let the user decide how to proceed. -
Detect commit prefix from changed files:
- If any files in
compiler/crates/changed: use[rust-compiler] - Otherwise: use
[compiler]
- If any files in
-
Update orchestrator log: If
compiler/docs/rust-port/rust-port-orchestrator-log.mdexists and the commit includes Rust changes (compiler/crates/):Run
test-rust-portwith--jsonto get machine-readable results:bash compiler/scripts/test-rust-port.sh --json 2>/dev/nullThis outputs a JSON object with fields:
pass,autoDetected,total,passed,failed,frontier,perPass,failures.Then update the orchestrator log:
- Update the
# Statussection with the results (use the frontier, per-pass counts, and pass/fail totals) - Add a
## YYYYMMDD-HHMMSSlog entry noting the commit and what changed
- Update the
-
Stage files — stage only the relevant changed files by name (including the orchestrator log if updated in step 4). Do NOT use
git add -Aorgit add .. -
Compose commit message:
[prefix] <title> <summary of what changed and why, 1-3 sentences>The title comes from $ARGUMENTS. Write the summary yourself based on the actual changes.
-
Commit using a heredoc for the message:
git commit -m "$(cat <<'EOF' [rust-compiler] Title here Summary here. EOF )" -
Do NOT push unless the user explicitly asks.
Examples
/compiler-commit Fix aliasing bug in optional chains— runs full verify, commits as[compiler] Fix aliasing bug in optional chains/compiler-commit Implement scope tree types -- round_trip— runs verify with-p round_trip, commits as[rust-compiler] Implement scope tree types