---
path: /studio/hathor/npc-personality-system
surface: studio
domain: hathor
auth: signed-in + studio entitlement
source: apps/oshun/web/src/app/studio/hathor/npc-personality-system/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 Hathor · NPC Personality System

## Purpose

Admin lane console that computes personality compatibility between two NPC
personas — running the real compatibility algorithm over traits, core values,
and shared attributes to return a compatibility score and the shared/divergent
breakdown. The operator supplies two personas (traits + comma-separated core
values) and the lane scores them.

## Entry points

- **Quick-action link from `/studio/hathor/simulation-state-persistence`** (verify
  against that page's source)
- **Direct URL / bookmark** — yes; `alternates.canonical` set to
  `/studio/hathor/npc-personality-system`
- **Studio overview** — see
  [`../../studio-overview.md`](../../studio-overview.md)

## Layout regions

`page.tsx` renders inside `<ShellLayout active="studio">`:

- **Workspace** `<StudioHathorNpcPersonalitySystemWorkspace />`
  (`data-hathor-npc-personality-system-workspace`):
  - `WorkspaceHeading` `<h1>` — "Hathor NPC Personality System Workspace"
  - Summary `<p data-hathor-npc-personality-system-summary>`
  - The compatibility form lane (loading / unauthorized / error / form / result)
- **Route Map panel** `data-hathor-npc-personality-system-route-map` — `<h2>`
  "Route Map" listing the 5
  `STUDIO_HATHOR_NPC_PERSONALITY_SYSTEM_ROUTE_MAP` entries (profiles / traits /
  archetypes / governance child paths)
- **Quick-action lane** — two `Link.quickAction` anchors: Simulation State
  Persistence, Back to Studio workspace index

## States

- [ ] **Loading** — `data-hathor-nps-loading` while the GET catalog request is in
      flight
- [ ] **Unauthorized (admin-scope 401/403)** — `data-hathor-nps-unauthorized`
- [ ] **Error** — `data-hathor-nps-error`
- [ ] **Ready (form)** — two `data-hathor-nps-persona` blocks (traits +
      `data-hathor-nps-values` core values) + submit
- [ ] **Result** — `data-hathor-nps-result` with `data-hathor-nps-score`,
      `data-hathor-nps-trait`, and `data-hathor-nps-shared`
- [ ] **Validation error** — `data-hathor-nps-compat-error`

## Interactions

### Compatibility lane

- [ ] **Persona A / Persona B** — `data-hathor-nps-persona` fields, including
      **core values (comma-separated)** (`data-hathor-nps-values`)
- [ ] **Submit** — `<button data-hathor-nps-compat-submit>` "Compute
      compatibility" → POST `COMPAT_ENDPOINT`

### Route Map panel

- [ ] **Route entries** — verify match with
      `STUDIO_HATHOR_NPC_PERSONALITY_SYSTEM_ROUTE_MAP` (5 entries)

### Quick-action lane

- [ ] **"Open Hathor Simulation State Persistence workspace"** → `/studio/hathor/simulation-state-persistence`
- [ ] **"Back to Studio workspace index"** → `/studio`

## Data & contracts

- **Reads**: `GET /v1/admin/hathor/npc-personality-system` (`NPS_ENDPOINT`) — the
  personality catalog (trait/value enums)
- **Writes**: `POST /v1/admin/hathor/npc-personality-system/compatibility`
  (`COMPAT_ENDPOINT`) with the two personas
- **Realtime**: none
- **Caching**: client `fetch` on mount, `cache: 'no-store'`, `buildBffAuthHeaders()`
- **Auth/role check**: admin-scoped, fail-closed on 401/403; route additionally
  gated signed-in + studio by the BFF proxy

## Cross-references

- Parent: [`../../studio-overview.md`](../../studio-overview.md)
- Shell:
  [`../../../shell/04-auth-session.md`](../../../shell/04-auth-session.md)
- Sibling routes:
  [`./studio-hathor-simulation-state-persistence.md`](./studio-hathor-simulation-state-persistence.md),
  [`./studio-hathor-npc-dialogue-generation.md`](./studio-hathor-npc-dialogue-generation.md)
- Component sources:
  - `apps/oshun/web/src/components/studio/StudioHathorNpcPersonalitySystemWorkspace.tsx`
  - `apps/oshun/web/src/components/studio/StudioHathorNpcPersonalitySystemRouteMap.ts`

## Open questions / known gaps

- [ ] Hathor is `unconfirmed-v1` per `WALKTHROUGH/matrix/routes.csv`. Confirm
      whether the dedicated `/studio/hathor/` lane consoles ship at V1 or are
      internal-only.
