Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

About these records

These are claudius’ architecture decision records: one short page per decision that shapes the code and would be expensive to reverse. Each records what the situation was, what was decided, and what that costs, so that someone who wants to change it later starts from the reasons instead of guessing them.

They are not design documents for features. A record is worth writing when a reasonable newcomer would ask “why on earth is it done this way?”, and the answer is a trade-off rather than a mistake.

recordin one line
0001 Real audio onlyevery sound is synthesized in code or recorded; no generated audio, no General MIDI
0002 Rust end to endengine, server, UI, ears and decoder in one language, no Python at runtime
0003 The blueprint is the songa song is stored as its decisions; the arranged notes are derived
0004 Rhai with Strudel-style patternsan embedded, sandboxed language with live-coding patterns inside strings
0005 One session, many clientsthe studio, browsers and assistants all edit one song
0006 A critic with earsmeters, theory and a calibrated CLAP model judge every render; some evidence is held out
0007 Which samples we shipnone: curated packs are downloaded from their authors, and only clear licences are on by default
0008 egui for native and webone immediate-mode UI compiled natively and to WebAssembly, talking only HTTP
0009 Releases through pull requestsa release is a reviewed pull request; merging it builds and publishes
0010 Samples from online librariessamples come from libraries made to be used (Openverse, Commons, ccMixter), never from YouTube or the streaming services, and only under licences that allow publishing
0011 Finding by meaning, on the devicestatic word embeddings and a flat index in plain Rust, in the engine, find actions by what the words mean on any computer, the browser too
0012 A history that only growsevery change is an operation in a log, with an id, what it was made on, and what it changed path by path; undo and going back are operations too, ready for a CRDT
0013 Requests in plain words, read on the devicea request is read by its words, the examples nearest it in meaning and rules on the song into what claudius would do, a button for each reading, scored on rounds of new requests before tuning to them
0014 A small model taught to read requestsCactus’s Needle 3, taught in Rust on claudius’s tools with low-rank adapters, reads on the device what the readings read nothing of; its calls are checked, said again in the readings’ words and grounded in the song
0015 Requests said aloud, heard on the deviceCactus’s Whistle, ported to Rust on needle-core, hears what is said to the palette; silence is heard as nothing, words heard near ones claudius knows are put right, and the words go into the field as if typed
0016 Settings any later claudius readsevery settings file has a version and is read field by field, a field that does not read costing only itself; earlier versions migrate as they are read, and what a later version wrote is kept
0017 A rebuild that sounds like the recordingproposed: a rebuild is measured on songs claudius renders itself and made from better parts, HTDemucs stems, YourMT3+’s notes, each instrument on a sound like its own, and chords from the notes
0018 Processors: effects with several tracks inproposed: an effect takes up to eight tracks in and gives one out, defined by a script’s function recorded once as a graph, with knobs and values that move through the song, and plays live in the live mix’s runtime
0019 Libraries of sounds and effectsproposed: recorded sounds, procedural sounds and effects in one format that holds data and never code, kept on the computer or installed from a marketplace pinned by hash, each with its licence and credit, tests first
0020 Changing a song’s genreaccepted: a song in another genre keeps its form, chords, key, melody, recordings and written notes, and the genre’s drums, bass, parts, sounds and mix play it, as one change undo takes back
0021 Every kind of sample, ranked and variedaccepted: the sampler offers sung phrases, hook and passage loops, drum breaks, bass lines and stabs, each scored as its kind, and a varied set of them, each piece saying what it is; a remake’s flip and sample_song choose by the same scores
0022 A song’s own sectionsaccepted: the analysis finds a song’s sections where they start, to the bar and at any length, names each for what it is by what repeats and what is sung, gives the music each plays a letter, and says where a build resolves and where a piece is best cut
0023 The live mix, first by windowsaccepted: while the song plays, windows of it as it is now, mixed by the server from the tracks the last render kept, play in the render’s place from just after the playhead, so a fader is heard as it moves; the runtime of 0019 replaces them later
0024 The radio in the appaccepted: the station planned by shared Rust code, its songs written by an engine of its own on a thread, each change from one song to the next rendered as audio and played as one stream
0025 The signal flow as the song’s lanesaccepted: each track a lane the sound runs through left to right, its effects as blocks that show what they do, zoomed and panned and edited where they are; an effect switched off is wrapped as off, keeping its place and settings

The format

Each record has a status and three parts:

  • Context: the forces at play when the decision was made: what claudius needed, what constrained it, what the options were.
  • Decision: what was decided, stated plainly, and the options that were rejected, with why.
  • Consequences: what follows, good and bad. The bad ones matter most; a record that lists only benefits is a sales pitch.

A status is accepted, superseded by NNNN, or deprecated. Records are not edited to match later thinking: when a decision changes, a new record supersedes the old one, and the old one gets a line pointing to it. Fixing a typo or a broken link is fine.

Adding one

  1. Copy the shape of an existing record into docs/src/design/NNNN-short-title.md, with the next free number.
  2. Write it while the decision is being made, in the pull request that implements it or before. Half a page to a page is enough; link to the code and the engineering pages for detail.
  3. Add it to docs/src/SUMMARY.md under “Design decisions” and to the table above.
  4. If it replaces an earlier record, set that one’s status to superseded by NNNN.

Use the pull request title docs(design): NNNN short title, so the record shows up in the changelog.