Skip to main content

Implementation Plan — Prism Administrative Console

Status: active — mobilizing. Console Lead: Porsche (Frank-appointed 2026-05-14 — drives all four lanes to shipped outcome). Pairs with: docs/proposals/administrative-console-proposal.md (v1.0 — the what/why). This is the how/who/when. Date: 2026-05-14 Target: all functions done today; one mode-aware, scope-driven console; WorkOS access control exercised from Wave 1.

0. How to read this plan

  • §1 — the load-bearing decision that gates everything else.
  • §2 — work breakdown by lane, every item concrete.
  • §3 — sequencing + critical path + the integration handoffs.
  • §4 — acceptance: what “done” means, per function.
  • §5 — risk register.
  • §6 — what gets filed (Plan + SPEC) and what stays deferred.

1. Gate-zero decision — the two seams (must land first)

Everything in this plan rests on two pluggable seams being shaped right. If they’re wrong, backend and UI build against a bad abstraction and Cloud later becomes a rewrite instead of an additive swap.
  1. Auth / identity seam — IdentityProvider interface. The console and every verb ask the seam “who is this + what is their scope + what role” — never the provider directly. Two bindings, WorkOS is the one we exercise now:
    • WorkOS binding (primary, exercised from Wave 1). WorkOS AuthKit session
      • WorkOS Organization Roles drive the real three-tier owner/admin/member gating. This is the binding Frank exercises the full console access mechanism with — the bootstrap-key path is single-superuser and has no RBAC to test.
    • Bootstrap-key binding (kept, not the test path). Local/LAN bootstrap-admin-key + localhost access. Still exists for pure-local use; it simply isn’t where the access mechanism gets exercised.
  2. Tenant-bootstrap seam — “a tenant exists with an owner” is produced by a bootstrapper. Local/LAN = bootstrap_personal_install() (exists). Cloud = prism_tenant_create. Downstream code consumes the result identically.
Action: Texi reviews and blesses the seam interfaces before backend or UI write against them.

GATE-ZERO RESULT — BLESSED 2026-05-14 (Texi, note 2146983a)

Verdict: BLESS_WITH_INTERFACE_CLARIFICATIONS. The two-seam shape is correct; WorkOS-primary / bootstrap-key-secondary is right; Cloud stays additive if backend + UI target normalized Prism authorization/bootstrap outputs, never WorkOS details. Released: Lane A A1w+A2, Lane B B3, Lane C C3 may all proceed. Build against these six interface clarifications:
  1. Name the seam ConsoleIdentityProvider returning a ConsoleAuthContext — distinct from the existing OAuthProvider.
  2. ConsoleAuthContext carries: normalized user, tenant scope, tenant_role (owner/admin/member/none), capabilities, and provider_context (audit only).
  3. The WorkOS raw role claim is never read for authorization. It maps through backend validation to memberships.role / capabilities; authorization reads the Prism-normalized role, not the raw provider claim. (This is ADR-53 made concrete.)
  4. Provider Organization maps to Prism Tenant only — never Prism org/dept authority.
  5. Unknown / missing role fails closed — except the bootstrap-key local single-superuser path.
  6. The tenant-bootstrap seam returns the same postcondition for Local/LAN/Cloud: tenant + owner + default org/dept + console entry scope, idempotently.

2. Work breakdown by lane

Lane A — Backend verbs + middleware (owner: Donna)

Backend acceptance: every verb has structured-failure returns + duration_s, every console verb enforces role-gating server-side (UI gate is UX only).

Lane B — Console UI (owner: Porsche)

UI acceptance: no Zustand selector allocation (React #185), uPlot not Recharts for any charting, Ansel-Adams palette, every state derived in render. Tested in a browser against a live local backend before “done.”

Lane C — Install / invite (owner: Lafonda)

Lane D — Reviews (owners: Texi architecture, Andora security)

3. Sequencing + critical path

Critical path: D1 → A1 → A1w (WorkOS binding) → A2 → (A3,A4 → B4) and (A2 → B3,C3). WorkOS binding is now on the critical path — it is what makes the role-gating real and exercisable. Backup (A6→A7→A8) is the longest single chain but runs parallel to the UI tree work. No-dependency fast starts (begin immediately, parallel to Step 0):
  • B1 console shell + B2 scope rendering + B7 update-notification — pure UI, no backend contract needed.
  • C1 verify Local install, C4 distribution-invite helper.
Integration handoffs (the points where lanes must sync):
  • A3/A4 verbs → B4 tree: backend publishes the org/dept verb contracts; UI wires.
  • A2 middleware → B3 + C3: role-gating contract is shared by UI and the LAN invite.
  • A5 → B5, A6/A7 → B6: verb-ready signal triggers UI wiring.
  • A1 seam stubs → everyone: the seam interface is the shared contract; it must be published (even as a stub) before A2/B3/C3 start.

4. Acceptance — what “done” means

5. Risk register

6. What gets filed + what’s deferred

Mobilization (Porsche as Console Lead, Frank-appointed 2026-05-14):
  • Texi — step zero: bless the two seam interfaces (§1), WorkOS as a first-class binding. Everything waits on this 30-min call.
  • Donna — Lane A backend verbs + middleware; A1w WorkOS binding on the critical path.
  • Lafonda — Lane C install / invite.
  • Andora — Lane D security, incl. the WorkOS role-claim trust boundary.
  • Porsche — Lane B Console UI shell immediately + drives all four lanes.
  • Frank — operator prerequisites §6a before A1w closes.
  • File a formal Plan (prism_plan) + SPEC (“SPEC-1xx — Administrative Console”) as the SOR, cross-ref SPEC-089 / SPEC-114 / SPEC-115 / ADR-53/54/55.
In scope today (Frank 2026-05-14 — pulled forward):
  • WorkOS binding on the auth seam (A1w) + the WorkOS-authed access-control exercise. WorkOS is now the primary exercised binding — it is how the full three-tier console access mechanism gets tested. On the critical path.
Deferred (not today, explicitly):
  • Full Cloud multi-tenant exercise across many tenants — the WorkOS binding and role-gating are built + exercised today against one Organization; scaling to the full multi-tenant Cloud topology is the later additive step.
  • Distribution-invite automation (manual gh repo-collaborator add works today).
  • prism_tenant_create Cloud path may trail same-day — it’s not on the role-gating critical path.

6a. Operator prerequisites — Frank’s WorkOS setup (blocks A1w)

A1w cannot complete until these exist. They are operator actions only Frank can do; flag immediately so the backend lane isn’t blocked mid-wave:
  1. WorkOS Organization — confirm the Organization that the console exercises against (the SPEC-089 cutover used one; confirm WORKOS_ORGANIZATION_ID).
  2. WorkOS Roles defined — the three roles owner / admin / member must exist in the WorkOS dashboard for that Organization, so the session carries a readable role claim. Without them A2 role-gating has nothing to read.
  3. WORKOS_* env on the target backend — WORKOS_API_KEY, WORKOS_CLIENT_ID, WORKOS_ORGANIZATION_ID, WORKOS_ISSUER present on whichever backend the console is exercised against (cloud prism-server has these per SPEC-089 §6.1; a local backend would need them added).
  4. At least two test humans in WorkOS with different roles, so the three-tier gating is exercised with real role differences — not just owner.

7. Open items for the reviews (not plan blockers)

  • GitHub-handle storage location (users vs memberships vs user_external_identities) — Texi call during D2.
  • Backup destination seam: confirm local-disk default path + the S3 binding shape — Donna + Andora during A6/D3.
  • Update-notification cadence + where the GitHub-release check runs — Porsche + Donna during B7.
Last modified on May 16, 2026