Inventory Horse Game tooling
Transcript
Thinking20:52:29
This is a large inventory task, so I'll read the files directly myself rather than delegating, and start by exploring the directory structure first.
Bashcd "/c/Users/a327e/Desktop/a327ex/ABAgames/knightvspawns" && find . -maxdepth 2 ...20:52:30Output not recorded
cd "/c/Users/a327e/Desktop/a327ex/ABAgames/knightvspawns" && find . -maxdepth 2 ...Thinking20:52:34
I notice this is a git repository despite what the environment note suggested, though that discrepancy may just relate to the parent directory. I'll move on and start reading through the key files in small batches — boot.lua, verify.lua, render.lua, annotate.lua, edit.lua, and a few others related to the fx system.
ReadC:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\.claude\CLAUDE.md20:52:34Output not recorded
C:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\.claude\CLAUDE.mdReadC:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\infrastructure.md20:52:34Output not recorded
C:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\infrastructure.mdReadC:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\boot.lua20:52:34Output not recorded
C:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\boot.luaReadC:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\verify.lua20:52:34Output not recorded
C:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\verify.luaThinking20:52:40
Since boot.lua got truncated, I need to continue reading it from offset 709 to catch any remaining dev-relevant state, and I should also pull in render.lua, annotate.lua, edit.lua, fxsmoke.lua, fx_lab.lua, and fx_done.lua in parallel.
ReadC:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\boot.lua20:52:40Output not recorded
C:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\boot.luaReadC:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\render.lua20:52:40Output not recorded
C:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\render.luaReadC:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\annotate.lua20:52:40Output not recorded
C:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\annotate.luaContinuing to read the remaining tool files.
ReadC:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\edit.lua20:52:42Output not recorded
C:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\edit.luaReadC:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\fxsmoke.lua20:52:42Output not recorded
C:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\fxsmoke.luaReadC:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\e4probe.lua20:52:42Output not recorded
C:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\e4probe.luaContinuing with more files: glossary.lua, items.lua (search only), sound_moments.lua, sound_overrides.lua, replay_last.txt head, cuts files, project.edl, and the emoji/ directory files.
ReadC:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\glossary.lua20:52:47Output not recorded
C:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\glossary.luaReadC:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\sound_moments.lua20:52:47Output not recorded
C:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\sound_moments.luaReadC:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\sound_overrides.lua20:52:47Output not recorded
C:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\sound_overrides.luaReadC:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\replay_last.txt20:52:47Output not recorded
C:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\replay_last.txtReadC:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\cuts.txt20:52:47Output not recorded
C:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\cuts.txtReadC:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\cuts_auto.txt20:52:47Output not recorded
C:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\cuts_auto.txtReadC:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\cuts_intro.txt20:52:47Output not recorded
C:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\cuts_intro.txtReadC:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\cuts_new.txt20:52:47Output not recorded
C:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\cuts_new.txtReadC:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\project.edl20:52:47Output not recorded
C:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\project.edlReadC:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\render_cuts.sh20:52:47Output not recorded
C:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\render_cuts.shThinking20:52:59
Good, I've confirmed the replay_last.txt format now. Next I want to check the tools directory scripts, the emoji pipeline files, and viewer.lua, along with the sound index JSON.
I should also batch-read viewer.lua, fx_lab.lua, fx_done.lua, the verify and audit scripts, note_synth and sound_credits tools, plus verify/run_1.txt, and grep main.lua for dev tooling since it's quite large.
ReadC:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\viewer.lua20:52:59Output not recorded
C:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\viewer.luaReadC:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\tools\verify.sh20:52:59Output not recorded
C:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\tools\verify.shReadC:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\tools\fxsmoke.sh20:52:59Output not recorded
C:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\tools\fxsmoke.shReadC:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\tools\audit_scores.py20:52:59Output not recorded
C:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\tools\audit_scores.pyReadC:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\verify\run_1.txt20:52:59Output not recorded
C:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\verify\run_1.txtNow let's read the remaining tools files, emoji/pipeline.lua and sounds files, fx_lab.lua, fx_done.lua, items.lua (via grep for dev tooling), and main.lua via grep.
ReadC:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\tools\package_win.py20:53:04Output not recorded
C:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\tools\package_win.pyReadC:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\tools\note_synth.py20:53:04Output not recorded
C:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\tools\note_synth.pyReadC:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\tools\sound_credits.py20:53:04Output not recorded
C:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\tools\sound_credits.pyReadC:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\tools\ui_layout_probe.lua20:53:04Output not recorded
C:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\tools\ui_layout_probe.luaReadC:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\tools\sound_index.json20:53:04Output not recorded
C:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\tools\sound_index.jsonThinking20:53:11
The sound_index.json file is just a large cache over 3MB, so I don't need to inspect its contents closely—the size alone tells me its purpose. Next I want to move through the emoji sound-related files: pipeline, sounds, sound_tuner, sound_picker, fx, effect_lab, and volume_tuning to understand how they connect.
ReadC:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\fx_lab.lua20:53:11Output not recorded
C:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\fx_lab.luaReadC:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\fx_done.lua20:53:11Output not recorded
C:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\fx_done.luaBashcd "/c/Users/a327e/Desktop/a327ex/ABAgames/knightvspawns" && wc -l main.lua boot...20:53:11Output not recorded
cd "/c/Users/a327e/Desktop/a327ex/ABAgames/knightvspawns" && wc -l main.lua boot...Bashcd "/c/Users/a327e/Desktop/a327ex/ABAgames/knightvspawns" && ls verify | wc -l &...20:53:11Output not recorded
cd "/c/Users/a327e/Desktop/a327ex/ABAgames/knightvspawns" && ls verify | wc -l &...Thinking20:53:19
I'm checking the renders/synccheck subdirectory alongside the trailer video files, then plan to look through the emoji module's Lua scripts for pipeline, sound tuning, sound picker, sounds, effect lab, and volume/sound tuning to understand the game's own tooling.
I still need the rest of fx_lab.lua beyond the first 150 lines, particularly the F7/Q/E panel logic and sound picker UI integration, so I'll read it in further chunks alongside the emoji files.
ReadC:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\emoji\pipeline.lua20:53:19Output not recorded
C:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\emoji\pipeline.luaReadC:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\emoji\sounds.lua20:53:19Output not recorded
C:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\emoji\sounds.luaBashcd "/c/Users/a327e/Desktop/a327ex/ABAgames/knightvspawns" && ls renders/syncchec...20:53:19Output not recorded
cd "/c/Users/a327e/Desktop/a327ex/ABAgames/knightvspawns" && ls renders/syncchec...Thinking20:53:25
I want to quickly check renders/synccheck/dev, then move through sound_tuner.lua, sound_picker.lua, sound_tuning.lua, volume_tuning.lua, and the rest of fx_lab.lua, plus main.lua's dev-tooling entry points like debug_grant, the F6 skull panel, F1 storm panel, and sound trace UI, along with items.lua's debug-related content.
Given how large these files are, I'll grep main.lua and items.lua for key markers instead of reading them in full.
Bashcd "/c/Users/a327e/Desktop/a327ex/ABAgames/knightvspawns" && ls -la renders/sync...20:53:26Output not recorded
cd "/c/Users/a327e/Desktop/a327ex/ABAgames/knightvspawns" && ls -la renders/sync...ReadC:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\emoji\sound_tuner.lua20:53:26Output not recorded
C:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\emoji\sound_tuner.luaReadC:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\emoji\sound_picker.lua20:53:26Output not recorded
C:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\emoji\sound_picker.luaReadC:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\emoji\sound_tuning.lua20:53:26Output not recorded
C:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\emoji\sound_tuning.luaReadC:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\emoji\volume_tuning.lua20:53:26Output not recorded
C:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\emoji\volume_tuning.luaThinking20:53:34
I've gathered enough on those two data files, which are mostly auto-generated tuning config for the sound tuner rather than actual tools. Now I want to grep main.lua for the key dev tooling entry points -- the debug key binds, net_post, rec_* functions, grng, sound trace UI drawing, FXLAB integration, and the storm/skull panels.
Since main.lua runs to about 12k lines, I'll search specifically for the relevant function definitions rather than reading it all.
Grep^function (rec_|archive_run|net_post|action_card_begin|debug_|storm_panel|skull_panel|fxlab_update|die\(|start_replay|stop_replay|replay_update|sb_)20:53:34Output not recorded
^function (rec_|archive_run|net_post|action_card_begin|debug_|storm_panel|skull_panel|fxlab_update|die\(|start_replay|stop_replay|replay_update|sb_)Thinking20:53:38
I've already gone through viewer.lua fully. Now I need to check emoji/effect.lua, effect_lab.lua, juice.lua, cursor.lua, text.lua, and plants.lua to sort out which are dev tools versus actual game code, since sound_tuning.lua and volume_tuning.lua were already covered as auto-saved data files. Let me skim through these next.
ReadC:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\emoji\effect.lua20:53:38Output not recorded
C:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\emoji\effect.luaReadC:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\emoji\effect_lab.lua20:53:38Output not recorded
C:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\emoji\effect_lab.luaReadC:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\emoji\juice.lua20:53:38Output not recorded
C:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\emoji\juice.luaReadC:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\emoji\cursor.lua20:53:38Output not recorded
C:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\emoji\cursor.luaReadC:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\emoji\text.lua20:53:38Output not recorded
C:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\emoji\text.luaReadC:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\emoji\plants.lua20:53:38Output not recorded
C:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\emoji\plants.luaThinking20:53:48
I'm sorting the files into categories: effect.lua and juice.lua and cursor.lua are runtime game code, while effect_lab.lua is a dev tool for inspecting effects.
Continuing the classification: text.lua and plants.lua are runtime game systems, and sound_tuning.lua/volume_tuning.lua are generated data files rather than tools themselves. Next I want to dig into main.lua for the recording functions, net_post, sb_ helpers, debug utilities, and the various panel-drawing code to understand how the dev tools wire into the game.
ReadC:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\main.lua20:53:48Output not recorded
C:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\main.luaNow let's look at net_post, archive_run, and the debug_* functions plus F6/F1 panels and sound trace draw.
ReadC:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\main.lua20:53:52Output not recorded
C:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\main.luaReadC:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\main.lua20:53:52Output not recorded
C:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\main.luaReadC:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\main.lua20:53:52Output not recorded
C:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\main.luaThinking20:53:58
I've covered the main dev tooling in main.lua well enough. Now I want to check DEBUG_FIRST_SEED and grng definitions, the skull_panel draw function, the F6 director panel, debug_heal/debug_tornado, and session_on, so I'll grep for these next.
GrepDEBUG_FIRST_SEED|DEBUG_TEST_ITEMS|^grng|function draw_skull_panel|function debug_heal|function debug_tornado|SOUND_TRACE|sound_trace_recent|function draw_sound_trace20:53:59Output not recorded
DEBUG_FIRST_SEED|DEBUG_TEST_ITEMS|^grng|function draw_skull_panel|function debug_heal|function debug_tornado|SOUND_TRACE|sound_trace_recent|function draw_sound_traceReadC:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\main.lua20:53:59Output not recorded
C:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\main.luaReadC:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\main.lua20:53:59Output not recorded
C:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\main.luaThinking20:54:07
I've gathered enough for a thorough inventory now, but I want to double-check a few more pieces first: the grng seeding logic and reset() dev item grant, the FXLAB grid/view F7 keys, Q panel wiring, and the E4PROBE/net_post audit tie-ins I already covered. Let me look specifically at how "grng" is defined and what reset() does.
Grepgrng = random_create|function reset\(|no_dev_items|DEBUG_START_ITEMS20:54:07Output not recorded
grng = random_create|function reset\(|no_dev_items|DEBUG_START_ITEMSI have sufficient material now. Let me check the reset() grng seeding line and a couple remaining fx_lab.lua sections (F7 panel keys Q/E code panel) briefly, then compile the final report.
ReadC:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\main.lua20:54:10Output not recorded
C:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\main.luaGrepfxlab_open|fxlab_close|fx_code|fx_sounds panel|FX_SCENARIOS =|function fxlab_draw|function fxlab_update20:54:10Output not recorded
fxlab_open|fxlab_close|fx_code|fx_sounds panel|FX_SCENARIOS =|function fxlab_draw|function fxlab_updateThinking20:54:14
I have enough detail now, but let me check reset() to see where grng gets created via random_create, searching a bit wider for that.
Grepgrng\s*=20:54:15Output not recorded
grng\s*=I now have everything needed. Let me compile the full inventory report.
ReadC:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\main.lua20:54:18Output not recorded
C:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\main.luaThinking20:54:23
This confirms grng is seeded from rec_seed, entropy-seeded per infrastructure.md §7. I still need to note that e4probe.lua is still present in the file list despite infrastructure.md marking it TEMPORARY/DELETED once signed off—so it's still active as of this snapshot. Now I have everything needed to write the full report.
Let me compose the final answer covering each tool/subsystem with 7 points, the dev key binds list, and check whether the game defines any custom agent_* functions beyond the framework's own helpers.
Grepfunction agent_20:54:24Output not recorded
function agent_Grep^function agent_|^agent_20:54:24Output not recorded
^function agent_|^agent_Thinking20:54:28
The game's agent.lua copy matches the framework's exactly, with no game-specific additions—so the complete set of agent_* functions is just the standard kit: agent_tap, agent_click, agent_wait_until, agent_dump, agent_globals, agent_shot. Now I'm ready to write up the final report.
Dev Tooling Inventory — ABAgames/knightvspawns
All line numbers/paths are from C:\Users\a327e\Desktop\a327ex\ABAgames\knightvspawns\. Nothing below was run or modified — this is a reading-only inventory.
1. The game's own replay/recording system (rec_*, main.lua)
- Name/location: The recorder —
main.lualines ~1355–1477 (rec_reset,rec_event,rec_cursor_sample,rec_serialize,rec_parse), playback pumpstart_replay/stop_replay/replay_updateat lines 1480–1614+. - What it does: Records every gameplay-relevant event (pawn spawns, march beats, move commits, skull spawns, strike/skull-landing arrivals, dev tank placements, dev chunk jumps) plus an idle-suppressed 30Hz cursor track, then serializes the whole run to one string. Everything not recorded (VFX, camera) re-derives deterministically from the seeded
grngstream during playback. - How entered: Automatic —
rec_event/rec_cursor_samplefire continuously during normal play (gated onrecexisting and notreplay_mode); serialization happens indie()/archive_run(). - Data: Its own format, quoted from the code:
'KVP3|seed|score|duration_ms|events|cursor' — events as '<dt_ms><kind><arg?>' tokens ... cursor as '<dt_ms>,<dx>,<dy>' tokens'(main.lua:1398). Event kinds ares(pawn spawn,hp*10+gxpacked),m(march),c(move commit → target cellgx*100+gy),k(skull spawn),p(dev tank placement),d(dev chunk jump),a(strike arrival, bare),l(skull landing, bare). Written toreplay_last.txt(last run only) and to timestamped files underreplays/*.txtbyarchive_run. - Engine calls: None directly — this is 100% game-side text serialization/parsing, no engine
.aprrecording involved. It does interact withrandom_create/random_seed/random_int(engine RNG primitives) to buildgrngand the bot's ownvrng. - Size: Recorder + parser + pump ≈ 260 lines inside the 12,240-line
main.lua. - External deps: None (pure Lua string/file I/O).
2. Deterministic gameplay seed (grng, DEBUG_FIRST_SEED)
- Name/location:
main.lua:2545reset(seed, opts), specifically line 2623–2624 (rec_seed = seed or random_int(...),grng = random_create(rec_seed)); the pin atmain.lua:612(DEBUG_FIRST_SEED = nil). - What it does:
grngis the one RNG every recorded-event handler is allowed to touch (item drops, procs, status rolls, summon/projectile targets) — its seed is stamped in the replay header so playback reproduces every roll bit-for-bit.DEBUG_FIRST_SEEDoptionally pins the very first boot run's seed for dev auditioning (comment: "55/70/132 open with Fire as the first drop"); restarts are always random. - Entered: Automatic at every
reset();DEBUG_FIRST_SEEDis a hand-edited constant, patched tonilbytools/package_win.pybefore shipping (regex-asserted). - Data: In-memory RNG state only; the seed rides inside the
KVP3|seed|...replay string. - Engine calls:
random_create,random_seed,random_int(engine RNG primitives) — game-side seeding on top of the engine's own entropy-seededglobal_rng(perinfrastructure.md§7). - Size: A few lines.
- External deps: None.
3. verify.lua — headless replay-determinism harness
- Name/location:
verify.lua, 522 lines, whole file. Entry functionsverify_run,verify_next,verify_start_gen/verify_start_check,verify_update,verify_report. Also defines the sharedharness_takeover()(used by every other harness). - What it does: Two phases —
genhas a bot (verify_bot_commit, its own greedy/random click logic) play N seeded runs and writes each run's KVP3 string + an expectation line toverify/run_<seed>.txt;checkreplays each file and compares score/items/hp/duration against the recorded expectation, catching any grng-sequence divergence.sweepmode grants one item per run (exercising every roll site) plus a few full-catalog runs;checkallre-checks every fixture on disk. - How entered: Function on a running instance via the eval channel —
verify_run{mode='both', seeds=40, seed0=1}etc.; wrapped bytools/verify.sh both 40 1/sweep 30 100/checkall. - Data reads/writes: The game's own fixture format
verify/run_<seed>.txt— line 1 is the rawKVP3|...string, line 2 isexpect score=N items=a,b,c dur_ms=N hp=N trunc=0/1 pre=item,item(confirmed head ofverify/run_1.txt). No.aprinvolved. - Engine calls:
engine_set_draw(false),engine_quit(),random_create/random_int/random_float(its own bot rngV.vrng, explicitly nevergrng). Uses the game's own frame stepping viaverify_update(dt)hooked fromupdate(), notengine_step. - Size: 522 lines.
- External deps: None beyond the engine;
tools/audit_scores.pycalls into this viaagent drive eval.
4. render.lua — offline deterministic trailer-footage capture
- Name/location:
render.lua, 125 lines. Entryrender_run(opts), per-framerender_update(dt). - What it does: Replays a saved KVP3 log fixed-step and captures every frame to
frame_%06d.pngvia the engine's capture pass, optionally rendering the real audio mix offline. Supportsfrom=/seconds=to capture just a window (e.g., for a trailer cut) and holds a tail after the run ends so a death isn't cut off. - How entered:
render_run{replay=..., out=..., from=N, seconds=N, audio=path.wav}via eval channel; wrapped per-cut byrender_cuts.sh. - Data: Reads a
KVP3replay (bare string, or averify/run_*.txtfixture — only line 1 is used, withverify_pre_grant(verify_parse_pre(meta))re-applying any pre-granted items from line 2). Writes PNG frames + optional.wavunderrenders/<dir>/. - Engine calls:
engine_set_fixed_step(true),audio_render(path),engine_render_setup(dir)(arms the capture pass),engine_state(),engine_quit(). Usesstart_replay/stop_replay(the game's own replay pump), not.apr/replay_seek. - Size: 125 lines.
- External deps:
ffmpegdownstream (documented command in the header) to muxframe_%06d.pnginto an mp4;render_cuts.shalso callsffprobe.
5. render_cuts.sh + cuts*.txt + project.edl — the trailer cut list & batch renderer
- Name/location:
render_cuts.sh(shell driver),cuts.txt/cuts_auto.txt/cuts_intro.txt/cuts_new.txt(plain cut lists),project.edl(the clip-editor's project file). - What it does:
render_cuts.shreads a<file> <in> <out> <label>list and, per line, starts an agent instance, callsrender_run{...}, waits, stops the instance, then muxes the frames+audio torenders/clips/<label>.mp4via ffmpeg, skipping already-rendered clips.cuts.txtis written by the F4 viewer's commit action (format# <replay file> <in seconds> <out seconds>, one line found:replays/2026-07-22_114849_s0067.txt 82.38 89.01).cuts_auto.txtis auto-derived one-cut-per-mark output (25 labeled cuts, e.g.A1_guardian_angel_save,F10_late_angel_save).cuts_intro.txtandcuts_new.txtare smaller hand-curated batches (1 and 4 lines respectively).project.edlis the clip-editor's saved timeline:clip <file> <in> <out> <zoom> <cx> <cy> <hideui> <label>, 9 clips. - How entered:
./render_cuts.sh [list](defaults tocuts_auto.txt) from a shell;cuts.txtis populated by the viewer'ss/enter commit keys;project.edlis loaded/saved byedit.lua. - Data: Plain text, one cut per line;
project.edlhas its ownclip ...line format (edit.lua:120–154). - Engine calls: Indirect only, through
render_runper cut (see #4 above); the shell itself callsanchor drive start/eval/stop. - Size:
render_cuts.sh39 lines;cuts.txt2 lines;cuts_auto.txt25 lines;cuts_intro.txt1 line;cuts_new.txt5 lines;project.edl11 lines. - External deps:
ffmpeg,ffprobe, theanchor driveCLI.
6. edit.lua — in-engine clip editor / timeline for the trailer
- Name/location:
edit.lua, 472 lines. Entryedit_run(opts),edit_open, per-frameedit_update, drawingedit_draw. - What it does: A WYSIWYG non-linear editor over recorded runs — select a clip (a replay file + in/out points), scrub/trim/zoom/pan/hide-UI, beat-sync adjacent clips' cut points to the pawn march rhythm (
edit_beatsync), and either preview interactively or export the whole timeline frame-by-frame (reusingrender_run's capture machinery) with the real audio mix. - How entered: F5 key (
toggle_edit, bound inboot.lua:128) opens it live in a visible run;edit_run{beatsync='project.edl'}/edit_run{export='project.edl', out=dir, audio=wav}/edit_run{project=path}via the eval channel for batch jobs. - Data: Reads/writes
project.edl(its own clip-list format, see #5 above); reads KVP3 replay files the same way the viewer does (viewer_read_run); writes PNG frames + wav viaengine_render_setup/audio_renderon export. - Engine calls:
engine_render_setup(dir),audio_render(path),engine_get_time(),engine_set_fixed_step(true),engine_quit(). Uses the game's own replay pump (start_replay/viewer_sim_step), not.apr. - Size: 472 lines.
- External deps:
ffmpegdownstream (documented in its header) after--edit-export.
7. viewer.lua — F4 moment viewer / cut-picker
- Name/location:
viewer.lua, 504 lines, whole file. Entryviewer_run(opts)(eval channel) /viewer_open(only)(F4 key, or direct call). - What it does: Scrubs any archived run in
replays/*.txt(or a single named file), plays/pauses at 4 speeds, jumps between marks, and lets you set IN/OUT and commit exact cuts tocuts.txt— the tool that turns an imprecise in-play "mark" press into a precise clip boundary. Also runs two harness tests:selftest(seek to T, report where playback landed, quit — a correctness check) andviewertest(a scripted scrub sequence with every frame captured, exercising seek/play/step-back/in/out/commit paths that have broken before — spring blowup, negative dt, stale effects). - How entered: F4 (
toggle_viewer, bound inboot.lua:127) opens it live over the current run;viewer_run{replay=f}/viewer_run{replay=f, selftest=T}/viewer_run{replay=f, viewertest='angel'|true, out=dir}via the eval channel for the two automated tests. - Data reads/writes: Reads the game's own archived-run format via
viewer_read_run— line 1 theKVP3|...string, line 2 the meta line written byarchive_run(score=,items=,dur_ms=,marks=,pre=). On commit, appends tocuts.txt(# <replay file> <in seconds> <out seconds>format, rewritten on every commit viaviewer_save_cuts). No.aprfiles involved — this is entirely the game's own event-log replay format. - Engine calls:
engine_render_setup(dir)(only for theviewertestvisual harness),engine_get_time(),engine_quit(),mouse_position(),input_pressed/input_down. Stepping/seeking is entirely game-side:viewer_sim_step()drivesreplay_update(1/120)(or free-runs the clock once a run is over); backward seeks restart the run from 0 and fast-forward (viewer_consume_seek, budgeted per-frame atVIEWER_SEEK_BUDGET);viewer_clear_fx/viewer_settle_springsscrub cosmetic state (particles, springs, wall-clock timers like the Guardian Angel sequence) that would otherwise desync visually (not in sim) across a seek. - Size: 504 lines.
- External deps: None directly (its output
cuts.txtfeedsrender_cuts.sh/ffmpeg downstream, but the viewer itself calls nothing external).
8. annotate.lua — headless "what happened" replay narrator
- Name/location:
annotate.lua, 216 lines, whole file. Entryannotate_run(spec, opts). - What it does: Answers "why did I mark here?" by replaying marked runs headlessly with a handful of key functions wrapped (
resolve_capture,grant_item,on_hp_loss,angel_revive,transform, summon/defect/cloud/comet/freeze/shield hooks) to build a timestamped event log, then prints, per mark, the events in a ±20/+10s window, a per-second capture density histogram, and the busiest second — turning an imprecise mark into decision-quality context for the editor/viewer. - How entered:
annotate_run('all')(every marked replay) orannotate_run{'replays/a.txt', ...}(specific files) via the eval channel; no key bind. - Data: Reads
replays/*.txt(archived KVP3 + meta, viaviewer_read_run). Writes nothing — pure stdout report. - Engine calls:
engine_quit()only; drives the sim viastart_replay/replay_update(game's own event-log replay), no.apr. - Size: 216 lines.
- External deps: None.
9. fxsmoke.lua + tools/fxsmoke.sh — F7 lab scenario smoke test
- Name/location:
fxsmoke.lua, 121 lines, whole file. Entryfxsmoke_run(ids), driven per-frame byfxsmoke_update. Shell wrappertools/fxsmoke.sh. - What it does: Headlessly drives every item's F7-lab scenario (
FX_SCENARIOS) — opens the lab, triggers the scenario 4 times with real sim beats (60 steps each) in between, and reports which scenarios errored (a nil image, renamed helper, missing companion grant) versus which produced no visible effect (tracked via score delta + a wrappedpush_and_resolve/push_damagecounter, since a Push-based item like a Strike-on-a-tank scores nothing but still "did something"). - How entered:
fxsmoke_run()/fxsmoke_run('glove,brick,cat')via eval channel;tools/fxsmoke.sh [ids]wraps it (starts/stops an agent instance, greps the log forfxsmoke: no errors). - Data: No files — reads
FX_SCENARIOS/ITEM_ORDERin memory, writes only to stdout/agent log. - Engine calls:
engine_quit(); drives its own manual timer/hop/march loop by hand (timer_update,update_hop,march_pawns) rather thanengine_step. - Size: 121 lines (fxsmoke.lua) + 22 lines (tools/fxsmoke.sh).
- External deps: None; wraps
anchor drive start/eval/stopin the shell script.
10. e4probe.lua — temporary behavioral probe for item batch E4
- Name/location:
e4probe.lua, 156 lines, whole file. Entrye4probe_run(), body runs once ine4probe_update(). - What it does: Stages clean boards with specific items owned and asserts exact behavioral outcomes (e.g., "Headphones halves cadence at Combo 5 and not before," "Urn's Block costs no life but spends its charge," "Full Moon makes Opal's light bonus pay on dark squares too") — proving an item does what its card says, which
fxsmoke(crash-only) cannot. Explicitly marked temporary: "
Dev-only, and DELETED once the batch is signed off — the --sndprobeprecedent (Horse Game 19): install, run, remove" — still present in this snapshot. - How entered:
e4probe_run()via the eval channel. - Data: None — pure in-memory assertions (
check(name, got, want)), stdout report (e4probe: N passed, N failed). - Engine calls:
engine_quit()only; usesfx_pawn(fx_lab.lua's stager) for board setup. - Size: 156 lines.
- External deps: None.
11. fx_lab.lua — THE EFFECT LAB (F7)
- Name/location:
fx_lab.lua, 2,593 lines — by far the largest dev tool in the repo. Key entries:fxlab_open/fxlab_close(2305/2313),fxlab_update(2366),fxlab_draw(2486), theFX_SCENARIOSregistry (836), the code panelfx_code_build/fx_code_toggle/fx_code_panel(2048–2305). - What it does: Two screens. GRID (F7) shows every implemented item as a clickable icon with a green "done" dot (persisted in
fx_done.lua, toggled with C). VIEW (click an icon) opens a sandbox run — fresh reset, spawns off, death disabled — with only that item (plus declared companions viasc.with) granted, whose scripted scenario (FX_T[t].setup/.trigger) stages a board and fires the effect on a loop or on SPACE. Never bypasses the real trigger path — procs fire throughcommit_move/march beats with counters pre-advanced, chance procs fire through the real roll site with the roll pre-paid viaFXLAB.force. Also hosts the sound-authoring panel (Q, see #14) and a juice-code jump panel (E,fx_code_panel) that shows/edits the relevant source excerpt with nvim jump targets. - How entered: F7 (
toggle_fxlab, bound inboot.lua:143). Sub-keys while open: SPACEfx_trigger, Sfx_auto, Cfx_mark_done, Efx_code(juice-code panel), Qfx_sounds(sound panel), Hfx_hide_hud. - Data: Reads/writes
fx_done.lua(return { ['item_id'] = true, ... }, 109 lines — the green-dot checklist). Readssound_overrides.lua(F7 drag-drop imports, see #16) viafx_import_sound. Its scenario staging (fx_pawn,fx_skull,fx_drop,fx_clear) deliberately skips recorded-event paths (norec_event) — purely dev scenery. - Engine calls: None specific to the harness surface — it runs entirely inside the live update/draw loop (
fxlab_update(dt)called fromupdate(),fxlab_draw()last indraw_hud()), reusing ordinary sim functions (grant_item,revoke_item,commit_move,march_pawns, item on-hooks). Integration points documented in the header:die()returns immediately underFXLAB(hp restored to 1),items.lua'schance_1_in()consumesFXLAB.force. - Size: 2,593 lines.
- External deps: None directly (its "code jump" panel implies nvim integration for jumping to source, per the header, but no subprocess call was found in the excerpt read).
12. fx_done.lua — the F7 lab's persisted checklist
- Name/location:
fx_done.lua, 109 lines, whole file (data only). - What it does:
id -> truemap of which items have had their "effect work" (visual/sound/juice) signed off in the F7 lab; drives the green dot on the grid screen. - How entered: Never run directly — written by
fx_done_save()(fx_lab.lua) when C is pressed in the lab, loaded at boot bydofile(FX_DONE_PATH). - Data: Plain Lua table literal, one line per done item id (abacus, balloon, banana_peel, ... — 100+ entries visible).
- Engine calls: None (plain
io.open/dofile). - Size: 109 lines.
- External deps: None.
13. tools/ui_layout_probe.lua — sound-tuner layout regression check
- Name/location:
tools/ui_layout_probe.lua, 128 lines, whole file. - What it does: A pure-Lua unit test that stubs the entire UI toolkit (
ui_panel,ui_button,ui_slider, fonts, colors — all no-ops that just record their rect) and runssound_tuner_updatein both ITEM and BANK scope, then asserts every icon button shares a vertical centre with some row and that rows/buttons never overlap horizontally. Built explicitly because "this is the check the screenshot would have given me" — catching a layout regression without a human looking at a screenshot. - How entered: A standalone Lua script — run directly with a Lua interpreter (
lua tools/ui_layout_probe.lua), not throughanchor drive; it fakesgw/gh/fonts/etc. rather than booting the engine. - Data: None — pure in-memory geometry assertions, stdout report (
LAYOUT OK/LAYOUT BROKEN (N failures)). - Engine calls: None at all — entirely mocked (
layer_rectangle = noop, etc.), which is exactly the point (no engine needed to test layout math). - Size: 128 lines.
- External deps: A standalone Lua interpreter only;
dofile('emoji/sounds.lua'),dofile('fx_lab.lua'),dofile('emoji/sound_tuner.lua')at the top pull in the real modules under the mocked environment.
14. emoji/sound_tuner.lua — THE sound tool (F3 / Q / Tab)
- Name/location:
emoji/sound_tuner.lua, 662 lines, whole file. - What it does: One shell, three scopes: BANK (F3, anywhere — every loaded sound, paged, game frozen), GLOBAL (Tab, anywhere — the item-less event tree, frozen), ITEM (Q, inside the F7 lab view — the current item's moment tree, live/unfrozen so auditioning plays against the running scenario). A shared right-column editor (bits/sample-rate/volume/pitch-lo/pitch-hi/mute/play/clean) edits whatever is selected in either scope. Auto-saves through
sound_tuning.lua(DSP) andvolume_tuning.lua(volume). Handles "linked groups" (e.g. allnote_pXX/note_chordNNclips tune as one). - How entered: F3 key (bank scope, bound
boot.lua:98), Tab (global scope), Q while the F7 lab's view is open (item scope,boot.lua:148). - Data: Reads
sound_keys()/SOUND_FILES(declared sounds); writesemoji/sound_tuning.lua(per-path DSP: bits, sr_div, pitch_lo/hi, offset — return table, 130 lines, one entry per tuned.ogg) andemoji/volume_tuning.lua(per-key volume override, return table, 121 lines). - Engine calls:
sound_load,sound_get_path,sound_play/sound_play_handle(viasfx_preview), no engine harness surface — this is a live in-game overlay, not an eval-channel harness. - Size: 662 lines.
- External deps: None (writes plain Lua files).
15. emoji/sound_picker.lua — in-game sound-library search/import
- Name/location:
emoji/sound_picker.lua, 272 lines, whole file. - What it does: Opens a searchable index of every audio file under
PICKER_ROOT(~/sound packs), File-Pilot-style ranked full-path token matching; arrow keys move focus and instantly audition (raw, no DSP); Enter imports into the selected slot via the samefx_import_soundpath a drag-drop would use; Esc leaves without a trace. Explicitly "Linux-only (io.popen find)". - How entered:
[find]button inside the F3/Q sound tool (picker_up/down/replay/closebinds,boot.lua:153-156). - Data: Builds an in-memory index via
io.popen("find '<root>' -type f ...")over the sound-pack library; caches loaded preview handles for the session; writes nothing itself (import goes through fx_lab'sfx_import_sound→sound_overrides.lua, see #16). - Engine calls:
sound_load(preview handles), no harness surface. - Size: 272 lines.
- External deps: The Unix
findcommand against an external directory (~/sound packs) outside the game folder — a machine-specific dev dependency, and Linux-only per its own header (relevant given the project moved to Windows — this tool may be non-functional there without afind.exe).
16. sound_overrides.lua — F7 drag-drop import registry
- Name/location:
sound_overrides.lua, 19 lines, whole file (data). - What it does: Records F7-lab drag-and-drop sound imports:
key = { file, src, at }wherefileis the renamed/converted asset actually loaded,srcis the original source path (the attribution record for credits),atis the import date. Loaded byboot.luaafter the baseline sound bank so a drop can also replace an existing key. - How entered: Written by the F7 lab's drag-drop handler (
fx_import_sound, in fx_lab.lua); not run directly. - Data: Plain Lua table, e.g.
banana_fall = { file = "assets/sounds/fx_banana_fall.ogg", src = "E:\\sound packs\\...\\hyun1__falling-hyun.ogg", at = "2026-08-10" }. - Engine calls: None (loaded via
dofile/pcall). - Size: 19 lines.
- External deps: References absolute paths into
E:\sound packs\//home/adn/sound packs/— stale cross-machine paths from before the Windows move (attribution only, not re-read at runtime).
17. sound_moments.lua — the authored soundscape (data, ships with the game)
- Name/location:
sound_moments.lua, 186 lines, whole file. - What it does: Not a dev tool itself, but the file every dev sound tool edits:
moments(signal-name → ordered list of recording keys or pools),bindings(item/trigger signals → moments),disabled(muted keys). "THE AUDIBLE TRUTH" per its header — edited by the F7 lab, safe to hand-edit, ships with the game. - How entered: Loaded once at boot (
boot.lua:638-651) viadofile; written by the F7 lab's sound-authoring panel. - Data: Returns
{ moments = {...}, bindings = {...}, disabled = {...} }. - Engine calls: None.
- Size: 186 lines (partial content read; structure fully clear).
- External deps: None.
18. tools/verify.sh, tools/fxsmoke.sh — shell drivers for the eval-channel harnesses
Covered above alongside verify.lua/fxsmoke.lua (#3, #9). Both follow the same pattern: anchor drive stop/start, one anchor drive eval to launch the harness with drawing off, a second eval blocking on agent_wait_until(function() return not X end, ...), then anchor drive stop, then grep the agent log (replays/.drive/agent.log) for a pass marker (verify: ALL PASS / fxsmoke: no errors) to set the shell exit code.
19. tools/audit_scores.py — offline true validator of live scoreboard entries
- Name/location:
tools/audit_scores.py, 83 lines, whole file. - What it does: Fetches the top-N scoreboard entries from the live site (
a327ex.com/api/games/scores+/api/games/replay), writes each as anaudit/<rank>_<id>_<name>_s<score>.txtfixture (raw KVP3 blob +expect score=... dur_ms=... trunc=0— noitems=/hp=since the server doesn't know them, andverify.lua's compare skips absent fields), then drivesverify_run{mode='check', files={...}}through a realanchor driveinstance — "the true validator... drift-proof by construction: the same code that played the run judges it," since the server side (games.lua) only runs sanity-tier checks. - How entered:
python tools/audit_scores.py(--limit=N,--fetchfor fetch-only). - Data: Reads over HTTP from
https://a327ex.com; writesaudit/*.txtfixtures (same KVP3+expect shape asverify/); reads the agent log atreplays/.drive/agent.logfor the report. - Engine calls: None directly — shells out to
anchor drive start/eval/stopas subprocesses, which in turn driveverify_runinside the game. - Size: 83 lines.
- External deps: The live site (
https://a327ex.com), Python'surllib.request/json, theanchorCLI.
20. tools/package_win.py — Windows single-exe packager
- Name/location:
tools/package_win.py, 71 lines, whole file. - What it does: Builds the shippable Windows package: zips the game's Lua files +
anchor/,emoji/,assets/directories, appends that zip to a copy of the no-video engine exe (miniz VFS readsargv[0]), and forcesDEBUG_FIRST_SEED = nilin the stagedmain.luacopy (asserts either the substitution fired or it was already nil) so every visitor doesn't get the same pinned first run. - How entered:
python tools/package_win.pyfrom the game dir. - Data: Reads
main.lua,items.lua,verify.lua,render.lua,viewer.lua,edit.lua,annotate.luaplus theanchor/,emoji/,assets/directory trees; writesdist/<full title>.exeanddist/<full title>.zip. - Engine calls: None directly — reads a prebuilt engine binary (
Anchor/engine/engine/build/anchor-novideo.exe) as raw bytes and concatenates. - Size: 71 lines.
- External deps: A pre-built
anchor-novideo.exefromAnchor/engine/engine/build.bat novideo(path is hardcoded toE:/a327ex/...— stale pre-Windows-move path, per the machine's move toDesktop/a327ex/).
21. tools/note_synth.py — offline Note-item chord sound synthesis
- Name/location:
tools/note_synth.py, 532 lines, whole file. - What it does: A from-scratch numpy synth (oscillators, ladder LP filter, ADSR envelopes, chorus, tempo-delay widener, bitcrush) implementing an owner-dictated Synth1 preset, used to render the
Note item's per-pitch single chips and per-chord stingers. Several dispatch modes (main,mixes,mixes2,final,game) for auditioning presets versus generating the final shipped clips. - How entered:
python tools/note_synth.py [game|final|mixes2|mixes](no arg = default preview render) from the game dir. - Data: Writes
.wav/.oggunderreference/note_synth/(auditions) or directly intoassets/sounds/note_p*.ogg/note_chord*.ogg(thegamemode's shipped output,.wavintermediate deleted after ffmpeg conversion). - Engine calls: None — pure offline numpy/wave synthesis.
- Size: 532 lines.
- External deps:
numpy,ffmpeg(final ogg conversion via subprocess).
22. tools/sound_credits.py — attribution/credit report generator
- Name/location:
tools/sound_credits.py, 213 lines, whole file. - What it does: Since 111 of the game's shipped
.oggfiles carry no metadata (originals were WAVs from commercial packs whose BWF/RIFF chunks got dropped on conversion), this identifies each shipped sound against an indexed library by exact duration match (near-unique across ~42k candidates), breaking ties via normalized waveform correlation on 22kHz mono PCM (~0.999 for a true match), and emitsreference/sound_credits.mdgrouped by source pack, with a dedicated "UNIDENTIFIED — need a source before ship" section for sounds that were edited after export or came from an unindexed source. - How entered:
python tools/sound_credits.py --index(build/cache the library index, slow) /--match(identify + write report) / no args (both). - Data: Reads/caches the library index to
tools/sound_index.json(3.78 MB, last built 2026-08-20 — this is the huge file that can't be read whole); readsassets/sounds/*.ogg; writesreference/sound_credits.md. - Engine calls: None —
ffprobe/ffmpegsubprocesses for duration/tags/PCM decode. - Size: 213 lines (script) + 3.78 MB
tools/sound_index.json(cache, not source). - External deps:
ffmpeg/ffprobe, and the external sound-pack library atE:/sound packs(hardcodedLIBSpath — another stale pre-move path).
23. dev items/binds inside boot.lua (F1/F6/F8/G/T/Y/N/H/J/W/F/K/L/water_dither)
- Name/location:
boot.lualines 97–173 (bind block, gatedif not GAME_HOSTED) plus their handler functions inmain.lua(debug_cycle_item11578,debug_jump_chunk11601,debug_spawn_skull11612,debug_spawn_tank11626,debug_fire_finale11506,draw_storm_panel11546,draw_skull_panel11458). - What it does: A cluster of one-key dev affordances layered onto live play (not a harness — these run inside the ordinary update/draw loop and, where noted, are RECORDED so a poked run still replays exactly):
- F6
toggle_skull_panel→draw_skull_panel(): the "director" readout (current chunk + difficulty, spawn-order count, march interval) plus buttons to jump chunks (recorded as eventd), spawn a skull (eventk), spawn a tank pair (eventp), bump damage, toggle the spawn flood. - F1
toggle_storm_panel→draw_storm_panel(): live slider panel over everySTORMtunable (tip/top/refh/bell/sway/wob/glide/grow/rope/pulse/segs/life/slant/deckh/debris etc., 22 rows) feeding the tornado shader as uniforms; SPAWN/RESET/PRINT buttons (PRINT dumpsSTORM.x = ylines for pasting intoSTORM_DEFAULTS). - F8
toggle_session: dev shell↔endless mode toggle (SESSION_MODE). - G
debug_grant/debug_cycle_item: walksDEBUG_TEST_ITEMS(or the wholeITEM_ORDER) one at a time, revoking the previous grant each press — deliberately isolates one item's feel rather than piling items up. - T / Y
spawn_tank/spawn_tank_soft: places a bounce-test tank pair (Y = 1-HP blocked variant for a one-exchange resolve). - N
toggle_spawns: stops the pawn flood while testing. - H
toggle_hit_sound: A/B toggles the player-hit sound variant. - J
debug_heal: fires Meat's heal effect on demand. - W
debug_tornado: summons/relocates the Tornado on demand. - F
debug_finale: fires Finale's 12+ combo payoff via the item's own realcombo_endhandler (debug_fire_finale, not reimplemented). - K (also its own
spawn_skullbind + the skull panel's button):debug_spawn_skull. - 1–9
water_dither1..9: swaps the Wave shader's dither pattern live for side-by-side comparison in the F7 lab. - L
cycle_lang: cycles the card-text language overlay (en/pt/ja/ru). mouse:2(RMB)mark: stamps the current run time into the archived replay'smarks=field — pure bookkeeping, touches no sim state.
- F6
- How entered: Direct key binds, live during play (all
if not GAME_HOSTED— never reachable on the hosted website build). - Data: The recorded ones (
d/k/pevents) go throughrec_eventinto the same KVP3 replay stream as ordinary play; the STORM panel's PRINT writes to stdout only;L/H/N/Getc. touch only in-memory globals. - Engine calls: None beyond ordinary UI drawing (
ui_button,ui_slider,kvp_button) andspring_pull/timer_afterfor feedback. - Size: ~200 lines across
boot.lua's bind block + the handler functions inmain.lua. - External deps: None.
24. verify/ fixture directory
- Name/location:
verify/— 159 files, allrun_<N>.txt(some N are plain seeds likerun_1.txt, others carry batch-sweep numbering likerun_1030.txt,run_960.txt). - What it is: The
verify.luagen/check fixture store (see #3). One file's head (verify/run_1.txt) confirmed the format: line 1 the rawKVP3|1|90|133080|...string, line 2expect score=90 items=guardian_angel,hammer,midas,old_clock,pick,shaved_ice,shield dur_ms=133080 hp=0 trunc=0 pre=. - How entered: Populated/read entirely through
verify.lua's gen/check/checkall modes; never hand-authored. - Data: Plain text, 2 lines each.
- Engine calls: N/A (data only).
- Size: 159 files.
- External deps: None.
25. replays/ directory — archived KVP3 runs + engine .apr recordings, side by side
- Name/location:
replays/— a mix of the game's own timestamped*_s<score>.txtarchives (written byarchive_run, dozens of files from 2026-07-22 through 2026-07-30) and engine-native.aprfiles (dated 2026-08-23 through 2026-09-11, e.g.20260911-175057.apr) that only started appearing once the Anchor engine's own.aprrecording system (perAnchor/engine/docs/REPLAY.md,record_start/record_stop) came online. - What it is: Two genuinely different replay mechanisms coexisting in one folder: the OLD game-side event-log archives (
rec_*→KVP3|...text, read byviewer.lua/annotate.lua/edit.lua) and the NEWER engine-side.aprrecordings (binary/content-addressed perREPLAY.md, auto-recorded every dev run per the engine's v7 asset store) —harness_takeover()inverify.luaexplicitly stops and discards the engine's dev-run.aprstub on entry ("nothing worth keeping... a harness draws nothing a person would watch"), which is the seam between the two systems. - How entered: The
.txtfiles come fromarchive_run()on death/restart; the.aprfiles come from the engine's own automatic recording (seerecord_stop/record_startinAnchor/engine/docs/REPLAY.md), unrelated to any game code. - Data:
.txt= KVP3 event log + meta line;.apr= the engine's own content-addressed recording format (opaque here, per REPLAY.md). - Engine calls: The
.aprside is pure engine (record_start/record_stop); the.txtside is pure game code (rec_*). - Size: ~190
.txtfiles + 18.aprfiles. - External deps: None.
26. renders/ directory
- Name/location:
renders/containstrailer.mp4,trailer.webm(the shipped trailer, presumably produced viarender_cuts.sh/edit.luaexport + ffmpeg) and a subfoldersynccheck/dev/holding 17 looseframe_000000.png…frame_000016.pngfiles dated 2026-07-23 — leftover frames from an audio/video sync check that was never cleaned up (render_cuts.shnormally deletes itsrenders/_tmpPNGs after muxing; this looks like a manual/aborted probe). - What it is: Not a tool itself — the output directory for
render.lua/edit.lua's capture pass andrender_cuts.sh's per-clip renders. - How entered: N/A (output only).
- Data:
.mp4/.webmfinished videos; thesynccheck/dev/PNGs are raw uncomposited capture frames. - Engine calls: N/A.
- Size: 2 video files + 17 PNGs in one leftover subfolder.
- External deps: N/A.
27. infrastructure.md §9–11 (summarized, all sections)
Full section-heading summary (the file is the website-integration + harness handbook, written 2026-07-23/24, still current):
- Scoreboard pipeline (KVP3 wire format, client SB section, server sanity-tier validation, arcade-insert semantics, slur filter)
- Analytics events (
site_game_event/analytics_event, run_start/item_pick/run_end, admin read side) - Feedback + automatic error reports (feedback modal,
xpcall+game_report_error,net_post/kvp_json) - Email capture (
/api/updates, NOCASE-unique, addresses never logged/returned) - Site presentation (fullscreen game page, pixel inline style, homepage message format, one-line-preview lesson)
- Windows package (
package_win.py, novideo engine build, embedded-zip VFS,DEBUG_FIRST_SEEDstaging patch) - Engine changes (Anchor3, all committed — entropy-seeded
global_rng,build.bat novideo, runtime fullscreen/window-scale,web_http_post/web_http_post_poll) - Deploy runbook (sync → commit/push → deploy; Windows package scp/mv; nginx conf caveat)
- Balance-change discipline — any drop-weight/proc-count/pacing-constant/roll-site change shifts the grng stream: old replays still validate (sanity tier) but desync when watched, and verify fixtures fail; a real balance patch bumps KVP3→KVP4 and regenerates fixtures.
boot.luaand code reload — the split rule (definitions inmain.lua, one-time work inboot.lua), reload behavior, registry-refill conventions (X = X or {},on_reload), tool-module local-state caveat.- The harnesses are functions —
anchor <game|file.apr> [--agent]is the whole engine surface; every harness is a function called through the eval channel and takes over the run viaharness_takeover(no ready gate, no session card, endless, no recording); liststools/verify.sh,tools/fxsmoke.sh,render_cuts.sh, and the by-hand harnesses (annotate_run,e4probe_run,viewer_run,edit_run), plus the interactive F4/F5 entries.
28. .claude/CLAUDE.md (project-local working agreements, summarized)
Points to Anchor/engine/docs/SURFACE.md first, then itself. Running/testing section: never opens the game on the desktop — always anchor drive start/eval/stop; harnesses are functions, no CLI flags; lists the exact commands (tools/verify.sh both 40 1, tools/fxsmoke.sh, render_cuts.sh, and by-hand verify_run{}/render_run{}/annotate_run()/fxsmoke_run()/viewer_run{}/edit_run{}); anchor check . (LuaLS) before handover with a stated baseline of 8 known warnings (7 in emoji/pipeline.lua runtime-layer globals, 1 in emoji/fx.lua). Code-layout section restates the main.lua=definitions / boot.lua=one-time-work reload rule.
29. emoji/ folder — full classification (dev tool vs. game code)
| file | classification |
|---|---|
emoji/pipeline.lua (195 lines) | Game code — the runtime render pipeline (outline/shadow composite, emoji_render()), used every frame in production. |
emoji/sounds.lua (380 lines) | Game code — the runtime sfx resolver (sfx, sfx_tracked, lazy sound loading/warming); consumed by dev tools but not itself one. |
emoji/sound_tuner.lua (662 lines) | Dev tool — F3/Q/Tab live sound-tuning UI (#14 above). |
emoji/sound_picker.lua (272 lines) | Dev tool — in-game sound-library search/import (#15 above). |
emoji/sound_tuning.lua (130 lines) | Data — per-sound DSP table auto-written by the sound tuner; consumed at runtime by sfx_raw, but the file itself is generated config, not a tool. |
emoji/volume_tuning.lua (121 lines) | Data — per-sound volume-override table auto-written by the sound tuner; same status as above. |
emoji/effect.lua (646 lines) | Game code — the four-axis visual effect system (pattern×color×dither×deco) used at runtime for every stylized draw. |
emoji/effect_lab.lua (298 lines) | Dev tool — the F5 effect inspector (eye-testing panel for effect.lua's specs, with a DUMP-to-paste-ready-Lua button). |
emoji/juice.lua (260 lines) | Game code — the shared feel library (hitfx springs, slow-mo, camera punch) used by runtime entities. |
emoji/cursor.lua (167 lines) | Game code — the drawn/animated cursor, always active in play. |
emoji/text.lua (169 lines) | Game code — inline rich-text markup + the payout typewriter ledger, used by runtime UI. |
emoji/plants.lua (334 lines) | Game code — the reactive vegetation/decoration system, runtime visual content. |
emoji/palette.lua, emoji/init.lua, emoji/transition.lua, emoji/fx.lua | Game code (not read in detail this pass, but not named as dev tools anywhere in the surrounding docs/headers — ordinary runtime modules: palette, module loader, scene transitions, particle/VFX helpers). |
Dev key binds (all if not GAME_HOSTED, from boot.lua)
| key | action | opens/does |
|---|---|---|
| F1 | toggle_storm_panel | Tornado tuning sliders (#23) |
| F3 | toggle_sound_tuner | Bank-scope sound tuner (#14) |
| Tab | toggle_sound_tuner (global scope) | Global-events sound tuner (#14) |
| F4 | toggle_viewer | Moment viewer (#7) |
| F5 | toggle_edit | Clip editor/timeline (#6) |
| F6 | toggle_skull_panel | Director/skull-density panel (#23) |
| F7 | toggle_fxlab | Effect lab grid/view (#11) |
| F8 | toggle_session | Session-shell ↔ endless mode |
| G | debug_grant | Cycle-grant one test item (#23) |
| T / Y | spawn_tank / spawn_tank_soft | Bounce-test tank pair |
| N | toggle_spawns | Stop/resume the pawn flood |
| H | toggle_hit_sound | A/B player-hit sound variant |
| J | debug_heal | Fire Meat's heal effect |
| W | debug_tornado | Summon/relocate Tornado |
F (in F7 lab context, debug_finale) | debug_finale | Fire Finale's payoff |
| K | spawn_skull | Drop a skull |
| L | cycle_lang | Cycle card-text language |
| 1–9 | water_dither1..9 | Swap Wave shader dither pattern |
mouse:2 (RMB) | mark | Stamp a mark into the replay |
[ / ] | ui_gallery_prev/next | Sound-tool bank paging |
space, ,/., arrows, tab, 1-4, m, enter, backspace, s (viewer, F4 open) | various | Viewer transport/mark/cut controls (#7) |
up/down, shift, arrows, ,/., i/o, space, p, =/-, 0, w/a/s/d, u, c, x, k, e, b (editor, F5 open) | various | Clip editor controls (#6) |
| space, s, c, e, q, h, enter, backspace (F7 lab open) | fx_trigger, fx_auto, fx_mark_done, fx_code, fx_sounds, fx_hide_hud, fx_name_commit, fx_name_back | Effect-lab controls (#11) |
| up/down, tab, escape (sound picker, inside F3/Q) | picker_up/down/replay/close | Sound-picker navigation (#15) |
agent_* functions
The game's anchor/agent.lua copy is byte-identical in surface to the framework kit — no game-specific agent_* additions were made. Defined: agent_tap(name, frames), agent_click(x, y, button), agent_wait_until(pred, max_steps), agent_dump(t, depth, indent), agent_globals(pattern), agent_shot(path).
Summary table
| name | file(s) | lines | entry | own-replay/engine-apr/neither |
|---|---|---|---|---|
Recorder/parser (rec_*) | main.lua | ~260 | automatic during play | own-replay (KVP3) |
| grng / DEBUG_FIRST_SEED | main.lua | ~10 | automatic at reset() | own-replay (seed in KVP3 header) |
| verify.lua | verify.lua | 522 | verify_run{} / tools/verify.sh | own-replay (verify/run_*.txt fixtures) |
| render.lua | render.lua | 125 | render_run{} / render_cuts.sh | own-replay (reads KVP3) |
| render_cuts.sh + cuts*.txt + project.edl | render_cuts.sh, cuts.txt, cuts_auto.txt, cuts_intro.txt, cuts_new.txt, project.edl | 39+2+25+1+5+11 | shell / viewer commit / editor save | own-replay (references KVP3 files) |
| edit.lua | edit.lua | 472 | F5 / edit_run{} | own-replay |
| viewer.lua | viewer.lua | 504 | F4 / viewer_run{} | own-replay |
| annotate.lua | annotate.lua | 216 | annotate_run() | own-replay |
| fxsmoke.lua + tools/fxsmoke.sh | fxsmoke.lua, tools/fxsmoke.sh | 121+22 | fxsmoke_run() / shell | neither |
| e4probe.lua | e4probe.lua | 156 | e4probe_run() | neither |
| fx_lab.lua | fx_lab.lua | 2593 | F7 | neither (bypasses recording) |
| fx_done.lua | fx_done.lua | 109 | written by fx_lab | neither |
| tools/ui_layout_probe.lua | tools/ui_layout_probe.lua | 128 | standalone lua run | neither |
| emoji/sound_tuner.lua | emoji/sound_tuner.lua | 662 | F3/Q/Tab | neither |
| emoji/sound_picker.lua | emoji/sound_picker.lua | 272 | [find] in sound tool | neither |
| sound_overrides.lua | sound_overrides.lua | 19 | written by fx_lab | neither |
| sound_moments.lua | sound_moments.lua | 186 | loaded at boot | neither (ships with game) |
| tools/verify.sh | tools/verify.sh | 27 | shell | drives own-replay harness |
| tools/audit_scores.py | tools/audit_scores.py | 83 | python tools/audit_scores.py | own-replay (server-pulled) |
| tools/package_win.py | tools/package_win.py | 71 | python tools/package_win.py | neither |
| tools/note_synth.py | tools/note_synth.py | 532 | python tools/note_synth.py [mode] | neither |
| tools/sound_credits.py | tools/sound_credits.py, tools/sound_index.json | 213 (+3.78MB cache) | python tools/sound_credits.py | neither |
| Dev key binds / F1/F6/F8/G/T/Y/N/H/J/W/F/K/L panels | boot.lua, main.lua | ~200 | key binds | own-replay (several record d/k/p events) |
| verify/ fixtures | verify/*.txt (159 files) | — | data | own-replay |
| replays/ | replays/.txt (own) + replays/.apr (engine) | — | data | both, side by side |
| renders/ | renders/trailer.mp4, .webm, synccheck/dev/*.png | — | data (output) | neither |
| effect_lab.lua | emoji/effect_lab.lua | 298 | F5... wait, actually its own F5 in a different host | neither (visual effect inspector, not a KVP replay tool) |
Note on the table's last-but-one row: emoji/effect_lab.lua's header documents key:f5 as its own bind in "the demo main.lua" (the toolkit's generic example host) — in this game, F5 is actually bound to toggle_edit (the clip editor, #6), so effect_lab_active/toggle_effect_lab do not appear to be wired to a live key in boot.lua's bind block for this specific game; it's present as reusable toolkit code but its bind may be dormant here (not confirmed against a full boot.lua bind search beyond the block already quoted in #23).