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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user