Skip to content

Commit a79ac0f

Browse files
feat: complete GIF demo pipeline with 141 recorded demos and site integration
140 VHS tape files (26 stories + 114 solo) covering all 186 bray tools. Clickable tool tags on site open GIF demos in a modal overlay. Dedicated demo identity with Shamir backup for reproducible recordings. Pipeline: generate-tapes.sh defines prompts, record.sh orchestrates VHS, bray-demo.sh wraps claude -p with MCP config. Re-record any demo with ./record.sh --force <name>.
1 parent 0806aa1 commit a79ac0f

301 files changed

Lines changed: 4102 additions & 174 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/superpowers/specs/2026-03-27-gif-demos-design.md

Lines changed: 71 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
**Date:** 2026-03-27
44
**Status:** Approved
5-
**Scope:** Automated GIF demo pipeline covering all 185 bray tools
5+
**Scope:** Automated GIF demo pipeline covering all 186 bray tools (140 tapes: 26 stories + 114 solo)
66

77
## Background
88

@@ -16,7 +16,7 @@ Each demo gets a `.tape` file (VHS script) that runs `claude -p` with a specific
1616

1717
Tools are organised into two categories:
1818
- **Story demos** (26 groupings of 2-4 tools chained into workflows)
19-
- **Solo demos** (~80 standalone utility tools)
19+
- **Solo demos** (114 standalone utility tools)
2020

2121
Story demos record a single session where Claude uses multiple tools in sequence. Solo demos record one tool call each.
2222

@@ -39,13 +39,16 @@ VHS can simulate terminal sessions with `Type`/`Output` commands, but we use it
3939

