# MysteryForge Studio — the visual editor

A point-and-click desktop app for building mysteries with no code and no JSON.
It's the human-facing sibling of the MCP server: both read and write the same
`game/*.json`, in byte-identical canonical form, so a designer and an AI
assistant can work on the same project without stepping on each other.

## Launching

```bash
make studio                              # the demo project
godot --path <your-game> -- --mf-studio  # any MysteryForge project
```

The Studio runs *inside* a game project (so it can load that project's imported
SVG/audio natively) and edits that project's `game/` folder. New games created
with the MCP `create_game` tool include the Studio automatically.

**Edit any project / standalone app.** Use **Open…** in the top bar (or launch
with `--mf-project /path/to/game`) to edit a different project folder — assets
load straight from that folder. **Recent ▾** beside it (and a card on the
Dashboard) reopens projects you've edited before. `make export-studio` packages
the Studio as a standalone desktop app (boots into editor mode via the `mfstudio`
export feature); the packaged app uses **Open…** to choose a project to work on.

Deep links (handy for scripting/automation):
`--mf-studio-panel=<id>`, `--mf-studio-open=<scene>[:<hotspot>]`.

## The panels

- **Dashboard** — title/author/version/start-scene, content counts, quick actions, and
  **Game settings**: accent colour, hotspot-label toggle, design resolution, credits,
  the steps that run when a new game begins, an **Engine** card (this game's engine version, with a
  one-click **Upgrade** when it is behind the Studio's — it backs up the old engine and never touches
  your game content), and **Difficulty levels** (Junior / Senior
  Detective…): with two or more, New Game asks the player to choose; each level can turn
  hints off, and `difficulty` is a built-in variable any condition can branch on.
- **Scenes** — the centerpiece (below).
- **Story map** — the game's rooms and the ways between them on one canvas: teal lines are open
  ways, gold lines are gated (an item to use, a puzzle to solve, a flag to set); rooms show what
  they give you, ask of you and whether they end the game, and rooms nothing leads to are flagged.
  Click a room for how you get in and out (with the conditions), then jump to editing it.
- **Templates & bulk edit** (Scenes, under the room list) — turn the open room into a template with `{{parameters}}`, make many rooms from a template (one line each), or change a field, a hotspot or some text across the rooms you select — previewed line by line first, applied as one undo step.
- **Items / Characters** — master–detail forms with live icon/portrait previews. A character who can stand in rooms also has an **Idle life** section: a gentle lean and breath, and a blink pose flashed now and then.
  Characters also take a bio and a "suspect" flag for the in-game Suspects dossier; the
  step menu has **Send an email to the inbox** and **Note a clue on a suspect**.
- **Dialogue** — a visual node graph: each node is a box wired by its choices (or
  a single "next") to other nodes or the END sink. Drag nodes to rearrange, drag
  between ports to rewire, click a node to edit its speaker/line/choices/actions
  on the right. "Tidy" re-runs the auto-layout.
- **Production** — how finished each room is: a completion bar per room from its pictures (placeholders), spoken lines (recorded / synthesized / missing / to redo), validation problems and memory cost, each place's average and each language's coverage; sortable, and a click opens the room.
- **Music** — the adaptive score: tracks (stems that fade in and out with a condition), stingers and ambience beds; a scene's inspector picks its
  music (a file or a track), ambience (a file or a bed), reverb — or just the room's size and surface (*Room size*: it works out how it rings) — and positional sounds; the Dashboard sets how far music ducks under speech and the
  *Mix presets* (how far each bus sits while a conversation is open or a video plays).
- **Budgets** (Dashboard) — the video-memory, picture-size and disk limits `make budget` holds the game to.
- **Places** — the location tree (a house, its floors, a wing): each place's map picture and automatic layout, where it sits on its parent's
  map, and the music / ambience / transition / effects its rooms inherit. A scene's inspector picks its place.
- **Views** (on a scene's inspector) — named camera positions inside a room: a zoom toward a point (flat scenes) or a yaw / pitch /
  fov (panoramas), where "Back" goes, and steps to run on entry — and optionally a **close-up picture** (with the part of the room it covers) that fades in over the room's own while the camera is there. Each hotspot chooses what it is "Shown in": the room, one view,
  or everywhere; the new "go to a view" / "back out of a view" steps drive them.
- **Doors** — links between scenes (docs/SPEC.md "Links"): pick the two scenes, drag a rectangle across each picture (or copy one
  from an existing hotspot), name it, set the arrow and optional compass direction, and say which way you look on arrival. One entry
  writes the way there *and* the way back; "one way" drops the return. Renaming a scene rewrites its doors.
- **Puzzles** — type picker (55 built-in types plus your own scripts), a settings form drawn from the
  type's own description (so every type — and any script of yours that describes itself — is edited the
  same way, with ranges and hints), steps for a correct solve and for each wrong attempt, the **skip**
  assists, and a block per game difficulty level to override any setting for that level.
