Code Review
Review the current changes. Critique only; change nothing.
Gather context
- Ask what the change is for (problem, feature, refactor); review against that.
- Scope:
git diff rust --statandgit diff rust --name-only(rustis
the active branch).
- Read every changed file; for a large diff,
git diff rust -- <file>.
Checklist
Mark each area pass, concern, or action required; skip areas the
change does not touch.
- Quality and simplicity — as simple as it reasonably can be; no
premature abstraction, leftover shim, or compatibility layer; no dead,
replaced, or unreachable code; names per CONTRIBUTING.md (UK spelling,
explicit, no ambiguous single letters).
- Correctness — sound logic, edge cases, off-by-one, bounds, silent
failures. Tcl semantics: namespaces and qualified names, interp alias /
rename, unknown, shimmering, package / source / auto_index,
uplevel / upvar, namespace eval, interp, trace. Version-specific
features gated per dialect (8.4–9.1).
- Registry rule — no per-command
matchin a consumer; the fact lives on
CommandSpec (AGENTS.md). A new command lands with its WASM backing.
- Performance — obvious algorithmic wins taken; no needless allocation
or repeated lookup on a hot path.
- LSP and editors — a diagnostics / completion / hover / token /
code-action / formatting change reaches every editor (VS Code, Neovim,
Zed, Emacs, Helix, Sublime, JetBrains); make codegen re-run when a
diagnostic or optimisation changed; new capabilities registered.
- Docs — KCS note created or updated and indexed; README and the owning
design doc current (CONTRIBUTING.md § *Documentation required for a
PR*).
- AI and CLI surfaces —
ai/claude/skills/, the.j2prompt templates,
MCP tools (rust/tcl-mcp), and the tcl / f5-query CLIs updated when a
diagnostic, command, or feature they expose changed.
- Compiler explorer — a bytecode / IR / pass change is visible in
tcl explore (rust/tcl-explorer).
- Tests — positive, negative, edge (empty, boundary, dialect); no
shipped xfails; fuzz-shaped tests #[ignore]d; iRule changes carry Event
Orchestrator tests.
- Tcl completeness — think through: ensembles (
-map,-unknown),
aliases and rename, unknown and auto-loading, shimmering (the K
idiom), package loading and version resolution, source / auto_path,
scoping (uplevel, upvar, variable, global, namespace upvar),
coroutines (8.6+), TclOO (mixins, filters, MRO), zipfs (9.0).
Output
Summary — one paragraph. Findings — by area: severity, file:line,
description, suggestion. Verdict — approve / approve with suggestions /
request changes, naming the items that need attention.
$ARGUMENTS