---
name: plan-preflight
description: Use before launching any run-plan/workflow execution to drain every human decision out of the plan upfront — "release all blockers before running", "will this HALT on anything?", "preflight the plan", "make this plan run unattended overnight". Scans plan for HALT-shaped items (irreversible ops, requires_decision tasks, ambiguous scope, missing creds), batches all questions into one AskUserQuestion round, bakes answers into the plan.
---

# Plan-Preflight — Drain Human Blockers Before Launch

Audience: AI coding agents first.

MUST follow `/home/user/Projects/0 DOCS/GIT_FATIGUE.md` §12. Git/CI/publication mechanism is NEVER a user decision. Only unresolved product intent may become `Needs product decision`.

An unattended run that HALTs at 2am on a question answerable at launch wasted the whole night. Rule: **every predictable human decision is asked ONCE, upfront, in one batch — then the plan carries the answers.**

## Steps

1. **Load plan**: the `docs/plans/*-<slug>.jsonl` + its plan/spec docs (anchors). No slug given → `plan-inventory` skill first.
2. **Scan for HALT-shaped items** — flag a task when ANY hold:
   - irreversible op: `DROP|DELETE|TRUNCATE|migrate|force-push|rm -rf|deploy to prod|rotate key|delete bucket`
   - `requires_decision: true` on a task record
   - ambiguous scope: task desc admits ≥2 materially different implementations
   - external dependency: credential, API key, account choice, third-party approval
   - deployment target changes product behavior or exposure; internal merge/push/PR mechanism is controller-owned and NEVER user-facing
3. **Resolve what YOU can first**: read project memory/CLAUDE.md/specs — a question answered by existing doctrine is NOT asked. Only genuine user-owned decisions survive.
4. **Ask ONE batch**: AskUserQuestion, max 4 questions per call, chunk if more. Each question quotes the task id + exact risky operation. NEVER open-ended — give concrete options.
5. **Bake answers in**: append `direction` records (answer verbatim, tagged with task id) to the plan JSONL; flip `requires_decision` intent to resolved in the record you append (NEVER rewrite existing `task` lines — engine journal owns progress). Schema = brainstorm's Session File spec; follow it, do not invent.
6. **Report**: table — task id, blocker, resolution. Declare plan preflight-clean or list residual HALTs that are inherently runtime (e.g. gate failure) and cannot be pre-answered.

## Boundaries

- DO NOT pre-authorize irreversible ops the user did not explicitly answer — an unasked DROP TABLE stays a HALT.
- DO NOT edit task bodies/waves — preflight adds directions, never restructures the plan (that is `plan`/`brainstorm` work).
