Miadi Factory — The Author's Desk, clickable research-to-fiction prototype (v2 / draft — the real packages and doors, read 2026-10-10)#
Mission and constraints#
Build an attractive, navigable, genuinely interactive web prototype inspired by the attached cinematic splash-screen image The Author's Desk — Where Research Becomes Story. The image describes THREE realms: BACKSTAGE (real research); THE AUTHOR'S DESK (human writes); ONSTAGE (fiction). Preserve the image's warm desk / notes / luminous paths / story-portal atmosphere, but do NOT turn text baked into an image into fake controls. Recreate its six notes and area labels as accessible HTML buttons/components or position semantic keyboard-operable hotspots over the image with responsive fallbacks. Every prominent hotspot must open a useful view; no dead buttons.
Human authorship rule: “I don't want the robot to write for me. What I want is the robot repeating me, which is different.” The human writes. Agents may retrieve, arrange, inspect, echo EXACT human language with attribution, offer questions/options, and perform supporting work; they must not silently replace a human sentence with generated fiction. Clearly distinguish author-authored text, exact quotations, agent paraphrases, and suggested prose. Never auto-publish, auto-send, or auto-run agents.
Stack and scope#
Prefer the established Episode 120 proof-of-concept approach: Next.js App Router, React, TypeScript, Tailwind, shadcn/ui, Zod; server-side integration adapters, accessible responsive navigation and graceful demo fallbacks. The packages, addresses and contracts listed under What already exists below were read from jgwill/Miadi on 2026-10-10 and every package named there is published on npm at the version given: use them as named, import only the surfaces named, and label each tile Connected only when the import actually runs. Anything NOT in that section stays UNKNOWN: DO NOT fabricate imports, SDKs, package names, API schemas, deployed URLs or indigenous cultural claims. Scaffold explicit typed adapters and mock data for the unknown parts. Do not let discovery of unknown dependencies block a working front end.
What already exists (read from jgwill/Miadi on 2026-10-10; every package below is on npm at the version shown)#
The three realms of the splash map onto the Factory's two tracing domains. BACKSTAGE is the ceremony domain: the research, the screenwalks, the reviews, the agents and the chronicle. THE AUTHOR'S DESK and ONSTAGE are the story domain: what the human writes and the fiction it becomes. The "Behind the story" doorway is the one crossing between them: a story carries references back to the research it drew from, and the research never reaches onstage unless the author opens that door.
Backstage (ceremony domain)#
@miadi/episodic-memory-schema0.14.1 — the shapes an episode holds, pure TypeScript, no fs:ScreenwalkRecordandtoScreenwalkRecord(a screenwalk as an episode keeps it,captures/screenwalk-<id>/screenwalk.json, idmiadi-screenwalk:<yymmddHHMM>),parseReviewRef,reviewPageUrl,reviewJsonUrl,readEpisodeReviews(a review held by an episode,review:<uuid>),readEpisodeFoundations,AttentionItem,parseAttentionStore,EpisodeMediaRecord. Use its types for every Screenwalks, Reviews and Chronicle card.@miadi/episode-vessel0.4.2 — the file law of an episode folder:readEpisodeSummary,listEpisodes,capabilitiesFor(role)(browse/read/edit/upload…),isOutsideTheRoom(captures/andceremonies/are not shown in a room). Server side only.@miadi/inquiry-weave0.16.6 — the chronicle catalog and the weave between artefacts, GitHub issues and episodes; also a CLI and an MCP server. Use it for the Chronicle cycles overview (catalog), never for writes from this prototype.@miadi/reference-ui0.1.2 — renders the Factory's reference schemes as chips and cards:miadi-chronicle:<episode>,miadi-review:<uuid>,miadi-foundation:<slug>,miadi-ceremony:<id>,miadi-circle:<id>(renderReferenceHtml,episodeReferenceView). Use it wherever a card names an episode or a review.@miadi/transcription0.3.4 — reads a recording's transcriptions by form (request, plan, monologue, dialogue, who it addresses, which episodes it relates to). Reads, never writes. Backs the Screenwalks detail view.@miadi/capture-client0.2.1 — HTTP access to a capture service (/api/recordings). The screenwalk video itself is served by the Factory; this prototype links, it does not host.@miadi/hooks-interpreter0.3.2 — reads another agent's session trace and says what it is doing (interpretSession: mission, tools, creations, corrections, state). This is what the Agents roster shows when connected; until then, DEMO.@miadi/annotate-core0.2.0 and@miadi/annotate-ui0.2.0 — marks on a document by block or by exact words, signed; the annotations layer of a screenwalk or a review.@miadi/attention-core0.1.1 and@miadi/attention-ui0.3.1 — the items that wait on a person (attention.json, schemachronicle.attention.v1): the "open decision, next question" column of the agents board.@miadi/foundations0.1.13 — the academic packets the Factory grounds decisions on;@miadi/foundations-wampum-narrative-engine0.1.1 is the packet behind the belt model.- The review service: public reviews answer at
https://miadi-review-service.vercel.app/review/<uuid>and as JSON at/review/<uuid>/json(?v=Npins a version); no token for public reviews.MIADI_REVIEW_API_BASE_URLstays configurable; the/jsondoor is the one to read first. - The Factory's own read doors, on its public front
https://miadi.sanctuaireagentique.com(status: user-reported existing; verify before labelling Connected):GET /api/chronicle/episodes/{ref}/reviews,/foundations,/files,/screenwalks. The chronicle medicine wheel (nodeschronicle:<folder>,review:<uuid>,foundation:<slug>, edges "Episode Node") is private behind a tunnel: never call it from a browser; read through those routes. - The earlier Episode 120 prototype is published and live:
https://miadi-factory-interface-analysis.vercel.app/(jgwill/Miadi#757). Link to it directly;NEXT_PUBLIC_EP120_PROTOTYPE_URLis no longer needed. Itslib/episode-data.tsis the pattern for server-only evidence reads with a Live/Demonstration badge.
The Author's Desk (story domain)#
- The six writing tools stay as specified. Their data shape may reuse
@miadi/annotate-core's signed-mark vocabulary forverbatimQuoteandsourceLink(exact words, signed, with the document they came from), so a quotation carried to the desk keeps its provenance. - "A Question" may be exported as an
AttentionItem(@miadi/attention-core) so a question the author leaves can reach an episode's attention list later; export only, never automatic. - "Echo my words" may use
@miadi/voice-client0.2.4 to play the author's own text back through the Factory's voice layer (the robot repeating, not writing). Optional, server-side token (MIADI_VOICE_*), off by default. - The NCP export adapter is no longer a placeholder: the canonical schema is
@miadi/ncp-story-studio/schema(readNcp,validateNcpDocument,storyCompleteness). A desk fragment exports as a candidate storypoint or storybeat and is validated before it is offered to Onstage; nothing is promoted without the author's action.
Onstage (story domain)#
@miadi/ncp-story-studio0.8.1 — the Narrative Context Protocol studio as modules:/schema(types, validator, dialect reader, completeness),/graphand/graph/react(<StoryGraph>, the story lattice),/store(projects as JSON files or Neon),/agents(personas and the[[Beat:id|label]]link protocol),/terminology,/fixtures(nine example stories). The three acts are the NCP storytelling layer: Act I, II, III as ordered storybeats;storyCompletenesssays what a story still lacks.@miadi/wampum-narrative-engine0.1.1 — the belt as a narrative model: anchors at(row, col), several readings per anchor, none promoted, a commitment that has to be renewed. A peer of NCP, not a view of it; it carries no community's content, and the cultural caution in v1 stands: name it as the user's engine, request attribution and context before any visual convention is fixed.@miadi/ncp-wampum-bridge0.1.1 — the only package that knows both engines: project an NCP narrative onto a belt, read a belt back, and get a report naming everything that did not carry across. The "two-timeline bridge" on the plot-threads canvas is this crossing drawn; use the bridge's layout for it rather than inventing one.passages0.3.11 — derives a Twine book from an episode; an optional "read it as a book" door for a finished act.
Tracing: two domains, one doorway#
- Backstage reads the ceremony Langfuse project through
CEREMONY_LANGFUSE_PUBLIC_KEY,CEREMONY_LANGFUSE_SECRET_KEY,CEREMONY_LANGFUSE_BASE_URL(server only;@langfuse/clientv5; metadata only, never prompt bodies in a page). The Author's Desk research tracef06fa8abaf8e0c68cf71ffcbd320fa1dand the Episode 120 trace94e83f1094c14cc1aeaf3d3b2d94e120live there, with this prompt itself andmiadi-ep120-fork-voice-layer-ingestion-261009v2. The earlier prototype'sMIADI_LANGFUSE_*are those same ceremony keys. - The desk and the stage write, when the author opts in, to the story project through
STORY_LANGFUSE_*: one trace per writing session, the author's text never as trace input unless the author ticks it, prompts namedmiadiStory-*andmiadiWrite-*(the existing story prompts move there). - The doorway: a story trace carries
backstagemetadata naming the research it drew from (miadi-chronicle://120,miadi-review:<uuid>,miadi-screenwalk:<id>, the ceremony trace ids). Audience preview hides it; "Behind the story" shows it. A link never verifies a fictional claim. - Keep the adapter provider-neutral: one
TracingAdapterinterface (listTraces,getTrace,getPrompt, per domain) with a Langfuse implementation behind it. The Factory is moving to amiadi-tracing:<domain>/<resource>/<id>reference scheme with the provider chosen at install, Langfuse first; the prototype should be able to swap the provider without touching a page.
Reference schemes to render, never to invent#
miadi-chronicle://<episode>, miadi-review:<uuid>, miadi-screenwalk:<yymmddHHMM>, miadi-foundation:<slug>, miadi-ceremony://<id>, circle:<id>, and the proposed miadi-prototype:<slug>, miadi-notebook:<uuid>, miadi-tracing:<domain>/<resource>/<id>, miadi-rispec:<owner>/<repo>/<folder> (jgwill/miadi-orchestration-kit#80 holds that proposal).
Landing / navigation#
Use the attached image as design reference and optional hero art (ask for it if inaccessible). Three dominant clickable realms with paths to actual routes: Backstage /backstage; The Author's Desk /desk; Onstage /onstage. Provide consistent home/navigation controls, breadcrumb/back, keyboard accessibility, mobile card alternative, readable labels, focus rings and contrast. Show a small status key: Connected / User-reported existing / Demo / Proposed / Needs integration; never label a demo connected. Each major tile must reveal its current state, useful actions and an optional ‘what would connect here’ explanation.
BACKSTAGE — interactive research services#
/backstage/screenwalks: list/search screenwalks and their associated reviews, including links to Episode 120 review pages and the new Author's Desk review. Show title, episode, source, review link, continuation questions, status and a button ‘Bring this as inspiration to my desk’. Preserve canonical review IDs/links below. Include a clearly separate ‘Earlier Episode 120 prototype’ navigation card linking tohttps://miadi-factory-interface-analysis.vercel.app/(verified live 2026-10-10), beside the real Episode 120 reviews./backstage/plot-threads: a useful blank-canvas exploration without depending on unknown libraries. Create a pannable/zoomable canvas or scrollable board with selectable plot-thread cards, simple thread metadata (name, concern, keeper, episodes, scenes, linked execution branches, evidence/proposal state), and a switch to a two-timeline bridge concept: upper row of squares = timeline A; lower row = timeline B; connecting squares between = cross-timeline events/relationships. Seed with clearly labeled illustrative examples inspired by Episode 120 (Asterion / Marks / Jev); never assert those illustrative placements as canonical plot facts. The Wampum Narrative Bridge is@miadi/ncp-wampum-bridgeover@miadi/wampum-narrative-engine, and Story Studio NCP is@miadi/ncp-story-studio(see What already exists). Treat the belt as the user's engine, not an established Indigenous methodology or a permission to imitate culturally significant designs; request attribution/context and design guidance before fixing any visual convention. Keep bridge visual conventions editable. No invented SDK or URL beyond those packages./backstage/agents: compact but useful read-only roster, one agent detail view, and a branch/trunk board showing agent, investigation, state, evidence, open decision, and next question. Illustrative Asterion / Marks / Jev example data from Episode 120 must be visibly DEMO; distinguish a human-approved assignment from a proposed task. No execution dispatch, commands, credential exposure, or fake real-time progress./backstage/reviews: working list/detail UX. Create a SERVER-ONLY read-only review-service adapter. Configuration:MIADI_REVIEW_API_BASE_URLandMIADI_REVIEW_API_TOKENin server environment, neverNEXT_PUBLIC_*. The public door is known:GET https://miadi-review-service.vercel.app/review/<uuid>/json(?v=Nfor a version), parsed withparseReviewRefandreviewJsonUrlfrom@miadi/episodic-memory-schema; define interfacelistReviews,getReview,getVersionsover it, with validation and errors. Listing all reviews still needs a contract: show ‘integration pending’ for the list and the seeded public links until then. Never send token to browser or logs; do not prompt user to paste token into a client form. When actual API docs are supplied, enable true listing/version history./backstage/evidence: minimal visual evidence/traces page (source cards, provenance, timestamp where known, claim classification Verified/Reported/Interpretation/Proposed, linked reviews, issues and observations); Seeded links to the Episode 120 and Author's Desk Langfuse traces and GitHub issues; whenCEREMONY_LANGFUSE_*is set on the server, read trace names, observation names and durations live (the Episode 120 prototype'slib/episode-data.tspattern) and show the Live badge; otherwise DEMO. Never fetch traces from the browser. The Factory's own evidence layer (miadi-tracing:and thelangfuse:list an episode holds, jgwill/miadi-orchestration-kit#80) is being built separately; do not recreate it. Keep the server adapter provider-neutral./backstage/chronicle: a navigable overview of Chronicle cycles / Medicine Wheel concepts with entry cards and relationship diagram. The libraries are known (@miadi/episodic-memory-schema,@miadi/episode-vessel,@miadi/inquiry-weave,@miadi/reference-ui) and the read doors are the Factory's/api/chronicle/episodes/{ref}/…routes; the wheel itself stays private. Include an integration slot that reads those routes when a base URL is configured and shows dummy records with an empty state otherwise. Do not culturally flatten or treat Medicine Wheel as a generic four-quadrant UI with claims of cultural authority.
THE AUTHOR'S DESK — actual human writing functionality#
Create six clearly distinct writing tools, all reachable by clicking hero notes and /desk: My Take, A Question, A Spark, A Character, A Scene, A Story Hook. Each has a spacious editor, optional source links (screenwalk/review/plot thread/agent branch), useful form-specific prompts, tags, status (scratch/draft/selected), local manual save and revision history, export/import JSON and Markdown. Distinguish authorText from assistantSuggestion, verbatimQuote, sourceLink, sourceKind, and approvalState. For first prototype use explicit opt-in local-only browser storage and disclose that local-only storage is device/browser-scoped, not synced or securely backed up; ensure export and deletion. Never overwrite author text with a suggestion; edits require human action. Provide a side panel: 'Echo my words' (exact quotations), 'Ask a question', 'Clarify a term', 'Check structure', 'Suggest possible alternatives'. These are UI demonstration tools unless a specific configured server model exists. The default must work without any model/API key, e.g. template question generator and exact-text reflection, clearly labeled non-AI. Provide a readable path 'Attach to a scene / plot thread' that produces a candidate storybeat or storypoint validated with validateNcpDocument from @miadi/ncp-story-studio/schema, shown as a preview the author accepts or discards. The NCP schema is that package's; do not invent another.
ONSTAGE — fiction experience and deliberate provenance doorway#
/onstage: a stage shelf of author-selected story projects and a story detail/editorial planning view. Let the writer arrange own selected fragments in a 3-act structure: Act I Setup, Act II Development, Act III Climax + Resolution, with movable scene/beat cards and explicit save. Include one DEMO short narrative for browsing whose fictional text is visibly sample/demo. Add a toggle for 'Audience preview' in which fiction stands alone and does not automatically expose its research roots. Offer an optional 'Behind the story' doorway: when deliberately opened, show the actual source references selected by the author (screenwalks, reviews, traces, issues), with labels that separate fictional events from real documented evidence. Do not expose private traces merely because they were linked, and do not imply this link verifies fictional claims. Interactivity is a proposed experiment; for v1 support only modest local choices/navigation, not an autonomous game engine.
Integration discipline / link registry#
Canonical PUBLIC examples: Episode 120 From Agent to Collective https://miadi-review-service.vercel.app/review/aa3bb198-59b2-4108-a452-36d25603d5e3 ; Plot Threads and Fork Harvest https://miadi-review-service.vercel.app/review/e29a4fc3-302a-4309-8ad9-39085ee26283 ; Author's Desk https://miadi-review-service.vercel.app/review/d7dcde0c-8ab2-4cd7-98d6-a2a937ff28fd ; source video https://youtu.be/aJjBrAbUzjM ; Episode 120 issue https://github.com/jgwill/Miadi/issues/754 ; Author's Desk research trace https://cloud.langfuse.com/project/cmkgk10zy009tad077uc42ixf/traces/f06fa8abaf8e0c68cf71ffcbd320fa1d (access may be private); Episode 120 prototype https://miadi-factory-interface-analysis.vercel.app/ (live) and its issue https://github.com/jgwill/Miadi/issues/757 ; the proposal that holds prototypes, notebooks, tracing and specs in an episode https://github.com/jgwill/miadi-orchestration-kit/issues/80 ; this prompt is miadiPrototype-authors-desk-storytelling-pipeline-261010 v2 in the ceremony project, and the earlier one is miadi-ep120-fork-voice-layer-ingestion-261009 v2.
Data layer: typed interfaces + MockAdapter (runs immediately) and ServerAdapter contracts for Reviews, Screenwalks, Evidence/Traces, Chronicle, PlotThreads/NCP, Agents. Private tokens always server-side. Read-only external data by default. No GitHub writes, no automated publish, no autonomous agent work, no unapproved ingestion. Display fallback errors honestly. Do not present user-reported existing components as verified imports.
Deliverables / acceptance tests#
Generate a polished, working responsive prototype with hero/splash, three realm pages, all six backstage destinations, all six working local writing surfaces, Onstage act/scene organizer and audience view. Every major visual label navigates. Provide 2-3 realistic DEMO sample records, seeded from the known research links and visibly labeled. Include a compact Integration Map page listing each service, status, adapter contract, missing package/API URL/key information, and what a local developer must supply; list every package from What already exists with the version read on 2026-10-10 and whether the prototype imports it (Connected) or only names it (User-reported existing). Add basic tests or a manual click-through checklist: navigation, keyboard, save/edit/export, author text protection, mock vs connected labeling, read-only calls, token non-exposure, optional provenance doorway. Finish by listing exactly what runs, what is demo, and the next THREE highest-value integration questions; do not claim finished connections merely because UI is scaffolded.
Goal: a visual prototype that explores how the Factory connects real backstage research to human-authored story creation, with a fully useful desk even before any of the original libraries are wired.