# FvW Alignment Audit — Phase 1 (doctrine) + Phase 2 (code inventory) **Date:** 2026-09-14 **Audit lane:** id 9 (vibecoder-standalone-mavis) **Code HEAD:** 037f067 (vibecoder-standalone), 4d8139d (fv-module-gallery), 91a242e (FVRE) **Phase 1 predecessors:** Sprint 1 outputs (fvw-map.md, planned-tests.yaml, manifest.json, pact-docket, constitutional-atlas) **Phase 2 predecessor:** Phase 2 audit a1099 (id 9, 2026-09-14 02:30) — pre-Sprint-2 numbers --- ## Phase 1 — Doctrine artefact table Sprint 1 + Sprint 2 produced or refreshed the canonical FvW artefacts in `/workspace/vibecoder-standalone/` and `/workspace/fv-module-gallery/`. This is the complete inventory as of HEAD `037f067` / `4d8139d`. ### TABLE A — Doctrine artefacts (21 items) | # | Artefact | Path | Version | Generated | Freshness | |---|---|---|---|---|---| | 1 | FvW doctrine root | `/workspace/fv-module-gallery/gallery-pact/fvw/` | 8.6.0 ratified | 2026-09-14 (b30XX) | **FRESH** (commit 4d8139d) | | 2 | FvW VERSION file | `…/freshvibe-way-v8/VERSION` | 8.6.0 | 2026-09-14 | FRESH | | 3 | validator-v8.json | `…/fvw/validator-v8.json` | fvw_version 8.6.0 | 2026-09-14 | FRESH | | 4 | G40 (UI compliance) | in validator-v8.json | n/a | 2026-09-14 | DEFINED (10 references) | | 5 | G41 (FVRE fidelity) | in validator-v8.json | n/a | 2026-09-14 | DEFINED (1 reference) | | 6 | G21–G25 (FVRE gates) | — | — | — | **MISSING** (no references in validator-v8.json) | | 7 | §00.12 World-Class UI Standard | `…/00.12-world-class-ui-standard.md` | v8.6.0 ratified | 2026-09-14 | FRESH (incl. §00.12.11 forward-only) | | 8 | Constitutional atlas (gallery) | `…/trace-atlas/constitutional-atlas.json` | fvwVersion 8.6.0 | 2026-09-14T10:44:25Z | **FRESH** (Sprint 1 D3 bump; previous 8.4.1, previousGeneratedAt 2026-09-07T17:46:00Z) | | 9 | Older pact docket (free-floating) | `/workspace/pact/pact-index.json` | v8.6.0 | 2026-09-14T10:44:02Z | FRESH (Sprint 1 D2 snapshot in `docs/pact-docket/`) | | 10 | /workspace/pact/pact-rules.json | `/workspace/pact/pact-rules.json` | v8.0.0 (unchanged) | locked 2026-09-06 | STALE (8d, forward-compatible rules) | | 11 | /workspace/pact/drift-log.jsonl | `/workspace/pact/drift-log.jsonl` | n/a | last write 2026-09-06 | STALE (8d) | | 12 | VibeCoder 8 constitutional artefacts | `/workspace/vibecoder-standalone/app-*` | n/a | 2026-09-14 (Sprint 1 adds planned-tests.yaml) | mixed (5 substantive + 3 stub-consolidated per Phase 2 audit) | | 13 | app-trace-atlas/atlas.json | `/workspace/vibecoder-standalone/app-trace-atlas/atlas.json` | schema freshvibe-way-v4.trace-atlas (snake_case) | 2026-09-14T10:44:47.208Z (b3021 Sprint 2) / source_head a2062aa | **FRESH in schema, source_head 4 commits behind HEAD 037f067** | | 14 | app-recipe/manifest.json | `/workspace/vibecoder-standalone/app-recipe/manifest.json` | fv_compliance_version v8.3.0+v8.4.0+v8.6.0 | 2026-09-14T10:55:00+02:00 | FRESH (Sprint 1 D4 fvw_compliance block) | | 15 | app-vp/planned-tests.yaml | `/workspace/vibecoder-standalone/app-vp/planned-tests.yaml` | 1.0 | 2026-09-14T10:50:00+02:00 | FRESH (194 scenarios, 17 modules, d000060 source) | | 16 | app-pact/*.json + .md | `/workspace/vibecoder-standalone/app-pact/` | n/a | 2026-09-08 22:27 (substance) | **STALE** (6 days, not regenerated) | | 17 | app-dna/app.dna.json | `/workspace/vibecoder-standalone/app-dna/app.dna.json` | schema freshvibe-way-v8.app-dna | updated_at 2026-09-09 | STALE (5 days) | | 18 | app-vp/* test files | `/workspace/vibecoder-standalone/app-vp/{protection,validity}/` | n/a | 2026-09-07 | STALE (7 days, not regenerated) | | 19 | app-recipe/codex.md | `/workspace/vibecoder-standalone/app-recipe/codex.md` | n/a | 2026-09-08 22:27 | STALE (6 days) | | 20 | docs/architecture/fvw-map.md | `/workspace/vibecoder-standalone/docs/architecture/fvw-map.md` | n/a (new) | 2026-09-14T10:53:08 | FRESH (Sprint 1 D6) | | 21 | FVRE engine | `/workspace/freshvibe-reconstruction-engine/` | 5 commits since 2026-07 | last commit 91a242e (Aug 12 era) | **STALE** (FVRE has not been touched since 2026-08-12; 33 days) | ### 5 PACT indexes (per Sprint 2 b3022) | # | Index | Path | Lines | Status | |---|---|---|---|---| | P1 | surface-map.md | `/workspace/vibecoder-standalone/pact/surface-map.md` | 85 | GENERATED (3 of 5, 6.3KB) | | P2 | lifecycle-map.md | `/workspace/vibecoder-standalone/pact/lifecycle-map.md` | 33 | **SKELETON** (hand-author required) | | P3 | host-map.md | `/workspace/vibecoder-standalone/pact/host-map.md` | 17 | **SKELETON** (hand-author required) | | P4 | naming-map.md | `/workspace/vibecoder-standalone/pact/naming-map.md` | 1180 | GENERATED (28KB, 1408 exports, 218 collisions) | | P5 | contradiction-docket.md | `/workspace/vibecoder-standalone/pact/contradiction-docket.md` | 30 | GENERATED (1.6KB, 10 candidates) | **Note:** These PACT indexes live at `pact/` in the repo, not under `gallery-pact/trace-atlas/` or `docs/`. Generator at `tools/gen-pact-indexes.cjs` (Sprint 2 b3020). ### Phase 1 summary - **21 doctrine artefacts inventoried** (8 §01.9 constitutional + 4 PACT indexes + 6 supporting + 1 each: validator, atlas, manifest, planned-tests, fvw-map, FVRE, older docket). - **Of 21:** 9 FRESH, 5 STALE (5+ days without regeneration), 1 kn missing (G21-G25), 0 truly absent (all locations have content). - **5 PACT indexes:** 3 generated, 2 skeletons. - **Biggest doctrine gap:** G21-G25 missing entirely from validator-v8.json. These are documented as FVRE-related gates in FvW §08 but never defined as JSON-schema rules. Second gap: FVRE last touched 2026-08-12 (33 days stale). --- ## Phase 2 — Code inventory ### TABLE B — Largest files (top 25 by line count) | File | Lines | Flag (>500) | |---|---:|:---:| | /workspace/vibecoder-standalone/src/cms/runtime/edge-panel/edge-panel.js | 3037 | 🔴 | | /workspace/vibecoder-standalone/src/vibechat/components/ChatPanel.tsx | 2390 | 🔴 | | /workspace/vibecoder-standalone/src/cms/runtime/panel-manager/panel-manager.js | 1995 | 🔴 | | /workspace/vibecoder-standalone/src/cms/edge-panel/edge-panel.js | 1760 | 🔴 | | /workspace/vibecoder-standalone/src/cms/fvcms-cms-panel/fvcms-cms-panel.js | 1536 | 🔴 | | /workspace/vibecoder-standalone/src/vcs/StandaloneContainer.js | 1497 | 🔴 | | /workspace/vibecoder-standalone/src/host/workspace/dna/dna-diff.test.ts | 1329 | 🔴 | | /workspace/vibecoder-standalone/src/host/host-boot.js | 1285 | 🔴 | | /workspace/vibecoder-standalone/src/vcs/vcs-css.js | 1262 | 🔴 | | /workspace/vibecoder-standalone/src/agent/tools.ts | 1158 | 🔴 | | /workspace/vibecoder-standalone/src/host/workspace/guidance/guidance.test.ts | 1046 | 🔴 | | /workspace/vibecoder-standalone/src/cms/fvcms-panel-manager/fvcms-panel-manager.js | 1046 | 🔴 | | /workspace/vibecoder-standalone/src/host/workspace/dna/dna-animation.test.ts | 977 | 🔴 | | /workspace/vibecoder-standalone/src/host/editor/Canvas.tsx | 974 | 🔴 | | /workspace/vibecoder-standalone/src/vibechat/tools.ts | 876 | 🔴 | | /workspace/vibecoder-standalone/src/cms/panel-manager/panel-manager.js | 835 | 🔴 | | /workspace/vibecoder-standalone/src/cms/content-admin.js | 813 | 🔴 | | /workspace/vibecoder-standalone/src/cms/runtime/content-admin.js | 812 | 🔴 | | /workspace/vibecoder-standalone/src/host/editor/__tests__/editor-r217.test.tsx | 796 | 🔴 | | /workspace/vibecoder-standalone/src/host/editor/selection.ts | 788 | 🔴 | | /workspace/vibecoder-standalone/src/host/workspace/dna/dna-editor-aware-patch.test.ts | 781 | 🔴 | | /workspace/vibecoder-standalone/src/host/workspace/dna/dna-curve.test.ts | 775 | 🔴 | | /workspace/vibecoder-standalone/src/host/editor/vibechat/vibechat-unified.test.ts | 767 | 🔴 | | /workspace/vibecoder-standalone/src/vcs/VibeChatSurface.js | 759 | 🔴 | | /workspace/vibecoder-standalone/src/host/editor/TimelineR221.tsx | 730 | 🔴 | **Count over 500 lines:** 25 of 25 listed (the entire top-25). Total frontend src: 141,885 lines. ### Backend bridge (`/opt/vibecoder-bridge/server.cjs`) - **Lines:** 5,317 (single monolith) - **Total route handlers:** 183 - **Routes by prefix:** - `/api/agent/*` — 212 occurrences (largest) - `/api/collections/*` — 27 - `/api/cascade/*` — 11 - `/api/fvw` — 4 - `/api/coding` — 1 ### Editor / Cinema (`src/host/editor/`) 29 files, 12,131 lines (per Phase 2 audit). All real (Canvas 974, Composer, Inspector, Timeline, VSILEditor, AI controls, Cinema sub: CurveEditor/Handle/Preview/Section). No stubs. The biggest test files (dna-diff 1329, dna-animation 977, dna-editor-aware-patch 781, dna-curve 775) are integration tests under `src/host/workspace/dna/` and validate the DNA animation system. ### Mounts (`src/host/mounts/`) 4 files: CompositionGraphHost.tsx, InspectorHost.tsx, PreviewHostVSIL.tsx, mounts.ts. All real. ### CMS (`src/cms/`) - **Version:** 1.3.0 (per `FV-CMS-VERSION.txt` and `FV-CMS-MANIFEST.json`) - **Vendored:** YES (from `/workspace/freshvibe-cms/`) - **Lines:** 15,349 (src/cms + src/cms/runtime) --- ## Phase 1+2 — Plain-English summary ### Doctrine (Table A) - 21 artefacts inventoried: 9 FRESH, 5 STALE (5+ days without regen), 1 missing (G21–G25 in validator). - **Biggest doctrine gap:** G21–G25 missing from validator-v8.json. These gates are referenced in FvW §08 anti-drift and §26 FVRE lifecycle but never machine-defined. Operators cannot enforce FVRE conformance with current JSON-schema tooling. - **Second gap:** FVRE engine last touched 2026-08-12 (33 days stale). No integration into VibeCoder build per §00.12.4. - **Third gap:** `app-trace-atlas/atlas.json` regenerated by Sprint 2 (b3021) in snake_case correctly, but `source_head` points to `a2062aa` (drift guard commit) — 4 commits behind current HEAD `037f067`. Stale snapshot of code state even though file itself was regenerated 2026-09-14. ### Code (Table B) - 25 frontend files > 500 lines; top-3 are 3037, 2390, 1995 lines. - Backend bridge is 5,317 lines, 183 routes, 5 prefix buckets. - Editor (29 files) and mounts (4 files) are real, no stubs. - CMS vendored at v1.3.0. ### Single biggest doctrine gap visible from Phases 1+2 **The validator is missing 5 FVRE-related gates (G21–G25) that other doctrine (FvW §08, §26) refers to but never machine-encodes.** Without these gates in `validator-v8.json`, the gallery compliance checker cannot validate FVRE conformance — and VibeCoder's app-recipe/manifest.json declares `fvre_clause: LEGACY` with `fvw_compliance.fvre_clause: "LEGACY"` because there is no enforceable rule. The path forward is **authoring G21–G25 entries in validator-v8.json + a small FVRE reference runner** (could be Sprint 3 territory if the operator agrees to expand the §00.12 work). --- ## Provenance + integrity - Audit read-only: no source files modified, no commits made. - All artefact paths verified to exist on disk. - Generated_at / source_head extracted where present; UNKNOWN where absent (none required UNKNOWN verdict here). - 8 §01.9 constitutional artefacts all exist at the repo root (per Phase 2 audit a1106). - Sprint 1 + Sprint 2 outputs are committed (037f067, 4d8139d, 4208a80, c5ea820, a6124fa, e3854b4, 1ffb9f5, 9dd7e1c, 1636da6).