Pact Viewer Plan (a655)
Date: 2026-08-19 | Author: fv-gallery-mavis (id 8) | Status: in_progress
Ref: operator directive 2026-08-14 23:19 BST (DocHub, renamed Pact Viewer 2026-08-19 11:32 BST)
Ref: operator clarification 2026-08-19 09:32 UTC: must be a real registered gallery module, installable by other apps, listed in the Pact.
---
Goal
Pact Viewer = a real gallery module that any consumer app can npm install @avidtech6/fv-pact-viewer and render a module's Pact view (mockups + tone variants + personality + examples + warnings) inline. Same canonical module in the gallery registry, same npm package, same Pact doctrine entry.
---
Plan (12 steps)
- **PATCH a622 to rename DocHub -> Pact Viewer** [done]
- **Update local proposal file /workspace/.work/dochub-proposal/ -> pact-viewer-proposal/ with new naming**
- **Scaffold gallery module at modules/fv-pact-viewer/ (package.json @avidtech6/fv-pact-viewer, module.json gallery-original, module-meta.json, src/index.tsx, .gitignore)**
- **Add /pact-viewer/ route + PactViewerPage component to fv-gallery-ui (mockup + tone variants + personality + explanations per module)**
- **Add pact-viewer to gallery registry.json (modules[] with _canonical_home=gallery, _module_kind=gallery-original, tier=tier-1)**
- **Generate viewer content for 26 widgets (4-stage pipeline: extract -> LLM synthesize -> mockup render -> emit)**
- **Update fvw-v8 17.5 to add pact_viewer as a canonical 12-field shape a module MAY expose (doc layer, not runtime)**
- **Update Pact doctrine index (gallery-pact/fvw/freshvibe-way-v8/00-index.md) to list Pact Viewer as a built-in affordance of every module**
- **Publish @avidtech6/fv-pact-viewer to npm (auto-installable by other apps)**
- **Push to GitHub: fv-module-gallery feat/pact-viewer-module, fv-gallery-ui feat/pact-viewer-page**
- **Trigger feed rebuild (auto-deploy cron OR manual) so live /feed/registry.json has pact-viewer entry**
- **Verify on live: gallery.freshvibeapps.com/pact-viewer/<id> renders for any module; npm install @avidtech6/fv-pact-viewer works in a consumer app**
Handover
Provenance: Operator directive 2026-08-14 23:19 BST (DocHub). Operator rename 2026-08-19 11:32 (Pact Viewer). Operator clarification 2026-08-19 09:32 UTC: must be a real registered gallery module, installable by other apps, listed in the Pact.
Workspace state: /workspace/repos/fv-module-gallery/ (canonical), /workspace/repos/fv-gallery-ui/ (viewer UI), /workspace/repos/gallery-pact/ (doctrine)
Build hashes: fv-module-gallery @ 8a34d53 (pre-change), fv-gallery-ui @ e4e2497 (pre-change), fvw-v8 @ local working tree
Open questions (5)
- Q1: Module name - @avidtech6/fv-pact-viewer OR @freshvibe/pact-viewer OR something else? (recommend fv-pact-viewer for consistency with fv-theme-toggle, fv-source-link, fv-recipe-book-checklist)
- Q2: How should the viewer decide what to render? Read cms-widgets/<id>/pact_viewer.yml? Read existing 8 source files? Or both?
- Q3: How does the viewer know which app's version of a module to render? gallery canonical? consumer app version?
- Q4: Should the viewer be a React component OR a static HTML/JSON bundle OR both? (gallery UI = React, embedded in user apps = static)
- Q5: Should the gallery publish pact_viewer.yml files for ALL 26 widgets, or only the 12 at 11/11 (where we have full data)?
Acceptance
Operator can: (a) visit gallery.freshvibeapps.com/pact-viewer/<id> and see a rendered viewer for any module; (b) npm install @avidtech6/fv-pact-viewer in any consumer app and import <PactViewer moduleId='button' />; (c) read fvw-v8 17.5 and see pact_viewer listed as a canonical affordance; (d) see the module in the gallery's modules[] with tier=tier-1.
Verification (4 checks)
- `npm view @avidtech6/fv-pact-viewer` -> package metadata + version
- `curl -s https://gallery.freshvibeapps.com/feed/registry.json | jq '.modules[] | select(.id == "pact-viewer")'` -> module entry with tier=1
- `curl -sI https://gallery.freshvibeapps.com/pact-viewer/button | head -1` -> HTTP/1.1 200 OK
- `grep -l 'pact_viewer' gallery-pact/fvw/freshvibe-way-v8/17.5-modules.md` -> match in 17.5
---
Ref: a622 (proposal artifact, PATCHed in-place to rename to Pact Viewer)