- **Hints** — what the player's Hint button says. Each entry has conditions (when
  it applies), an optional speaking character, and *levels* from a gentle nudge to
  the plain answer (with optional voice lines). Entries are tried top to bottom and the
  first that applies wins, so use ↑/↓ to order them: specific situations first, a
  catch-all last (the panel warns if one shadows the rest).
- **Phone** — the people the player can ring: a name, an optional phone number (players
  can dial it from the keypad — put it on a note as a clue), whether it shows in the contact
  list or is dial-only, conditions for when it's reachable, a conversation (a Dialogue) and/or
  follow-up steps. The Phone button appears in the game once there is a contact.
- **Scripts** — the code escape hatch. Most games never need it; when you want something the
  editors can't express (a one-off puzzle, a special effect, a tricky rule) a game can ship its own
  GDScript and use it from plain data: a **custom step** (Run a custom script), a **custom check**
  (in any condition list) or a **custom puzzle** type (pick it on the Puzzles tab). **+ New script**
  starts from a commented template; edit and **Check it compiles** right here. See SPEC "Custom scripts".
- **Variables** — a table of flags and counters with starting values. (`difficulty`
  and `hints_used` are built in — always available in conditions.)
- **Art** — turns placeholder pictures into real art with AI image models. *Plan shots from the game* adds a shot for every room, item and character still on a stand-in; each shot has a prompt, references, a provider and a candidate count. **Generate** asks OpenAI (rooms, items, portraits, masked variants) or Blockade Skybox (360° panoramas) in the background, shows the candidates, and **Use this one** swaps the winner in everywhere the placeholder was used. The *Style bible* card holds the look every prompt shares, per-character looks and reference pictures, which provider paints what, and per-image prices (for cost estimates). Keys are read from `OPENAI_API_KEY` / `BLOCKADE_API_KEY` in the environment the Studio starts in — never typed in, never stored in the game. Pick **Mock** on a shot for a free offline stand-in. See SPEC "Art workbook". Once a room has its real picture, Scenes → **Check hotspots against the picture…** asks a vision model where each labelled hotspot's object is and lists the hotspots that are off (tick the ones to move; polygons are only reported) — one undo step; OpenAI costs a few cents a room, Mock rehearses for free.
- **Video** — drop an `.mp4`/`.mov`/`.avi` onto the Studio (or *Import files…*) and it asks what the clip is — a cutscene, a
  silent looping background, or a transparent actor — then converts it to **WebM** with ffmpeg in the background (the Studio stays
  usable; long clips take minutes). `.webm`/`.mkv`/`.ogv` import as they are. In *Assets → Video*, each clip shows its size,
  frame rate, length and whether it's transparent, flags production problems (wrong shape, soft, slow seeking), and an Ogg Theora
  clip has a **→ WebM** button. *Publish* has a Video card: how many clips, whether the game carries the video extension and
  for which platforms (macOS / Windows / Linux), a button that adds the FFmpeg credit its licence asks for, and the Web caveat
  (WebM falls back to the still picture there). See SPEC "Video".
- **Assets** — thumbnail browser by category with each file's size, format and status, flagging unused files and
  production problems (a background of the wrong shape that would be cropped, a soft low-res one, an uncompressed
  WAV, an SVG with text). Drag image or audio files anywhere onto the Studio (or use **Import files…**), pick a
  category, and they're copied in and imported on the spot — dropped SVGs even render immediately (rasterized
  from source until the next full import). Art and voices the Studio or an AI makes are **placeholders** (an amber
  border and tag) until you **Replace…** them with the real file: references keep working even if the file type
  changes (PNG for an SVG, OGG for a WAV), and the asset becomes final. **→ OGG** compresses a WAV (needs ffmpeg or
  oggenc). Filter to *Placeholders*, *Needs attention* or *Unused* to work through them. The **Voices** card
  lists every line the game can speak (dialogue, item descriptions, hints, narration) and records placeholder
  voices for all that lack one in one click — each character gets their own voice — wiring each line's `voice`
  field to a file at the conventional path (re-record placeholders after editing the text).
