ID9 — FreshCards Location Discovery

**Operator directive** (2026-08-29): Locate the FreshCards module inside the Studio codebase. Confirm whether it exists as a standalone repo, a legacy module, or inside `studio-modules`. Produce a short report describing its current structure, dependencies, and suitability for reuse inside VibeCoder as the unified Gallery selector layer.

**Discovery-only.** No code, no pact edits, no extraction.

---

TL;DR

**FreshCards is BOTH**:

**The studio module is the canonical home** per D-056 (FreshCards = 4th sovereign workspace + substrate). The standalone repo is the *deployment* of the sovereign-workspace view.

**Suitability for VibeCoder reuse as Gallery selector layer**: **HIGH, with a 1-file caveat.** The studio module exports the `<Card>` + `<InnerCard>` + `useInnerCardStack` primitives (Phase A substrate view), the 4 database views (Gallery / Kanban / List / Calendar), the SurfaceRegistry, and the PeekManager — all directly reusable. The caveat: it's currently mounted only inside `avidtech6/freshvibestudio` (the host Studio); `avidtech6/vibecoder-standalone` does NOT reference FreshCards. Wiring it into VibeCoder requires the 12-step vendor-extract from `FRESH-CARDS-RECONCILIATION-ANALYSIS.md` (already documented but not executed).

---

1. Location — confirmed

| Home | Repo | Path | Tier | State |

|------|------|------|------|-------|

| **Canonical (in Studio)** | `avidtech6/freshvibestudio` | `studio/modules/freshcards/` | platform-supreme (tier 4) | active, v0.1.0 |

| **Standalone (deployment)** | `avidtech6/FreshCards` (private) | `/` | workspace | v0.14.0, 174 commits (snapshot 2026-06-22) |

| **FreshCards legacy/generic** | `avidtech6/freshvibestudio` | `studio/modules/freshcards-generic/` (referenced in `module-registry.json`) | alternative | exists, lower-tier alternative |

**Not in `avidtech6/vibecoder-standalone`.** Verified by `grep -r "reshcards" /workspace/vibecoder-standalone/src/` → 0 matches.

**Not a single-file legacy module.** It's a full subdirectory with `__tests__/`, `recipe-book/`, `src/` (8 top-level files + 7 subdirs).

---

2. Current structure (studio module)

Top-level

```

/workspace/freshvibestudio/studio/modules/freshcards/

├── module.json # 1750 bytes, manifest

├── __tests__/ # 7 test files

│ ├── _test-helpers.tsx

│ ├── c7-reproducibility.test.tsx

│ ├── inner-card-stack.test.tsx

│ ├── phase-d-editor.test.tsx

│ ├── phase-e-peek.test.tsx

│ ├── phase-f-prompts.test.tsx

│ ├── phase-g-import.test.tsx

│ └── cards/ # (vibecoder cards, see drift note)

├── recipe-book/ # 1119 LoC of doctrine

│ ├── recipe.md # 349 LoC — the canonical recipe

│ ├── codex.md # 261 LoC

│ ├── rules.md # 255 LoC

│ ├── plan.md # 175 LoC

│ ├── coverage-matrix.md # 79 LoC

│ ├── ingredients.json # structured

│ ├── module-meta.json

│ ├── dna/app.dna.json

│ ├── dna/lineage.md

│ ├── diffs/

│ └── trace-atlas/

└── src/ # 2973 LoC, 8 top-level + 7 subdirs

├── Card.tsx # 299 LoC — substrate primitive

├── InnerCard.tsx # 63 LoC

├── InnerCardStack.tsx # 189 LoC

├── Workspace.tsx # 278 LoC — sovereign shell

├── FreshCardsContext.tsx # 1059 LoC — Phase A data layer

├── surfaces.tsx # 828 LoC — Phase 2 surface model

├── workspaceDef.tsx # 99 LoC — boot wiring

├── hostCallbacks.ts # 61 LoC

├── index.ts # 97 LoC — public API barrel

├── ai/ # FreshCardsPrompts, DoneCard

├── cards/ # PageEditorCard

├── components/ # Breadcrumb, CardCover, PageTree, etc.

├── editor/ # BlockNote wrapper

├── import/ # NotionImporter (6-step wizard)

├── registry/ # SurfaceRegistry, SurfaceLifecycleManager, fragmentRegistry

├── state/ # PeekManager, eventBus

├── themes/

└── views/ # GalleryView, KanbanView, ListView, CalendarView, DatabaseViewSwitcher

```

`module.json` key fields

```json

{

"module_id": "freshcards",

"version": "0.1.0",

"type": "workspace-substrate",

"tier": "platform-supreme",

"platform_supreme": true,

"constitutional_basis": [

"pact/platform/cards/cards.md",

"pact/freshvibe-way-v7/23-two-view-substrate.md",

"pact/blueprint/workspace/workspace-model.md",

"pact/platform/workspaces/workspace-registry.md"

],

"depends": [

"@mantine/core",

"@mantine/hooks",

"@tabler/icons-react",

"../chrome/chip-system/src",

"../../src/state/StudioContext"

]

}

```

`type: "workspace-substrate"` matches D-056 exactly. "Module" is the **implementation level** (Lv 3 in FvW §10), not a separate constitutional view.

`src/index.ts` public API (the 7 export groups)

1. **Card primitives** — `Card`, `InnerCard`, `InnerCardStackRenderer`, `useInnerCardStack`, `MAX_INNER_CARD_STACK`

2. **Workspace shell** — `Workspace`, `WorkspaceProps`, `WorkspaceCard`

