← Music as CodeCONTENT HISTORY

Update to Music as Code

Snapshot Sep 30, 2026 · 23:15 UTC · version 0.2.2

Collection source: not recorded for this historical snapshot.

WHAT CHANGED · RULE-BASED ANALYSIS

First saved snapshot

No earlier snapshot is available to establish a change.

Compare saved observations

Download comparison JSON
Full technical diff · 0 changed fields
Full snapshot data
{
  "description": "Create, edit, explain, and repair LilyPond scores in local `.ly` files. Hand off a local file and a hacklily.org/wasm link after writing the source. Never open a browser to validate. Use for sheet music, classical scores, parts, lead sheets, engraving, SATB, chamber music, or LilyPond debugging. Do not use for Strudel, live-coding, DAW projects, or rendered audio unless the user also wants LilyPond source.",
  "included_files": [
    {
      "relative_path": "references/lilypond-code-guide.md",
      "size_in_bytes": 7525
    },
    {
      "relative_path": "scripts/lilypond-compile.mjs",
      "size_in_bytes": 1249
    },
    {
      "relative_path": "scripts/lilypond-url.mjs",
      "size_in_bytes": 293
    }
  ],
  "name": "lilypond",
  "skill_md_contents": "---\nname: lilypond\ndescription: Create, edit, explain, and repair LilyPond scores in local `.ly` files. Hand off a local file and a hacklily.org/wasm link after writing the source. Never open a browser to validate. Use for sheet music, classical scores, parts, lead sheets, engraving, SATB, chamber music, or LilyPond debugging. Do not use for Strudel, live-coding, DAW projects, or rendered audio unless the user also wants LilyPond source.\n---\n\n# Text to LilyPond\n\nCreate readable LilyPond source that the user can keep editing, engraving, and\nplaying. The local `.ly` file is the primary artifact. A chat response or a\nrendered preview is not a substitute for the source.\n\n## Speed\n\nThe user is waiting to see the score. Once the `.ly` file exists and the\nHacklily link is in the reply, **stop**.\n\nDo not open Playwright, a browser, Hacklily, LilyBin, a PDF viewer, or a MIDI\nplayer to validate, preview, or debug. Those tools being available is not\npermission to use them. The user will see problems when they open the link.\n\nWrite the file, build the link, reply. That is the whole job unless the user\nlater reports a Hacklily or compile error.\n\nIf `lilypond` is on `PATH`, also compile once for PDF and MIDI next to the\nsource. A missing compiler is not a reason to delay the link.\n\n## Working defaults\n\n- Preserve the user's requested tempo, meter, key, instrumentation, length, and\n  output path.\n- If no path is given, write a short descriptive filename under `music/`, such\n  as `music/sarabande-in-d.ly`.\n- Start every file with `\\version \"2.24.0\"` and `\\language \"english\"`. English\n  names are `cs` and `bf`, never `c#`, `cis`, or `bes` unless the user asks for\n  another language.\n- Every `\\score` must contain both `\\layout { }` and `\\midi { }`. Missing\n  `\\layout` yields MIDI only. Missing `\\midi` yields PDF only.\n- Set `\\tempo` so MIDI plays at the requested speed. LilyPond's MIDI default is\n  quarter = 60.\n- Prefer a short complete score over a large generated work. Add movements or\n  parts only when the request calls for them.\n- Put each part in a named variable (`rightHand`, `violinI`, `melody`) so later\n  edits stay local.\n- Use `|` bar checks at the end of every bar.\n- Use only documented LilyPond syntax and General MIDI instrument names. Never\n  invent a command, `\\include`, or `midiInstrument` string to satisfy a prompt.\n- Do not write Scheme (`#` functions, `#(define ...)`) unless the user asks for\n  a feature that requires it.\n- Do not autoplay MIDI.\n\nRead [references/lilypond-code-guide.md](references/lilypond-code-guide.md) when\nwriting or debugging LilyPond. Search it for the specific construct instead of\nloading unrelated material.\n\n## Workflow\n\n1. Inspect an existing target before editing it. Preserve its musical identity\n   unless the user asks for a rewrite.\n2. Translate the request into a short musical brief: tempo, meter, key,\n   forces, length, and whether the user wants concert score, parts, or a lead\n   sheet. State only assumptions that affect the result.\n3. Write or edit the `.ly` source. The file must compile as a complete LilyPond\n   input, not a fragment pasted in chat.\n4. Build a viewer link with\n   `node skills/lilypond/scripts/lilypond-url.mjs <file>` or equivalent URL\n   encoding: `https://www.hacklily.org/wasm#src=` + `encodeURIComponent(source)`.\n5. If `lilypond` is on `PATH`, compile with\n   `node skills/lilypond/scripts/lilypond-compile.mjs <file>` when that path\n   exists, otherwise `lilypond -dno-point-and-click -o <stem> <file>`. The\n   script prints `pdf:` and `midi:` paths on success. If lilypond is missing\n   (script exit 2), skip this step.\n6. Reply with the handoff choices, compile status if attempted, and the tempo\n   assumption. Then stop.\n7. If the user reports a Hacklily or lilypond error, repair the smallest\n   responsible part from the error text and repeat steps 4 to 6. Do not open a\n   browser to find the error.\n\n## Editing rules\n\n- Change only the requested musical dimension when asked to preserve rhythm,\n  harmony, voicing, or structure.\n- For explanations, connect each LilyPond expression to what appears on the\n  page or in the MIDI.\n- For repairs, do not replace the whole score when a local syntax, octave, or\n  duration correction is enough.\n- Duration persists until changed. If a passage is rhythmically wrong, look at\n  the last explicit duration before rewriting bars.\n- `\\relative` octaves are computed from the previous pitch. If one note is in\n  the wrong octave, every following note may be wrong too. Fix the first bad\n  leap, then recompile.\n- Do not claim that a score sounds good or looks publication-ready based on a\n  clean compile. Report compile status separately from the user's judgment.\n\n## Handoff\n\nAlways include:\n\n- **View source:** the exact `.ly` path as a clickable Markdown link\n- **Open score and player:** a `hacklily.org/wasm` link built from that file's\n  source\n- The tempo assumption (for example `quarter = 96`)\n\nWhen local compile ran, also include:\n\n- Whether it passed or failed\n- **View score:** the `.pdf` path as a clickable Markdown link\n- **Play locally:** the `.midi` path as a clickable Markdown link. Do not\n  autoplay or claim the host has a MIDI player.\n\nNever claim the score was read or the MIDI was heard unless the user actually\ndid that.\n"
}

SHA-256 of public snapshot: eec2bab245586b9eb34564fdb8bd40dd8c43c118746974a5ebe4a7b909ad8a89