# Architecture decisions

> Dated architecture decision records and their status.

Source: https://docs.tune.toys/contributors/decisions/

Dated records of direction-setting choices: the problem, the decision, the alternatives rejected, the consequences accepted, and what evidence would cause a revisit. **A decision's status describes direction, not implementation.** Supersede a record with evidence instead of accumulating contradictory guidance.

| ADR                                                                                                                                           | Date       | Status                                                                                                                 |
| --------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | ---------------------------------------------------------------------------------------------------------------------- |
| [0001 One portable model in a boundary-based monorepo](https://github.com/joshstovall/TuneToys/blob/main/docs/decisions/0001-portable-model.md)                                                                | 2026-10-31 | Adopted; draft source subset implemented                                                                               |
| [0002 Shared processing semantics with target adapters](https://github.com/joshstovall/TuneToys/blob/main/docs/decisions/0002-shared-engine.md)                                                                | 2026-10-31 | Adopted; Rust compiler/engine and C ABI implemented; JUCE/state/legacy parity pending                                  |
| [0003 One Frame renderer and one authoring API](https://github.com/joshstovall/TuneToys/blob/main/docs/decisions/0003-frames-and-authoring.md)                                                                 | 2026-10-31 | Adopted; draft Frame bindings implemented as data                                                                      |
| [0004 Immutable releases and local recall before marketplace breadth](https://github.com/joshstovall/TuneToys/blob/main/docs/decisions/0004-distribution.md)                                                   | 2026-10-31 | Adopted; development releases and local recall exist, managed services and exporters open                              |
| [0005 Executable local platform before managed deployment](https://github.com/joshstovall/TuneToys/blob/main/docs/decisions/0005-development-platform.md)                                                      | 2026-10-31 | Development adapter adopted; SQLite removed, superseded by 0009                                                        |
| [0006 AWS hosting and reusable immutable media](https://github.com/joshstovall/TuneToys/blob/main/docs/decisions/0006-aws-media.md)                                                                            | 2026-10-31 | Adopted at the user's request; lean pilot deployed, launch qualification pending                                       |
| [0007 Typed media signals, execution domains and a WebGPU video engine](https://github.com/joshstovall/TuneToys/blob/main/docs/decisions/0007-media-signals-and-domains.md)                                    | 2026-11-01 | Adopted for planning in sprint v0.0.5; nothing implemented                                                             |
| [0008 Takes as the recording model, a `data` cable type, and connections separate from identities](https://github.com/joshstovall/TuneToys/blob/main/docs/decisions/0008-takes-data-cables-and-connections.md) | 2026-11-01 | Adopted; implemented in the browser and API with fixtures (sprint v0.0.6); live providers and native hosts unqualified |
| [0009 PostgreSQL only, with a Drizzle schema and one baseline](https://github.com/joshstovall/TuneToys/blob/main/docs/decisions/0009-postgres-only-drizzle.md)                                                 | 2026-11-01 | Adopted; implemented except pilot adoption and WP-H in progress                                                        |
| [0010 One analysis engine: Rust descriptors native and WASM, Node parsers, optional CLAP on ONNX](https://github.com/joshstovall/TuneToys/blob/main/docs/decisions/0010-media-analysis-engine.md)              | 2026-11-01 | Adopted; implemented in sprint v0.0.8; the embedding lane unsupported until a CLAP export is pinned                    |

| [0011 Durable node items and one channel Mixer](https://github.com/joshstovall/TuneToys/blob/main/docs/decisions/0011-item-ports-and-the-channel-mixer.md) | 2026-11-01 | Accepted; implementation and verification tracked in sprint v0.0.16 |

```mermaid
%%{init: {'theme': 'base', 'themeVariables': {'primaryColor': '#FAFAF7', 'primaryTextColor': '#1C1C1B', 'primaryBorderColor': '#1C1C1B', 'lineColor': '#64645F', 'fontFamily': 'DM Sans, Inter, system-ui, sans-serif'}}}%%
flowchart LR
  A1["0001<br/>one portable model"] --> A2["0002<br/>shared engine"]
  A1 --> A3["0003<br/>one renderer, one authoring API"]
  A1 --> A4["0004<br/>immutable releases first"]
  A4 --> A5["0005<br/>executable local platform"]
  A5 --> A6["0006<br/>AWS hosting and media"]
  A2 --> A7["0007<br/>media signals and domains"]
  A3 --> A7
  A7 --> A8["0008<br/>takes, data cables, connections"]
  A6 --> A8
  A5 --> A9["0009<br/>PostgreSQL only, Drizzle"]
  A6 --> A9
  A2 --> A10["0010<br/>one analysis engine"]
  A6 --> A10

  classDef source fill:#F0442E,stroke:#1C1C1B,color:#FAFAF7
  classDef shared fill:#DCEBDD,stroke:#1C1C1B,color:#1C1C1B
  class A1 source
  class A2,A3,A4,A5,A6,A7,A8,A9,A10 shared
```

## Writing a new decision

Use the next number and the shape of the existing records: **Date and status**, **Problem**, **Decision**, **Alternatives**, **Consequences**, and the evidence needed to revisit. Keep detailed data contracts in [specs](https://github.com/joshstovall/TuneToys/blob/main/docs/specs/README.md) rather than duplicating them here, and link the architecture document that applies the decision.
