---
name: velin-rewrite-preflight
description: Bundled Apply-Gate preflight (OD-6): Manifest, Acceptance relation, Path, Target, MappingSource, Hash, TOCTOU, Conflict, Occurrence, Snapshot readiness. Emits GateResult[]. No Write. GATE_READY ≠ SAFE_REWRITE.
---

# Rewrite Preflight

## Purpose
Bundled Apply-Gate preflight (OD-6): Manifest, Acceptance relation, Path, Target, MappingSource, Hash, TOCTOU, Conflict, Occurrence, Snapshot readiness. Emits GateResult[]. No Write. GATE_READY ≠ SAFE_REWRITE.

## Domain
N · category `rewrite`

## Capabilities
- `rewrite.preflight`

## Permission
`review-only`

## Allowed actions
- READ
- ANALYZE
- VALIDATE
- PREFLIGHT

## Forbidden actions
- WRITE
- APPLY
- ROLLBACK
- ACCEPT
- DEFER
- NOTE
- ACKNOWLEDGE
- CATALOG
- MANIFEST
- CLASSIFY
- invent-target

## Stop conditions
- SR-04
- SR-05
- SR-06
- SR-07
- SR-08
- SR-20

## When to use
Bundled gates before dry-run/apply.

## Workflow
Run `migrate rewrite-manifest --preflight`.
Emit GateResult per gate (manifest, acceptance, path, target, mappingSource, hash, toctou, conflict, occurrence, snapshot).
Any blocking FAIL → STOP.

## CLI bridge
`velinstyle migrate rewrite-manifest <project> --preflight`

## Rules
- GATE_READY ≠ SAFE_REWRITE.
- No Write.

## Anti-Patterns
- Skipping gates.

## Related skills
- `velin-rewrite-manifest`

## Output
gate-report, gate-result, report