4040
```
4141
site/demos/
42-
record.sh # Main orchestrator (loops through all tapes)
42+
bray-demo.sh # Wrapper: runs claude -p with bray MCP config
43+
mcp-demo.json # MCP server config pointing at local bray build
44+
record.sh # Orchestrator (loops tapes, skips existing, --force)
45+
generate-tapes.sh # Generates all tape files from prompt definitions
4346
tapes/
44-
stories/ # Multi-tool workflow tapes
47+
stories/ # Multi-tool workflow tapes (26)
4548
01-identity-onboarding.tape
4649
02-identity-backup.tape
4750
...
48-
solo/ # Single-tool tapes
51+
solo/ # Single-tool tapes (114)
4952
encode-npub.tape
5053
verify-event.tape
5154
...
@@ -55,48 +58,68 @@ site/demos/
5558

5659
## Recording Pipeline
5760

61+
Each tape uses an alias trick: it hides the setup (custom PS1 prompt, alias `claude` to `bray-demo.sh`), then shows only the `claude -p '<prompt>'` command and its output. The wrapper (`bray-demo.sh`) runs Claude Code with `--bare --dangerously-skip-permissions --mcp-config mcp-demo.json`, so the recording shows clean output without permission prompts.
62+
5863
Per-demo flow:
5964

6065
1. VHS reads the `.tape` file
6166
2. VHS opens a virtual terminal with configured dimensions and theme
62-
3. The tape runs `claude -p "<prompt>"` inside the terminal
63-
4. Claude Code executes, calls bray MCP tools, shows output
64-
5. VHS renders the session directly to GIF
67+
3. Hidden setup: custom PS1, alias claude to bray-demo.sh, clear screen
68+
4. The tape types `claude -p '<prompt>'` (visible to viewer)
69+
5. bray-demo.sh pipes the prompt to Claude Code with bray MCP config
70+
6. Claude Code calls bray MCP tools, shows output
71+
7. VHS renders the session directly to GIF
6572

6673
Example tape file:
6774

6875
```tape
69-
# 01-identity-onboarding.tape
7076
Set Shell "zsh"
71-
Set Width 100
72-
Set Height 30
77+
Set Width 1200
78+
Set Height 600
7379
Set Theme "Catppuccin Mocha"
74-
Set FontSize 14
80+
Set FontSize 16
7581
Set Padding 20
82+
Set TypingSpeed 40ms
83+
84+
Output gifs/01-identity-onboarding.gif
7685
77-
Output ../gifs/01-identity-onboarding.gif
86+
Hide
87+
Type "export PS1='darren@ForgeSworn.dev:bray $ '"
88+
Enter
89+
Type "alias claude=/Users/darren/WebstormProjects/bray/site/demos/bray-demo.sh"
90+
Enter
91+
Type "clear"
92+
Enter
93+
Sleep 0.5s
94+
Show
7895
79-
Type "claude -p 'Create a new Nostr identity, derive a persona called demo, switch to it, then confirm with whoami'"
96+
Type "claude -p 'Create a new Nostr identity, derive a persona called demo, switch to it, then check whoami'"
8097
Enter
81-
Sleep 15s
98+
Sleep 25s
8299
```
83100

84-
The orchestrator script (`record.sh`) handles:
85-
- Looping through all tape files (or recording a single one by name)
86-
- Skipping already-recorded demos (unless `--force`)
87-
- Reporting progress
101+
**Tape generation:** All tapes are generated by `generate-tapes.sh`, which defines every prompt in a single file. To regenerate after prompt edits: `./generate-tapes.sh`.
102+
103+
**Orchestrator (`record.sh`):**
104+
- `./record.sh` -- record all (skip existing GIFs)
105+
- `./record.sh --force` -- re-record everything
106+
- `./record.sh --stories` / `--solo` -- record only one category
107+
- `./record.sh <name>` -- record a single demo by partial name match
108+
- `./record.sh --list` -- show recording status
109+
- `./record.sh --optimise` -- optimise existing GIFs with gifsicle
88110

89111
## GIF Specifications
90112

91113
| Setting | Value |
92114
|---------|-------|
93-
| Terminal width | 100 columns |
94-
| Terminal height | 30 rows |
95-
| Theme | Dark (matches site aesthetic) |
96-
| Font size | 14px |
97-
| Max duration | Story: 15-20s, Solo: 5-8s |
98-
| Loop | Once, then hold final frame |
99-
| Status line | `darren@ForgeSworn.dev:bray` |
115+
| Terminal width | 1200px |
116+
| Terminal height | Story: 600px, Solo: 400px |
117+
| Theme | Catppuccin Mocha |
118+
| Font size | 16px |
119+
| Typing speed | 40ms per character |
120+
| Padding | 20px |
121+
| Max sleep | Story: 20-30s, Solo: 12-15s |
122+
| PS1 prompt | `darren@ForgeSworn.dev:bray $ ` |
100123

101124
## Story Demos (26 groupings)
102125

@@ -131,32 +154,32 @@ Each story prompt asks Claude to perform a natural workflow using 2-4 tools in s
131154
| 25 | Blossom Files | blossom-upload, blossom-list, blossom-mirror | Upload, manage, replicate |
132155
| 26 | Relay Operator | relay-info, relay-count, relay-auth | Inspect, count, authenticate |
133156

134-
## Solo Demos (~80 tools)
157+
## Solo Demos (114 tools)
135158

136-
Each solo prompt asks Claude to use one specific tool. Organised by group:
159+
Each solo prompt asks Claude to use one specific tool. All prompts are defined in `generate-tapes.sh`. Organised by group:
137160

138-
- **Encoding/Decoding** (6): encode-npub, encode-note, encode-nprofile, encode-nevent, encode-naddr, encode-nsec
161+
- **Encoding/Decoding** (7): decode, encode-npub, encode-note, encode-nprofile, encode-nevent, encode-naddr, encode-nsec
139162
- **Crypto Utilities** (6): verify-event, nip44-encrypt, nip44-decrypt, key-public, key-encrypt, key-decrypt
140-
- **Privacy** (7): privacy-open, privacy-prove-range, privacy-verify-range, privacy-prove-threshold, privacy-verify-threshold, privacy-publish-proof, privacy-read-proof
141-
- **Trust Utilities** (14): trust-verify, trust-read, trust-request, trust-request-list, trust-proof-publish, trust-attest-parse, trust-attest-filter, trust-attest-temporal, trust-attest-chain, trust-attest-check-revoked, trust-ring-lsag-sign, trust-ring-lsag-verify, trust-ring-key-image, trust-spoken-directional, trust-spoken-encode
142-
- **Identity Utilities** (5): identity-list, identity-prove, identity-backup, identity-restore, identity-migrate
143-
- **Content Management** (5): label-remove, label-read, label-search, label-self, list-mute-read, list-check-muted
144-
- **Social Utilities** (4): social-delete, social-repost, dm-by-name, dm-conversation
145-
- **Event Queries** (4): count, fetch, filter, social-feed
163+
- **Event Queries** (3): count, filter, social-feed
146164
- **NIP Info** (2): nip-list, nip-show
147-
- **Marketplace Utilities** (5): marketplace-search, marketplace-reputation, marketplace-compare, marketplace-probe, marketplace-credentials-clear
148-
- **Canary Utilities** (8): canary-session-current, canary-session-verify, canary-group-current, canary-group-verify, canary-group-members, canary-group-join, canary-duress-signal, canary-duress-detect
149-
- **Safety** (2): safety-configure, safety-activate
150-
- **Signet** (1): signet-credentials
151-
- **Relay Utilities** (4): relay-add, relay-query, relay-diversity, relay-compare
165+
- **Identity Utilities** (7): identity-derive, identity-list, identity-prove, identity-backup, identity-restore, identity-migrate, nip05-relays
166+
- **Identity Workflows** (3): identity-setup, identity-recover, onboard-verified
167+
- **Social Utilities** (7): social-delete, social-repost, social-profile-get, dm-by-name, dm-conversation, feed-by-name, profile-by-name
168+
- **Contacts** (2): contacts-get, contacts-unfollow
169+
- **Content Management** (7): label-self, label-read, label-search, label-remove, list-mute-read, list-check-muted, list-pin-read
170+
- **Privacy** (7): privacy-open, privacy-prove-range, privacy-verify-range, privacy-prove-threshold, privacy-verify-threshold, privacy-publish-proof, privacy-read-proof
171+
- **Trust Utilities** (16): trust-read, trust-verify, trust-revoke, trust-request, trust-request-list, trust-proof-publish, trust-attest-parse, trust-attest-filter, trust-attest-temporal, trust-attest-chain, trust-attest-check-revoked, trust-ring-lsag-sign, trust-ring-lsag-verify, trust-ring-key-image, trust-spoken-directional, trust-spoken-encode
172+
- **Signet** (2): signet-credentials, signet-challenge
173+
- **Relay Utilities** (4): relay-add, relay-query, relay-compare, relay-diversity
174+
- **Safety** (6): safety-configure, safety-activate, canary-group-join, canary-group-members, canary-duress-signal, canary-duress-detect
175+
- **Vault Utilities** (6): vault-read, vault-read-shared, vault-revoke, vault-members, vault-config, vault-rotate
176+
- **Marketplace Utilities** (8): marketplace-search, marketplace-reputation, marketplace-compare, marketplace-probe, marketplace-announce, marketplace-update, marketplace-retire, marketplace-credentials-clear
152177
- **Zap Utilities** (4): zap-decode, zap-lookup-invoice, zap-list-transactions, zap-receipts
153-
- **Workflow** (5): feed-discover, identity-setup, identity-recover, relay-health, onboard-verified
154-
- **Blossom** (8): blossom-check, blossom-delete, blossom-discover, blossom-verify, blossom-repair, blossom-usage, blossom-servers-get, blossom-servers-set
178+
- **Blossom** (7): blossom-check, blossom-delete, blossom-discover, blossom-verify, blossom-repair, blossom-usage, blossom-servers
155179
- **Groups** (4): group-info, group-chat, group-send, group-members
156180
- **NIP Publishing** (2): nip-publish, nip-read
157-
- **Contacts** (3): contacts-get, contacts-follow, contacts-unfollow
181+
- **Catalogue** (2): search-actions, execute-action
158182
- **Misc** (1): tombstone
159-
- **NIP-05** (1): nip05-relays
160183

161184
## Embedding Strategy
162185

@@ -193,9 +216,10 @@ Before recording:
193216
## Maintenance
194217

195218
When new tools are added:
196-
1. Write a `.tape` file in `tapes/solo/` or add to a story group
197-
2. Run `vhs tapes/solo/<name>.tape` or `./record.sh <name>` to record
198-
3. The gallery page auto-discovers GIFs from the `gifs/` directory
219+
1. Add a `tape` call in `generate-tapes.sh`
220+
2. Run `./generate-tapes.sh` to regenerate tape files
221+
3. Run `./record.sh <name>` to record the new demo
222+
4. The gallery page auto-discovers GIFs from the `gifs/` directory
199223

200224
## Out of Scope
201225

0 commit comments

Comments
 (0)