---
path: /studio/yemaya/enterprise-plans
surface: studio
domain: yemaya
auth: signed-in + studio entitlement
source: apps/oshun/web/src/app/studio/yemaya/enterprise-plans/page.tsx
status: walked
last_walked:
  '2026-05-29 automated runtime walk (Playwright headless) — render, /v1 data
  (2xx), console/page-errors, expected content, screenshot verified; live
  screen-reader, touch, offline, and telemetry-delivery checks pending a manual
  AT pass. Evidence: WALKTHROUGH/results/runtime-sweep-2026-05-29.md; body
  re-derived 2026-06-03 from current source (lane-console architecture)'
---

# Studio · Yemaya · Enterprise Plans

## Purpose

Admin lane console that evaluates plan tiers against a usage profile — checks
seats / features / quotas, records violations, and recommends the cheapest
fitting tier. The entitlement lane is wired to the live plan-entitlement engine
over `/v1/admin/yemaya/enterprise-plans`; access is admin-scoped and
fail-closed.

## Entry points

- No breadcrumb panel on this page.
- Reachable from sibling Yemaya routes that quick-action here (e.g.,
  `organization-management`).
- Direct URL / bookmark (signed-in + studio entitlement).

## Layout regions

`page.tsx` renders `ShellLayout active="studio"` and:

- **Workspace panel** (`StudioYemayaEnterprisePlansWorkspace`,
  `data-yemaya-enterprise-plans-workspace`):
  - `<h1>` (`WorkspaceHeading`) **"Yemaya Enterprise Plans Workspace"**.
  - Summary paragraph (`data-yemaya-enterprise-plans-summary`).
  - **Plan Entitlement Lane** (`data-yemaya-ep-lane-heading`, `<h2>`): the
    catalog-loaded form (`data-yemaya-ep-form`).
- **Route Map panel** (`data-yemaya-enterprise-plans-route-map`): `<h2>` "Route
  Map" + five entries from `STUDIO_YEMAYA_ENTERPRISE_PLANS_ROUTE_MAP`.
- **Quick-action panel**: two `quickAction` links.

## States

- [ ] **Loading** — `data-yemaya-ep-loading` "Loading enterprise-plans console…"
      until the GET catalog resolves.
- [ ] **Unauthorized** — `data-yemaya-ep-unauthorized` "Access restricted." on a
      401/403 (Yemaya admin scope required).
- [ ] **Error** — `data-yemaya-ep-error` "Could not load the enterprise-plans
      console." on a non-OK / malformed catalog response.
- [ ] **Ready (form)** — engine summary (`data-yemaya-ep-engine-summary`) + the
      plans/usage form render once the catalog loads.
- [ ] **Result** — `data-yemaya-ep-result` with a recommendation headline
      (`data-yemaya-ep-headline`); submit-side validation surfaces in
      `data-yemaya-ep-eval-error`.

## Interactions

### Plan Entitlement Lane

- [ ] **"Plans + usage (JSON)"** — `<textarea data-yemaya-ep-payload>` (aria-label
      "plans and usage json"), prefilled with a sample payload.
- [ ] **"Evaluate plans"** — `<button data-yemaya-ep-submit>`; submitting POSTs the
      plans + usage profile to `/v1/admin/yemaya/enterprise-plans/evaluate` and
      renders the per-tier fit, violations, and the recommended tier.

### Route map

`data-yemaya-enterprise-plans-route-map` — five non-interactive entries:

- [ ] `/studio/yemaya/enterprise-plans` — primary workspace
- [ ] `/studio/yemaya/enterprise-plans/scenes/[sceneId]`
- [ ] `/studio/yemaya/enterprise-plans/exports/[exportId]`
- [ ] `/studio/yemaya/enterprise-plans/revisions/[revisionId]`
- [ ] `/studio/yemaya/enterprise-plans/governance/[policyId]`

### Quick actions

- [ ] **"Open Yemaya Organization Management workspace"** →
      `/studio/yemaya/organization-management`.
- [ ] **"Back to Studio workspace index"** → `/studio`.

## Data & contracts

- **Reads**: `GET /v1/admin/yemaya/enterprise-plans` (catalog: summary + tier
  metadata) on mount.
- **Writes**: `POST /v1/admin/yemaya/enterprise-plans/evaluate` (plans + usage →
  entitlement evaluation + recommended tier).
- **Realtime**: none.
- **Caching**: client `fetch` on mount with `cache: 'no-store'`;
  `buildBffAuthHeaders()`.
- **Auth/role check**: admin-scoped, fail-closed (401/403 → unauthorized state);
  signed-in + studio entitlement enforced by the proxy/middleware.

## Cross-references

- Studio overview: [`studio-overview.md`](../../studio-overview.md)
- Workspace source:
  `apps/oshun/web/src/components/studio/StudioYemayaEnterprisePlansWorkspace.tsx`
- Route map source:
  `apps/oshun/web/src/components/studio/StudioYemayaEnterprisePlansRouteMap.ts`
- Feature spec: [`V1/features.md`](../../../../V1/features.md)

## Open questions / known gaps

- [ ] The route-map dynamic children (scenes / exports / revisions / governance)
      are sitemap-only — confirm whether any are backed by `page.tsx` files yet.
