Skip to content

Project layout revision: the decision record - #30

Merged
ninjudd merged 2 commits into
mainfrom
docs/project-layout
Aug 6, 2026
Merged

ninjudd merged 2 commits into
mainfrom
docs/project-layout

Conversation

@ninjudd

@ninjudd ninjudd commented Aug 6, 2026 •

Copy link
Copy Markdown
Contributor

Docs-only: the decision record from today's layout discussion (project-layout.md). Merging signs off the design; the migration is queued in next.md as its own work.

The seven decisions, one line each:

  1. shared/ = instruments / generators / samples / plugins, split by contract; loops/ dissolves into samples/ because looping is a clip placement property — amends shared/ is organized by musical role, not file format #25, which had conflated a render program's role with its output's role.
  2. One generator category, two trigger policies — automatic (deterministic: sc-render, say; machine-triggered, cached) vs deliberate (ACE, voice; human-triggered, committed variants + choose). Determinism is the qualification for automatic re-run, not a filing principle: no separate homes.
  3. Authored specs get a file each — targets/<name>.yaml, mixes/<name>.yaml (the list-file was an imported Bazel-ism); ledgers stay tables (assets.yaml). Labels unchanged.
  4. generation/ dissolves: recipes are deliberate targets in targets/; variants live in audio/<target>/; follow-on, clips reference the target and choose repoints it.
  5. audio/ is all committed sound (recorded/imported/generated); samples-vs-audio is enforced visibility — promotion to shared on actual reuse, cheap by content addressing.
  6. One ledger per scope: shared/assets.yaml mirrors the song ledger; every file pinned once; the ledger pins committed audio only — programs are keyed, not pinned (git is code's integrity story).
  7. The ace prefix retires: bloom generate / bloom choose, answering voice-generation.md §4's seam question.

Also: project-core §3.4 gains an amendment note (grammar unchanged, spec files per-file), project-model.md carries a decided-not-migrated pointer so its tree diagram isn't read as final, and the migration entry in next.md includes the demo shared sample in field that forces the cross-scope reference spelling to be decided rather than deferred.

Heads-up: this will need a trivial list-file rebase against #29 (both touch next.md) — whichever merges second, I'll handle it.


Note

Low Risk
Documentation and planning only; runtime behavior and project layout in code/field are unchanged until the queued migration.

Overview
Docs-only decision record for the 2026-08-06 project layout revision. No loader, CLI, or field migration in this PR—implementation is queued separately in next.md.

Adds project-layout.md with seven DECIDED rules: four-shelf shared/ (instruments / generators / samples / plugins; loops/ merges into samples because looping is clip-owned); one generator category with automatic vs deliberate trigger policies (not separate homes); per-file targets/ and mixes/ while assets.yaml stays a ledger table; generation/ dissolving into deliberate targets plus audio/<target>/ variants; song audio/ as all committed sound with enforced visibility vs shared/; mirrored shared/assets.yaml (pins committed audio only—programs keyed, not pinned); retiring the ace CLI prefix for bloom generate / bloom choose. The doc also sketches migration chunks and leaves cross-scope clip reference spelling and variant filenames for the migration work.

Pointers elsewhere: project-model.md warns the tree diagram still reflects today’s layout until migration; project-core.md §3.4 notes per-file targets/mixes for label derivation (grammar unchanged); next.md adds the layout migration line.

Reviewed by Cursor Bugbot for commit bc1f813. Configure here.

One principle per shelf, decided in design discussion 2026-08-06:
shared/ = instruments / generators / samples / plugins by contract
(loops dissolves — looping is clip placement); one generator category
with two trigger policies (determinism qualifies a generator for
automatic re-run; storage follows trigger); authored specs per-file
(targets/, mixes/ — the list-file was a Bazel-ism) while ledgers stay
tables; generation/ dissolves into targets/ (spec) + audio/ (variants);
audio/ is all committed sound whatever produced it, samples-vs-audio is
enforced visibility with promotion on reuse; one ledger per scope
(shared/assets.yaml) pinning committed audio only — programs are keyed,
not pinned; the ace CLI prefix retires. Amends #25's taxonomy,
project-core §3.4's spec-file phrasing, and ace-generation §3.1's
layout, each with what changed. Migration queued in next.md, including
one demo shared sample in field; project-model.md carries a pointer
until it lands.
@ninjudd
ninjudd force-pushed the docs/project-layout branch from bc1f813 to f3829cc Compare August 6, 2026 05:02

@ninjudd ninjudd left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed at head f3829cc (in place). Docs-only, CI green. Two P3s, both the same species: the record supersedes/answers two earlier records without leaving tracks in them — inline on decisions 4 and 7. Everything the record asserts about the repo and field, I verified against the actual artifacts; all of it holds.

Verified against the repo record:

  • Decision 1's characterization of #25 is fair, not a strawman: project-model.md's tree really does file .scd render programs under loops/ ("committed audio or recipes (.scd)") — the conflation being amended is exactly what the current doc says.
  • Decision 5's cache-hit parenthetical is accurate history: #25's PR body records the .scd relocation as "a full cache hit, not even a re-render" — the record cites it word-for-true.
  • Keyed-not-pinned (decision 6) matches the built reality: program: is a wiring field with content hash in the action key (drift re-renders), while a ledger pin is a check-time verification promise (drift fails). The articulation of why pinning programs would be wrong — failing check on every legitimate edit — is the sentence that will save the future argument.
  • Every field fact is real: shared/loops/ holds creek-kit.scd + still-water-pad.scd (migration step 2's move list is exact), creek/generation/ holds the still-water-keys recipe + variants dir, and kit-punch is a real target in creek/targets.yaml — the label example resolves.
  • The §3.4 amendment keeps its promise: grammar untouched, only the "declared in a song's mix file" phrasing re-read; it follows the existing amendment style on the same list (the 2026-08-05 shorthand amendment sits five lines up). No renumbering anywhere; the new plan appends; all six relative links resolve.
  • The project-model.md pointer is the right shape and the right place — directly after the tree it contradicts, explicitly scoping tree and prose to "the layout the tooling accepts today." That's the stale-diagram protection AGENTS.md exists for.
  • Decision 2 generalizes without contradicting: the trigger-policy framing agrees with build-graph.md's determinism boundary and the #27/#29 records on both sides of it (say in-graph, ACE committed); the seed-auditioning note even anticipates deliberate-over-deterministic without reopening anything.
  • next.md's entry links the plan, sits in rough order, and now.md correctly doesn't change — nothing has started.

One precision footnote, no action needed: decision 6 supersedes "older //shared/samples:<name> sketches," but no such spelling exists anywhere in docs history (git log -S finds only this commit); the only shared-label sketch on record is //shared/instruments:dark-pad. If those sketches were conversational, the sentence is fine as memory — but a reader hunting the repo for them will come up empty. "Earlier sketches" → "earlier drafts of this conversation" if it's ever touched again.

Merging this signs the design off, so the two back-pointer P3s are worth the three sentences they cost before it lands — they're the same cold-context courtesy this record already extends everywhere else.

Comment thread docs/projects/all/project-layout.md Resolved
Comment thread docs/projects/all/project-layout.md Resolved
…ords

Decision 4 cited ace-generation §3.1 (outputs committed, not cached —
which this record keeps) for the layout it dissolves; the layout lives
in §3.2 and §4.2. Corrected, with a parenthetical noting §3.1 survives
as decision 2's deliberate policy.

ace-generation.md's status now carries the supersession note in place,
and voice-generation.md §4 marks the CLI-seam question answered by
§1.7 — so neither record reads as current truth to a cold reader.
Also: the //shared/samples spelling is labeled as sketched in
discussion, since no doc ever carried it.
@ninjudd
ninjudd merged commit 54da3aa into main Aug 6, 2026
1 check passed
ninjudd added a commit that referenced this pull request Aug 6, 2026
…n made real (#31)

Implements the full project-layout.md revision (#30) plus its §4
vocabulary, decided mid-migration so code and field only migrate once.

**The format** (project-layout §1, §4): authored specs are one file per
sound — `songs/<song>/sounds/<name>.yaml`, discriminated by `type:`
(`supercollider`, `say`, `normalize`, `eq`, `limit`, `reverb`,
`generate`), fed by `source:` with three syntactically disjoint
spellings: a bare slug resolves in the song's one namespace (assets and
sounds together, collisions are check errors), `//shared/assets:<name>`
crosses into the shared scope (the only cross-scope reference), and for
`supercollider` a path names the program file (bare filenames resolve in
`shared/instruments/`). Mixes are per-file in `mixes/`; clips carry the
same `source:` field. `shared/` lands on three contract-named shelves —
instruments (make sound), samples (are sound), plugins (change sound) —
with `shared/assets.yaml` as the shared ledger.

**Deliberate generation** (§1.4, §4.8): `generate` sounds carry
provenance + variants + `chosen:`; variants live in
`audio/<sound>/<n>.wav` and audition as `sounds:<name>-<n>`; the sound's
own label resolves to the chosen variant, so `bloom choose` is a pure
repoint (one-line diff, every clip follows) and the ledger-copy
promotion (and `--as`) is gone. `bloom generate`/`choose`/`setup`
replace the `ace` prefix, no aliases.

**The engine** (§4.7): executors are `Generator<T>` in `src/generators/`
— §1.2's own noun; a deliberate type has no in-graph Generator, which is
the trigger policy in the type system (`BuildableSound`). The action-key
JSON keeps its serialized `rule` field as a deliberate fossil, so the
only re-key is the `sc-render` → `supercollider` type value — verified
on field: exactly the two SC sounds re-rendered (bit-identically), and
every stem, mix, effect, and say render came through the whole migration
as cache hits, ending at a full `//...` build with zero executions.

**Safety**: the old layout (`targets.yaml`, `mix.yaml`, `generation/`)
is diagnosed with pointers, never silently ignored; generation-node
inputs get the same tamper verification as assets; `bloom explain`
speaks `type:`; "target" retires from CLI output in favor of label.

Docs: project-model.md and build-graph.md rewritten for the migrated
layout (pointer note replaced); project-layout.md gains §4.6–4.8
(instruments merge with the loops-precedent reasoning, Generator naming
with renderer/synths recorded as rejected, choose-repoints) and in-place
notes at §1.1/§1.4/§1.6/§3; project-core §3.4, ace-generation, and
voice-generation carry back-pointers.

231 tests (8 new shared-scope, reworked choose suite). field's migration
— including the demo shared sample clipped across the scope boundary —
is staged locally and lands on merge.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **High Risk**
> Flag-day layout and vocabulary touch loading, the graph, CLI, and
every YAML reference path; wrong migration or missed renames would break
projects until field migrates, though diagnostics and broad test
coverage reduce silent breakage.
> 
> **Overview**
> This PR **lands the project-layout revision**: authored specs move to
per-file **`sounds/`** and **`mixes/`**, YAML uses **`type:`** and
unified **`source:`** (song namespace, `//shared/assets:` pins, program
paths for SuperCollider), and **`shared/`** is three shelves plus
**`shared/assets.yaml`**.
> 
> **Deliberate generation** is no longer `generation/` + ledger
promotion: **`bloom generate`** writes a **`generate`** sound and
variants under **`audio/<name>/`**, and **`bloom choose`** only updates
**`chosen:`** so **`//songs/.../sounds:<name>`** and clips follow
repoints—**`ace`** / **`--as`** are removed.
> 
> **Engine rename**: **`src/rules/` → `src/generators/`**, **`RuleImpl`
→ `Generator`**, **`sc-render` → `supercollider`** (action-key JSON
still serializes the field as `rule`). CLI **`build`/`explain`/`query`**
speak **labels** and print **`type:`** on explain.
> 
> **Safety**: leftover **`targets.yaml`**, **`mix.yaml`**, and
**`generation/`** are **diagnosed** (not read); docs and project lists
are updated; tests replace the ACE choose suite with choose-as-repoint
coverage.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
ea67104. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
@ninjudd
ninjudd deleted the docs/project-layout branch September 28, 2026 04:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant