---
path: /studio/yemaya/npc-systems
surface: studio
domain: yemaya
auth: signed-in + studio entitlement
source: apps/oshun/web/src/app/studio/yemaya/npc-systems/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 · NPC Systems

## Purpose

Admin lane console for inspecting the Project Obsidian cast and NPC design. The
NPC Design Operations Lane wires the real `@yemaya/project-obsidian`
`ObsidianCharacterDevelopment` reference via `/v1/admin/yemaya/npc-systems`: read
the protagonist, core team, supporting cast, antagonists, key NPCs, and the NPC
AI behavioural systems, and resolve each system's config.

## Entry points

- No breadcrumb panel on this page.
- Reachable from the Studio index and from the Gameplay Design quick-action
  (which links here).
- Direct URL / bookmark (signed-in + studio entitlement).

## Layout regions

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

- **Workspace panel** (`StudioYemayaNpcSystemsWorkspace`,
  `data-yemaya-npc-systems-workspace`):
  - `<h1>` "Yemaya NPC Systems Workspace" (`WorkspaceHeading`).
  - Summary paragraph (`data-yemaya-npc-systems-summary`).
  - **NPC Design Operations Lane** — `<h2>` `data-yemaya-ns-lane-heading`, the
    real-backed form lane (loading / unauthorized / error / ready-form / result,
    see States).
- **Route Map panel** (`data-yemaya-npc-systems-route-map`): `<h2>` "Route Map" +
  five `STUDIO_YEMAYA_NPC_SYSTEMS_ROUTE_MAP` entries.
- **Quick-action panel**: two `quickAction` links.

## States

- [ ] **Loading** — `data-yemaya-ns-loading` "Loading character engine…" while
      the GET catalog fetch is in flight.
- [ ] **Unauthorized** — `data-yemaya-ns-unauthorized` "Access restricted." on a
      401/403 admin-scope failure (fail-closed).
- [ ] **Error** — `data-yemaya-ns-error` "Could not load the character engine." on
      a non-OK / malformed catalog response.
- [ ] **Ready-form** — `data-yemaya-ns-form` once the catalog resolves;
      `data-yemaya-ns-engine-summary` + a `data-yemaya-ns-constants` list.
- [ ] **Result** — `data-yemaya-ns-result` with `data-yemaya-ns-headline` (the
      system name) and a `data-yemaya-ns-config` JSON block; or a validation
      message `data-yemaya-ns-resolve-error`.

## Interactions

### Operations form (`data-yemaya-ns-form`)

- [ ] **Cast / NPC system** — `select` `data-yemaya-ns-system` populated from
      `catalog.systems`.
- [ ] **Submit** — `button` `data-yemaya-ns-submit` "Inspect system" → POST
      `/v1/admin/yemaya/npc-systems/system` with `{ system }`.

### Route map

`data-yemaya-npc-systems-route-map` — five entries:

- [ ] `/studio/yemaya/npc-systems`
- [ ] `/studio/yemaya/npc-systems/scenes/[sceneId]`
- [ ] `/studio/yemaya/npc-systems/exports/[exportId]`
- [ ] `/studio/yemaya/npc-systems/revisions/[revisionId]`
- [ ] `/studio/yemaya/npc-systems/governance/[policyId]`

### Quick actions

- [ ] **"Open Yemaya Gameplay Design workspace"** →
      `/studio/yemaya/gameplay-design`.
- [ ] **"Back to Studio workspace index"** → `/studio`.

## Data & contracts

- **Reads**: GET `/v1/admin/yemaya/npc-systems` (catalog: `summary`, `systems`,
  `constants`) on mount.
- **Writes**: POST `/v1/admin/yemaya/npc-systems/system`.
- **Realtime**: none.
- **Caching**: client fetch on mount, `cache: 'no-store'`,
  `buildBffAuthHeaders()`.
- **Auth/role check**: admin-scoped fail-closed (401/403 → unauthorized state)
  behind the proxy studio gate.

## Cross-references

- Studio overview: [`studio-overview.md`](../../studio-overview.md)
- Workspace source:
  `apps/oshun/web/src/components/studio/StudioYemayaNpcSystemsWorkspace.tsx`
- Route map source:
  `apps/oshun/web/src/components/studio/StudioYemayaNpcSystemsRouteMap.ts`
- Engine: `@yemaya/project-obsidian` (`ObsidianCharacterDevelopment`)
- Sibling per-view doc: [`studio-yemaya-gameplay-design.md`](./studio-yemaya-gameplay-design.md)
- Feature spec: [`V1/features.md`](../../../../V1/features.md)

## Open questions / known gaps

- [ ] The summary paragraph still advertises "dense expert-mode controls,
      progressive disclosure" — leftover legacy copy; the live surface is the
      single NPC Design Operations Lane.
- [ ] The Route Map advertises scenes / exports / revisions / governance
      sub-routes that the live lane does not expose.
