preview-first-batch
Preview-First for Batch / Bulk Operations
Section titled “Preview-First for Batch / Bulk Operations”MANDATORY. Before any batch / bulk / long-running operation, run a small smoke-test sample first, surface the result, and obtain explicit user confirmation (via AskUserQuestion) before scaling to the full set.
When this rule fires
Section titled “When this rule fires”Whichever comes first: estimated wall-clock time > 2 minutes, or item count > 10 items. If you cannot estimate, the trigger fires by default.
How to apply
Section titled “How to apply”State the estimate before the first tool call (“smoke N=5 (~30s), then full N=285 (~17h) on your go-ahead”; unknown → say so) → smoke the smallest meaningful N (5 items / --limit 5 / lowest-traffic env) → surface the smoke output (wall-clock per item, values, anomalies) → AskUserQuestion to gate the full run even on a clean smoke (proceed / investigate / re-smoke / abort). Never silently scale — a clean smoke is not auto-permission. If the smoke wrote files in place, list them and the rollback command before proceeding.
See also
Section titled “See also”docs/preview-first-batch.md (worked examples, the 2026-04-30 incident postmortem, rule interactions, self-test) · always-ask-on-unresolved.md (the strict-ask mandate this depends on) · coding-guidelines.md §4–§5 (before/after verification gates)