DUNIN7 · LOOMWORKS · RECORD
record.dunin7.com
Status Current
Path change-requests/cr-seed-viewer-v0_1.md

Change Request — Seed viewer (in-engagement) — v0.1

Document: cr-seed-viewer-v0_1 Version: v0.1 Date: 2026-06-28 Type: Phase change request — frontend only (Operator Layer loomworks repo). No engine change — the read endpoint already exists. Consumer: Claude Code (executor). Branch base: feat-companion-surface @ 9667d60 (current OL HEAD after the create-restore build this session — NOT dac9fec). Governing scoping note: loomworks-seed-viewer-scoping-note-v0_1. Grounding: loomworks-seed-model-grounding-inspection-v0_1 + the CR-drafting grounding pass (the GET …/seed route, SeedPayloadResponse, InEngagementHeader.tsx, DraftSpecification.tsx, the projects client — engine @ 5ccc3d7, OL @ 9667d60).


Plain-language summary

When you create an engagement, the Companion builds its seed with you and you watch it take shape. After you commit, that seed vanishes from view — the in-engagement screen shows the four rooms, the title, and the focus chip, but nowhere to see the engagement's own foundation document. This adds a way to view the committed seed: what the work is, who it's for, the voice, the constraints, the success conditions — the engagement's commitments, readable any time, with its version. View only — no editing (that's the separate seed editor, which builds on this). The engine already serves the seed; this is purely surfacing it.


What's true today (grounded at engine 5ccc3d7 / OL 9667d60)

The engine is done — better than the scoping note assumed:

The frontend has nothing:

Net: frontend-only, three pieces. The substrate (versioning, retention, the read route, auth, the structured response) is entirely done.


Seed alignment

Aligned — the seed is the engagement's foundation document; an Operator should be able to see the commitments they work against. "Only show what is available" applies: the seed is available (served, structured, auth-scoped); its absence from the surface is the surface failing to show it. Read-only respects Operator-authority cleanly — viewing changes nothing, so there is no state-transition concern in this piece (that arrives with the editor).


Decisions (settled, grounded)

  1. Frontend-only. The engine route, auth, and structured response all exist. No engine change.
  2. A new structured field/value renderer, not a reuse of DraftSpecification (which is create-bound and blob-based). Match DraftSpecification's vellum-Card / expandable visual pattern so it reads native.
  3. Current version only (the scoping note's lean) — render the current seed's fields + name the version ("Foundation document · version N" from seed_version). Version history browsing is deferred (pairs with the editor, which produces new versions worth browsing).
  4. Affordance in InEngagementHeader — desktop right cluster (a button beside the sort toggle, matching its styling), mobile near the name. Opens the viewer.
  5. Open shape: a panel/expandable on the in-engagement surface (lean) — the seed is not a room (same category care as the mobile Companion / create button); it opens as an overlay/panel/expandable from the header, not as a fifth room or a route. Confirm the exact open-mechanism at Step 0 against the surface's existing overlay/panel patterns.

Which fields to render (decided)

Render the Operator-facing commitments, in the schema's plain-terms labels:

Deferred / not rendered in this piece (named): initial_contributors/initial_agents (UUID lists — need name resolution to be Operator-legible, a separate concern), additional_assertions (dict — render shape TBD), is_divergent/divergence_rationale (a divergence-state concept that wants its own treatment). Lean: render the five core commitments + version now; the others are a follow-on once their display is designed. Confirm — if you want contributors/agents shown, that's a name-resolution add; flag it rather than dump UUIDs (which would violate "never show the UUID").


The build — steps

Per-step commits, suite green at each, halt-before-push. Frontend only; no engine, no migration.

Step 0 — inspect before building (no code)

Confirm against feat-companion-surface @ 9667d60:

  1. Branch at 9667d60.
  2. The in-engagement surface's existing overlay/panel/expandable pattern — how does any current affordance on this surface open a panel or overlay (if any)? The viewer should follow the surface's existing open-mechanism, not invent one. (If none exists, lean: a simple expandable panel anchored from the header, or a modal/overlay consistent with the app's existing modal pattern — identify what's there.)
  3. The InEngagementHeader desktop right cluster (:126-163) and mobile header (:73-103) — confirm the seat for the open-affordance and the sort-toggle styling template.
  4. The client-API idiom in src/lib/api/ — how a sibling read method is shaped (e.g. fetchConversationHistory, the projects fetchers) so fetchSeed follows it.
  5. The SeedPayloadResponse field names as the client type — mirror the engine schema exactly (snake_case wire → the client maps as the codebase does elsewhere).

Report findings, then build.

Step 1 — fetchSeed client method + type

Add to src/lib/api/ (a seed.ts or the natural home per the Step-0 idiom):

Suite expectation: new client method; add a unit test mirroring sibling fetch-method tests (success maps fields; error surfaces).

Step 2 — The seed-viewer component

A new structured field/value renderer (SeedViewer.tsx or similar) in the in-engagement surface directory:

Suite expectation: component test — renders the fields from a SeedPayload, shows the version line, handles loading + error. New tests; existing unaffected.

Step 3 — Header affordance to open it

In InEngagementHeader.tsx:

Suite expectation: header test — the affordance renders (both layouts) and opens the viewer; existing header tests unaffected.

Note: Steps 2 and 3 may share a commit if the open-mechanism couples them tightly; per-step is preferred but CC's call if the seam is cleaner combined.


Acceptance

What this does NOT do (scope boundary)


DUNIN7 — Done In Seven LLC — Miami, Florida Change Request — Seed viewer (in-engagement) — v0.1 — 2026-06-28 A read-only viewer of the committed seed (the five core commitments + version) opened from the in-engagement header, over the existing GET /engagements/{id}/seed route. Frontend-only — the engine serves a structured, plain-terms, auth-scoped response already. A new field/value renderer (DraftSpecification is create-bound, not reusable). Read-only — the prerequisite for the seed editor. Base 9667d60.