prompts: move drive-demo into project config
2abfd2b7ab3ad638ea3bd18fe00b07e73bd91569
Oliver Jan Krylow <oliver@bugabinga.net> ·
unsigned
- Parent 1: 355ff475e03a
bugabingas pi extensions
2abfd2b7ab3ad638ea3bd18fe00b07e73bd91569
Oliver Jan Krylow <oliver@bugabinga.net> ·
unsigned
+97 / −97 text lines
new file mode 100644+97 / −0 text lines
---description: Create or refine an interactive Pi demo driver and GIF recording workflowargument-hint: "<extension-or-demo-name>"---Create/refine demo driver for `$ARGUMENTS`.Goal: animated GIF only. No screenshot. Use asciinema + pexpect + agg.Rules:- Manual workflow only; never run from check/release gates.- Driver files live in `drivers/*.py`; readable, small, commentable.- `scripts/demo.py` is engine; drivers contain data/steps only.- `just demo <name>` delegates to `python3 scripts/demo.py <name>`.- README missing → fail. Do not create README silently.- Assets land in each target extension: `agent/extensions/<target>/assets/<demo>.gif`.- README updated only between markers: `<!-- demo:<name>:start -->` … `<!-- demo:<name>:end -->`.- No screenshots. GIF is source of truth for visual QA.Recording defaults:- cols: 100- rows: 28- theme: Pi default; do not force `--theme dark`.- cwd: choose demo-friendly extension/project dir.- Pi isolation flags: `--no-session --no-context-files --no-skills --no-prompt-templates --no-extensions`- Load exact extensions with `-e ./agent/extensions/<name>`.- For footer concert demos, load footer + client extensions together; do not make ephemeral fixture extensions.- Real LLM/quota calls OK for manual demos.Pexpect driving:- Spawn real interactive `pi` in PTY with fixed dimensions.- Actively pump child output to stdout; sleeping alone records empty casts.- Type commands/prompts char-by-char with deliberate delay so GIF shows typing.- Pause before Enter.- Use longer holds for human readability.- Modifiers/key overlays: skip unless Pi visibly reacts; asciinema has no native modifier overlay here.Good pacing baseline:- startup settle: 5s- command typing delay: ~55–75ms/char- prompt typing delay: ~35–55ms/char- post `/quota`: 6–7s- post `/footer` hide: 4s- post `/footer` show: 5–6s- LLM prompt wait: 14–18s or until clear final output if reliable- final hold: 5–6sAsciinema:- record with `--headless --overwrite --capture-input --window-size 100x28 -i 4.0`- output `.demo/<name>.cast`Agg:- render GIF from cast: `agg --cols 100 --rows 28 --theme asciinema --text-font-family "JetBrains Mono" --font-size 14 --line-height 1.25 --idle-time-limit 4.0 --last-frame-duration 5 --fps-cap 24 <cast> <gif>`QA:- Inspect GIF, not `.txt`, as visual truth.- Also generate text for quick sanity: `asciinema convert -f txt <cast> <txt> --overwrite`- `.txt` may show duplicate lines/artifacts from terminal control sequences; acceptable if GIF looks good.- Avoid `asciinema play` in main terminal; it can disturb visible scrollback due recorded control sequences.Driver shape:```pytitle = "Footer suite"extensions = ["footer", "context-size", "cost", "git-status", "runtime", "quota"]targets = ["footer", "context-size", "cost", "git-status", "runtime", "quota"]cols = 100rows = 28cwd = "."steps = [ ("wait", 5000), ("command", "/quota", 7000), ("prompt", "In one short sentence, say what this directory contains.", 16000), ("command", "/footer", 4000), ("command", "/footer", 6000), ("prompt", "Now answer with exactly three words: footer status dashboard.", 14000), ("wait", 6000),]```Supported step ops should stay tiny:- `wait(ms)`- `type(text[, delay_ms])`- `send(text)`- `command(text[, after_ms])` — type text slowly, pause, Enter, wait- `prompt(text[, after_ms])` — type prompt slowly, pause, Enter, wait- `ctrl(key)`- `quit()`When asked to create a driver:1. Pick visual story: what user sees, why ext matters.2. Pick exact extensions and targets.3. Add/read driver in `drivers/`.4. Run smoke once to `/tmp/<demo>.gif` first.5. Ask user to inspect GIF before committing assets/README changes.deleted file mode 100644+0 / −97 text lines
---description: Create or refine an interactive Pi demo driver and GIF recording workflowargument-hint: "<extension-or-demo-name>"---Create/refine demo driver for `$ARGUMENTS`.Goal: animated GIF only. No screenshot. Use asciinema + pexpect + agg.Rules:- Manual workflow only; never run from check/release gates.- Driver files live in `drivers/*.py`; readable, small, commentable.- `scripts/demo.py` is engine; drivers contain data/steps only.- `just demo <name>` delegates to `python3 scripts/demo.py <name>`.- README missing → fail. Do not create README silently.- Assets land in each target extension: `agent/extensions/<target>/assets/<demo>.gif`.- README updated only between markers: `<!-- demo:<name>:start -->` … `<!-- demo:<name>:end -->`.- No screenshots. GIF is source of truth for visual QA.Recording defaults:- cols: 100- rows: 28- theme: Pi default; do not force `--theme dark`.- cwd: choose demo-friendly extension/project dir.- Pi isolation flags: `--no-session --no-context-files --no-skills --no-prompt-templates --no-extensions`- Load exact extensions with `-e ./agent/extensions/<name>`.- For footer concert demos, load footer + client extensions together; do not make ephemeral fixture extensions.- Real LLM/quota calls OK for manual demos.Pexpect driving:- Spawn real interactive `pi` in PTY with fixed dimensions.- Actively pump child output to stdout; sleeping alone records empty casts.- Type commands/prompts char-by-char with deliberate delay so GIF shows typing.- Pause before Enter.- Use longer holds for human readability.- Modifiers/key overlays: skip unless Pi visibly reacts; asciinema has no native modifier overlay here.Good pacing baseline:- startup settle: 5s- command typing delay: ~55–75ms/char- prompt typing delay: ~35–55ms/char- post `/quota`: 6–7s- post `/footer` hide: 4s- post `/footer` show: 5–6s- LLM prompt wait: 14–18s or until clear final output if reliable- final hold: 5–6sAsciinema:- record with `--headless --overwrite --capture-input --window-size 100x28 -i 4.0`- output `.demo/<name>.cast`Agg:- render GIF from cast: `agg --cols 100 --rows 28 --theme asciinema --text-font-family "JetBrains Mono" --font-size 14 --line-height 1.25 --idle-time-limit 4.0 --last-frame-duration 5 --fps-cap 24 <cast> <gif>`QA:- Inspect GIF, not `.txt`, as visual truth.- Also generate text for quick sanity: `asciinema convert -f txt <cast> <txt> --overwrite`- `.txt` may show duplicate lines/artifacts from terminal control sequences; acceptable if GIF looks good.- Avoid `asciinema play` in main terminal; it can disturb visible scrollback due recorded control sequences.Driver shape:```pytitle = "Footer suite"extensions = ["footer", "context-size", "cost", "git-status", "runtime", "quota"]targets = ["footer", "context-size", "cost", "git-status", "runtime", "quota"]cols = 100rows = 28cwd = "."steps = [ ("wait", 5000), ("command", "/quota", 7000), ("prompt", "In one short sentence, say what this directory contains.", 16000), ("command", "/footer", 4000), ("command", "/footer", 6000), ("prompt", "Now answer with exactly three words: footer status dashboard.", 14000), ("wait", 6000),]```Supported step ops should stay tiny:- `wait(ms)`- `type(text[, delay_ms])`- `send(text)`- `command(text[, after_ms])` — type text slowly, pause, Enter, wait- `prompt(text[, after_ms])` — type prompt slowly, pause, Enter, wait- `ctrl(key)`- `quit()`When asked to create a driver:1. Pick visual story: what user sees, why ext matters.2. Pick exact extensions and targets.3. Add/read driver in `drivers/`.4. Run smoke once to `/tmp/<demo>.gif` first.5. Ask user to inspect GIF before committing assets/README changes.