LLM index: llms.txt (checkout) · https://deckard.lol/llms.txt (site) · human docs at https://deckard.lol/docs/.
For the big picture (vision, subsystems, end-to-end signal path) read docs/ARCHITECTURE.md first.
-
@spacedevin/deck—.decklanguage (parse / format / registries / highlight). Canonical grammar: packagedocs/DECK_GRAMMAR.md(@spacedevin/deck/grammar). Host keepers:src/deckfile/(Apply/Emit/Stream/LoopState/PatchGraph/MatrixFmGraph), boot registries inDeckIds.tish(@spacedevin/deck-synths) +BuiltinMacros.tish, co-DJ insrc/codj/. -
docs/schema/project-v2.json — v2 shape (
generatorId+generatorParamsper channel). v1 JSON withwaveformonly is migrated on load. -
src/model/Project.tish —
emptyProjectShell(),projectToJson/projectFromJson.[src/model/ProjectLoad.tish](src/model/ProjectLoad.tish)—loadProjectFromTpl(source)builds a project from deck (use for multiple songs); bundled default text in[projects/default.deckard.deck](projects/default.deckard.deck)/DefaultDeckardTpl.tish. -
https://github.com/spacedevin/deck/tree/main/packages/synths/src/ — modular instruments; see docs/GENERATORS.md.
-
src/model/Edits.tish — small safe mutators (
toggleStep,addPianoNote,setAdsr, …). -
instrumentPresets— project-level named patches; applying copiesgeneratorId+ deep-clonedparamsonto the selected track only.
ADSR is insidegeneratorParams(per generator), not on the channel object. Per-track mixer = gain / pan / mute / solo plus a 3-band EQ (eqLo/eqMid/eqHi) and channel FX (filterCutoff/res/drive/reverbSend/filterType). A track also carries pitch/voice fields (octave/chord/inversion/arp/arpRate/strum), per-step locks onsteps, and per-note locks onpianoNotes.
The text protocol (deck) is the source-of-truth control language — every UI edit round-trips through it, and the LLM co-DJ and multiplayer peers speak it. Don't learn the vocabulary from scattered UI files; use:
@spacedevin/deckgrammar — canonical language (node_modules/@spacedevin/deck/docs/DECK_GRAMMAR.md). Deckard overlay (UI / ownership / clamps): docs/DECK_GRAMMAR.md.- docs/DECK_AGENT_GRAMMAR.md — the co-DJ lane subset (what an agent may emit), kept in lockstep with the agent
SYSTEM_PROMPTin services/agent-worker/main.tish. - docs/DJ_SKILLS.md — skill-gating: which lines are master-scope (
bpm/deck/tpl/auto/transpose/scale/swing/master_mix/actor_mix/session_*/clip) and thus require themaster_mixerskill. Source of truth: src/codj/Skills.tishcoDjLineAllowedForSkills; per-track ownership in src/codj/Merge.tishactorMayEditTrack. - skills/README.md — the AI agents are role-based (
--role host= mixing/master/cohesion, joins withmaster_mixer;--role client= production) and compose their system prompt at boot fromskills/*.md(a role file + a persona-selected subset of capability skills +docs/DECK_AGENT_GRAMMAR.md), read viatish:fsreadFile. The persona is LLM-composed (seeded-by-actorId fallback) so same-role agents differ. Run:pnpm run agent:host/pnpm run agent:client(+pnpm run gateway). The hardcodedSYSTEM_PROMPTin services/agent-worker/main.tish is now only a fallback.
The instrument catalog (33 generators + 8 macros) is defined in Registry.tish (generatorCatalog) + src/model/MacroVoice.tish (macroCatalog); the picker grouping is VOICE_GROUPS in src/ui/InstrumentStack.tish. Generators and macros must never share a label (see project memory macro-generator-boundary-policy).
version: use2for generator-based projects; bump when breakinggeneratorParamsshapes.- Times:
startBeat/durBeatsare in quarter-note beats. Stepi(0–15) = beati * 0.25in the looping bar. - Channels: preserve
idstrings when editing; UI keys off array index +id. - Do not put sequencing rules inside JSX-only files; keep logic in
model/,schedule/,audio/.
- Web Audio / typed arrays: use
new AudioContext()andnew Uint8Array(n)in JS-target builds (see docs/TISH_JS_BUILTINS.md). Do not replace with hand-written.jsshims in app code.
- src/ui/ — layout and wiring only; business rules stay in model/schedule/audio.