Variant Safe Edit
Overview
Provide a deterministic, fail-fast workflow for variant edits with auditability and reference safety.
Workflow
- •Declare scope and target path, and record the change reason.
- •Preflight: run
list_overridesandscan_broken_references. - •Prepare a patch plan and run
dry_run_patchto review diffs. - •Stop on
errororcritical. Classify fixes assafe_fixordecision_required. - •Apply only with
--confirm,--out-report, and--change-reason. - •If Unity runtime validation is available, run
compile_udonsharp,run_clientsim, and log classification.
Commands
bash
# Preflight prefab-sentinel inspect variant --path "Assets/... Variant.prefab" prefab-sentinel validate refs --scope "Assets/YourScope" # Dry-run diff prefab-sentinel patch apply --plan "config/patch_plan.json" --dry-run # Apply with audit log prefab-sentinel patch apply --plan "config/patch_plan.json" \ --confirm \ --out-report "reports/patch_result.json" \ --change-reason "describe why this change is required"
Guardrails
- •Do not edit YAML directly.
- •Stop on
errororcritical; do not auto-applydecision_required. - •Unity targets require
UNITYTOOL_PATCH_BRIDGE; if unavailable, stop after dry-run.