# Vector seed handover

Vector is now a contract-first seed in the bootstrap stage. It is a self-hosted internal issue tracker for one business, centred on evidence-backed triage and a deterministic Current stream. `CONTRACT.md` and `BASELINE.md` are the product authority for the backend build; `seed.json` is an honest first manifest whose limits and cost are still estimates.

`CONTRACT.md` has since been through an adversarial review pass and now holds 88 clauses. Read it, not this file, for behaviour. `DIVERGENCE.md` records friction with the shared seed-spec documents that should be fixed centrally rather than here.

The first architecture, data, and visual-port milestones are now in place: `pnpm dev` runs an immutable D1 migration locally before starting the Cloudflare Worker. Its Hono API seeds `sample-data/vector.ts` through Zod validation, services, and Drizzle repositories only in the local sample environment. Read endpoints exist for Current, My work, parameterized issue and project detail, project portfolio, search, and filter options. Current/My work are deterministic pure projections with the documented precedence; the seeded FLW-842 intake preserves its source evidence and policy recommendation. `src/ext/config.ts` owns the graphite/cream/lavender landing identity and theme tokens. A local operator session resolves the configured sample operator in development; native magic-link sessions are still not implemented. The code-native React UI serves the owner landing, truthful mail-unconfigured sign-in state, `/app` Current, `/app/current/$identifier`, `/app/my-work`, `/app/my-work/$identifier`, `/app/issues/$identifier`, `/app/projects`, `/app/projects/$projectId`, and `/app/new-issue`; it validates real Hono responses and does not import prototype content.

Issue creation and the manual Accept, Defer, and Decline intake decisions now persist through version-checked Hono routes and atomic D1 batches, including durable team sequence allocation, activities, and decision history. New Issue restores a browser-local unsent draft per workspace/operator, filters status and cycle options to its selected team, clears its draft only after a successful POST, and navigates to the returned issue. Projects detail now exposes only recorded issue, team, cycle/capacity, dependency, progress, and risk facts. The command palette searches real issue/project records and exposes only the implemented routes; saved views are intentionally omitted because there is no real apply route. Source intake, scheduled deferral return, notifications, and policy overrides remain later work.

## Required rendering migration before implementation resumes (2026-09-08)

