repositories / smith

smith

There are many coding harnesses - but this one is fast

owned by bugabinga

Wait on completion patterns instead of guessing build durations

fae44b6a5ac5a9fa667af2079b56dfd443cf723b

Oliver Jan Krylow <oliver@bugabinga.net> ·

SSH signature · not checked

Browse filesCompare with HEAD

Codex's advisory on the merged capture skill stands up: prescribing only
fixed Sleeps makes the skeleton's 30-second build delay race slow
runners. The tape reference now teaches Wait+Screen for variable-duration
steps, with the one trap execution testing exposed: the typed command is
itself on screen, so a naive sentinel (echo BUILT) matches instantly and
fires before the command runs — the skeleton uses a quote-split sentinel
(echo BU''ILT) that only the completed command prints. Sleep stays for UI
settle, where no completion pattern exists.

Touched surface: .claude/skills/capture/ (references/tape.md, SKILL.md).

Changed files (2)

+9 / −6 text lines

Diff layout

.claude/skills/capture/SKILL.md

Modified

+4 / −3 text lines

3636- **One capture, one claim.** Show exactly the behavior the PR or issue is
3737 about. Trim scope with terminal size and tape length, never by editing
3838 the image afterwards.
39- **Deterministic tapes.** Drive the app with `Type`/`Enter`/key commands and
40 fixed `Sleep`s; no wall-clock-dependent content in the frame if you can
41 avoid it (clocks, PIDs, load averages make diffs and reruns noisy).
39- **Deterministic tapes.** Drive the app with `Type`/`Enter`/key commands;
40 `Wait` on a completion pattern for anything of variable duration, `Sleep`
41 only for UI settle. No wall-clock-dependent content in the frame if you
42 can avoid it (clocks, PIDs, load averages make diffs and reruns noisy).
4243- **Stills are tapes too.** Use the `Screenshot` command inside a tape; it
4344 captures at an exact scripted moment.
4445- **No browser or ffmpeg available?** Use the tmux + `freeze` still path

.claude/skills/capture/references/tape.md

Modified

+5 / −3 text lines

@@ -11,7 +11,8 @@ The commands that matter
1111| `Require cmd` | fail fast if `cmd` is not installed |
1212| `Set <option> <val>` | see sizing below; must precede all actions |
1313| `Type "text"` / `Enter` / `Down 3` / `Ctrl+C` | drive the app; every special key is a bare command (`Space`, `Tab`, `Escape`, `PageDown`, arrows with optional repeat count) — there is no `Key` prefix |
14| `Sleep 2s` | fixed wait — the only timing primitive; be generous after launch |
14| `Wait+Screen /re/` | block until output matches — use for anything of variable duration (builds, downloads); `Set WaitTimeout 60s` raises the cap. The typed command is on screen too, so a sentinel it contains matches instantly — split it (`echo BU''ILT`, wait for `/BUILT/`) |
15| `Sleep 2s` | fixed wait — for UI settle after launch/keystrokes, where no completion pattern exists |
1516| `Screenshot shot.png` | still frame at exactly this point in the script |
1617| `Hide` / `Show` | exclude setup noise (cd, build output) from the render |
6263Set Height 700
6364Set Padding 12
6465Set Theme "Catppuccin Mocha"
66Set WaitTimeout 120s
6567Env LANG "C.UTF-8"
6668Hide
67Type "cd prototypes/p27-per-frame-layout && cargo build -q"
69Type "cd prototypes/p27-per-frame-layout && cargo build -q && echo BU''ILT"
6870Enter
69Sleep 30s
71Wait+Screen /BUILT/
7072Show
7173Type "cargo run -q"
7274Enter