Deckard

Deckard host overlay

UI, ownership, clamps, and generator spellings on top of @spacedevin/deck.

Canonical language reference lives in @spacedevin/deck:

Host integration (registries, dialects): package docs/HOST.md · Deckard boot: src/generators/DeckIds.tish, src/generators/BuiltinMacros.tish.

This document is the Deckard overlay — UI, co-DJ, ownership, clamps, and generator spellings — not a second grammar.


UI: local song vs hub stream

There is a single deck editor (Apply / Sync, step highlight). Stream vs local is tied to Co-DJ:

Statedeck panel
Not connectedBanner: Local — not on hub. Edit the song locally.
Co-DJ connectedBanner: Hub + Local → hub preview (what you send on Play) and Remote (agent deck.stream_chunk tail).

Append a line from JS (e.g. LLM tooling): call streamAppendLine on the DeckardRuntime held in App’s useRef (src/ui/DeckardRuntime.tish). Example: runtime.streamAppendLine("track kick id c0 gen noise_burst").


Host modules (not in the package)

ConcernLocation
Parse / format / highlight classify@spacedevin/deck
AST → projectsrc/deckfile/Apply.tish
project → decksrc/deckfile/Emit.tish
Incremental deck.linesrc/deckfile/Stream.tish
patch / matrix_fm graphsPatchGraph.tish, MatrixFmGraph.tish
Id / dialect registrationDeckIds.tish
Builtin macrosBuiltinMacros.tish
Ownership / skillssrc/codj/
HTML highlightsrc/ui/SongEditorHighlight.tish

Apply clamps (Deckard)

These are enforced when applying into a project, not by the language parser:

LineDeckard behaviour
bpm <n>Clamped 40–300
swing0..1
ScaleSnaps melodic triggers live; peers + offline renders agree (Scale.tish)
@ perf_step <n>Stream / Co-DJ scheduling; JSON effectivePerfStep on deck.block overrides. Song parser treats as no-op

Generator id spellings (Deckard)

Registered in ensureDeckGeneratorIds():

deck / emithost generatorId
noise_burstnoiseBurst
fm / fm_tonefmTone
basic_osc / oscbasicOsc
matrix_fmmatrixFm
drum / drum_synthdrumSynth
patch / modular / synthpatch

Undeclared ids pass through. Other catalog ids use the host registry spelling. Macro names expand via registerBuiltinMacros (MacroVoice.tish).


Ownership & edit fragments

  • remove_track <channelId> — incremental only (never in a full snapshot). Ownership-gated by actorMayEditTrack (lane removes own track; master removes any). UI × emits it; undo re-creates from captured deck.
  • Master-scope lines (bpm, version header, scale, swing, master_mix, actor_mix, auto, session_*, clip, …) require master_mixer — see DJ_SKILLS.md.
  • Co-DJ lane subset: DECK_AGENT_GRAMMAR.md.

Control directives in Co-DJ

Language @ … table: package grammar. Deckard wire + authority: STREAM_PROTOCOL.md, WS_AND_AGENTS.md.


  • DECK_EXTENSION.md — Deckard patch / matrix_fm engines
  • Package extension dialect syntax: @spacedevin/deck/extension