Context. surface studio · domain hathor · route /studio/hathor/screenplay-compilation · auth signed-in + studio entitlement · source apps/oshun/web/src/app/studio/hathor/screenplay-compilation/page.tsx
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)
Purpose#
Admin lane console for the real @hathor/lore-compiler ScreenplayCompiler.
Compile a source story (scenes + characters) into a screenplay and export it to
a film artifact format (Fountain / JSON / HTML / FDX / PDF / Avid log); each
scene becomes an uppercased slugline (INT./EXT. LOCATION - TIME), and a scene
missing its location is reported as a compile error rather than crashing the
build. Admin-scoped and fail-closed.
Entry points#
- Quick-action link from
/studio/hathor/lore-compilation-for-engines(this page links out to lore-compilation-for-engines) - Aggregator embed:
StudioHathorLoreCompilerWorkspacemounts this workspace inline as its "Screenplay Compilation Lane" - Direct URL / bookmark — yes;
alternates.canonicalset - Studio overview — see
../../studio-overview.md
Layout regions#
page.tsx renders inside <ShellLayout active="studio">:
- Workspace
<section data-hathor-screenplay-compilation-workspace>:<h1>(WorkspaceHeading) "Hathor Screenplay Compilation Workspace"- Summary
<p data-hathor-screenplay-compilation-summary> - The compile form lane:
data-hathor-scrpl-compile-form
- Route Map panel (
data-hathor-screenplay-compilation-route-map):<h2>"Route Map" + 5 entries fromSTUDIO_HATHOR_SCREENPLAY_COMPILATION_ROUTE_MAP - Quick-action lane: two
Link.quickActionanchors — Lore Compilation for Engines, Back to Studio workspace index
States#
- Loading —
<p data-hathor-scrpl-loading> - Unauthorized —
data-hathor-scrpl-unauthorizedon 401/403 (admin Hathor scope required); fail-closed - Error —
data-hathor-scrpl-erroron non-OK GET / malformed catalog - Ready (form) —
data-hathor-scrpl-compile-formonce the catalog loads - Result —
data-hathor-scrpl-resultafter a 200 compile;data-hathor-scrpl-compile-errorfor invalid JSON / non-200
Interactions#
Workspace body (compile form lane)#
- Source story (JSON) —
<textarea data-hathor-scrpl-story>(aria-label "story json") - Export format —
<select data-hathor-scrpl-format>(Fountain / JSON / HTML / FDX / PDF / Avid log) - Compile screenplay —
<button data-hathor-scrpl-compile-submit type="submit">→ POST/v1/admin/hathor/screenplay-compilation/compile - Result —
data-hathor-scrpl-verdictplus the compileddata-hathor-scrpl-output
Route Map panel#
- 5 route entries — verify match with
STUDIO_HATHOR_SCREENPLAY_COMPILATION_ROUTE_MAP
Quick-action lane#
- "Open Hathor Lore Compilation for Engines workspace" (→
/studio/hathor/lore-compilation-for-engines) - "Back to Studio workspace index" (→
/studio)
Data & contracts#
- Reads: GET
/v1/admin/hathor/screenplay-compilationon mount - Writes: POST
/v1/admin/hathor/screenplay-compilation/compile - Realtime: none
- Caching: client
fetchon 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 - Shell:
../../../shell/04-auth-session.md - Sibling routes:
./studio-hathor-lore-compiler.md(aggregator that embeds this workspace),./studio-hathor-lore-compilation-for-engines.md - Component sources:
apps/oshun/web/src/components/studio/StudioHathorScreenplayCompilationWorkspace.tsxapps/oshun/web/src/components/studio/StudioHathorScreenplayCompilationRouteMap.ts
Open questions / known gaps#
- Hathor is
unconfirmed-v1perWALKTHROUGH/matrix/routes.csv. Confirm whether the dedicated/studio/hathor/*admin lane consoles ship in V1. - Route Map advertises
drafts/,acts/,exports/, andgovernance/sub-routes with nopage.tsxyet.