Skip to content

The Project Contract and Studio

Mark Rogers edited this page Nov 7, 2026 · 8 revisions

A music project is a folder with a fixed layout, so other plugins (a film plugin laying a score, a game plugin importing music) and later sessions can read it. The rule in the hub's references/contract.md: keep the field names stable, add fields, never rename them. The studio is the listener's private folder of verdicts and taste, shared by every project.

The project folder

<project>/
  brief.md        the brief in words, plus a Decisions list
  music.json      the manifest
  ledger.jsonl    one JSON object per line: takes and verdicts, append-only
  takes/          raw renders, named <slug>_s<seed>.<ext>
  sheets/         spectrogram contact sheets
  out/            deliverables only

mw.py new writes all of it (Commands). gen, verdict and ledger find the project's ledger by walking up from the path they are given to the first folder that holds ledger.jsonl or music.json.

music.json

What new wrote for the flute project on Commands:

cat music/flute/music.json
cat music/flute/ledger.jsonl
{
 "musicwright": "0.1.17",
 "name": "Flute solo",
 "use": "listening",
 "duration_s": 60.0,
 "loudness_preset": "streaming",
 "created": "<now>",
 "ai_generated": true,
 "deliverables": [],
 "disclosure": null
}
[exit 0]
{"type": "verdict", "date": "<now>", "take": "flute_s63389", "file": "music/flute/takes/flute_s63389.flac", "verdict": "keep", "note": "clean, breathy, good ending", "by": "listener"}
[exit 0]

The ledger holds the one verdict line verdict wrote; a project that gen rendered into also has a take line per file.

Field Meaning
musicwright the version that made the folder
name, use, duration_s from the brief; use is game-loop, game-cue, film-cue, listening or song
loudness_preset a name from loudness.json (since 0.1.1 new refuses any other: Errors)
created local time the folder was made (written by new; in contract.md's table since 0.1.1)
ai_generated true when any deliverable came from a generator (new writes true)
deliverables a list of {file, take, model, licence, seed, lufs_i, true_peak_dbtp, loop: {bars, bpm, length_s} or null}
disclosure the line to paste into a store page, video description or credits

new writes every field, with an empty deliverables list and "disclosure": null. No mw.py command fills deliverables or disclosure: the skills tell the agent to add each finished file with its numbers, and the disclosure line from musicwright-generate's references/licences.md.

ledger.jsonl

One JSON object per line, appended and never rewritten. From contract.md and the code:

  • Take lines, written by gen for every downloaded take: type ("take"), date, take (the file name without extension), file (absolute), route, recipe, model, seed, caption, lyrics, duration_s, bpm, key, params (the merged recipe settings), host, and measure (duration_s, lufs_i, true_peak_dbtp, tail_silence_s, warnings); for a source task also task, src (absolute) and track (from the code).
  • Verdict lines, written by verdict: type ("verdict"), date, take, file, verdict (keep, reject or maybe), note, by. A take can have several verdicts; the latest wins.

ledger joins them by the take field. Since 0.1.1 a verdict given to a file gen never logged uses the file's stem as take (flute_s63389 on Commands), the same form gen writes; 0.1.0 used the name with its extension, which no take line could match. ledger lists only takes gen logged, so such a verdict does not appear in its output.

The studio

MUSICWRIGHT_HOME, default ~/.musicwright. It never enters the repository. musicwright-curate owns its layout (references/studio.md):

File Written by Holds
config.json you {"comfyui": "http://host:port,...", "acestep_rest": "http://host:port", "soundfont": "<path to a .sf2>"}
verdicts.jsonl mw.py verdict every verdict, with the take's recipe (route, model, seed, caption, lyrics, params, duration) when the ledger had the take
taste.md mw.py note taste, then curated a Profile section and, since 0.1.1, a "Tired of" list at the top (both rewritten by curate), then dated notes (append-only)
lessons.md mw.py note lesson dated lessons and dead ends
recipes.md mw.py note recipe recipes that worked, with seeds
ideas.md mw.py note idea music to make later
projects.md you or curate one line per project folder (path, use, status)

The folder is created by the first verdict or note; doctor reports whether it exists. What it held after one verdict and two notes is on Commands. config.json sets the hosts for every command that reads them, below the environment variables (Getting started).

Clone this wiki locally