# admin-deploy fragment

**ID:** `fvcms.fragment.admin-deploy.001`

## What it is

The **Deploy** admin panel. Shows the current build + deploy metadata, the 5-step workflow (build → test → audit → deploy → verify) per `app-pact` §12.4, a "Run pipeline" button, and a "Rollback" button. The audit step is non-skippable per the constitution.

## Public API

```js
import { openAdminDeploy, renderAdminDeploy } from 'app-fragments/admin-deploy/index.js';
const panel = openAdminDeploy();
```

## Recipe (10-item, abbreviated)

1. **purpose** — pipeline runner + rollback trigger
2. **inputs** — `meta[name="x-build-tag"]`, `meta[name="x-deploy-date"]`, `location.pathname`
3. **outputs** — 5-step workflow display, run button, rollback button
4. **state machine** — same as other panels
5. **event bus** — emits `pipeline:started`, `pipeline:step-done`, `pipeline:complete`, `pipeline:rollback`
6. **dependencies** — `vendored/fvw-v8/19-recipe-extraction.md`, `vendored/fvw-v8/35-path-a-deploy-rollback.md`
7. **constitutional refs** — app-pact §12.4, §12.12
8. **tier** — T2
9. **canonical home** — `app-fragments/admin-deploy/`
10. **recipe** — this file

## Audit step

The 3rd step in the workflow runs `fvcms audit` (or `npm run audit`) per `app-pact` §12.4. The audit checks:
- DNA exists and parses
- DNA version matches package.json
- 9-folder layout matches canonical
- codex events match implementation emits
- recipe ingredients all exist as files
- 20 hard gates (G-01 through G-20)
- 3-phase drift discovery protocol (DETECT/DISCOVER/REPAIR)
- 12.1 9-folders explicit
- 12.4 audit-in-deploy (this one)
- ... and the other 9 §12.* checks

**Audit must pass before deploy. No exceptions.** A deploy without an audit is treated as a violation of the constitution.
