Improve plan review UX with enriched rows, TUI filters, and execute gate.

Make review-plan easier to act on: Chinese risk labels, relative paths,
verdict/next-step footer, optional identity/analysis enrichment, grouping,
spot-check sampling, and structure preview. Extend the TUI with filters,
duplicate-group reject, and quality context. Persist review_context on
plan operations and add --require-review for confirmed execute.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
windyboy
2026-05-21 09:27:12 +08:00
co-authored by Cursor
parent c9d22d5136
commit 5f0b531269
13 changed files with 1050 additions and 61 deletions
+11
View File
@@ -42,6 +42,8 @@ def execute_cmd(
verbose_ops: bool,
preserve_directories: bool,
safe_mode: bool,
require_review: bool = False,
review_csv: Path | None = None,
) -> None:
"""Execute an execution plan in dry-run or execute mode."""
config = ctx.config
@@ -53,6 +55,15 @@ def execute_cmd(
execution_plan = load_plan(plan)
if require_review and confirm:
from vlm.plan_review import check_review_requirements
csv_path = review_csv or plan.parent / "plan_manual_review.csv"
review_errors = check_review_requirements(execution_plan, plan, csv_path)
if review_errors:
formatted = "\n".join(f" - {e}" for e in review_errors)
raise ValueError(f"REVIEW REQUIRED BEFORE EXECUTE:\n{formatted}")
if preserve_directories:
click.echo("Directory preservation is enabled (plan metadata/operations will be honored).")
click.echo()