---
path: /studio/hathor/quest-authoring
surface: studio
domain: hathor
auth: signed-in + studio entitlement
source: apps/oshun/web/src/app/studio/hathor/quest-authoring/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 · Quest Authoring

## Purpose

Admin lane console for the real `@hathor/domain-models` scenario-dependency
validator. Submit a scenario packet (scenes, quests, story arcs, required ids,
CGI export) and surface missing dependencies, objectives, and capture
requirements before a scenario ships. Admin-scoped and fail-closed.

## Entry points

- **Quick-action link from `/studio/hathor/timeline-modeling`** (this page links
  out to timeline-modeling; dialogue-tree-authoring links here)
- **Direct URL / bookmark** — yes; `alternates.canonical` set
- **Studio overview** — see
  [`../../studio-overview.md`](../../studio-overview.md)

## Layout regions

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

- **Workspace** `<section data-hathor-quest-authoring-workspace>`:
  - `<h1>` (WorkspaceHeading) "Hathor Quest Authoring Workspace"
  - Summary `<p data-hathor-quest-authoring-summary>`
  - **Scenario Validation Lane** (`<h2 data-quest-lane-heading>`) — the validate
    form `data-quest-form`
- **Route Map panel** (`data-hathor-quest-authoring-route-map`): `<h2>` "Route
  Map" + 5 entries from `STUDIO_HATHOR_QUEST_AUTHORING_ROUTE_MAP`
- **Quick-action lane**: two `Link.quickAction` anchors — Timeline Modeling,
  Back to Studio workspace index

## States

- [ ] **Loading** — `<p data-quest-loading>`
- [ ] **Unauthorized** — `data-quest-unauthorized` on 401/403 (admin Hathor
      scope required); fail-closed
- [ ] **Error** — `data-quest-error` on non-OK GET / malformed catalog
- [ ] **Ready (form)** — `data-quest-form` once the enum catalog loads
- [ ] **Result** — `data-quest-result` after a 200 validate, with a
      `data-quest-issues` list of `data-quest-issue-row` rows or
      `data-quest-no-issues`; `data-quest-validate-error` for invalid JSON /
      non-200

## Interactions

### Scenario Validation Lane

- [ ] **Scenario packet (JSON)** — `<textarea data-quest-payload>` (aria-label
      "scenario packet json"); accepts
      `{ packet:{ packetId, worldId, title, scenes[], quests[], storyArcs[],
      requiredSceneIds, requiredQuestIds, requiredArcIds, cgiExport } }`
- [ ] **Reference enums** — `data-quest-enums`
- [ ] **Validate scenario** — `<button data-quest-submit type="submit">` → POST
      `/v1/admin/hathor/scenario-generation/validate`
- [ ] **Result** — `data-quest-headline` plus the issue list
      (`data-quest-issues` → `data-quest-issue-row`) or `data-quest-no-issues`

### Route Map panel

- [ ] **5 route entries** — verify match with
      `STUDIO_HATHOR_QUEST_AUTHORING_ROUTE_MAP`

### Quick-action lane

- [ ] **"Open Hathor Timeline Modeling workspace"** (→
      `/studio/hathor/timeline-modeling`)
- [ ] **"Back to Studio workspace index"** (→ `/studio`)

## Data & contracts

- **Reads**: GET `/v1/admin/hathor/scenario-generation` (note: the quest lane
  reuses the `scenario-generation` endpoint, not a `quest-authoring` slug) on
  mount
- **Writes**: POST `/v1/admin/hathor/scenario-generation/validate`
- **Realtime**: none
- **Caching**: client `fetch` on mount, `cache: 'no-store'`; `buildBffAuthHeaders`
- **Auth/role check**: admin-scoped fail-closed (401/403); behind the signed-in
  + studio proxy gate

## Cross-references

- Parent: [`../../studio-overview.md`](../../studio-overview.md)
- Shell:
  [`../../../shell/04-auth-session.md`](../../../shell/04-auth-session.md)
- Sibling routes:
  [`./studio-hathor-timeline-modeling.md`](./studio-hathor-timeline-modeling.md),
  [`./studio-hathor-dialogue-tree-authoring.md`](./studio-hathor-dialogue-tree-authoring.md)
- Component sources:
  - `apps/oshun/web/src/components/studio/StudioHathorQuestAuthoringWorkspace.tsx`
  - `apps/oshun/web/src/components/studio/StudioHathorQuestAuthoringRouteMap.ts`

## Open questions / known gaps

- [ ] Hathor is `unconfirmed-v1` per `WALKTHROUGH/matrix/routes.csv`. Confirm
      whether the dedicated `/studio/hathor/*` admin lane consoles ship in V1.
- [ ] The lane validates an existing packet but offers no in-page quest authoring
      / editing; despite the route name it reuses the `scenario-generation`
      endpoint — confirm whether an authoring surface is planned.
- [ ] Route Map advertises `quests/`, nested `objectives/` and `branches/`, and
      `governance/` sub-routes with no `page.tsx` yet.
