Tmux verify

From stevengonsalvez/agents-in-a-box · View interactive version

Tmux verify is an AI agent skill from the GitHub repository stevengonsalvez/agents-in-a-box. The outer "is this TUI feature ACTUALLY done?" proof loop for the ainb terminal app. Use when the user asks to "verify the TUI is actually done", "prove this TUI feature works", "validate per tmux-verify", "vhs verify each journey", "frame-truth check the UI", "is the diff actually shown correctly",

How to use this skill

Skill file

tmux-verify

Overview

tmux-verify is the OUTER acceptance harness: it proves a TUI feature is actually done as a user would experience it. It does NOT write the automated test (that is tmux-ui-tripwire) and does NOT reimplement media tooling (that is /media-processing). It orchestrates both plus a live explainer into one repeatable contract.

Use it two ways:

The non-negotiable principle: read the frame, don't blank-check. A passing screen is one whose pixels/text say the correct thing for that journey — not merely that something rendered.

The 6 gates

                         ┌──────────────────────────────────────────────┐
 G1 automated  ───────▶  │ tmux-ui-tripwire: comprehensive, VT100-true,  │
 (ref skill)             │ passes in the real TUI, non-flaky ×3          │
                         └──────────────────────────────────────────────┘
 G2+G3 visual            ┌──────────────────────────────────────────────┐
 (THIS SKILL OWNS) ───▶  │ per journey:  .tape ─▶ vhs ─▶ gif+mp4         │
                         │              ─▶ ffmpeg frames ─▶ READ + assert│
                         │ one recording per journey                     │
                         └──────────────────────────────────────────────┘
 G4 fix-loop   ───────▶  acceptance(cargo test) + tripwire green; unbounded
                         until green or a genuine hard blocker (then log + go on)
 G5 explainer  ───────▶  /explain-to-me ─▶ /here-now  (stable slug, republish
                         each phase: progress · test/clippy/tripwire output ·
                         commit log · embedded per-journey GIFs)
 G6 final      ───────▶  HTML solid (fetch URL: links resolve, GIFs load,
                         no empty sections) ─▶ HUMAN validates → done

Gate-by-gate playbook

G1 — Automated gate (defer to tmux-ui-tripwire)

Write/repair the feature's crates/ainb-core/tests/tripwire_*.rs per tmux-ui-tripwire. Bar to clear:

G2 + G3 — Visual gate, one recording per journey (this skill owns it)

For EACH journey (define them first — see references/journeys.md):

  1. Author the tape from scripts/journey.tape.tmpl — isolated HOME (skips the wizard), window size, the exact key sequence, Screenshot at each settle point, Output <journey>.gif + .mp4.
  2. Record + extract + assert with scripts/verify-journey.sh — runs vhs, pulls frames via ffmpeg, OCRs them (tesseract, best-effort), and emits the frame paths + a checklist of expected content.
  3. READ the frames (open the PNGs) and assert the EXACT outcome for that journey — the right diff content, the right file list, word-emphasis on the changed token, the active tab actually changed, Esc landed on the main screen. Recipe + anti-patterns: references/frame-truth.md.
  4. Keep the <journey>.gif (for the explainer) and <journey>.mp4.

Recording-seed gotchas (frames stuck on onboarding / the install modal = a bad seed, not a bad feature):

A journey is unverified until a human-or-agent has read its frames and confirmed the content. "Non-blank == pass" is a failure of this gate.

G4 — Fix loop

If any G1 assertion, any G2 frame-check, or any G5/G6 asset is wrong: diagnose → fix → re-run. Unbounded until acceptance tests + tripwire are green and every journey frame-checks clean, or a genuine hard blocker (then log the wall and continue everything parallelizable).

G5 — Continuous explainer (defer publishing to /explain-to-me + /here-now)

Maintain ONE explainer at a stable slug, re-published after every phase/commit. Each republish must contain: current phase + progress, the latest cargo test / clippy / tripwire output, the commit log so far, and the embedded per-journey GIFs. Build it with /explain-to-me (status-report / PR-review template) and publish with /here-now; scripts/publish-explainer.sh checks the dir then prints the exact /here-now invocation. Cadence + required sections: references/explainer.md.

G6 — Final HTML-solid validation

Before declaring done, FETCH the live URL and confirm: every link resolves, every GIF loads, no section is empty/placeholder, the test output shown is the latest green run. Then hand the human the live URL — the human is the final acceptance gate. Do not merge on their behalf unless the goal says so.

Quick start

SK=ainb-tui/.claude/skills/tmux-verify
AINB=$(find ainb-tui/target -name ainb -type f -perm +111 | head -1)   # or: cargo build -p ainb-core

# 1. one journey: render tape, record, extract+OCR frames, print checklist
bash $SK/scripts/verify-journey.sh \
  --name open-g --bin "$AINB" \
  --keys 'Type "G"  Sleep 2s  Screenshot "{OUT}/open-g.png"' \
  --out /tmp/ainb-journeys --expect "Code Review" --expect "skill.rs"
# → then READ /tmp/ainb-journeys/frames/open-g*.png and assert content

# 2. publish/refresh the explainer (after building it with /explain-to-me)
bash $SK/scripts/publish-explainer.sh --dir /tmp/ainb-explainer --slug ainb-warp-diff

Done checklist (all true)

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.