# FvW Alignment Audit — Phase 3 — Doctrine vs Code Gap List **Date:** 2026-09-14 **Audit lane:** id 9 (vibecoder-standalone-mavis) **Audit PIN:** commit 037f067 (vibecoder-standalone HEAD at Phase 1+2) **Measured standard:** FvW v8.5.0 ratified (with v8.6.0 forward-only §00.12.11) **Forward-only caveat:** §00.12 principles apply to NEW work; existing code is exempt per §00.12.11 --- ## Phase 3A — Doctrine rules inventory FvW v8.6.0 (validator-v8.json) contains: - **10 principles** P1–P10 (World-Class UI Standard, §00.12) - **2 gates** G40 (UI compliance) + G41 (FVRE fidelity) - **FVRE clause** with `fidelity` + `alignment` rules - **No R-XXX style rules** in validator-v8.json (the validator encodes only v8.6.0 §00.12 + FVRE clause) The FvW doctrine documents (gallery-pact/fvw/freshvibe-way-v8/) reference gates G21–G39 across §08 anti-drift, §08.9 contradictions-VGM-enforcement, §13.9 shadow-store, and §17.9 VGM governance. **None of G21–G39 are machine-defined in validator-v8.json** — they are documented as gates but not machine-checkable. PACT indexes (vibecoder-standalone/pact/): - `surface-map.md` — 85 lines, 55 surfaces, GENERATED (b3022) - `naming-map.md` — 1,180 lines, 1,408 exports / 218 collisions, GENERATED - `contradiction-docket.md` — 30 lines, 10 candidates, GENERATED - `lifecycle-map.md` — 33 lines, **SKELETON** (HAND-AUTHOR) - `host-map.md` — 17 lines, **SKELETON** (HAND-AUTHOR) 8 constitutional artefacts (per §01.9): app-pact, app-codex, app-fragments, app-dna, app-trace-atlas, app-overlays, app-vp, app-recipe. VibeCoder uses 14-dir consolidated profile (per Sprint 1 D6 fvw-map.md). --- ## Phase 3B — Code compliance check ### 3B1. Modularity (file size) | Bucket | Count | Threshold | Verdict | |---|---:|---|---| | Files > 500 lines | 66 | per §08 anti-drift (informal) | **PARTIAL** — code lives; no machine gate enforces this | | Files > 1000 lines | 9 | commonly cited threshold | **PARTIAL** | | Files > 2000 lines | 4 | monolith candidates | **PARTIAL** | **Top monolith candidates:** `cms/runtime/edge-panel/edge-panel.js` (3,037), `vibechat/components/ChatPanel.tsx` (2,390), `cms/runtime/panel-manager/panel-manager.js` (1,995), `cms/edge-panel/edge-panel.js` (1,760). ### 3B2. Purity gates | Rule | Check | Verdict | |---|---|---| | P9-no-legacy: "no inline layout styles" | inline `style="..."` in tsx: **0 hits** | COMPLIANT | | P9: "no !important without comment" | not measured (would need AST scan) | UNMEASURED | | jQuery-era idioms | 0 hits in src | COMPLIANT | | React deprecated lifecycle (componentWillMount, UNSAFE_) | 0 hits | COMPLIANT | | layout tables (`` with role=presentation) | not measured | UNMEASURED | ### 3B3. Look enforcement | Check | Result | |---|---| | Files declaring `look` (annotation.ts pattern) | 0 in src | | Surfaces with `status` in app-surfaces/*.yaml | 1 with `formation`; others have status field but no `look` field found | | Verdict | **CANNOT EVALUATE** — PACT surface-map shows 1 unhomed, 0 deprecated; look declaration is per §02.1 but no machine check in validator-v8.json | ### 3B4. Constitutional artefacts self-validation | Artefact | Self-validation | Verdict | |---|---|---| | app-pact | No `app-pact/validators/` directory; pact is consumed by 10 bridge loaders (real usage) | LIVE (no self-test) | | app-codex | INTENTIONAL STUB per `app-recipe/manifest.json`; consolidated in app-{surfaces,behaviours}/ | CONSOLIDATED | | app-fragments | INTENTIONAL STUB; consolidated in `app-registry/modules.index.json` | CONSOLIDATED | | app-dna | `app-dna/app.dna.json` (17KB) + canonical twin `app-shell/identity.md` | REAL + TWIN | | app-trace-atlas | `tools/gen-trace-atlas.cjs` (b3020 Sprint 2) generates in snake_case per §04.3 | REGENERATED (4-7d source_head lag) | | app-overlays | INTENTIONAL STUB; reserved per FvW §2.1.6 | DEFERRED | | app-vp | 5 .test.ts files exist (4 protection + 1 validity); **not wired to CI** (per Phase 1+2 finding) | UNTESTED (CI gap) | | app-recipe | `app-recipe/manifest.json` with `fvw_compliance` block (Sprint 1 D4) | REAL | ### 3B5. §00.12 World-Class UI Standard (10 principles + FVRE clause) Source of rules: `validator-v8.json` P1–P10 + `fvre_clause`. Forward-only per §00.12.11 — existing code is exempt; only NEW work + substantially-modified LEGACY must comply. | P | Requirement | Code reality (037f067) | Verdict | Migration effort when touched | |---|---|---|---|---| | P1 | relative units (no px except icon/border/shadow) | 4,113 px lines in src; 614 px in vibechat/styles.css alone; 359 in cms/styles.css; 72 CSS files have px; 48 .tsx have px | **LEGACY** | HIGH (4,113 px → rem) | | P2 | rem typography | 539/543 font-size in px (99%); 2 in rem; 4 in em | **LEGACY** | HIGH (coupled with P1) | | P3 | WCAG AA contrast | 0 axe-core; 0 wcag tooling in src; only doc-level mentions | **LEGACY + UNMEASURABLE** | UNKNOWN until axe-core wired | | P4 | prefers-reduced-motion | 0 hits for `prefers-reduced-motion`; 54 `transition:` declarations + 9 `animation:` declarations | **LEGACY** | HIGH (wrapper rule + 63 declarations) | | P5 | keyboard / ARIA / semantic HTML | 92 aria-* declarations; 4 onKeyDown handlers; semantic HTML mostly used | **MIGRATING** | MEDIUM per surface | | P6 | 320px–4K responsiveness | 17 `@media` rules; breakpoints: 480, 600, 601, 640, 700, 768, 900 (lowest 480; no @320px; no @4K) | **MIGRATING** | LOW (add 320 + 1920+) | | P7 | Core Web Vitals (LCP, INP, CLS) | 0 lighthouse / web-vitals tooling | **LEGACY + UNMEASURABLE** | UNKNOWN until tooling | | P8 | meaningful empty/error states | 26 empty/error/fallback patterns; partial coverage | **MIGRATING** | LOW (audit + fill) | | P9 | no legacy patterns | 0 jQuery; 0 React deprecated lifecycle; 0 inline layout style | **COMPLIANT** | NONE | | P10 | world-class by construction | validator-v8.json defined but **NOT wired into CI** (no GitHub Actions checks; Sprint 2 added .github/workflows/ci.yml but only runs vitest + generator --check, NOT G40) | **LEGACY** | HIGH (CI gate integration) | | FVRE clause | FVRE-perfect + FvW-aligned reconstruction | FVRE not invoked from VibeCoder; `fvre_clause: LEGACY` in app-recipe manifest | **LEGACY** | HIGH (FVRE subprocess per §26) | ### 3B6. Trace atlas compliance (G21–G25) **Cannot be evaluated.** Phase 1 finding confirmed: G21–G25 are not machine-defined in `validator-v8.json`. They appear in the doctrine documents (§08 anti-drift, §08.9 contradictions-VGM-enforcement) but no machine gates exist. **This is a doctrine gap, not a code gap.** --- ## Phase 3C — Gap list ### A. Critical (blocks functionality or security) | Rule ID | Requirement | Code reality | Severity | Effort | |---|---|---|:---:|---:| | G40 (P10) | validator-v8.json wired into CI | Sprint 2 ci.yml runs vitest + generator --check, NOT G40 principle checks | **CRITICAL** | 1 wk (build gate) | | FVRE-clause | FVRE subprocess per FvW §26 | FVRE exists in `/workspace/freshvibe-reconstruction-engine/` but is not invoked from VibeCoder | **CRITICAL** | multi-week | | app-vp tests | run in CI | 5 test files exist but no CI invocation until Sprint 2 ci.yml | **CRITICAL** | hrs (wire to ci.yml) | ### B. Structural (monolith refactor + doctrine gaps) | Rule ID | Requirement | Code reality | Severity | Effort | |---|---|---|:---:|---:| | G21–G25 | machine-defined gates for FVRE-related anti-drift | **0 of 5 defined** in validator-v8.json | **MAJOR** | 1-2 wks | | P1 | relative units | 4,113 px lines in legacy CSS | **MAJOR** | multi-week (forward-only) | | P4 | prefers-reduced-motion | 0 wrappers; 63 transition/animation declarations | **MAJOR** | 1-2 wks (forward-only) | | Monolith refactor | server.cjs 5,317 lines, 183 routes; edge-panel.js 3,037 lines; ChatPanel.tsx 2,390 lines | no module split | **MAJOR** | ongoing | | G41 (FVRE) | machine-defined FVRE fidelity gate | Defined in validator but no FVRE subprocess to invoke | **MAJOR** | multi-week | | PACT lifecycle-map | 12 entity types × 4-6 lifecycle states | SKELETON — HAND-AUTHOR required | MAJOR | hrs (author + sign-off) | | PACT host-map | 24 host entities × 4 columns | SKELETON — HAND-AUTHOR required | MAJOR | hrs (author + sign-off) | | P7 | CWV tooling (lighthouse / web-vitals) | 0 | MAJOR | hrs to wire, days to enforce | | P3 | contrast tooling (axe-core) | 0 | MAJOR | hrs to wire | ### C. Cosmetic (naming, drift, docs) | Rule ID | Requirement | Code reality | Severity | Effort | |---|---|---|:---:|---:| | P2 | rem typography | 99% px font-size | MINOR (coupled with P1 forward-only) | hrs when touched | | P6 | @320px + @4K breakpoints | breakpoints 480–900 | MINOR | hrs when touched | | P8 | empty/error state completeness | 26 patterns, partial coverage | MINOR | hrs when touched | | P5 | onKeyDown handler coverage | 92 aria vs 4 onKeyDown | MINOR | hrs per surface when touched | | Look declarations | per-surface look enforcement | 0 in src; 1 unhomed surface in PACT | MINOR | hrs to declare | | inline style= in tsx | P9-no-legacy | 0 violations | COMPLIANT | NONE | --- ## Phase 3D — Verdict ### Counts | Bucket | Count | |---|---:| | Total rules inventoried | 22 (10 P principles + 2 G40/G41 + FVRE clause + 5 G21–G25 + 4 §02.1 artefact + 1 PACT) | | Compliant today | **1** (P9-no-legacy) | | Partial / MIGRATING | **3** (P5, P6, P8) | | LEGACY (forward-only, exempt today, migrate when touched) | **6** (P1, P2, P3, P4, P7, P10) + FVRE clause = **7** | | Cannot evaluate (doctrine incomplete) | **5** (G21–G25) | | Critical structural gaps | **3** (CI gates, FVRE wiring, app-vp CI wiring) | | N/A (rules applicable elsewhere) | 0 | ### Compliance score (informational, NOT for compliance audit use) - **P-principles that are COMPLIANT today:** 1 of 10 (P9) - **P-principles that are LEGACY:** 6 of 10 (P1, P2, P3, P4, P7, P10) — exempt per §00.12.11 - **P-principles that are MIGRATING:** 3 of 10 (P5, P6, P8) - **FVRE clause:** LEGACY - **Cannot evaluate (doctrine gap):** 5 gates (G21–G25) - **Overall weighted compliance:** ~10% (1 of 10 P-principles fully met today) ### Plain-English VibeCoder stands against FvW v8.6.0 as follows: 1. **Compliant in legacy terms:** P9 (no legacy patterns). 0 jQuery, 0 React deprecated lifecycle, 0 inline layout styles. 2. **Migrating on existing surfaces** when touched: P5 (accessibility), P6 (responsiveness), P8 (empty/error states). Each is partial and migrates incrementally as surfaces are touched for other reasons. 3. **LEGACY (exempt per §00.12.11):** P1 (px units), P2 (typography), P3 (contrast), P4 (motion), P7 (performance CWV), P10 (by-construction). These are large gaps in absolute terms but **none require retroactive migration** — they apply to NEW work via §00.12.11 forward-only. 4. **Cannot evaluate:** 5 anti-drift gates G21–G25 referenced in doctrine (§08, §08.9, §13.9, §17.9) but not machine-defined in validator-v8.json. **This is a doctrine gap, not a code gap.** Until G21–G25 are authored, neither gallery compliance checker nor VibeCoder builder can validate against them. 5. **Critical infrastructure gaps:** (a) app-vp tests not wired to CI until Sprint 2 ci.yml, (b) FVRE not invoked from VibeCoder build (fvre_clause: LEGACY), (c) validator-v8.json not gated in CI. 6. **Cosmetic:** most remaining gaps are SMALL when scoped per-surface — a single substantial-modification PR on a touched file can migrate from LEGACY to MIGRATING to COMPLIANT. The single biggest doctrine-side gap is **G21–G25 missing from validator-v8.json**. The single biggest code-side gap is **FVRE not wired into VibeCoder build**. Both are infrastructure-level projects (multi-week each) but neither is "compliance failure" — v8.6.0 just ratified today and §00.12.11 explicitly exempts existing work.