diff --git a/.claude/settings.json b/.claude/settings.json deleted file mode 100644 index 13de2d69..00000000 --- a/.claude/settings.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "hooks": { - "PreToolUse": [ - { - "matcher": "Bash|PowerShell", - "hooks": [ - { - "type": "command", - "shell": "bash", - "command": "grep -qiE \"taskkill[^|;&]*/IM[^|;&]*totk|Stop-Process[^|;&]*-Name[^|;&]*totk|pkill[^|;&]*totk|killall[^|;&]*totk\" && echo \"{\\\"hookSpecificOutput\\\":{\\\"hookEventName\\\":\\\"PreToolUse\\\",\\\"permissionDecision\\\":\\\"deny\\\",\\\"permissionDecisionReason\\\":\\\"Killing totk.exe by name stops other agents and benchmark runs. Stop only a totk.exe you started, by PID (taskkill //PID //F).\\\"}}\" || true" - } - ] - } - ] - } -} diff --git a/.claude/skills/private-build/SKILL.md b/.claude/skills/private-build/SKILL.md deleted file mode 100644 index 9f6aa600..00000000 --- a/.claude/skills/private-build/SKILL.md +++ /dev/null @@ -1,77 +0,0 @@ ---- -name: private-build -description: Run a task in its own git worktree and build dir, commit on task/, hand back a branch. Use before editing runtime/ or tools/ code, building totk.exe, or cleaning up a finished task. ---- - -# Task worktree: start, build, commit, hand back, clean up - -Several agents change `runtime/` and `tools/` at once and the coordinator merges their branches, so every task gets a -git worktree `.worktrees/` on branch `task/` and a build dir `build/v121-`. `` is a short name for -your task. - -## 1. Start - -``` -.venv/Scripts/python tools/worktree.py new -``` - -Work and build only inside `.worktrees/`. The worktree holds tracked files. `build/`, `generated/`, `refs/`, -`toolchain/`, `.venv/`, `.venv-py314/` and `config.local.toml` are links to the main checkout, so everything written -there is shared: `generated/` and `recomp/` belong to the coordinator. A needed lifter or generator change is reported -in the hand-back, never made. `tools/` changes are made in the worktree like any other file. - -## 2. Build - -``` -export PATH=/c/msys64/ucrt64/bin:$PATH && .venv/Scripts/python tools/build_game.py --runtime runtime --out build/v121- -``` - -The build reuses `build/v121`'s generated objects: it hardlinks them into `obj/` and compiles only `runtime/*.c`, so a -first build takes about 10 s. It does so when `build/v121` is up to date and every header the generated code includes -is byte-identical in your `runtime/`. If you changed such a header (`cpu.h`, ...) or the main build is stale, it prints -`compiling all generated C: ` and rebuilds everything (about 200 s on every core). `--full-build` forces that. A -`.c` change is incremental either way. After every build check the exe's mtime: a failed build leaves the old -`totk.exe` in place, and you would test old code. - -Run the game with the `run-game` skill. `totk.exe --probe-kernel`, `--probe-vkexec`, `--probe-nvn-tex` and -`--probe-shader` pass before you hand back. - -## 3. Commit - -Commit on `task/` as often as you like. - -- Run `python tools/check_content.py --staged` before each commit. -- Messages are plain English sentences, no type prefix, no `Co-Authored-By` trailer. -- `main` stays untouched: you never commit to it, merge into it or push anything. - -Keep notes in `build/v121-/NOTES.md` as you go. When you stop unfinished, write `build/v121-/HANDOFF.md` -(under 80 lines): findings with paths, what is ruled out, the leading hypothesis, the exact next step, temporary debug -edits (file:line). Both stay uncommitted. - -## 4. Hand back - -A fix that costs frame time is not done: keep new work off per-draw and per-pixel paths unless the semantics need it. -The coordinator measures `fight.txt` with `--quiet` before merging. - -A change on the render path also gets one look: a field `--shot` of your build next to one of `build/v121` at the same -frame. Runs diverge, so small differences prove nothing, but gross regressions show (grass gone, colours off, black -areas) and block the hand-back. - -Then: - -1. Merge or rebase `main` into `task/` until your branch merges into `main` cleanly. Rebuild and rerun the four - probes on the result. -2. Report: the branch name, the commit list (`git log main..task/ --oneline`), what each change costs per draw, - shader or frame, the probe results, and any lifter or generator change you need. - -## 5. Clean up (coordinator) - -After the merge, or when the task is dropped: - -1. Copy `*.md` and any helper scripts from `build/v121-/` to `build/archive/v121-/`. -2. `.venv/Scripts/python tools/worktree.py remove --delete-branch` (it unlinks the links before git removes the - worktree, refuses a dirty worktree or an unmerged branch; `--force` overrides). -3. Delete `build/v121-/`. - -Tasks waiting to be continued keep their worktree and build dir. `build/v121` (the main build) and `build/v121-pf` -(shared shader and pipeline caches) are never deleted. diff --git a/.claude/skills/run-game/SKILL.md b/.claude/skills/run-game/SKILL.md deleted file mode 100644 index a216440e..00000000 --- a/.claude/skills/run-game/SKILL.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -name: run-game -description: Run a TotK build into gameplay from a backed-up save. Use when you need the game in-world (screenshot, perf measurement, frame dump, scripted input) or need to pick a save scene. ---- - -# Run a build into gameplay - -One command loads a save and plays scripted input; it never writes the user's profile (`build/profile`): - -``` -.venv/Scripts/python tools/run_game.py --save --frames N [--script tools/input/.txt] [--shot out.png] [--env K=V] [--quiet] [--tag name] -``` - -It copies the profile, swaps in the save from `build/save-backup/`, writes the log to `/logs/.log` and -prints `: rc=`. The game window opens behind the user's windows without taking focus. - -## Saves - -| `--save` | Scene after `load_save.txt` (gameplay from about frame 1500) | -|---|---| -| `user-save-2026-10-21-field` | Hyrule field, Link in tall grass | -| `user-save-2026-10-21-monsters` | Moblins and Zonai constructs attack at once; use with `--script tools/input/fight.txt` | -| `user-save-2026-10-21` | Hyrule field facing the castle, rainy; distant sky over the castle | -| `user-save-2026-10-23-pillars` | Hyrule field by standing stone pillars, about 17:40, a Zonai construct beside Link; use with `--script tools/input/backrun.txt` (runs backward from 1550: phantom rocks, a one-frame glitch at about 1605) | -| `user-save-2026-10-24-brightbloom` | Cave, about 20:40: a Brightbloom plant at the lower left (its bulb sits in its cup; it floated beside the stem before ddd0ce8), teal Moblin and Bokoblin ahead or Zonai constructs (runs differ) | -| `user-save-2026-10-22-island` | Sky island edge; use with `--script tools/input/island.txt` (runs off, skydives, opens the paraglider with B at frame 1975; X does nothing in a dive) | - -`--frames` counts presents. Pick `1500 + the frames you need in-world`. - -At most 3 runs go at once across all agents (`TOTK_MAX_RUNS`, lock files in `build/run-slots/`): more exhaust device -memory. `run_game.py` waits for a free slot, so start every game run through it; probes (`--probe-*`) run directly. - -## Options that change results - -- `--shot` builds pipelines synchronously: use it for pictures, never for timing. -- `--quiet` waits until no other `totk.exe` or `ninja.exe` runs. Use it for every timing you report. -- Input scripts: lines `