- **Languages** — translate the game: every player-visible string with a field
  per language, live progress counts, and Save (writes `game/locales/<code>.json`).
  **Export CSV** hands an outside translator one spreadsheet (a column per
  language); **Import CSV** reads it back — blank cells never overwrite, and a new
  column becomes a new language. Per language, **Export/Import .po** round-trips
  through standard gettext tooling. A **Right-to-left** checkbox marks a language
  as RTL (Arabic, Hebrew…), mirroring the in-game UI for it.

**Renaming is safe.** Every id field (scene, item, character, dialogue, puzzle, and a variable's
name) is editable — press Enter and the Studio renames it *and rewrites every reference to it*
(steps, conditions, use-item rules, recipes, compass links, speakers…), reporting how many it fixed.
It's one undo step, and the MCP server has the same `rename_id` tool.

Press **Cmd/Ctrl+P** (or the **Search** button) anywhere for a command palette
that finds scenes, hotspots, items, characters, dialogue lines, puzzles, and
variables by id or text and jumps straight to them.
- **Playtests** — keep a route through your game as a regression test. **● Record a playthrough** opens the
  game with the recorder on: play it once (New Game, then the route you want to protect) and close the window —
  every click, held item, dialogue choice, combination, phone call, opened email and puzzle becomes a step, with
  checks (where you are, what you hold, what's solved, how it ended) added for you. Each playtest is listed as a
  readable sentence per step; **Replay it** / **Replay all** run them headless through the real game UI and show
  which step broke and why. Rename, delete, or write them by hand (SPEC "Walkthroughs"). Using the debug panel
  or loading a save while recording marks the playtest ⚠ (it may not replay).
- **Validate** — runs the engine's own validator *and* a **story check** that plays the game
  optimistically to find rooms nobody can reach, flags that are checked but never set, items
  that can't be obtained, and whether the game can be won at all; problems are explained in
  plain language and link back to the scene that needs fixing. **Search for soft-locks** goes further: it walks every
  sequence of moves and names the ones after which the game can no longer be won, with the shortest way to get there.
- **Publish** — build a shippable Web / macOS / Windows / Linux release. It saves,
  validates, then runs the same `--export-release` as `make export-*` in the
  background (the Studio, tests and dev tools are excluded from the build) and
  shows the log. Needs a Godot editor binary and installed export templates
  (`make install-templates`); the panel tells you if either is missing.

## Drawing hotspots (the core loop)

1. Open a scene. Its background renders letterboxed on the canvas.
2. Pick a shape — **box**, **circle**, or **polygon** — click **Draw**, then add it:
   drag a box/circle, or click points for a polygon (double-click or click the
   first dot to finish; `Esc` cancels).
3. The new hotspot is selected — name it, pick a **cursor** (the verb: examine,
   take, talk, move…), and add **steps** (the action list) from dropdowns.
4. Drag a shape to move it; drag its handles to resize (polygons get a handle per
   vertex). Shapes are color-coded by verb so a scene reads at a glance.
   **Shift-click** to select several hotspots — drag any to move the group, or
   press **Delete** to remove them all. **Copy** a hotspot (or a multi-selection)
   and **Paste** it into any scene — `Cmd/Ctrl+C` / `Cmd/Ctrl+V` or the toolbar
   buttons — to reuse navigation arrows and exits across rooms. **⧉ Duplicate
   scene** (under the scene list) clones a whole room, hotspots and all.
5. **Play here** boots the game straight into the scene; press `F5` in-game to
   reload your latest edits without restarting.

### 360° rooms (panoramas)

Switch on **360° look-around** in a scene's inspector to make it a panorama the player turns around in. Pick a
wide image (a 2:1 equirectangular for a full circle — drop it onto the Studio as a *Panorama*, or generate one),
and set how much of a circle it covers, where the camera starts and how wide it sees. The canvas then shows the
**whole flat image**: draw hotspots on it exactly as usual — the game projects them onto the screen as the player
looks around, so they stick to what they cover. Drag in the inspector's **preview** to look around the way the player
will. Hotspots that must cross the image's left/right seam are split in two. Overlays (stills, animations and video regions) and actors work in a panorama too — their rectangles / feet are placed on the same flat image.

### People in the room (actors)

Tick **Can stand in rooms** on a character (Characters → *In the room*) to give them an **actor** block: a standing
height, where the feet are on the pictures, and named **poses** — each a picture, a list of frames, a sprite sheet or a
video (`idle` is required; `walk` shows while they walk, `talk` while they speak — list its frames from a closed mouth to
the widest and the mouth follows the voice). Drop the pictures onto the Studio as *Actor pose* (transparent PNG / WebP).

Then, in a scene's inspector, the **Stage** section:

- **+ Marker** adds a named standing place — a pin you drag on the image (rename it with Enter; the actors and steps that use
  it follow). **Depth scale (floor)** says how big people stand at each height of the picture, so they shrink walking away.
- **+ Actor** stands a character on a marker or at a position; drag the diamond at their feet to move them (or the marker
  they stand on). Set their pose, facing, size, when they're there, and **Clickable** — pick one of the scene's hotspots
  (or *Create a talk hotspot*) and it follows them wherever they stand, so "talk to her" is a normal hotspot.
- The step menu gains **Actor: come on stage / walk to / turn to face / strike a pose / say a line / leave the stage** —
  with *Wait* off several people move at once, and the cutscene timeline draws a row per actor.

Settings (Dashboard) has **Conversation portrait**: by default the big portrait steps aside while the speaker is standing
in the room (they talk instead); *Always show it* keeps both.

### Conversations: topics, replies, items shown

Investigation is asking. The **Topics** tab lists what can be asked about ("The will", "The cellar key"): name it, mark it *known
from the start* or give it a condition, and a **Learn a conversation topic** step teaches it to the player (a "New topic" notice
appears). On a character, **Can be talked to about topics** opens a *table*: a greeting, a reply list per topic (pick topics from the
dropdown — or "*" for a catch-all), a reply list per item the player can *show* them, and a farewell. Each reply is a line (voice,
portrait expression), conditions, an optional whole dialogue and steps; the **first reply whose conditions hold** is said, and
*Say this only once* uses a reply up. A **Talk to a character** step (e.g. on the hotspot that follows their actor) opens the
conversation. There is no graph to wire: the engine builds the menu, and the story check and soft-lock search read it like any other
dialogue. Conditions gain *Player knows a topic*, *Character has been asked…* and *…has been shown…*.

In the **Dialogue** graph, a node can now have a **Branch** (jump to the first entry whose condition holds — "met before? → welcome
back") and an empty line to act as a menu or a switch.

### Time, schedules, chapters, checkpoints, save migrations

The **Dashboard → Game settings** has the story's structure:

- **The game has a clock** — name the phases of a day (*Morning, Afternoon, Evening, Night*), how many days the game lasts, where it
  starts, and what happens when time runs out. A **Move time on** step advances to the next phase (or to a named one); a **Set the
  day and time** step jumps. Conditions gain *Day of the game* and *Time of day*. The player sees "Day 2 — Evening" at the top left.
- On a **character**, *Where they are, and when (schedule)* places them in scenes by day and phase (and "away" for the times they are
  nowhere on purpose). Each entry becomes an actor in that scene — with a talk hotspot that follows them if they can be talked to — and
  the validator warns about any day-and-phase with no entry, so the person you need is never lost between two rows.
- **Chapters** are acts: a title card, steps that run when one starts, and a *Story chapter* condition. A **Start a chapter** step
  moves the story on.
- **Set a checkpoint** steps mark where a lost game can be taken back to (the losing ending offers *Try again from the last checkpoint*).
- **Save migrations** keep players' older saves working after a patch: rename variables, items and scenes, add new variables, remove old ones.

### The case board: clues and deductions

The **Case board** tab has two lists. *Clues* are what the player can find (title, text, a picture); add one to the game with an
**Add a clue to the case board** step on a hotspot, a reply or a puzzle. *Deductions* are what they conclude: tick the clues it
connects (exactly those), write the conclusion, and optionally steps to run — unlock a topic, add another clue, set a variable. In the
game a **Case** button appears with the first clue: the player selects cards and presses **Connect**; the board says *made*,
*already made*, *close* or *not connected* and never reveals what's missing. Conditions gain *Player has found a clue* and *Player
has made a deduction*, so a deduction can open a door, a topic or the finale. The story check proves every deduction can be made
and flags clues nothing can find.

### The phone: calls, voicemail and texts

Three more verbs for the phone, next to *Send an email*: **Ring the phone (an incoming call)** (who is calling, how many seconds it rings, what they
leave on voicemail if nobody answers, and what happens if nobody does), **Send a text message to the phone** (the message, who sent it, and optionally a
conversation the player can answer it with — give the text an id for that) and **Leave a voicemail**. In the game the phone rings with an Answer / Decline
bar; the Phone button shows what is waiting; its tabs list calls, voicemail and a message thread per contact. A caller who is not in the contact list
needs no number: a contact with *Save to the phone list* off is reachable through an incoming call.

### Review

The **Review** tab is for reading the game rather than playing it. *Export as Markdown* (or a spreadsheet) writes the whole script —
rooms with what happens in them, conversations as branching scripts, each character's answers, items, clues, hints, endings — to
`build/script.md`, with the speaker and a reference on every line and your open comments pinned where they belong (save first: it reads the saved
game). Below it, **Comments**: pick *what it is about* (the whole game, a room, one of its hotspots, a conversation or a single line of it, a
character, an item…), write the note and pin it; resolve it when it is dealt with. Click a comment's target to jump to it. Comments are shared
through version control and never ship in a build; renaming the thing carries its comments along.

### Achievements

The **Achievements** tab lists what the player can earn across saves. Give each a name, a description, an optional picture and *Hidden
until earned*; then say how it is earned — a condition that comes true, a counter (a variable and the value that earns it, shown as 3 / 5), or
an **Unlock an achievement** step you put anywhere. The *Platform id* is the name Steam knows it by (default: the id in capitals). The story
check proves each one can be earned; Validate warns about one nothing earns, or one earned the instant a new game starts.

### The mystery: who did it, and the accusation

The **Mystery** tab is the answer key. Pick the culprit — or tick *Draw the culprit from several candidates* for a replayable case, where
a new game picks one and the whole story is checked once for each. List the **suspects** and, for each, the clues that show the *means*,
the *motive* and the *opportunity* against them and the clues that *clear* them (press a clue to remove it, use the menu to add one).
The **accusation** section sets what the player's finale is made of: when it becomes available, which legs (means / motive / opportunity)
the case needs and how many must be backed by a clue, how many wrong accusations are allowed, and the steps for each outcome — solved,
an innocent accused, the culprit accused without enough proof, and the mistake that uses the last attempt. In the game an **Accuse**
button (`A`) appears: the player picks a suspect and a found clue for each leg; the panel never says which clue is right. A *This game's
culprit is…* condition lets rooms, lines and clues change with who did it. Under the sections, *Can the case be made?* counts, per
candidate, how many legs have a clue and warns about innocents nothing can clear; Validate runs the full proof (every clue findable, the
game winnable for each candidate).

### Atmosphere and the camera

The scene inspector's **Atmosphere (effects)** section lays no-art effects over the room — rain, snow, dust motes, fog, a
flickering light, a vignette, film grain, a colour wash, colour grading. Each has a strength, an optional colour and speed,
and **Only while…** conditions: when they flip, the effect fades in or out, so the evening can draw in as the story moves
(pair a `grade` effect with a full-frame overlay that has a **Cross-fade** for day → night). The step menu adds
**Camera: look / zoom**, **shake**, **back to normal** and **Cinematic bars (letterbox)**; in the timeline they get a
*Camera* row. Click **Play here** to see all of it — effects aren't drawn on the editing canvas.

### Making the game react to state (no JSON)

Everything the player has done is state — items held, puzzles solved, variables,
rooms visited, tasks done — and the Studio lets you branch on all of it:

- **Conditions** appear wherever the format has an `if` / `visible_if`: under a
  hotspot ("Only show this hotspot when…"), under every step of any action list
  ("Only run this step when…"), on overlays, and on dialogue choices. Each row is
  a dropdown — *Variable…* (is true / equals / at least…), *Player has item*,
  *Puzzle is solved*, *Scene has been visited*, *Task is done* — plus **Any of
  these (OR)** / **All of these (AND)** groups that nest, so arbitrary logic needs
  no JSON. An empty condition list simply isn't written to the file.
- **Using an item on a hotspot** — the select a hotspot, then *When the player
  uses an item here* → **+ Item use**: pick the item, say whether it's used up,
  and add the steps that follow. *If a held item doesn't work here, say…* sets
  the line for every other item.
- **Overlays (state art)** — in the scene inspector, **+ Overlay** layers an image
  over the background (an open drawer, a note on the desk). Click it on the canvas
  to drag/resize it, set it to appear only when conditions hold. Overlays sit
  under hotspots, so clicking a hotspot always wins.
- **Cutscene timeline** — any step list with slides, fades or waits shows a **Timeline** above it: one
  row per overlay, plus narration, audio and story rows, drawn on a clock. Click a bar to jump to its step;
  drag a slide/fade/wait bar's right edge to change its length; drag a bar that "runs alongside" the next
  steps to change when it starts (later steps move with it, because a step list is a sequence).
- **Animation** — an overlay can carry *frames* (one image path per line) cycled at a chosen
  frames-per-second, loop or play once, and start at any opacity. The step menu adds
  **Slide an overlay**, **Fade an overlay** and **Restart an overlay's animation**; leave
  "Wait for it to finish" off to run several at once — together with *Wait* and narration
  that is a cutscene.
- **Timers & chance** — **Start a timer** (with an optional on-screen countdown) runs steps
  when time is up; **Roll a random number** sets a variable to a die roll. Conditions can ask
  whether a timer is still running.
- **First visit vs every visit** — a scene has separate step lists for "the first
  time the player ever enters" and "every time", plus an **Ambient loop** layer.
- **Combining items** — on an item, **+ Recipe** says what it makes when put together with
  another inventory item (both consumed by default), with optional narration, conditions
  and follow-up steps. Recipes work in both directions.
- **Dialogue choices** can be offered *only once*, gated by a condition, and run
  steps when picked.

Toggle **Snap** in the toolbar to lock drawing, moving, and resizing to a grid
(a faint grid shows while you draw) — turn it off for free-hand placement.

Hotspots store normalized 0–1 coordinates, so they're resolution-independent.
Every change is undoable: `Cmd/Ctrl+Z` / `Shift+Z` (or the ↶ ↷ buttons). Typing
coalesces into one step; each drag, add, and delete is its own step.

## Generating assets in place

- **Placeholder art** — Assets → **Generate…** describes a background/icon/portrait and either
  runs an AI CLI to produce an SVG (non-blocking — the Studio stays usable while
  it works), or (no CLI? offline?) copies a tuned prompt to the clipboard for your
  own assistant to fulfil via the MCP. Set `MF_AI_CMD` to your CLI's name (default
  `claude`).
- **Voice** — the 🎤 button beside a dialogue node's or item's voice field
  synthesizes a placeholder line from its text (macOS `say`), saves the WAV, and
  fills in the path. Swap in a real recording later at the same path.

## How it relates to the rest

```
Studio (GDScript UI)  ─┐
                       ├─→  game/*.json  ←─  MCP server (TypeScript)  ←─ AI agent
plain text editor  ────┘            ↑
                                    └─ the engine plays it; tools/validate.gd checks it
```

- **One validator.** “Check for problems” shells out to `tools/validate.gd` — the
  exact validator the game and the MCP use. No rules are duplicated.
- **Canonical writes.** Files are saved with stable key order and inline scalar
  arrays. `runtime/addons/mystery_forge_studio/core/json_writer.gd` and the MCP's
  `mcp/src/store.ts` are kept byte-identical (CI checks this).
- **Not the Godot editor.** The Studio is a standalone app so non-developers never
  touch Godot's interface. Under the hood each game is still a normal Godot
  project, exportable to desktop and web.

## Internals (for contributors)

**Parity guard.** `test_parity.gd` (in `make studio-test`) fails if `docs/SPEC.md`
documents a field, action or puzzle config the Studio has no editor for. If you
extend the format, build the editor, then add the field to the list in that test.

- `studio.gd` / `studio.tscn` — app shell: nav rail, top bar, panel switching,
  Save/Play, status line. Builds the theme from `theme.gd`.
- `core/editor_project.gd` — in-memory model: loads `game/`, computes dirty by
  diffing against the last-saved baseline, holds the snapshot-based undo/redo
  stack, writes canonical JSON, finds cross-references for safe deletes.
- `core/runner.gd` — runs validate/play as child processes via the same Godot
  binary the Studio is running under.
- `widgets/scene_canvas.gd` — the draw/move/resize hotspot canvas.
- `widgets/action_list_editor.gd` — the verb-and-fields step editor, reused by
  hotspots, scene enter-actions, puzzle solve/fail actions, dialogue choices and
  the game's start actions.
- `widgets/condition_editor.gd` + `core/condition_model.gd` — the nestable
  condition list (the model — kinds, defaults, descriptions — is pure and unit
  tested). `widgets/use_items_editor.gd` — a hotspot's item-use rules.
- `widgets/master_detail.gd`, `widgets/asset_field.gd`, `widgets/ui.gd` — shared
  scaffolding so panels stay short and consistent.
- `panels/*.gd` — one file per section.

Each panel exposes `build_ui()` (once) and `refresh()` (on show); the shell wires
`studio` (the root) into every panel for project data, navigation, and dirty/
status reporting.
