jevstrudel.git / songs / jev / all-green / CLAUDE.md
1@README.md
2
3## Notes for agents
4
5**Stop playback before playing `song.js`.** Sections count cycles from 0.
6
7**One cycle is one 5/4 bar** (`setcps(120/60/5)`). The site's parsers read `setcps(bpm/60/beats)` for any beats a bar; never "fix" the tempo by writing `setcps(96/60/4)`.
8
9**The board is read back from past decisions** (`first()`): the song queries its jev()s' answers over earlier sections and takes each one's last hap, so a late answer (jevCore plays the fallback until it arrives) replaces the fallback mid-section. `next` falls back to `b1`, a guess, never `end`: an `end` fallback played the ending while guess 1's ten banks were out (2026-09-26). jevCore has no API for a song to read its settled history; if one appears, use it.
10
11**`bankRules` counts requests.** jevCore asks segment n+1 only after n, once each, so the n-th bank request is segment n's. Never trigger the bank jev() any other way (the song only reaches it through `nextJev`'s `after`).
12
13**The state is mutated before each request** (`wordle.response_prefix`), because jev() takes one state per song. The booth's "what Jev was told" therefore shows the latest board for every section.
14
15**The word list is front-coded.** Regenerate `PACKED` from the source in SPEC.md (sorted, a digit of shared letters, then the rest); never hand-edit it.