/tmpA JamAI atelier lives in two places that do not share a fate:
/a/src/_sessiondata/<id>/ — the hook exhaust.
Durable. @miadi/hooks-interpreter reads this./tmp/claude-<uid>/<cwd-slug>/<id>/scratchpad/ —
the generators, scores, renders, captures. Mode 700 the session
owner. Subject to D /tmp 1777 root root 30d.The interpreter answers what the session became. The scratchpad is
what it made. Export both, or the next reader has a projection of a
floor that /tmp already swept.
Worked examples:
| drop | session | who |
|---|---|---|
/home/gmusic/atelier-jerry-origin-1937aa47 |
1937aa47-767f-4543-8cdc-257364ae2c52 |
Jerry, the origin |
…/episode-333-…/salix/songbird-71bbe83b |
71bbe83b-8963-4635-b8a2-40bcffbb3aff |
Guillaume / ava002, the fork |
_env.sh (or a human) names a session_*_id and someone wants
that session referenceable later./tmp/claude-*.Do not use this to commit anything. The drop is a drop.
# first look
cat /home/gmusic/.agents/scripts/_env.sh
On 2026-08-19 that file carried:
session_jerry_origin_id → Jerry’s atelier (this skill’s first drop)session_fork_ava002_id → Guillaume’s fork (already exported as songbird)session_jamai_william_observer_opus003_metal_id → a third session,
observer, not the originIf several ids are present, ask which one, or take the one the human named (“Jerry’s creation that I forked” = origin, not observer).
Confirm the directory exists:
ls /a/src/_sessiondata/<id>/_claude_user_inputs.jsonl
miadi-hooks-interpret session <id> --root /a/src/_sessiondata
miadi-hooks-interpret aspects <id> --root /a/src/_sessiondata
miadi-hooks-interpret agents <id> --root /a/src/_sessiondata
miadi-hooks-interpret ceremony <id> --root /a/src/_sessiondata
--json on each, keep both text and json. These go in 00-interpreter/.
Read the projection. Two numbers decide the rest of the night:
created N path(s) — the Write/Edit list. Usually ~20. Not the
opus. The 500 Bash calls that ran abc2midi / fluidsynth /
ffmpeg after each generator are invisible here.created — that is the floor. On Jerry
it was /tmp/claude-1000/-home-gmusic/<id>/scratchpad/.# cwd-slug is the session cwd with / → -
# Jerry's atelier ran in /home/gmusic → -home-gmusic
# Guillaume's fork ran in compositions-jamai → -home-gmusic-compositions-jamai
ls /tmp/claude-*/-home-gmusic*/<id>/scratchpad
/tmp/claude-1000 is 700 gmusic. An agent running as mia gets
Permission denied. sudo -n true first; if it works, sudo ls.
If it does not work, stop and say so — do not pretend the floor is gone.
If the directory is already gone, the sessiondata still projects, and
created still names the paths. Export 00-interpreter/ +
09-sessiondata/ and write in the README that the floor was lost.
Pattern: /home/gmusic/<who>-<what>-<short-id>
atelier-jerry-origin-1937aa47songbird-71bbe83b (Guillaume’s name, kept)Refuse to overwrite. If the dest exists, stop.
sudo python3 ~/.agents/skills/miadi-hooks-interpreter-jamai/scripts/export-jamai-session.py \
--session-id <id> \
--dest /home/gmusic/<meaningful-name>
The script:
00-interpreter/01–07 by extension and a short capture rule08-session-writes/ (current-on-disk bytes, not first-write bytes)last_* tails) into 09-sessiondata/<id>/MANIFEST.tsv (class · path · bytes · mtime · sha256)gmusic:gmusicThen you write the README.md. The script will not — the README is
where the judgment lives (see What the README must say).
# at least two generators and one score, src vs dest
sudo sha256sum /tmp/claude-1000/.../scratchpad/genNNN.py
sha256sum /home/gmusic/<dest>/01-generators/genNNN.py
Spot-check fails → do not keep the dest. Delete it and rerun.
| class | what goes in | replaceable? |
|---|---|---|
00-interpreter/ |
session, aspects, agents, ceremony × {txt,json} + SOURCE.txt |
yes — rerun the CLI |
01-generators/ |
*.py |
no |
02-scores/ |
*.abc |
only if the generator is proven deterministic |
03-rendered/midi |
*.mid that are not device captures |
yes — abc2midi |
03-rendered/audio |
*.wav *.mp3 rendered *.m4a |
yes — fluidsynth + ffmpeg |
03-rendered/video |
*.mp4 |
yes — jamai-defile / jamai-clip |
03-rendered/scores |
*.png *.svg |
yes — abcm2ps + rsvg-convert |
04-captures/ |
timestamped device *.m4a / Songbird *.mid, named source recordings |
no |
06-analysis/ |
note-*.md say-*.txt *.log leftover txt |
working memory |
07-surface/ |
HTML the session published (jamai-cast, tables) | snapshot |
08-session-writes/ |
living files the interpreter listed as Write/Edit, outside the scratchpad | snapshot of now |
09-sessiondata/ |
the JSONL exhaust, no last_* |
yes — still on /a/src until it isn’t |
Keep relative subdirs (ilex/gen_ava2.py stays 01-generators/ilex/gen_ava2.py).
Colliding basenames across subdirs are why.
The four tools that always run after a generator writes ABC:
abc2midiabcm2ps + rsvg-convertfluidsynth (cut reverb: %%MIDI control 91 0 / 93 0)ffmpeg, usually via jamai-defile.py / jamai-clip / jamai-publish-melodyThat is the chain GUILLAUME.md asked Jerry to list. It is also why
03-rendered/ is 99% of the bulk and why the interpreter cannot see it.
Write it by hand, after the copy, from the projection and two or three
06-analysis/note-*.md. Minimum:
/tmp 30d, mode 700)09-sessiondata/Ilex (ilex.ferret-harmonic.ts.net) is William’s Android. Jerry’s
Android is another node. A scratchpad folder named ilex/ means those
files passed through this floor, not that Jerry was watching Ilex.
Classify timestamped ilex/*.m4a and ilex/ava1/*.mid as 04-captures
and say so in the README. Do not write “Jerry’s device captures” unless
the human has named the node and the files match it.
A capture of a person’s voice entering a pushed git repository
cannot be withdrawn. Leave 04-captures/ out of any commit. The
manifest still names every file.
| trap | what happens | guard |
|---|---|---|
| agent is not the scratchpad owner | Permission denied on /tmp/claude-1000, looks like “floor is gone” |
id; sudo -n true; sudo ls |
| dest already exists | a second run would mix two copies | refuse to overwrite |
trusting created N path(s) as the opus |
you export 24 files and leave 2 GB of music in /tmp |
always walk the scratchpad |
committing 03-rendered/ |
2.4 GB of regenerable blobs in git forever | drop, don’t repo; keep generators + manifest |
committing 04-captures/ |
a voice you cannot recall | named in README, left untracked |
08-session-writes/ as “the original” |
those files have been edited since the Write | README says “current-on-disk” |
last_* in sessiondata |
tails of ledgers you already copied | skip them |
| assuming cwd-slug | Jerry’s floor was -home-gmusic, Guillaume’s was -home-gmusic-compositions-jamai |
take the path from the projection |
| writing the ceremony | written=false is the contract |
never POST it from this skill |
| calling Ilex Jerry’s phone | wrong person, wrong consent boundary | see above |
/a/src required)miadi-hooks-interpret session <id> \
--root /home/gmusic/<dest>/09-sessiondata
miadi-hooks-interpret aspects <id> \
--root /home/gmusic/<dest>/09-sessiondata
Same projection, same aspects (deterministic, no LLM, ≤55 words). If the bytes differ, the drop is incomplete or the package moved.
This skill owns:
@miadi/hooks-interpreter as the observer/tmpThis skill does not own:
@miadi/hooks-interpreter)jamai-morning) or the clip method (jamai-montage)miadi-orchestration-kit/pi/jamai-extensions)