Spencer Morris
← Project index
ENGINEERING NOTES / 17 2 MIN READ

Writer’s Room

A local multi-agent screenplay workshop with persistent scene ownership, durable coordination, isolated drafts, and a reviewed apply gate.

Local experimental tool
Writer's Room showing four scene writers and the Sol coordinatorView full size ↗
Actual web interface with a synthetic screenplay and mocked API responses. The writers table exposes identities, scene ownership and correspondence. No model workers were running for this capture.
01 / THE PROBLEM

What needed solving.

Parallel agents need stable ownership, shared continuity feedback, recoverable coordination, and safe handling of a user's source project. Chat transcripts alone are a poor source of task state, and direct worker writes to canonical files make review and rollback difficult.

02 / SYSTEM OUTLINE
  1. 01Beat sheet + project snapshot
  2. 02Persistent writers + review board
  3. 03Selected candidate + apply gate

Simplified from the implementation and project notes.

03 / TECHNICAL DECISIONS

How it fits together.

Persistent writer identities run on a bounded runtime fleet

The Node controller turns a beat sheet into owned scene tasks and stores task, board and run transitions in SQLite; WebSockets send compact updates while clients can recover from durable event history. Rust starts a fixed fleet of Codex App Server shards and keeps each loaded thread on one shard. Completed turns archive the persistent thread and release its shard, preserving writer identity without keeping every writer resident. Initialization is serialized per shard, channels are bounded, and a shard exit requeues only its interrupted turns. Server tests use a FakeTransport to exercise event delivery, turn ordering, steering and recovery without live model calls.

Agents work from filtered copies and assemble private candidates

The controller copies an allowlisted project snapshot into private worker desks. Writers own Fountain scene paths and post structured notes to dialogue, continuity, canon, character or structure channels; Sol coordinates work and assembles outputs in a candidate directory. The canonical project is never mounted in the worker workspace. Snapshot tests and security checks cover traversal, symlinks, hard links, secret-like files, special files and overlap with private state. This boundary makes worker changes reviewable while preserving the original screenplay until apply.

Apply is a frozen, separately reviewed transaction

The user selects candidate files, the controller freezes their before-and-after contents, and a separate read-only Sol review approves or rejects that immutable snapshot. Before apply, canonical hashes are checked again; approved files are staged beside targets and renamed with rollback if a later rename fails. Deletes, binaries, executables, secrets, symlinked ancestors, changed canonical files, active turns and concurrent applies fail closed. Tests cover approve/reject and race/recovery behavior. The sandbox uses Bubblewrap/seccomp and a managed proxy, but controller and App Server remain host processes and share the host kernel.

Writer's Room scene wall with four synthetic beatsView full size ↗
The scene wall groups beats by act and shows their assigned writer and revision. Fixture data illustrates the review state; these are not results from a live writing run.
04 / WORKING METHOD

Building and checking it.

Select a project and inspect the beat sheet, configure writer count/active seats/critics/review rounds, then let Sol plan and writers draft/revise assigned scenes. Monitor the live table, board, event history, and reconciliation. Sol assembles a candidate; the user chooses files; a separate read-only review approves or rejects the frozen snapshot before the controller applies it.

A security smoke script checks static runtime prerequisites and configuration; active sandbox probes are optional and are not claimed when no backend endpoint is configured. Local load-test docs characterize capacity as measured on a particular machine.

05 / STATUS & LIMITS

Worker isolation shares the host kernel, and the controller remains a host process. This is a local experimental system, not a multi-tenant service. Capacity measurements in the project notes are machine-specific.

Source notes

Based on repository code and project records reviewed on October 30, 2026. Historical checks are described as recorded, not rerun for this article. Screenshots, renders, and mockups are labeled individually.

  • luna-swarm/README.md
  • luna-swarm/docs/architecture.md
  • luna-swarm/docs/security.md
  • luna-swarm/docs/load-test.md
  • luna-swarm/apps/server/src/app.ts
  • luna-swarm/apps/runner/src/main.rs
  • luna-swarm/apps/server/src/app.test.ts
  • luna-swarm/apps/web/src/app.test.tsx
← All projectsNEXT PROJECTStaff Games →