TanStack Start is the adopted shared React document layer. The **FIRST** resumed
implementation step is conversion through the accepted recipe, before further
product work. It is recorded locally at
`/Users/zemaj/.orchestrator/evidence/runeditrun/default-seed-on-tanstack-start-with-the-migration-recipe/MIGRATION.md`
and portably at [TANSTACK-START-MIGRATION.md](https://github.com/runeditrun/seed-spec/blob/main/TANSTACK-START-MIGRATION.md).

This is a forward target, not a claim that the current Hono/Vite + React +
TanStack Router runtime above has already migrated. Preserve the Vector contract,
native auth, declared Hono HTTP surfaces, D1 data guarantees, and the custom
Worker entry's event and named exports. After conversion, Start owns selected
React document routes and `/_serverFn/`; Hono keeps only explicit HTTP families.
A returning orchestrator must bring these committed main-branch notes into any
existing parked implementation worktree before resuming it. Meet the recipe's
full local-workerd acceptance instead of treating a successful build as proof.

## Manifest

- 8 September 2026 — `seed.json` migrated to `seeds/base/schema/SEED.schema.json` and given `category: projects`, `spine` (`projects`, "issue or task in a container") and `replaces` (Linear then Asana, both with a null edition); env `purpose` became `why`, the external's `adapter` and `dataLeavingDeployment` became `adapters` and `data`, `deploy.apiPrefix` became `apiPath`, `customFields.entities` became the array, and `accessibility` became `{level, status}` with the AA automated level folded into the status sentence. Four things had no home in the schema and are recorded here rather than dropped: the top-level `$comment` said limits and operating cost are estimates until the load test and deployment pass replace them, which `limits.status` and `operatingCost.status` already say; `contract` named `CONTRACT.md` and `BASELINE.md`, which is the catalogue-wide convention and not a per-seed fact; the transactional-email external carried `status: "planned"`, meaning the mail adapter is still unimplemented, as this file already records for magic-link sign-in; and `publicPaths` wrote the asset route as the glob `/assets/*`, now the prefix entry `/assets/` the schema defines.

## UI port record

### Ported surfaces and contract traceability

This is a route-to-clause map, not a claim that every clause below is fully implemented end to end. The completed operator surfaces use the real read/create spine named above.

- `/` is the configured owner identity plate: `HOME-001`.
- `/signin` is the honest mail-unconfigured access surface: `BASE-ACCESS-001`; native magic-link completion is still backend work.
- `/app` and `/app/current/$identifier` render the disjoint, explainable Current stream: `CURR-001` through `CURR-009`; the FLW-842 evidence and manual decision detail covers `INTAKE-004` through `INTAKE-007`.
- `/app/my-work` and `/app/my-work/$identifier` render the personal execution queue and active-cycle context: `WORK-001` through `WORK-003`.
- `/app/issues/$identifier` is the real parameterized issue detail route, retaining stable issue identity under `ISSUE-002`.
- `/app/projects` and `/app/projects/$projectId` render real portfolio progress, active-only health, and recorded risk evidence: `PROJ-004` through `PROJ-007`.
- `/app/new-issue` submits the real issue mutation and restores a browser-only unsent draft: `ISSUE-001` through `ISSUE-003`, `ISSUE-011`, `ISSUE-014`, and `ISSUE-015`.
- The visible Search control and command palette use the real search endpoint and implemented routes: `SEARCH-001`, `SEARCH-002`, `CMD-001`, and `CMD-002`. Saved views remain absent from the palette because no selectable saved-view route exists.

### Designed fresh

- The owner identity plate and the truthful mail-unconfigured sign-in state were designed from the configured identity and access clauses; the reference had no public owner surface.
- The real Projects portfolio/detail treatment, explainable risk detail, command-palette interaction rules, and complete New Issue form were designed from their contract clauses where the reference provided only fixture-driven or thin states. They retain the accepted dark, dense visual language without introducing fabricated trends, saved-view actions, notifications, or optimistic success states.
- Empty, loading, error, and unconfigured states were designed around the actual read/create responses and missing mail capability; they never substitute fixture content for a failed route.
- The 390px bottom navigation and form/list control sizing were implemented from the same real routes after rejecting the prototype's conflicting mobile checkout-failure canvas.

### Visual evidence

`visual/00-owner-landing.jpg` is the catalog image and intentionally comes first. The following current captures cover Current, FLW-842 evidence, My work, portfolio, project risk, command palette, New Issue, and the 390px Current layout. They are captured from the local real-data Worker/UI, not from the removed prototype.

## Product decisions to preserve

- Current is the primary shared surface. It is a disjoint Needs decision → Now → Next → Recently done stream, and every item explains why it surfaced.
- Intake is a decision, not another unlabeled backlog. The canonical flow is Accept, Defer, or Decline; the decision and evidence remain visible for team learning and triage metrics.
- The canonical scenario is the seeded FLW-842: operational evidence, customer impact, likely cause, recommended owner and priority, followed by an explicit decision. Its ported detail inspector shows measurements, source versus policy provenance, activity, and durable decisions.
- My work is a personal Waiting / Now / Next execution queue with active-cycle context.
- Projects expose explainable health and the concrete issues, dependencies, dates, scope, and capacity behind risk. Project lifecycle remains an operator decision.
- Search, saved views, the command palette, and keyboard shortcuts are first-class operator workflows.
- The dark, dense visual system, responsive split-pane behavior, bottom quick navigation, evidence inspector, project risk cards, and context-rich issue form are accumulated design refinement to port, not generated code to preserve.

## Prototype cleanup

- The throwaway `public/vector/` prototype, including its fixture data, generated scripts, holding pages, and conflicting `p1-current-b.html` mobile canvas, was removed after the real UI and visual evidence were captured. No product code imported it.
- The stale `src/data/` and `src/state/` Northstar fixture directories are already absent. The real sample boundary is `sample-data/vector.ts`, seeded through the application service only in local development.
- Parameterized Current, project, and issue routes now resolve actual records; the New Issue draft remains only in the originating browser until the successful real create mutation.

## Backend and contract coverage still owed

Many tracker clauses remain incomplete end to end. `HOME-001` now has the code-native owner landing and mail-unconfigured sign-in state; the Current/My work/detail UI is a real read and manual-intake-decision spine. The next pass must add:

- native magic-link sessions and the replaceable transactional-mail adapter required by `BASE-ACCESS-001`, replacing the bootstrap session gate;
- mutations, R2 attachments, Queues, Cron, and a typed Hono RPC client;
- durable notification, failed-operation, idempotency, audit, comment, attachment, and source models;
- concurrency control, source and import idempotency, cycle snapshots and rollover, search indexing, deletion cascades, portable export/import, and explicit failure states;
- labels, mentions, bulk edit, persisted list controls, and keyboard focus and selection (ISSUE-013, ISSUE-014, VIEW-003, VIEW-004, CMD-003) — added by the contract review as table-stakes tracker behaviour the prototype implies but does not implement;
- one tagged test for every product clause and the shared baseline pack. `tests/contract.ts` is only the temporary name-prefixing helper; it does not claim a clause is satisfied;
- remote Cloudflare provisioning, generated Wrangler configuration, setup/deploy/smoke-test commands, preview deployment, portable export/import, release and licence metadata, sample data, and load-tested limits.

The transactional email provider is deliberately not chosen in this pass. The backend builder must select a concrete default, isolate it behind `mail.sender.v1`, and update `seed.json` environment names and cost assumptions rather than adding a generic runtime abstraction.

## Suggested next build order

1. Replace the local bootstrap session with native magic-link sessions, typed bindings, operator management, the `mail.sender.v1` adapter, and baseline access/input/security tests.
2. Add the remaining durable models and mutations through new immutable migrations: comments, attachments, audits, idempotency, notifications, source records, and failed operations.
3. Add source signatures, scheduled deferral return, notifications, and the `intake.recommendation.v1` policy override around the existing manual intake mutations. Current is already a tested read projection and its mutation coverage exercises the FLW-842 decision flow.
4. Add cycle snapshots, rollover, Cron, and failed-operation visibility to My work and Projects while preserving the existing explainable `project.health.v1` vocabulary.
5. Implement complete full-text search, saved views, persisted controls, bulk editing, notifications, preflighted import, and portable export/import. Exercise duplicate deliveries and partial provider failures, not just happy paths.
6. Extend the feature-owned React UI only as those completed routes and mutations arrive. Preserve the current hierarchy, keyboard behavior, and real error/empty states; do not add fixture-backed saved-view selection, project mutations, AI, comments, attachments, or notifications prematurely.
7. Finish extension mounts and examples, `LICENSE` and `RELEASE.json`, remote Cloudflare setup/deploy/export/import commands, CI previews, contract coverage reporting, baseline tests, accessibility checks, load tests, and e2e journeys. Replace every estimated limit in `seed.json`, run `pnpm verify`, deploy a real preview, and refresh `visual/` when a key screen changes.