3. **Data layer** (Phase A, D-056 substrate view) — `FreshCardsProvider`, `useFreshCards`, `FreshCardsPage`, `FreshCardsDatabase`, `FreshCardsItem`, `FreshCardsProperty`, `PageType`

4. **CardChipSystem** re-export — `CardChipSystem`, `ChipDef` (so consumers don't need to know the chrome path)

5. **Database views** (Phase C) — `GalleryView`, `KanbanView`, `ListView`, `CalendarView`, `DatabaseViewSwitcher`, `DatabaseViewType`

6. **BlockNote editor** (Phase D) — `BlockNoteEditor`, `PageEditorCard`, `PageEditorInnerCard`

7. **AI prompts** (Phase F) — `FreshCardsPrompts`, `FreshCardsDoneCard`, `FRESHCARDS_PROMPTS`

8. **Notion import** (Phase G) — `NotionImporter`, `NotionImporterInnerCard`

9. **Peek back-of-card** (Phase E) — `FreshCardsBackOfCard`

`recipe-book/ingredients.json` shape

Each ingredient has: `id`, `type` (`substrate-component` / `substrate-hook` / `sovereign-component`), `source_file`, `license` (`avidtech6-proprietary`), `factory_function`, `props_interface`, `constitutional_basis`, `freshvibe_way_version`. Compatible with `@fvre/pipeline` extraction (per a478 / a580).

---

3. Dependencies

Direct npm deps (from `module.json`)

Internal deps

Critical dep note

FreshCards imports `../../src/state/StudioContext` (relative to `studio/modules/freshcards/src/index.ts`, this is `studio/src/state/StudioContext.tsx`). It depends on the **Studio host** for state. To vendor into VibeCoder, the StudioContext dependency must be either:

1. Replaced with a VibeCoder-equivalent (VibeCoder's `StateContext`)

2. Stubbed via a thin adapter

3. Or the entire StudioContext tree vendored with FreshCards (heavy)

This is the **1-file caveat** for VibeCoder reuse.

Consumers of freshcards src/ (in freshvibestudio)

---

4. The drift problem (real, documented)

Per `studio/FRESH-CARDS-RECONCILIATION-ANALYSIS.md` (224 lines, 2026-06-22):

**For VibeCoder**: vendor from `studio/modules/freshcards/src/` (canonical), NOT from `avidtech6/FreshCards/modules/cards/` (stale).

---

5. Suitability for VibeCoder reuse as Gallery selector layer

**Verdict: HIGH suitability, with 3 conditions.**

Why HIGH

The studio module already exports the exact primitives VibeCoder needs as a Gallery selector:

The VibeCoder cockpit (in `studio/modules/vibecoder/src/cards/`) already uses `<Card>` from FreshCards (per the imports in `BlueprintCard.tsx`, `StudioCard.tsx`, etc.). The pattern is **already proven** in the same repo.

The 3 conditions

1. **StudioContext adapter** — FreshCards imports `studio/src/state/StudioContext.tsx`. VibeCoder has its own state context. Need a 1-file adapter `studio-context-adapter.ts` that re-exports the VibeCoder equivalents under the StudioContext names FreshCards expects.

2. **@mantine/* already in VibeCoder's deps** — verify; if not, add to `package.json`.

3. **chromecss/chip-system path** — FreshCards uses `../../chrome/chip-system/src`. Either vendor that path or stub it.

The 12-step vendor-extract (already documented)

`FRESH-CARDS-RECONCILIATION-ANALYSIS.md` §5 outlines the 12 steps. None of them are blocking; all are 1-2 line file copies or import-path rewrites. Estimated effort: 60-90 min.

What FreshCards is NOT suitable for

For the ID10 work on VibeCoder (chrome-switch-v2)

Looking at recent ID10 commits (04908d2 "21 Gallery modules + FreshVibeOrigin template + Preview Engine"), the Gallery is being built as a *module catalog*, NOT as a FreshCards surface. If VibeCoder needs a unified Gallery selector layer (for picking FreshCards / VibeScope / VibeCoder surfaces), the right approach is:

This gives the operator's "unified Gallery selector layer" without forking.

---

6. Files of note

Must-read

Useful references

Drift warning

---

7. The 3 open questions for the operator

| # | Question | Default answer if no answer |

|---|----------|----------------------------|

| Q1 | Vendor from `studio/modules/freshcards/src/` (canonical) or from `avidtech6/FreshCards/modules/cards/src/` (stale)? | Canonical (studio) |

| Q2 | Full vendor or surface-only (SurfaceRegistry + GalleryView + Card primitives)? | Surface-only (60-90 min) |

| Q3 | Mount in `vibecoder-standalone` or in `avidtech6/freshvibestudio/studio/modules/vibecoder/`? | freshvibestudio (matches existing cockpit card pattern) |

---

8. VPS location (for the build step)

Per operator feedback 2026-08-30 ("always also give a link to docs in hq not just workspace links"), the canonical VPS location reference is at HQ:

Key VPS paths for the FreshCards → VibeCoder vendor step:

If the vendor step lands in `avidtech6/vibecoder-standalone`, the new files would be vendored into the local clone, then `npm run build` + scp to the VPS, then a `systemctl reload vibecoder-bridge` (or whatever the deploy hook is) to swap the bundle.

---

8. Cross-project reflex (for future Mavis sessions)

---

**Discovery-only. No code. No pact edits. No extraction. No implementation.**

— vibecoder-standalone-mavis (thread 9)