diff --git a/.agents/skills/autoreview/SKILL.md b/.agents/skills/autoreview/SKILL.md index e7ff79ab6d9c..c1964ec3d837 100644 --- a/.agents/skills/autoreview/SKILL.md +++ b/.agents/skills/autoreview/SKILL.md @@ -50,8 +50,9 @@ Dirty local work: ``` Use this only when the patch is actually unstaged/staged/untracked in the -current checkout. For committed, pushed, or PR work, point the helper at the commit -or branch diff instead; do not force `--mode local` / `--uncommitted` just +current checkout. `--mode uncommitted` is accepted as an alias for `--mode local`. +For committed, pushed, or PR work, point the helper at the commit +or branch diff instead; do not force dirty modes just because the helper docs mention dirty work first. A clean local review only proves there is no local patch. @@ -164,6 +165,7 @@ If installed from `agent-scripts`, path is: The helper: - chooses dirty local changes first +- accepts `--mode uncommitted` as an alias for `--mode local` - otherwise uses current PR base if `gh pr view` works - otherwise uses `origin/main` for non-main branches - supports `--engine codex`, `claude`, `droid`, and `copilot`; default is `AUTOREVIEW_ENGINE` or `codex`; Codex should remain the default when nothing is set diff --git a/.agents/skills/autoreview/scripts/autoreview b/.agents/skills/autoreview/scripts/autoreview index 653f75c455a9..0f27a189b930 100755 --- a/.agents/skills/autoreview/scripts/autoreview +++ b/.agents/skills/autoreview/scripts/autoreview @@ -238,6 +238,7 @@ def is_dirty(repo: Path) -> bool: def choose_target(repo: Path, mode: str, base_ref: str | None) -> tuple[str, str | None]: + mode = "local" if mode == "uncommitted" else mode branch = current_branch(repo) if mode == "local" or (mode == "auto" and is_dirty(repo)): return "local", None @@ -889,7 +890,7 @@ def finish_parallel_tests(proc: subprocess.Popen, started: float) -> int: def parse_args() -> argparse.Namespace: parser = argparse.ArgumentParser(description="Bundle-driven AI code review.") - parser.add_argument("--mode", choices=["auto", "local", "branch", "commit"], default="auto") + parser.add_argument("--mode", choices=["auto", "local", "uncommitted", "branch", "commit"], default="auto") parser.add_argument("--base") parser.add_argument("--commit", default="HEAD") parser.add_argument("--engine", choices=ENGINES, default=os.environ.get("AUTOREVIEW_ENGINE", "codex"))