Systems / dossier
Case file record
Battuta
A Rust core for human-agent collaboration on musical decisions. The agent reads MIDI precisely, changes it mechanically, explains what changed, and plays the result. The human judges. Neither is much use alone.
What this proves
The same discipline — auditable state, sharp boundaries, mechanical precision — transfers from high-pressure financial systems to creative collaboration. And the boundary that matters most in agent tooling is not technical: it is who decides.
- Record status
- v0.1.0 — published crate
- Type
- Human-agent MIDI collaboration core
- Domains
- MIDI / human-agent collaboration / Rust / creative tooling
Problem
Music tools blur two failure domains: is the part badly written, or is the sample bad? Agent tools blur a parallel line: did the agent decide, or did the human? Both are the same boundary violation — and both produce the same invisible mistake: compensating in the wrong layer.
Context
Started with wanting to take apart a few bars of MIDI and hear whether a change was better. Became a question about what happens when a human and an agent look at the same musical object with different strengths — one hears, one counts — and need a shared surface where every change is traceable.
Architecture
MIDI file → inspect (read precisely) → edit spec (mechanical, auditable) → apply → diff (what changed) → play (audition) → human judgment → next edit.
Decision boundaries
- B01 What is inside a Take belongs to the Piece. What is required to turn a Take into air belongs to the Rig.
- B02 Edits are mechanical — add, delete, move, resize, velocity, CC. No make_sadder. Musical intent belongs outside the core.
- B03 The agent executes; the human decides whether it sounds right. Listening is the arbiter.
- B04 A change that is theoretically better and sounds worse loses.
Trade-offs
Deliberately few commands, deliberately no composition intelligence. Expressiveness is sacrificed for auditability. The core will never suggest a note; it will always tell you exactly what it did to yours.
Artifacts
- Published Rust crate on crates.io (battuta v0.1.0)
- CLI binary: mid info / inspect / apply / diff / play
- Source repository with test suite
Connection to current focus
Trading infrastructure forged the discipline: separate truth from intent, make every state transition auditable, keep boundaries sharp under pressure. Battuta is where that discipline proves it travels — from financial systems to musical decisions, the same question holds: who is the authority on what actually happened?
Next structural improvement
A listenable before/after demo: four bars, one edit, the diff, and both versions played back. The proof that matters for a music tool is not a diagram — it is sound.
What it demonstrates
Cross-domain transfer of system discipline. Agent-human collaboration architecture where the boundary is designed, not accidental. Rust systems programming. Honest staging of a v0.1.0.