Self-evolving second brain with 35 AI skills, 10 agents, and people CRM. Closed-loop harness: a V-model verification lifecycle where the worker never grades its own homework. Plus paired anti-slop design skills for marketing and product UI. Works with Claude Code, Cursor, Kiro, Gemini CLI, Codex.
Python agent-loopagent-pluginsagent-skillsagenticai-agentsclaude-codeclosed-loopcursorgarry-tangbraingstackknowledge-managementloop-engineeringobsidianpeople-crmproductivitysecond-brainself-evolvingverification-harnessworker-agents
feat: PM release and content skills, release-video human input, product-ui house rules (v3.16.0)
Huy Tieu65f43f1c946c
diff --git a/.agents/skills/blog-publish/SKILL.md b/.agents/skills/blog-publish/SKILL.mdnew file mode 100644index 0000000..5632b5e--- /dev/null+++ b/.agents/skills/blog-publish/SKILL.md@@ -0,0 +1,10 @@+---+name: blog-publish+description: Write and publish a post to your own static blog: TL;DR, ASCII art, markdown twin for agents, deploy, and social distribution+---++Read `.claude/skills/blog-publish/SKILL.md` and execute it exactly as written; that file is the authoritative+playbook. Then follow `.agents/rules/cog.md`.++Antigravity substitution: where the playbook delegates to a `.claude/agents/<name>`+worker, invoke `.agents/agents/<name>.md` via `invoke_subagent` instead.diff --git a/.agents/skills/feature-doc/SKILL.md b/.agents/skills/feature-doc/SKILL.mdnew file mode 100644index 0000000..bf7e846--- /dev/null+++ b/.agents/skills/feature-doc/SKILL.md@@ -0,0 +1,10 @@+---+name: feature-doc+description: Document a shipped feature from the live app: real screenshots and a screen recording, a docs article with how-to and use cases, verified before publish+---++Read `.claude/skills/feature-doc/SKILL.md` and execute it exactly as written; that file is the authoritative+playbook. Then follow `.agents/rules/cog.md`.++Antigravity substitution: where the playbook delegates to a `.claude/agents/<name>`+worker, invoke `.agents/agents/<name>.md` via `invoke_subagent` instead.diff --git a/.agents/skills/release-comms/SKILL.md b/.agents/skills/release-comms/SKILL.mdnew file mode 100644index 0000000..ef5c569--- /dev/null+++ b/.agents/skills/release-comms/SKILL.md@@ -0,0 +1,10 @@+---+name: release-comms+description: Turn a deployment runsheet and a GitHub milestone into a customer release note with real media, docs updates, and a Slack announcement draft+---++Read `.claude/skills/release-comms/SKILL.md` and execute it exactly as written; that file is the authoritative+playbook. Then follow `.agents/rules/cog.md`.++Antigravity substitution: where the playbook delegates to a `.claude/agents/<name>`+worker, invoke `.agents/agents/<name>.md` via `invoke_subagent` instead.diff --git a/.agents/skills/social-media-kit/SKILL.md b/.agents/skills/social-media-kit/SKILL.mdnew file mode 100644index 0000000..deadcde--- /dev/null+++ b/.agents/skills/social-media-kit/SKILL.md@@ -0,0 +1,10 @@+---+name: social-media-kit+description: Attach native media (teaser video, GIF, card images) to every social post, with per-platform upload steps+---++Read `.claude/skills/social-media-kit/SKILL.md` and execute it exactly as written; that file is the authoritative+playbook. Then follow `.agents/rules/cog.md`.++Antigravity substitution: where the playbook delegates to a `.claude/agents/<name>`+worker, invoke `.agents/agents/<name>.md` via `invoke_subagent` instead.diff --git a/.agents/skills/terminal-replica/SKILL.md b/.agents/skills/terminal-replica/SKILL.mdnew file mode 100644index 0000000..0fb5a98--- /dev/null+++ b/.agents/skills/terminal-replica/SKILL.md@@ -0,0 +1,10 @@+---+name: terminal-replica+description: Reproduce your real terminal and CLI agents (Claude Code, Codex, Gemini CLI) faithfully in graphics and video frames+---++Read `.claude/skills/terminal-replica/SKILL.md` and execute it exactly as written; that file is the authoritative+playbook. Then follow `.agents/rules/cog.md`.++Antigravity substitution: where the playbook delegates to a `.claude/agents/<name>`+worker, invoke `.agents/agents/<name>.md` via `invoke_subagent` instead.diff --git a/.agents/skills/vector-cover/SKILL.md b/.agents/skills/vector-cover/SKILL.mdnew file mode 100644index 0000000..57a6a88--- /dev/null+++ b/.agents/skills/vector-cover/SKILL.md@@ -0,0 +1,10 @@+---+name: vector-cover+description: Flat vector editorial cover illustrations in HTML and SVG, rendered to a 2400x960 PNG with headless Chrome+---++Read `.claude/skills/vector-cover/SKILL.md` and execute it exactly as written; that file is the authoritative+playbook. Then follow `.agents/rules/cog.md`.++Antigravity substitution: where the playbook delegates to a `.claude/agents/<name>`+worker, invoke `.agents/agents/<name>.md` via `invoke_subagent` instead.diff --git a/.agents/skills/youtube-video-kit/SKILL.md b/.agents/skills/youtube-video-kit/SKILL.mdnew file mode 100644index 0000000..cf5e2b7--- /dev/null+++ b/.agents/skills/youtube-video-kit/SKILL.md@@ -0,0 +1,10 @@+---+name: youtube-video-kit+description: YouTube packaging: thumbnail, animated opening title, ElevenLabs music bed, and the upload metadata bundle+---++Read `.claude/skills/youtube-video-kit/SKILL.md` and execute it exactly as written; that file is the authoritative+playbook. Then follow `.agents/rules/cog.md`.++Antigravity substitution: where the playbook delegates to a `.claude/agents/<name>`+worker, invoke `.agents/agents/<name>.md` via `invoke_subagent` instead.diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.jsonindex d9b6d12..a809000 100644--- a/.claude-plugin/plugin.json+++ b/.claude-plugin/plugin.json@@ -1,7 +1,7 @@{"name": "cog-second-brain",- "version": "3.15.0",- "description": "Self-evolving second brain with 36 AI agent skills, 10 agents, and people CRM. Closed-loop harness release: a V-model verification lifecycle (spec to evidence, criterion-traced checkpoints), read-only verifier agents that observe artifacts instead of trusting worker summaries, risk lanes, multi-session ultragoals with a north-star acceptance gate, plus craft skills for writing, visual work, and a paired anti-slop design system for marketing and product UI. Inspired by Garry Tan's gstack specialist sessions, gbrain knowledge patterns, and dwarves-kit closed-loop execution. Works with Claude Code, Antigravity, Cursor, Kiro, Gemini CLI, Codex, and any markdown-reading agent.",+ "version": "3.16.0",+ "description": "Self-evolving second brain with 43 AI agent skills, 10 agents, and people CRM. Closed-loop harness release: a V-model verification lifecycle (spec to evidence, criterion-traced checkpoints), read-only verifier agents that observe artifacts instead of trusting worker summaries, risk lanes, multi-session ultragoals with a north-star acceptance gate, plus craft skills for writing, visual work, and a paired anti-slop design system for marketing and product UI. Inspired by Garry Tan's gstack specialist sessions, gbrain knowledge patterns, and dwarves-kit closed-loop execution. Works with Claude Code, Antigravity, Cursor, Kiro, Gemini CLI, Codex, and any markdown-reading agent.","author": {"name": "Huy Tieu","url": "https://github.com/huytieu"@@ -255,6 +255,41 @@"name": "release-video","path": ".claude/skills/release-video/SKILL.md","description": "Turn a product release into a motion recap video and explained per-feature demos: deterministic HTML scenes, sound effects tied to motion, music composed to the timeline"+ },+ {+ "name": "blog-publish",+ "path": ".claude/skills/blog-publish/SKILL.md",+ "description": "Write and publish a post to your own static blog: TL;DR, ASCII art, markdown twin for agents, deploy, and social distribution"+ },+ {+ "name": "feature-doc",+ "path": ".claude/skills/feature-doc/SKILL.md",+ "description": "Document a shipped feature from the live app: real screenshots and a screen recording, a docs article with how-to and use cases, verified before publish"+ },+ {+ "name": "release-comms",+ "path": ".claude/skills/release-comms/SKILL.md",+ "description": "Turn a deployment runsheet and a GitHub milestone into a customer release note with real media, docs updates, and a Slack announcement draft"+ },+ {+ "name": "social-media-kit",+ "path": ".claude/skills/social-media-kit/SKILL.md",+ "description": "Attach native media (teaser video, GIF, card images) to every social post, with per-platform upload steps"+ },+ {+ "name": "terminal-replica",+ "path": ".claude/skills/terminal-replica/SKILL.md",+ "description": "Reproduce your real terminal and CLI agents (Claude Code, Codex, Gemini CLI) faithfully in graphics and video frames"+ },+ {+ "name": "vector-cover",+ "path": ".claude/skills/vector-cover/SKILL.md",+ "description": "Flat vector editorial cover illustrations in HTML and SVG, rendered to a 2400x960 PNG with headless Chrome"+ },+ {+ "name": "youtube-video-kit",+ "path": ".claude/skills/youtube-video-kit/SKILL.md",+ "description": "YouTube packaging: thumbnail, animated opening title, ElevenLabs music bed, and the upload metadata bundle"}],"metadata": {diff --git a/.claude/skills/auto-research/SKILL.md b/.claude/skills/auto-research/SKILL.mdindex 978af3e..b3fea82 100644--- a/.claude/skills/auto-research/SKILL.md+++ b/.claude/skills/auto-research/SKILL.md@@ -25,7 +25,7 @@ Inspired by Karpathy's autoresearch — but for strategic thinking instead of ML## InputThe user provides a strategic question or topic as the command argument. Examples:-- "If foundation models commoditize, what happens to LLM wrapper companies like Katalon/Scout?"+- "If foundation models commoditize, what happens to LLM wrapper companies?"- "Future of the testing industry as AI capabilities expand"- "Should we build vs buy vs partner for our AI layer?"- "What are the strategic options for Scout if OpenAI launches a testing product?"@@ -201,7 +201,7 @@ Consolidated, deduplicated list of all sources across threads.## Example Decomposition-**Question:** "If generic LLM models get better over time, what's the future for LLM wrapper companies like Katalon or Scout?"+**Question:** "If generic LLM models get better over time, what's the future for LLM wrapper companies?"**Threads:**1. **Foundation model trajectory** — How fast are GPT/Claude/Gemini improving at code understanding, test generation, bug detection? What's the capability curve?diff --git a/.claude/skills/blog-publish/SKILL.md b/.claude/skills/blog-publish/SKILL.mdnew file mode 100644index 0000000..29d5012--- /dev/null+++ b/.claude/skills/blog-publish/SKILL.md@@ -0,0 +1,106 @@+---+name: blog-publish+description: >+ Write and publish a post to your own static blog end to end: content checklist+ (embedded links, optional TL;DR), per-post ASCII art, an agent-readable markdown+ twin, deploy, and social distribution. Use when you say "write a blog post",+ "publish this to my blog", or "push this post to socials".+---++# blog-publish: static blog post pipeline++## Configuration++Set these once (`kit.toml`, `.env` or arguments).++| Setting | Meaning | Example |+|---|---|---|+| `BLOG_DIR` | Repo folder of your static blog | `./my-blog/` |+| `POSTS_DIR` | Markdown posts, relative to `BLOG_DIR` | `content/posts/` |+| `BUILD_CMD` | Command that builds the site | `python3 build.py` |+| `SITE_DIR` | Build output folder | `site/` |+| `BLOG_URL` | Public base URL | `https://blog.example.com` |+| `POST_PATH` | URL pattern for a post | `/blog/<slug>/` |+| `DEPLOY_CMD` | Your deploy command | see Deploy |+| `SOCIAL_HANDLES` | Accounts used for distribution | per platform |++The steps below assume a build script that renders `POSTS_DIR/<slug>.md` into `SITE_DIR`. Adjust names to your generator (Hugo, Eleventy, Astro, a custom script).++## Content checklist (every post)++1. **Front matter** with `title, subtitle, slug, date, description, tags, author, published`. Match existing posts. If the subtitle renders under the H1, keep it to one sentence stating what the post is about.+2. **TL;DR is optional.** Narrative, build and essay posts open problem-first with no summary box (see Narrative arc). Reserve a TL;DR for reference-style or scannable how-to posts, and then use a one or two sentence hook plus bullets, never one long paragraph.+3. **Embedded links for every reference.** Each tool, repo, prior post or source gets an inline link on first mention. Link your own posts with root-relative paths (`/blog/<slug>/`).+4. **Figures in most major sections.** Use diagrams, charts and product screenshots where they carry evidence. The `editorial-illustrations` skill generates meaning-carrying figures. Keep ASCII for header art (see below).+5. **No em dashes.** Use colons, commas or parentheses.+6. **Voice.** First person, concrete numbers and stories, no AI-slop vocabulary.+7. **Literal example prompts.** When a post walks through an AI tool, quote the actual prompt in a blockquote or fenced block instead of paraphrasing it.+8. **Final anti-slop pass (required).** Before deploy, run the draft through the `no-ai-slop` skill and self-check against its eval. Keep a contrast or colon setup only when it is a real reframe. Preserve your voice and make the smallest effective edit.++## Narrative arc (default for substantial posts)++Document what happened instead of writing a prescriptive summary:++1. **Open on the problem.** A confession, a bug, a bold claim or an observed pattern. Make the reader feel why the status quo breaks before any solution appears. A single diagram as an early anchor is fine.+2. **Narrate the process, including dead ends.** Show the first version, what broke, what you learned and what you changed. Bugs become features. Admit scope creep and reversed decisions.+3. **Cite prior art warmly and inline.** Link by author and work at the natural reading point. Treat references as conceptual anchors, not footnotes.+4. **Prove it with evidence.** Counts, costs, before/after deltas, traces, real artifacts, screenshots, all from the actual run. If the argument is theoretical, say so.+5. **Close reflectively.** End with a quiet claim, an open question or a few diagnostic questions the reader can apply. No call to action, no summary box.++Voice: first person, conversational but technically dense, understated. Short declaratives mixed with longer explanations. Headings are short and descriptive. Length follows the material.++## Per-post ASCII art++Each post gets an entry in an ASCII-frames table in your build script, keyed by slug: a list of 2 to 5 frames that loop (a cursor typing, a rocket lifting, a gear turning). Pad frames to a common size automatically so they need no hand alignment. Use pure ASCII, no Unicode box drawing.++Render it two ways from the one source:+- On the page, a `<pre class="post-ascii" data-frames="...">` element cycles frames with a small inline script (about 420 ms per frame) and shows a static first frame under `prefers-reduced-motion`.+- In the social card, an animated GIF (1200x630) where only the ASCII region changes per frame. Some chat apps animate it, others show the first frame. Set `og:image:type` to `image/gif`.++A playful frame set beats a corporate one. Never ship the generic fallback; add bespoke frames.++## Agent-readable output (automatic, but verify)++Have the build generate a clean markdown twin at `/blog/<slug>/index.md` and list every post in `/llms.txt`. After building, confirm both include the new post:++```bash+grep -i "<title fragment>" $SITE_DIR/llms.txt && head -5 "$SITE_DIR/blog/<slug>/index.md"+```++## Build and deploy++```bash+cd $BLOG_DIR && $BUILD_CMD+```++Deploy with your own command (`DEPLOY_CMD`). Examples, pick the one that matches your host:+- Railway: `railway up --detach`+- Netlify: `netlify deploy --prod --dir=$SITE_DIR`+- Vercel: `vercel deploy --prod`+- Cloudflare Pages: `wrangler pages deploy $SITE_DIR`+- GitHub Pages or any git-push host: commit `SITE_DIR` or push the source and let CI build.++Post-condition: fetch the live page and confirm the new post is there before reporting success:+`curl -s $BLOG_URL/blog/<slug>/ | grep '<title>'`. Builds can take a few minutes.++## Social distribution (after the post is live)++Voice follows your `publish-social` command if you have one. The `social-media-kit` skill covers asset recipes and upload mechanics, and `youtube-video-kit` covers video.++**Media is mandatory on every platform post.** Build the asset kit (teaser video cut, padded-card hero image, terminal GIF) and attach per platform before posting. On X, the thread root gets the strongest asset, and the canonical URL moves to the final reply so the link card still renders.++**Durable articles beat feed posts.** For substantive posts, publish an article on the platform (X Articles, LinkedIn "Write article") with the full body and the canonical blog link as the source. A short thread or feed post is fine as a pointer to it.++- **X:** prefer the Articles composer. For a thread, post tweet 1 and build the rest as self-replies (open each new tweet's detail page, use the reply box). The composer's multi-tweet flow can silently lose drafts. Two traps: typing an `@mention` opens an autocomplete that can swallow the submit click (press Escape first), and a link preview card can push the Reply button below the fold (scroll it into view before clicking). Screenshot every step and re-check the profile to confirm the final tweet posted.+- **LinkedIn:** prefer "Write article". For a feed post, type the full content with real paragraph breaks, wait for the link preview, then post, and confirm the success toast. Mentions only become links when picked from the autocomplete dropdown.+- **Reddit:** one genuine post in a relevant subreddit, not a mass crosspost. Check whether the subreddit requires flair before submitting.+- **Hacker News and IndieHackers:** if there is no logged-in session, stop at the auth wall, never type credentials, and hand the prepared title and URL to the user to submit.++Include the canonical URL in every platform's content and screenshot each post after submitting to verify it.++### X field notes+- Use a browser tool that can attach files to X's file input. Some embedded browser panes cannot, because the platform blocks fetching local images and clipboard paste does nothing.+- The compose route opens a modal over the home feed and a file-input lookup may return the inline composer's input. Close the empty modal and use the inline composer.+- Type the whole post in one call. Pressing Escape to close the mention menu can move the cursor and scramble the text.+- A banner can appear after typing and push the Post button down. Re-screenshot before clicking Post, and confirm the "Your post was sent" toast.+- Count length with URLs as 23 characters and stay at or under 280.diff --git a/.claude/skills/editorial-illustrations/SKILL.md b/.claude/skills/editorial-illustrations/SKILL.mdindex dce135c..0a5629f 100644--- a/.claude/skills/editorial-illustrations/SKILL.md+++ b/.claude/skills/editorial-illustrations/SKILL.md@@ -161,3 +161,7 @@ Per the Visual Verification rule, a DOM check is not enough. **Render it and loo- [ ] Gridlines present only if the figure is genuinely quantitative.- [ ] Motion (if any) demonstrates the claim and dies under reduced-motion.- [ ] Renders correctly in both dark and light, and stacks cleanly on mobile.++## Blog figure kit++For blog posts, start from the kit before inventing new chrome: `references/blog-figure-kit.md` (six patterns, screenshot and tweet frames, gotchas) and `assets/blog-figure-kit.html` (live figures plus the full stylesheet). Body diagrams use these figures; ASCII stays in an animated header only.diff --git a/.claude/skills/editorial-illustrations/assets/blog-figure-kit.html b/.claude/skills/editorial-illustrations/assets/blog-figure-kit.htmlnew file mode 100644index 0000000..921800c--- /dev/null+++ b/.claude/skills/editorial-illustrations/assets/blog-figure-kit.html@@ -0,0 +1,235 @@+<!doctype html><html lang="en" data-theme="light"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Blog figure kit</title>+<style>body{max-width:760px;margin:40px auto;padding:0 16px;font:16px/1.6 system-ui;background:#f7f8fb}h2{font:600 14px ui-monospace,monospace;text-transform:uppercase;letter-spacing:.1em;color:#64748b;margin-top:56px}</style>+<style>+:root{--ef-ground:#ffffff;--ef-deep:#f1f3f7;--ef-ink:#111827;--ef-soft:#334155;--ef-muted:#64748b;--ef-quiet:#94a3b8;--ef-line:#e6e8ee;--ef-strong:#cbd5e1;--ef-accent:#c15f3c;--ef-node:#d97757;--ef-sans:Inter,ui-sans-serif,system-ui,sans-serif;--ef-mono:"JetBrains Mono",ui-monospace,"SF Mono",Menlo,monospace}+:root[data-theme="dark"]{--ef-ground:#171b22;--ef-deep:#11151b;--ef-ink:#f1f5f9;--ef-soft:#cbd5e1;--ef-muted:#8b95a5;--ef-quiet:#5b6472;--ef-line:#262c36;--ef-strong:#3a4250;--ef-accent:#e0885f;--ef-node:#e0885f}+.ef{margin:40px 0;padding:22px 22px 16px;border:1px solid var(--ef-line);background:var(--ef-ground);color:var(--ef-ink);box-shadow:0 1px 2px rgba(16,24,40,.04)}+.ef figcaption{margin-top:18px;padding-top:12px;border-top:1px solid var(--ef-line);font:500 9px/1.6 var(--ef-mono);letter-spacing:.1em;text-transform:uppercase;color:var(--ef-muted)}+.ef__k{font:500 9px/1 var(--ef-mono);letter-spacing:.12em;text-transform:uppercase;color:var(--ef-quiet);margin-bottom:14px}+.ef svg{width:100%;height:auto;display:block;overflow:visible}+.ef svg text{font-family:var(--ef-mono)}+/* F1 readers */+.ef-read{display:grid;grid-template-columns:150px 1fr;gap:0 18px;align-items:stretch}+.ef-pass{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;border:1px solid var(--ef-ink);padding:14px}+.ef-pass b{font:600 18px/1 var(--ef-mono);letter-spacing:.04em}+.ef-pass small{font:400 10px/1.4 var(--ef-mono);color:var(--ef-muted);margin-top:8px}+.ef-rows{display:grid;gap:8px}+.ef-row{position:relative;display:grid;grid-template-columns:100px 1fr 132px;gap:12px;align-items:center;padding:9px 12px;border:1px solid var(--ef-line)}+.ef-row__who{font:500 9px/1.3 var(--ef-mono);letter-spacing:.1em;text-transform:uppercase;color:var(--ef-quiet)}+.ef-row__q{font:400 13px/1.4 var(--ef-sans);color:var(--ef-soft)}+.ef-row__s{font:500 9px/1.3 var(--ef-mono);letter-spacing:.08em;text-transform:uppercase;text-align:right;color:var(--ef-ink)}+.ef-row--gap{border-style:dashed}+.ef-row--gap .ef-row__s{color:var(--ef-accent)}+.ef-row::before{content:"";position:absolute;left:-19px;top:50%;width:18px;height:1px;background:var(--ef-strong)}+.ef-row i{position:absolute;left:-19px;top:calc(50% - 3px);width:6px;height:6px;border-radius:50%;background:var(--ef-ink);opacity:0;animation:ef-ping 6s ease-in-out infinite}+.ef-row--gap i{background:var(--ef-node)}+.ef-row:nth-child(2) i{animation-delay:1.5s}.ef-row:nth-child(3) i{animation-delay:3s}.ef-row:nth-child(4) i{animation-delay:4.5s}+@keyframes ef-ping{0%{opacity:0;transform:translateX(0)}5%{opacity:1}20%{opacity:1;transform:translateX(16px)}26%,100%{opacity:0;transform:translateX(16px)}}+/* F2 replay grid */+.ef-grid{display:grid;grid-template-columns:minmax(150px,1.3fr) repeat(3,1fr);border-top:1px solid var(--ef-line);border-left:1px solid var(--ef-line);position:relative}+.ef-grid>div{border-right:1px solid var(--ef-line);border-bottom:1px solid var(--ef-line);padding:9px 10px;min-height:38px;display:flex;align-items:center}+.ef-h{font:500 9px/1.3 var(--ef-mono);letter-spacing:.1em;text-transform:uppercase;color:var(--ef-quiet)}+.ef-step{font:400 11px/1.35 var(--ef-mono);color:var(--ef-soft)}+.ef-c{justify-content:center}+.ef-c span{font:500 9px/1 var(--ef-mono);letter-spacing:.1em;text-transform:uppercase;padding:5px 7px;border:1px solid var(--ef-strong);color:var(--ef-muted)}+.ef-c .m{background:var(--ef-ink);border-color:var(--ef-ink);color:var(--ef-ground)}+.ef-c .ma{background:var(--ef-node);border-color:var(--ef-node);color:#fff}+.ef-c .r{border-color:var(--ef-ink);color:var(--ef-ink)}+.ef-c .x{border-style:dashed;color:var(--ef-ink)}+.ef-c .n{border:0;color:var(--ef-quiet)}+.ef-col{position:absolute;top:0;bottom:0;width:calc((100% - (100% * 1.3 / 4.3)) / 3);left:calc(100% * 1.3 / 4.3);background:var(--ef-ink);opacity:.045;pointer-events:none;animation:ef-sweep 7.5s steps(1) infinite}+@keyframes ef-sweep{0%{transform:translateX(0)}33.3%{transform:translateX(100%)}66.6%{transform:translateX(200%)}}+.ef-keyrow{display:flex;flex-wrap:wrap;gap:14px;margin-top:12px;font:400 9px/1 var(--ef-mono);letter-spacing:.08em;text-transform:uppercase;color:var(--ef-quiet)}+.ef-keyrow span{display:flex;align-items:center;gap:6px}+.ef-keyrow i{display:inline-block;width:14px;height:9px;border:1px solid var(--ef-strong)}+.ef-keyrow i.m{background:var(--ef-ink);border-color:var(--ef-ink)}.ef-keyrow i.ma{background:var(--ef-node);border-color:var(--ef-node)}.ef-keyrow i.r{border-color:var(--ef-ink)}.ef-keyrow i.x{border-style:dashed;border-color:var(--ef-ink)}+/* F3 loop vs relay */+.ef-two{display:grid;grid-template-columns:1fr 1.35fr;gap:22px}+.ef-pane{border:1px solid var(--ef-line);padding:14px}+.ef-orbit{position:relative;width:210px;height:210px;margin:6px auto 4px}+.ef-orbit__ring{position:absolute;inset:22px;border:1px solid var(--ef-strong);border-radius:50%}+.ef-orbit__spin{position:absolute;inset:22px;animation:ef-spin 6s linear infinite}+.ef-orbit__spin i{position:absolute;top:-4px;left:calc(50% - 4px);width:8px;height:8px;border-radius:50%;background:var(--ef-ink)}+@keyframes ef-spin{to{transform:rotate(360deg)}}+.ef-orbit__c{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;font:520 15px/1.1 var(--ef-sans)}+.ef-orbit__c small{font:500 8px/1.4 var(--ef-mono);letter-spacing:.1em;text-transform:uppercase;color:var(--ef-quiet);margin-top:4px}+.ef-orbit__l{position:absolute;font:500 8px/1.2 var(--ef-mono);letter-spacing:.08em;text-transform:uppercase;color:var(--ef-muted);white-space:nowrap;transform:translate(-50%,-50%);background:var(--ef-ground);padding:2px 3px}+.ef-relay{display:grid;gap:10px}+.ef-hand{display:grid;grid-template-columns:96px 1fr 62px;gap:10px;align-items:center;position:relative}+.ef-hand__who{font:500 9px/1.3 var(--ef-mono);letter-spacing:.1em;text-transform:uppercase;color:var(--ef-quiet)}+.ef-hand__act{font:400 12px/1.35 var(--ef-sans);color:var(--ef-soft);border:1px solid var(--ef-line);padding:7px 9px;position:relative;overflow:hidden}+.ef-hand__act i{position:absolute;left:0;bottom:0;height:2px;width:0;background:var(--ef-ink);animation:ef-fill 8s ease-in-out infinite}+.ef-hand:nth-child(2) .ef-hand__act i{animation-delay:2s}.ef-hand:nth-child(3) .ef-hand__act i{animation-delay:4s}.ef-hand:nth-child(4) .ef-hand__act i{animation-delay:6s}+@keyframes ef-fill{0%{width:0;opacity:1}18%{width:100%;opacity:1}25%,100%{width:100%;opacity:0}}+.ef-store{font:500 9px/1 var(--ef-mono);letter-spacing:.08em;text-transform:uppercase;text-align:center;padding:6px 0;border:1px solid var(--ef-ink)}+.ef-store--q{border:1px dashed var(--ef-accent);color:var(--ef-accent)}+/* F4 / F5 svg */+.ef-svg .lbl{font-size:10px;fill:var(--ef-soft)}+.ef-svg .tag{font-size:8px;letter-spacing:.1em;fill:var(--ef-quiet);text-transform:uppercase}+.ef-svg .node{fill:var(--ef-ground);stroke:var(--ef-ink);stroke-width:1}+.ef-svg .node--q{stroke-dasharray:3 3;stroke:var(--ef-strong)}+.ef-svg .edge{stroke:var(--ef-strong);stroke-width:1;fill:none}+.ef-svg .edge--a{stroke:var(--ef-accent);stroke-width:1.5;stroke-dasharray:5 4;animation:ef-dash 1.6s linear infinite}+.ef-svg .edge--d{stroke-dasharray:3 4}+.ef-svg .lbl--a{fill:var(--ef-accent);font-weight:600}+.ef-svg .box{fill:var(--ef-ground);stroke:var(--ef-line)}+.ef-svg .box--a{stroke:var(--ef-accent)}+.ef-svg .dot{fill:var(--ef-node)}+@keyframes ef-dash{to{stroke-dashoffset:-18}}+.ef-svg .sig{fill:var(--ef-node);offset-rotate:0deg;animation:ef-move 4.5s ease-in-out infinite}+@keyframes ef-move{0%{offset-distance:0%;opacity:0}8%{opacity:1}70%{offset-distance:100%;opacity:1}85%,100%{offset-distance:100%;opacity:0}}+/* F6 rail */+.ef-rail{display:grid;grid-template-columns:repeat(6,1fr);border:1px solid var(--ef-line);position:relative}+.ef-st{padding:12px 10px 14px;border-right:1px solid var(--ef-line);min-height:118px;display:flex;flex-direction:column;position:relative}+.ef-st:last-child{border-right:0}+.ef-st>span{font:500 8px/1 var(--ef-mono);color:var(--ef-quiet)}+.ef-st>b{margin-top:auto;font:540 13px/1.25 var(--ef-sans);color:var(--ef-ink)}+.ef-st>small{margin-top:5px;font:400 9px/1.4 var(--ef-mono);color:var(--ef-muted);min-height:26px}+.ef-st>em{font:500 8px/1.45 var(--ef-mono);letter-spacing:.1em;text-transform:uppercase;font-style:normal;margin-top:9px;color:var(--ef-quiet)}+.ef-st--b{background:repeating-linear-gradient(135deg,transparent 0 6px,var(--ef-deep) 6px 7px)}+.ef-st--b>em{color:var(--ef-soft)}+.ef-st--a{box-shadow:inset 0 2px var(--ef-accent)}+.ef-st--a>em,.ef-st--a>b{color:var(--ef-accent)}+.ef-rail__dot{position:absolute;top:-4px;left:0;width:7px;height:7px;border-radius:50%;background:var(--ef-ink);animation:ef-travel 7s ease-in-out infinite}+@keyframes ef-travel{0%{left:0;background:var(--ef-ink)}60%{left:calc(66.6% - 4px);background:var(--ef-ink)}70%,88%{left:calc(91.6% - 4px);background:var(--ef-node)}100%{left:calc(100% - 7px);background:var(--ef-node)}}+/* screenshots */+.ef-shot{margin:30px 0}+.ef-shot img{width:100%;display:block;border:1px solid var(--ef-line)}+.ef-shot figcaption{margin-top:8px;font:400 10px/1.5 var(--ef-mono);letter-spacing:.06em;text-transform:uppercase;color:var(--ef-muted)}+/* tweets */+.ef-tw{margin:28px auto;max-width:440px}+.ef-tw img{width:100%;display:block;border:1px solid var(--ef-line)}+.ef-tw figcaption{margin-top:8px;font:400 10px/1.5 var(--ef-mono);letter-spacing:.06em;text-transform:uppercase;color:var(--ef-muted);text-align:center}+.ef-tw2{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:28px 0;align-items:start}+.ef-tw2 .ef-tw{margin:0;max-width:none}+@media (max-width:700px){+ .ef{padding:16px 14px 12px}+ .ef-read,.ef-two,.ef-tw2{grid-template-columns:1fr}+ .ef-pass{margin-bottom:12px}+ .ef-row{grid-template-columns:1fr;gap:4px}.ef-row__s{text-align:left}.ef-row::before,.ef-row i{display:none}+ .ef-grid{grid-template-columns:118px repeat(3,1fr)}.ef-grid>div{padding:7px 5px}.ef-step{font-size:10px;word-break:break-all}.ef-c span{padding:4px 4px;font-size:8px}+ .ef-grid>.ef-col{display:none}+ .ef-rail{grid-template-columns:1fr 1fr}.ef-st{border-bottom:1px solid var(--ef-line)}.ef-rail__dot{display:none}+ .ef-hand{grid-template-columns:80px 1fr 54px}+}+@media (prefers-reduced-motion:reduce){.ef *,.ef *::before{animation:none!important}.ef-row i,.ef-svg .sig{opacity:0}}+</style></head><body>+<p>Reference kit of six figure patterns. Toggle <code>data-theme</code> on <html> to check dark.</p>+<h2>A. Fan-out rows (one source, N readers, gap rows dashed)</h2>+<figure class="ef" role="img" aria-label="One passing test, four readers; only the engineer's question is answered by the run">+ <div class="ef__k">One green check, four readers</div>+ <div class="ef-read">+ <div class="ef-pass"><b>PASS</b><small>refund_partial_sub<br>run 4812 · 38s</small></div>+ <div class="ef-rows">+ <div class="ef-row"><i></i><div class="ef-row__who">Engineer</div><div class="ef-row__q">Does my code still work?</div><div class="ef-row__s">In the run</div></div>+ <div class="ef-row ef-row--gap"><i></i><div class="ef-row__who">QA reviewer</div><div class="ef-row__q">Were the negative cases covered?</div><div class="ef-row__s">Outside the run</div></div>+ <div class="ef-row ef-row--gap"><i></i><div class="ef-row__who">Product owner</div><div class="ef-row__q">Is this the behavior we agreed on?</div><div class="ef-row__s">Outside the run</div></div>+ <div class="ef-row ef-row--gap"><i></i><div class="ef-row__who">Release mgr</div><div class="ef-row__q">Did every variant run on this RC?</div><div class="ef-row__s">Outside the run</div></div>+ </div>+ </div>+ <figcaption>The run answers one of four questions. The other three need a record that lives somewhere else.</figcaption>+</figure>+<h2>B. Step x run grid with sweeping column</h2>+<figure class="ef" role="img" aria-label="Grid of four test steps across three runs showing which steps call the model, replay, or run as code">+ <div class="ef__k">The same test, three runs</div>+ <div class="ef-grid">+ <div class="ef-col"></div>+ <div class="ef-h">Step</div><div class="ef-h ef-c" style="text-align:center">Run 1<br>cold</div><div class="ef-h ef-c" style="text-align:center">Run 2<br>cached</div><div class="ef-h ef-c" style="text-align:center">Run 3<br>UI changed</div>+ <div class="ef-step">agent.act("log in")</div><div class="ef-c"><span class="m">Model</span></div><div class="ef-c"><span class="r">Replay</span></div><div class="ef-c"><span class="r">Replay</span></div>+ <div class="ef-step">agent.act("open order")</div><div class="ef-c"><span class="m">Model</span></div><div class="ef-c"><span class="r">Replay</span></div><div class="ef-c"><span class="x">Stale · stop</span></div>+ <div class="ef-step">agent.assert("prorated")</div><div class="ef-c"><span class="ma">Model</span></div><div class="ef-c"><span class="ma">Model</span></div><div class="ef-c"><span class="n">Not run</span></div>+ <div class="ef-step">expect(total)</div><div class="ef-c"><span>Code</span></div><div class="ef-c"><span>Code</span></div><div class="ef-c"><span class="n">Not run</span></div>+ </div>+ <div class="ef-keyrow"><span><i class="m"></i>Live model call</span><span><i class="ma"></i>Model call that replay never removes</span><span><i class="r"></i>Recorded replay</span><span><i class="x"></i>Strict reject</span><span><i></i>Deterministic code</span></div>+ <figcaption>Replay removes model calls from actions. An agent assertion calls the model on every run, and strict mode stops the run when a recording goes stale.</figcaption>+</figure>+<h2>C. Orbit vs relay (one owner loop vs handoffs)</h2>+<figure class="ef" role="img" aria-label="Left: one owner circling a six-step loop. Right: four roles handing off a refund test, only the first handoff stored in Git">+ <div class="ef-two">+ <div class="ef-pane">+ <div class="ef__k">Small team</div>+ <div class="ef-orbit">+ <div class="ef-orbit__ring"></div>+ <div class="ef-orbit__spin"><i></i></div>+ <div class="ef-orbit__c">1 owner<small>every step</small></div>+ <span class="ef-orbit__l" style="left:50%;top:10px">Write test</span>+ <span class="ef-orbit__l" style="left:91%;top:30%">Seed data</span>+ <span class="ef-orbit__l" style="left:91%;top:70%">Run in CI</span>+ <span class="ef-orbit__l" style="left:50%;top:200px">Read report</span>+ <span class="ef-orbit__l" style="left:9%;top:70%">Triage</span>+ <span class="ef-orbit__l" style="left:9%;top:30%">Release</span>+ </div>+ </div>+ <div class="ef-pane">+ <div class="ef__k">Ownership spreads</div>+ <div class="ef-relay">+ <div class="ef-hand"><div class="ef-hand__who">Engineer</div><div class="ef-hand__act">Writes the refund test<i></i></div><div class="ef-store">Git</div></div>+ <div class="ef-hand"><div class="ef-hand__who">QA reviewer</div><div class="ef-hand__act">Reviews intent and negative cases<i></i></div><div class="ef-store ef-store--q">?</div></div>+ <div class="ef-hand"><div class="ef-hand__who">Product owner</div><div class="ef-hand__act">Confirms partial-sub behavior<i></i></div><div class="ef-store ef-store--q">?</div></div>+ <div class="ef-hand"><div class="ef-hand__who">Release mgr</div><div class="ef-hand__act">Approves on evidence<i></i></div><div class="ef-store ef-store--q">?</div></div>+ </div>+ </div>+ </div>+ <figcaption>One owner closes the loop alone. Across four roles each handoff needs a record, and only the first one has a home in Git.</figcaption>+</figure>+<h2>D. SVG tree with offset-path signal dot</h2>+<figure class="ef ef-svg" role="img" aria-label="Tree from a test case to a versioned dataset to three rows and three named tests; the result carries case, dataset version and row">+ <div class="ef__k">Where a result's identity comes from</div>+ <svg viewBox="0 0 720 300">+ <path class="edge" d="M90 150 C 150 150, 150 150, 210 150"/>+ <path class="edge" d="M290 150 C 330 150, 330 70, 370 70"/>+ <path class="edge" d="M290 150 L 370 150"/>+ <path class="edge" d="M290 150 C 330 150, 330 230, 370 230"/>+ <path class="edge" d="M530 70 L 545 70"/><path class="edge" d="M530 150 L 545 150"/><path class="edge" d="M530 230 L 545 230"/>+ <path id="ef-p5" class="edge" d="M90 150 C 150 150, 150 150, 210 150 L 290 150 L 370 150 L 545 150" style="stroke:none"/>+ <circle class="node" cx="70" cy="150" r="20"/><text class="lbl" x="70" y="154" text-anchor="middle">REF-12</text><text class="tag" x="70" y="190" text-anchor="middle">CASE</text>+ <rect class="box" x="210" y="134" width="80" height="32"/><text class="lbl" x="250" y="154" text-anchor="middle">refunds@v3</text><text class="tag" x="250" y="186" text-anchor="middle">REVIEWED DATASET</text>+ <circle class="node" cx="378" cy="70" r="6"/><text class="lbl" x="392" y="74">card_active_admin</text>+ <circle class="node" cx="378" cy="150" r="6" style="fill:var(--ef-node);stroke:var(--ef-node)"/><text class="lbl" x="392" y="154">card_partial_member</text>+ <circle class="node" cx="378" cy="230" r="6"/><text class="lbl" x="392" y="234">paypal_cancel_admin</text>+ <rect class="box" x="545" y="56" width="170" height="28"/><text class="lbl" x="555" y="74">test REF-12 [row 1]</text>+ <rect class="box box--a" x="545" y="136" width="170" height="28"/><text class="lbl lbl--a" x="555" y="154">REF-12 · v3 · row 2 · fail</text>+ <rect class="box" x="545" y="216" width="170" height="28"/><text class="lbl" x="555" y="234">test REF-12 [row 3]</text>+ <path class="edge edge--d" d="M630 164 L 630 266"/>+ <rect class="box" x="560" y="266" width="140" height="24" style="stroke-dasharray:3 3"/><text class="lbl" x="630" y="282" text-anchor="middle" style="font-size:9px;fill:var(--ef-quiet)">acct_8f2c91 · setup</text>+ <circle class="sig" r="4" style="offset-path:path('M90 150 C 150 150, 150 150, 210 150 L 290 150 L 370 150 L 545 150')"/>+ </svg>+ <figcaption>A failure is reproducible only if the result carries case, dataset version and row. The generated account ID changes every run and names nothing.</figcaption>+</figure>+<h2>E. Stage rail with traveling dot and to-build hatching</h2>+<figure class="ef" role="img" aria-label="Six-stage pipeline from a fresh output directory to reconcile; three stages belong to an adapter that does not exist yet">+ <div class="ef__k">Proposed CI pipeline</div>+ <div class="ef-rail">+ <i class="ef-rail__dot"></i>+ <div class="ef-st"><span>01</span><b>Fresh output dir</b><small>no stale report survives</small><em>CI</em></div>+ <div class="ef-st"><span>02</span><b>e2e run</b><small>JSON + JUnit + artifacts</small><em>e2e · exists</em></div>+ <div class="ef-st ef-st--b"><span>03</span><b>Map + stage</b><small>case key, data row, commit</small><em>Adapter · to build</em></div>+ <div class="ef-st"><span>04</span><b>Upload</b><small>JUnit report uploader</small><em>Platform · exists</em></div>+ <div class="ef-st ef-st--b"><span>05</span><b>Read back</b><small>what the platform actually stored</small><em>Adapter · to build</em></div>+ <div class="ef-st ef-st--b ef-st--a"><span>06</span><b>Reconcile</b><small>missing, flaky, partial</small><em>Adapter · to build</em></div>+ </div>+ <figcaption>Upload sits in the middle. The adapter's real job is the read-back and reconcile after it, where a missing or partial run becomes visible.</figcaption>+</figure>+<h2>F. SVG many-to-few mapping with animated collapse edges</h2>+<figure class="ef ef-svg" role="img" aria-label="Five e2e outcomes mapped to three JUnit states; retry-pass and interrupted collapse into passing and skipped">+ <div class="ef__k">e2e outcome → JUnit state</div>+ <svg viewBox="0 0 720 280">+ <text class="tag" x="40" y="22">E2E 0.17 OUTCOME</text><text class="tag" x="470" y="22">JUNIT XML</text>+ <path class="edge" d="M200 55 C 330 55, 340 70, 470 70"/>+ <path class="edge edge--a" d="M200 105 C 330 105, 340 75, 470 75"/>+ <path class="edge" d="M200 155 C 330 155, 340 140, 470 140"/>+ <path class="edge edge--a" d="M200 205 C 330 205, 340 210, 470 210"/>+ <path class="edge edge--d" d="M200 255 C 330 255, 340 255, 470 255"/>+ <circle class="node" cx="40" cy="55" r="5"/><text class="lbl" x="56" y="59">passed, first try</text>+ <circle class="node" cx="40" cy="105" r="5" style="fill:var(--ef-node);stroke:var(--ef-node)"/><text class="lbl lbl--a" x="56" y="109">passed after retry</text>+ <circle class="node" cx="40" cy="155" r="5"/><text class="lbl" x="56" y="159">failed</text>+ <circle class="node" cx="40" cy="205" r="5" style="fill:var(--ef-node);stroke:var(--ef-node)"/><text class="lbl lbl--a" x="56" y="209">interrupted</text>+ <circle class="node node--q" cx="40" cy="255" r="5"/><text class="lbl" x="56" y="259">tags · attempts · cache hits</text>+ <rect class="box" x="470" y="56" width="150" height="32"/><text class="lbl" x="482" y="76"><testcase/></text><text class="tag" x="630" y="76">+ note</text>+ <rect class="box" x="470" y="124" width="150" height="32"/><text class="lbl" x="482" y="144"><failure/> | <error/></text>+ <rect class="box" x="470" y="194" width="150" height="32"/><text class="lbl" x="482" y="214"><skipped/></text><text class="tag" x="630" y="214">+ message</text>+ <rect class="box" x="470" y="240" width="150" height="30" style="stroke-dasharray:3 3"/><text class="tag" x="482" y="259">DROPPED</text>+ </svg>+ <figcaption>Five outcomes land on three states. A retry-pass counts as a pass and an interrupted test counts as a skip; the difference survives only as free text.</figcaption>+</figure>+</body></html>\ No newline at end of filediff --git a/.claude/skills/editorial-illustrations/references/blog-figure-kit.md b/.claude/skills/editorial-illustrations/references/blog-figure-kit.mdnew file mode 100644index 0000000..16bf158--- /dev/null+++ b/.claude/skills/editorial-illustrations/references/blog-figure-kit.md@@ -0,0 +1,63 @@+# Blog figure kit++Starting kit for blog diagrams. Live reference: `../assets/blog-figure-kit.html` (all six figures plus the full `ef-` stylesheet). Open it through a local server, then copy the `<style>` block and the figure you need into the post.++**Rule:** a blog post body uses these HTML/SVG figures for diagrams. ASCII stays only in the animated header frames (`SLUG_ASCII_FRAMES` in `build.py`).++## Tokens and theme++- Prefix every class with a short post-specific namespace (`ef-` here) so two posts never collide on the index page.+- Light tokens on `:root`, dark override on `:root[data-theme="dark"]` using your site's dark palette (for example ground `#171b22`, line `#262c36`, ink `#f1f5f9`). On a site with its own theme toggle, never key dark mode off `prefers-color-scheme`.+- Accent `--ef-accent:#c15f3c` for text and strokes, `--ef-node:#d97757` for filled dots and cells. Coral marks the point of the figure, nowhere else.+- Kicker (`.ef__k`) and figcaption are mono, 9px, uppercase. The caption states the claim in one or two sentences.++## Six patterns++| Pattern | Use when the claim is | Motion |+|---|---|---|+| A. Fan-out rows | one artifact, several readers, some gaps | a dot pings each row in turn (`animation-delay` per row) |+| B. Step x run grid | behavior changes across runs or versions | a shaded column steps across runs (`steps(1)`) |+| C. Orbit vs relay | one owner vs a chain of handoffs | dot circles the orbit; underline fills each handoff in sequence |+| D. SVG tree + signal | identity or lineage from root to leaf | dot rides `offset-path` to the highlighted leaf |+| E. Stage rail | a pipeline with owners; some stages unbuilt | dot travels the rail and turns coral at the point stage; hatched = to build |+| F. Many-to-few mapping | information lost in a conversion | coral dashed edges animate `stroke-dashoffset` where states collapse |++## Screenshots and tweets++- `.ef-tw` (440px max, centered) for one tweet, `.ef-tw2` two-up grid that stacks under 700px. Link the image to the source post. Caption = author + date.+- `.ef-shot` for product or web screenshots, full column width, caption names the product and capture date.+- Crop tweet captures to the tweet card only: exclude the X sidebar, the reply box and the viewer's avatar.+- Product screenshots: reuse images already published on the site when they show the claim (for example `/assets/screens/*.png`). Mask customer PII.++## Gotchas (cost a retry)++- `.ef-grid>div{display:flex}` beats `.ef-col{display:none}` on specificity. Hide grid children with `.ef-grid>.ef-col`.+- SVG text labels and edges: leave about 15px between the end of a label and the next node's edge, or the line runs through the text. Check at 720 viewBox width.+- `text-transform:uppercase` on `.tag` changes IDs (`acct_8f2c91` becomes `ACCT_8F2C91`). Use `.lbl` for literal identifiers.+- Wrapped mono owner tags need `line-height:1.45`, or the two lines touch.+- Long run headers wrap badly at 375px. Break them as `Run 1<br>cold`.+- `scrollIntoView` on a site with smooth scrolling, so a screenshot taken right after shows the old position. Set `document.documentElement.style.scrollBehavior='auto'` and `scrollTo` first.+- If the preview server cannot read your build folder, copy it to a temp folder and serve it from there.+- Every motion block needs a `@media (prefers-reduced-motion:reduce)` kill, and the signal dots should be hidden (opacity 0) there.++## Verify before publishing++1. Build, serve the copy, and screenshot every figure at desktop width and at 375px.+2. Check that no `figure` has `scrollWidth > clientWidth`.+3. Read each image against its caption: is the coral element the one that proves the claim?++## Product UI recreations++Raster product screenshots can look soft on a blog. Rebuild them as HTML instead: a figure with a window bar, left nav, and the real layout, styled with your brand tokens. Copy the real values (names, durations, counts) from the source screenshot, and caption it "Recreated from <product>" with the date. Mask customer data. Never present a proposed feature as a recreation; label mockups as mockups.++## Tweet captures++Capture tweets from the official embed in a headless browser at 2x, light theme:+`https://platform.twitter.com/embed/Tweet.html?id=<id>&theme=light&dnt=true&hideThread=true`, then screenshot the first `article` with Playwright (`device_scale_factor=2`, viewport 560 wide) and save as JPEG q90. This renders logged out and gives about 1100px wide images.++- Do not capture through your everyday Chrome profile. Background windows never paint, so captures come out black, and an automation daemon attached to a real tab navigates that tab away.+- x.com status pages do not render in a logged-out headless browser. Use the embed URL.++## Markdown gotcha++A blank line inside the post's `<style>` block ends the raw-HTML block, and the markdown renderer then swallows the rest of the post into the style element (empty page). Keep every `<style>` block free of blank lines.diff --git a/.claude/skills/feature-doc/SKILL.md b/.claude/skills/feature-doc/SKILL.mdnew file mode 100644index 0000000..e276de8--- /dev/null+++ b/.claude/skills/feature-doc/SKILL.md@@ -0,0 +1,128 @@+---+name: feature-doc+description: >+ Closed-loop feature documentation for your product. Give it a feature (issue+ numbers or an id) and it reads the source, drives your live app to capture real+ screenshots and a screen recording, writes a docs article (Docusaurus or any+ markdown docs site) with both how-to steps and use-case content, then verifies+ the article with a fresh-context read-only verifier before reporting. Use when+ you say "write the doc for <feature>", "document issue #123", or "/feature-doc".+---++# feature-doc: closed-loop feature documentation++Produces one evidence-backed feature article end to end. Capture needs no manual+gesture: a bundled recorder grabs frames from the browser through the DevTools+protocol. Publishing the docs PR stays a gate for you at CP-6.++## Configuration++Set these once (a `.env`, your `kit.toml`, or pass them as arguments). Nothing below is hardcoded.++| Setting | Meaning | Example |+|---|---|---|+| `APP_URL` | Start page of the live app to drive | `https://app.example.com/projects/1` |+| `ISSUE_REPO` | Issue tracker holding the feature issues | `your-org/your-product` |+| `DOCS_REPO` | Local path of the docs repo | `../your-docs` |+| `DOCS_DIR` | Folder inside the docs repo for the article | `docs/features/` |+| `EVIDENCE_DIR` | Where screenshots and video land | `./evidence/<feature>/` |++Keep the docs repo in a folder your tools can always read. Some operating systems block background reads of the Documents folder mid-session, which breaks the verifier.++## When to use+- A shipped or shipping feature has no article, or an outdated one.+- You want a doc that works as a user manual and as a guide to what you can do with the feature, with real screenshots and a video.++Skip it for backend features with no user surface (write a short "no doc required" record instead).++## Closed loop+```+CP-1 spec (issues/repo) -> CP-2 plan (AC-n) -> CP-3 build (capture + write)+ -> CP-3v component verify (task-verifier, read-only) -> fix-agent (max 2)+ -> CP-5 post-condition -> CP-6 ship gate (you review, then open the docs PR)+```+The writer never grades its own work. The verifier is a fresh-context, read-only subagent that gets paths and AC-n only, never the writer's narration. See the `closed-loop` skill for the checkpoint mechanics.++## Inputs+- Feature id plus seed issue numbers in `ISSUE_REPO`, or a spec path.+- A browser already logged in to the app, reachable by a browser automation tool (Playwright, CDP, or your browser harness). If the app redirects to a login page, stop and ask the user to sign in. Never type credentials.+- The docs repo at `DOCS_REPO`. One article per feature: a new feature gets a new article, a changed one updates the existing article.++## Pipeline++### 1. Enrich (CP-1)+Read each seed issue (`gh issue view <n> --repo $ISSUE_REPO --json title,body,state,labels,milestone`, or your tracker's CLI) and any matching spec files. Establish the concrete user surface, the ship status per issue (an OPEN issue is not a shipped surface, so do not claim it), and the exact flow to demo. Never invent UI. Where a detail is unknown, mark it `TODO` and flag it.++### 2. Plan (CP-2)+Map the article's sections to AC-n (see Post-conditions). Grep the docs repo for existing coverage to decide between a new article and an update.++### 3. Capture (CP-3)+Drive the live flow and save real evidence into `EVIDENCE_DIR`.++- **Screenshots** of each meaningful state, using your browser tool's screenshot call.+- **A real video** of the end-to-end flow with the bundled recorder (no gesture, no ffmpeg needed for the capture):+ ```bash+ SR_OUT=$EVIDENCE_DIR/<feature>-demo \+ SR_URL=$APP_URL \+ SR_FPS=8 \+ SR_STEPS='[{"at":0.5,"do":"click_testid","testid":"..."},{"at":2.0,"do":"click_text","text":"..."}]' \+ browser-harness < .claude/skills/feature-doc/tools/screenrec.py+ ```+ `screenrec.py` runs inside a CDP-based Python harness that exposes the page (`browser-harness` is one such tool; adapt the launcher to Playwright or your own). It writes frames, `<out>.manifest.json` (fps, viewport, per-action events with cursor coordinates and captions) and a quick `<out>.raw.mp4` preview. Step actions are `click_xy|click_testid|click_text|type|key|scroll`, each with `at` (seconds) and an optional `caption`.++ The deliverable is a clean, complete recording of the real workflow: set up, configure, use, get the result. Finish it with `tools/recompose.py`, which places the real viewport in a simple browser window on a gradient background and speeds up long waits instead of cutting them. No captions, no intro or outro cards, no synthetic cursor.+ ```bash+ RC_MANIFEST=<base>.manifest.json RC_OUT=<feature>-walkthrough.mp4 \+ RC_SEGMENTS='[[0,9,1],[9,58,8],[58,70,1]]' # [from_s,to_s,speed]; ramp the waits \+ RC_ADDR="app.example.com" python3 .claude/skills/feature-doc/tools/recompose.py+ ```+ `recompose.py` needs ffmpeg and Pillow. Embed the result with a plain video tag:+ `<video controls preload="metadata" style="width:100%;border-radius:8px;"><source src="..." type="video/mp4" /></video>`.+ - Length follows the task: long enough to teach setup and usage.+ - The usage payoff must work on camera. If the payoff step is broken, do not record a stub. Use screenshots for the working part and hold the video until the full flow works.+ - A clip of a few seconds is worse than a screenshot. Use a screenshot instead.+ - `tools/videokit.py` makes a branded, captioned teaser with intro and outro cards. Use it only for marketing teasers, never for walkthroughs.+- **Optional polish:** an interactive demo (Arcade or similar). Browsers require a trusted user gesture to start such recorders, so `tools/arcade-record.py` drives the flow while you press the start and stop shortcut yourself.+- **Look at every capture.** Open the images and the video, name any UI discrepancy, fix the flow, and re-capture. Never pass on "the element exists".+- If a flow is gated (a broken backend path, an unshipped surface), capture what works, file the blocker in your tracker, and mark the rest pending. Do not fake a working demo.+- Mask any customer data or personal data visible in a capture before it leaves your machine.++### 4. Write (CP-3)+Write the article as markdown (MDX-safe when the docs site is Docusaurus) with both layers:+- **How-to:** overview, why it matters, step-by-step usage.+- **Use-case layer:** at least 3 use cases with sample workflows (each a concrete prompt or step list plus the expected result), prompting techniques where the feature takes input, best practices, limitations.+- Embed the captured media (`` for images, a video tag for the recording). Cross-link to related articles.+- Run the draft through the `no-ai-slop` skill before verification.++### 5. Verify (CP-3v then CP-5)+Spawn a `task-verifier` with only the article path, the evidence directory and the AC-n list. It re-opens the files and media itself and returns one row per AC:+`EVIDENCE AC-n | CP-3v | PASS|FAIL | <one line + path/observation>`.+On `FAIL:fixable`, spawn `fix-agent` (max 2 attempts) with just the failed AC-n, then re-verify. After 2 attempts, escalate with the evidence.++### 6. Report and ship gate (CP-6)+Summarize the article path, the media (with accessible URLs once uploaded), the AC-n PASS table, and open TODOs or gated items. Opening the docs PR waits for the user.++## Post-conditions+- **AC-1** The article exists at the planned path under `DOCS_DIR` with valid frontmatter for your docs site.+- **AC-2** It contains how-to steps and the use-case layer (at least 3 use cases, prompting where relevant, best practices).+- **AC-3** Every UI or behavior claim is grounded in a captured screenshot or an issue body. Unknowns are `TODO`, not invented. Surfaces from OPEN issues are marked gated, not shipped.+- **AC-4** Either (a) a clean, complete walkthrough recording exists (real setup, usage and result, no decoration, valid mp4 by `ffprobe`) and the article embeds it, or (b) screenshots cover the working parts and the article notes the video is pending. A short decorated clip does not satisfy this.+- **AC-5** Evidence that ships is accessible (uploaded to the PR or issue, not a local path).+- **AC-6** A limitations section states any gated, blocked or unshipped parts.++## Rules+- No fabrication. Follow your house writing rules (no em dashes, TL;DR first, scannable).+- Visual verification is mandatory for UI docs: read the pixels, fix what is wrong, re-capture.+- Use relative paths or config values in all output, never machine-specific absolute paths.++## Escape hatches+- **Auth wall:** stop and ask the user to sign in. Never enter credentials.+- **CDP will not connect:** point your harness at the browser's remote-debugging URL (for example `http://localhost:9222`) and reload it. If the browser prompts for permission, the user clicks Allow.+- **Flow gated by a bug:** file it, capture the working portion, mark the rest pending.+- **ffmpeg absent:** the recorder falls back to a GIF preview. Install ffmpeg for the mp4.++## Tools+- `tools/screenrec.py`: flow recorder (CDP frame-grab loop to frames, manifest and raw preview).+- `tools/recompose.py`: walkthrough finisher. Manifest to a clean 1920x1080 h264 mp4 with a browser window, gradient and speed ramps. Options: `RC_FIT=1` fits a phone or tall capture, `RC_CROP=x0,y0,x1,y1` crops the source, `RC_NOBAR=1` drops the browser bar, `RC_SPEED_BADGE=1` labels sped-up segments, `RC_REDACT` pixelates boxes such as a person's name.+- `tools/videokit.py`: branded teaser cut with captions and cards (teaser only).+- `tools/arcade-record.py`: hybrid interactive-demo recorder. Set `APP_URL` and add flows to its `FLOWS` table.diff --git a/.claude/skills/feature-doc/tools/arcade-record.py b/.claude/skills/feature-doc/tools/arcade-record.pynew file mode 100644index 0000000..1122774--- /dev/null+++ b/.claude/skills/feature-doc/tools/arcade-record.py@@ -0,0 +1,165 @@+#!/usr/bin/env python3+"""+Hybrid Arcade recorder for web app flows.++Why hybrid: the Arcade Chrome extension only starts/stops recording on a *trusted*+user gesture (toolbar click or Cmd+E) that automation can't supply. But Arcade+captures the page via a content script, so it DOES capture CDP-driven clicks. This+script drives the whole flow; you supply just two keypresses (Cmd+E to start, Cmd+E+to stop). Run it in your own terminal so its input() pauses catch your timing.++Usage:+ export BU_CDP_URL=http://localhost:9222 # your daily Chrome w/ debugging+ python3 arcade-record.py <flow> # e.g. connect-demo+ python3 arcade-record.py --list++Requires: `browser-harness` on PATH, the target Chrome logged into your app,+and the Arcade extension installed + logged into your Arcade workspace.++Add a new flow: append an entry to FLOWS below. Steps run top-to-bottom with pacing+that reads naturally in the recording. Use `click_text`/`click_testid` (resolved to+coordinates → trusted CDP click) so the flow survives minor layout shifts.+"""+import os, sys, json, subprocess, time++APP_URL = os.environ.get("APP_URL", "https://app.example.com/start") # page the flow starts on+CDP = os.environ.get("BU_CDP_URL", "http://localhost:9222")+ENV = {**os.environ, "BU_CDP_URL": CDP}++# ---- flow library -----------------------------------------------------------+# Each flow: target URL to prep on, and a list of steps.+# step actions: goto | new_chat | click_text | click_testid | click_xy | type |+# key | sleep | shot | note+FLOWS = {+ "connect-demo": {+ "url": APP_URL,+ "title": "Connect apps to the assistant",+ "steps": [+ {"do": "note", "msg": "Chat view: the composer has a Connect apps control"},+ {"do": "click_testid", "testid": "connect-integrations-button", "label": "open Connect apps"},+ {"do": "sleep", "s": 2.0},+ {"do": "note", "msg": "Connectors popover lists the providers"},+ {"do": "click_text", "text": "Google Drive", "label": "focus Google Drive row"},+ {"do": "sleep", "s": 2.0},+ {"do": "note", "msg": "Google Drive connected: toggle on + per-chat control"},+ {"do": "sleep", "s": 1.5},+ {"do": "key", "key": "Escape"},+ {"do": "sleep", "s": 1.0},+ ],+ },+ # template to copy for other features (fill url + steps, then re-run)+ "template": {+ "url": APP_URL,+ "title": "<feature> demo",+ "steps": [+ {"do": "note", "msg": "describe the starting state"},+ {"do": "click_text", "text": "<button label>", "label": "step 1"},+ {"do": "sleep", "s": 2.0},+ ],+ },+}++# ---- browser-harness bridge -------------------------------------------------+def bh(code: str) -> str:+ """Run a python snippet inside browser-harness (persistent daemon) and return stdout."""+ r = subprocess.run(["browser-harness"], input=code, capture_output=True, text=True, env=ENV)+ if r.returncode != 0:+ sys.stderr.write(r.stderr[-800:])+ return r.stdout.strip()++def resolve_tab(url_prefix: str) -> str:+ out = bh(f"""+tabs=list_tabs()+m=[t for t in tabs if (t.get('url') or '').startswith({url_prefix!r})]+print(m[0]['targetId'] if m else 'NONE')+""")+ tid = out.splitlines()[-1].strip() if out else "NONE"+ return tid++def prep(url: str) -> str:+ """Open/activate the flow tab, fresh chat, foreground it for recording."""+ tid = resolve_tab(url)+ if tid == "NONE":+ bh(f"new_window({url!r}); import time; time.sleep(5)")+ tid = resolve_tab(url)+ bh(f"""+import time+switch_tab({tid!r}); time.sleep(1)+cdp("Target.activateTarget", targetId={tid!r})+# start a clean chat if the New chat control exists+js('''(function(){{const b=[...document.querySelectorAll("*")].find(e=>e.children.length===0&&/^New chat$/.test((e.textContent||"").trim()));if(b)b.click();}})()''')+time.sleep(2)+""")+ return tid++def step(tid: str, s: dict):+ """Execute one step. Re-switches to the tab first (daemon can drift)."""+ pre = f'import time, json\nswitch_tab({tid!r})\n'+ do = s["do"]+ if do == "note":+ print(f" • {s['msg']}")+ return+ if do == "sleep":+ bh(pre + f"time.sleep({s['s']})")+ return+ if do == "key":+ bh(pre + f"press_key({s['key']!r}); time.sleep(0.6)")+ elif do == "type":+ bh(pre + f"type_text({s['text']!r}); time.sleep(0.5)")+ elif do == "goto":+ bh(pre + f"goto_url({s['url']!r}); wait_for_load(); time.sleep(2)")+ elif do == "click_xy":+ bh(pre + f"click_at_xy({s['x']},{s['y']}); time.sleep(1)")+ elif do in ("click_text", "click_testid"):+ # resolve center coords via JS, then a TRUSTED coordinate click (Arcade captures it)+ if do == "click_text":+ finder = (f"[...document.querySelectorAll('button,[role=button],a,div,span')]"+ f".filter(e=>e.children.length<=2 && (e.textContent||'').trim()==={s['text']!r})")+ else:+ finder = f"[document.querySelector('[data-testid={s['testid']}]')].filter(Boolean)"+ out = bh(pre + f"""+el=js('''(function(){{const c={finder};if(!c.length)return "NONE";const r=c[0].getBoundingClientRect();return JSON.stringify({{x:Math.round(r.x+r.width/2),y:Math.round(r.y+r.height/2)}});}})()''')+print(el)+""")+ line = out.splitlines()[-1].strip() if out else "NONE"+ if line == "NONE" or not line.startswith("{"):+ print(f" ! could not find target for step: {s.get('label', do)}")+ return+ c = json.loads(line)+ bh(pre + f"click_at_xy({c['x']},{c['y']}); time.sleep(1)")+ if s.get("label"):+ print(f" ✓ {s['label']}")++# ---- main -------------------------------------------------------------------+def main():+ if "--list" in sys.argv:+ print("Flows:", ", ".join(FLOWS)); return+ name = next((a for a in sys.argv[1:] if not a.startswith("-")), None)+ if not name or name not in FLOWS:+ print("Usage: python3 arcade-record.py <flow> (--list to see flows)"); return+ flow = FLOWS[name]++ print(f"\n=== Arcade hybrid recording: {name} ===")+ print(f"Title: {flow['title']}")+ print("Prepping the tab...")+ tid = prep(flow["url"])+ if tid == "NONE":+ print("Could not open the flow tab. Is Chrome running with --remote-debugging-port=9222?"); return++ print("\n>>> In Chrome, on the flow tab, press **Cmd+E** now to START Arcade recording.")+ input(">>> Then press Enter here to begin driving the flow...")++ print("\nDriving the flow (watch the recording):")+ time.sleep(1.0)+ for s in flow["steps"]:+ step(tid, s)++ print("\n>>> Flow done. Press **Cmd+E** in Chrome to STOP recording.")+ input(">>> Then press Enter here...")++ print("\nArcade will open the editor for the new recording.")+ print("Next: title it '%s', tidy steps, Share -> Embed to get the demo.arcade.software URL," % flow["title"])+ print("then paste that URL into the feature package's release-note iframe.")++if __name__ == "__main__":+ main()diff --git a/.claude/skills/feature-doc/tools/recompose.py b/.claude/skills/feature-doc/tools/recompose.pynew file mode 100644index 0000000..012dc1c--- /dev/null+++ b/.claude/skills/feature-doc/tools/recompose.py@@ -0,0 +1,188 @@+#!/usr/bin/env python3+"""+recompose.py: turn a raw screenrec capture into a clean, house-style walkthrough+video, matching the blog house style: the viewport in a simple browser window+(traffic lights + address pill) on a teal->blue gradient, NO text/captions/cards/+synthetic-cursor. Supports variable speed so long waits are sped up (not cut).++Usage (plain python3; needs ffmpeg at /opt/homebrew/bin/ffmpeg):+ RC_MANIFEST=<base>.manifest.json RC_OUT=out.mp4 \+ RC_SEGMENTS='[[0,8,1],[8,58,8],[58,70,1]]' # [from_s,to_s,speed]; gaps=speed 1 \+ RC_ADDR="app.example.com" python3 recompose.py++Segments tile source time; anything not covered plays at 1x. Output is 30fps h264.++Opt-in options for sources that are not desktop-shaped (all off by default, so older runs+render the same):+ RC_FIT=1 fit the card inside the frame with RC_MARGIN px (default 40) on each side,+ instead of a fixed 1680 px width. Needed for phone (portrait) and tall captures.+ RC_CROP=x0,y0,x1,y1 crop every source frame first (source pixels), e.g. a terminal replay's window.+ RC_NOBAR=1 no browser bar: for a capture that already carries its own window chrome.+ RC_SPEED_BADGE=1 show a small "Sped up Nx" pill at the right end of the browser bar while a+ segment plays faster than 1x, so viewers know the wait was shortened.+ RC_REDACT='[[x0,y0,x1,y1],...]' pixelate these boxes (source pixels, before RC_CROP) on every+ frame, e.g. a person's name in a terminal replay.+"""+import os, json, glob, shutil, subprocess+from PIL import Image, ImageDraw, ImageFont, ImageFilter++MAN = json.load(open(os.environ["RC_MANIFEST"]))+OUT = os.environ["RC_OUT"]+ADDR = os.environ.get("RC_ADDR", "app.example.com")+OUTFPS = int(os.environ.get("RC_OUTFPS", "30"))+SEGS = json.loads(os.environ.get("RC_SEGMENTS", "[]")) # [[from,to,speed],...]+CLICKS = os.environ.get("RC_CLICKS", "") not in ("", "0", "false") # opt-in click-pulse highlights+PULSE = float(os.environ.get("RC_PULSE", "0.55")) # seconds a click ring stays visible+W, H = 1920, 1080+TEAL, BLUE = (34, 193, 214), (43, 119, 206) # sampled from blog gradient++def find_ffmpeg():+ for p in (shutil.which("ffmpeg"), "/opt/homebrew/bin/ffmpeg", "/usr/local/bin/ffmpeg"):+ if p and os.path.exists(p): return p+FFMPEG = find_ffmpeg()++def font(sz):+ for p in ("/System/Library/Fonts/Supplemental/Arial.ttf", "/System/Library/Fonts/HelveticaNeue.ttc"):+ try: return ImageFont.truetype(p, sz)+ except Exception: pass+ return ImageFont.load_default()+F_ADDR = font(22)++def gradient_bg():+ bg = Image.new("RGB", (W, H))+ px = bg.load()+ for y in range(H):+ for x in range(0, W):+ t = (x / W + y / H) / 2+ px[x, y] = tuple(int(TEAL[i] + (BLUE[i] - TEAL[i]) * t) for i in range(3))+ return bg+BG = gradient_bg()++frames = sorted(glob.glob(os.path.join(MAN["frames_dir"], "*.jpg")))+CROP = tuple(int(v) for v in os.environ["RC_CROP"].split(",")) if os.environ.get("RC_CROP") else None+NOBAR = os.environ.get("RC_NOBAR", "") not in ("", "0", "false")+FIT = os.environ.get("RC_FIT", "") not in ("", "0", "false")+SPEED_BADGE = os.environ.get("RC_SPEED_BADGE", "") not in ("", "0", "false")+REDACT = [tuple(int(v) for v in b) for b in json.loads(os.environ.get("RC_REDACT", "[]"))]+c0 = Image.open(frames[0]); iw, ih = c0.size+if CROP: iw, ih = CROP[2] - CROP[0], CROP[3] - CROP[1]+CHROME = 0 if NOBAR else 44+CARD_W = 1680+if FIT:+ margin = int(os.environ.get("RC_MARGIN", "40"))+ CARD_W = int(min(W - 2 * margin, (H - 2 * margin - CHROME) * iw / ih))+scale = CARD_W / iw+CARD_H = int(ih * scale)+CX = (W - CARD_W) // 2+CY = (H - (CARD_H + CHROME)) // 2++def rounded(im, rad):+ m = Image.new("L", im.size, 0); ImageDraw.Draw(m).rounded_rectangle([0, 0, im.size[0], im.size[1]], rad, fill=255)+ out = im.convert("RGBA"); out.putalpha(m); return out++# pre-render shadow + chrome bar (static)+SHADOW = Image.new("RGBA", (W, H), (0, 0, 0, 0))+ImageDraw.Draw(SHADOW).rounded_rectangle([CX - 8, CY - 8, CX + CARD_W + 8, CY + CHROME + CARD_H + 8], 20, fill=(0, 0, 0, 120))+SHADOW = SHADOW.filter(ImageFilter.GaussianBlur(26))+BAR_R = None+if not NOBAR:+ BAR = Image.new("RGBA", (CARD_W, CHROME), (246, 247, 249, 255))+ _bd = ImageDraw.Draw(BAR)+ for i, col in enumerate([(255, 95, 86), (255, 189, 46), (39, 201, 63)]):+ _bd.ellipse([16 + i * 22, CHROME // 2 - 6, 28 + i * 22, CHROME // 2 + 6], fill=col)+ _bd.rounded_rectangle([92, 9, CARD_W - 20, CHROME - 9], 8, fill=(255, 255, 255))+ _bd.text((108, CHROME // 2), ADDR, font=F_ADDR, fill=(110, 118, 128), anchor="lm")+ BAR_R = rounded(BAR, 10)++# click events (image-pixel space) mapped onto the card, for opt-in pulse highlights+IMG_W = MAN.get("img_w", iw); IMG_H = MAN.get("img_h", ih)+CLICK_EV = [e for e in MAN.get("events", []) if e.get("do", "").startswith("click") and e.get("x") is not None]++def click_at(st):+ """Return (cx, cy, phase 0..1) for a click ring active at source-time st, else None."""+ for e in CLICK_EV:+ dt = st - e["t"]+ if 0 <= dt <= PULSE:+ cx = CX + e["x"] * (CARD_W / IMG_W)+ cy = CY + CHROME + e["y"] * (CARD_H / IMG_H)+ return cx, cy, dt / PULSE+ return None++F_BADGE = font(17)+_BADGES = {}++def badge(speed):+ """Dark pill with "Sped up Nx", cached per speed."""+ if speed not in _BADGES:+ txt = f"Sped up {speed:g}x"+ tw = int(F_BADGE.getlength(txt))+ b = Image.new("RGBA", (tw + 22, CHROME - 18), (0, 0, 0, 0))+ bd = ImageDraw.Draw(b)+ bd.rounded_rectangle([0, 0, b.width - 1, b.height - 1], b.height // 2, fill=(40, 44, 52, 235))+ bd.text((11, b.height // 2), txt, font=F_BADGE, fill=(255, 255, 255), anchor="lm")+ _BADGES[speed] = b+ return _BADGES[speed]++def pixelate(im, box, block=12):+ reg = im.crop(box)+ small = reg.resize((max(1, reg.width // block), max(1, reg.height // block)), Image.BILINEAR)+ im.paste(small.resize(reg.size, Image.NEAREST), box[:2])++def stage(src_idx, st=None, speed=1.0):+ canvas = BG.convert("RGBA").copy()+ canvas.alpha_composite(SHADOW)+ if not NOBAR:+ canvas.paste(BAR_R, (CX, CY), BAR_R)+ if SPEED_BADGE and speed > 1.05:+ b = badge(speed)+ canvas.alpha_composite(b, (CX + CARD_W - 20 - 5 - b.width, CY + (CHROME - b.height) // 2))+ content = Image.open(frames[src_idx]).convert("RGB")+ for box in REDACT: pixelate(content, box)+ if CROP: content = content.crop(CROP)+ content = content.resize((CARD_W, CARD_H), Image.LANCZOS if FIT else Image.BICUBIC)+ cr = rounded(content, 10)+ canvas.paste(cr, (CX, CY + CHROME), cr)+ if CLICKS and st is not None:+ hit = click_at(st)+ if hit:+ cx, cy, ph = hit+ ov = Image.new("RGBA", (W, H), (0, 0, 0, 0)); od = ImageDraw.Draw(ov)+ # expanding ring (fades out) + steady dot+ r = int(16 + 46 * ph); a = int(200 * (1 - ph))+ od.ellipse([cx - r, cy - r, cx + r, cy + r], outline=(255, 189, 46, a), width=6)+ dot = int(200 * (1 - ph * 0.4))+ od.ellipse([cx - 11, cy - 11, cx + 11, cy + 11], fill=(255, 189, 46, dot))+ canvas.alpha_composite(ov)+ return canvas.convert("RGB")++# ---- build the source-time -> output-frame plan (variable speed) ------------+src_fps = MAN["fps"]; dur = MAN["duration"]+segs = sorted([[float(a), float(b), float(s)] for a, b, s in SEGS], key=lambda x: x[0])+# fill gaps at speed 1+plan = []; cur = 0.0+for a, b, s in segs:+ if a > cur: plan.append([cur, a, 1.0])+ plan.append([a, b, s]); cur = b+if cur < dur: plan.append([cur, dur, 1.0])+if not plan: plan = [[0, dur, 1.0]]++TMP = OUT + ".rc";+if os.path.isdir(TMP): shutil.rmtree(TMP)+os.makedirs(TMP)+oi = 0+for a, b, s in plan:+ n = max(1, round((b - a) / max(s, 0.01) * OUTFPS))+ for i in range(n):+ st = a + (i / n) * (b - a)+ idx = min(len(frames) - 1, max(0, round(st * src_fps)))+ stage(idx, st, s).save(os.path.join(TMP, f"{oi:05d}.jpg"), quality=88); oi += 1+print(f"recomposed {oi} frames @ {OUTFPS}fps ({oi/OUTFPS:.1f}s); plan={[[round(a,1),round(b,1),s] for a,b,s in plan]}")++if not FFMPEG:+ print("no ffmpeg; frames at", TMP); raise SystemExit+r = subprocess.run([FFMPEG, "-y", "-framerate", str(OUTFPS), "-i", os.path.join(TMP, "%05d.jpg"),+ "-c:v", "libx264", "-pix_fmt", "yuv420p", "-movflags", "+faststart", "-crf", "20", OUT],+ capture_output=True, text=True)+if r.returncode != 0: print("ffmpeg failed:", r.stderr[-400:]); raise SystemExit(1)+shutil.rmtree(TMP)+print("RECOMPOSED_OUT:", OUT)diff --git a/.claude/skills/feature-doc/tools/screenrec.py b/.claude/skills/feature-doc/tools/screenrec.pynew file mode 100644index 0000000..6bf0887--- /dev/null+++ b/.claude/skills/feature-doc/tools/screenrec.py@@ -0,0 +1,133 @@+# screenrec.py: autonomous flow screen recorder for browser-harness.+#+# Captures continuous JPEG frames at a target fps while injecting time-scheduled+# actions, and writes a manifest (fps, viewport + image dims, per-action events with+# resolved cursor coords + captions) so videokit.py can add a synthetic cursor,+# captions, and polish. Assembles a raw mp4/GIF too (quick preview). No Arcade, no+# user gesture.+#+# Run THROUGH browser-harness (helpers in scope):+# SR_OUT=/path/out SR_URL=https://... SR_STEPS='[...]' browser-harness < screenrec.py+#+# Env:+# SR_OUT output base (no ext). Writes <OUT>.frames/*.jpg, <OUT>.manifest.json,+# and a quick <OUT>.raw.mp4|gif preview.+# SR_URL target URL (reuse+activate matching tab, else open background window).+# SR_STEPS JSON list of actions, each {"at":sec,"do":...,"caption":"..."}:+# click_xy{x,y} | click_testid{testid} | click_text{text} | type{text}+# | key{key} | scroll{dx,dy}+# SR_FPS target fps (default 8). SR_DURATION seconds (default last at +2.5, min 4).+# SR_MAXDIM max frame dim px (default 1600).+import os, json, time, base64, glob, subprocess, shutil++OUT = os.environ["SR_OUT"]+URL = os.environ.get("SR_URL", "")+STEPS = json.loads(os.environ.get("SR_STEPS", "[]"))+FPS = float(os.environ.get("SR_FPS", "8"))+MAXD = int(os.environ.get("SR_MAXDIM", "1600"))+DUR = float(os.environ.get("SR_DURATION", "0")) or (max((s["at"] for s in STEPS), default=2) + 2.5)+DUR = max(DUR, 4.0)++FRAMES = OUT + ".frames"+if os.path.isdir(FRAMES): shutil.rmtree(FRAMES)+os.makedirs(FRAMES, exist_ok=True)++def tabs(): return cdp("Target.getTargets")["targetInfos"] # noqa: F821+tid = None+if URL:+ m = [t for t in tabs() if (t.get("url") or "").startswith(URL) and t["type"] == "page"]+ if not m:+ new_window(URL); wait_for_load(); time.sleep(3) # noqa: F821+ m = [t for t in tabs() if (t.get("url") or "").startswith(URL) and t["type"] == "page"]+ tid = m[0]["targetId"] if m else None+if tid:+ switch_tab(tid); cdp("Target.activateTarget", targetId=tid); time.sleep(1) # noqa: F821++css = js("JSON.stringify({w:window.innerWidth,h:window.innerHeight})") # noqa: F821+css = json.loads(css) if css else {"w": 1512, "h": 800}++def rect_of(finder_js):+ v = js(f"""(function(){{const c={finder_js};if(!c.length)return null;const r=c[0].getBoundingClientRect();return JSON.stringify({{x:Math.round(r.x+r.width/2),y:Math.round(r.y+r.height/2)}});}})()""") # noqa: F821+ try: return json.loads(v) if v and v.startswith("{") else None+ except Exception: return None++EVENTS = [] # {t, x, y, caption, do}+def act(s, t):+ if tid: switch_tab(tid) # noqa: F821+ do = s["do"]; x = y = None+ try:+ if do == "click_xy":+ x, y = s["x"], s["y"]; click_at_xy(x, y) # noqa: F821+ elif do == "click_testid":+ r = rect_of(f"[document.querySelector('[data-testid={s['testid']}]')].filter(Boolean)")+ if r: x, y = r["x"], r["y"]; click_at_xy(x, y) # noqa: F821+ elif do == "click_text":+ r = rect_of(f"[...document.querySelectorAll('button,[role=button],a,div,span')].filter(e=>e.children.length<=2&&(e.textContent||'').trim()==={s['text']!r})")+ if r: x, y = r["x"], r["y"]; click_at_xy(x, y) # noqa: F821+ elif do == "type":+ type_text(s["text"]) # noqa: F821+ elif do == "key":+ press_key(s["key"]) # noqa: F821+ elif do == "scroll":+ scroll(s.get("x", 600), s.get("y", 400), s.get("dx", 0), s.get("dy", 400)) # noqa: F821+ except Exception as e:+ print(f" action {do} @{s['at']}s failed: {e}")+ EVENTS.append({"t": round(t, 3), "x": x, "y": y, "caption": s.get("caption", ""), "do": do})++def grab(i):+ r = cdp("Page.captureScreenshot", format="jpeg", quality=70) # noqa: F821+ p = os.path.join(FRAMES, f"{i:05d}.jpg")+ open(p, "wb").write(base64.b64decode(r["data"]))+ return p++print(f"recording ~{DUR:.0f}s @ {FPS}fps -> {OUT}")+interval = 1.0 / max(FPS, 1)+t0 = time.time(); i = 0; fired = set()+while True:+ t = time.time() - t0+ if t >= DUR: break+ for si, s in enumerate(STEPS):+ if si not in fired and t >= s["at"]:+ act(s, t); fired.add(si)+ grab(i); i += 1+ dt = interval - ((time.time() - t0) - t)+ if dt > 0: time.sleep(dt)+n = i; real_fps = n / DUR if DUR else FPS+frames = sorted(glob.glob(os.path.join(FRAMES, "*.jpg")))++img_w = img_h = 0+try:+ from PIL import Image+ im = Image.open(frames[0]); img_w, img_h = im.size+except Exception:+ pass++manifest = {"fps": round(real_fps, 3), "frame_count": n, "duration": round(DUR, 3),+ "css_w": css["w"], "css_h": css["h"], "img_w": img_w, "img_h": img_h,+ "events": EVENTS, "frames_dir": FRAMES}+open(OUT + ".manifest.json", "w").write(json.dumps(manifest, indent=2))+print(f"captured {n} frames (~{real_fps:.1f} fps), img {img_w}x{img_h}, css {css['w']}x{css['h']}")++def _ffmpeg():+ for p in (shutil.which("ffmpeg"), "/opt/homebrew/bin/ffmpeg", "/usr/local/bin/ffmpeg"):+ if p and os.path.exists(p): return p+ return None+FFMPEG = _ffmpeg()+prev = None+if len(frames) >= 2 and FFMPEG:+ prev = OUT + ".raw.mp4"+ r = subprocess.run([FFMPEG, "-y", "-framerate", f"{real_fps:.2f}", "-pattern_type", "glob",+ "-i", os.path.join(FRAMES, "*.jpg"), "-c:v", "libx264", "-pix_fmt", "yuv420p",+ "-vf", "scale=trunc(iw/2)*2:trunc(ih/2)*2", prev], capture_output=True, text=True)+ if r.returncode != 0: prev = None+if prev is None and len(frames) >= 2:+ try:+ from PIL import Image+ prev = OUT + ".raw.gif"+ imgs = [Image.open(p).convert("RGB") for p in frames]+ for im in imgs:+ if max(im.size) > MAXD: im.thumbnail((MAXD, MAXD))+ imgs[0].save(prev, save_all=True, append_images=imgs[1:], duration=int(1000/max(real_fps,1)), loop=0, optimize=True)+ except Exception: prev = FRAMES+print("MANIFEST:", OUT + ".manifest.json")+print("RAW_PREVIEW:", prev)diff --git a/.claude/skills/feature-doc/tools/videokit.py b/.claude/skills/feature-doc/tools/videokit.pynew file mode 100644index 0000000..6db640f--- /dev/null+++ b/.claude/skills/feature-doc/tools/videokit.py@@ -0,0 +1,225 @@+#!/usr/bin/env python3+"""+videokit.py: edit a screenrec capture into a polished, public-ready video.++Reads a screenrec manifest (frames + per-action events with cursor coords/captions)+and composites, at OUTFPS, onto a branded 1920x1080 stage:+ - branded gradient background+ - the captured content in a rounded "browser card" with a fake chrome bar+ - a synthetic animated cursor that glides (ease-in-out) to each click, with a+ click-pulse ring at the action moment+ - caption lower-thirds per action (fade in/out)+ - intro + outro title cards, with short crossfades and fade in/out+Encodes to mp4 (h264, yuv420p) via ffmpeg.++Usage (plain python3, no browser needed):+ VK_MANIFEST=/path/out.manifest.json VK_OUT=/path/demo.mp4 \+ VK_TITLE="Connect your apps" VK_SUBTITLE="Bring your tools into the assistant" \+ VK_OUTRO_TITLE="Try it today" VK_LOGO="YourProduct" \+ python3 videokit.py+"""+import os, json, glob, math, shutil, subprocess+from PIL import Image, ImageDraw, ImageFont, ImageFilter++def find_ffmpeg():+ for p in (shutil.which("ffmpeg"), "/opt/homebrew/bin/ffmpeg", "/usr/local/bin/ffmpeg"):+ if p and os.path.exists(p): return p+ return None+FFMPEG = find_ffmpeg()++MAN = json.load(open(os.environ["VK_MANIFEST"]))+OUT = os.environ["VK_OUT"]+TITLE = os.environ.get("VK_TITLE", "Feature demo")+SUB = os.environ.get("VK_SUBTITLE", "")+OTITLE= os.environ.get("VK_OUTRO_TITLE", TITLE)+OSUB = os.environ.get("VK_OUTRO_SUB", "")+LOGO = os.environ.get("VK_LOGO", "YourProduct")+BRAND = os.environ.get("VK_BRAND", "#3b6fd4")+OUTFPS= int(os.environ.get("VK_OUTFPS", "24"))+W, H = 1920, 1080++def hex2rgb(h): h = h.lstrip("#"); return tuple(int(h[i:i+2], 16) for i in (0, 2, 4))+BR = hex2rgb(BRAND)+def mix(a, b, t): return tuple(int(a[i] + (b[i] - a[i]) * t) for i in range(3))+INK = (17, 22, 28); BG0 = (11, 15, 19); BG1 = mix(BG0, BR, 0.28)++def font(sz, bold=True):+ cands = (["/System/Library/Fonts/Supplemental/Arial Bold.ttf",+ "/System/Library/Fonts/HelveticaNeue.ttc",+ "/Library/Fonts/Arial Bold.ttf"] if bold else+ ["/System/Library/Fonts/Supplemental/Arial.ttf",+ "/System/Library/Fonts/HelveticaNeue.ttc"])+ for p in cands:+ try: return ImageFont.truetype(p, sz)+ except Exception: continue+ return ImageFont.load_default()++F_TITLE, F_SUB, F_CAP, F_LOGO = font(78), font(36, False), font(34), font(28)++def gradient_bg():+ bg = Image.new("RGB", (W, H), BG0)+ top = Image.new("RGB", (W, H))+ px = top.load()+ for y in range(H):+ c = mix(BG1, BG0, y / H)+ for x in range(0, W, 1): px[x, y] = c+ # radial brand glow top-left+ glow = Image.new("L", (W, H), 0); gd = ImageDraw.Draw(glow)+ gd.ellipse([-400, -500, 900, 700], fill=90)+ glow = glow.filter(ImageFilter.GaussianBlur(180))+ brand_layer = Image.new("RGB", (W, H), BR)+ return Image.composite(brand_layer, top, glow)++BG = gradient_bg()++def rounded(im, rad):+ m = Image.new("L", im.size, 0); ImageDraw.Draw(m).rounded_rectangle([0, 0, im.size[0], im.size[1]], rad, fill=255)+ out = im.convert("RGBA"); out.putalpha(m); return out++def center_text(d, cx, y, text, f, fill, anchor="mm"):+ d.text((cx, y), text, font=f, fill=fill, anchor=anchor)++# ---- content card geometry --------------------------------------------------+frames = sorted(glob.glob(os.path.join(MAN["frames_dir"], "*.jpg")))+c0 = Image.open(frames[0]); iw, ih = c0.size+CARD_W = 1580+CHROME = 46+scale = CARD_W / iw+CARD_H = int(ih * scale)+CX = (W - CARD_W) // 2+CY = 150+dpr = MAN["img_w"] / max(MAN["css_w"], 1) # device px per css px++def content_to_stage(cx_css, cy_css):+ ix, iy = cx_css * dpr, cy_css * dpr # css -> image px+ return CX + ix * scale, CY + CHROME + iy * scale++# precompute cursor keyframes from events that have coords+kf = [(e["t"], *content_to_stage(e["x"], e["y"])) for e in MAN["events"] if e.get("x") is not None]+def ease(t): return t * t * (3 - 2 * t)+def cursor_at(tf):+ if not kf: return None+ if tf <= kf[0][0]: return kf[0][1], kf[0][2]+ for i in range(len(kf) - 1):+ t0, x0, y0 = kf[i]; t1, x1, y1 = kf[i + 1]+ if t0 <= tf <= t1:+ a = ease((tf - t0) / max(t1 - t0, 1e-3))+ return x0 + (x1 - x0) * a, y0 + (y1 - y0) * a+ return kf[-1][1], kf[-1][2]++def draw_cursor(layer, x, y):+ d = ImageDraw.Draw(layer)+ p = [(x, y), (x, y + 34), (x + 9, y + 25), (x + 15, y + 38), (x + 21, y + 35), (x + 15, y + 22), (x + 26, y + 22)]+ d.polygon(p, fill=(255, 255, 255), outline=(20, 20, 20))+def draw_pulse(layer, x, y, prog): # prog 0..1+ d = ImageDraw.Draw(layer); r = int(12 + prog * 42); a = int(180 * (1 - prog))+ d.ellipse([x - r, y - r, x + r, y + r], outline=BR + (a,), width=5)++def draw_chrome(canvas):+ d = ImageDraw.Draw(canvas)+ bar = Image.new("RGBA", (CARD_W, CHROME), (245, 246, 248, 255))+ bd = ImageDraw.Draw(bar)+ for i, col in enumerate([(255, 95, 86), (255, 189, 46), (39, 201, 63)]):+ bd.ellipse([16 + i * 22, CHROME // 2 - 6, 28 + i * 22, CHROME // 2 + 6], fill=col)+ bd.rounded_rectangle([90, 10, CARD_W - 20, CHROME - 10], 9, fill=(255, 255, 255))+ bd.text((104, CHROME // 2), "app.example.com", font=F_LOGO, fill=(120, 128, 138), anchor="lm")+ canvas.paste(rounded(bar, 12), (CX, CY), rounded(bar, 12))++def caption_for(tf):+ for e in MAN["events"]:+ if e.get("caption") and e["t"] <= tf <= e["t"] + 2.6:+ k = min(1.0, (tf - e["t"]) / 0.3, (e["t"] + 2.6 - tf) / 0.3)+ return e["caption"], max(0.0, k)+ return None, 0++def draw_caption(canvas, text, alpha):+ tmp = Image.new("RGBA", (W, H), (0, 0, 0, 0)); d = ImageDraw.Draw(tmp)+ bb = d.textbbox((0, 0), text, font=F_CAP); tw = bb[2] - bb[0]+ pw, ph = tw + 64, 74; x0 = (W - pw) // 2; y0 = 980+ d.rounded_rectangle([x0, y0, x0 + pw, y0 + ph], 20, fill=(12, 16, 20, 235))+ d.rounded_rectangle([x0, y0, x0 + 6, y0 + ph], 20, fill=BR + (255,))+ d.text((W // 2, y0 + ph // 2), text, font=F_CAP, fill=(255, 255, 255, 255), anchor="mm")+ if alpha < 1: tmp.putalpha(tmp.getchannel("A").point(lambda a: int(a * alpha)))+ canvas.alpha_composite(tmp)++# ---- frame renderers --------------------------------------------------------+def card_frame(tf):+ canvas = BG.convert("RGBA").copy()+ idx = min(len(frames) - 1, int(tf * MAN["fps"]))+ content = Image.open(frames[idx]).convert("RGB").resize((CARD_W, CARD_H))+ # shadow+ sh = Image.new("RGBA", (W, H), (0, 0, 0, 0))+ ImageDraw.Draw(sh).rounded_rectangle([CX - 6, CY - 6, CX + CARD_W + 6, CY + CHROME + CARD_H + 6], 22, fill=(0, 0, 0, 150))+ canvas.alpha_composite(sh.filter(ImageFilter.GaussianBlur(24)))+ draw_chrome(canvas)+ canvas.paste(rounded(content, 12), (CX, CY + CHROME), rounded(content, 12))+ center_text(ImageDraw.Draw(canvas), W // 2, 74, TITLE, font(46), (255, 255, 255, 255))+ # cursor + pulse+ cur = cursor_at(tf)+ if cur:+ lay = Image.new("RGBA", (W, H), (0, 0, 0, 0))+ for e in MAN["events"]:+ if e.get("x") is not None and 0 <= tf - e["t"] <= 0.45:+ sx, sy = content_to_stage(e["x"], e["y"]); draw_pulse(lay, sx, sy, (tf - e["t"]) / 0.45)+ draw_cursor(lay, cur[0], cur[1]); canvas.alpha_composite(lay)+ cap, al = caption_for(tf)+ if cap: draw_caption(canvas, cap, al)+ d = ImageDraw.Draw(canvas); center_text(d, W - 130, H - 40, LOGO, F_LOGO, (255, 255, 255, 180))+ return canvas.convert("RGB")++def title_card(title, sub, badge="DEMO"):+ canvas = BG.convert("RGBA").copy(); d = ImageDraw.Draw(canvas)+ d.rounded_rectangle([W // 2 - 70, 372, W // 2 + 70, 420], 24, fill=BR + (255,))+ center_text(d, W // 2, 396, badge, F_LOGO, (255, 255, 255, 255))+ center_text(d, W // 2, 500, title, F_TITLE, (255, 255, 255, 255))+ if sub: center_text(d, W // 2, 585, sub, F_SUB, (200, 210, 218, 255))+ center_text(d, W // 2, H - 70, LOGO, F_LOGO, (255, 255, 255, 190))+ return canvas.convert("RGB")++# ---- assemble output frames -------------------------------------------------+TMP = OUT + ".render"+if os.path.isdir(TMP): shutil.rmtree(TMP)+os.makedirs(TMP)+seq = []+INTRO, OUTRO = 1.7, 1.9+flow_dur = MAN["duration"]+def hold(img, secs):+ return [img] * max(1, int(secs * OUTFPS))+# intro (with text fade-in), flow, outro+intro_frames = []+ni = int(INTRO * OUTFPS)+base_intro = title_card(TITLE, SUB, "DEMO")+for i in range(ni):+ a = min(1.0, i / (0.4 * OUTFPS))+ fr = Image.blend(BG.convert("RGB"), base_intro, a) if a < 1 else base_intro+ intro_frames.append(fr)+flow_frames = [card_frame(i / OUTFPS) for i in range(int(flow_dur * OUTFPS))]+outro_frames = hold(title_card(OTITLE, OSUB, "TRY IT"), OUTRO)++def crossfade(a, b, n):+ n = min(n, len(a), len(b))+ if n <= 0: return a + b+ mid = [Image.blend(a[-n + i], b[i], (i + 1) / (n + 1)) for i in range(n)]+ return a[:-n] + mid + b[n:]++seq = crossfade(intro_frames, flow_frames, int(0.3 * OUTFPS))+seq = crossfade(seq, outro_frames, int(0.3 * OUTFPS))+# fade in/out to black+fn = int(0.3 * OUTFPS)+for i in range(fn):+ seq[i] = Image.blend(Image.new("RGB", (W, H), (0, 0, 0)), seq[i], (i + 1) / fn)+ seq[-1 - i] = Image.blend(Image.new("RGB", (W, H), (0, 0, 0)), seq[-1 - i], (i + 1) / fn)++for i, fr in enumerate(seq):+ fr.save(os.path.join(TMP, f"{i:05d}.jpg"), quality=90)+print(f"rendered {len(seq)} output frames @ {OUTFPS}fps ({len(seq)/OUTFPS:.1f}s)")++if not FFMPEG:+ print("ffmpeg missing: frames at", TMP, "(run: brew install ffmpeg)"); raise SystemExit+r = subprocess.run([FFMPEG, "-y", "-framerate", str(OUTFPS), "-i", os.path.join(TMP, "%05d.jpg"),+ "-c:v", "libx264", "-pix_fmt", "yuv420p", "-movflags", "+faststart",+ "-crf", "20", OUT], capture_output=True, text=True)+if r.returncode != 0:+ print("ffmpeg failed:", r.stderr[-500:]); raise SystemExit(1)+shutil.rmtree(TMP)+print("POLISHED_OUT:", OUT)diff --git a/.claude/skills/no-ai-slop/SKILL.md b/.claude/skills/no-ai-slop/SKILL.mdindex 9ed1bea..8457075 100644--- a/.claude/skills/no-ai-slop/SKILL.md+++ b/.claude/skills/no-ai-slop/SKILL.md@@ -30,7 +30,7 @@ If the goal is unclear, ask what the reader should think, feel, or do after read- **Keep the user's meaning.** Don't invent claims, examples, stats, or opinions. If something is unclear, ask.- **Open it up, don't dumb it down.** Keep the substance, nuance, and precision. Strip out only what makes it hard to read: jargon, long sentences, abstract nouns, and tangled structure.- **Use active voice.** "The team shipped it Tuesday" beats "the decision emerged." Never let inanimate things do human verbs.-- **Make every sentence earn its place.** Cut empty qualifiers and throat-clearing. Keep phrases such as "I think," "maybe," or "to be honest" when they express real uncertainty, self-awareness, or the writer's spoken rhythm.+- **Make every sentence earn its place.** Cut empty qualifiers and throat-clearing. Keep phrases such as "I think" or "maybe" when they express real uncertainty, self-awareness, or the writer's spoken rhythm. Honesty framing is the exception: cut it (see Patterns to cut).- **Untangle sentences without flattening the cadence.** Split sentences and paragraphs when they are genuinely hard to follow. Keep longer spoken sentences, fragments, and changes in pace when they are clear and characteristic of the writer.- **Be concrete and specific.** Abstraction is where writing goes to die. "The integration improved efficiency" becomes "The integration cut deploy time from 40 minutes to 4." Names, numbers, dates, mechanisms, and examples beat abstractions.- **Protect the specific fact.** Don't smooth a useful detail into generic importance. "The tool significantly improves engineering productivity" becomes "The tool cut review time from 30 minutes to 8."@@ -81,7 +81,9 @@ Often-empty phrases: it's worth noting, it's important to note, at the end of th**Binary contrasts.** "This is not X. It's Y." / "The question isn't X, it's Y." / "It's not just X but Y." State Y directly. "The question isn't the model. It's the eval." becomes "The eval matters more than the model."-**Throat-clearing openers.** "Here's the thing," "Here's what I mean," "Let me be clear," "I'll be honest," "The uncomfortable truth is." Cut them and state the point.+**Throat-clearing openers.** "Here's the thing," "Here's what I mean," "Let me be clear," "The uncomfortable truth is." Cut them and state the point.++**Honesty framing.** "The honest part:", "The honest reason is," "the honest truth," "if I'm being honest," "I'll be honest," "to be honest," "honestly." Never use these in anything outward-facing. Announcing candour implies the rest of the piece was managed, and the sentence reads the same without it. Say the thing plainly: "The honest part: I did not get to delete anything" becomes "I did not get to delete anything."**Faux-insight setups.** "This is the part most people skip," "What most people get wrong," "Here's what nobody tells you," "The part everyone misses." These flatter the writer as the lone expert. Cut the setup and make the claim stand on its own. "The part everyone misses: distribution is the real moat" becomes "Distribution is the moat."@@ -111,7 +113,7 @@ Often-empty phrases: it's worth noting, it's important to note, at the end of th**Formatting slop.** Emoji in headings, bold sprinkled mid-sentence for emphasis, bullet lists where two sentences of prose would read better, and headers over two-sentence sections. Format should follow the content, not decorate it.-**Em dashes.** Do not use them as a default rhythm crutch. In short copy, use none. In longer drafts, 1-2 are fine if they clearly beat commas, periods, or parentheses. Remove clusters and decorative dashes.+**Em dashes.** None, in any length (house rule). When editing a human draft that has them, replace each with a period, comma, or colon, and do not swap in a semicolon or parenthesis by reflex (see Model-era tells).## Scope: every medium, not only prosediff --git a/.claude/skills/no-ai-slop/SOURCE.md b/.claude/skills/no-ai-slop/SOURCE.mdindex 141ca85..f826387 100644--- a/.claude/skills/no-ai-slop/SOURCE.md+++ b/.claude/skills/no-ai-slop/SOURCE.md@@ -10,3 +10,5 @@ restraint. It is stricter than Tom on binary contrasts / colon reveals (Tom usesthem sparingly for genuine reframes — the skill itself allows this as voice) andon em dashes (Tom uses them freely; this vault's house rule bans them entirely, whichwins). Use as the final editing pass for blog posts and social copy.++Local modifications: house em-dash ban, honesty-framing rule, voice-mode and reader-cited tells, structural slop, and measured model-era output tells.diff --git a/.claude/skills/no-ai-slop/eval.md b/.claude/skills/no-ai-slop/eval.mdindex 4bcc7f7..c9e5efc 100644--- a/.claude/skills/no-ai-slop/eval.md+++ b/.claude/skills/no-ai-slop/eval.md@@ -30,7 +30,7 @@ For detect requests, make sure the response names each pattern found with a quot5. Are summary-recap endings cut so the piece ends on a concrete point, takeaway, or next action?6. Is formatting slop removed: Emoji headings, decorative bold, bullets that should be prose, headers over tiny sections?7. Are colons sentence case unless grammar, a proper noun, a title, or code requires otherwise?-8. Are em dashes used sparingly: Usually none in short copy, and only 1-2 in longer drafts when they clearly help?+8. Are there zero em dashes, with none replaced by a reflexive semicolon or parenthesis?9. For model output: is there at most one parenthetical per paragraph, no semicolon-chained clauses, and prose where bullets were carrying a line of reasoning?diff --git a/.claude/skills/product-ui-taste/SKILL.md b/.claude/skills/product-ui-taste/SKILL.mdindex 6e8064d..a6fb130 100644--- a/.claude/skills/product-ui-taste/SKILL.md+++ b/.claude/skills/product-ui-taste/SKILL.md@@ -405,6 +405,10 @@ When the Product Read matches one of these, scaffold the whole skeleton, not a f- **Dashboard/overview**: KPI tile row (Cards) + widget grid + one or two drill-in Tables (rows).- **Admin console with bulk actions**: table + selection persistence + bulk action bar (capped at 5 + overflow) + confirmation dialogs.+**Semantic zoom for hierarchical overviews** (portfolio, roadmap, org chart): zooming into a box swaps in a richer representation, while the breadcrumb, minimap and stats panel re-scope to the focus. Levels, inputs, a11y and a DOM recipe: `references/semantic-zoom.md`.++**House UI rules** (two layers, plain user words, no disabled controls, no `…` menus, no wrapped controls, no ellipsis, lists without stripes, status icons with labels, three-part errors, external objects rendered natively): `references/house-ui-rules.md`. Load it for any product UI under review; where it conflicts with a recipe above, it wins.+Full component implementations live in the host system, not duplicated here: reach them via your host system's template/skeleton command or its docs (`references/canonical-sources.md`). Three high-value skeletons are worked in `references/block-skeletons.md` because they encode the contracts most often gotten wrong; treat them as the canonical shape, adapt to the host system.---@@ -422,7 +426,51 @@ Token-driven, one theme locked per app (same discipline as taste-skill Section 8----## 15. PRODUCT-UI AI TELLS (Forbidden Patterns)+## 15. INVISIBLE DETAILS (Micro-Craft Floor)++The compound rule: **no single one of these ruins a surface, and all of them together are the whole difference between polished and sloppy.** Users rarely name the specific miss - they register "if this got missed, others probably did too." Everything here is cheap to fix and expensive to notice late, so treat the list as a floor, not a stretch goal. [invisible-details craft notes]++### 15.A Geometry and optical correction+- **Nested border radius formula**: `inner radius = outer radius - gap`. When the gap is **>=** the outer radius, the inner element needs no rounding at all. Identical inner and outer radii always read as too round.+- **Optical over mathematical alignment**: mathematically equal padding can look wrong. Glyphs with directional mass need nudging - a play triangle shifts right of true center, a checkmark shifts down. Trust the eye over the number; centre the *visual* mass, not the bounding box.+- **Icon-to-text alignment**: wrap the icon in a `height: 1lh` box and align it to the top of the line box, rather than vertically centering it against a multi-line text block. Centering breaks the moment the label wraps to two lines.+- **Vertical rhythm**: every sidebar icon, control, and row affordance sits on a consistent baseline. A single item off by 1-2px is the classic "something's off" signal.+- **Submenu alignment**: a dropdown's first item aligns exactly with its trigger's height, so opening the menu does not visually shift the anchor.++### 15.B Typography and text flow+- **`text-wrap: pretty`** on body copy to kill orphaned last words; **`text-wrap: balance`** on headings and short labels to even out line lengths. For paragraphs, a `max-width` in `ch` usually beats `balance`, which can produce a ragged block.+- **Truncation strategy is per content type** (extends Section 5): wrap for prose, **end**-truncate labels, **middle**-truncate filenames, paths, and URLs where the tail carries the distinguishing information (`report-final-v3....xlsx` is useless; `report-fi...v3.xlsx` is not).+- **Glued terms never break across lines.** Use a non-breaking space between a value and its unit (`20 ms`, `4 GB`), inside keyboard shortcuts (`Cmd + K`), and in compound product nouns. A value stranded on one line with its unit on the next is a Tell.++### 15.C Numbers (extends Section 5.F)+- **Show only meaningful digits, and let consequence decide how many.** `52.4%` is right for a dashboard; `10.30` is required for billing, because `10.3` reads as a different amount of money. Pick precision from CONSEQUENCE, then hold it consistently down the column.++### 15.D Hit targets (extends Section 10.E)+- **Expand the target, not the visual.** A 20x20px control can carry a ~26x36px hit area via a pseudo-element with negative `inset` - the pixels stay small, the tappable region does not.+- **Growth stops at the gap.** Expand freely on the axis with no competing targets; on the axis where siblings sit, stop the expansion at the gap so two targets never claim overlapping space.+- **Keep 4-8px of gap between adjacent clickable elements.** Zero-gap neighbours produce misclicks even at a compliant target size.+- **The label and the gap are part of the control**: a checkbox's descriptive text and the space between box and text are both tappable, never just the 16px box.++### 15.E Invisible defaults (cheap, always on)+- `user-select: none` on decorative graphics, icons, and chrome so drag-select does not produce a mess of highlighted furniture. Never on real content the user might copy.+- **Correct `type=` on every input** so mobile gets the right keyboard: `type="tel"`, `type="email"`, `type="url"`, `inputmode="numeric"`.+- **iOS inputs need `font-size >= 16px`** or Safari zooms the viewport on focus. This is a layout bug that only appears on a real device.+- **`playsinline` on every `<video>`**, or Safari hijacks it into fullscreen on play.++### 15.F Communicate overflow (extends Section 5)+- **Cut the last visible item.** A partially visible row or card is the strongest signal that a region scrolls. A container that ends flush on a clean boundary reads as complete.+- **Match `overscroll-behavior` / overscroll background to the page background** so rubber-band scrolling never reveals a foreign colour.+- **Edge fade gradients** on horizontal scrollers where the scrollbar is hidden - the gradient is the only remaining affordance.++### 15.G Motion suppression (extends Section 13)+- **`prefers-reduced-motion` disables all of it**: slides, label crossfades, colour transitions, hover effects. Content still changes instantly; nothing becomes unreachable.+- **Suppress animation when state changes faster than the animation.** If a user drives a stepper, tab set, or filter faster than ~120ms per change, transitions stack and stutter. Detect the rapid-change case and switch to instant swaps - a stuttering animation is worse than none.+- **Direction encodes depth.** In any sequential flow, forward and backward move on opposite vectors (content and title slide up going forward, down going back). That single consistency answers "where am I going" without a tooltip. Tooltips are a mouse-only crutch; prefer motion, `aria-current`, and labels.++---+++## 16. PRODUCT-UI AI TELLS (Forbidden Patterns)Distinct from taste-skill's landing-page tells. These are the signatures of a model faking a product screen. Hard bans unless the brief genuinely demands one.@@ -440,18 +488,24 @@ Distinct from taste-skill's landing-page tells. These are the signatures of a mo- **Fixed-width badges/labels/tabs** that clip under German/Finnish expansion. (Sections 4, 10.B)- **Native `disabled` on menu/tab items** that should stay keyboard-reachable (use `aria-disabled`). (Section 9.C)- **Badge as decoration** and **status dots spammed on every row** (status only, sparingly).+- **Identical inner and outer border radius** on a nested element (always reads too round). (Section 15.A)+- **A value split from its unit** across a line break, or a shortcut broken mid-chord. (Section 15.B)+- **A 20px icon button with a 20px hit area**, or two clickable elements flush against each other. (Section 15.D)+- **Tooltip carrying information a keyboard or touch user needs** (mouse-only crutch). (Section 15.G)+- **A scrollable region that ends flush** with no cut item, fade, or affordance. (Section 15.F)+- **Stuttering stacked transitions** under rapid clicking (no fast-change suppression). (Section 15.G)- **Motion for show** in a work tool (decorative scroll/hover animation). (Section 13)- **Fake step labels** ("Stage 1 / Stage 2"), fake precise numbers, "Jane Doe"/"Acme" placeholder data in a shipped screen.- **Em-dash (`—`) anywhere visible.** Banned in headers, cells, labels, empty/error copy, tooltips, and as the "not set" cell placeholder. Use a hyphen (`-`). This is the single most-violated Tell; zero tolerance. (taste-skill Section 9.G, house rule)----## 16. REFERENCE VOCABULARY (Names the Agent Should Know)+## 17. REFERENCE VOCABULARY (Names the Agent Should Know)App shell / PageLayout (Header / Content / Pane / Sidebar / Footer) · canonical layouts (list-detail / supporting-pane / feed) · master-detail + inspector · IndexTable / Resource List / DataGrid / Table · frozen (pinned) columns · virtualization · roving tabindex · stacking context · container query · skeleton screen (shape-mirroring) · Blankslate / EmptyState / ErrorState · Overflow / priority-plus · applied-filter chips / faceted search · alertdialog · optimistic vs. pessimistic update · density mode · pseudo-localization · command palette · workspace switcher · job/status tray.----## 17. REDESIGN PROTOCOL (Auditing an Existing Dense Screen)+## 18. REDESIGN PROTOCOL (Auditing an Existing Dense Screen)Before touching visual style, audit for the correctness bugs that matter more than aesthetics:1. **Scroll ownership** violations (page scrolls sideways; nested double-scroll).2. **Truncation on primary content**; hover-only fallbacks.@@ -460,18 +514,52 @@ Before touching visual style, audit for the correctness bugs that matter more th5. **z-index ad-hockery**; layering bugs from nested stacking contexts.6. **No i18n buffer**; fixed-width text containers.7. **Keyboard/a11y gaps**: no roving tabindex, bare `:focus`, icon buttons without labels, disabled submit as only signal.+8. **Micro-craft floor** (Section 15): nested radii, optical alignment, glued units, hit-target expansion, invisible defaults, overflow signalling.Fix these first. Only then apply the density/token/visual polish. Preserve the host design system; do not swap Carbon for shadcn as a "redesign."+### 18.A The hesitation test (how to find problems, not just fix them)+**The hard part is noticing, not fixing.** Most of these cost minutes to repair once seen, so spend the effort on perception. Drive the surface yourself and treat every pause as a defect report. Four tells, each with a fixed diagnosis: [invisible-details craft notes]++| Observed | What it means |+|---|---|+| **Second click** on the same button | No loading state or no feedback - the user believes the first click missed |+| **Cursor drift** (moves without landing) | Hit target too small, or the option is not recognizable as the one they want |+| **Reflexive undo** (Cmd+Z right after acting) | The action gave no confirmation of what it actually did |+| **Re-reading a label** | The wording is wrong, not the layout |++Study interfaces you admire the same way - slowly, looking rather than using. Friction is the lesson.++### 18.B Stress matrix (introduce friction deliberately)+An interface tested on fast wifi with short English strings and populated data is untested. Run every row before calling a surface done:+- Throttle to 3G, or inject ~800ms of API latency, and watch what the screen does in the gap.+- Real content lengths, plus a long-expansion locale (DE/FI) and a non-Latin script.+- Genuinely empty data - all three empty states (Section 6.C), not just one.+- Forced API failure and a partial failure (one widget of six).+- Keyboard only, no mouse, all the way through the primary task.+- Resize the window across all size classes, including the awkward in-between widths.+- A physical device, not just DevTools emulation (iOS input zoom and `playsinline` only show up there - Section 15.E).+- Paste into every field: multiline into single-line, formatted text, a value with leading/trailing whitespace.++### 18.C Record findings as Break / Expectation / Direction+Every observation gets three lines, no more - enough to act on, cheap enough to actually write down:+- **Break** - precisely what failed, on which surface, under which condition.+- **Expectation** - what should have happened instead.+- **Direction** - the one-line general fix, not a patch for this instance alone.++Promote recurring findings into rules keyed on *function*, not appearance: "the colour input accepts any format and normalizes to hex" is reusable; "the colour input looks like Linear's" is not.++---+----## 18. RELATIONSHIP TO taste-skill + OUT OF SCOPE+## 19. RELATIONSHIP TO taste-skill + OUT OF SCOPE- **Hand off to `taste-skill`**: marketing hero sections, landing pages, portfolios, editorial, illustration-heavy brand surfaces. If a screen is half product, half marketing, split it: taste-skill for the marketing sections, this skill for the product surface. Never run both on one component.- **Hand off to `dataviz`**: chart/graph authoring (color, encoding, axes). This skill covers the table and the dashboard frame around the charts, not the chart internals.- **Out of scope**: native mobile (iOS/Android) app chrome beyond responsive web (tab bars, native nav) - a different skill's job; flag it, do not silently approximate. Realtime collab primitives (presence, cursors, OT) - different problem class.----## 19. FINAL PRE-FLIGHT CHECK+## 20. FINAL PRE-FLIGHT CHECK**Run every box. If any fails, the surface is not done.**@@ -504,8 +592,13 @@ Fix these first. Only then apply the density/token/visual polish. Preserve the h- [ ] **Keyboard/a11y**: roving tabindex on custom grids, `:focus-visible`, icon buttons labelled, `aria-disabled` not `disabled` on keyboard-reachable menu items, 44px/24px targets?- [ ] **Density switch** offered where DENSITY calls for it (mode swap, not zoom)?- [ ] **Dark mode** one theme locked, frozen-column background is a theme token, tested in both modes?+- [ ] **Micro-craft floor** (Section 15): nested radii = outer minus gap; optical (not mathematical) centring on directional glyphs; `text-wrap: pretty`/`balance`; middle-truncation on paths and filenames; units and shortcuts glued with nbsp; hit targets expanded via negative-`inset` pseudo-element with 4-8px gaps between neighbours; label + gap clickable?+- [ ] **Invisible defaults** (Section 15.E): `user-select:none` on decorative only; correct input `type=`/`inputmode`; iOS input font-size >= 16px; `playsinline` on video?+- [ ] **Overflow is communicated** (Section 15.F): last item cut off, overscroll background matches, edge fades where scrollbars are hidden?+- [ ] **Motion suppressed correctly** (Section 15.G): `prefers-reduced-motion` kills everything; rapid state changes (<~120ms) fall back to instant; forward/back move on opposite vectors?+- [ ] **Hesitation test run** (Section 18.A) and the **stress matrix** walked (Section 18.B: throttled network, long/non-Latin text, empty, failure, keyboard-only, resize, real device, paste)?- [ ] **House system**: props discovered from real docs (nothing invented), no `<div>` for layout, tokens only, Badge for counts only, status via a status indicator?-- [ ] **No product-UI Tells** from Section 15; **zero em-dashes** anywhere visible?+- [ ] **No product-UI Tells** from Section 16; **zero em-dashes** anywhere visible?- [ ] **One design system** per app (no Carbon + Fluent mixed)?If a single box cannot be honestly ticked, fix it before delivering.@@ -513,6 +606,8 @@ If a single box cannot be honestly ticked, fix it before delivering.---## References+- `references/house-ui-rules.md` - house rules for product UI: two layers, plain words, controls, lists, text overflow, chat answer blocks, external objects, setup, errors.+- `references/semantic-zoom.md` - detail that changes with zoom level for hierarchical overviews.- `references/block-skeletons.md` - worked reference implementations for the three block contracts most often gotten wrong (index + detail-drawer frame, table scroll/sticky-header/frozen-column CSS contract, truncation contract).- `references/install-commands.md` - Appendix A: package-manager install commands per host design system.- `references/canonical-sources.md` - Appendix B: gsearch-verified primary-source URLs backing this skill's rules, grouped by topic.diff --git a/.claude/skills/product-ui-taste/references/house-ui-rules.md b/.claude/skills/product-ui-taste/references/house-ui-rules.mdnew file mode 100644index 0000000..ed039df--- /dev/null+++ b/.claude/skills/product-ui-taste/references/house-ui-rules.md@@ -0,0 +1,153 @@+# Product UI house rules++Distilled from design review corrections, pattern research on ChatGPT, Claude, Manus, Perplexity and Linear, and agent message stream rules. Apply them to any product UI you review. Where a rule here conflicts with a recipe in `SKILL.md`, this file wins.++Think of the app like a good restaurant. The guest sees a short menu and one waiter, and the kitchen stays behind the door. A cook who wants to see the kitchen can open the door.++## Target user++The default view serves the least technical person who uses the product. Judge every screen, message and setup step as that person meets it first. Technical users keep everything, one click deeper.++- Copy the register of ChatGPT, Claude and Manus. Check a pattern library such as Mobbin for the same surface type before you design it, and cite the screens.+- Remove nothing for simplicity. Move it to Details or Advanced, and give each item one home.+- Offer a setting "Show technical details by default" for developers.++## Two layers++| Default view | Details or Advanced |+|---|---|+| One plain answer, what to do next, short steps, what failed, what is left | Ids, shas, internal stage names, tool lines, tokens, confidence, file paths, raw logs, server error text |+| Three questions in a form, named by outcome | Every other field, folded under Advanced |+| Sent: "Result posted on PR #57" | Target strings, replaced drafts, internal kinds |++The Details control is a visible labeled button that opens a side panel or a fold. Hide a tab that has no content.++## Words++- Use one term per meaning, taken from the user's own day. Before the build, write a glossary table: today's word, default-view word, Details word.+- Never show internal codes (P1, M0, S1) as labels. Codes stay in code.+- Name choices by outcome: "Most capable for ambitious work", "Asks you first", "Never does it".+- A label names the thing. Delete slogan subtitles ("Nobody waits"). Keep a subtitle only when it adds a fact.+- Section titles are noun phrases. No verb, no question, no sentence.+- Keep screen copy short: page subtitle 10 words or fewer, setting row is a title plus one sentence at most, no group-row notes. The explanation of a rule belongs in the docs.++## Agent messages++- Lead with what happened and what to do next, in first person and everyday words. Two or three short sentences, then one offer.+- No ids, stage names, rule names or tool names in the message body.+- State each count once.+- Render Markdown drafts exactly as the destination renders them (GitHub, Jira, Slack). Screenshot the posted result and judge readability.+- Every reference a person reads carries a short title with the link on it: [Queued checks show at once (#30)](https://github.com/your-org/your-repo/pull/30). In the UI, show a chip as described under External objects.++## Progress and results++- Show long work as 3 to 6 steps in everyday words, with a count, a timer and one live line: "Working, step 3 of 5 · 0:12".+- Fold finished work into one line: "Checked 4 things in 16 s".+- Show no verdict text until the work ends.+- Put the result first: outcome word, one sentence, the cause in words, and one main button named by the outcome ("Review the bug report").+- End a long task as one card: summary, evidence or files, two or three follow-up chips, a one-tap rating.++## Choices and approvals++- A screen asks three questions at most. Preselect the safe choice. Put the rest behind "Later" or Advanced.+- Collapse grids of knobs into one question with three outcome answers, such as "Ask me before anything is posted" (default), "Ask me only for important posts", "Post on its own".+- Ask only when blocked, as one card in the place the user already is. The card says what will happen, where, and who sees it. The button names the action: "Post to PR #58", "Edit", "Don't post".+- Safety checks pass in silence and speak only when one fails.+- Small changes apply at once with Undo. Changes to a plan or anything outward need an approval card.++## Controls++- Never disable or grey out a control. If a precondition is missing, do the precondition and show a one-line notice ("Switched to annual billing"). Validate on submit and keep the button live. Hide a control that never applies.+- Never hide features behind a `…` menu. Use visible labeled buttons, a status pill, inline rename, footer rows.+- Controls never wrap their label: buttons, chips, status pills, tabs. Use `white-space: nowrap`, a shorter word, or one font step down. A wrapped control label is a visual bug.+- Prefer optical alignment to strict pixel alignment.++## Lists++- A list is one bordered block with hairline dividers between rows.+- No colored border or left stripe on any list item: selected, running and status rows included. Selected uses a neutral border and the selected surface background.+- Show status and every categorical value (project, source, kind, risk) with one shared IconLabel pattern. Each value has its own shape and color, so color never carries the meaning alone: passed check green, failed cross red, skipped minus grey, warning amber, timed out clock red, running spinner accent.+- Show icon plus word where the list has room, icon only where it does not, and keep the word in `aria-label`. Decide by the list's own width with a container query; a narrow side panel on desktop counts as limited.+- Draw a signature SVG icon family per product (one stroke weight, one corner style, one grid) when stock icons do not fit. In shadcn projects, start from `pnpm dlx shadcn add @lucide-animated/<name>`.+- Audit and change every list in one pass, never one screen at a time.++## Text overflow++- Never truncate titles, goals or descriptions with an ellipsis and a tooltip. Wrap with `overflow-wrap: anywhere` and let the row grow.+- If a column is too narrow for a name, show another short fact (a date, a count) and keep the full name in `aria-label`.+- A wide table scrolls inside its own wrapper with edge shadows. The page never scrolls sideways.++## Intelligent UI++Chat answers carry working views, the way ChatGPT's Intelligent UI and the Apps SDK do. The model returns typed data; the client renders it with components it owns.++### Visual weight in the stream++| Level | What | Style |+|---|---|---|+| Primary | Answer text, answer blocks, object cards, errors the user can fix | Rich formatting. Only blocks and cards get a border or background. |+| Secondary | Live status line, finished-work summary line, context line ("With: Checkout · PR #57") | Grey text and a small icon. The `›` chevron is the only affordance. |+| Tertiary | Expanded steps | Indented grey text under the summary line |+| Hidden | JSON, raw API data, tool names, sub-agent containers | Details panel or developer console only |++- Only two things earn a container: the user's message and structured output (blocks, object cards). Status, steps and thinking stay as grey text.+- One live status line at a time, updated in place, written as intent ("Reading the ticket..."). Skill loads and agent handoffs stay silent. The line goes away on the first answer token.+- Nesting depth is one: summary line, then a flat list of steps. Sub-agent work reads as the parent's work.+- Show thinking only inside the expanded steps.+- After 30 s add "This is taking longer than usual." After 60 s add a Cancel link.+- Motion: crossfade the status text, pulse the status dot, animate height on expand (200 ms). No progress bars, no bounce. Honour reduced motion.++### Answer blocks++- The model picks a block kind from a fixed registry and fills in data. It never sends HTML or code; the client owns the look and the actions.+- Text carries the judgement, the block carries the records. Show a block only for data that answers the question. Repeating structure becomes a block; prose stays text.+- Every block sits in one hairline frame with a heading and a count, rows with dividers inside. Several objects from one answer form one list.+- Blocks render read-first at their smallest useful size. Inline blocks stay compact; a full view (board, diff, dashboard) opens in the side panel. Nothing opens or expands on its own.+- The server sends a loading block first with skeleton rows shaped like the real ones, then the rows.+- Validate every block on the server and again on the client. Drop invalid rows and keep the valid ones. Allow only `http` and `https` links.+- Unknown or broken data falls back to a table, with the line "Shown as a table because this answer has no matching view yet." A component that throws renders the same rows as a table in place.+- Each action shows its result under the row that started it. A second press while the first runs does nothing.+- Every outward action from a block goes through the approval gate. Actions confirm in the steps line: "Moved SHOP-123 to Done".++## External objects++An object that lives in another system (a Jira ticket, an Xray test case, a GitHub PR, a Linear issue, a Confluence page, a Slack message, a TestRail case) renders the way its own product renders it.++- Copy the source's native anatomy: the fields it shows, their order, its status lozenge colors and shapes, its issue-type and priority icons, its PR state icon and color (open green, merged purple, draft grey, closed red). A Jira ticket looks like a Jira ticket to someone who uses Jira daily.+- Keep the host product's frame, spacing and type around it, so the card sits in the list with the other rows. The content inside the frame follows the source.+- Every external object shows its source's logo icon at the start of the card or row. The logo is how a reader tells our objects from alien ones. Our own objects carry no logo.+- Every id or key (SHOP-142, PROJ-T23, #58) is a link that opens the original item in its own system, in a new tab. Make the whole chip or card clickable, and keep in-app actions as separate labeled buttons.+- An inline reference in text renders as a chip: source logo, key, short title. Never a bare key.+- A pasted link to a known system unfurls into the same card.+- A card for a source with no renderer falls back to a chip with logo, key, title and link.+- Light actions (transition, assign, comment) sit on the card and go through the approval gate. Heavy views open in the side panel.+- Keep the source names, statuses and field names as the source spells them ("In Progress", "To Do", "Story Points").++## Navigation and structure++- One front door: Home is a greeting, one ask box and three starter chips in the user's words.+- Keep four or five top-level places, the same set on the phone bar.+- An inbox uses the Linear layout: list on the left, open item on the right, one item per screen on a phone.+- Group one cause into one row: events from several sources about the same root problem show as one row with the related items inside.+- Settings opens on personal items. Connections and Advanced appear only for admins.+- Maps and coverage views come from observed evidence (pages visited, real screenshots). Static scans only enrich them. Show unseen parts as gaps.+- For management overviews, apply semantic zoom inside the timeline or table. A separate box-canvas view was rejected. See `semantic-zoom.md`.++## Setup++- No wizard before the first task. One question per screen, a skip on every optional step.+- Optional setup lives as a checklist card on Home until it is done.+- A banner appears only when something stops working.+- Ask for notification rights after you say what the user gets, with "Maybe later". Default alerts to "Only what needs me".++## Errors and empty states++- Write each error in three parts: what happened, what to do, one button. Place it where the problem happened. Put server text and `HTTP 500 /api/...` in a Details fold.+- Use three error kinds: offline, server problem, signed out.+- When only an admin can fix it, say so and offer "Copy a message for your admin".+- An empty state is a heading, one sentence on what will appear, and one button when there is a first action. No illustration.++## Verification++- Judge the rendered pixels; a correct DOM can still look wrong. Screenshot at 390x844 and 1440x900, light and dark.+- Check for wrapped controls, clipped text, sideways scroll, overlap and contrast. Fix what you see, then capture again.diff --git a/.claude/skills/product-ui-taste/references/semantic-zoom.md b/.claude/skills/product-ui-taste/references/semantic-zoom.mdnew file mode 100644index 0000000..66f0a77--- /dev/null+++ b/.claude/skills/product-ui-taste/references/semantic-zoom.md@@ -0,0 +1,75 @@+# Semantic zoom: detail that changes with zoom level++Based on Arc UI's "Semantic zoom" block (uiarc.dev/components/blocks/semantic-zoom). Take the interaction model only; the code and the look stay the original's. Use it for roadmaps and other hierarchical overviews.++## The idea in three sentences++A map of nested boxes shows the whole organisation at once. Zooming into a box swaps in a richer representation of the same thing at each level. The summary numbers, the breadcrumb and the minimap all follow the camera, so the reader always knows where they are and what the numbers cover.++## When to use it++- Hierarchical work data where each level answers a different question: portfolio, then team or milestone, then project or bucket, then task.+- Management overviews where people move from "how is the whole plan doing" to "what exactly is this ticket" without losing their place.+- Skip it for plain scanning of a tree (use a tree view) and for working on tasks (use a board or table).++## Levels: each one shows something new++Observed hierarchy in the reference (company, team, project, task). What each level renders:++| Level | Box shows |+|---|---|+| Whole company | One block per team with name and % done. Inside each, tiny project cards with a strip of task tiles; blocked tasks tinted red; people as dots. No text beyond team name and %. |+| Team | Team name, lead avatar and name, "6 projects · 24 open tasks", % done. Project cards now readable. |+| Project | Project name, health dot and word ("At risk", "On track", "Off track") with due date, % and a progress bar, task tiles, owner avatars with names. |+| Task | A full card: status · due date · estimate, title, one-paragraph description, assignee with role, checklist "5 of 5" with a bar, comment count, and its parent path. |++Rules drawn from it:++- **Swap the representation per level and keep text at reading size.** A tiny box shows a colour and a number. A medium box shows a title and counts. A large box shows sentences.+- **Detail fades in once the box is big enough on screen.** Measure the rendered pixel size of each box after every camera move.+- **Rollups come from the leaves.** Team % and blocked counts derive from tasks, so every level agrees.+- **Health shows as a word plus a dot**, so it reads without colour.++## Context that follows the camera++- **Breadcrumb** at the top: `Company > Team > Project > Task`, each crumb clickable, current one marked `aria-current="location"`.+- **Stats panel re-scopes to the focus.** Same fields at every level, labelled with the level: Team / Project / Task, Open tasks, Blocked (red when above zero), Next due, Progress %, People. Numbers count to the new value.+- **Minimap** in a corner once zoomed in: the whole map in miniature with a rectangle for the viewport.+- **Zoom readout and controls**: `−`, current factor (1.0×, 1.6×, 4.0×), `+`, fit. Hint text: "Scroll to zoom, drag to pan, click anything to fly in".+- **Hover card** on any item with its key fields and "Click to open".+- **Guided tour** button that flies through the levels once; skippable.++## Input++| Input | Action |+|---|---|+| Click or tap an item | Fly into it |+| Wheel, pinch | Zoom around the pointer |+| Drag | Pan |+| Arrow keys | Move a cursor between nearby items |+| Enter / Space | Fly into the item under the cursor |+| Escape / Backspace | Fly out one level |+| + / − | Zoom in or out |+| 0 / Home | Fit the whole map |++## Accessibility and motion++- The stage is `role="application"` with an `aria-roledescription` of zoomable map and a text label summarising the whole.+- A polite live region announces each move: "Now viewing SSO for enterprise, on track, 63% complete, 4 open tasks, due Oct 22."+- A plain table of every leaf-parent (team, project, health, progress, open, blocked, due) sits in the DOM as the non-visual equivalent.+- Camera moves are eased flights of about 400 to 600 ms; under `prefers-reduced-motion` they jump instantly.+- Pause the render loop offscreen and in hidden tabs. Gotcha for agents: a background CDP tab never paints such a canvas, so screenshot it in a visible browser pane.++## Applying it without a canvas engine++For up to a few hundred items, a DOM version is enough: lay the boxes out once in a fixed "world" grid, move a camera with a CSS `transform: translate() scale()` on the world, and after each move compute every box's on-screen size to set a detail class (`lod-0` dot, `lod-1` label, `lod-2` card, `lod-3` full). Clicking a box fits it to the viewport. Keep the timeline or table view next to the map: the map gives orientation, the table supports scanning.++## Zoom inside an existing timeline++A separate box-map view (a "Zoom map" tab with cards per level) can read as ugly and redundant. A safer form puts the zoom interaction inside the timeline or table people already use:++- Clicking a milestone header widens that column to about 70% of the time axis; the other milestones stay visible as narrow columns with clamped names.+- A short horizontal camera move (scaleX from the old column to the new, about 380 ms, off under reduced motion) sells the zoom.+- Bar content is chosen by the bar's pixel width: under 90 px a number or blocked count, then status, then status, owner and criteria meter, then the first line of "What".+- Plan level shows buckets collapsed to per-milestone counts; zoomed level expands them, and bucket summaries gain "% done, n blocked" plus status tiles.+- A breadcrumb row (Whole plan › milestone) with Previous, Next, Zoom out; Esc zooms out, ← → move between milestones. Ticket detail opens in a side drawer.diff --git a/.claude/skills/release-comms/SKILL.md b/.claude/skills/release-comms/SKILL.mdnew file mode 100644index 0000000..65d08c2--- /dev/null+++ b/.claude/skills/release-comms/SKILL.md@@ -0,0 +1,85 @@+---+name: release-comms+description: >+ Release communication pipeline for your product: turn a deployment runsheet and a+ GitHub milestone into a customer-facing release note with real screenshots and+ videos, docs updates (including retrofits of articles the release makes stale),+ a Slack announcement draft, and a lightweight marketing package. Use when you say+ "cover today's release", "write the release note", or "/release-comms".+---++# release-comms: release note, docs, announcement and marketing pipeline++**Lane: `full`.** It mutates external state (Slack posts, docs PR, wiki pages), so every post and PR is drafted first and gated on the user's explicit approval. See the `closed-loop` skill.++## Configuration++Fill these in once (`kit.toml`, `.env` or arguments). Placeholders below are examples.++| Setting | Meaning | Example |+|---|---|---|+| `PRODUCT_REPO` | Repo that holds the release milestone | `your-org/your-product` |+| `MILESTONE_PATTERN` | Milestone naming | `Release YYYY-MM-DD` |+| `TEAM_LABEL` | Label that filters the milestone to your team | `team:platform` |+| `RUNSHEET_SOURCE` | Where the deployment runsheet lives | a wiki page, a doc, or a Slack thread |+| `RELEASE_DIR` | Working folder per release | `comms/release-notes/<date>/` |+| `DOCS_REPO` | Local path of the docs repo | `../your-docs` |+| `RELEASE_NOTES_FILE` | Running release-notes page in the docs repo | `docs/release-notes.md` |+| `ANNOUNCE_CHANNEL` | Slack channel for the internal announcement | `#product-releases` |+| `MARKETING_CHANNEL` | Slack channel for the marketing package | `#marketing` |+| `FLAG_SYSTEM` | Feature-flag tool named in the runsheet | any |++## Source-of-truth chain (walk it in order)++1. **Deployment runsheet.** Gives release scope, the milestone link, the PR list per service, feature flags being enabled, the deploy window, and trailing items (merged to QA but not staged). Exclude trailing items from "available now".+2. **GitHub milestone.** The milestone filtered by `TEAM_LABEL` is the release manifest. Issues may still be open, so closed does not equal shipped.+3. **Issue bodies and comments.** This is the media source. Dev-test comments ("Dev test: passed on prod") and QA comments ("Verified PASSED on staging") carry screenshots and demo videos as GitHub attachment URLs. For a private repo these need auth to resolve:+ `curl -sL -H "Authorization: Bearer $(gh auth token)" -o <file> <url>`+ Check the Content-Type with `curl -sI` for the right extension. GitHub videos are usually QuickTime `.mov`. Treat a comment-level "Verified PASSED" as the ship signal, because issues often stay open until a later close step.+4. **Feature flags.** Anything behind a flag in the runsheet gets honest gating language ("rolling out", "enabled per organization").++## Pipeline++### 1. Collect (parallel workers, staging files)+Use one worker per headline cluster plus one sweep worker over the remaining milestone issues. Each worker extracts user-visible changes with verbatim quotes and links, classifies each as user-facing feature, user-facing fix or internal, downloads media into `assets/` with descriptive kebab-case names, writes to `RELEASE_DIR/staging/<cluster>.md`, and returns only a status line. Never paste one worker's output into another's prompt.++### 2. Release note (lead writes, single file)+Write `RELEASE_DIR/release-note-<date>.md`: frontmatter (version, date, milestones, labels), a one-paragraph narrative summary, **Highlights** (bold, benefit-first bullets with issue links), per-feature sections (What's new, Why this matters, What you can do now, Shipped in this capability), Enhancements, Fixes, and an appendix table of shipped issues. See the `generate-release-notes` skill for the base format.++Voice rules:+- Do not write a feature list. Every item says what the user can now do and what pain it removes. Lead with the before/after story where one exists.+- Embed the downloaded screenshots and videos inline next to the feature they prove.+- Disclose known issues plainly with a fix timeline.+- Flag to the user anything user-benefiting found in the sweep that they did not list.+- Frame the release around the opportunity it opens, and sanity-check every number.+- Naming: avoid "v1" or "first version" in customer copy. Call gated first releases "early access". Call UI refreshes "a new look", not "redesign". Describe capabilities as what is now supported, and say when one serves both humans and agents.+- The internal post is the deep dive: same naming, plus issue links, flag names, architecture notes, verification status and known-issue numbers. Marketing copy stays light.++### 3. Docs updates (branch off main, never touch in-flight branches)+Use a git worktree so work in the main checkout is never disturbed:+`git worktree add ../docs-release-<date> -b release-comms/<date> origin/main` (run inside `DOCS_REPO`). Check what exists on `origin/main` before planning edits, because drafts in the checkout may not be merged. Two motions:+- **New or changed feature docs.** Use the `feature-doc` skill for any new article or real screenshot refresh.+- **Retrofit sweep.** Grep the docs for surfaces this release changed: stale screenshots, stale flow text, stale limitations. Always add the release entry to `RELEASE_NOTES_FILE` (heading per date, "What's new" and "Why this matters" for features, enhancements and fixes in collapsible blocks). If unmerged drafts cover the same surface, do not edit them. Flag the needed change to the user for that branch.+The docs PR is a ship gate: the user approves before it opens. To publish the note to a wiki, see the `publish-to-confluence` skill.++### 4. Slack announcement draft (`ANNOUNCE_CHANNEL`)+Format: an announcement line (`:mega: *Product Release Announcement* | <release note link> | Available now`), a channel-wide greeting, then emoji-prefixed bold-name bullets with one benefit sentence each, a known-issue heads-up, and a link to the full release note. Keep it terse. Draft only: the user posts or approves posting.++### 5. Marketing package (`MARKETING_CHANNEL`)+Use a lightweight changelog-thread format, not positioning essays:+1. **Lead post:** "This week's release:" plus a numbered list (`1/ ...`), one line per shipped feature, and one short closing line. No media required.+2. **One detail post per feature:** a hook line (the pain or the punch), 2 to 4 short lines on what it does, the benefit and a use case, an honest caveat if any, and a specific demo video, GIF or screenshot from `assets/` (name the file and note any trim or convert work). Each post reuses cleanly as an X or LinkedIn thread, a Slack lead with thread replies, or a newsletter section.+3. **Media manifest:** each asset marked near-ready, needs trim, or missing (record fresh). The `release-video`, `social-media-kit` and `youtube-video-kit` skills cover producing media.+4. **Suggested channel message** for the people who compile and review the newsletter.+Draft only: gate on the user.++### 5b. Demo videos back to the tickets (optional)+Once demo videos are published somewhere the team can open, write each video link into a "Demo" field on every shipped issue it covers (for example a GitHub Project text field, set through `gh api graphql` with `updateProjectV2ItemFieldValue`). One link per issue. Check an existing value before overwriting it. Verify by re-reading the field.++### 6. Verify (closed loop)+- A fresh-context verifier re-checks release-note claims against the issue links and tags each Verified, Weakened or Falsified. Drop or demote accordingly.+- Media check: every embedded asset exists locally and renders (size above zero, correct extension).+- After any approved Slack post or docs PR, re-fetch the artifact and confirm it matches intent.++## Cockpit+Keep a `session-review.md` in `RELEASE_DIR` (the `review-cockpit` pattern): progress, one card per deliverable, the user's approvals logged. Delete staging files after consolidation.diff --git a/.claude/skills/release-video/SKILL.md b/.claude/skills/release-video/SKILL.mdindex 8f0e776..5dc2586 100644--- a/.claude/skills/release-video/SKILL.md+++ b/.claude/skills/release-video/SKILL.md@@ -30,11 +30,23 @@ These came from a real review of the first cut. Each one cost a full re-render w6. **Pace for reading.** Feature scenes run 6-8 s, long enough to read every line twice. In demos, sped-up stretches say so in the caption ("sped up 2.5x"), and the payoff plays at 1x with a zoom and a highlight ring.7. **Real product, real data.** Demos come from recordings of the live product on a demo project. Numbers on screen match what the recording shows.+8. **Upbeat music.** Beds are bright and uplifting (major key, about 115-125 BPM). A calm or sad bed reads as boring.+9. **Say acronyms right.** On `eleven_v4`, write "AI" plain and use no alias dictionary: the hyphenated alias "ay-eye" sounds unnatural, and v4 says "AI" correctly by itself (Scribe hears "AI", about 0.35 s). Keep aliases only for acronyms that v4 gets wrong in a test clip, and never use dotted spellings like A.I. Check a test clip and Scribe word timestamps before rendering the full set.++10. **Zoom slowly, keep context.** Show the target in the full frame first with a ring or spotlight for about 1 s, zoom over at least 1.2 s with easing, never past about 1.6x, keep surrounding UI visible, and zoom back out before the next step. Prefer a spotlight dim to a hard crop. A zoom box must match the window aspect: expand it before cropping, never resize a narrower box into the window, because that stretches the UI sideways (see `fit()` in `scripts/compose_demo.py`). Zoom back out with an eased move, never a cut.+11. **Explain before demoing.** Each feature clip opens with what it does and how it helps, then shows how to turn it on or set it up, then the demo.++12. **Energetic narration.** Target about 185-195 words per minute with an excited, upbeat delivery, like a social-media creator. The API's max speed of 1.2 on `eleven_v4` gives only about 160 wpm, so add `atempo=1.15` after generation. Energy comes from pace and delivery, not hype words. Write plain product language: "Select Run", "Choose Separate", "four times faster". No social-media slang such as "hit", "boom", "magic switch", "crank it". Narration runs continuously: fit the visuals to the voice-over, never leave long silent gaps between lines.++13. **Human input on camera.** Drive recordings with `scripts/human_input.py`. It reproduces timings measured on real human recordings. The cursor is visible, and its shape follows the hovered element: arrow, pointing hand, or I-beam. Moves take 150-450 ms, run nearly straight with a slight bow, and peak in speed mid-move. A long move ends with 1-3 small corrections and a 200-400 ms dwell, then a click held 80-120 ms. Real `mouseMoved` events show hover states before each click. Keys come 60-120 ms apart, with longer pauses between words; never paste a whole string. Keep the cursor still about two thirds of the time, with 1.5-2.5 s reading pauses after new content. While an AI answer streams, keep the cursor still and speed-ramp the wait. A headless capture has no OS cursor, so draw one from the event path. Record at 2x scale and at least 60 fps, on a production build: pre-release builds can show license watermarks.+## Workflow1. **Inventory.** List the shipped items from the release milestone or changelog. Pick the ones a user would notice and leave internal fixes to the written notes. For each, write one sentence of what changed and one of why it matters.2. **Record.** Capture each feature end to end in the real product. Any recorder works. `scripts/frames_from_video.sh rec.mp4 <name>` turns a recording into the frames folder and manifest the composer reads.3. **Storyboard.** Copy `templates/` into a working folder with `scripts/engine.js`. One `<section class="scene">` per beat, with `data-start` and `data-dur` in seconds. Element timings are relative to their scene. The comment at the top of `templates/index.html` lists every animation attribute.+ Real UI inside a scene: crop stills and recorded frames into windows rather than redrawing the product, and map ring boxes from source pixels into each crop. A frame sequence plays with `<div data-seq="start,fps">` holding one `<img>` per frame; keep it to a few seconds at 30 fps. Crops of 1x captures read on a phone only at about 1.4x or more, so crop narrow and fade the right edge when lines run long; 2x captures stay sharp.+ Spotlight and zoom: dim the frame with a hole over the target plus a ring, glide the hole between boxes over about 640 ms so beats never jump-cut between crops, and ease any zoom toward a point, capped at 1.6x and back to 1x before the beat ends. Check that no ring crosses text, no shot renders under 1x, and no two caption lines show at once. Captions are one bar per scene whose text swaps out then in, so bars of different widths never cross-fade.4. **Review stills before rendering.** `render.py stills <t1> <t2> ... --dir <folder>` writes PNGs at chosen times. Take one per scene midpoint, tile them into a contact sheet with ffmpeg `hstack`, and look at it against the rules above. Fix, then re-take the stills.5. **Sound effects.** `gen_audio.sh sfx <name> "<prompt>" <seconds> <folder>/sfx` once per sound (whoosh, pop, tick, chime, thump, a soft riser). Keep them short and quiet in character. `mix_sfx.py --dir <folder>` reads every `data-sfx` cue from the page and builds `sfx-track.wav`.6. **Music.** Adapt `templates/music-plan.example.json` so section durations sum to the video length, then `gen_audio.sh music plan.json bed-a.mp3`. Run `music_check.py bed-*.mp3`, which prints scores and rejects nothing itself, and keep the candidate with the lowest far-similarity and an intro quieter than the body.@@ -53,6 +65,8 @@ These came from a real review of the first cut. Each one cost a full re-render w| `scripts/music_check.py` | Tempo, beat phase, loudness curve and repetition score per candidate || `scripts/mix_final.sh` | Sidechain mix, loudness check, web copy, silence check || `scripts/compose_demo.py` | Recording, window frame, captions, zoom, ring, intro and outro cards |+| `scripts/plain_demo.py` | Plain demo cut: the same spec on a browser card over a gradient, no captions or cards; honors per-segment `blur` and `speed` |+| `scripts/human_input.py` | Human-looking mouse paths, corrections, clicks and typing over CDP (`python3 human_input.py` self-checks the timings) || `scripts/frames_from_video.sh` | Recording to frames plus manifest || `templates/` | Starter scenes, theme tokens, demo spec, music plan |diff --git a/.claude/skills/release-video/scripts/compose_demo.py b/.claude/skills/release-video/scripts/compose_demo.pyindex c073b75..5635da4 100755--- a/.claude/skills/release-video/scripts/compose_demo.py+++ b/.claude/skills/release-video/scripts/compose_demo.py@@ -12,6 +12,8 @@ makes one from any .mp4/.mov. Theme (colors, fonts) comes from spec["theme"].Intro/outro title, body and kicker are inserted as HTML so <em> works; escape & < > yourself.+Optional per-segment "blur": [[x0,y0,x1,y1], ...] in source pixels masks regions (history rails, customer names).+usage: compose_demo.py <spec.json> (see templates/demo-spec.example.json)"""import json, math, pathlib, subprocess, sys, html, os@@ -131,6 +133,11 @@ def main():sp = seg.get("speed", 1)st = seg["src"][0] + lt * spimg = src_frame(st)+ if seg.get("blur"):+ img = img.copy()+ for bx in seg["blur"]:+ bx = tuple(int(v) for v in bx)+ img.paste(img.crop(bx).filter(ImageFilter.GaussianBlur(16)), bx[:2])z = seg.get("zoom")box = fullif z:diff --git a/.claude/skills/release-video/scripts/engine.js b/.claude/skills/release-video/scripts/engine.jsindex a51f31f..8e50c10 100644--- a/.claude/skills/release-video/scripts/engine.js+++ b/.claude/skills/release-video/scripts/engine.js@@ -53,7 +53,7 @@function init() {scenes = [...document.querySelectorAll('.scene')].map(el => ({el, start: +el.dataset.start, dur: +el.dataset.dur, enter: el.dataset.enter || 'cut',- nodes: [...el.querySelectorAll('[data-draw],[data-fade],[data-rise],[data-pop],[data-count],[data-type],[data-rot],[data-wipe],[data-unwipe],[data-zoom],[data-pulse],[data-out],[data-float],[data-blink],[data-grow],[data-slide],canvas[data-burst]')],+ nodes: [...el.querySelectorAll('[data-draw],[data-fade],[data-rise],[data-pop],[data-count],[data-type],[data-rot],[data-wipe],[data-unwipe],[data-zoom],[data-pulse],[data-out],[data-float],[data-blink],[data-grow],[data-slide],[data-seq],canvas[data-burst]')],}));document.querySelectorAll('[data-type]').forEach(n => { n.dataset.full = n.textContent; });document.querySelectorAll('[data-draw]').forEach(n => {@@ -113,6 +113,13 @@if (n.tagName === 'CANVAS' && d.burst != null) {burst(n, lt, JSON.parse(d.burst || '{}'));}+ // Recorded frame sequence: data-seq="start,fps"; children are the frames in order.+ if (d.seq) {+ const [s, fps] = nums(d.seq);+ const kids = n.children;+ const i = Math.max(0, Math.min(kids.length - 1, Math.floor((lt - s) * fps)));+ for (let k = 0; k < kids.length; k++) kids[k].style.visibility = k === i ? 'visible' : 'hidden';+ }if (d.rise || d.pop || d.slide || d.float) {const isSvg = n instanceof SVGElement;if (isSvg) { n.style.transformBox = 'fill-box'; n.style.transformOrigin = 'center'; }diff --git a/.claude/skills/release-video/scripts/human_input.py b/.claude/skills/release-video/scripts/human_input.pynew file mode 100644index 0000000..0782343--- /dev/null+++ b/.claude/skills/release-video/scripts/human_input.py@@ -0,0 +1,137 @@+#!/usr/bin/env python3+"""Human-looking mouse and keyboard input for demo recordings.++Timings come from 120 fps recordings of a real person using the UI:+long moves take 150-250 ms (up to ~450 ms for very long ones), run nearly+straight with a slight curve and a bell-shaped speed peak near the middle,+then 1-3 small corrections of 15-100 px and a 200-400 ms dwell before the+click. The cursor is still about two thirds of the time.++The planners are pure functions. `drive` sends the events through any+`send(method, params)` callable, so it works with a CDP session from+browser-harness, Playwright (`cdp.send`), or a raw websocket.++ from human_input import Human+ h = Human(send, start=(400, 300))+ h.click(820, 512) # move, correct, dwell, press, release+ h.type("Empty Weekend") # per-key timing with word-boundary pauses+ h.pause("read") # 1.5-2.5 s still cursor after new content+"""+import math, random, time++def min_jerk(s):+ return 10 * s**3 - 15 * s**4 + 6 * s**5++def move_duration(dist, rng):+ # 200 px -> ~0.16 s, 1400 px -> ~0.25 s, capped near 0.45 s+ base = 0.11 + 0.05 * math.log2(1 + dist / 100)+ return min(0.45, max(0.08, base * rng.uniform(0.9, 1.15)))++def plan_move(p0, p1, rng, hz=120):+ """Points (x, y, dt) along a slightly curved minimum-jerk path."""+ (x0, y0), (x1, y1) = p0, p1+ dist = math.dist(p0, p1)+ if dist < 1:+ return []+ dur = move_duration(dist, rng)+ n = max(3, int(dur * hz))+ # perpendicular bow: 2-6 % of the distance, random side+ bow = dist * rng.uniform(0.02, 0.06) * rng.choice((-1, 1))+ nx, ny = -(y1 - y0) / dist, (x1 - x0) / dist+ pts = []+ for i in range(1, n + 1):+ s = min_jerk(i / n)+ b = bow * math.sin(math.pi * s)+ pts.append((x0 + (x1 - x0) * s + nx * b, y0 + (y1 - y0) * s + ny * b, dur / n))+ return pts++def plan_approach(p0, target, rng, hz=120):+ """Long move that lands slightly off, then 1-3 corrections onto the target."""+ dist = math.dist(p0, target)+ if dist < 120:+ return plan_move(p0, target, rng, hz)+ err = min(60, dist * rng.uniform(0.02, 0.06))+ a = rng.uniform(0, 2 * math.pi)+ land = (target[0] + err * math.cos(a), target[1] + err * math.sin(a))+ pts = plan_move(p0, land, rng, hz)+ cur = land+ k = rng.choice((1, 1, 2, 3))+ for j in range(k):+ f = 1.0 if j == k - 1 else rng.uniform(0.5, 0.8)+ nxt = (cur[0] + (target[0] - cur[0]) * f, cur[1] + (target[1] - cur[1]) * f)+ gap = rng.uniform(0.04, 0.12)+ if pts:+ x, y, dt = pts[-1]+ pts[-1] = (x, y, dt + gap)+ step = plan_move(cur, nxt, rng, hz)+ # corrections are slower per pixel: 70-300 ms+ scale = rng.uniform(0.07, 0.3) / max(1e-6, sum(p[2] for p in step) or 1)+ pts += [(x, y, dt * scale) for x, y, dt in step]+ cur = nxt+ return pts++def plan_typing(text, rng):+ """(char, delay_before) pairs: 60-120 ms per key, longer at boundaries."""+ out = []+ for i, ch in enumerate(text):+ d = rng.uniform(0.06, 0.12)+ if i and text[i - 1] in " .,;:-/@":+ d += rng.uniform(0.08, 0.25)+ if rng.random() < 0.04:+ d += rng.uniform(0.2, 0.45) # occasional hesitation+ out.append((ch, d))+ return out++class Human:+ PAUSES = {"beat": (0.2, 0.45), "read": (1.5, 2.5), "think": (0.6, 1.1)}++ def __init__(self, send, start=(0, 0), seed=None, sleep=time.sleep):+ self.send, self.pos, self.sleep = send, start, sleep+ self.rng = random.Random(seed)++ def _mouse(self, type_, x, y, **kw):+ self.send("Input.dispatchMouseEvent", {"type": type_, "x": round(x, 1), "y": round(y, 1), **kw})++ def move(self, x, y):+ for px, py, dt in plan_approach(self.pos, (x, y), self.rng):+ self._mouse("mouseMoved", px, py)+ self.sleep(dt)+ self.pos = (x, y)++ def click(self, x, y, dwell=None):+ self.move(x, y)+ self.sleep(dwell if dwell is not None else self.rng.uniform(0.2, 0.4))+ self._mouse("mousePressed", x, y, button="left", clickCount=1)+ self.sleep(self.rng.uniform(0.08, 0.12))+ self._mouse("mouseReleased", x, y, button="left", clickCount=1)++ def type(self, text):+ for ch, d in plan_typing(text, self.rng):+ self.sleep(d)+ if ch == "\n":+ for t in ("rawKeyDown", "keyUp"):+ self.send("Input.dispatchKeyEvent", {"type": t, "key": "Enter", "code": "Enter", "windowsVirtualKeyCode": 13})+ self.send("Input.dispatchKeyEvent", {"type": "char", "text": "\r"})+ else:+ self.send("Input.dispatchKeyEvent", {"type": "keyDown", "text": ch, "key": ch})+ self.send("Input.dispatchKeyEvent", {"type": "keyUp", "key": ch})++ def pause(self, kind="beat"):+ lo, hi = self.PAUSES[kind]+ self.sleep(self.rng.uniform(lo, hi))++if __name__ == "__main__":+ # Self-check against the measured ranges.+ rng = random.Random(7)+ for d in (200, 600, 1400):+ pts = plan_move((0, 0), (d, 0), rng)+ dur = sum(p[2] for p in pts)+ steps = [abs(pts[i + 1][0] - pts[i][0]) for i in range(len(pts) - 1)]+ peak = steps.index(max(steps)) / (len(steps) - 1)+ assert 0.08 <= dur <= 0.45 and 0.3 <= peak <= 0.7, (d, dur, peak)+ print(f"{d:>5}px {dur*1000:4.0f} ms speed peak at {peak:.2f}")+ a = plan_approach((0, 0), (900, 400), rng)+ print("approach events", len(a), "ends at", tuple(round(v) for v in a[-1][:2]))+ assert math.dist(a[-1][:2], (900, 400)) < 1+ t = plan_typing("Empty Weekend", rng)+ print("typing ms", [round(d * 1000) for _, d in t])diff --git a/.claude/skills/release-video/scripts/plain_demo.py b/.claude/skills/release-video/scripts/plain_demo.pynew file mode 100644index 0000000..b7ca092--- /dev/null+++ b/.claude/skills/release-video/scripts/plain_demo.py@@ -0,0 +1,52 @@+#!/usr/bin/env python3+"""Plain demo: the same cut as the explained spec, browser card on a gradient, no captions, no cards.+usage: plain_demo.py <spec.json> <out.mp4> (honors per-segment "blur" and "speed")"""+import json, pathlib, subprocess, sys+import numpy as np+from PIL import Image, ImageDraw, ImageFilter, ImageFont+W, H, FPS = 1920, 1080, 30+CW = 1568; CH = round(CW * 1080 / 1920); BAR = 48+L = (W - CW) // 2; T = (H - CH - BAR) // 2++def gradient():+ y, x = np.mgrid[0:H, 0:W].astype(np.float32)+ t = np.clip((x / W) * 0.35 + (y / H) * 0.65, 0, 1)[..., None]+ a = np.array([34, 193, 220], np.float32); b = np.array([37, 99, 201], np.float32)+ return Image.fromarray((a + (b - a) * t).astype(np.uint8))++def main():+ spec = json.load(open(sys.argv[1])); out = sys.argv[2]+ man = json.load(open(spec["manifest"]))+ fdir = pathlib.Path(man["frames_dir"]); sfps = man["fps"]; nfr = man["frame_count"]+ bg = gradient().convert("RGBA")+ sh = Image.new("RGBA", (W, H), (0, 0, 0, 0))+ ImageDraw.Draw(sh).rounded_rectangle((L, T + 24, L + CW, T + BAR + CH + 24), radius=16, fill=(0, 0, 0, 90))+ bg.alpha_composite(sh.filter(ImageFilter.GaussianBlur(28)))+ d = ImageDraw.Draw(bg)+ d.rounded_rectangle((L, T, L + CW, T + BAR + CH), radius=16, fill=(255, 255, 255, 255))+ d.rectangle((L, T + BAR - 1, L + CW, T + BAR), fill=(230, 232, 236, 255))+ for i, c in enumerate([(255, 95, 87), (254, 188, 46), (40, 200, 64)]):+ d.ellipse((L + 18 + i * 20, T + 18, L + 30 + i * 20, T + 30), fill=c)+ d.rounded_rectangle((L + 90, T + 9, L + CW - 18, T + 39), radius=15, fill=(244, 246, 248, 255))+ try: f = ImageFont.truetype("/System/Library/Fonts/Helvetica.ttc", 20)+ except Exception: f = ImageFont.load_default()+ d.text((L + 112, T + 15), spec["address"].split("/")[0], fill=(70, 78, 88, 255), font=f)+ mask = Image.new("L", (CW, CH), 0)+ ImageDraw.Draw(mask).rounded_rectangle((0, -30, CW, CH), radius=16, fill=255)+ ff = subprocess.Popen(["ffmpeg", "-v", "error", "-y", "-f", "rawvideo", "-pix_fmt", "rgb24", "-s", f"{W}x{H}", "-r", str(FPS), "-i", "-",+ "-c:v", "libx264", "-pix_fmt", "yuv420p", "-crf", "18", "-preset", "medium", "-movflags", "+faststart", out], stdin=subprocess.PIPE)+ total = 0.0+ for seg in spec["segments"]:+ sp = seg.get("speed", 1); dur = (seg["src"][1] - seg["src"][0]) / sp+ for k in range(int(round(dur * FPS))):+ i = min(nfr - 1, int(round((seg["src"][0] + k / FPS * sp) * sfps)))+ img = Image.open(fdir / f"{i:05d}.jpg").convert("RGB")+ for bx in seg.get("blur", []):+ bx = tuple(int(v) for v in bx)+ img.paste(img.crop(bx).filter(ImageFilter.GaussianBlur(16)), bx[:2])+ fr = bg.copy(); fr.paste(img.resize((CW, CH), Image.LANCZOS), (L, T + BAR), mask)+ ff.stdin.write(fr.convert("RGB").tobytes())+ total += dur+ ff.stdin.close(); ff.wait(); print(f"{out} {total:.1f}s")++if __name__ == "__main__": main()diff --git a/.claude/skills/release-video/scripts/render.py b/.claude/skills/release-video/scripts/render.pyindex b88cf86..58aefed 100755--- a/.claude/skills/release-video/scripts/render.py+++ b/.claude/skills/release-video/scripts/render.py@@ -30,6 +30,7 @@ def _open(p):pg.goto(URL)pg.wait_for_function("window.ENGINE_READY === true")pg.evaluate("document.fonts.ready")+ pg.evaluate("Promise.all([...document.images].map(i => i.decode().catch(() => null)))")return b, pgdiff --git a/.claude/skills/review-cockpit/SKILL.md b/.claude/skills/review-cockpit/SKILL.mdindex 94544d9..c52c3a1 100644--- a/.claude/skills/review-cockpit/SKILL.md+++ b/.claude/skills/review-cockpit/SKILL.md@@ -28,7 +28,7 @@ Copy `references/session-review-template.md`. Save the working copy in the relev**Cockpit (top):**1. **Status line** — one line: how many items await review + last-updated timestamp.2. **🧭 Progress** — a checklist, one row per item, each with a status glyph; a text progress bar + "X/N done · A awaiting review · B pending". **Make each item a clickable anchor to its review card** — `[N. Title](#n-title)` using GitHub-slug rules (lowercase, spaces→`-`, drop punctuation/emoji). Keep item headings free of `+ # ← → ( )` so slugs stay clean single-hyphen and the links resolve in Obsidian + the Claude side panel.-3. **📁 Working folder** — table of every artifact produced this session with its `~/vault/...` path or link (meeting note, this doc, evidence dir, external issues/PRs, posted messages).+3. **📁 Working folder** — table of every artifact produced this session with its vault path or link (meeting note, this doc, evidence dir, external issues/PRs, posted messages).4. **🔌 Context** — sources the work is grounded in (recordings, Slack threads, issues), tools/connectors used, related tickets.**Review items (below):** one card per item:diff --git a/.claude/skills/social-media-kit/SKILL.md b/.claude/skills/social-media-kit/SKILL.mdnew file mode 100644index 0000000..2aa45fa--- /dev/null+++ b/.claude/skills/social-media-kit/SKILL.md@@ -0,0 +1,205 @@+---+name: social-media-kit+description: Produce and attach native media (video teaser, GIF, card images) for every social post to maximize reach and interaction. Use whenever you post to X, LinkedIn, Reddit, or prepare HN/IndieHackers handoffs, and whenever a social-publishing step runs. A text-only social post is a draft, not a post.+---++# Social media kit++Every social post carries a video, GIF, or image. Native media is the largest reach lever the feed algorithms give you. This skill defines the kit of assets, the visual rules that keep a campaign from looking templated, and the browser mechanics for attaching media on each platform.++## Configuration++Set these once. Scripts read them from environment variables, so nothing personal is hardcoded.++| Setting | Env var | Default |+|---|---|---|+| Signature shown bottom-right on cards | `BRAND_URL` | `yourblog.example` |+| Output folder for cards | `CARD_OUT_DIR` | `.` |+| Screenshot for the runner card | `CARD_SCREENSHOT` | unset (card skipped) |+| Quote card attribution | `QUOTE_ATTRIBUTION` | `Your Name · your role` |+| Pass / fail dot colors | `CARD_ACCENT_PASS`, `CARD_ACCENT_FAIL` | `3DD68C`, `F2555A` |+| Banner accent color | `BANNER_ACCENT` | `e13f5e` (coral, configurable) |+| Fonts | `HEADLINE_FONT`, `MONO_FONT` | macOS Helvetica Neue and Menlo, DejaVu on Linux |++Your handles, avatar and brand colors belong in your own config or prompt, never in this skill.++## Requirements++- Python 3 with Pillow (`pip install pillow`)+- ffmpeg, for teaser cuts and clips+- A browser automation tool that can drive your logged-in Chrome over CDP (for example the `browser-harness` skill, if you have it)++## The kit contract++Before posting, produce a kit folder (`<scratchpad>/social-kit-<slug>/`) with whichever of these the source material supports, in priority order:++| Asset | Spec | Best for |+|---|---|---|+| `teaser-16x9.mp4` | 30-60s cut of a master video, hook in the first 3s, H.264/AAC, captions burned in (feeds autoplay muted) | X thread root, LinkedIn |+| `teaser-1x1.mp4` | Same cut, 1080x1080 center-crop or pad | Mobile feeds |+| `hero-card.png` | 1600x900 card with a padded screenshot or lane art | X, LinkedIn, Reddit image |+| `terminal.gif` | Animated terminal replay, 15MB or less (X GIF cap), 2-6 frames or a reveal sequence | X, Reddit |+| `quote-card.png` | 1600x900 dark card with one strong line | Follow-up posts, LinkedIn comment |++Reuse before creating. If your blog pipeline already produces per-post assets (OG gif, screenshots, a deep-dive mp4), a 30-60s ffmpeg cut of an existing master video beats a new render.++## Style variety across a campaign++One visual language repeated on every asset reads as AI-generated. Rules:++- Never render every asset in a campaign in the same style. Rotate: lane-art card, terminal replica (see the `terminal-replica` skill), ASCII or OG gif, bare quote card, raw screenshot or recording.+- Match style to audience. Developer forums get terminal replicas or raw screenshots, because authentic beats polished. LinkedIn and X heroes get designed cards.+- PIL gotcha for terminal renders: Menlo lacks the TUI glyphs for the record dot, the elbow and the spinner. Draw them as vector shapes (filled circle, elbow lines), never ship tofu boxes.++## House card style++Cards follow a dark thin-line art language, inspired by linear.app/now. The renderer is `scripts/linearcard.py`. The accent colors and signature are configurable.++- Canvas 1600x900 (render at 2x, LANCZOS downscale). Background `#0A0B0D`, flat. No gradients, no glow, no dot grids.+- Art is thin-line lane fields: horizontal 1.5px `#43464C` strokes flowing left to right, dots `#9A9DA2` at start points, arrowheads at ends, lines breaking around thin circle nodes. Dashed lanes mean failures. The only accents are tiny green (pass) and red (fail) dots.+- Type: a bold sans for the big headline (white, 2-3 short lines, top-left). Mono for the eyebrow and data chips. Never set the headline in mono, and never bury the message in a caption.+- Real numbers in a chip row ("7 passed · 4 failed"), not decoration.+- Signature bottom-right: your URL in bold mono plus a cursor block. Nothing else.+- Screenshots sit on the art field with a 1px `#303338` border and 20px rounded corners. Never full-bleed. Keep a headline beside them.+- Anything terminal-looking follows the `terminal-replica` skill.++```bash+BRAND_URL="myblog.dev" CARD_OUT_DIR=./kit python3 .claude/skills/social-media-kit/scripts/linearcard.py+```++The three cards in the script are examples. Edit the copy and numbers for your post.++## Content type to visual treatment++Pick the treatment by what the post is, not by one default recipe.++| Post is about | Reach for | Why |+|---|---|---|+| A flagship or launch idea | `linearcard.py` art field, but invent one concrete metaphor object for this post first (a shape that puns the idea) | A bespoke metaphor is more scroll-stopping than the same background every time |+| "Watch it actually run" proof (a real terminal session, an agent run) | `cardrender.py` screenshot or clip without the padded card frame, raw footage | A card frame reads as marketing polish. Raw footage reads as "this is happening" |+| A tool or stack story with numbers | `linearcard.py` standard recipe with a mono data-chip row | The data chips carry the story |+| A long essay excerpt or killer quote | `quote-card.png`, and drop the lane art entirely: pure type on the dark field | Background linework competes with a typographic excerpt |++## Thread media placement++In any multi-message thread (X thread, LinkedIn post plus comments, Reddit post plus comments), media goes on the first message only, preferably a gif or video. Later messages stay text-only unless an illustration adds information (a chart under discussion, a before/after). Decorating every reply with a card reads as botting and dilutes the root asset.++## Production recipes++### Teaser cut from a master video++```bash+# pick the strongest 30-60s arc: hook section plus one payoff section+ffmpeg -i master.mp4 -ss <hook_start> -to <hook_end> -c copy a.mp4+ffmpeg -i master.mp4 -ss <payoff_start> -to <payoff_end> -c copy b.mp4+printf "file 'a.mp4'\nfile 'b.mp4'\n" > cut.txt+ffmpeg -f concat -safe 0 -i cut.txt -c:v libx264 -crf 21 -pix_fmt yuv420p teaser-16x9.mp4+# 1:1 variant+ffmpeg -i teaser-16x9.mp4 -vf "crop=ih:ih,scale=1080:1080" -c:a copy teaser-1x1.mp4+```++If the teaser relies on narration, burn subtitles (`-vf subtitles=teaser.srt:force_style='FontSize=22'`). Muted autoplay kills uncaptioned voice-over.++### Padded-card screenshots and cursor-animated clips++`scripts/cardrender.py` renders 1920x1080 frames: a screenshot floating on a gradient with rounded corners and shadow, an optional animated cursor with click ripples, row highlight pulses, and zoom. Use `Seg(...)` and `render()` for motion clips. For a static `hero-card.png`, render one frame:++```python+from cardrender import Seg+seg = Seg("screenshot.png", 1.0, waypoints=[(0.5, 800, 400)], clicks=[], highlights=[], zoom=None)+seg.frame(0.5).save("hero-card.png")+```++Edit the gradient colors at the top of `make_bg()` to match your brand.++### Terminal GIF++Author frames with PIL and a mono font on a dark background, reveal lines progressively, then `img.quantize(colors=64)` and `save(..., save_all=True, duration=[...], loop=0)`. Keep under 15MB for X: 64 colors and 20 frames or fewer does it.++### Terminal-style banner (article cover)++`scripts/terminal_banner.py <out.png>` draws a 5:2 (1500x600) terminal-window banner with a prompt line, a big wordmark with a block cursor, status lines and a feature list. Edit the CONFIG block per product. Use it when a raw app screenshot makes a poor cover.++## Attaching media per platform++These mechanics assume a CDP-driven Chrome. Coordinates drift, so resolve elements through JS or `getBoundingClientRect()` each time. Screenshots can be a few percent larger than CSS pixels on retina displays, so never click straight from image coordinates.++### Stream a file into the page++The raw `DOM.setFileInputFiles` call is the cleanest path when an `input[type=file]` exists (see below). When it does not work, stream the file in:++1. Base64 the asset, split it into 50KB chunks, and append each chunk with a `js("window.__g += '<chunk>'")` call. The JS pipe breaks above about 60KB.+2. In the page, build the file: `atob`, then `Uint8Array`, then `new File`, then `DataTransfer`.+3. Hand it to the composer as described per platform.++### X++- Media, image or mp4: `DOM.getDocument(depth=-1, pierce=True)`, then `DOM.querySelector('input[data-testid="fileInput"]')`, then `DOM.setFileInputFiles(files=[path], nodeId=...)`. An 8MB 64s mp4 was ready in about 20s. Wait until the attachments strip stops showing upload progress.+- Fallback: a synthetic `DragEvent('drop')` (with dragenter and dragover first) on `[data-testid="tweetTextarea_0"]` works. Click the reply box first, wait about 2s, type the text, verify via innerText, then drop.+- Text entry: use CDP `Input.insertText`, not `document.execCommand('insertText')`. The draft editor silently mangles long multi-paragraph strings with execCommand. Focus the textarea via JS, call `Input.insertText`, then verify innerText (marker count, length range, URL present) before clicking Post.+- Self-reply chain: go to the parent status URL, focus `tweetTextarea_0`, insert text, verify, click `tweetButtonInline` by its rect, then find the new reply's status href by matching the first 40 characters of its text.+- Attach media to the thread root. Media plus a link in the same tweet suppresses the link card, which is fine: keep the canonical URL in the final reply, which then renders the card. Limits: mp4 2:20 or shorter, GIF 15MB, images 5MB. Screenshot-verify the media preview before clicking Post.+- Deleting your own tweet: the caret menu needs a real coordinate click, and it soft-rate-limits after several opens. Fallback is the web client's own delete GraphQL call from the page context with the session's csrf cookie. Look up the current query id in the web client's network log, because it changes.+++- Feed Photo and Video buttons both open a native file chooser. Use the file-chooser intercept below.+- Comments: drop does not work, and the visible `input[type=file]` elements belong to the messaging widget (attaching there sends it to a chat draft). Correct flow: patch `HTMLInputElement.prototype.click` to capture the input instead of opening the picker, click the comment box's "Add a photo" button (capture lands about 1s later), then set `input.files = dt.files` and dispatch `change`. Restore the prototype afterwards.+- Video post: set a thumbnail before Next (image icon under the preview, then "Add video thumbnail"). Otherwise the feed shows a black first frame.+- Native video beats a link preview card for reach. The URL can stay in the body text. 30-90s is the sweet spot.+- The create composer text box is reachable through `.ql-editor, [contenteditable=true][role=textbox]` with `focus()` plus `Input.insertText`. Some composers are closed shadow roots, so click by coordinates and verify by screenshot.+- LinkedIn rewrites links to `lnkd.in` shorteners. Verify an edit by curling the shortener, not by matching the raw URL.+++- The composer lives in shadow DOM: walk `el.shadowRoot` recursively. `input[type=file][accept*=image]` exists without clicking: assign `files` and dispatch `input` and `change` (bubbles and composed).+- The reopened composer restores old drafts. Clear it with real keys (click the editor, Select All, Backspace, verify innerText length 0) before typing, or new text interleaves with the stale draft.+- Read each subreddit's rules before posting. Image or video post types get more feed surface where allowed.++### Native file-chooser intercept++Cleanest path when a real picker opens: `cdp("Page.setInterceptFileChooserDialog", enabled=True)`, real-click the upload button, drain events, grab `Page.fileChooserOpened`'s `backendNodeId`, call `cdp("DOM.setFileInputFiles", files=[path], backendNodeId=bid)`, then disable the intercept. No base64 needed.++### Hacker News and IndieHackers++HN is link-only: the OG image on the blog page does the work, so verify `og:image` renders before submitting. IndieHackers allows images in the body: include `hero-card.png`.++### Facebook groups++Check the group's language and rules on its About page first, and confirm you are a member. Then:++1. Click "Write something..." and confirm the `div[role=dialog]` with a `div[role=textbox]` exists before typing. Closing the dialog preserves the draft.+2. Focus the textbox via JS and call `Input.insertText`.+3. The dialog already contains `input[type=file]`. Do not click Photo/video. Use `DOM.querySelector('div[role=dialog] input[type=file]')` plus `DOM.setFileInputFiles` with 2-4 images, and wait for blob `<img>` previews.+4. Click the `div[aria-label="Post"]` button. Posting shows a spinner for 15-25s in big groups.+5. Verify under the group's "my posted content" page. Large groups hold new posts as Pending (admin approval). Pending is success. Never repost while pending.++### X Articles (long-form)++- Route: sidebar "Articles", then Write (not a direct compose URL). Drafts autosave server-side, so a browser restart loses nothing.+- Title: `textarea[placeholder="Add a title"]`. `Input.insertText` doubles text here, so set it with the native value setter plus an `input` event.+- Body: the single `div[contenteditable=true]`. `Input.insertText` works and preserves paragraphs.+- Cover (5:2, 1500x600): `input[data-testid="fileInput"]`, then `DOM.setFileInputFiles`, then Apply in the crop dialog. Generate a banner with `scripts/terminal_banner.py` instead of using a raw app screenshot.+- Publish: Publish, then the audience dialog's Publish. The redirect to the article's status URL means it is live.++## Session discipline++- Never delete an engaged post. Edit in place (LinkedIn: control menu, Edit post, which exposes a real `.ql-editor`).+- If you use the same Chrome the agent drives, the agent can re-attach to your focused tab between calls. Before any click batch, list tabs, switch to the target by URL, and assert `location.href` inside the same call. Do whole flows in one script, and prefer JS or API actions over coordinate clicks while you are working in the browser.+- Close leftover agent tabs before starting. Gate any Post click behind a content-verify loop that refuses to fire on a mismatch.++## Post-shape rules that compound with media++1. Hook line above the media: one sentence, no link. The media stops the scroll, the first line earns the click.+2. One asset per post, root-only by default (see Thread media placement).+3. Match the asset to the claim. "Watch the agent work" gets the run clip. "One command" gets the terminal GIF.+4. Verify visually after posting. Screenshot each item and confirm the media rendered, because uploads fail silently during composer timeouts.+5. Reddit: verify with the JSON API. Moderator removal is invisible to the author: the post looks live while `removed_by_category` is `moderator`. Fetch `/r/<sub>/comments/<id>.json` and check `removed_by_category` and `is_robot_indexable`. A shadow-DOM file-input assign can also report success while attaching nothing, so check `media_metadata` on the live post JSON. If a subreddit removes your posts, move to a sibling community.+6. Keep your voice and content rules from your own publishing checklist: canonical URL everywhere, no marketing speak on Reddit, and hand off at auth walls.++## Definition of done++- [ ] Kit folder produced, or an explicit note why no media exists for this topic+- [ ] Every posted item has native media attached and visually verified+- [ ] X thread: the root has the strongest asset and the final tweet carries the link+- [ ] Handoff files (HN, IndieHackers) reference the OG image or include `hero-card.png`diff --git a/.claude/skills/social-media-kit/scripts/cardrender.py b/.claude/skills/social-media-kit/scripts/cardrender.pynew file mode 100644index 0000000..ccab334--- /dev/null+++ b/.claude/skills/social-media-kit/scripts/cardrender.py@@ -0,0 +1,145 @@+"""Padded floating-card renderer with animated cursor, ripples, highlights, zoom.+Gradient colors: edit TOP/BOT in make_bg() or set CARD_BG_TOP / CARD_BG_BOT (hex)."""+from PIL import Image, ImageDraw, ImageFilter+import math, os, subprocess++W, H = 1920, 1080+FPS = 30++def make_bg():+ # diagonal soft blue gradient, Xnapper-ish+ def hx(n, d):+ h = (os.environ.get(n) or d).lstrip("#")+ return tuple(int(h[i:i + 2], 16) for i in (0, 2, 4))+ top = hx("CARD_BG_TOP", "4facfe")+ bot = hx("CARD_BG_BOT", "00d2d8")+ bg = Image.new("RGB", (W, H))+ px = bg.load()+ for y in range(H):+ for x in range(0, W, 4):+ t = (x / W * 0.45 + y / H * 0.55)+ r = int(top[0] + (bot[0] - top[0]) * t)+ g = int(top[1] + (bot[1] - top[1]) * t)+ b = int(top[2] + (bot[2] - top[2]) * t)+ for dx in range(4):+ if x + dx < W: px[x + dx, y] = (r, g, b)+ return bg++BG = make_bg()++def rounded_card(img, radius=22, border=2):+ """screenshot -> RGBA card with rounded corners and hairline border"""+ w, h = img.size+ card = img.convert("RGBA")+ mask = Image.new("L", (w, h), 0)+ d = ImageDraw.Draw(mask)+ d.rounded_rectangle([0, 0, w - 1, h - 1], radius=radius, fill=255)+ card.putalpha(mask)+ d2 = ImageDraw.Draw(card)+ d2.rounded_rectangle([0, 0, w - 1, h - 1], radius=radius, outline=(255, 255, 255, 90), width=border)+ return card++def make_shadow(w, h, radius=22, blur=38, alpha=120):+ pad = blur * 2+ sh = Image.new("RGBA", (w + pad * 2, h + pad * 2), (0, 0, 0, 0))+ d = ImageDraw.Draw(sh)+ d.rounded_rectangle([pad, pad, pad + w - 1, pad + h - 1], radius=radius, fill=(10, 30, 50, alpha))+ return sh.filter(ImageFilter.GaussianBlur(blur)), pad++def smoothstep(a, b, t):+ t = max(0.0, min(1.0, (t - a) / (b - a))) if b > a else 1.0+ return t * t * (3 - 2 * t)++CURSOR_PTS = [(0,0),(0,16.5),(3.9,13.2),(6.3,19.2),(8.7,18.2),(6.3,12.2),(11.4,12.2)]+def draw_cursor(draw, x, y, scale=2.0):+ pts = [(x + px * scale, y + py * scale) for px, py in CURSOR_PTS]+ draw.polygon(pts, fill=(20, 20, 25, 255), outline=(255, 255, 255, 255))++class Seg:+ """One screenshot segment: waypoints, clicks, highlight, zoom."""+ def __init__(self, shot_path, D, waypoints, clicks, highlights, zoom):+ self.shot = Image.open(shot_path).convert("RGB")+ self.D = D+ self.wps = waypoints # [(t, x, y)] screenshot coords+ self.clicks = clicks # [t]+ self.hls = highlights # [(t0, t1, rect)]+ self.zoom = zoom # (t0, t1, t2, t3, zmax, anchor)+ self.card = rounded_card(self.shot)++ def cursor_at(self, t):+ wps = self.wps+ if t <= wps[0][0]: return wps[0][1], wps[0][2]+ for i in range(len(wps) - 1):+ t0, x0, y0 = wps[i]; t1, x1, y1 = wps[i + 1]+ if t0 <= t <= t1:+ u = smoothstep(t0, t1, t)+ return x0 + (x1 - x0) * u, y0 + (y1 - y0) * u+ return wps[-1][1], wps[-1][2]++ def transform(self, t):+ sw, sh_ = self.shot.size+ k0 = (W * 0.86) / sw+ z = 1.0+ u = 0.0+ if self.zoom:+ t0, t1, t2, t3, zmax, anchor = self.zoom+ if t < t0: z = 1.0+ elif t < t1: z = 1 + (zmax - 1) * smoothstep(t0, t1, t)+ elif t < t2: z = zmax+ elif t < t3: z = zmax - (zmax - 1) * smoothstep(t2, t3, t)+ else: z = 1.0+ u = (z - 1) / (zmax - 1) if zmax > 1 else 0+ else:+ anchor = (sw / 2, sh_ / 2)+ k = k0 * z+ float_y = 5 * math.sin(2 * math.pi * t / self.D * 2)+ off0 = ((W - k0 * sw) / 2, (H - k0 * sh_) / 2 + float_y)+ offz = (W / 2 - k * anchor[0], H / 2 - k * anchor[1])+ off = (off0[0] * (1 - u) + offz[0] * u, off0[1] * (1 - u) + offz[1] * u)+ return k, off++ def frame(self, t):+ img = BG.copy()+ k, off = self.transform(t)+ sw, sh_ = self.shot.size+ cw, ch = int(sw * k), int(sh_ * k)+ card = self.card.resize((cw, ch), Image.BILINEAR)+ shadow, pad = make_shadow(cw, ch, blur=30)+ img.paste(shadow, (int(off[0]) - pad, int(off[1]) - pad + 14), shadow)+ img.paste(card, (int(off[0]), int(off[1])), card)+ ov = Image.new("RGBA", (W, H), (0, 0, 0, 0))+ d = ImageDraw.Draw(ov)+ # highlights+ for (h0, h1, rect) in self.hls:+ if h0 <= t <= h1:+ a = smoothstep(h0, h0 + 0.4, t) * (1 - smoothstep(h1 - 0.4, h1, t))+ pulse = 0.75 + 0.25 * math.sin(2 * math.pi * (t - h0) * 1.6)+ alpha = int(230 * a * pulse)+ r = [off[0] + rect[0] * k, off[1] + rect[1] * k, off[0] + rect[2] * k, off[1] + rect[3] * k]+ d.rounded_rectangle(r, radius=8, outline=(255, 90, 80, alpha), width=4)+ # click ripples+ cx, cy = self.cursor_at(t)+ px, py = off[0] + cx * k, off[1] + cy * k+ for ct in self.clicks:+ if ct <= t <= ct + 0.8:+ u = (t - ct) / 0.8+ rr = 10 + 42 * u+ alpha = int(220 * (1 - u))+ cxs, cys = self.cursor_at(ct)+ pxs, pys = off[0] + cxs * k, off[1] + cys * k+ d.ellipse([pxs - rr, pys - rr, pxs + rr, pys + rr], outline=(255, 255, 255, alpha), width=5)+ draw_cursor(d, px, py)+ img = Image.alpha_composite(img.convert("RGBA"), ov)+ return img.convert("RGB")++def render(seg, out):+ n = int(seg.D * FPS)+ p = subprocess.Popen(+ ["ffmpeg", "-y", "-v", "error", "-f", "rawvideo", "-pix_fmt", "rgb24",+ "-s", f"{W}x{H}", "-r", str(FPS), "-i", "-",+ "-c:v", "libx264", "-crf", "20", "-preset", "medium", "-pix_fmt", "yuv420p", out],+ stdin=subprocess.PIPE)+ for i in range(n):+ p.stdin.write(seg.frame(i / FPS).tobytes())+ p.stdin.close(); p.wait()+ assert p.returncode == 0, outdiff --git a/.claude/skills/social-media-kit/scripts/linearcard.py b/.claude/skills/social-media-kit/scripts/linearcard.pynew file mode 100644index 0000000..dae07df--- /dev/null+++ b/.claude/skills/social-media-kit/scripts/linearcard.py@@ -0,0 +1,251 @@+#!/usr/bin/env python3+"""Social cards in a dark thin-line "lane field" art language.++Configuration (environment variables, all optional):+ BRAND_URL signature text bottom-right (default "yourblog.example")+ CARD_OUT_DIR output folder (default ".")+ CARD_SCREENSHOT path to a screenshot for the runner card (card skipped if unset)+ HEADLINE_FONT / MONO_FONT paths to .ttf/.ttc files (macOS defaults used if present)+ CARD_ACCENT_PASS / CARD_ACCENT_FAIL hex colors for the pass/fail dots++Inspired by the line-art cards on linear.app/now.++Verified against Linear's real OG art (linear-og.png):+bg #0A0B0D, thin gray strokes, dashed alt-paths, lines flow around circle+nodes with small dots at the break points, arrowheads at line ends.+Text: Helvetica Neue Bold headline, Menlo only for eyebrow/signature.+Render at 2x, downscale for AA.+"""+from PIL import Image, ImageDraw, ImageFont+import math, os+++def _hex(h, default):+ h = (os.environ.get(h) or default).lstrip("#")+ return tuple(int(h[i:i + 2], 16) for i in (0, 2, 4))++W, H = 3200, 1800 # 2x+BG = (10, 11, 13)+LINE = (67, 70, 76) # stroke gray+NODE = (154, 157, 162) # dots/arrowheads+TXT = (242, 243, 244)+MUT = (138, 143, 152)+GREEN = _hex("CARD_ACCENT_PASS", "3DD68C")+RED = _hex("CARD_ACCENT_FAIL", "F2555A")+BRAND_URL = os.environ.get("BRAND_URL", "yourblog.example")+OUT_DIR = os.environ.get("CARD_OUT_DIR", ".")++def _first(*paths):+ for p in paths:+ if p and os.path.exists(p):+ return p+ raise SystemExit("No font found: set HEADLINE_FONT / MONO_FONT to a .ttf or .ttc path")+++HN = _first(os.environ.get("HEADLINE_FONT"), "/System/Library/Fonts/HelveticaNeue.ttc",+ "/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf")+MEN = _first(os.environ.get("MONO_FONT"), "/System/Library/Fonts/Menlo.ttc",+ "/usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf")+_TTC = HN.endswith(".ttc")+_MTC = MEN.endswith(".ttc")+++def _f(path, size, idx, ttc):+ return ImageFont.truetype(path, size, index=idx) if ttc else ImageFont.truetype(path, size)+f_head = _f(HN, 124, 1, _TTC) # Bold+f_head_s = _f(HN, 104, 1, _TTC)+f_chip = _f(MEN, 42, 0, _MTC) # mono chips (has arrows)+f_eyebrow = _f(MEN, 34, 0, _MTC)+f_sig = _f(MEN, 38, 1, _MTC) # Menlo Bold+f_sig_dim = _f(MEN, 38, 0, _MTC)+f_quote = _f(HN, 150, 1, _TTC)+f_attr = _f(HN, 48, 10 if _TTC else 0, _TTC)+++def rounded_line(d, pts, fill, width, dash=None):+ """polyline from float points; dash = (on, off) in px."""+ if dash is None:+ d.line(pts, fill=fill, width=width, joint="curve")+ return+ on, off = dash+ acc, drawing, seg_start = 0.0, True, pts[0]+ for i in range(1, len(pts)):+ x0, y0 = pts[i - 1]; x1, y1 = pts[i]+ seg = math.hypot(x1 - x0, y1 - y0)+ t = 0.0+ while t < seg:+ step = min((on if drawing else off) - acc, seg - t)+ nt = t + step+ xa, ya = x0 + (x1 - x0) * t / seg, y0 + (y1 - y0) * t / seg+ xb, yb = x0 + (x1 - x0) * nt / seg, y0 + (y1 - y0) * nt / seg+ if drawing:+ d.line([(xa, ya), (xb, yb)], fill=fill, width=width)+ acc += step+ if acc >= (on if drawing else off) - 0.01:+ acc, drawing = 0.0, not drawing+ t = nt+++def lane_points(x0, x1, y, bulges):+ """horizontal lane with smooth vertical bulges.+ bulges: list of (cx, radius, amount): lane bends by `amount` at cx."""+ pts = []+ x = x0+ while x <= x1:+ dy = 0.0+ for cx, r, amt in bulges:+ u = (x - cx) / r+ if abs(u) < 2.2:+ dy += amt * math.exp(-u * u * 1.6)+ pts.append((x, y + dy))+ x += 6+ return pts+++def arrowhead(d, x, y, col=NODE, s=13):+ d.polygon([(x, y), (x - s * 1.5, y - s * 0.85), (x - s * 1.5, y + s * 0.85)], fill=col)+++def dot(d, x, y, col=NODE, r=7):+ d.ellipse([x - r, y - r, x + r, y + r], fill=col)+++def circle_node(d, cx, cy, r, width=3):+ d.ellipse([cx - r, cy - r, cx + r, cy + r], outline=LINE, width=width)+ dot(d, cx - r, cy); dot(d, cx + r, cy)+++def draw_lane_field(d, x0, x1, lanes, circles, statuses):+ """lanes: list of y. circles: list of (cx, cy_lane_idx, r).+ statuses: per-lane 'pass'|'fail'|None → end accent."""+ circ = [(cx, lanes[li], r) for cx, li, r in circles]+ for i, y in enumerate(lanes):+ bulges = []+ on_circle = None+ for cx, cy, r in circ:+ dyl = y - cy+ if abs(dyl) < 2: # lane passes THROUGH this circle+ on_circle = (cx, cy, r)+ elif abs(dyl) < r + 60: # neighbour: bulge away+ sgn = 1 if dyl > 0 else -1+ amt = sgn * (r + 34 - abs(dyl)) * 0.62+ if (r + 34 - abs(dyl)) > 0:+ bulges.append((cx, r * 1.35, amt))+ dash = (10, 14) if statuses[i] == "fail" else None+ if on_circle:+ cx, cy, r = on_circle+ p1 = lane_points(x0, cx - r - 4, y, bulges)+ p2 = lane_points(cx + r + 4, x1, y, bulges)+ rounded_line(d, p1, LINE, 3, dash)+ rounded_line(d, p2, LINE, 3, dash)+ else:+ rounded_line(d, lane_points(x0, x1, y, bulges), LINE, 3, dash)+ dot(d, x0, y)+ if statuses[i] == "pass":+ arrowhead(d, x1 + 16, y); dot(d, x1 - 26, y, GREEN, 9)+ elif statuses[i] == "fail":+ # dashed lane stops short with a red node, no arrow+ dot(d, x1 - 170, y, RED, 9)+ else:+ arrowhead(d, x1 + 16, y)+ for cx, cy, r in circ:+ circle_node(d, cx, cy, r)+++def text_block(d, x, y, eyebrow, head_lines, chips, font_head=f_head):+ d.text((x, y), eyebrow, font=f_eyebrow, fill=MUT)+ yy = y + 90+ for ln in head_lines:+ d.text((x, yy), ln, font=font_head, fill=TXT)+ yy += font_head.size + 26+ yy += 40+ for chip_txt, col in chips:+ dot(d, x + 12, yy + 30, col, 10)+ d.text((x + 44, yy), chip_txt, font=f_chip, fill=MUT)+ yy += 86+ return yy+++def signature(d, img_w, img_h):+ t = BRAND_URL+ w = d.textlength(t, font=f_sig)+ x = img_w - w - 120 - 34+ y = img_h - 130+ d.text((x, y), t, font=f_sig, fill=(200, 203, 208))+ d.rectangle([x + w + 14, y + 2, x + w + 34, y + 44], fill=GREEN)+++def new_canvas():+ img = Image.new("RGB", (W, H), BG)+ return img, ImageDraw.Draw(img)+++def save(img, path):+ img.resize((W // 2, H // 2), Image.LANCZOS).save(path)+ print("saved", path)+++def out(name):+ os.makedirs(OUT_DIR, exist_ok=True)+ return os.path.join(OUT_DIR, name)+++# The three cards below are EXAMPLES. Replace the copy with your own claim,+# real numbers and attribution, then re-run.++# ---------- hero card: 11 lanes through a central circle, 7 pass 4 fail ----+img, d = new_canvas()+lanes = [300 + i * 118 for i in range(11)]+statuses = ["pass", "pass", "fail", "pass", "pass", "fail", "pass", "fail", "pass", "fail", "pass"]+draw_lane_field(d, 1560, 3020, lanes, circles=[(2210, 5, 150), (1840, 1, 84), (2660, 8, 84)], statuses=statuses)+text_block(d, 120, 240,+ "YOUR PRODUCT x YOUR TOOL",+ ["One agent runs the", "whole test cycle."],+ [("43 issues -> 134 test cases", NODE),+ ("designed, executed, reported back", NODE)])+signature(d, W, H)+save(img, out("hero-card.png"))++# ---------- runner card: lanes converge into a screenshot ----+shot_path = os.environ.get("CARD_SCREENSHOT")+if shot_path:+ img, d = new_canvas()+ shot = Image.open(shot_path).convert("RGB")+ tw = 1720+ th = int(shot.height * tw / shot.width)+ shot = shot.resize((tw, th), Image.LANCZOS)+ mask = Image.new("L", shot.size, 0)+ md = ImageDraw.Draw(mask)+ md.rounded_rectangle([0, 0, tw - 1, th - 1], radius=20, fill=255)+ px, py = W - tw - 150, (H - th) // 2 + 60+ # short entry stubs leading into the shot (must not cross the text block)+ lanes = [py + 120 + i * ((th - 240) // 6) for i in range(7)]+ sts = ["pass", "pass", "fail", "pass", "fail", "pass", "pass"]+ for i, y in enumerate(lanes):+ dashed = (10, 14) if sts[i] == "fail" else None+ rounded_line(d, lane_points(px - 280, px - 40, y, []), LINE, 3, dashed)+ dot(d, px - 280, y)+ dot(d, px - 40, y, GREEN if sts[i] == "pass" else RED, 9)+ img.paste(shot, (px, py), mask)+ db = ImageDraw.Draw(img)+ db.rounded_rectangle([px, py, px + tw - 1, py + th - 1], radius=20, outline=(48, 51, 56), width=3)+ text_block(db, 120, 200,+ "REAL RUN · REAL VERDICTS",+ ["The AI runner", "grades my own", "work."],+ [("7 passed · 4 failed", NODE),+ ("every failure filed as a ticket", NODE)], font_head=f_head_s)+ signature(db, W, H)+ save(img, out("runner-card.png"))++# ---------- quote card ----------+img, d = new_canvas()+lanes = [1330 + i * 90 for i in range(3)]+draw_lane_field(d, 2380, 3020, lanes, circles=[(2680, 1, 90)], statuses=[None, None, None])+d.text((120, 330), "\u201c", font=_f(HN, 300, 1, _TTC), fill=(60, 63, 70))+qy = 560+for ln in ["The failures are", "the product."]:+ d.text((120, qy), ln, font=f_quote, fill=TXT)+ qy += 180+d.text((126, qy + 60), os.environ.get("QUOTE_ATTRIBUTION", "Your Name · your role"), font=f_attr, fill=MUT)+signature(d, W, H)+save(img, out("quote-card.png"))diff --git a/.claude/skills/social-media-kit/scripts/terminal_banner.py b/.claude/skills/social-media-kit/scripts/terminal_banner.pynew file mode 100644index 0000000..87bda83--- /dev/null+++ b/.claude/skills/social-media-kit/scripts/terminal_banner.py@@ -0,0 +1,78 @@+#!/usr/bin/env python3+"""Terminal/GitHub-README-style banner generator (dark panel + one accent color).++Produces a 5:2 (1500x600) PNG that looks like a terminal window: titlebar with+traffic-light dots, a prompt line, a big mono wordmark with a coral block+cursor, status lines on the left, feature list on the right, url + cursor+bottom-right. Good as an X Article cover when a raw app screenshot looks bad.+Adapt the CONFIG block per product; keep the layout.++Usage: python3 terminal_banner.py <out.png>+Env: BANNER_ACCENT (hex, default e13f5e), BANNER_URL, MONO_FONT (path)+"""+import os, sys+from PIL import Image, ImageDraw, ImageFont++# CONFIG, edit per product+TITLE = "myapp - the deck your agents work on"+PROMPT = "myapp start"+WORD_A, WORD_B = "My", "App" # white part, accent part+STATUS = [+ ("green", "●", "agent 1 coding src/search.ts:42"),+ ("amber", "●", 'agent 2 needs you "ship the fix?"'),+ ("green", "●", "agent 3 docs report.md"),+ ("muted", "○", "agent 4 idle done · 2m ago"),+]+FEATURES = ["click any path -> rendered", "tweak UI -> send to agent",+ "wiki · grid · canvas", "self-hosted · MIT"]+URL = os.environ.get("BANNER_URL", "myapp.example.com")++W, H = 1500, 600+C = {"bg": "#161616", "panel": "#1e1e1e", "border": "#3d3d3d", "fg": "#dadada",+ "muted": "#9b9b9b", "coral": "#" + os.environ.get("BANNER_ACCENT", "e13f5e").lstrip("#"), "green": "#4ec9a0", "amber": "#e5b567"}++def font(size, bold=False):+ p = os.environ.get("MONO_FONT")+ if p and os.path.exists(p):+ return ImageFont.truetype(p, size)+ if os.path.exists("/System/Library/Fonts/Menlo.ttc"):+ return ImageFont.truetype("/System/Library/Fonts/Menlo.ttc", size, index=1 if bold else 0)+ return ImageFont.truetype("/usr/share/fonts/truetype/dejavu/DejaVuSansMono%s.ttf" % ("-Bold" if bold else ""), size)++def main(out):+ img = Image.new("RGB", (W, H), C["bg"])+ d = ImageDraw.Draw(img)+ x0, y0, x1, y1 = 70, 60, W - 70, H - 60+ d.rounded_rectangle([x0, y0, x1, y1], radius=16, fill=C["panel"], outline=C["border"], width=2)+ d.rounded_rectangle([x0, y0, x1, y0 + 52], radius=16, fill="#282828")+ d.rectangle([x0, y0 + 30, x1, y0 + 52], fill="#282828")+ d.line([x0, y0 + 52, x1, y0 + 52], fill=C["border"], width=2)+ for i, c in enumerate(["#ff5f57", "#febc2e", "#28c840"]):+ d.ellipse([x0 + 24 + i * 30, y0 + 18, x0 + 40 + i * 30, y0 + 34], fill=c)+ d.text(((x0 + x1) // 2, y0 + 26), TITLE, font=font(17), fill=C["muted"], anchor="mm")++ big, mono, sm = font(92, True), font(24), font(20)+ d.text((x0 + 48, y0 + 100), "$", font=mono, fill=C["green"])+ d.text((x0 + 78, y0 + 100), PROMPT, font=mono, fill=C["fg"])+ d.text((x0 + 44, y0 + 150), WORD_A, font=big, fill="#ffffff")+ wa = d.textlength(WORD_A, font=big)+ d.text((x0 + 44 + wa, y0 + 150), WORD_B, font=big, fill=C["coral"])+ cx = x0 + 44 + wa + d.textlength(WORD_B, font=big) + 18+ d.rectangle([cx, y0 + 168, cx + 40, y0 + 248], fill=C["coral"])++ ys = y0 + 300+ for col, dot, txt in STATUS:+ d.text((x0 + 48, ys), dot, font=mono, fill=C[col])+ d.text((x0 + 84, ys), txt, font=mono, fill=C["fg"] if col != "muted" else C["muted"])+ ys += 38+ fy = y0 + 300+ for f in FEATURES:+ d.text((x1 - 48, fy), f, font=sm, fill=C["muted"], anchor="ra")+ fy += 34+ d.text((x1 - 48, y1 - 36), URL, font=sm, fill=C["coral"], anchor="rm")+ d.rectangle([x1 - 44, y1 - 46, x1 - 36, y1 - 26], fill=C["coral"])+ img.save(out, optimize=True)+ print("saved", out)++if __name__ == "__main__":+ main(sys.argv[1] if len(sys.argv) > 1 else "banner.png")diff --git a/.claude/skills/terminal-replica/SKILL.md b/.claude/skills/terminal-replica/SKILL.mdnew file mode 100644index 0000000..c892342--- /dev/null+++ b/.claude/skills/terminal-replica/SKILL.md@@ -0,0 +1,87 @@+---+name: terminal-replica+description: >+ Reproduce YOUR real terminal and CLI agents (Claude Code, Codex CLI, Gemini+ CLI) faithfully in any generated graphic, GIF, or video frame. Use whenever+ an asset shows a terminal, an agent transcript, a statusline, or a CLI+ banner. Capture your actual theme, font, prompt and statusline first, and+ never invent a generic "hacker terminal" look.+---++# Terminal replica++Terminal-like graphics must match the real tool and the real setup of the person who ships the asset. A generic green-on-black "hacker terminal" reads as fake. This skill is a method for capturing your own setup, plus a render recipe and a worked example.++## Method++1. Capture the ground truth. Take a fresh screenshot of your real terminal running the tool. Sample background, foreground and accent colors from it with an eyedropper or `PIL.Image.getpixel`. A live screenshot beats any spec in this file.+2. Record these five facts about your setup:+ - Emulator (Terminal.app, iTerm2, Warp, the VS Code integrated terminal, Ghostty).+ - Font family and size. Check the emulator's settings. VS Code on macOS defaults to Menlo 12.+ - Theme: background, default foreground, and the 16 ANSI colors.+ - Shell prompt shape (for example `user@host ~ %` for default macOS zsh, or your powerline or starship layout).+ - Statusline format, if your agent has a custom one.+3. Use your own session logs for transcript shapes. Claude Code stores them at `~/.claude/projects/<project-slug>/*.jsonl`. The assistant and tool-use turns show exactly what text appears.+4. Draw from those facts, then verify by placing the render next to a real screenshot before you publish.++Keep a small config in your own project (a JSON or Python dict) holding the five facts, and read it from your render scripts. Do not hardcode them in shared code.++## Claude Code TUI++Layout top to bottom on launch (verify against your installed version):++1. A pixel-art logo on the left: a blocky creature in Anthropic terracotta (`#D97757`), roughly 5x4 fat pixels with feet. Do not redraw it as an emoji or a robot.+2. A header text block to its right: `Claude Code` in bold white plus the version in gray, a gray model and account line, and a gray working-directory path.+3. Warnings: a warning glyph plus orange-yellow text (for example "N MCP servers need authentication") and a gray `· run /mcp`.+4. Notice blocks: an orange left border `│`, an orange bold title line, the body in the default foreground, and underlined blue links.+5. Prompt: `❯` then a dim gray placeholder with a block cursor over its first character.+6. Statusline at the bottom, one line, if you have configured one. Draw exactly your own format, including filled bars in green and empty bars dimmed.+7. Mode line below the statusline when a permission mode is active (for example "bypass permissions on (shift+tab to cycle)").++Transcript shapes (session JSONL to TUI rendering):++- Assistant tool call: `⏺ Bash(git status)`, with the dot colored (green when ok), the tool name white and the args dim.+- Result continuation: ` ⎿ <first line of output>` dim, and `… +N lines` in gray.+- Working spinner: a single animated glyph cycling `✳ ✶ ✻ ✽`, plus a gerund word ("Reticulating…") and a gray token count.+- User turn: `>` followed by plain text.+- Never show affordances that do not exist: no tabs, no menu bar, no fake buttons inside the TUI.++Animation notes for GIF and video: the cursor blinks as a square block at about 530ms, the spinner steps at about 120ms, and output appears in whole-line chunks. Only the user's typing appears character by character.++## Codex CLI++- Invoked as `codex` in the same terminal, so the same background and font as above.+- Banner: a minimal `>_ OpenAI Codex (vX.Y.Z)` style header line with a blue accent, then a bordered input box drawn with rounded box-drawing characters (`╭─╮ │ ╰─╯`) and a dim placeholder such as "Ask Codex to do anything".+- A dim gray shortcuts line at the bottom.+- Verify live before shipping: run `codex` yourself in a scratch directory and screenshot it. Check `~/.codex/config.toml` for a custom theme.++## Gemini CLI++- Do not fake it from memory. If an asset needs it, install it in a scratch environment (`npm i -g @google/gemini-cli`), run it and screenshot it.+- Known shape if you cannot verify: a large `GEMINI` ASCII banner in a blue to purple gradient, a tips list, a bordered input box (`> Type your message`), and a bottom status line with cwd, sandbox note, model name and context percent. Mark any unverified render as a draft.++## Render recipe (PIL)++- Render at 2x, then downscale 50% with LANCZOS for anti-aliasing.+- Mono font from your captured setup (`/System/Library/Fonts/Menlo.ttc` on macOS if that is what you use). Draw TUI glyphs that your font lacks (record dot, elbow, spinner) as vector shapes. Never ship tofu boxes.+- Line height about 1.35em, left padding about 2 characters, no drop shadows inside the terminal.+- Window chrome: either a flat panel matching your emulator, or crop the chrome entirely and show only content.++## Example values++An example only, taken from a typical VS Code Dark Modern setup. Replace every value with what you captured in the Method section.++- Emulator: VS Code integrated terminal. Font: Menlo 12.+- Background `#181818`, default foreground `#CCCCCC`.+- ANSI normal: black `#000000`, red `#CD3131`, green `#0DBC79`, yellow `#E5E510`, blue `#2472C8`, magenta `#BC3FBC`, cyan `#11A8CD`, white `#E5E5E5`.+- ANSI bright: `#666666` `#F14C4C` `#23D18B` `#F5F543` `#3B8EEA` `#D670D6` `#29B8DB` `#FFFFFF`.+- Prompt: `user@host ~ %`.+- Statusline (a custom one): `🤖 Model | ctx: 0% | s:▰▰▰▰▰ 87% | $4.06`, with filled bars in green `#23D18B` and empty bars dim.++## Definition of done++- [ ] Colors sampled from a real screenshot of your own terminal, or matched to your captured config+- [ ] The mono font matches your emulator, with no emoji-style logo substitutes+- [ ] Transcript lines copied or adapted from a real session log+- [ ] The statusline matches your own format if shown+- [ ] Codex and Gemini banners verified live, or explicitly flagged as unverifieddiff --git a/.claude/skills/vector-cover/SKILL.md b/.claude/skills/vector-cover/SKILL.mdnew file mode 100644index 0000000..08a64f7--- /dev/null+++ b/.claude/skills/vector-cover/SKILL.md@@ -0,0 +1,131 @@+---+name: vector-cover+description: >+ Generate flat vector editorial cover illustrations in a warm editorial style:+ near-black canvas, cream organic blob, serif display type, one terracotta+ accent, and thin line-art concept motifs (grids, node charts, dashed+ "unknown" paths, mountains, question marks). Output is code (HTML + inline+ SVG) rendered to a crisp 2400x960 PNG via headless Chrome. Use when you want+ a blog, article or X-article cover image, a "hero graphic", or "make a cover+ for <title>".+---++# Vector cover++## Configuration++The palette below is a default. Swap the hex values in `template.html` for your own brand, and keep the rule of exactly one accent color. Cover copy (eyebrow, title) comes from your article, not from this skill.++## Requirements++- Google Chrome or Chromium. `render.sh` finds it in the standard macOS locations or on `PATH`. Set `CHROME` to override.+- No other dependencies, and no browser automation setup.++## What this is++A designed vector graphic built as code: flat SVG on a small set of color tokens, rendered and screenshotted. It is not a diffusion image.++- Yes: flat vector, geometric line-art, precise serif type, one accent color.+- No: photorealism, gradients, glow, drop shadows, 3D, texture. If a request needs a photo, this is the wrong tool.++## Design system (default palette, configurable)++| Token | Hex | Use |+|---------|------------|----------------------------------------------|+| ink | `#141413` | background canvas |+| ivory | `#FAF9F5` | the organic blob and primary headline text |+| clay | `#D97757` | accent: eyebrow, rule, the "unknown" motif |+| grid | `rgba(20,20,19,.09)` | faint grid drawn inside the blob |+| undercurve | `#E7D9C4` | faint warm curves near the blob's base |++Rules:++- Exactly one accent color (clay by default). Never add a second hue.+- Serif for the eyebrow (italic) and the headline (bold). Sans only for tiny annotations.+- Keep the dark field mostly empty. 3-5 decorative marks at most, low opacity.+- Everything on the cream is clipped to the blob. Nothing floats half off it except the intentional motif that escapes (for example the dashed unknown path).++## Canvas++`1200 x 480` logical (2.5:1), rendered at 2x → **2400x960 PNG** (X-article cover+size). For a square social card use `1200x1200`; for a 16:9 slide use `1280x720`+and pass those to `render.sh`.++## Layout skeleton (every cover)++```++--------------------------------------------------------------++| ? (clay, top-right) |+| A Field Guide: (eyebrow, italic clay) .-''''-. |+| / BLOB \|+| Finding Your (headline, bold ivory)| + grid |+| Unknowns | + MOTIF |+| ___ (clay rule) \ / |+| '-....-' |++--------------------------------------------------------------++ left ~40% = type right ~60% = blob + concept motif+```++## The concept motif is the whole point++Every cover encodes the article's *idea* as a small line-art diagram inside the+blob. Pick / adapt from this library (or invent one in the same visual grammar):++| Article theme | Motif |+|---------------|-------|+| journey, growth, unknowns, "map vs territory" | rising curve, solid→dashed, node dots, a `?` and mountains at the frontier (the shipped `template.html`) |+| agents, systems, networks | 5-7 nodes joined by thin lines; one node filled clay = the active one |+| architecture, layers, stack | 3-4 stacked rounded rects, offset, one outlined clay |+| search, exploration, discovery | scattered dots + a dashed search path weaving between them + one magnifier ring |+| tradeoff, comparison, A vs B | two curves crossing; the winner solid, the other dashed |+| pipeline, process, workflow | left→right stages (small circles) joined by arrows; last one clay |+| iteration, loops, refinement | a spiral / concentric arcs tightening toward a center dot |++Motif drawing rules: strokes `#141413` at 2–2.6px, `stroke-linecap="round"`;+hollow nodes = `fill=ivory stroke=ink`; filled nodes = `fill=ink`; anything+"uncertain / future / unknown" is **dashed and clay**.++## Workflow++1. Get inputs from the user, or infer them from the article:+ - `eyebrow` (italic kicker, e.g. "A Field Guide:") - optional.+ - `title` (1–2 short lines; break it yourself for balance).+ - `theme` → pick a motif from the table above.+ - `size` (default 1200x480).+2. **Copy the template**: start from `template.html` in this folder. It already+ has the tokens, blob, grid, type block, and the journey motif wired up.+3. **Edit three regions only**:+ - the `<text>` nodes (eyebrow / two headline lines / rule width),+ - the CONCEPT MOTIF group (swap for the theme's motif),+ - the 3–5 decorative marks on the dark field.+ Leave the blob path, grid, and token colors alone unless deliberately restyling.+4. **Render**:+ ```bash+ .claude/skills/vector-cover/render.sh <in.html> <out.png> [W] [H]+ # e.g. render.sh cover.html cover.png -> 2400x960+ # render.sh cover.html card.png 1200 1200 -> 2400x2400+ ```+ `render.sh` launches its own headless Chrome. It needs no remote-debugging port and no browser automation setup.+5. **Verify visually**: Read the PNG. Check nothing is clipped off-canvas+ (the escaping motif must land on the dark field, not get cut), text fits the+ left ~40%, and the blob doesn't collide with the headline. Iterate on coords.+6. Deliver the single PNG. Keep working files in your project folder.++## Font note++The template uses a system serif stack (`Charter`/`Iowan Old Style`/Georgia).+For a pixel-exact editorial look, drop a `@font-face` (e.g. a Tiempos/Copernicus-+like serif) as a base64 `data:` URI at the top of the HTML - headless Chrome+renders embedded fonts fine. Do not link remote fonts (offline render).++## Gotchas++- **Off-canvas clipping**: `<text>` anchored past x=1200 (or the escaping motif)+ gets cut. Keep the "unknown" cluster inside the canvas on the dark strip right+ of the blob (~x 1120–1195).+- **Headline overflow**: at 72px the serif eats ~11 chars/line. Longer titles →+ drop to 60px or add a third line; re-check against the blob's left edge (~x498).+- **Blob edge vs grid**: the grid is clipped to the blob, so extend grid lines+ well past the blob bounds - clipping handles the rest.+- **Never** add gradients, shadows, blur, or a second accent color. One clay.+```diff --git a/.claude/skills/vector-cover/render.sh b/.claude/skills/vector-cover/render.shnew file mode 100755index 0000000..2603ae0--- /dev/null+++ b/.claude/skills/vector-cover/render.sh@@ -0,0 +1,32 @@+#!/usr/bin/env bash+# Render a vector-cover HTML file to a crisp PNG using headless Chrome.+# No remote-debugging port needed. This launches its own headless instance.+#+# Usage: ./render.sh <input.html> <output.png> [WIDTH] [HEIGHT]+# WIDTH/HEIGHT are the LOGICAL canvas size (default 1200x480).+# Output is 2x that (scale factor 2) => 2400x960 by default.+set -euo pipefail++IN="${1:?usage: render.sh input.html output.png [W] [H]}"+OUT="${2:?usage: render.sh input.html output.png [W] [H]}"+W="${3:-1200}"+H="${4:-480}"++# absolute file:// url+case "$IN" in+ /*) URL="file://$IN" ;;+ *) URL="file://$(cd "$(dirname "$IN")" && pwd)/$(basename "$IN")" ;;+esac++CHROME="${CHROME:-/Applications/Google Chrome.app/Contents/MacOS/Google Chrome}"+[ -x "$CHROME" ] || CHROME="/Applications/Chromium.app/Contents/MacOS/Chromium"+[ -x "$CHROME" ] || CHROME="$(command -v google-chrome || command -v chromium || true)"+[ -x "$CHROME" ] || { echo "Chrome/Chromium not found"; exit 1; }++"$CHROME" --headless --disable-gpu --hide-scrollbars --default-background-color=00000000 \+ --force-device-scale-factor=2 \+ --window-size="${W},${H}" \+ --screenshot="$OUT" \+ "$URL" >/dev/null 2>&1++echo "wrote $OUT ($((W*2))x$((H*2)))"diff --git a/.claude/skills/vector-cover/template.html b/.claude/skills/vector-cover/template.htmlnew file mode 100644index 0000000..6b01cc1--- /dev/null+++ b/.claude/skills/vector-cover/template.html@@ -0,0 +1,92 @@+<!doctype html>+<meta charset="utf-8">+<style>+ html,body{margin:0;padding:0;background:#141413}+ /* Render at 1200x480 logical; use --force-device-scale-factor=2 for a 2400x960 png. */+ svg{display:block}+ /* Serif stack close to an editorial display face. Swap in a webfont via @font-face if you want an exact match. */+ .eyebrow{font-family:"Charter","Iowan Old Style","Palatino Linotype",Georgia,serif;font-style:italic;font-weight:500}+ .display{font-family:"Charter","Iowan Old Style","Palatino Linotype",Georgia,serif;font-weight:700}+</style>++<!-- ============================================================+ TOKENS (default palette, swap to your own brand):+ ink #141413 background+ ivory #FAF9F5 blob + primary text+ clay #D97757 accent (eyebrow, rule, "unknown" motifs)+ grid rgba(20,20,19,.09) faint lines inside the ivory blob+ CANVAS: 1200 x 480 (2.5:1). Left ~40% = type. Right ~60% = blob + motif.+ ============================================================ -->++<svg width="1200" height="480" viewBox="0 0 1200 480" xmlns="http://www.w3.org/2000/svg">++ <!-- background -->+ <rect width="1200" height="480" fill="#141413"/>++ <!-- decorative motifs scattered on the dark field (keep sparse: 3-5 max) -->+ <g fill="none" stroke-linecap="round">+ <circle cx="330" cy="118" r="17" stroke="rgba(250,249,245,.14)" stroke-width="1.5" stroke-dasharray="3 5"/>+ <circle cx="300" cy="300" r="9" stroke="rgba(250,249,245,.12)" stroke-width="1.5" stroke-dasharray="3 5"/>+ <text x="392" y="438" class="display" font-size="30" fill="rgba(250,249,245,.10)">?</text>+ </g>++ <!-- ============ ORGANIC BLOB (the signature shape) ============ -->+ <defs>+ <path id="blob" d="M 700 92+ C 552 86 466 188 498 270+ C 520 340 500 398 602 412+ C 716 426 800 404 884 416+ C 986 430 1074 414 1096 330+ C 1112 262 1096 168 1010 118+ C 924 80 812 82 700 92 Z"/>+ <clipPath id="blobClip"><use href="#blob"/></clipPath>+ </defs>+ <use href="#blob" fill="#FAF9F5"/>++ <!-- everything drawn on the cream is clipped to the blob -->+ <g clip-path="url(#blobClip)">+ <!-- faint grid -->+ <g stroke="rgba(20,20,19,.09)" stroke-width="1">+ <line x1="530" y1="60" x2="530" y2="440"/><line x1="600" y1="60" x2="600" y2="440"/>+ <line x1="670" y1="60" x2="670" y2="440"/><line x1="740" y1="60" x2="740" y2="440"/>+ <line x1="810" y1="60" x2="810" y2="440"/><line x1="880" y1="60" x2="880" y2="440"/>+ <line x1="950" y1="60" x2="950" y2="440"/><line x1="1020" y1="60" x2="1020" y2="440"/>+ <line x1="1090" y1="60" x2="1090" y2="440"/>+ <line x1="470" y1="130" x2="1200" y2="130"/><line x1="470" y1="200" x2="1200" y2="200"/>+ <line x1="470" y1="270" x2="1200" y2="270"/><line x1="470" y1="340" x2="1200" y2="340"/>+ </g>+ <!-- faint warm undercurves near the base -->+ <g fill="none" stroke="#E7D9C4" stroke-width="1.5" opacity=".7">+ <path d="M 500 410 C 640 356 820 356 1160 392"/>+ <path d="M 500 442 C 660 392 860 396 1160 428"/>+ </g>+ </g>++ <!-- ============ CONCEPT MOTIF: known path -> unknown ============ -->+ <!-- solid rise (the mapped, known work) -->+ <path d="M 560 382 C 656 356 730 332 806 306 C 892 276 958 244 1010 214"+ fill="none" stroke="#141413" stroke-width="2.6" stroke-linecap="round"/>+ <!-- dashed continuation leaving the blob (the unknown) -->+ <path d="M 1010 214 C 1070 190 1116 176 1158 158"+ fill="none" stroke="#141413" stroke-width="2.2" stroke-linecap="round" stroke-dasharray="2 8" opacity=".85"/>++ <!-- nodes -->+ <circle cx="560" cy="382" r="6" fill="#141413"/> <!-- start (filled) -->+ <circle cx="806" cy="306" r="8" fill="#FAF9F5" stroke="#141413" stroke-width="2.4"/><!-- mid (hollow) -->+ <circle cx="1010" cy="214" r="8" fill="#141413"/> <!-- last known (filled) -->+ <circle cx="1176" cy="150" r="11" fill="none" stroke="#D97757" stroke-width="2" stroke-dasharray="3 4"/><!-- the unknown -->+ <text x="1162" y="112" class="display" font-size="30" fill="#D97757">?</text>++ <!-- mountains near the frontier (outline) -->+ <g fill="none" stroke="#141413" stroke-width="2" stroke-linejoin="round" opacity=".8">+ <path d="M 900 268 l 22 -40 l 22 40 Z"/>+ <path d="M 940 268 l 20 -34 l 20 34 Z"/>+ </g>++ <!-- ============ TYPE (left column) ============ -->+ <text x="64" y="150" class="eyebrow" font-size="27" fill="#D97757" letter-spacing=".2">A Field Guide:</text>+ <text x="62" y="230" class="display" font-size="72" fill="#FAF9F5">Finding Your</text>+ <text x="62" y="306" class="display" font-size="72" fill="#FAF9F5">Unknowns</text>+ <rect x="66" y="342" width="84" height="4" rx="2" fill="#D97757"/>++</svg>diff --git a/.claude/skills/youtube-video-kit/SKILL.md b/.claude/skills/youtube-video-kit/SKILL.mdnew file mode 100644index 0000000..723ebf1--- /dev/null+++ b/.claude/skills/youtube-video-kit/SKILL.md@@ -0,0 +1,115 @@+---+name: youtube-video-kit+description: >+ Produce YouTube-ready video packaging: a branded thumbnail, an animated+ opening title, background music via ElevenLabs Music, and the upload metadata+ bundle. Use whenever you make or publish a video (deep dives, demos, blog+ companions) or want thumbnails, intros, video music, or channel and playlist+ consistency.+---++# YouTube video kit++Package videos like a channel, not a screen recording. The template fuses two reference styles: cinematic stills with minimal text (the Anthropic channel) and dark IDE screenshots with huge boxed text, one accent word, readable at 320px (AI-coding channels). It uses the dark lane-art language from the `social-media-kit` skill.++## Configuration++Scripts read environment variables, so nothing personal is hardcoded.++| Setting | Env var | Default |+|---|---|---|+| Signature text (bottom-left) | `BRAND_URL` | `yourblog.example` |+| Avatar PNG with a white background (optional) | `AVATAR_PATH` | unset (no avatar drawn) |+| Accent word color | `ACCENT` | `D97757` (terracotta, configurable) |+| Fonts | `HEADLINE_FONT`, `MONO_FONT` | macOS Helvetica Neue and Menlo, DejaVu on Linux |+| Opening eyebrow and chip text | `OPEN_EYEBROW`, `OPEN_CHIP` | example strings |+| ElevenLabs key | `ELEVENLABS_API_KEY` | none, required for music |++Your channel ID, handle and avatar belong in your own config.++## Requirements++- Python 3 with Pillow+- ffmpeg+- `ELEVENLABS_API_KEY` for music generation+- A CDP-driven Chrome logged in to YouTube Studio, for publishing (for example the `browser-harness` skill)++## Thumbnail++`scripts/ytthumb.py`, 1280x720 (rendered at 2560x1440, then downscaled). Keep the template identical across a playlist and vary only headline, accent word and lane pattern.++- Background `#0A0B0D` plus lane art on the right third, with green and red end dots.+- Your avatar, if you set one, is keyed (white above 235 becomes transparent), resized with NEAREST, and placed bottom-right over the lanes. Use one consistent avatar as the channel identity rather than varying photo cutouts.+- Headline: 2 lines at most, about 5 words, bold sans around 210px at 2x, white, with one accent word. It must stay legible at 320px wide (squint test).+- One mono chip with real numbers and a green dot.+- Signature and a cursor block, bottom-left.++```bash+AVATAR_PATH=./avatar.png BRAND_URL=myblog.dev python3 .claude/skills/youtube-video-kit/scripts/ytthumb.py "MY AI TESTS|MY PRODUCT." AI "7 passed · 4 failed" thumb.png+```++## Opening title++`scripts/ytopen.py [out.mp4]` renders 4.2s at 30fps, 1920x1080, with PIL frames piped to ffmpeg (rawvideo to libx264 crf 19). Sequence: lanes draw in, staggered (0-1.2s); eyebrow (0.6s); headline fades in by line (0.9, 1.2, 1.5s, accent word colored); chip (2.2s); avatar rises (1.6-2.6s); signature with a blinking cursor (2.6s); 0.5s fade to black. Edit `HEAD` in the script for the headline.++To join it to the main video, give the opening a silent AAC track (`-f lavfi -i anullsrc=r=44100:cl=mono -shortest`) matching the main video's audio params, then use the concat demuxer with `-c copy`.++## Music with ElevenLabs++```bash+curl -X POST "https://api.elevenlabs.io/v1/music" \+ -H "xi-api-key: $ELEVENLABS_API_KEY" -H "Content-Type: application/json" \+ -d '{"prompt": "<style prompt>", "music_length_ms": 250000}' -o bgm.mp3+```++Check that your plan includes the Music API first. For a narration bed, ask for "very minimal, unobtrusive, no melody hooks, no vocals". Mix the bed about 20dB under the voice-over, and louder only during the title:++```bash+ffmpeg -i video.mp4 -i bgm.mp3 -filter_complex \+ "[1:a]atrim=0:<dur>,volume='if(lt(t,4.2),0.45,0.13)':eval=frame,afade=t=in:d=1.2,afade=t=out:st=<dur-3>:d=3[bg];\+ [0:a][bg]amix=inputs=2:duration=first:normalize=0[a]" \+ -map 0:v -map "[a]" -c:v copy -c:a aac -b:a 160k out.mp4+```++Sanity check with `volumedetect` on a narration window: mean near -25dB, max at or above -6dB. Store generated tracks durably so a playlist reuses the same music family.++## Storyboarding: illustrate, do not slide++The principle: every frame should show the concept being narrated, not print it. A text-list frame is a slide, and viewers skim it.++- For each voice-over sentence ask "what is the picture of this idea?" A loop that eats itself gets a drawn loop. Two lanes converging get drawn converging. Fall back to typography only for the one or two anchor statements.+- Screenshots count as illustration only with a guided camera: a cursor moving to the thing discussed, click ripples, a highlight wrapping the exact row, zooms. A static screenshot is a slide.+- Voice-over pacing: on non-illustration frames (rules, recaps, quotes) narrate faster, with shorter sentences or trimmed silence. Slow down only where the visual needs watching time (footage, terminal replay). A boring frame with slow narration is the biggest drop-off combination.+- Animation speed: cursor hops 0.4s or less, element fade-ins 0.5s or less, and no static frame longer than 2.5s without something moving (cursor, spinner, highlight pulse).++## Shot-segment QA before assembling++A highlight box once shipped floating over empty page space because its coordinates were guessed. Every screenshot segment passes this before concat:++1. Highlights are in card coordinates (the screenshot scaled to card width). Cursor waypoints are in screen coordinates. Do not mix them.+2. A highlight wraps one actual UI row or element edge to edge. It never slices through a row or floats in whitespace. Snap it to the real bounding box read off the image.+3. Audit before rendering: paste the highlight rect onto the scaled screenshot with PIL and look at it. After rendering, extract a frame at each highlight's midpoint (`ffmpeg -ss <t> -frames:v 1`) and look at it.+4. Highlights must not overlap zoom windows. The highlight rect does not scale with zoom, so end it before the zoom starts.+5. Cursor waypoints and click ripples land on the element being narrated, not in dead space.++## Upload bundle and Studio publishing++Per video, keep in the kit folder: the final mp4, the thumbnail PNG, and `youtube-description.txt` (hook line, chapters, blog link first, skill links, tags). Title formula: benefit, plus the named product, plus the "AI agent" keyword, 70 characters or fewer. For playlist consistency use the same thumbnail template, the same opening and the same music family.++To publish through YouTube Studio in a logged-in Chrome (your own channel):++- The upload dialog's file input is sometimes in shadow DOM. Use `cdp("DOM.performSearch", query="input[type=file]")` plus `DOM.setFileInputFiles` by nodeId.+- Title and description boxes are `#textbox` elements: select all, then type.+- Thumbnail: `input#file-loader`.+- Audience: click the `VIDEO_MADE_FOR_KIDS_NOT_MFK` radio through JS `.click()`.+- Playlist: the dropdown checkbox in the dialog.+- Advance: `#next-button` three times through JS click. Set visibility with the PUBLIC radio through JS `.click()`, then `#done-button`.+- Deleting an old upload: video edit page, Options, Delete, consent checkbox, Delete forever.+- Replacing a video file creates a new video ID, so update every posted link. An X reply must be deleted and reposted. LinkedIn posts and Reddit comments are editable.++## Definition of done++- [ ] Thumbnail passes the 320px squint test, with signature (and avatar if you use one)+- [ ] Opening uses the channel animation, and terminal shots follow the `terminal-replica` skill+- [ ] Music bed generated, mixed and level-checked, and tracks stored durably+- [ ] Upload bundle complete for manual publishdiff --git a/.claude/skills/youtube-video-kit/scripts/ytopen.py b/.claude/skills/youtube-video-kit/scripts/ytopen.pynew file mode 100644index 0000000..9091c9f--- /dev/null+++ b/.claude/skills/youtube-video-kit/scripts/ytopen.py@@ -0,0 +1,161 @@+#!/usr/bin/env python3+"""Animated opening title, 4.2s @30fps 1920x1080, channel template.+Lanes draw in -> headline fades word by word -> chip + avatar + signature -> fade out.+Pipes RGB24 frames to ffmpeg.++Usage: python3 ytopen.py [out.mp4]+Env (all optional): AVATAR_PATH, BRAND_URL, ACCENT (hex), HEADLINE_FONT, MONO_FONT,+OPEN_EYEBROW, OPEN_CHIP. Edit HEAD below for the headline."""+from PIL import Image, ImageDraw, ImageFont+import subprocess, math, os, sys++def _first(*paths):+ for p in paths:+ if p and os.path.exists(p):+ return p+ raise SystemExit("No font found: set HEADLINE_FONT / MONO_FONT to a .ttf or .ttc path")+++HN = _first(os.environ.get("HEADLINE_FONT"), "/System/Library/Fonts/HelveticaNeue.ttc",+ "/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf")+MEN = _first(os.environ.get("MONO_FONT"), "/System/Library/Fonts/Menlo.ttc",+ "/usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf")+++def _f(path, size, idx=0):+ return ImageFont.truetype(path, size, index=idx) if path.endswith(".ttc") else ImageFont.truetype(path, size)+++def _hex(name, default):+ h = (os.environ.get(name) or default).lstrip("#")+ return tuple(int(h[i:i + 2], 16) for i in (0, 2, 4))+++BRAND_URL = os.environ.get("BRAND_URL", "yourblog.example")+AVATAR = os.environ.get("AVATAR_PATH", "") # optional: PNG with white background++W, H = 1920, 1080+FPS = 30+DUR = 4.2+N = int(DUR * FPS)+BG = (10, 11, 13)+LINE = (67, 70, 76)+NODE = (154, 157, 162)+TXT = (245, 246, 247)+MUT = (150, 155, 163)+GREEN = (61, 214, 140)+RED = (242, 85, 90)+CORAL = _hex("ACCENT", "D97757")++f_eyebrow = _f(MEN, 26)+f_big = _f(HN, 96, 1)+f_chip = _f(MEN, 32)+f_sig = _f(MEN, 30, 1)++# avatar keyed (optional)+av = None+if AVATAR and os.path.exists(AVATAR):+ av = Image.open(AVATAR).convert("RGBA")+ px = av.load()+ for yy in range(av.height):+ for xx in range(av.width):+ r, g, b, a = px[xx, yy]+ if r > 235 and g > 235 and b > 235:+ px[xx, yy] = (r, g, b, 0)+ av = av.resize((640, 640), Image.NEAREST)++LANES = [(170 + i * 130) for i in range(7)]+STS = ["pass", "pass", "fail", "pass", "fail", "pass", "pass"]+X0, X1 = 1150, 1850++HEAD = [("How I test", None), ("my product", None), ("with an AI agent", "AI")]+++def ease(t):+ return 0 if t <= 0 else 1 if t >= 1 else (1 - math.cos(math.pi * t)) / 2+++def frame(i):+ t = i / FPS+ img = Image.new("RGB", (W, H), BG)+ d = ImageDraw.Draw(img)+ # 1) lanes draw 0.0-1.2+ lp = ease(t / 1.2)+ for li, y in enumerate(LANES):+ stagger = ease((t - li * 0.06) / 1.0)+ xe = X0 + (X1 - X0) * stagger+ if xe <= X0:+ continue+ if STS[li] == "fail":+ x = X0+ while x < xe:+ d.line([(x, y), (min(x + 10, xe), y)], fill=LINE, width=3)+ x += 24+ else:+ d.line([(X0, y), (xe, y)], fill=LINE, width=3)+ d.ellipse([X0 - 7, y - 7, X0 + 7, y + 7], fill=NODE)+ if stagger >= 0.999:+ c = GREEN if STS[li] == "pass" else RED+ d.ellipse([X1 - 9, y - 9, X1 + 9, y + 9], fill=c)+ # avatar fades/rises 1.6-2.6+ ap = ease((t - 1.6) / 1.0)+ if ap > 0 and av is not None:+ yoff = int(40 * (1 - ap))+ a2 = av.copy()+ if ap < 1:+ alpha = a2.getchannel("A").point(lambda v: int(v * ap))+ a2.putalpha(alpha)+ img.paste(a2, (1180, H - 660 + yoff), a2)+ d = ImageDraw.Draw(img)+ # eyebrow 0.6+ ep = ease((t - 0.6) / 0.5)+ if ep > 0:+ d.text((110, 200), os.environ.get("OPEN_EYEBROW", "AGENTIC DOGFOODING"),+ font=f_eyebrow, fill=(int(MUT[0]*ep), int(MUT[1]*ep), int(MUT[2]*ep)))+ # headline lines fade 0.9 / 1.2 / 1.5+ for k, (ln, accent) in enumerate(HEAD):+ p = ease((t - (0.9 + k * 0.3)) / 0.5)+ if p <= 0:+ continue+ x = 106+ y = 280 + k * 118+ for word in ln.split(" "):+ base = CORAL if word == accent else TXT+ col = tuple(int(c * p) for c in base)+ d.text((x, y), word, font=f_big, fill=col)+ x += d.textlength(word + " ", font=f_big)+ # chip 2.2+ cp = ease((t - 2.2) / 0.5)+ if cp > 0:+ cy = 680+ d.ellipse([116, cy + 10, 132, cy + 26], fill=tuple(int(c * cp) for c in GREEN))+ d.text((150, cy), os.environ.get("OPEN_CHIP", "134 cases designed · run · graded · filed back"),+ font=f_chip, fill=tuple(int(c * cp) for c in MUT))+ # signature 2.6+ sp = ease((t - 2.6) / 0.5)+ if sp > 0:+ sx, sy = 110, H - 120+ d.text((sx, sy), BRAND_URL, font=f_sig, fill=tuple(int(c * sp) for c in (210, 213, 218)))+ w = d.textlength(BRAND_URL, font=f_sig)+ # blinking cursor+ if int(t * 2) % 2 == 0:+ d.rectangle([sx + w + 10, sy + 2, sx + w + 26, sy + 34], fill=tuple(int(c * sp) for c in GREEN))+ # fade out last 0.5s+ if t > DUR - 0.5:+ f = (t - (DUR - 0.5)) / 0.5+ img = Image.eval(img, lambda v: int(v * (1 - f)))+ return img+++OUT = sys.argv[1] if len(sys.argv) > 1 else "opening.mp4"+proc = subprocess.Popen([+ "ffmpeg", "-y", "-f", "rawvideo", "-pix_fmt", "rgb24", "-s", f"{W}x{H}",+ "-r", str(FPS), "-i", "-",+ "-c:v", "libx264", "-crf", "19", "-pix_fmt", "yuv420p",+ OUT+], stdin=subprocess.PIPE)+for i in range(N):+ proc.stdin.write(frame(i).tobytes())+proc.stdin.close()+proc.wait()+print("done", OUT)diff --git a/.claude/skills/youtube-video-kit/scripts/ytthumb.py b/.claude/skills/youtube-video-kit/scripts/ytthumb.pynew file mode 100644index 0000000..606aae9--- /dev/null+++ b/.claude/skills/youtube-video-kit/scripts/ytthumb.py@@ -0,0 +1,138 @@+#!/usr/bin/env python3+"""YouTube thumbnail, channel template.++Template = dark lane-art bg + huge bold headline with one accent word++ your avatar (right, optional) + data chip + signature.+Playlist consistency: same layout, vary headline/accent/lane pattern only.++Env (all optional): AVATAR_PATH, BRAND_URL, ACCENT (hex, default D97757),+HEADLINE_FONT, MONO_FONT.+Usage: python3 ytthumb.py "MY AI TESTS|MY PRODUCT." AI "7 passed · 4 failed" out.png+"""+from PIL import Image, ImageDraw, ImageFont, ImageFilter+import math, os, sys++def _first(*paths):+ for p in paths:+ if p and os.path.exists(p):+ return p+ raise SystemExit("No font found: set HEADLINE_FONT / MONO_FONT to a .ttf or .ttc path")+++HN = _first(os.environ.get("HEADLINE_FONT"), "/System/Library/Fonts/HelveticaNeue.ttc",+ "/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf")+MEN = _first(os.environ.get("MONO_FONT"), "/System/Library/Fonts/Menlo.ttc",+ "/usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf")+++def _f(path, size, idx=0):+ return ImageFont.truetype(path, size, index=idx) if path.endswith(".ttc") else ImageFont.truetype(path, size)+++def _hex(name, default):+ h = (os.environ.get(name) or default).lstrip("#")+ return tuple(int(h[i:i + 2], 16) for i in (0, 2, 4))+++BRAND_URL = os.environ.get("BRAND_URL", "yourblog.example")+AVATAR = os.environ.get("AVATAR_PATH", "") # optional: PNG with white background++W, H = 2560, 1440 # 2x of 1280x720+BG = (10, 11, 13)+LINE = (67, 70, 76)+NODE = (154, 157, 162)+TXT = (245, 246, 247)+MUT = (150, 155, 163)+GREEN = (61, 214, 140)+RED = (242, 85, 90)+CORAL = _hex("ACCENT", "D97757") # one accent word color, configurable++f_big = _f(HN, 210, 1)+f_chip = _f(MEN, 54)+f_sig = _f(MEN, 44, 1)+++def lane_field(d, x0, x1, ys, statuses, circles=()):+ circ = list(circles)+ for i, y in enumerate(ys):+ dash = None if statuses[i] != "fail" else (14, 18)+ # simple straight lanes with optional circle break+ brk = next(((cx, r) for cx, li, r in circ if li == i), None)+ segs = [(x0, x1)] if not brk else [(x0, brk[0]-brk[1]-6), (brk[0]+brk[1]+6, x1)]+ for (a, b) in segs:+ if dash:+ x = a+ while x < b:+ d.line([(x, y), (min(x+14, b), y)], fill=LINE, width=4)+ x += 32+ else:+ d.line([(a, y), (b, y)], fill=LINE, width=4)+ d.ellipse([x0-9, y-9, x0+9, y+9], fill=NODE)+ endc = GREEN if statuses[i] == "pass" else RED if statuses[i] == "fail" else NODE+ d.ellipse([x1-12, y-12, x1+12, y+12], fill=endc)+ for cx, li, r in circ:+ y = ys[li]+ d.ellipse([cx-r, y-r, cx+r, y+r], outline=LINE, width=4)+ d.ellipse([cx-r-8, y-8, cx-r+8, y+8], fill=NODE)+ d.ellipse([cx+r-8, y-8, cx+r+8, y+8], fill=NODE)+++def avatar_cut(size):+ """avatar, near-white keyed to transparent. Returns None if no AVATAR_PATH."""+ if not AVATAR or not os.path.exists(AVATAR):+ return None+ im = Image.open(AVATAR).convert("RGBA")+ px = im.load()+ w, h = im.size+ for yy in range(h):+ for xx in range(w):+ r, g, b, a = px[xx, yy]+ if r > 235 and g > 235 and b > 235:+ px[xx, yy] = (r, g, b, 0)+ return im.resize((size, size), Image.NEAREST)+++def signature(d, x, y):+ t = BRAND_URL+ d.text((x, y), t, font=f_sig, fill=(210, 213, 218))+ w = d.textlength(t, font=f_sig)+ d.rectangle([x + w + 16, y + 4, x + w + 40, y + 52], fill=GREEN)+++def thumb(headline_lines, accent_word, chip_txt, out):+ img = Image.new("RGB", (W, H), BG)+ d = ImageDraw.Draw(img)+ # lane art behind avatar zone, right third+ ys = [200 + i * 180 for i in range(7)]+ lane_field(d, 1490, 2450, ys,+ ["pass", "pass", "fail", "pass", "fail", "pass", "pass"],+ circles=[(1900, 3, 120)])+ # avatar on right, sitting on the lanes+ av = avatar_cut(1120)+ if av:+ img.paste(av, (W - 1150, H - 1140), av)+ d = ImageDraw.Draw(img)+ # headline top-left, accent word colored+ y = 150+ for ln in headline_lines:+ x = 110+ for word in ln.split(" "):+ col = CORAL if word.strip(".") == accent_word else TXT+ d.text((x, y), word, font=f_big, fill=col)+ x += d.textlength(word + " ", font=f_big)+ y += 232+ # chip+ cy = y + 60+ d.ellipse([122, cy+18, 146, cy+42], fill=GREEN)+ d.text((170, cy), chip_txt, font=f_chip, fill=MUT)+ signature(d, 110, H - 130)+ img.resize((1280, 720), Image.LANCZOS).save(out)+ print("saved", out)+++if __name__ == "__main__":+ a = sys.argv[1:]+ head = (a[0] if a else "MY AI TESTS|MY PRODUCT.").split("|")+ thumb(head, a[1] if len(a) > 1 else "AI",+ a[2] if len(a) > 2 else "7 passed · 4 failed · every failure filed",+ a[3] if len(a) > 3 else "yt-thumb.png")diff --git a/.cursor-plugin/plugin.json b/.cursor-plugin/plugin.jsonindex 5c13d6c..09b6f83 100644--- a/.cursor-plugin/plugin.json+++ b/.cursor-plugin/plugin.json@@ -1,7 +1,7 @@{"name": "cog-second-brain","displayName": "COG: Agentic Second Brain",- "version": "3.12.0",+ "version": "3.16.0","description": "Self-evolving second brain powered by AI agents, Obsidian markdown, and Git. 33 skills, 10 agents (6 workers + 4 read-only verifiers), people CRM with tiered enrichment. Closed-loop harness release: V-model verification lifecycle with criterion-traced evidence, risk lanes, multi-session ultragoals with a north-star acceptance gate, craft skills for writing and visuals, and paired anti-slop design skills for marketing and product UI. Works with Claude Code, Cursor, Kiro, Gemini CLI, and Codex.","author": {"name": "Huy Tieu",@@ -205,6 +205,56 @@"name": "product-ui-taste","path": ".claude/skills/product-ui-taste/SKILL.md","description": "Anti-slop skill for dense product surfaces (dashboards, tables, forms, wizards, admin consoles) - frame-first, correct at every edge case real data produces"+ },+ {+ "name": "blog-publish",+ "path": ".claude/skills/blog-publish/SKILL.md",+ "description": "Write and publish a post to your own static blog: TL;DR, ASCII art, markdown twin for agents, deploy, and social distribution"+ },+ {+ "name": "feature-doc",+ "path": ".claude/skills/feature-doc/SKILL.md",+ "description": "Document a shipped feature from the live app: real screenshots and a screen recording, a docs article with how-to and use cases, verified before publish"+ },+ {+ "name": "release-comms",+ "path": ".claude/skills/release-comms/SKILL.md",+ "description": "Turn a deployment runsheet and a GitHub milestone into a customer release note with real media, docs updates, and a Slack announcement draft"+ },+ {+ "name": "release-video",+ "path": ".claude/skills/release-video/SKILL.md",+ "description": "Turn a product release (the list of shipped items plus real screen recordings) into a motion recap video and one explained demo per feature, with sound effects tied to on-screen motion and a composed music bed. Deterministic HTML scenes rendered frame by frame, ElevenLabs for sound effects and music, ffmpeg for the mix. Use when asked for a release video, a changelog video, a feature recap reel, or demo clips for release notes and docs."+ },+ {+ "name": "slop-gate",+ "path": ".claude/skills/slop-gate/SKILL.md",+ "description": "Deterministic pre-publish scan that refuses AI-slop tells in anything about to be written, published, or sent: files, artifacts, slide titles, table headers, diagram labels, chat messages, commit messages. Use before publishing or sending any deliverable, in CI, or wired as a Claude Code hook so the check runs without being remembered. The editorial counterpart is no-ai-slop, which rewrites; this one blocks."+ },+ {+ "name": "social-media-kit",+ "path": ".claude/skills/social-media-kit/SKILL.md",+ "description": "Attach native media (teaser video, GIF, card images) to every social post, with per-platform upload steps"+ },+ {+ "name": "terminal-replica",+ "path": ".claude/skills/terminal-replica/SKILL.md",+ "description": "Reproduce your real terminal and CLI agents (Claude Code, Codex, Gemini CLI) faithfully in graphics and video frames"+ },+ {+ "name": "vector-cover",+ "path": ".claude/skills/vector-cover/SKILL.md",+ "description": "Flat vector editorial cover illustrations in HTML and SVG, rendered to a 2400x960 PNG with headless Chrome"+ },+ {+ "name": "voice-baseline",+ "path": ".claude/skills/voice-baseline/SKILL.md",+ "description": "Measure your own writing corpus for the words and sentence shapes you over-use, so an agent writing in your voice stops amplifying your tics into a style. Produces a counted baseline file and checks any new draft against it. Use when an agent's drafts start sounding like a caricature of you, before publishing anything written in your voice, or every ten new pieces to re-measure."+ },+ {+ "name": "youtube-video-kit",+ "path": ".claude/skills/youtube-video-kit/SKILL.md",+ "description": "YouTube packaging: thumbnail, animated opening title, ElevenLabs music bed, and the upload metadata bundle"}],"agents": [diff --git a/AGENTS.md b/AGENTS.mdindex b3cb512..19604f4 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -693,6 +693,128 @@ The following 7 skills raise output quality on writing and visual work. They enc---+### /release-comms++**Description:** Turn a deployment runsheet and a GitHub milestone into a customer release note, docs updates, and a Slack announcement draft.++**Triggers:**+- "cover today's release"+- A deployment just finished and the milestone is closed++**Purpose:** Release communication drifts from what shipped when it is written from memory. This skill reads the milestone and the runsheet, pulls real screenshots and videos from the issues and PRs, and drafts every outward message for your review.++**What it does:**+1. Collects shipped items from the milestone and the runsheet+2. Writes a benefit-led release note with real media+3. Updates docs, including older articles the release makes stale+4. Drafts the Slack announcement; nothing posts without your yes++---++### /feature-doc++**Description:** Document a shipped feature from the live app: screenshots, a screen recording, and a docs article with how-to and use cases.++**Triggers:**+- "write the doc for issue #123"+- A feature shipped without user documentation++**Purpose:** Docs written from a spec show a product that does not exist. This skill drives the real app to capture evidence, so every screenshot and step matches what users see.++**What it does:**+1. Reads the issue and its PRs for scope+2. Drives the live app and captures screenshots plus a screen recording+3. Writes the article: how-to steps, use cases, sample workflows+4. Verifies the article against acceptance criteria with a read-only verifier++---++### /blog-publish++**Description:** Write and publish a post to your own static blog, with social distribution.++**Triggers:**+- "publish this to my blog"+- A draft is ready to go live++**Purpose:** A post needs more than text: a TL;DR, embedded links, a figure, an agent-readable copy, and a deploy that you check afterwards. This skill runs that checklist end to end.++**What it does:**+1. Applies the content checklist (bulleted TL;DR, embedded links, ASCII art)+2. Writes a markdown twin for agents+3. Builds and deploys with your deploy command, then fetches the live URL+4. Hands off to social-media-kit for distribution++---++### /social-media-kit++**Description:** Attach native media (teaser video, GIF, card images) to every social post.++**Triggers:**+- "make the social kit for this post"+- Any post to X, LinkedIn, or Reddit++**Purpose:** Text-only posts get less reach. This skill makes the media from the post itself and covers the upload steps per platform, with a screenshot check after each post.++**What it does:**+1. Builds card images and a terminal banner from templates+2. Cuts a short teaser video or GIF+3. Attaches media per platform and screenshot-verifies the live post++---++### /youtube-video-kit++**Description:** YouTube packaging: thumbnail, animated opening title, music bed, and upload metadata.++**Triggers:**+- "make a thumbnail and intro for this video"+- A video is ready to publish++**Purpose:** Consistent packaging makes a channel recognizable. This skill renders the thumbnail and opening title from your brand settings and composes music to the video length.++**What it does:**+1. Renders a branded thumbnail+2. Renders an animated opening title+3. Generates a music bed with ElevenLabs+4. Writes the title, description, chapters, and tags++---++### /terminal-replica++**Description:** Reproduce your real terminal and CLI agents faithfully in graphics and video frames.++**Triggers:**+- "draw a Claude Code terminal for this post"+- Any asset that shows a terminal or agent transcript++**Purpose:** A generic hacker terminal reads as fake to anyone who uses the tool. This skill captures your real theme, font, prompt, and statusline first, then renders from those values.++**What it does:**+1. Captures a reference screenshot of your terminal+2. Extracts colors, font, prompt, and statusline+3. Renders frames that match the reference++---++### /vector-cover++**Description:** Flat vector editorial cover illustrations rendered to PNG.++**Triggers:**+- "make a cover image for this article"++**Purpose:** A cover built from code is editable and stays on-style. This skill composes HTML and inline SVG from a template and renders a 2400x960 PNG with headless Chrome.++**What it does:**+1. Picks concept motifs for the article+2. Fills the HTML template+3. Renders the PNG and checks it visually++---+### /voice-baseline**Description:** Measure your own writing corpus for the words and sentence shapes you over-use, so an agent writing in your voice stops amplifying your tics into a style.diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 10d9a37..6b3f7a3 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -2,6 +2,34 @@All notable changes to COG (Cognition + Obsidian + Git) will be documented in this file.+## [3.16.0] - 2026-10-23++### Added++#### PM release and content skills+Seven skills that cover what happens after code ships: the release note, the docs article, the demo media, and the posts that announce it. Each one came from a real release cycle and was generalized; product names, channels, repos, and brand values now come from config.++- `release-comms` turns a deployment runsheet and a GitHub milestone into a customer release note with real screenshots and videos from the issues and PRs, docs updates (including older articles the release makes stale), and a Slack announcement draft. Nothing posts without your approval.+- `feature-doc` drives the live app, captures screenshots and a screen recording, and writes a docs article with how-to steps and use cases. A read-only verifier checks it against acceptance criteria before it is done.+- `blog-publish` runs a post from draft to live: bulleted TL;DR, embedded links, ASCII art, a markdown twin for agents, your deploy command, a fetch of the live URL, then social distribution.+- `social-media-kit` makes card images, a terminal banner, and a teaser video or GIF for every post, with upload steps per platform and a screenshot check of the live post.+- `youtube-video-kit` renders a thumbnail and an animated opening title from your brand settings, composes a music bed with ElevenLabs, and writes the upload metadata.+- `terminal-replica` captures your real terminal theme, font, prompt, and statusline before drawing any terminal in a graphic, so agent screenshots look like the real tool.+- `vector-cover` renders flat vector cover illustrations from an HTML and SVG template to a 2400x960 PNG with headless Chrome.++### Changed++- `release-video` gains `plain_demo.py` for demos without a window frame and `human_input.py` for a visible cursor, typing, and corrections, so recorded demos read as a person using the product. `compose_demo.py`, `engine.js`, and `render.py` carry matching fixes.+- `product-ui-taste` gains `references/house-ui-rules.md` (rules for status indicators, external objects rendered in their source's anatomy, controls that never wrap, no hidden overflow menus) and `references/semantic-zoom.md` (management views where zooming in shows richer detail per level).+- `editorial-illustrations` gains a blog figure kit (`assets/blog-figure-kit.html`, `references/blog-figure-kit.md`).+- `no-ai-slop` syncs its eval and source notes with the maintainer's copy.++### Fixed++- `cog-update.sh` now registers files that had never shipped to installed users: `editorial-illustrations/assets/gallery.html` and the `no-ai-slop` `LICENSE`, `SOURCE.md`, and `eval.md`.+- `.cursor-plugin/plugin.json` was three releases behind (3.12.0, 33 skills); it now lists all 43 skills.+- Skill count in README, CLAUDE.md, and AGENT-SUPPORT.md updated from 33 to 43.+## [3.15.0] - 2026-10-02### Addeddiff --git a/CLAUDE.md b/CLAUDE.mdindex abdc68b..3d9b6f2 100644--- a/CLAUDE.md+++ b/CLAUDE.md@@ -227,7 +227,7 @@ Role packs live in `.claude/roles/`. New roles can be added by dropping a file f- `COMPETITIVE-WATCHLIST.md` — Companies/people being tracked### Framework files (updated via `cog-update.sh` or `/update-cog`)-- `.claude/skills/`: Claude Code skills (33 skills)+- `.claude/skills/`: Claude Code skills (43 skills)- `.claude/agents/` - Worker and verifier agent definitions (10 agents)- `.claude/roles/` — Role packs for personalized recommendations- `.claude/lib/` - Harness helper scripts (`checkpoint.sh`, `lane-classify.sh`)diff --git a/COG-VERSION b/COG-VERSIONindex f02113f..1eeac12 100644--- a/COG-VERSION+++ b/COG-VERSION@@ -1 +1 @@-3.15.0+3.16.0diff --git a/README.md b/README.mdindex 741ffda..d77120e 100644--- a/README.md+++ b/README.md@@ -11,7 +11,7 @@```mermaidgraph LRA[You] -- natural language --> B[AI Agent]- B -- runs --> C[33 Skills]+ B -- runs --> C[43 Skills]C -- delegates to --> W[6 Workers]C -- verified by --> V[4 Read-Only Verifiers]C -- reads & writes --> D[.md Files]@@ -56,8 +56,8 @@ COG ships a **full Claude Code surface**, a **full Antigravity surface**, plus *| Surface | Current support | Notes ||---|---|---|| Claude Code | 33 native skills + 10 agents (6 workers + 4 verifiers) | Full first-class surface |-| Antigravity | 33 skills + 10 agents (pointer-stub format) | Full surface — thin stubs in `.agents/` delegate to the `.claude/` playbooks, which stay authoritative |-| [Agent Plugins](https://agent-plugins.org) standard | Root `plugin.json` + `skills/` (33 skills) | Spec 1.0.0 conformant; any standard-aware client loads COG as a plugin |+| Antigravity | 43 skills + 10 agents (pointer-stub format) | Full surface — thin stubs in `.agents/` delegate to the `.claude/` playbooks, which stay authoritative |+| [Agent Plugins](https://agent-plugins.org) standard | Root `plugin.json` + `skills/` (43 skills) | Spec 1.0.0 conformant; any standard-aware client loads COG as a plugin || Cursor | Plugin manifest + rules | `.cursor-plugin/plugin.json` + `.cursorrules` || Kiro | 7 native powers | Core workflows today || Gemini CLI | 7 native commands | Core workflows today |@@ -98,6 +98,8 @@ Before publishing or updating framework files, run `./scripts/validate-agent-sur| **export-open-issues** | Audit and export open issues from any tracker into a structured vault summary | "Export open issues" || **publish-to-confluence** | Publish any vault markdown file to Confluence | "Publish this to Confluence" || **update-knowledge-base** | Maintain product knowledge base from releases, features, and project changes | "Update the knowledge base with v2.1 changes" |+| **release-comms** | Turn a runsheet and a milestone into a release note with real media, docs updates, and a Slack draft | "Cover today's release" |+| **feature-doc** | Drive the live app, capture screenshots and a recording, and write the docs article | "Write the doc for issue #123" |> **PM Workflow:** These skills form a complete product management lifecycle: **Research** (`/auto-research`) → **PRD** (`/generate-prd`) → **Stories** (`/create-user-story`) → Development → **Release Notes** (`/generate-release-notes`) → **Knowledge Base** (`/update-knowledge-base`). Use `/export-open-issues` for audits and `/publish-to-confluence` to share externally.@@ -112,6 +114,9 @@ Before publishing or updating framework files, run `./scripts/validate-agent-sur| Skill | What it does | Try saying... ||---|---|---|| **content-factory** | Autonomous content pipeline — scout announcements, triage by trend momentum + your unique angle, publish with ledger dedup, hard volume caps, and screenshot-verified posting | "Run the content factory" |+| **blog-publish** | Write and publish a post to your own blog, with a markdown twin and social distribution | "Publish this to my blog" |+| **social-media-kit** | Teaser video, GIF, and card images for every social post | "Make the social kit for this post" |+| **youtube-video-kit** | Thumbnail, opening title, music bed, and upload metadata | "Make a thumbnail and intro for this video" |### Verification Harness@@ -133,6 +138,8 @@ Opt-in. Ask for one of these and work walks a **V**: decompose left into falsifi| **slop-gate** | Refuse slop tells in anything about to be written, published, or sent; runs in CI or as a hook | "Scan this before I publish" || **voice-baseline** | Measure the words and shapes you over-use so an agent stops amplifying your tics | "Why do my drafts all sound the same?" || **release-video** | Turn a release into a motion recap and explained per-feature demos, with sound tied to motion | "Make a video for this release" |+| **terminal-replica** | Draw your real terminal and CLI agents in graphics and video frames | "Draw a Claude Code terminal for this post" |+| **vector-cover** | Flat vector cover illustrations rendered to PNG | "Make a cover image for this article" || **editorial-illustrations** | Claim → geometry: derive the *right* figure from what the text argues, render it as self-contained theme-aware HTML/SVG | "Make a diagram for this argument" || **data-forms** | 20+ chart and diagram forms with when-to-use, failure modes, and the encoding discipline that makes any of them readable | "The bar chart is burying the point" || **museum-art** | Real public-domain artwork from museum open-access APIs instead of AI-generated or stock imagery | "Find a hero image for this post" |diff --git a/cog-update.sh b/cog-update.shindex c061602..63c553c 100755--- a/cog-update.sh+++ b/cog-update.sh@@ -84,6 +84,34 @@ FRAMEWORK_FILES=(".claude/skills/release-video/templates/base.css"".claude/skills/release-video/templates/demo-spec.example.json"".claude/skills/release-video/templates/music-plan.example.json"+ ".claude/skills/blog-publish/SKILL.md"+ ".claude/skills/editorial-illustrations/assets/blog-figure-kit.html"+ ".claude/skills/editorial-illustrations/assets/gallery.html"+ ".claude/skills/editorial-illustrations/references/blog-figure-kit.md"+ ".claude/skills/feature-doc/SKILL.md"+ ".claude/skills/feature-doc/tools/arcade-record.py"+ ".claude/skills/feature-doc/tools/recompose.py"+ ".claude/skills/feature-doc/tools/screenrec.py"+ ".claude/skills/feature-doc/tools/videokit.py"+ ".claude/skills/no-ai-slop/LICENSE"+ ".claude/skills/no-ai-slop/SOURCE.md"+ ".claude/skills/no-ai-slop/eval.md"+ ".claude/skills/product-ui-taste/references/house-ui-rules.md"+ ".claude/skills/product-ui-taste/references/semantic-zoom.md"+ ".claude/skills/release-comms/SKILL.md"+ ".claude/skills/release-video/scripts/human_input.py"+ ".claude/skills/release-video/scripts/plain_demo.py"+ ".claude/skills/social-media-kit/SKILL.md"+ ".claude/skills/social-media-kit/scripts/cardrender.py"+ ".claude/skills/social-media-kit/scripts/linearcard.py"+ ".claude/skills/social-media-kit/scripts/terminal_banner.py"+ ".claude/skills/terminal-replica/SKILL.md"+ ".claude/skills/vector-cover/SKILL.md"+ ".claude/skills/vector-cover/render.sh"+ ".claude/skills/vector-cover/template.html"+ ".claude/skills/youtube-video-kit/SKILL.md"+ ".claude/skills/youtube-video-kit/scripts/ytopen.py"+ ".claude/skills/youtube-video-kit/scripts/ytthumb.py"".claude/skills/slop-gate/scripts/model_compare.py"".claude/skills/editorial-illustrations/SKILL.md"".claude/skills/data-forms/SKILL.md"@@ -187,6 +215,13 @@ FRAMEWORK_FILES=(".agents/skills/slop-gate/SKILL.md"".agents/skills/voice-baseline/SKILL.md"".agents/skills/release-video/SKILL.md"+ ".agents/skills/feature-doc/SKILL.md"+ ".agents/skills/release-comms/SKILL.md"+ ".agents/skills/blog-publish/SKILL.md"+ ".agents/skills/social-media-kit/SKILL.md"+ ".agents/skills/youtube-video-kit/SKILL.md"+ ".agents/skills/terminal-replica/SKILL.md"+ ".agents/skills/vector-cover/SKILL.md"".agents/skills/onboarding/SKILL.md"".agents/skills/product-ui-taste/SKILL.md"".agents/skills/publish-to-confluence/SKILL.md"diff --git a/docs/AGENT-SUPPORT.md b/docs/AGENT-SUPPORT.mdindex 17b77e0..6ea1c2f 100644--- a/docs/AGENT-SUPPORT.md+++ b/docs/AGENT-SUPPORT.md@@ -8,9 +8,9 @@ This document is the packaging contract: it tells contributors and maintainers w| Surface | Shipped format | Coverage | Status ||---|---|---:|---|-| Claude Code | `.claude/skills/*/SKILL.md` | 33 skills | Full native surface |-| Antigravity | `.agents/skills/*/SKILL.md` + `.agents/agents/*.md` | 33 skills + 10 agents | Full surface (pointer-stub format — delegates to `.claude/`, which stays authoritative) |-| [Agent Plugins](https://agent-plugins.org) standard | Root `plugin.json` + `skills/` (generated mirror) | 33 skills | Spec 1.0.0 conformant; rebuild with `scripts/build-agent-plugin.sh` |+| Claude Code | `.claude/skills/*/SKILL.md` | 43 skills | Full native surface |+| Antigravity | `.agents/skills/*/SKILL.md` + `.agents/agents/*.md` | 43 skills + 10 agents | Full surface (pointer-stub format — delegates to `.claude/`, which stays authoritative) |+| [Agent Plugins](https://agent-plugins.org) standard | Root `plugin.json` + `skills/` (generated mirror) | 43 skills | Spec 1.0.0 conformant; rebuild with `scripts/build-agent-plugin.sh` || Universal agent docs | `AGENTS.md` | 17 commands | Full documented fallback || Kiro | `.kiro/powers/*/POWER.md` | 7 powers | Core workflows only || Gemini CLI | `.gemini/commands/*.toml` + `.gemini/skills/*.md` | 7 commands | Core workflows only |diff --git a/marketplace-entry.json b/marketplace-entry.jsonindex 184d97a..5edd1bd 100644--- a/marketplace-entry.json+++ b/marketplace-entry.json@@ -6,8 +6,8 @@"email": "[email protected]","url": "https://github.com/huytieu"},- "description": "Self-evolving second brain with 36 AI skills, 10 agents, and people CRM. Closed-loop harness release: V-model verification lifecycle with criterion-traced evidence, read-only verifier agents, risk lanes, multi-session ultragoals with a north-star acceptance gate, craft skills for writing and visuals, and paired anti-slop design skills for marketing and product UI. Inspired by Garry Tan's gstack and gbrain, and dwarves-kit. Works with Claude Code, Antigravity, Cursor, Kiro, Gemini CLI, Codex.",- "version": "3.15.0",+ "description": "Self-evolving second brain with 43 AI skills, 10 agents, and people CRM. Closed-loop harness release: V-model verification lifecycle with criterion-traced evidence, read-only verifier agents, risk lanes, multi-session ultragoals with a north-star acceptance gate, craft skills for writing and visuals, and paired anti-slop design skills for marketing and product UI. Inspired by Garry Tan's gstack and gbrain, and dwarves-kit. Works with Claude Code, Antigravity, Cursor, Kiro, Gemini CLI, Codex.",+ "version": "3.16.0","keywords": ["second-brain","garry-tan",diff --git a/plugin.json b/plugin.jsonindex d7d6e03..c775fd6 100644--- a/plugin.json+++ b/plugin.json@@ -1,8 +1,8 @@{"$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json","name": "cog-second-brain",- "version": "3.15.0",- "description": "Self-evolving second brain with 36 AI agent skills, 10 agents, and people CRM. Closed-loop harness: a V-model verification lifecycle (spec to evidence, criterion-traced checkpoints), read-only verifier agents that observe artifacts instead of trusting worker summaries, risk lanes, multi-session ultragoals with a north-star acceptance gate, plus craft skills for writing, visual work, and a paired anti-slop design system for marketing and product UI. Works with Claude Code, Antigravity, Cursor, Kiro, Gemini CLI, Codex, and any Agent Plugins conformant client.",+ "version": "3.16.0",+ "description": "Self-evolving second brain with 43 AI agent skills, 10 agents, and people CRM. Closed-loop harness: a V-model verification lifecycle (spec to evidence, criterion-traced checkpoints), read-only verifier agents that observe artifacts instead of trusting worker summaries, risk lanes, multi-session ultragoals with a north-star acceptance gate, plus craft skills for writing, visual work, and a paired anti-slop design system for marketing and product UI. Works with Claude Code, Antigravity, Cursor, Kiro, Gemini CLI, Codex, and any Agent Plugins conformant client.","author": {"name": "Huy Tieu","email": "[email protected]",diff --git a/skills/auto-research/SKILL.md b/skills/auto-research/SKILL.mdindex 978af3e..b3fea82 100644--- a/skills/auto-research/SKILL.md+++ b/skills/auto-research/SKILL.md@@ -25,7 +25,7 @@ Inspired by Karpathy's autoresearch — but for strategic thinking instead of ML## InputThe user provides a strategic question or topic as the command argument. Examples:-- "If foundation models commoditize, what happens to LLM wrapper companies like Katalon/Scout?"+- "If foundation models commoditize, what happens to LLM wrapper companies?"- "Future of the testing industry as AI capabilities expand"- "Should we build vs buy vs partner for our AI layer?"- "What are the strategic options for Scout if OpenAI launches a testing product?"@@ -201,7 +201,7 @@ Consolidated, deduplicated list of all sources across threads.## Example Decomposition-**Question:** "If generic LLM models get better over time, what's the future for LLM wrapper companies like Katalon or Scout?"+**Question:** "If generic LLM models get better over time, what's the future for LLM wrapper companies?"**Threads:**1. **Foundation model trajectory** — How fast are GPT/Claude/Gemini improving at code understanding, test generation, bug detection? What's the capability curve?diff --git a/skills/blog-publish/SKILL.md b/skills/blog-publish/SKILL.mdnew file mode 100644index 0000000..29d5012--- /dev/null+++ b/skills/blog-publish/SKILL.md@@ -0,0 +1,106 @@+---+name: blog-publish+description: >+ Write and publish a post to your own static blog end to end: content checklist+ (embedded links, optional TL;DR), per-post ASCII art, an agent-readable markdown+ twin, deploy, and social distribution. Use when you say "write a blog post",+ "publish this to my blog", or "push this post to socials".+---++# blog-publish: static blog post pipeline++## Configuration++Set these once (`kit.toml`, `.env` or arguments).++| Setting | Meaning | Example |+|---|---|---|+| `BLOG_DIR` | Repo folder of your static blog | `./my-blog/` |+| `POSTS_DIR` | Markdown posts, relative to `BLOG_DIR` | `content/posts/` |+| `BUILD_CMD` | Command that builds the site | `python3 build.py` |+| `SITE_DIR` | Build output folder | `site/` |+| `BLOG_URL` | Public base URL | `https://blog.example.com` |+| `POST_PATH` | URL pattern for a post | `/blog/<slug>/` |+| `DEPLOY_CMD` | Your deploy command | see Deploy |+| `SOCIAL_HANDLES` | Accounts used for distribution | per platform |++The steps below assume a build script that renders `POSTS_DIR/<slug>.md` into `SITE_DIR`. Adjust names to your generator (Hugo, Eleventy, Astro, a custom script).++## Content checklist (every post)++1. **Front matter** with `title, subtitle, slug, date, description, tags, author, published`. Match existing posts. If the subtitle renders under the H1, keep it to one sentence stating what the post is about.+2. **TL;DR is optional.** Narrative, build and essay posts open problem-first with no summary box (see Narrative arc). Reserve a TL;DR for reference-style or scannable how-to posts, and then use a one or two sentence hook plus bullets, never one long paragraph.+3. **Embedded links for every reference.** Each tool, repo, prior post or source gets an inline link on first mention. Link your own posts with root-relative paths (`/blog/<slug>/`).+4. **Figures in most major sections.** Use diagrams, charts and product screenshots where they carry evidence. The `editorial-illustrations` skill generates meaning-carrying figures. Keep ASCII for header art (see below).+5. **No em dashes.** Use colons, commas or parentheses.+6. **Voice.** First person, concrete numbers and stories, no AI-slop vocabulary.+7. **Literal example prompts.** When a post walks through an AI tool, quote the actual prompt in a blockquote or fenced block instead of paraphrasing it.+8. **Final anti-slop pass (required).** Before deploy, run the draft through the `no-ai-slop` skill and self-check against its eval. Keep a contrast or colon setup only when it is a real reframe. Preserve your voice and make the smallest effective edit.++## Narrative arc (default for substantial posts)++Document what happened instead of writing a prescriptive summary:++1. **Open on the problem.** A confession, a bug, a bold claim or an observed pattern. Make the reader feel why the status quo breaks before any solution appears. A single diagram as an early anchor is fine.+2. **Narrate the process, including dead ends.** Show the first version, what broke, what you learned and what you changed. Bugs become features. Admit scope creep and reversed decisions.+3. **Cite prior art warmly and inline.** Link by author and work at the natural reading point. Treat references as conceptual anchors, not footnotes.+4. **Prove it with evidence.** Counts, costs, before/after deltas, traces, real artifacts, screenshots, all from the actual run. If the argument is theoretical, say so.+5. **Close reflectively.** End with a quiet claim, an open question or a few diagnostic questions the reader can apply. No call to action, no summary box.++Voice: first person, conversational but technically dense, understated. Short declaratives mixed with longer explanations. Headings are short and descriptive. Length follows the material.++## Per-post ASCII art++Each post gets an entry in an ASCII-frames table in your build script, keyed by slug: a list of 2 to 5 frames that loop (a cursor typing, a rocket lifting, a gear turning). Pad frames to a common size automatically so they need no hand alignment. Use pure ASCII, no Unicode box drawing.++Render it two ways from the one source:+- On the page, a `<pre class="post-ascii" data-frames="...">` element cycles frames with a small inline script (about 420 ms per frame) and shows a static first frame under `prefers-reduced-motion`.+- In the social card, an animated GIF (1200x630) where only the ASCII region changes per frame. Some chat apps animate it, others show the first frame. Set `og:image:type` to `image/gif`.++A playful frame set beats a corporate one. Never ship the generic fallback; add bespoke frames.++## Agent-readable output (automatic, but verify)++Have the build generate a clean markdown twin at `/blog/<slug>/index.md` and list every post in `/llms.txt`. After building, confirm both include the new post:++```bash+grep -i "<title fragment>" $SITE_DIR/llms.txt && head -5 "$SITE_DIR/blog/<slug>/index.md"+```++## Build and deploy++```bash+cd $BLOG_DIR && $BUILD_CMD+```++Deploy with your own command (`DEPLOY_CMD`). Examples, pick the one that matches your host:+- Railway: `railway up --detach`+- Netlify: `netlify deploy --prod --dir=$SITE_DIR`+- Vercel: `vercel deploy --prod`+- Cloudflare Pages: `wrangler pages deploy $SITE_DIR`+- GitHub Pages or any git-push host: commit `SITE_DIR` or push the source and let CI build.++Post-condition: fetch the live page and confirm the new post is there before reporting success:+`curl -s $BLOG_URL/blog/<slug>/ | grep '<title>'`. Builds can take a few minutes.++## Social distribution (after the post is live)++Voice follows your `publish-social` command if you have one. The `social-media-kit` skill covers asset recipes and upload mechanics, and `youtube-video-kit` covers video.++**Media is mandatory on every platform post.** Build the asset kit (teaser video cut, padded-card hero image, terminal GIF) and attach per platform before posting. On X, the thread root gets the strongest asset, and the canonical URL moves to the final reply so the link card still renders.++**Durable articles beat feed posts.** For substantive posts, publish an article on the platform (X Articles, LinkedIn "Write article") with the full body and the canonical blog link as the source. A short thread or feed post is fine as a pointer to it.++- **X:** prefer the Articles composer. For a thread, post tweet 1 and build the rest as self-replies (open each new tweet's detail page, use the reply box). The composer's multi-tweet flow can silently lose drafts. Two traps: typing an `@mention` opens an autocomplete that can swallow the submit click (press Escape first), and a link preview card can push the Reply button below the fold (scroll it into view before clicking). Screenshot every step and re-check the profile to confirm the final tweet posted.+- **LinkedIn:** prefer "Write article". For a feed post, type the full content with real paragraph breaks, wait for the link preview, then post, and confirm the success toast. Mentions only become links when picked from the autocomplete dropdown.+- **Reddit:** one genuine post in a relevant subreddit, not a mass crosspost. Check whether the subreddit requires flair before submitting.+- **Hacker News and IndieHackers:** if there is no logged-in session, stop at the auth wall, never type credentials, and hand the prepared title and URL to the user to submit.++Include the canonical URL in every platform's content and screenshot each post after submitting to verify it.++### X field notes+- Use a browser tool that can attach files to X's file input. Some embedded browser panes cannot, because the platform blocks fetching local images and clipboard paste does nothing.+- The compose route opens a modal over the home feed and a file-input lookup may return the inline composer's input. Close the empty modal and use the inline composer.+- Type the whole post in one call. Pressing Escape to close the mention menu can move the cursor and scramble the text.+- A banner can appear after typing and push the Post button down. Re-screenshot before clicking Post, and confirm the "Your post was sent" toast.+- Count length with URLs as 23 characters and stay at or under 280.diff --git a/skills/editorial-illustrations/SKILL.md b/skills/editorial-illustrations/SKILL.mdindex dce135c..0a5629f 100644--- a/skills/editorial-illustrations/SKILL.md+++ b/skills/editorial-illustrations/SKILL.md@@ -161,3 +161,7 @@ Per the Visual Verification rule, a DOM check is not enough. **Render it and loo- [ ] Gridlines present only if the figure is genuinely quantitative.- [ ] Motion (if any) demonstrates the claim and dies under reduced-motion.- [ ] Renders correctly in both dark and light, and stacks cleanly on mobile.++## Blog figure kit++For blog posts, start from the kit before inventing new chrome: `references/blog-figure-kit.md` (six patterns, screenshot and tweet frames, gotchas) and `assets/blog-figure-kit.html` (live figures plus the full stylesheet). Body diagrams use these figures; ASCII stays in an animated header only.diff --git a/skills/editorial-illustrations/assets/blog-figure-kit.html b/skills/editorial-illustrations/assets/blog-figure-kit.htmlnew file mode 100644index 0000000..921800c--- /dev/null+++ b/skills/editorial-illustrations/assets/blog-figure-kit.html@@ -0,0 +1,235 @@+<!doctype html><html lang="en" data-theme="light"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Blog figure kit</title>+<style>body{max-width:760px;margin:40px auto;padding:0 16px;font:16px/1.6 system-ui;background:#f7f8fb}h2{font:600 14px ui-monospace,monospace;text-transform:uppercase;letter-spacing:.1em;color:#64748b;margin-top:56px}</style>+<style>+:root{--ef-ground:#ffffff;--ef-deep:#f1f3f7;--ef-ink:#111827;--ef-soft:#334155;--ef-muted:#64748b;--ef-quiet:#94a3b8;--ef-line:#e6e8ee;--ef-strong:#cbd5e1;--ef-accent:#c15f3c;--ef-node:#d97757;--ef-sans:Inter,ui-sans-serif,system-ui,sans-serif;--ef-mono:"JetBrains Mono",ui-monospace,"SF Mono",Menlo,monospace}+:root[data-theme="dark"]{--ef-ground:#171b22;--ef-deep:#11151b;--ef-ink:#f1f5f9;--ef-soft:#cbd5e1;--ef-muted:#8b95a5;--ef-quiet:#5b6472;--ef-line:#262c36;--ef-strong:#3a4250;--ef-accent:#e0885f;--ef-node:#e0885f}+.ef{margin:40px 0;padding:22px 22px 16px;border:1px solid var(--ef-line);background:var(--ef-ground);color:var(--ef-ink);box-shadow:0 1px 2px rgba(16,24,40,.04)}+.ef figcaption{margin-top:18px;padding-top:12px;border-top:1px solid var(--ef-line);font:500 9px/1.6 var(--ef-mono);letter-spacing:.1em;text-transform:uppercase;color:var(--ef-muted)}+.ef__k{font:500 9px/1 var(--ef-mono);letter-spacing:.12em;text-transform:uppercase;color:var(--ef-quiet);margin-bottom:14px}+.ef svg{width:100%;height:auto;display:block;overflow:visible}+.ef svg text{font-family:var(--ef-mono)}+/* F1 readers */+.ef-read{display:grid;grid-template-columns:150px 1fr;gap:0 18px;align-items:stretch}+.ef-pass{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;border:1px solid var(--ef-ink);padding:14px}+.ef-pass b{font:600 18px/1 var(--ef-mono);letter-spacing:.04em}+.ef-pass small{font:400 10px/1.4 var(--ef-mono);color:var(--ef-muted);margin-top:8px}+.ef-rows{display:grid;gap:8px}+.ef-row{position:relative;display:grid;grid-template-columns:100px 1fr 132px;gap:12px;align-items:center;padding:9px 12px;border:1px solid var(--ef-line)}+.ef-row__who{font:500 9px/1.3 var(--ef-mono);letter-spacing:.1em;text-transform:uppercase;color:var(--ef-quiet)}+.ef-row__q{font:400 13px/1.4 var(--ef-sans);color:var(--ef-soft)}+.ef-row__s{font:500 9px/1.3 var(--ef-mono);letter-spacing:.08em;text-transform:uppercase;text-align:right;color:var(--ef-ink)}+.ef-row--gap{border-style:dashed}+.ef-row--gap .ef-row__s{color:var(--ef-accent)}+.ef-row::before{content:"";position:absolute;left:-19px;top:50%;width:18px;height:1px;background:var(--ef-strong)}+.ef-row i{position:absolute;left:-19px;top:calc(50% - 3px);width:6px;height:6px;border-radius:50%;background:var(--ef-ink);opacity:0;animation:ef-ping 6s ease-in-out infinite}+.ef-row--gap i{background:var(--ef-node)}+.ef-row:nth-child(2) i{animation-delay:1.5s}.ef-row:nth-child(3) i{animation-delay:3s}.ef-row:nth-child(4) i{animation-delay:4.5s}+@keyframes ef-ping{0%{opacity:0;transform:translateX(0)}5%{opacity:1}20%{opacity:1;transform:translateX(16px)}26%,100%{opacity:0;transform:translateX(16px)}}+/* F2 replay grid */+.ef-grid{display:grid;grid-template-columns:minmax(150px,1.3fr) repeat(3,1fr);border-top:1px solid var(--ef-line);border-left:1px solid var(--ef-line);position:relative}+.ef-grid>div{border-right:1px solid var(--ef-line);border-bottom:1px solid var(--ef-line);padding:9px 10px;min-height:38px;display:flex;align-items:center}+.ef-h{font:500 9px/1.3 var(--ef-mono);letter-spacing:.1em;text-transform:uppercase;color:var(--ef-quiet)}+.ef-step{font:400 11px/1.35 var(--ef-mono);color:var(--ef-soft)}+.ef-c{justify-content:center}+.ef-c span{font:500 9px/1 var(--ef-mono);letter-spacing:.1em;text-transform:uppercase;padding:5px 7px;border:1px solid var(--ef-strong);color:var(--ef-muted)}+.ef-c .m{background:var(--ef-ink);border-color:var(--ef-ink);color:var(--ef-ground)}+.ef-c .ma{background:var(--ef-node);border-color:var(--ef-node);color:#fff}+.ef-c .r{border-color:var(--ef-ink);color:var(--ef-ink)}+.ef-c .x{border-style:dashed;color:var(--ef-ink)}+.ef-c .n{border:0;color:var(--ef-quiet)}+.ef-col{position:absolute;top:0;bottom:0;width:calc((100% - (100% * 1.3 / 4.3)) / 3);left:calc(100% * 1.3 / 4.3);background:var(--ef-ink);opacity:.045;pointer-events:none;animation:ef-sweep 7.5s steps(1) infinite}+@keyframes ef-sweep{0%{transform:translateX(0)}33.3%{transform:translateX(100%)}66.6%{transform:translateX(200%)}}+.ef-keyrow{display:flex;flex-wrap:wrap;gap:14px;margin-top:12px;font:400 9px/1 var(--ef-mono);letter-spacing:.08em;text-transform:uppercase;color:var(--ef-quiet)}+.ef-keyrow span{display:flex;align-items:center;gap:6px}+.ef-keyrow i{display:inline-block;width:14px;height:9px;border:1px solid var(--ef-strong)}+.ef-keyrow i.m{background:var(--ef-ink);border-color:var(--ef-ink)}.ef-keyrow i.ma{background:var(--ef-node);border-color:var(--ef-node)}.ef-keyrow i.r{border-color:var(--ef-ink)}.ef-keyrow i.x{border-style:dashed;border-color:var(--ef-ink)}+/* F3 loop vs relay */+.ef-two{display:grid;grid-template-columns:1fr 1.35fr;gap:22px}+.ef-pane{border:1px solid var(--ef-line);padding:14px}+.ef-orbit{position:relative;width:210px;height:210px;margin:6px auto 4px}+.ef-orbit__ring{position:absolute;inset:22px;border:1px solid var(--ef-strong);border-radius:50%}+.ef-orbit__spin{position:absolute;inset:22px;animation:ef-spin 6s linear infinite}+.ef-orbit__spin i{position:absolute;top:-4px;left:calc(50% - 4px);width:8px;height:8px;border-radius:50%;background:var(--ef-ink)}+@keyframes ef-spin{to{transform:rotate(360deg)}}+.ef-orbit__c{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;font:520 15px/1.1 var(--ef-sans)}+.ef-orbit__c small{font:500 8px/1.4 var(--ef-mono);letter-spacing:.1em;text-transform:uppercase;color:var(--ef-quiet);margin-top:4px}+.ef-orbit__l{position:absolute;font:500 8px/1.2 var(--ef-mono);letter-spacing:.08em;text-transform:uppercase;color:var(--ef-muted);white-space:nowrap;transform:translate(-50%,-50%);background:var(--ef-ground);padding:2px 3px}+.ef-relay{display:grid;gap:10px}+.ef-hand{display:grid;grid-template-columns:96px 1fr 62px;gap:10px;align-items:center;position:relative}+.ef-hand__who{font:500 9px/1.3 var(--ef-mono);letter-spacing:.1em;text-transform:uppercase;color:var(--ef-quiet)}+.ef-hand__act{font:400 12px/1.35 var(--ef-sans);color:var(--ef-soft);border:1px solid var(--ef-line);padding:7px 9px;position:relative;overflow:hidden}+.ef-hand__act i{position:absolute;left:0;bottom:0;height:2px;width:0;background:var(--ef-ink);animation:ef-fill 8s ease-in-out infinite}+.ef-hand:nth-child(2) .ef-hand__act i{animation-delay:2s}.ef-hand:nth-child(3) .ef-hand__act i{animation-delay:4s}.ef-hand:nth-child(4) .ef-hand__act i{animation-delay:6s}+@keyframes ef-fill{0%{width:0;opacity:1}18%{width:100%;opacity:1}25%,100%{width:100%;opacity:0}}+.ef-store{font:500 9px/1 var(--ef-mono);letter-spacing:.08em;text-transform:uppercase;text-align:center;padding:6px 0;border:1px solid var(--ef-ink)}+.ef-store--q{border:1px dashed var(--ef-accent);color:var(--ef-accent)}+/* F4 / F5 svg */+.ef-svg .lbl{font-size:10px;fill:var(--ef-soft)}+.ef-svg .tag{font-size:8px;letter-spacing:.1em;fill:var(--ef-quiet);text-transform:uppercase}+.ef-svg .node{fill:var(--ef-ground);stroke:var(--ef-ink);stroke-width:1}+.ef-svg .node--q{stroke-dasharray:3 3;stroke:var(--ef-strong)}+.ef-svg .edge{stroke:var(--ef-strong);stroke-width:1;fill:none}+.ef-svg .edge--a{stroke:var(--ef-accent);stroke-width:1.5;stroke-dasharray:5 4;animation:ef-dash 1.6s linear infinite}+.ef-svg .edge--d{stroke-dasharray:3 4}+.ef-svg .lbl--a{fill:var(--ef-accent);font-weight:600}+.ef-svg .box{fill:var(--ef-ground);stroke:var(--ef-line)}+.ef-svg .box--a{stroke:var(--ef-accent)}+.ef-svg .dot{fill:var(--ef-node)}+@keyframes ef-dash{to{stroke-dashoffset:-18}}+.ef-svg .sig{fill:var(--ef-node);offset-rotate:0deg;animation:ef-move 4.5s ease-in-out infinite}+@keyframes ef-move{0%{offset-distance:0%;opacity:0}8%{opacity:1}70%{offset-distance:100%;opacity:1}85%,100%{offset-distance:100%;opacity:0}}+/* F6 rail */+.ef-rail{display:grid;grid-template-columns:repeat(6,1fr);border:1px solid var(--ef-line);position:relative}+.ef-st{padding:12px 10px 14px;border-right:1px solid var(--ef-line);min-height:118px;display:flex;flex-direction:column;position:relative}+.ef-st:last-child{border-right:0}+.ef-st>span{font:500 8px/1 var(--ef-mono);color:var(--ef-quiet)}+.ef-st>b{margin-top:auto;font:540 13px/1.25 var(--ef-sans);color:var(--ef-ink)}+.ef-st>small{margin-top:5px;font:400 9px/1.4 var(--ef-mono);color:var(--ef-muted);min-height:26px}+.ef-st>em{font:500 8px/1.45 var(--ef-mono);letter-spacing:.1em;text-transform:uppercase;font-style:normal;margin-top:9px;color:var(--ef-quiet)}+.ef-st--b{background:repeating-linear-gradient(135deg,transparent 0 6px,var(--ef-deep) 6px 7px)}+.ef-st--b>em{color:var(--ef-soft)}+.ef-st--a{box-shadow:inset 0 2px var(--ef-accent)}+.ef-st--a>em,.ef-st--a>b{color:var(--ef-accent)}+.ef-rail__dot{position:absolute;top:-4px;left:0;width:7px;height:7px;border-radius:50%;background:var(--ef-ink);animation:ef-travel 7s ease-in-out infinite}+@keyframes ef-travel{0%{left:0;background:var(--ef-ink)}60%{left:calc(66.6% - 4px);background:var(--ef-ink)}70%,88%{left:calc(91.6% - 4px);background:var(--ef-node)}100%{left:calc(100% - 7px);background:var(--ef-node)}}+/* screenshots */+.ef-shot{margin:30px 0}+.ef-shot img{width:100%;display:block;border:1px solid var(--ef-line)}+.ef-shot figcaption{margin-top:8px;font:400 10px/1.5 var(--ef-mono);letter-spacing:.06em;text-transform:uppercase;color:var(--ef-muted)}+/* tweets */+.ef-tw{margin:28px auto;max-width:440px}+.ef-tw img{width:100%;display:block;border:1px solid var(--ef-line)}+.ef-tw figcaption{margin-top:8px;font:400 10px/1.5 var(--ef-mono);letter-spacing:.06em;text-transform:uppercase;color:var(--ef-muted);text-align:center}+.ef-tw2{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:28px 0;align-items:start}+.ef-tw2 .ef-tw{margin:0;max-width:none}+@media (max-width:700px){+ .ef{padding:16px 14px 12px}+ .ef-read,.ef-two,.ef-tw2{grid-template-columns:1fr}+ .ef-pass{margin-bottom:12px}+ .ef-row{grid-template-columns:1fr;gap:4px}.ef-row__s{text-align:left}.ef-row::before,.ef-row i{display:none}+ .ef-grid{grid-template-columns:118px repeat(3,1fr)}.ef-grid>div{padding:7px 5px}.ef-step{font-size:10px;word-break:break-all}.ef-c span{padding:4px 4px;font-size:8px}+ .ef-grid>.ef-col{display:none}+ .ef-rail{grid-template-columns:1fr 1fr}.ef-st{border-bottom:1px solid var(--ef-line)}.ef-rail__dot{display:none}+ .ef-hand{grid-template-columns:80px 1fr 54px}+}+@media (prefers-reduced-motion:reduce){.ef *,.ef *::before{animation:none!important}.ef-row i,.ef-svg .sig{opacity:0}}+</style></head><body>+<p>Reference kit of six figure patterns. Toggle <code>data-theme</code> on <html> to check dark.</p>+<h2>A. Fan-out rows (one source, N readers, gap rows dashed)</h2>+<figure class="ef" role="img" aria-label="One passing test, four readers; only the engineer's question is answered by the run">+ <div class="ef__k">One green check, four readers</div>+ <div class="ef-read">+ <div class="ef-pass"><b>PASS</b><small>refund_partial_sub<br>run 4812 · 38s</small></div>+ <div class="ef-rows">+ <div class="ef-row"><i></i><div class="ef-row__who">Engineer</div><div class="ef-row__q">Does my code still work?</div><div class="ef-row__s">In the run</div></div>+ <div class="ef-row ef-row--gap"><i></i><div class="ef-row__who">QA reviewer</div><div class="ef-row__q">Were the negative cases covered?</div><div class="ef-row__s">Outside the run</div></div>+ <div class="ef-row ef-row--gap"><i></i><div class="ef-row__who">Product owner</div><div class="ef-row__q">Is this the behavior we agreed on?</div><div class="ef-row__s">Outside the run</div></div>+ <div class="ef-row ef-row--gap"><i></i><div class="ef-row__who">Release mgr</div><div class="ef-row__q">Did every variant run on this RC?</div><div class="ef-row__s">Outside the run</div></div>+ </div>+ </div>+ <figcaption>The run answers one of four questions. The other three need a record that lives somewhere else.</figcaption>+</figure>+<h2>B. Step x run grid with sweeping column</h2>+<figure class="ef" role="img" aria-label="Grid of four test steps across three runs showing which steps call the model, replay, or run as code">+ <div class="ef__k">The same test, three runs</div>+ <div class="ef-grid">+ <div class="ef-col"></div>+ <div class="ef-h">Step</div><div class="ef-h ef-c" style="text-align:center">Run 1<br>cold</div><div class="ef-h ef-c" style="text-align:center">Run 2<br>cached</div><div class="ef-h ef-c" style="text-align:center">Run 3<br>UI changed</div>+ <div class="ef-step">agent.act("log in")</div><div class="ef-c"><span class="m">Model</span></div><div class="ef-c"><span class="r">Replay</span></div><div class="ef-c"><span class="r">Replay</span></div>+ <div class="ef-step">agent.act("open order")</div><div class="ef-c"><span class="m">Model</span></div><div class="ef-c"><span class="r">Replay</span></div><div class="ef-c"><span class="x">Stale · stop</span></div>+ <div class="ef-step">agent.assert("prorated")</div><div class="ef-c"><span class="ma">Model</span></div><div class="ef-c"><span class="ma">Model</span></div><div class="ef-c"><span class="n">Not run</span></div>+ <div class="ef-step">expect(total)</div><div class="ef-c"><span>Code</span></div><div class="ef-c"><span>Code</span></div><div class="ef-c"><span class="n">Not run</span></div>+ </div>+ <div class="ef-keyrow"><span><i class="m"></i>Live model call</span><span><i class="ma"></i>Model call that replay never removes</span><span><i class="r"></i>Recorded replay</span><span><i class="x"></i>Strict reject</span><span><i></i>Deterministic code</span></div>+ <figcaption>Replay removes model calls from actions. An agent assertion calls the model on every run, and strict mode stops the run when a recording goes stale.</figcaption>+</figure>+<h2>C. Orbit vs relay (one owner loop vs handoffs)</h2>+<figure class="ef" role="img" aria-label="Left: one owner circling a six-step loop. Right: four roles handing off a refund test, only the first handoff stored in Git">+ <div class="ef-two">+ <div class="ef-pane">+ <div class="ef__k">Small team</div>+ <div class="ef-orbit">+ <div class="ef-orbit__ring"></div>+ <div class="ef-orbit__spin"><i></i></div>+ <div class="ef-orbit__c">1 owner<small>every step</small></div>+ <span class="ef-orbit__l" style="left:50%;top:10px">Write test</span>+ <span class="ef-orbit__l" style="left:91%;top:30%">Seed data</span>+ <span class="ef-orbit__l" style="left:91%;top:70%">Run in CI</span>+ <span class="ef-orbit__l" style="left:50%;top:200px">Read report</span>+ <span class="ef-orbit__l" style="left:9%;top:70%">Triage</span>+ <span class="ef-orbit__l" style="left:9%;top:30%">Release</span>+ </div>+ </div>+ <div class="ef-pane">+ <div class="ef__k">Ownership spreads</div>+ <div class="ef-relay">+ <div class="ef-hand"><div class="ef-hand__who">Engineer</div><div class="ef-hand__act">Writes the refund test<i></i></div><div class="ef-store">Git</div></div>+ <div class="ef-hand"><div class="ef-hand__who">QA reviewer</div><div class="ef-hand__act">Reviews intent and negative cases<i></i></div><div class="ef-store ef-store--q">?</div></div>+ <div class="ef-hand"><div class="ef-hand__who">Product owner</div><div class="ef-hand__act">Confirms partial-sub behavior<i></i></div><div class="ef-store ef-store--q">?</div></div>+ <div class="ef-hand"><div class="ef-hand__who">Release mgr</div><div class="ef-hand__act">Approves on evidence<i></i></div><div class="ef-store ef-store--q">?</div></div>+ </div>+ </div>+ </div>+ <figcaption>One owner closes the loop alone. Across four roles each handoff needs a record, and only the first one has a home in Git.</figcaption>+</figure>+<h2>D. SVG tree with offset-path signal dot</h2>+<figure class="ef ef-svg" role="img" aria-label="Tree from a test case to a versioned dataset to three rows and three named tests; the result carries case, dataset version and row">+ <div class="ef__k">Where a result's identity comes from</div>+ <svg viewBox="0 0 720 300">+ <path class="edge" d="M90 150 C 150 150, 150 150, 210 150"/>+ <path class="edge" d="M290 150 C 330 150, 330 70, 370 70"/>+ <path class="edge" d="M290 150 L 370 150"/>+ <path class="edge" d="M290 150 C 330 150, 330 230, 370 230"/>+ <path class="edge" d="M530 70 L 545 70"/><path class="edge" d="M530 150 L 545 150"/><path class="edge" d="M530 230 L 545 230"/>+ <path id="ef-p5" class="edge" d="M90 150 C 150 150, 150 150, 210 150 L 290 150 L 370 150 L 545 150" style="stroke:none"/>+ <circle class="node" cx="70" cy="150" r="20"/><text class="lbl" x="70" y="154" text-anchor="middle">REF-12</text><text class="tag" x="70" y="190" text-anchor="middle">CASE</text>+ <rect class="box" x="210" y="134" width="80" height="32"/><text class="lbl" x="250" y="154" text-anchor="middle">refunds@v3</text><text class="tag" x="250" y="186" text-anchor="middle">REVIEWED DATASET</text>+ <circle class="node" cx="378" cy="70" r="6"/><text class="lbl" x="392" y="74">card_active_admin</text>+ <circle class="node" cx="378" cy="150" r="6" style="fill:var(--ef-node);stroke:var(--ef-node)"/><text class="lbl" x="392" y="154">card_partial_member</text>+ <circle class="node" cx="378" cy="230" r="6"/><text class="lbl" x="392" y="234">paypal_cancel_admin</text>+ <rect class="box" x="545" y="56" width="170" height="28"/><text class="lbl" x="555" y="74">test REF-12 [row 1]</text>+ <rect class="box box--a" x="545" y="136" width="170" height="28"/><text class="lbl lbl--a" x="555" y="154">REF-12 · v3 · row 2 · fail</text>+ <rect class="box" x="545" y="216" width="170" height="28"/><text class="lbl" x="555" y="234">test REF-12 [row 3]</text>+ <path class="edge edge--d" d="M630 164 L 630 266"/>+ <rect class="box" x="560" y="266" width="140" height="24" style="stroke-dasharray:3 3"/><text class="lbl" x="630" y="282" text-anchor="middle" style="font-size:9px;fill:var(--ef-quiet)">acct_8f2c91 · setup</text>+ <circle class="sig" r="4" style="offset-path:path('M90 150 C 150 150, 150 150, 210 150 L 290 150 L 370 150 L 545 150')"/>+ </svg>+ <figcaption>A failure is reproducible only if the result carries case, dataset version and row. The generated account ID changes every run and names nothing.</figcaption>+</figure>+<h2>E. Stage rail with traveling dot and to-build hatching</h2>+<figure class="ef" role="img" aria-label="Six-stage pipeline from a fresh output directory to reconcile; three stages belong to an adapter that does not exist yet">+ <div class="ef__k">Proposed CI pipeline</div>+ <div class="ef-rail">+ <i class="ef-rail__dot"></i>+ <div class="ef-st"><span>01</span><b>Fresh output dir</b><small>no stale report survives</small><em>CI</em></div>+ <div class="ef-st"><span>02</span><b>e2e run</b><small>JSON + JUnit + artifacts</small><em>e2e · exists</em></div>+ <div class="ef-st ef-st--b"><span>03</span><b>Map + stage</b><small>case key, data row, commit</small><em>Adapter · to build</em></div>+ <div class="ef-st"><span>04</span><b>Upload</b><small>JUnit report uploader</small><em>Platform · exists</em></div>+ <div class="ef-st ef-st--b"><span>05</span><b>Read back</b><small>what the platform actually stored</small><em>Adapter · to build</em></div>+ <div class="ef-st ef-st--b ef-st--a"><span>06</span><b>Reconcile</b><small>missing, flaky, partial</small><em>Adapter · to build</em></div>+ </div>+ <figcaption>Upload sits in the middle. The adapter's real job is the read-back and reconcile after it, where a missing or partial run becomes visible.</figcaption>+</figure>+<h2>F. SVG many-to-few mapping with animated collapse edges</h2>+<figure class="ef ef-svg" role="img" aria-label="Five e2e outcomes mapped to three JUnit states; retry-pass and interrupted collapse into passing and skipped">+ <div class="ef__k">e2e outcome → JUnit state</div>+ <svg viewBox="0 0 720 280">+ <text class="tag" x="40" y="22">E2E 0.17 OUTCOME</text><text class="tag" x="470" y="22">JUNIT XML</text>+ <path class="edge" d="M200 55 C 330 55, 340 70, 470 70"/>+ <path class="edge edge--a" d="M200 105 C 330 105, 340 75, 470 75"/>+ <path class="edge" d="M200 155 C 330 155, 340 140, 470 140"/>+ <path class="edge edge--a" d="M200 205 C 330 205, 340 210, 470 210"/>+ <path class="edge edge--d" d="M200 255 C 330 255, 340 255, 470 255"/>+ <circle class="node" cx="40" cy="55" r="5"/><text class="lbl" x="56" y="59">passed, first try</text>+ <circle class="node" cx="40" cy="105" r="5" style="fill:var(--ef-node);stroke:var(--ef-node)"/><text class="lbl lbl--a" x="56" y="109">passed after retry</text>+ <circle class="node" cx="40" cy="155" r="5"/><text class="lbl" x="56" y="159">failed</text>+ <circle class="node" cx="40" cy="205" r="5" style="fill:var(--ef-node);stroke:var(--ef-node)"/><text class="lbl lbl--a" x="56" y="209">interrupted</text>+ <circle class="node node--q" cx="40" cy="255" r="5"/><text class="lbl" x="56" y="259">tags · attempts · cache hits</text>+ <rect class="box" x="470" y="56" width="150" height="32"/><text class="lbl" x="482" y="76"><testcase/></text><text class="tag" x="630" y="76">+ note</text>+ <rect class="box" x="470" y="124" width="150" height="32"/><text class="lbl" x="482" y="144"><failure/> | <error/></text>+ <rect class="box" x="470" y="194" width="150" height="32"/><text class="lbl" x="482" y="214"><skipped/></text><text class="tag" x="630" y="214">+ message</text>+ <rect class="box" x="470" y="240" width="150" height="30" style="stroke-dasharray:3 3"/><text class="tag" x="482" y="259">DROPPED</text>+ </svg>+ <figcaption>Five outcomes land on three states. A retry-pass counts as a pass and an interrupted test counts as a skip; the difference survives only as free text.</figcaption>+</figure>+</body></html>\ No newline at end of filediff --git a/skills/editorial-illustrations/references/blog-figure-kit.md b/skills/editorial-illustrations/references/blog-figure-kit.mdnew file mode 100644index 0000000..16bf158--- /dev/null+++ b/skills/editorial-illustrations/references/blog-figure-kit.md@@ -0,0 +1,63 @@+# Blog figure kit++Starting kit for blog diagrams. Live reference: `../assets/blog-figure-kit.html` (all six figures plus the full `ef-` stylesheet). Open it through a local server, then copy the `<style>` block and the figure you need into the post.++**Rule:** a blog post body uses these HTML/SVG figures for diagrams. ASCII stays only in the animated header frames (`SLUG_ASCII_FRAMES` in `build.py`).++## Tokens and theme++- Prefix every class with a short post-specific namespace (`ef-` here) so two posts never collide on the index page.+- Light tokens on `:root`, dark override on `:root[data-theme="dark"]` using your site's dark palette (for example ground `#171b22`, line `#262c36`, ink `#f1f5f9`). On a site with its own theme toggle, never key dark mode off `prefers-color-scheme`.+- Accent `--ef-accent:#c15f3c` for text and strokes, `--ef-node:#d97757` for filled dots and cells. Coral marks the point of the figure, nowhere else.+- Kicker (`.ef__k`) and figcaption are mono, 9px, uppercase. The caption states the claim in one or two sentences.++## Six patterns++| Pattern | Use when the claim is | Motion |+|---|---|---|+| A. Fan-out rows | one artifact, several readers, some gaps | a dot pings each row in turn (`animation-delay` per row) |+| B. Step x run grid | behavior changes across runs or versions | a shaded column steps across runs (`steps(1)`) |+| C. Orbit vs relay | one owner vs a chain of handoffs | dot circles the orbit; underline fills each handoff in sequence |+| D. SVG tree + signal | identity or lineage from root to leaf | dot rides `offset-path` to the highlighted leaf |+| E. Stage rail | a pipeline with owners; some stages unbuilt | dot travels the rail and turns coral at the point stage; hatched = to build |+| F. Many-to-few mapping | information lost in a conversion | coral dashed edges animate `stroke-dashoffset` where states collapse |++## Screenshots and tweets++- `.ef-tw` (440px max, centered) for one tweet, `.ef-tw2` two-up grid that stacks under 700px. Link the image to the source post. Caption = author + date.+- `.ef-shot` for product or web screenshots, full column width, caption names the product and capture date.+- Crop tweet captures to the tweet card only: exclude the X sidebar, the reply box and the viewer's avatar.+- Product screenshots: reuse images already published on the site when they show the claim (for example `/assets/screens/*.png`). Mask customer PII.++## Gotchas (cost a retry)++- `.ef-grid>div{display:flex}` beats `.ef-col{display:none}` on specificity. Hide grid children with `.ef-grid>.ef-col`.+- SVG text labels and edges: leave about 15px between the end of a label and the next node's edge, or the line runs through the text. Check at 720 viewBox width.+- `text-transform:uppercase` on `.tag` changes IDs (`acct_8f2c91` becomes `ACCT_8F2C91`). Use `.lbl` for literal identifiers.+- Wrapped mono owner tags need `line-height:1.45`, or the two lines touch.+- Long run headers wrap badly at 375px. Break them as `Run 1<br>cold`.+- `scrollIntoView` on a site with smooth scrolling, so a screenshot taken right after shows the old position. Set `document.documentElement.style.scrollBehavior='auto'` and `scrollTo` first.+- If the preview server cannot read your build folder, copy it to a temp folder and serve it from there.+- Every motion block needs a `@media (prefers-reduced-motion:reduce)` kill, and the signal dots should be hidden (opacity 0) there.++## Verify before publishing++1. Build, serve the copy, and screenshot every figure at desktop width and at 375px.+2. Check that no `figure` has `scrollWidth > clientWidth`.+3. Read each image against its caption: is the coral element the one that proves the claim?++## Product UI recreations++Raster product screenshots can look soft on a blog. Rebuild them as HTML instead: a figure with a window bar, left nav, and the real layout, styled with your brand tokens. Copy the real values (names, durations, counts) from the source screenshot, and caption it "Recreated from <product>" with the date. Mask customer data. Never present a proposed feature as a recreation; label mockups as mockups.++## Tweet captures++Capture tweets from the official embed in a headless browser at 2x, light theme:+`https://platform.twitter.com/embed/Tweet.html?id=<id>&theme=light&dnt=true&hideThread=true`, then screenshot the first `article` with Playwright (`device_scale_factor=2`, viewport 560 wide) and save as JPEG q90. This renders logged out and gives about 1100px wide images.++- Do not capture through your everyday Chrome profile. Background windows never paint, so captures come out black, and an automation daemon attached to a real tab navigates that tab away.+- x.com status pages do not render in a logged-out headless browser. Use the embed URL.++## Markdown gotcha++A blank line inside the post's `<style>` block ends the raw-HTML block, and the markdown renderer then swallows the rest of the post into the style element (empty page). Keep every `<style>` block free of blank lines.diff --git a/skills/feature-doc/SKILL.md b/skills/feature-doc/SKILL.mdnew file mode 100644index 0000000..e276de8--- /dev/null+++ b/skills/feature-doc/SKILL.md@@ -0,0 +1,128 @@+---+name: feature-doc+description: >+ Closed-loop feature documentation for your product. Give it a feature (issue+ numbers or an id) and it reads the source, drives your live app to capture real+ screenshots and a screen recording, writes a docs article (Docusaurus or any+ markdown docs site) with both how-to steps and use-case content, then verifies+ the article with a fresh-context read-only verifier before reporting. Use when+ you say "write the doc for <feature>", "document issue #123", or "/feature-doc".+---++# feature-doc: closed-loop feature documentation++Produces one evidence-backed feature article end to end. Capture needs no manual+gesture: a bundled recorder grabs frames from the browser through the DevTools+protocol. Publishing the docs PR stays a gate for you at CP-6.++## Configuration++Set these once (a `.env`, your `kit.toml`, or pass them as arguments). Nothing below is hardcoded.++| Setting | Meaning | Example |+|---|---|---|+| `APP_URL` | Start page of the live app to drive | `https://app.example.com/projects/1` |+| `ISSUE_REPO` | Issue tracker holding the feature issues | `your-org/your-product` |+| `DOCS_REPO` | Local path of the docs repo | `../your-docs` |+| `DOCS_DIR` | Folder inside the docs repo for the article | `docs/features/` |+| `EVIDENCE_DIR` | Where screenshots and video land | `./evidence/<feature>/` |++Keep the docs repo in a folder your tools can always read. Some operating systems block background reads of the Documents folder mid-session, which breaks the verifier.++## When to use+- A shipped or shipping feature has no article, or an outdated one.+- You want a doc that works as a user manual and as a guide to what you can do with the feature, with real screenshots and a video.++Skip it for backend features with no user surface (write a short "no doc required" record instead).++## Closed loop+```+CP-1 spec (issues/repo) -> CP-2 plan (AC-n) -> CP-3 build (capture + write)+ -> CP-3v component verify (task-verifier, read-only) -> fix-agent (max 2)+ -> CP-5 post-condition -> CP-6 ship gate (you review, then open the docs PR)+```+The writer never grades its own work. The verifier is a fresh-context, read-only subagent that gets paths and AC-n only, never the writer's narration. See the `closed-loop` skill for the checkpoint mechanics.++## Inputs+- Feature id plus seed issue numbers in `ISSUE_REPO`, or a spec path.+- A browser already logged in to the app, reachable by a browser automation tool (Playwright, CDP, or your browser harness). If the app redirects to a login page, stop and ask the user to sign in. Never type credentials.+- The docs repo at `DOCS_REPO`. One article per feature: a new feature gets a new article, a changed one updates the existing article.++## Pipeline++### 1. Enrich (CP-1)+Read each seed issue (`gh issue view <n> --repo $ISSUE_REPO --json title,body,state,labels,milestone`, or your tracker's CLI) and any matching spec files. Establish the concrete user surface, the ship status per issue (an OPEN issue is not a shipped surface, so do not claim it), and the exact flow to demo. Never invent UI. Where a detail is unknown, mark it `TODO` and flag it.++### 2. Plan (CP-2)+Map the article's sections to AC-n (see Post-conditions). Grep the docs repo for existing coverage to decide between a new article and an update.++### 3. Capture (CP-3)+Drive the live flow and save real evidence into `EVIDENCE_DIR`.++- **Screenshots** of each meaningful state, using your browser tool's screenshot call.+- **A real video** of the end-to-end flow with the bundled recorder (no gesture, no ffmpeg needed for the capture):+ ```bash+ SR_OUT=$EVIDENCE_DIR/<feature>-demo \+ SR_URL=$APP_URL \+ SR_FPS=8 \+ SR_STEPS='[{"at":0.5,"do":"click_testid","testid":"..."},{"at":2.0,"do":"click_text","text":"..."}]' \+ browser-harness < .claude/skills/feature-doc/tools/screenrec.py+ ```+ `screenrec.py` runs inside a CDP-based Python harness that exposes the page (`browser-harness` is one such tool; adapt the launcher to Playwright or your own). It writes frames, `<out>.manifest.json` (fps, viewport, per-action events with cursor coordinates and captions) and a quick `<out>.raw.mp4` preview. Step actions are `click_xy|click_testid|click_text|type|key|scroll`, each with `at` (seconds) and an optional `caption`.++ The deliverable is a clean, complete recording of the real workflow: set up, configure, use, get the result. Finish it with `tools/recompose.py`, which places the real viewport in a simple browser window on a gradient background and speeds up long waits instead of cutting them. No captions, no intro or outro cards, no synthetic cursor.+ ```bash+ RC_MANIFEST=<base>.manifest.json RC_OUT=<feature>-walkthrough.mp4 \+ RC_SEGMENTS='[[0,9,1],[9,58,8],[58,70,1]]' # [from_s,to_s,speed]; ramp the waits \+ RC_ADDR="app.example.com" python3 .claude/skills/feature-doc/tools/recompose.py+ ```+ `recompose.py` needs ffmpeg and Pillow. Embed the result with a plain video tag:+ `<video controls preload="metadata" style="width:100%;border-radius:8px;"><source src="..." type="video/mp4" /></video>`.+ - Length follows the task: long enough to teach setup and usage.+ - The usage payoff must work on camera. If the payoff step is broken, do not record a stub. Use screenshots for the working part and hold the video until the full flow works.+ - A clip of a few seconds is worse than a screenshot. Use a screenshot instead.+ - `tools/videokit.py` makes a branded, captioned teaser with intro and outro cards. Use it only for marketing teasers, never for walkthroughs.+- **Optional polish:** an interactive demo (Arcade or similar). Browsers require a trusted user gesture to start such recorders, so `tools/arcade-record.py` drives the flow while you press the start and stop shortcut yourself.+- **Look at every capture.** Open the images and the video, name any UI discrepancy, fix the flow, and re-capture. Never pass on "the element exists".+- If a flow is gated (a broken backend path, an unshipped surface), capture what works, file the blocker in your tracker, and mark the rest pending. Do not fake a working demo.+- Mask any customer data or personal data visible in a capture before it leaves your machine.++### 4. Write (CP-3)+Write the article as markdown (MDX-safe when the docs site is Docusaurus) with both layers:+- **How-to:** overview, why it matters, step-by-step usage.+- **Use-case layer:** at least 3 use cases with sample workflows (each a concrete prompt or step list plus the expected result), prompting techniques where the feature takes input, best practices, limitations.+- Embed the captured media (`` for images, a video tag for the recording). Cross-link to related articles.+- Run the draft through the `no-ai-slop` skill before verification.++### 5. Verify (CP-3v then CP-5)+Spawn a `task-verifier` with only the article path, the evidence directory and the AC-n list. It re-opens the files and media itself and returns one row per AC:+`EVIDENCE AC-n | CP-3v | PASS|FAIL | <one line + path/observation>`.+On `FAIL:fixable`, spawn `fix-agent` (max 2 attempts) with just the failed AC-n, then re-verify. After 2 attempts, escalate with the evidence.++### 6. Report and ship gate (CP-6)+Summarize the article path, the media (with accessible URLs once uploaded), the AC-n PASS table, and open TODOs or gated items. Opening the docs PR waits for the user.++## Post-conditions+- **AC-1** The article exists at the planned path under `DOCS_DIR` with valid frontmatter for your docs site.+- **AC-2** It contains how-to steps and the use-case layer (at least 3 use cases, prompting where relevant, best practices).+- **AC-3** Every UI or behavior claim is grounded in a captured screenshot or an issue body. Unknowns are `TODO`, not invented. Surfaces from OPEN issues are marked gated, not shipped.+- **AC-4** Either (a) a clean, complete walkthrough recording exists (real setup, usage and result, no decoration, valid mp4 by `ffprobe`) and the article embeds it, or (b) screenshots cover the working parts and the article notes the video is pending. A short decorated clip does not satisfy this.+- **AC-5** Evidence that ships is accessible (uploaded to the PR or issue, not a local path).+- **AC-6** A limitations section states any gated, blocked or unshipped parts.++## Rules+- No fabrication. Follow your house writing rules (no em dashes, TL;DR first, scannable).+- Visual verification is mandatory for UI docs: read the pixels, fix what is wrong, re-capture.+- Use relative paths or config values in all output, never machine-specific absolute paths.++## Escape hatches+- **Auth wall:** stop and ask the user to sign in. Never enter credentials.+- **CDP will not connect:** point your harness at the browser's remote-debugging URL (for example `http://localhost:9222`) and reload it. If the browser prompts for permission, the user clicks Allow.+- **Flow gated by a bug:** file it, capture the working portion, mark the rest pending.+- **ffmpeg absent:** the recorder falls back to a GIF preview. Install ffmpeg for the mp4.++## Tools+- `tools/screenrec.py`: flow recorder (CDP frame-grab loop to frames, manifest and raw preview).+- `tools/recompose.py`: walkthrough finisher. Manifest to a clean 1920x1080 h264 mp4 with a browser window, gradient and speed ramps. Options: `RC_FIT=1` fits a phone or tall capture, `RC_CROP=x0,y0,x1,y1` crops the source, `RC_NOBAR=1` drops the browser bar, `RC_SPEED_BADGE=1` labels sped-up segments, `RC_REDACT` pixelates boxes such as a person's name.+- `tools/videokit.py`: branded teaser cut with captions and cards (teaser only).+- `tools/arcade-record.py`: hybrid interactive-demo recorder. Set `APP_URL` and add flows to its `FLOWS` table.diff --git a/skills/feature-doc/tools/arcade-record.py b/skills/feature-doc/tools/arcade-record.pynew file mode 100644index 0000000..1122774--- /dev/null+++ b/skills/feature-doc/tools/arcade-record.py@@ -0,0 +1,165 @@+#!/usr/bin/env python3+"""+Hybrid Arcade recorder for web app flows.++Why hybrid: the Arcade Chrome extension only starts/stops recording on a *trusted*+user gesture (toolbar click or Cmd+E) that automation can't supply. But Arcade+captures the page via a content script, so it DOES capture CDP-driven clicks. This+script drives the whole flow; you supply just two keypresses (Cmd+E to start, Cmd+E+to stop). Run it in your own terminal so its input() pauses catch your timing.++Usage:+ export BU_CDP_URL=http://localhost:9222 # your daily Chrome w/ debugging+ python3 arcade-record.py <flow> # e.g. connect-demo+ python3 arcade-record.py --list++Requires: `browser-harness` on PATH, the target Chrome logged into your app,+and the Arcade extension installed + logged into your Arcade workspace.++Add a new flow: append an entry to FLOWS below. Steps run top-to-bottom with pacing+that reads naturally in the recording. Use `click_text`/`click_testid` (resolved to+coordinates → trusted CDP click) so the flow survives minor layout shifts.+"""+import os, sys, json, subprocess, time++APP_URL = os.environ.get("APP_URL", "https://app.example.com/start") # page the flow starts on+CDP = os.environ.get("BU_CDP_URL", "http://localhost:9222")+ENV = {**os.environ, "BU_CDP_URL": CDP}++# ---- flow library -----------------------------------------------------------+# Each flow: target URL to prep on, and a list of steps.+# step actions: goto | new_chat | click_text | click_testid | click_xy | type |+# key | sleep | shot | note+FLOWS = {+ "connect-demo": {+ "url": APP_URL,+ "title": "Connect apps to the assistant",+ "steps": [+ {"do": "note", "msg": "Chat view: the composer has a Connect apps control"},+ {"do": "click_testid", "testid": "connect-integrations-button", "label": "open Connect apps"},+ {"do": "sleep", "s": 2.0},+ {"do": "note", "msg": "Connectors popover lists the providers"},+ {"do": "click_text", "text": "Google Drive", "label": "focus Google Drive row"},+ {"do": "sleep", "s": 2.0},+ {"do": "note", "msg": "Google Drive connected: toggle on + per-chat control"},+ {"do": "sleep", "s": 1.5},+ {"do": "key", "key": "Escape"},+ {"do": "sleep", "s": 1.0},+ ],+ },+ # template to copy for other features (fill url + steps, then re-run)+ "template": {+ "url": APP_URL,+ "title": "<feature> demo",+ "steps": [+ {"do": "note", "msg": "describe the starting state"},+ {"do": "click_text", "text": "<button label>", "label": "step 1"},+ {"do": "sleep", "s": 2.0},+ ],+ },+}++# ---- browser-harness bridge -------------------------------------------------+def bh(code: str) -> str:+ """Run a python snippet inside browser-harness (persistent daemon) and return stdout."""+ r = subprocess.run(["browser-harness"], input=code, capture_output=True, text=True, env=ENV)+ if r.returncode != 0:+ sys.stderr.write(r.stderr[-800:])+ return r.stdout.strip()++def resolve_tab(url_prefix: str) -> str:+ out = bh(f"""+tabs=list_tabs()+m=[t for t in tabs if (t.get('url') or '').startswith({url_prefix!r})]+print(m[0]['targetId'] if m else 'NONE')+""")+ tid = out.splitlines()[-1].strip() if out else "NONE"+ return tid++def prep(url: str) -> str:+ """Open/activate the flow tab, fresh chat, foreground it for recording."""+ tid = resolve_tab(url)+ if tid == "NONE":+ bh(f"new_window({url!r}); import time; time.sleep(5)")+ tid = resolve_tab(url)+ bh(f"""+import time+switch_tab({tid!r}); time.sleep(1)+cdp("Target.activateTarget", targetId={tid!r})+# start a clean chat if the New chat control exists+js('''(function(){{const b=[...document.querySelectorAll("*")].find(e=>e.children.length===0&&/^New chat$/.test((e.textContent||"").trim()));if(b)b.click();}})()''')+time.sleep(2)+""")+ return tid++def step(tid: str, s: dict):+ """Execute one step. Re-switches to the tab first (daemon can drift)."""+ pre = f'import time, json\nswitch_tab({tid!r})\n'+ do = s["do"]+ if do == "note":+ print(f" • {s['msg']}")+ return+ if do == "sleep":+ bh(pre + f"time.sleep({s['s']})")+ return+ if do == "key":+ bh(pre + f"press_key({s['key']!r}); time.sleep(0.6)")+ elif do == "type":+ bh(pre + f"type_text({s['text']!r}); time.sleep(0.5)")+ elif do == "goto":+ bh(pre + f"goto_url({s['url']!r}); wait_for_load(); time.sleep(2)")+ elif do == "click_xy":+ bh(pre + f"click_at_xy({s['x']},{s['y']}); time.sleep(1)")+ elif do in ("click_text", "click_testid"):+ # resolve center coords via JS, then a TRUSTED coordinate click (Arcade captures it)+ if do == "click_text":+ finder = (f"[...document.querySelectorAll('button,[role=button],a,div,span')]"+ f".filter(e=>e.children.length<=2 && (e.textContent||'').trim()==={s['text']!r})")+ else:+ finder = f"[document.querySelector('[data-testid={s['testid']}]')].filter(Boolean)"+ out = bh(pre + f"""+el=js('''(function(){{const c={finder};if(!c.length)return "NONE";const r=c[0].getBoundingClientRect();return JSON.stringify({{x:Math.round(r.x+r.width/2),y:Math.round(r.y+r.height/2)}});}})()''')+print(el)+""")+ line = out.splitlines()[-1].strip() if out else "NONE"+ if line == "NONE" or not line.startswith("{"):+ print(f" ! could not find target for step: {s.get('label', do)}")+ return+ c = json.loads(line)+ bh(pre + f"click_at_xy({c['x']},{c['y']}); time.sleep(1)")+ if s.get("label"):+ print(f" ✓ {s['label']}")++# ---- main -------------------------------------------------------------------+def main():+ if "--list" in sys.argv:+ print("Flows:", ", ".join(FLOWS)); return+ name = next((a for a in sys.argv[1:] if not a.startswith("-")), None)+ if not name or name not in FLOWS:+ print("Usage: python3 arcade-record.py <flow> (--list to see flows)"); return+ flow = FLOWS[name]++ print(f"\n=== Arcade hybrid recording: {name} ===")+ print(f"Title: {flow['title']}")+ print("Prepping the tab...")+ tid = prep(flow["url"])+ if tid == "NONE":+ print("Could not open the flow tab. Is Chrome running with --remote-debugging-port=9222?"); return++ print("\n>>> In Chrome, on the flow tab, press **Cmd+E** now to START Arcade recording.")+ input(">>> Then press Enter here to begin driving the flow...")++ print("\nDriving the flow (watch the recording):")+ time.sleep(1.0)+ for s in flow["steps"]:+ step(tid, s)++ print("\n>>> Flow done. Press **Cmd+E** in Chrome to STOP recording.")+ input(">>> Then press Enter here...")++ print("\nArcade will open the editor for the new recording.")+ print("Next: title it '%s', tidy steps, Share -> Embed to get the demo.arcade.software URL," % flow["title"])+ print("then paste that URL into the feature package's release-note iframe.")++if __name__ == "__main__":+ main()diff --git a/skills/feature-doc/tools/recompose.py b/skills/feature-doc/tools/recompose.pynew file mode 100644index 0000000..012dc1c--- /dev/null+++ b/skills/feature-doc/tools/recompose.py@@ -0,0 +1,188 @@+#!/usr/bin/env python3+"""+recompose.py: turn a raw screenrec capture into a clean, house-style walkthrough+video, matching the blog house style: the viewport in a simple browser window+(traffic lights + address pill) on a teal->blue gradient, NO text/captions/cards/+synthetic-cursor. Supports variable speed so long waits are sped up (not cut).++Usage (plain python3; needs ffmpeg at /opt/homebrew/bin/ffmpeg):+ RC_MANIFEST=<base>.manifest.json RC_OUT=out.mp4 \+ RC_SEGMENTS='[[0,8,1],[8,58,8],[58,70,1]]' # [from_s,to_s,speed]; gaps=speed 1 \+ RC_ADDR="app.example.com" python3 recompose.py++Segments tile source time; anything not covered plays at 1x. Output is 30fps h264.++Opt-in options for sources that are not desktop-shaped (all off by default, so older runs+render the same):+ RC_FIT=1 fit the card inside the frame with RC_MARGIN px (default 40) on each side,+ instead of a fixed 1680 px width. Needed for phone (portrait) and tall captures.+ RC_CROP=x0,y0,x1,y1 crop every source frame first (source pixels), e.g. a terminal replay's window.+ RC_NOBAR=1 no browser bar: for a capture that already carries its own window chrome.+ RC_SPEED_BADGE=1 show a small "Sped up Nx" pill at the right end of the browser bar while a+ segment plays faster than 1x, so viewers know the wait was shortened.+ RC_REDACT='[[x0,y0,x1,y1],...]' pixelate these boxes (source pixels, before RC_CROP) on every+ frame, e.g. a person's name in a terminal replay.+"""+import os, json, glob, shutil, subprocess+from PIL import Image, ImageDraw, ImageFont, ImageFilter++MAN = json.load(open(os.environ["RC_MANIFEST"]))+OUT = os.environ["RC_OUT"]+ADDR = os.environ.get("RC_ADDR", "app.example.com")+OUTFPS = int(os.environ.get("RC_OUTFPS", "30"))+SEGS = json.loads(os.environ.get("RC_SEGMENTS", "[]")) # [[from,to,speed],...]+CLICKS = os.environ.get("RC_CLICKS", "") not in ("", "0", "false") # opt-in click-pulse highlights+PULSE = float(os.environ.get("RC_PULSE", "0.55")) # seconds a click ring stays visible+W, H = 1920, 1080+TEAL, BLUE = (34, 193, 214), (43, 119, 206) # sampled from blog gradient++def find_ffmpeg():+ for p in (shutil.which("ffmpeg"), "/opt/homebrew/bin/ffmpeg", "/usr/local/bin/ffmpeg"):+ if p and os.path.exists(p): return p+FFMPEG = find_ffmpeg()++def font(sz):+ for p in ("/System/Library/Fonts/Supplemental/Arial.ttf", "/System/Library/Fonts/HelveticaNeue.ttc"):+ try: return ImageFont.truetype(p, sz)+ except Exception: pass+ return ImageFont.load_default()+F_ADDR = font(22)++def gradient_bg():+ bg = Image.new("RGB", (W, H))+ px = bg.load()+ for y in range(H):+ for x in range(0, W):+ t = (x / W + y / H) / 2+ px[x, y] = tuple(int(TEAL[i] + (BLUE[i] - TEAL[i]) * t) for i in range(3))+ return bg+BG = gradient_bg()++frames = sorted(glob.glob(os.path.join(MAN["frames_dir"], "*.jpg")))+CROP = tuple(int(v) for v in os.environ["RC_CROP"].split(",")) if os.environ.get("RC_CROP") else None+NOBAR = os.environ.get("RC_NOBAR", "") not in ("", "0", "false")+FIT = os.environ.get("RC_FIT", "") not in ("", "0", "false")+SPEED_BADGE = os.environ.get("RC_SPEED_BADGE", "") not in ("", "0", "false")+REDACT = [tuple(int(v) for v in b) for b in json.loads(os.environ.get("RC_REDACT", "[]"))]+c0 = Image.open(frames[0]); iw, ih = c0.size+if CROP: iw, ih = CROP[2] - CROP[0], CROP[3] - CROP[1]+CHROME = 0 if NOBAR else 44+CARD_W = 1680+if FIT:+ margin = int(os.environ.get("RC_MARGIN", "40"))+ CARD_W = int(min(W - 2 * margin, (H - 2 * margin - CHROME) * iw / ih))+scale = CARD_W / iw+CARD_H = int(ih * scale)+CX = (W - CARD_W) // 2+CY = (H - (CARD_H + CHROME)) // 2++def rounded(im, rad):+ m = Image.new("L", im.size, 0); ImageDraw.Draw(m).rounded_rectangle([0, 0, im.size[0], im.size[1]], rad, fill=255)+ out = im.convert("RGBA"); out.putalpha(m); return out++# pre-render shadow + chrome bar (static)+SHADOW = Image.new("RGBA", (W, H), (0, 0, 0, 0))+ImageDraw.Draw(SHADOW).rounded_rectangle([CX - 8, CY - 8, CX + CARD_W + 8, CY + CHROME + CARD_H + 8], 20, fill=(0, 0, 0, 120))+SHADOW = SHADOW.filter(ImageFilter.GaussianBlur(26))+BAR_R = None+if not NOBAR:+ BAR = Image.new("RGBA", (CARD_W, CHROME), (246, 247, 249, 255))+ _bd = ImageDraw.Draw(BAR)+ for i, col in enumerate([(255, 95, 86), (255, 189, 46), (39, 201, 63)]):+ _bd.ellipse([16 + i * 22, CHROME // 2 - 6, 28 + i * 22, CHROME // 2 + 6], fill=col)+ _bd.rounded_rectangle([92, 9, CARD_W - 20, CHROME - 9], 8, fill=(255, 255, 255))+ _bd.text((108, CHROME // 2), ADDR, font=F_ADDR, fill=(110, 118, 128), anchor="lm")+ BAR_R = rounded(BAR, 10)++# click events (image-pixel space) mapped onto the card, for opt-in pulse highlights+IMG_W = MAN.get("img_w", iw); IMG_H = MAN.get("img_h", ih)+CLICK_EV = [e for e in MAN.get("events", []) if e.get("do", "").startswith("click") and e.get("x") is not None]++def click_at(st):+ """Return (cx, cy, phase 0..1) for a click ring active at source-time st, else None."""+ for e in CLICK_EV:+ dt = st - e["t"]+ if 0 <= dt <= PULSE:+ cx = CX + e["x"] * (CARD_W / IMG_W)+ cy = CY + CHROME + e["y"] * (CARD_H / IMG_H)+ return cx, cy, dt / PULSE+ return None++F_BADGE = font(17)+_BADGES = {}++def badge(speed):+ """Dark pill with "Sped up Nx", cached per speed."""+ if speed not in _BADGES:+ txt = f"Sped up {speed:g}x"+ tw = int(F_BADGE.getlength(txt))+ b = Image.new("RGBA", (tw + 22, CHROME - 18), (0, 0, 0, 0))+ bd = ImageDraw.Draw(b)+ bd.rounded_rectangle([0, 0, b.width - 1, b.height - 1], b.height // 2, fill=(40, 44, 52, 235))+ bd.text((11, b.height // 2), txt, font=F_BADGE, fill=(255, 255, 255), anchor="lm")+ _BADGES[speed] = b+ return _BADGES[speed]++def pixelate(im, box, block=12):+ reg = im.crop(box)+ small = reg.resize((max(1, reg.width // block), max(1, reg.height // block)), Image.BILINEAR)+ im.paste(small.resize(reg.size, Image.NEAREST), box[:2])++def stage(src_idx, st=None, speed=1.0):+ canvas = BG.convert("RGBA").copy()+ canvas.alpha_composite(SHADOW)+ if not NOBAR:+ canvas.paste(BAR_R, (CX, CY), BAR_R)+ if SPEED_BADGE and speed > 1.05:+ b = badge(speed)+ canvas.alpha_composite(b, (CX + CARD_W - 20 - 5 - b.width, CY + (CHROME - b.height) // 2))+ content = Image.open(frames[src_idx]).convert("RGB")+ for box in REDACT: pixelate(content, box)+ if CROP: content = content.crop(CROP)+ content = content.resize((CARD_W, CARD_H), Image.LANCZOS if FIT else Image.BICUBIC)+ cr = rounded(content, 10)+ canvas.paste(cr, (CX, CY + CHROME), cr)+ if CLICKS and st is not None:+ hit = click_at(st)+ if hit:+ cx, cy, ph = hit+ ov = Image.new("RGBA", (W, H), (0, 0, 0, 0)); od = ImageDraw.Draw(ov)+ # expanding ring (fades out) + steady dot+ r = int(16 + 46 * ph); a = int(200 * (1 - ph))+ od.ellipse([cx - r, cy - r, cx + r, cy + r], outline=(255, 189, 46, a), width=6)+ dot = int(200 * (1 - ph * 0.4))+ od.ellipse([cx - 11, cy - 11, cx + 11, cy + 11], fill=(255, 189, 46, dot))+ canvas.alpha_composite(ov)+ return canvas.convert("RGB")++# ---- build the source-time -> output-frame plan (variable speed) ------------+src_fps = MAN["fps"]; dur = MAN["duration"]+segs = sorted([[float(a), float(b), float(s)] for a, b, s in SEGS], key=lambda x: x[0])+# fill gaps at speed 1+plan = []; cur = 0.0+for a, b, s in segs:+ if a > cur: plan.append([cur, a, 1.0])+ plan.append([a, b, s]); cur = b+if cur < dur: plan.append([cur, dur, 1.0])+if not plan: plan = [[0, dur, 1.0]]++TMP = OUT + ".rc";+if os.path.isdir(TMP): shutil.rmtree(TMP)+os.makedirs(TMP)+oi = 0+for a, b, s in plan:+ n = max(1, round((b - a) / max(s, 0.01) * OUTFPS))+ for i in range(n):+ st = a + (i / n) * (b - a)+ idx = min(len(frames) - 1, max(0, round(st * src_fps)))+ stage(idx, st, s).save(os.path.join(TMP, f"{oi:05d}.jpg"), quality=88); oi += 1+print(f"recomposed {oi} frames @ {OUTFPS}fps ({oi/OUTFPS:.1f}s); plan={[[round(a,1),round(b,1),s] for a,b,s in plan]}")++if not FFMPEG:+ print("no ffmpeg; frames at", TMP); raise SystemExit+r = subprocess.run([FFMPEG, "-y", "-framerate", str(OUTFPS), "-i", os.path.join(TMP, "%05d.jpg"),+ "-c:v", "libx264", "-pix_fmt", "yuv420p", "-movflags", "+faststart", "-crf", "20", OUT],+ capture_output=True, text=True)+if r.returncode != 0: print("ffmpeg failed:", r.stderr[-400:]); raise SystemExit(1)+shutil.rmtree(TMP)+print("RECOMPOSED_OUT:", OUT)diff --git a/skills/feature-doc/tools/screenrec.py b/skills/feature-doc/tools/screenrec.pynew file mode 100644index 0000000..6bf0887--- /dev/null+++ b/skills/feature-doc/tools/screenrec.py@@ -0,0 +1,133 @@+# screenrec.py: autonomous flow screen recorder for browser-harness.+#+# Captures continuous JPEG frames at a target fps while injecting time-scheduled+# actions, and writes a manifest (fps, viewport + image dims, per-action events with+# resolved cursor coords + captions) so videokit.py can add a synthetic cursor,+# captions, and polish. Assembles a raw mp4/GIF too (quick preview). No Arcade, no+# user gesture.+#+# Run THROUGH browser-harness (helpers in scope):+# SR_OUT=/path/out SR_URL=https://... SR_STEPS='[...]' browser-harness < screenrec.py+#+# Env:+# SR_OUT output base (no ext). Writes <OUT>.frames/*.jpg, <OUT>.manifest.json,+# and a quick <OUT>.raw.mp4|gif preview.+# SR_URL target URL (reuse+activate matching tab, else open background window).+# SR_STEPS JSON list of actions, each {"at":sec,"do":...,"caption":"..."}:+# click_xy{x,y} | click_testid{testid} | click_text{text} | type{text}+# | key{key} | scroll{dx,dy}+# SR_FPS target fps (default 8). SR_DURATION seconds (default last at +2.5, min 4).+# SR_MAXDIM max frame dim px (default 1600).+import os, json, time, base64, glob, subprocess, shutil++OUT = os.environ["SR_OUT"]+URL = os.environ.get("SR_URL", "")+STEPS = json.loads(os.environ.get("SR_STEPS", "[]"))+FPS = float(os.environ.get("SR_FPS", "8"))+MAXD = int(os.environ.get("SR_MAXDIM", "1600"))+DUR = float(os.environ.get("SR_DURATION", "0")) or (max((s["at"] for s in STEPS), default=2) + 2.5)+DUR = max(DUR, 4.0)++FRAMES = OUT + ".frames"+if os.path.isdir(FRAMES): shutil.rmtree(FRAMES)+os.makedirs(FRAMES, exist_ok=True)++def tabs(): return cdp("Target.getTargets")["targetInfos"] # noqa: F821+tid = None+if URL:+ m = [t for t in tabs() if (t.get("url") or "").startswith(URL) and t["type"] == "page"]+ if not m:+ new_window(URL); wait_for_load(); time.sleep(3) # noqa: F821+ m = [t for t in tabs() if (t.get("url") or "").startswith(URL) and t["type"] == "page"]+ tid = m[0]["targetId"] if m else None+if tid:+ switch_tab(tid); cdp("Target.activateTarget", targetId=tid); time.sleep(1) # noqa: F821++css = js("JSON.stringify({w:window.innerWidth,h:window.innerHeight})") # noqa: F821+css = json.loads(css) if css else {"w": 1512, "h": 800}++def rect_of(finder_js):+ v = js(f"""(function(){{const c={finder_js};if(!c.length)return null;const r=c[0].getBoundingClientRect();return JSON.stringify({{x:Math.round(r.x+r.width/2),y:Math.round(r.y+r.height/2)}});}})()""") # noqa: F821+ try: return json.loads(v) if v and v.startswith("{") else None+ except Exception: return None++EVENTS = [] # {t, x, y, caption, do}+def act(s, t):+ if tid: switch_tab(tid) # noqa: F821+ do = s["do"]; x = y = None+ try:+ if do == "click_xy":+ x, y = s["x"], s["y"]; click_at_xy(x, y) # noqa: F821+ elif do == "click_testid":+ r = rect_of(f"[document.querySelector('[data-testid={s['testid']}]')].filter(Boolean)")+ if r: x, y = r["x"], r["y"]; click_at_xy(x, y) # noqa: F821+ elif do == "click_text":+ r = rect_of(f"[...document.querySelectorAll('button,[role=button],a,div,span')].filter(e=>e.children.length<=2&&(e.textContent||'').trim()==={s['text']!r})")+ if r: x, y = r["x"], r["y"]; click_at_xy(x, y) # noqa: F821+ elif do == "type":+ type_text(s["text"]) # noqa: F821+ elif do == "key":+ press_key(s["key"]) # noqa: F821+ elif do == "scroll":+ scroll(s.get("x", 600), s.get("y", 400), s.get("dx", 0), s.get("dy", 400)) # noqa: F821+ except Exception as e:+ print(f" action {do} @{s['at']}s failed: {e}")+ EVENTS.append({"t": round(t, 3), "x": x, "y": y, "caption": s.get("caption", ""), "do": do})++def grab(i):+ r = cdp("Page.captureScreenshot", format="jpeg", quality=70) # noqa: F821+ p = os.path.join(FRAMES, f"{i:05d}.jpg")+ open(p, "wb").write(base64.b64decode(r["data"]))+ return p++print(f"recording ~{DUR:.0f}s @ {FPS}fps -> {OUT}")+interval = 1.0 / max(FPS, 1)+t0 = time.time(); i = 0; fired = set()+while True:+ t = time.time() - t0+ if t >= DUR: break+ for si, s in enumerate(STEPS):+ if si not in fired and t >= s["at"]:+ act(s, t); fired.add(si)+ grab(i); i += 1+ dt = interval - ((time.time() - t0) - t)+ if dt > 0: time.sleep(dt)+n = i; real_fps = n / DUR if DUR else FPS+frames = sorted(glob.glob(os.path.join(FRAMES, "*.jpg")))++img_w = img_h = 0+try:+ from PIL import Image+ im = Image.open(frames[0]); img_w, img_h = im.size+except Exception:+ pass++manifest = {"fps": round(real_fps, 3), "frame_count": n, "duration": round(DUR, 3),+ "css_w": css["w"], "css_h": css["h"], "img_w": img_w, "img_h": img_h,+ "events": EVENTS, "frames_dir": FRAMES}+open(OUT + ".manifest.json", "w").write(json.dumps(manifest, indent=2))+print(f"captured {n} frames (~{real_fps:.1f} fps), img {img_w}x{img_h}, css {css['w']}x{css['h']}")++def _ffmpeg():+ for p in (shutil.which("ffmpeg"), "/opt/homebrew/bin/ffmpeg", "/usr/local/bin/ffmpeg"):+ if p and os.path.exists(p): return p+ return None+FFMPEG = _ffmpeg()+prev = None+if len(frames) >= 2 and FFMPEG:+ prev = OUT + ".raw.mp4"+ r = subprocess.run([FFMPEG, "-y", "-framerate", f"{real_fps:.2f}", "-pattern_type", "glob",+ "-i", os.path.join(FRAMES, "*.jpg"), "-c:v", "libx264", "-pix_fmt", "yuv420p",+ "-vf", "scale=trunc(iw/2)*2:trunc(ih/2)*2", prev], capture_output=True, text=True)+ if r.returncode != 0: prev = None+if prev is None and len(frames) >= 2:+ try:+ from PIL import Image+ prev = OUT + ".raw.gif"+ imgs = [Image.open(p).convert("RGB") for p in frames]+ for im in imgs:+ if max(im.size) > MAXD: im.thumbnail((MAXD, MAXD))+ imgs[0].save(prev, save_all=True, append_images=imgs[1:], duration=int(1000/max(real_fps,1)), loop=0, optimize=True)+ except Exception: prev = FRAMES+print("MANIFEST:", OUT + ".manifest.json")+print("RAW_PREVIEW:", prev)diff --git a/skills/feature-doc/tools/videokit.py b/skills/feature-doc/tools/videokit.pynew file mode 100644index 0000000..6db640f--- /dev/null+++ b/skills/feature-doc/tools/videokit.py@@ -0,0 +1,225 @@+#!/usr/bin/env python3+"""+videokit.py: edit a screenrec capture into a polished, public-ready video.++Reads a screenrec manifest (frames + per-action events with cursor coords/captions)+and composites, at OUTFPS, onto a branded 1920x1080 stage:+ - branded gradient background+ - the captured content in a rounded "browser card" with a fake chrome bar+ - a synthetic animated cursor that glides (ease-in-out) to each click, with a+ click-pulse ring at the action moment+ - caption lower-thirds per action (fade in/out)+ - intro + outro title cards, with short crossfades and fade in/out+Encodes to mp4 (h264, yuv420p) via ffmpeg.++Usage (plain python3, no browser needed):+ VK_MANIFEST=/path/out.manifest.json VK_OUT=/path/demo.mp4 \+ VK_TITLE="Connect your apps" VK_SUBTITLE="Bring your tools into the assistant" \+ VK_OUTRO_TITLE="Try it today" VK_LOGO="YourProduct" \+ python3 videokit.py+"""+import os, json, glob, math, shutil, subprocess+from PIL import Image, ImageDraw, ImageFont, ImageFilter++def find_ffmpeg():+ for p in (shutil.which("ffmpeg"), "/opt/homebrew/bin/ffmpeg", "/usr/local/bin/ffmpeg"):+ if p and os.path.exists(p): return p+ return None+FFMPEG = find_ffmpeg()++MAN = json.load(open(os.environ["VK_MANIFEST"]))+OUT = os.environ["VK_OUT"]+TITLE = os.environ.get("VK_TITLE", "Feature demo")+SUB = os.environ.get("VK_SUBTITLE", "")+OTITLE= os.environ.get("VK_OUTRO_TITLE", TITLE)+OSUB = os.environ.get("VK_OUTRO_SUB", "")+LOGO = os.environ.get("VK_LOGO", "YourProduct")+BRAND = os.environ.get("VK_BRAND", "#3b6fd4")+OUTFPS= int(os.environ.get("VK_OUTFPS", "24"))+W, H = 1920, 1080++def hex2rgb(h): h = h.lstrip("#"); return tuple(int(h[i:i+2], 16) for i in (0, 2, 4))+BR = hex2rgb(BRAND)+def mix(a, b, t): return tuple(int(a[i] + (b[i] - a[i]) * t) for i in range(3))+INK = (17, 22, 28); BG0 = (11, 15, 19); BG1 = mix(BG0, BR, 0.28)++def font(sz, bold=True):+ cands = (["/System/Library/Fonts/Supplemental/Arial Bold.ttf",+ "/System/Library/Fonts/HelveticaNeue.ttc",+ "/Library/Fonts/Arial Bold.ttf"] if bold else+ ["/System/Library/Fonts/Supplemental/Arial.ttf",+ "/System/Library/Fonts/HelveticaNeue.ttc"])+ for p in cands:+ try: return ImageFont.truetype(p, sz)+ except Exception: continue+ return ImageFont.load_default()++F_TITLE, F_SUB, F_CAP, F_LOGO = font(78), font(36, False), font(34), font(28)++def gradient_bg():+ bg = Image.new("RGB", (W, H), BG0)+ top = Image.new("RGB", (W, H))+ px = top.load()+ for y in range(H):+ c = mix(BG1, BG0, y / H)+ for x in range(0, W, 1): px[x, y] = c+ # radial brand glow top-left+ glow = Image.new("L", (W, H), 0); gd = ImageDraw.Draw(glow)+ gd.ellipse([-400, -500, 900, 700], fill=90)+ glow = glow.filter(ImageFilter.GaussianBlur(180))+ brand_layer = Image.new("RGB", (W, H), BR)+ return Image.composite(brand_layer, top, glow)++BG = gradient_bg()++def rounded(im, rad):+ m = Image.new("L", im.size, 0); ImageDraw.Draw(m).rounded_rectangle([0, 0, im.size[0], im.size[1]], rad, fill=255)+ out = im.convert("RGBA"); out.putalpha(m); return out++def center_text(d, cx, y, text, f, fill, anchor="mm"):+ d.text((cx, y), text, font=f, fill=fill, anchor=anchor)++# ---- content card geometry --------------------------------------------------+frames = sorted(glob.glob(os.path.join(MAN["frames_dir"], "*.jpg")))+c0 = Image.open(frames[0]); iw, ih = c0.size+CARD_W = 1580+CHROME = 46+scale = CARD_W / iw+CARD_H = int(ih * scale)+CX = (W - CARD_W) // 2+CY = 150+dpr = MAN["img_w"] / max(MAN["css_w"], 1) # device px per css px++def content_to_stage(cx_css, cy_css):+ ix, iy = cx_css * dpr, cy_css * dpr # css -> image px+ return CX + ix * scale, CY + CHROME + iy * scale++# precompute cursor keyframes from events that have coords+kf = [(e["t"], *content_to_stage(e["x"], e["y"])) for e in MAN["events"] if e.get("x") is not None]+def ease(t): return t * t * (3 - 2 * t)+def cursor_at(tf):+ if not kf: return None+ if tf <= kf[0][0]: return kf[0][1], kf[0][2]+ for i in range(len(kf) - 1):+ t0, x0, y0 = kf[i]; t1, x1, y1 = kf[i + 1]+ if t0 <= tf <= t1:+ a = ease((tf - t0) / max(t1 - t0, 1e-3))+ return x0 + (x1 - x0) * a, y0 + (y1 - y0) * a+ return kf[-1][1], kf[-1][2]++def draw_cursor(layer, x, y):+ d = ImageDraw.Draw(layer)+ p = [(x, y), (x, y + 34), (x + 9, y + 25), (x + 15, y + 38), (x + 21, y + 35), (x + 15, y + 22), (x + 26, y + 22)]+ d.polygon(p, fill=(255, 255, 255), outline=(20, 20, 20))+def draw_pulse(layer, x, y, prog): # prog 0..1+ d = ImageDraw.Draw(layer); r = int(12 + prog * 42); a = int(180 * (1 - prog))+ d.ellipse([x - r, y - r, x + r, y + r], outline=BR + (a,), width=5)++def draw_chrome(canvas):+ d = ImageDraw.Draw(canvas)+ bar = Image.new("RGBA", (CARD_W, CHROME), (245, 246, 248, 255))+ bd = ImageDraw.Draw(bar)+ for i, col in enumerate([(255, 95, 86), (255, 189, 46), (39, 201, 63)]):+ bd.ellipse([16 + i * 22, CHROME // 2 - 6, 28 + i * 22, CHROME // 2 + 6], fill=col)+ bd.rounded_rectangle([90, 10, CARD_W - 20, CHROME - 10], 9, fill=(255, 255, 255))+ bd.text((104, CHROME // 2), "app.example.com", font=F_LOGO, fill=(120, 128, 138), anchor="lm")+ canvas.paste(rounded(bar, 12), (CX, CY), rounded(bar, 12))++def caption_for(tf):+ for e in MAN["events"]:+ if e.get("caption") and e["t"] <= tf <= e["t"] + 2.6:+ k = min(1.0, (tf - e["t"]) / 0.3, (e["t"] + 2.6 - tf) / 0.3)+ return e["caption"], max(0.0, k)+ return None, 0++def draw_caption(canvas, text, alpha):+ tmp = Image.new("RGBA", (W, H), (0, 0, 0, 0)); d = ImageDraw.Draw(tmp)+ bb = d.textbbox((0, 0), text, font=F_CAP); tw = bb[2] - bb[0]+ pw, ph = tw + 64, 74; x0 = (W - pw) // 2; y0 = 980+ d.rounded_rectangle([x0, y0, x0 + pw, y0 + ph], 20, fill=(12, 16, 20, 235))+ d.rounded_rectangle([x0, y0, x0 + 6, y0 + ph], 20, fill=BR + (255,))+ d.text((W // 2, y0 + ph // 2), text, font=F_CAP, fill=(255, 255, 255, 255), anchor="mm")+ if alpha < 1: tmp.putalpha(tmp.getchannel("A").point(lambda a: int(a * alpha)))+ canvas.alpha_composite(tmp)++# ---- frame renderers --------------------------------------------------------+def card_frame(tf):+ canvas = BG.convert("RGBA").copy()+ idx = min(len(frames) - 1, int(tf * MAN["fps"]))+ content = Image.open(frames[idx]).convert("RGB").resize((CARD_W, CARD_H))+ # shadow+ sh = Image.new("RGBA", (W, H), (0, 0, 0, 0))+ ImageDraw.Draw(sh).rounded_rectangle([CX - 6, CY - 6, CX + CARD_W + 6, CY + CHROME + CARD_H + 6], 22, fill=(0, 0, 0, 150))+ canvas.alpha_composite(sh.filter(ImageFilter.GaussianBlur(24)))+ draw_chrome(canvas)+ canvas.paste(rounded(content, 12), (CX, CY + CHROME), rounded(content, 12))+ center_text(ImageDraw.Draw(canvas), W // 2, 74, TITLE, font(46), (255, 255, 255, 255))+ # cursor + pulse+ cur = cursor_at(tf)+ if cur:+ lay = Image.new("RGBA", (W, H), (0, 0, 0, 0))+ for e in MAN["events"]:+ if e.get("x") is not None and 0 <= tf - e["t"] <= 0.45:+ sx, sy = content_to_stage(e["x"], e["y"]); draw_pulse(lay, sx, sy, (tf - e["t"]) / 0.45)+ draw_cursor(lay, cur[0], cur[1]); canvas.alpha_composite(lay)+ cap, al = caption_for(tf)+ if cap: draw_caption(canvas, cap, al)+ d = ImageDraw.Draw(canvas); center_text(d, W - 130, H - 40, LOGO, F_LOGO, (255, 255, 255, 180))+ return canvas.convert("RGB")++def title_card(title, sub, badge="DEMO"):+ canvas = BG.convert("RGBA").copy(); d = ImageDraw.Draw(canvas)+ d.rounded_rectangle([W // 2 - 70, 372, W // 2 + 70, 420], 24, fill=BR + (255,))+ center_text(d, W // 2, 396, badge, F_LOGO, (255, 255, 255, 255))+ center_text(d, W // 2, 500, title, F_TITLE, (255, 255, 255, 255))+ if sub: center_text(d, W // 2, 585, sub, F_SUB, (200, 210, 218, 255))+ center_text(d, W // 2, H - 70, LOGO, F_LOGO, (255, 255, 255, 190))+ return canvas.convert("RGB")++# ---- assemble output frames -------------------------------------------------+TMP = OUT + ".render"+if os.path.isdir(TMP): shutil.rmtree(TMP)+os.makedirs(TMP)+seq = []+INTRO, OUTRO = 1.7, 1.9+flow_dur = MAN["duration"]+def hold(img, secs):+ return [img] * max(1, int(secs * OUTFPS))+# intro (with text fade-in), flow, outro+intro_frames = []+ni = int(INTRO * OUTFPS)+base_intro = title_card(TITLE, SUB, "DEMO")+for i in range(ni):+ a = min(1.0, i / (0.4 * OUTFPS))+ fr = Image.blend(BG.convert("RGB"), base_intro, a) if a < 1 else base_intro+ intro_frames.append(fr)+flow_frames = [card_frame(i / OUTFPS) for i in range(int(flow_dur * OUTFPS))]+outro_frames = hold(title_card(OTITLE, OSUB, "TRY IT"), OUTRO)++def crossfade(a, b, n):+ n = min(n, len(a), len(b))+ if n <= 0: return a + b+ mid = [Image.blend(a[-n + i], b[i], (i + 1) / (n + 1)) for i in range(n)]+ return a[:-n] + mid + b[n:]++seq = crossfade(intro_frames, flow_frames, int(0.3 * OUTFPS))+seq = crossfade(seq, outro_frames, int(0.3 * OUTFPS))+# fade in/out to black+fn = int(0.3 * OUTFPS)+for i in range(fn):+ seq[i] = Image.blend(Image.new("RGB", (W, H), (0, 0, 0)), seq[i], (i + 1) / fn)+ seq[-1 - i] = Image.blend(Image.new("RGB", (W, H), (0, 0, 0)), seq[-1 - i], (i + 1) / fn)++for i, fr in enumerate(seq):+ fr.save(os.path.join(TMP, f"{i:05d}.jpg"), quality=90)+print(f"rendered {len(seq)} output frames @ {OUTFPS}fps ({len(seq)/OUTFPS:.1f}s)")++if not FFMPEG:+ print("ffmpeg missing: frames at", TMP, "(run: brew install ffmpeg)"); raise SystemExit+r = subprocess.run([FFMPEG, "-y", "-framerate", str(OUTFPS), "-i", os.path.join(TMP, "%05d.jpg"),+ "-c:v", "libx264", "-pix_fmt", "yuv420p", "-movflags", "+faststart",+ "-crf", "20", OUT], capture_output=True, text=True)+if r.returncode != 0:+ print("ffmpeg failed:", r.stderr[-500:]); raise SystemExit(1)+shutil.rmtree(TMP)+print("POLISHED_OUT:", OUT)diff --git a/skills/no-ai-slop/SKILL.md b/skills/no-ai-slop/SKILL.mdindex 9ed1bea..8457075 100644--- a/skills/no-ai-slop/SKILL.md+++ b/skills/no-ai-slop/SKILL.md@@ -30,7 +30,7 @@ If the goal is unclear, ask what the reader should think, feel, or do after read- **Keep the user's meaning.** Don't invent claims, examples, stats, or opinions. If something is unclear, ask.- **Open it up, don't dumb it down.** Keep the substance, nuance, and precision. Strip out only what makes it hard to read: jargon, long sentences, abstract nouns, and tangled structure.- **Use active voice.** "The team shipped it Tuesday" beats "the decision emerged." Never let inanimate things do human verbs.-- **Make every sentence earn its place.** Cut empty qualifiers and throat-clearing. Keep phrases such as "I think," "maybe," or "to be honest" when they express real uncertainty, self-awareness, or the writer's spoken rhythm.+- **Make every sentence earn its place.** Cut empty qualifiers and throat-clearing. Keep phrases such as "I think" or "maybe" when they express real uncertainty, self-awareness, or the writer's spoken rhythm. Honesty framing is the exception: cut it (see Patterns to cut).- **Untangle sentences without flattening the cadence.** Split sentences and paragraphs when they are genuinely hard to follow. Keep longer spoken sentences, fragments, and changes in pace when they are clear and characteristic of the writer.- **Be concrete and specific.** Abstraction is where writing goes to die. "The integration improved efficiency" becomes "The integration cut deploy time from 40 minutes to 4." Names, numbers, dates, mechanisms, and examples beat abstractions.- **Protect the specific fact.** Don't smooth a useful detail into generic importance. "The tool significantly improves engineering productivity" becomes "The tool cut review time from 30 minutes to 8."@@ -81,7 +81,9 @@ Often-empty phrases: it's worth noting, it's important to note, at the end of th**Binary contrasts.** "This is not X. It's Y." / "The question isn't X, it's Y." / "It's not just X but Y." State Y directly. "The question isn't the model. It's the eval." becomes "The eval matters more than the model."-**Throat-clearing openers.** "Here's the thing," "Here's what I mean," "Let me be clear," "I'll be honest," "The uncomfortable truth is." Cut them and state the point.+**Throat-clearing openers.** "Here's the thing," "Here's what I mean," "Let me be clear," "The uncomfortable truth is." Cut them and state the point.++**Honesty framing.** "The honest part:", "The honest reason is," "the honest truth," "if I'm being honest," "I'll be honest," "to be honest," "honestly." Never use these in anything outward-facing. Announcing candour implies the rest of the piece was managed, and the sentence reads the same without it. Say the thing plainly: "The honest part: I did not get to delete anything" becomes "I did not get to delete anything."**Faux-insight setups.** "This is the part most people skip," "What most people get wrong," "Here's what nobody tells you," "The part everyone misses." These flatter the writer as the lone expert. Cut the setup and make the claim stand on its own. "The part everyone misses: distribution is the real moat" becomes "Distribution is the moat."@@ -111,7 +113,7 @@ Often-empty phrases: it's worth noting, it's important to note, at the end of th**Formatting slop.** Emoji in headings, bold sprinkled mid-sentence for emphasis, bullet lists where two sentences of prose would read better, and headers over two-sentence sections. Format should follow the content, not decorate it.-**Em dashes.** Do not use them as a default rhythm crutch. In short copy, use none. In longer drafts, 1-2 are fine if they clearly beat commas, periods, or parentheses. Remove clusters and decorative dashes.+**Em dashes.** None, in any length (house rule). When editing a human draft that has them, replace each with a period, comma, or colon, and do not swap in a semicolon or parenthesis by reflex (see Model-era tells).## Scope: every medium, not only prosediff --git a/skills/no-ai-slop/SOURCE.md b/skills/no-ai-slop/SOURCE.mdindex 141ca85..f826387 100644--- a/skills/no-ai-slop/SOURCE.md+++ b/skills/no-ai-slop/SOURCE.md@@ -10,3 +10,5 @@ restraint. It is stricter than Tom on binary contrasts / colon reveals (Tom usesthem sparingly for genuine reframes — the skill itself allows this as voice) andon em dashes (Tom uses them freely; this vault's house rule bans them entirely, whichwins). Use as the final editing pass for blog posts and social copy.++Local modifications: house em-dash ban, honesty-framing rule, voice-mode and reader-cited tells, structural slop, and measured model-era output tells.diff --git a/skills/no-ai-slop/eval.md b/skills/no-ai-slop/eval.mdindex 4bcc7f7..c9e5efc 100644--- a/skills/no-ai-slop/eval.md+++ b/skills/no-ai-slop/eval.md@@ -30,7 +30,7 @@ For detect requests, make sure the response names each pattern found with a quot5. Are summary-recap endings cut so the piece ends on a concrete point, takeaway, or next action?6. Is formatting slop removed: Emoji headings, decorative bold, bullets that should be prose, headers over tiny sections?7. Are colons sentence case unless grammar, a proper noun, a title, or code requires otherwise?-8. Are em dashes used sparingly: Usually none in short copy, and only 1-2 in longer drafts when they clearly help?+8. Are there zero em dashes, with none replaced by a reflexive semicolon or parenthesis?9. For model output: is there at most one parenthetical per paragraph, no semicolon-chained clauses, and prose where bullets were carrying a line of reasoning?diff --git a/skills/product-ui-taste/SKILL.md b/skills/product-ui-taste/SKILL.mdindex 6e8064d..a6fb130 100644--- a/skills/product-ui-taste/SKILL.md+++ b/skills/product-ui-taste/SKILL.md@@ -405,6 +405,10 @@ When the Product Read matches one of these, scaffold the whole skeleton, not a f- **Dashboard/overview**: KPI tile row (Cards) + widget grid + one or two drill-in Tables (rows).- **Admin console with bulk actions**: table + selection persistence + bulk action bar (capped at 5 + overflow) + confirmation dialogs.+**Semantic zoom for hierarchical overviews** (portfolio, roadmap, org chart): zooming into a box swaps in a richer representation, while the breadcrumb, minimap and stats panel re-scope to the focus. Levels, inputs, a11y and a DOM recipe: `references/semantic-zoom.md`.++**House UI rules** (two layers, plain user words, no disabled controls, no `…` menus, no wrapped controls, no ellipsis, lists without stripes, status icons with labels, three-part errors, external objects rendered natively): `references/house-ui-rules.md`. Load it for any product UI under review; where it conflicts with a recipe above, it wins.+Full component implementations live in the host system, not duplicated here: reach them via your host system's template/skeleton command or its docs (`references/canonical-sources.md`). Three high-value skeletons are worked in `references/block-skeletons.md` because they encode the contracts most often gotten wrong; treat them as the canonical shape, adapt to the host system.---@@ -422,7 +426,51 @@ Token-driven, one theme locked per app (same discipline as taste-skill Section 8----## 15. PRODUCT-UI AI TELLS (Forbidden Patterns)+## 15. INVISIBLE DETAILS (Micro-Craft Floor)++The compound rule: **no single one of these ruins a surface, and all of them together are the whole difference between polished and sloppy.** Users rarely name the specific miss - they register "if this got missed, others probably did too." Everything here is cheap to fix and expensive to notice late, so treat the list as a floor, not a stretch goal. [invisible-details craft notes]++### 15.A Geometry and optical correction+- **Nested border radius formula**: `inner radius = outer radius - gap`. When the gap is **>=** the outer radius, the inner element needs no rounding at all. Identical inner and outer radii always read as too round.+- **Optical over mathematical alignment**: mathematically equal padding can look wrong. Glyphs with directional mass need nudging - a play triangle shifts right of true center, a checkmark shifts down. Trust the eye over the number; centre the *visual* mass, not the bounding box.+- **Icon-to-text alignment**: wrap the icon in a `height: 1lh` box and align it to the top of the line box, rather than vertically centering it against a multi-line text block. Centering breaks the moment the label wraps to two lines.+- **Vertical rhythm**: every sidebar icon, control, and row affordance sits on a consistent baseline. A single item off by 1-2px is the classic "something's off" signal.+- **Submenu alignment**: a dropdown's first item aligns exactly with its trigger's height, so opening the menu does not visually shift the anchor.++### 15.B Typography and text flow+- **`text-wrap: pretty`** on body copy to kill orphaned last words; **`text-wrap: balance`** on headings and short labels to even out line lengths. For paragraphs, a `max-width` in `ch` usually beats `balance`, which can produce a ragged block.+- **Truncation strategy is per content type** (extends Section 5): wrap for prose, **end**-truncate labels, **middle**-truncate filenames, paths, and URLs where the tail carries the distinguishing information (`report-final-v3....xlsx` is useless; `report-fi...v3.xlsx` is not).+- **Glued terms never break across lines.** Use a non-breaking space between a value and its unit (`20 ms`, `4 GB`), inside keyboard shortcuts (`Cmd + K`), and in compound product nouns. A value stranded on one line with its unit on the next is a Tell.++### 15.C Numbers (extends Section 5.F)+- **Show only meaningful digits, and let consequence decide how many.** `52.4%` is right for a dashboard; `10.30` is required for billing, because `10.3` reads as a different amount of money. Pick precision from CONSEQUENCE, then hold it consistently down the column.++### 15.D Hit targets (extends Section 10.E)+- **Expand the target, not the visual.** A 20x20px control can carry a ~26x36px hit area via a pseudo-element with negative `inset` - the pixels stay small, the tappable region does not.+- **Growth stops at the gap.** Expand freely on the axis with no competing targets; on the axis where siblings sit, stop the expansion at the gap so two targets never claim overlapping space.+- **Keep 4-8px of gap between adjacent clickable elements.** Zero-gap neighbours produce misclicks even at a compliant target size.+- **The label and the gap are part of the control**: a checkbox's descriptive text and the space between box and text are both tappable, never just the 16px box.++### 15.E Invisible defaults (cheap, always on)+- `user-select: none` on decorative graphics, icons, and chrome so drag-select does not produce a mess of highlighted furniture. Never on real content the user might copy.+- **Correct `type=` on every input** so mobile gets the right keyboard: `type="tel"`, `type="email"`, `type="url"`, `inputmode="numeric"`.+- **iOS inputs need `font-size >= 16px`** or Safari zooms the viewport on focus. This is a layout bug that only appears on a real device.+- **`playsinline` on every `<video>`**, or Safari hijacks it into fullscreen on play.++### 15.F Communicate overflow (extends Section 5)+- **Cut the last visible item.** A partially visible row or card is the strongest signal that a region scrolls. A container that ends flush on a clean boundary reads as complete.+- **Match `overscroll-behavior` / overscroll background to the page background** so rubber-band scrolling never reveals a foreign colour.+- **Edge fade gradients** on horizontal scrollers where the scrollbar is hidden - the gradient is the only remaining affordance.++### 15.G Motion suppression (extends Section 13)+- **`prefers-reduced-motion` disables all of it**: slides, label crossfades, colour transitions, hover effects. Content still changes instantly; nothing becomes unreachable.+- **Suppress animation when state changes faster than the animation.** If a user drives a stepper, tab set, or filter faster than ~120ms per change, transitions stack and stutter. Detect the rapid-change case and switch to instant swaps - a stuttering animation is worse than none.+- **Direction encodes depth.** In any sequential flow, forward and backward move on opposite vectors (content and title slide up going forward, down going back). That single consistency answers "where am I going" without a tooltip. Tooltips are a mouse-only crutch; prefer motion, `aria-current`, and labels.++---+++## 16. PRODUCT-UI AI TELLS (Forbidden Patterns)Distinct from taste-skill's landing-page tells. These are the signatures of a model faking a product screen. Hard bans unless the brief genuinely demands one.@@ -440,18 +488,24 @@ Distinct from taste-skill's landing-page tells. These are the signatures of a mo- **Fixed-width badges/labels/tabs** that clip under German/Finnish expansion. (Sections 4, 10.B)- **Native `disabled` on menu/tab items** that should stay keyboard-reachable (use `aria-disabled`). (Section 9.C)- **Badge as decoration** and **status dots spammed on every row** (status only, sparingly).+- **Identical inner and outer border radius** on a nested element (always reads too round). (Section 15.A)+- **A value split from its unit** across a line break, or a shortcut broken mid-chord. (Section 15.B)+- **A 20px icon button with a 20px hit area**, or two clickable elements flush against each other. (Section 15.D)+- **Tooltip carrying information a keyboard or touch user needs** (mouse-only crutch). (Section 15.G)+- **A scrollable region that ends flush** with no cut item, fade, or affordance. (Section 15.F)+- **Stuttering stacked transitions** under rapid clicking (no fast-change suppression). (Section 15.G)- **Motion for show** in a work tool (decorative scroll/hover animation). (Section 13)- **Fake step labels** ("Stage 1 / Stage 2"), fake precise numbers, "Jane Doe"/"Acme" placeholder data in a shipped screen.- **Em-dash (`—`) anywhere visible.** Banned in headers, cells, labels, empty/error copy, tooltips, and as the "not set" cell placeholder. Use a hyphen (`-`). This is the single most-violated Tell; zero tolerance. (taste-skill Section 9.G, house rule)----## 16. REFERENCE VOCABULARY (Names the Agent Should Know)+## 17. REFERENCE VOCABULARY (Names the Agent Should Know)App shell / PageLayout (Header / Content / Pane / Sidebar / Footer) · canonical layouts (list-detail / supporting-pane / feed) · master-detail + inspector · IndexTable / Resource List / DataGrid / Table · frozen (pinned) columns · virtualization · roving tabindex · stacking context · container query · skeleton screen (shape-mirroring) · Blankslate / EmptyState / ErrorState · Overflow / priority-plus · applied-filter chips / faceted search · alertdialog · optimistic vs. pessimistic update · density mode · pseudo-localization · command palette · workspace switcher · job/status tray.----## 17. REDESIGN PROTOCOL (Auditing an Existing Dense Screen)+## 18. REDESIGN PROTOCOL (Auditing an Existing Dense Screen)Before touching visual style, audit for the correctness bugs that matter more than aesthetics:1. **Scroll ownership** violations (page scrolls sideways; nested double-scroll).2. **Truncation on primary content**; hover-only fallbacks.@@ -460,18 +514,52 @@ Before touching visual style, audit for the correctness bugs that matter more th5. **z-index ad-hockery**; layering bugs from nested stacking contexts.6. **No i18n buffer**; fixed-width text containers.7. **Keyboard/a11y gaps**: no roving tabindex, bare `:focus`, icon buttons without labels, disabled submit as only signal.+8. **Micro-craft floor** (Section 15): nested radii, optical alignment, glued units, hit-target expansion, invisible defaults, overflow signalling.Fix these first. Only then apply the density/token/visual polish. Preserve the host design system; do not swap Carbon for shadcn as a "redesign."+### 18.A The hesitation test (how to find problems, not just fix them)+**The hard part is noticing, not fixing.** Most of these cost minutes to repair once seen, so spend the effort on perception. Drive the surface yourself and treat every pause as a defect report. Four tells, each with a fixed diagnosis: [invisible-details craft notes]++| Observed | What it means |+|---|---|+| **Second click** on the same button | No loading state or no feedback - the user believes the first click missed |+| **Cursor drift** (moves without landing) | Hit target too small, or the option is not recognizable as the one they want |+| **Reflexive undo** (Cmd+Z right after acting) | The action gave no confirmation of what it actually did |+| **Re-reading a label** | The wording is wrong, not the layout |++Study interfaces you admire the same way - slowly, looking rather than using. Friction is the lesson.++### 18.B Stress matrix (introduce friction deliberately)+An interface tested on fast wifi with short English strings and populated data is untested. Run every row before calling a surface done:+- Throttle to 3G, or inject ~800ms of API latency, and watch what the screen does in the gap.+- Real content lengths, plus a long-expansion locale (DE/FI) and a non-Latin script.+- Genuinely empty data - all three empty states (Section 6.C), not just one.+- Forced API failure and a partial failure (one widget of six).+- Keyboard only, no mouse, all the way through the primary task.+- Resize the window across all size classes, including the awkward in-between widths.+- A physical device, not just DevTools emulation (iOS input zoom and `playsinline` only show up there - Section 15.E).+- Paste into every field: multiline into single-line, formatted text, a value with leading/trailing whitespace.++### 18.C Record findings as Break / Expectation / Direction+Every observation gets three lines, no more - enough to act on, cheap enough to actually write down:+- **Break** - precisely what failed, on which surface, under which condition.+- **Expectation** - what should have happened instead.+- **Direction** - the one-line general fix, not a patch for this instance alone.++Promote recurring findings into rules keyed on *function*, not appearance: "the colour input accepts any format and normalizes to hex" is reusable; "the colour input looks like Linear's" is not.++---+----## 18. RELATIONSHIP TO taste-skill + OUT OF SCOPE+## 19. RELATIONSHIP TO taste-skill + OUT OF SCOPE- **Hand off to `taste-skill`**: marketing hero sections, landing pages, portfolios, editorial, illustration-heavy brand surfaces. If a screen is half product, half marketing, split it: taste-skill for the marketing sections, this skill for the product surface. Never run both on one component.- **Hand off to `dataviz`**: chart/graph authoring (color, encoding, axes). This skill covers the table and the dashboard frame around the charts, not the chart internals.- **Out of scope**: native mobile (iOS/Android) app chrome beyond responsive web (tab bars, native nav) - a different skill's job; flag it, do not silently approximate. Realtime collab primitives (presence, cursors, OT) - different problem class.----## 19. FINAL PRE-FLIGHT CHECK+## 20. FINAL PRE-FLIGHT CHECK**Run every box. If any fails, the surface is not done.**@@ -504,8 +592,13 @@ Fix these first. Only then apply the density/token/visual polish. Preserve the h- [ ] **Keyboard/a11y**: roving tabindex on custom grids, `:focus-visible`, icon buttons labelled, `aria-disabled` not `disabled` on keyboard-reachable menu items, 44px/24px targets?- [ ] **Density switch** offered where DENSITY calls for it (mode swap, not zoom)?- [ ] **Dark mode** one theme locked, frozen-column background is a theme token, tested in both modes?+- [ ] **Micro-craft floor** (Section 15): nested radii = outer minus gap; optical (not mathematical) centring on directional glyphs; `text-wrap: pretty`/`balance`; middle-truncation on paths and filenames; units and shortcuts glued with nbsp; hit targets expanded via negative-`inset` pseudo-element with 4-8px gaps between neighbours; label + gap clickable?+- [ ] **Invisible defaults** (Section 15.E): `user-select:none` on decorative only; correct input `type=`/`inputmode`; iOS input font-size >= 16px; `playsinline` on video?+- [ ] **Overflow is communicated** (Section 15.F): last item cut off, overscroll background matches, edge fades where scrollbars are hidden?+- [ ] **Motion suppressed correctly** (Section 15.G): `prefers-reduced-motion` kills everything; rapid state changes (<~120ms) fall back to instant; forward/back move on opposite vectors?+- [ ] **Hesitation test run** (Section 18.A) and the **stress matrix** walked (Section 18.B: throttled network, long/non-Latin text, empty, failure, keyboard-only, resize, real device, paste)?- [ ] **House system**: props discovered from real docs (nothing invented), no `<div>` for layout, tokens only, Badge for counts only, status via a status indicator?-- [ ] **No product-UI Tells** from Section 15; **zero em-dashes** anywhere visible?+- [ ] **No product-UI Tells** from Section 16; **zero em-dashes** anywhere visible?- [ ] **One design system** per app (no Carbon + Fluent mixed)?If a single box cannot be honestly ticked, fix it before delivering.@@ -513,6 +606,8 @@ If a single box cannot be honestly ticked, fix it before delivering.---## References+- `references/house-ui-rules.md` - house rules for product UI: two layers, plain words, controls, lists, text overflow, chat answer blocks, external objects, setup, errors.+- `references/semantic-zoom.md` - detail that changes with zoom level for hierarchical overviews.- `references/block-skeletons.md` - worked reference implementations for the three block contracts most often gotten wrong (index + detail-drawer frame, table scroll/sticky-header/frozen-column CSS contract, truncation contract).- `references/install-commands.md` - Appendix A: package-manager install commands per host design system.- `references/canonical-sources.md` - Appendix B: gsearch-verified primary-source URLs backing this skill's rules, grouped by topic.diff --git a/skills/product-ui-taste/references/house-ui-rules.md b/skills/product-ui-taste/references/house-ui-rules.mdnew file mode 100644index 0000000..ed039df--- /dev/null+++ b/skills/product-ui-taste/references/house-ui-rules.md@@ -0,0 +1,153 @@+# Product UI house rules++Distilled from design review corrections, pattern research on ChatGPT, Claude, Manus, Perplexity and Linear, and agent message stream rules. Apply them to any product UI you review. Where a rule here conflicts with a recipe in `SKILL.md`, this file wins.++Think of the app like a good restaurant. The guest sees a short menu and one waiter, and the kitchen stays behind the door. A cook who wants to see the kitchen can open the door.++## Target user++The default view serves the least technical person who uses the product. Judge every screen, message and setup step as that person meets it first. Technical users keep everything, one click deeper.++- Copy the register of ChatGPT, Claude and Manus. Check a pattern library such as Mobbin for the same surface type before you design it, and cite the screens.+- Remove nothing for simplicity. Move it to Details or Advanced, and give each item one home.+- Offer a setting "Show technical details by default" for developers.++## Two layers++| Default view | Details or Advanced |+|---|---|+| One plain answer, what to do next, short steps, what failed, what is left | Ids, shas, internal stage names, tool lines, tokens, confidence, file paths, raw logs, server error text |+| Three questions in a form, named by outcome | Every other field, folded under Advanced |+| Sent: "Result posted on PR #57" | Target strings, replaced drafts, internal kinds |++The Details control is a visible labeled button that opens a side panel or a fold. Hide a tab that has no content.++## Words++- Use one term per meaning, taken from the user's own day. Before the build, write a glossary table: today's word, default-view word, Details word.+- Never show internal codes (P1, M0, S1) as labels. Codes stay in code.+- Name choices by outcome: "Most capable for ambitious work", "Asks you first", "Never does it".+- A label names the thing. Delete slogan subtitles ("Nobody waits"). Keep a subtitle only when it adds a fact.+- Section titles are noun phrases. No verb, no question, no sentence.+- Keep screen copy short: page subtitle 10 words or fewer, setting row is a title plus one sentence at most, no group-row notes. The explanation of a rule belongs in the docs.++## Agent messages++- Lead with what happened and what to do next, in first person and everyday words. Two or three short sentences, then one offer.+- No ids, stage names, rule names or tool names in the message body.+- State each count once.+- Render Markdown drafts exactly as the destination renders them (GitHub, Jira, Slack). Screenshot the posted result and judge readability.+- Every reference a person reads carries a short title with the link on it: [Queued checks show at once (#30)](https://github.com/your-org/your-repo/pull/30). In the UI, show a chip as described under External objects.++## Progress and results++- Show long work as 3 to 6 steps in everyday words, with a count, a timer and one live line: "Working, step 3 of 5 · 0:12".+- Fold finished work into one line: "Checked 4 things in 16 s".+- Show no verdict text until the work ends.+- Put the result first: outcome word, one sentence, the cause in words, and one main button named by the outcome ("Review the bug report").+- End a long task as one card: summary, evidence or files, two or three follow-up chips, a one-tap rating.++## Choices and approvals++- A screen asks three questions at most. Preselect the safe choice. Put the rest behind "Later" or Advanced.+- Collapse grids of knobs into one question with three outcome answers, such as "Ask me before anything is posted" (default), "Ask me only for important posts", "Post on its own".+- Ask only when blocked, as one card in the place the user already is. The card says what will happen, where, and who sees it. The button names the action: "Post to PR #58", "Edit", "Don't post".+- Safety checks pass in silence and speak only when one fails.+- Small changes apply at once with Undo. Changes to a plan or anything outward need an approval card.++## Controls++- Never disable or grey out a control. If a precondition is missing, do the precondition and show a one-line notice ("Switched to annual billing"). Validate on submit and keep the button live. Hide a control that never applies.+- Never hide features behind a `…` menu. Use visible labeled buttons, a status pill, inline rename, footer rows.+- Controls never wrap their label: buttons, chips, status pills, tabs. Use `white-space: nowrap`, a shorter word, or one font step down. A wrapped control label is a visual bug.+- Prefer optical alignment to strict pixel alignment.++## Lists++- A list is one bordered block with hairline dividers between rows.+- No colored border or left stripe on any list item: selected, running and status rows included. Selected uses a neutral border and the selected surface background.+- Show status and every categorical value (project, source, kind, risk) with one shared IconLabel pattern. Each value has its own shape and color, so color never carries the meaning alone: passed check green, failed cross red, skipped minus grey, warning amber, timed out clock red, running spinner accent.+- Show icon plus word where the list has room, icon only where it does not, and keep the word in `aria-label`. Decide by the list's own width with a container query; a narrow side panel on desktop counts as limited.+- Draw a signature SVG icon family per product (one stroke weight, one corner style, one grid) when stock icons do not fit. In shadcn projects, start from `pnpm dlx shadcn add @lucide-animated/<name>`.+- Audit and change every list in one pass, never one screen at a time.++## Text overflow++- Never truncate titles, goals or descriptions with an ellipsis and a tooltip. Wrap with `overflow-wrap: anywhere` and let the row grow.+- If a column is too narrow for a name, show another short fact (a date, a count) and keep the full name in `aria-label`.+- A wide table scrolls inside its own wrapper with edge shadows. The page never scrolls sideways.++## Intelligent UI++Chat answers carry working views, the way ChatGPT's Intelligent UI and the Apps SDK do. The model returns typed data; the client renders it with components it owns.++### Visual weight in the stream++| Level | What | Style |+|---|---|---|+| Primary | Answer text, answer blocks, object cards, errors the user can fix | Rich formatting. Only blocks and cards get a border or background. |+| Secondary | Live status line, finished-work summary line, context line ("With: Checkout · PR #57") | Grey text and a small icon. The `›` chevron is the only affordance. |+| Tertiary | Expanded steps | Indented grey text under the summary line |+| Hidden | JSON, raw API data, tool names, sub-agent containers | Details panel or developer console only |++- Only two things earn a container: the user's message and structured output (blocks, object cards). Status, steps and thinking stay as grey text.+- One live status line at a time, updated in place, written as intent ("Reading the ticket..."). Skill loads and agent handoffs stay silent. The line goes away on the first answer token.+- Nesting depth is one: summary line, then a flat list of steps. Sub-agent work reads as the parent's work.+- Show thinking only inside the expanded steps.+- After 30 s add "This is taking longer than usual." After 60 s add a Cancel link.+- Motion: crossfade the status text, pulse the status dot, animate height on expand (200 ms). No progress bars, no bounce. Honour reduced motion.++### Answer blocks++- The model picks a block kind from a fixed registry and fills in data. It never sends HTML or code; the client owns the look and the actions.+- Text carries the judgement, the block carries the records. Show a block only for data that answers the question. Repeating structure becomes a block; prose stays text.+- Every block sits in one hairline frame with a heading and a count, rows with dividers inside. Several objects from one answer form one list.+- Blocks render read-first at their smallest useful size. Inline blocks stay compact; a full view (board, diff, dashboard) opens in the side panel. Nothing opens or expands on its own.+- The server sends a loading block first with skeleton rows shaped like the real ones, then the rows.+- Validate every block on the server and again on the client. Drop invalid rows and keep the valid ones. Allow only `http` and `https` links.+- Unknown or broken data falls back to a table, with the line "Shown as a table because this answer has no matching view yet." A component that throws renders the same rows as a table in place.+- Each action shows its result under the row that started it. A second press while the first runs does nothing.+- Every outward action from a block goes through the approval gate. Actions confirm in the steps line: "Moved SHOP-123 to Done".++## External objects++An object that lives in another system (a Jira ticket, an Xray test case, a GitHub PR, a Linear issue, a Confluence page, a Slack message, a TestRail case) renders the way its own product renders it.++- Copy the source's native anatomy: the fields it shows, their order, its status lozenge colors and shapes, its issue-type and priority icons, its PR state icon and color (open green, merged purple, draft grey, closed red). A Jira ticket looks like a Jira ticket to someone who uses Jira daily.+- Keep the host product's frame, spacing and type around it, so the card sits in the list with the other rows. The content inside the frame follows the source.+- Every external object shows its source's logo icon at the start of the card or row. The logo is how a reader tells our objects from alien ones. Our own objects carry no logo.+- Every id or key (SHOP-142, PROJ-T23, #58) is a link that opens the original item in its own system, in a new tab. Make the whole chip or card clickable, and keep in-app actions as separate labeled buttons.+- An inline reference in text renders as a chip: source logo, key, short title. Never a bare key.+- A pasted link to a known system unfurls into the same card.+- A card for a source with no renderer falls back to a chip with logo, key, title and link.+- Light actions (transition, assign, comment) sit on the card and go through the approval gate. Heavy views open in the side panel.+- Keep the source names, statuses and field names as the source spells them ("In Progress", "To Do", "Story Points").++## Navigation and structure++- One front door: Home is a greeting, one ask box and three starter chips in the user's words.+- Keep four or five top-level places, the same set on the phone bar.+- An inbox uses the Linear layout: list on the left, open item on the right, one item per screen on a phone.+- Group one cause into one row: events from several sources about the same root problem show as one row with the related items inside.+- Settings opens on personal items. Connections and Advanced appear only for admins.+- Maps and coverage views come from observed evidence (pages visited, real screenshots). Static scans only enrich them. Show unseen parts as gaps.+- For management overviews, apply semantic zoom inside the timeline or table. A separate box-canvas view was rejected. See `semantic-zoom.md`.++## Setup++- No wizard before the first task. One question per screen, a skip on every optional step.+- Optional setup lives as a checklist card on Home until it is done.+- A banner appears only when something stops working.+- Ask for notification rights after you say what the user gets, with "Maybe later". Default alerts to "Only what needs me".++## Errors and empty states++- Write each error in three parts: what happened, what to do, one button. Place it where the problem happened. Put server text and `HTTP 500 /api/...` in a Details fold.+- Use three error kinds: offline, server problem, signed out.+- When only an admin can fix it, say so and offer "Copy a message for your admin".+- An empty state is a heading, one sentence on what will appear, and one button when there is a first action. No illustration.++## Verification++- Judge the rendered pixels; a correct DOM can still look wrong. Screenshot at 390x844 and 1440x900, light and dark.+- Check for wrapped controls, clipped text, sideways scroll, overlap and contrast. Fix what you see, then capture again.diff --git a/skills/product-ui-taste/references/semantic-zoom.md b/skills/product-ui-taste/references/semantic-zoom.mdnew file mode 100644index 0000000..66f0a77--- /dev/null+++ b/skills/product-ui-taste/references/semantic-zoom.md@@ -0,0 +1,75 @@+# Semantic zoom: detail that changes with zoom level++Based on Arc UI's "Semantic zoom" block (uiarc.dev/components/blocks/semantic-zoom). Take the interaction model only; the code and the look stay the original's. Use it for roadmaps and other hierarchical overviews.++## The idea in three sentences++A map of nested boxes shows the whole organisation at once. Zooming into a box swaps in a richer representation of the same thing at each level. The summary numbers, the breadcrumb and the minimap all follow the camera, so the reader always knows where they are and what the numbers cover.++## When to use it++- Hierarchical work data where each level answers a different question: portfolio, then team or milestone, then project or bucket, then task.+- Management overviews where people move from "how is the whole plan doing" to "what exactly is this ticket" without losing their place.+- Skip it for plain scanning of a tree (use a tree view) and for working on tasks (use a board or table).++## Levels: each one shows something new++Observed hierarchy in the reference (company, team, project, task). What each level renders:++| Level | Box shows |+|---|---|+| Whole company | One block per team with name and % done. Inside each, tiny project cards with a strip of task tiles; blocked tasks tinted red; people as dots. No text beyond team name and %. |+| Team | Team name, lead avatar and name, "6 projects · 24 open tasks", % done. Project cards now readable. |+| Project | Project name, health dot and word ("At risk", "On track", "Off track") with due date, % and a progress bar, task tiles, owner avatars with names. |+| Task | A full card: status · due date · estimate, title, one-paragraph description, assignee with role, checklist "5 of 5" with a bar, comment count, and its parent path. |++Rules drawn from it:++- **Swap the representation per level and keep text at reading size.** A tiny box shows a colour and a number. A medium box shows a title and counts. A large box shows sentences.+- **Detail fades in once the box is big enough on screen.** Measure the rendered pixel size of each box after every camera move.+- **Rollups come from the leaves.** Team % and blocked counts derive from tasks, so every level agrees.+- **Health shows as a word plus a dot**, so it reads without colour.++## Context that follows the camera++- **Breadcrumb** at the top: `Company > Team > Project > Task`, each crumb clickable, current one marked `aria-current="location"`.+- **Stats panel re-scopes to the focus.** Same fields at every level, labelled with the level: Team / Project / Task, Open tasks, Blocked (red when above zero), Next due, Progress %, People. Numbers count to the new value.+- **Minimap** in a corner once zoomed in: the whole map in miniature with a rectangle for the viewport.+- **Zoom readout and controls**: `−`, current factor (1.0×, 1.6×, 4.0×), `+`, fit. Hint text: "Scroll to zoom, drag to pan, click anything to fly in".+- **Hover card** on any item with its key fields and "Click to open".+- **Guided tour** button that flies through the levels once; skippable.++## Input++| Input | Action |+|---|---|+| Click or tap an item | Fly into it |+| Wheel, pinch | Zoom around the pointer |+| Drag | Pan |+| Arrow keys | Move a cursor between nearby items |+| Enter / Space | Fly into the item under the cursor |+| Escape / Backspace | Fly out one level |+| + / − | Zoom in or out |+| 0 / Home | Fit the whole map |++## Accessibility and motion++- The stage is `role="application"` with an `aria-roledescription` of zoomable map and a text label summarising the whole.+- A polite live region announces each move: "Now viewing SSO for enterprise, on track, 63% complete, 4 open tasks, due Oct 22."+- A plain table of every leaf-parent (team, project, health, progress, open, blocked, due) sits in the DOM as the non-visual equivalent.+- Camera moves are eased flights of about 400 to 600 ms; under `prefers-reduced-motion` they jump instantly.+- Pause the render loop offscreen and in hidden tabs. Gotcha for agents: a background CDP tab never paints such a canvas, so screenshot it in a visible browser pane.++## Applying it without a canvas engine++For up to a few hundred items, a DOM version is enough: lay the boxes out once in a fixed "world" grid, move a camera with a CSS `transform: translate() scale()` on the world, and after each move compute every box's on-screen size to set a detail class (`lod-0` dot, `lod-1` label, `lod-2` card, `lod-3` full). Clicking a box fits it to the viewport. Keep the timeline or table view next to the map: the map gives orientation, the table supports scanning.++## Zoom inside an existing timeline++A separate box-map view (a "Zoom map" tab with cards per level) can read as ugly and redundant. A safer form puts the zoom interaction inside the timeline or table people already use:++- Clicking a milestone header widens that column to about 70% of the time axis; the other milestones stay visible as narrow columns with clamped names.+- A short horizontal camera move (scaleX from the old column to the new, about 380 ms, off under reduced motion) sells the zoom.+- Bar content is chosen by the bar's pixel width: under 90 px a number or blocked count, then status, then status, owner and criteria meter, then the first line of "What".+- Plan level shows buckets collapsed to per-milestone counts; zoomed level expands them, and bucket summaries gain "% done, n blocked" plus status tiles.+- A breadcrumb row (Whole plan › milestone) with Previous, Next, Zoom out; Esc zooms out, ← → move between milestones. Ticket detail opens in a side drawer.diff --git a/skills/release-comms/SKILL.md b/skills/release-comms/SKILL.mdnew file mode 100644index 0000000..65d08c2--- /dev/null+++ b/skills/release-comms/SKILL.md@@ -0,0 +1,85 @@+---+name: release-comms+description: >+ Release communication pipeline for your product: turn a deployment runsheet and a+ GitHub milestone into a customer-facing release note with real screenshots and+ videos, docs updates (including retrofits of articles the release makes stale),+ a Slack announcement draft, and a lightweight marketing package. Use when you say+ "cover today's release", "write the release note", or "/release-comms".+---++# release-comms: release note, docs, announcement and marketing pipeline++**Lane: `full`.** It mutates external state (Slack posts, docs PR, wiki pages), so every post and PR is drafted first and gated on the user's explicit approval. See the `closed-loop` skill.++## Configuration++Fill these in once (`kit.toml`, `.env` or arguments). Placeholders below are examples.++| Setting | Meaning | Example |+|---|---|---|+| `PRODUCT_REPO` | Repo that holds the release milestone | `your-org/your-product` |+| `MILESTONE_PATTERN` | Milestone naming | `Release YYYY-MM-DD` |+| `TEAM_LABEL` | Label that filters the milestone to your team | `team:platform` |+| `RUNSHEET_SOURCE` | Where the deployment runsheet lives | a wiki page, a doc, or a Slack thread |+| `RELEASE_DIR` | Working folder per release | `comms/release-notes/<date>/` |+| `DOCS_REPO` | Local path of the docs repo | `../your-docs` |+| `RELEASE_NOTES_FILE` | Running release-notes page in the docs repo | `docs/release-notes.md` |+| `ANNOUNCE_CHANNEL` | Slack channel for the internal announcement | `#product-releases` |+| `MARKETING_CHANNEL` | Slack channel for the marketing package | `#marketing` |+| `FLAG_SYSTEM` | Feature-flag tool named in the runsheet | any |++## Source-of-truth chain (walk it in order)++1. **Deployment runsheet.** Gives release scope, the milestone link, the PR list per service, feature flags being enabled, the deploy window, and trailing items (merged to QA but not staged). Exclude trailing items from "available now".+2. **GitHub milestone.** The milestone filtered by `TEAM_LABEL` is the release manifest. Issues may still be open, so closed does not equal shipped.+3. **Issue bodies and comments.** This is the media source. Dev-test comments ("Dev test: passed on prod") and QA comments ("Verified PASSED on staging") carry screenshots and demo videos as GitHub attachment URLs. For a private repo these need auth to resolve:+ `curl -sL -H "Authorization: Bearer $(gh auth token)" -o <file> <url>`+ Check the Content-Type with `curl -sI` for the right extension. GitHub videos are usually QuickTime `.mov`. Treat a comment-level "Verified PASSED" as the ship signal, because issues often stay open until a later close step.+4. **Feature flags.** Anything behind a flag in the runsheet gets honest gating language ("rolling out", "enabled per organization").++## Pipeline++### 1. Collect (parallel workers, staging files)+Use one worker per headline cluster plus one sweep worker over the remaining milestone issues. Each worker extracts user-visible changes with verbatim quotes and links, classifies each as user-facing feature, user-facing fix or internal, downloads media into `assets/` with descriptive kebab-case names, writes to `RELEASE_DIR/staging/<cluster>.md`, and returns only a status line. Never paste one worker's output into another's prompt.++### 2. Release note (lead writes, single file)+Write `RELEASE_DIR/release-note-<date>.md`: frontmatter (version, date, milestones, labels), a one-paragraph narrative summary, **Highlights** (bold, benefit-first bullets with issue links), per-feature sections (What's new, Why this matters, What you can do now, Shipped in this capability), Enhancements, Fixes, and an appendix table of shipped issues. See the `generate-release-notes` skill for the base format.++Voice rules:+- Do not write a feature list. Every item says what the user can now do and what pain it removes. Lead with the before/after story where one exists.+- Embed the downloaded screenshots and videos inline next to the feature they prove.+- Disclose known issues plainly with a fix timeline.+- Flag to the user anything user-benefiting found in the sweep that they did not list.+- Frame the release around the opportunity it opens, and sanity-check every number.+- Naming: avoid "v1" or "first version" in customer copy. Call gated first releases "early access". Call UI refreshes "a new look", not "redesign". Describe capabilities as what is now supported, and say when one serves both humans and agents.+- The internal post is the deep dive: same naming, plus issue links, flag names, architecture notes, verification status and known-issue numbers. Marketing copy stays light.++### 3. Docs updates (branch off main, never touch in-flight branches)+Use a git worktree so work in the main checkout is never disturbed:+`git worktree add ../docs-release-<date> -b release-comms/<date> origin/main` (run inside `DOCS_REPO`). Check what exists on `origin/main` before planning edits, because drafts in the checkout may not be merged. Two motions:+- **New or changed feature docs.** Use the `feature-doc` skill for any new article or real screenshot refresh.+- **Retrofit sweep.** Grep the docs for surfaces this release changed: stale screenshots, stale flow text, stale limitations. Always add the release entry to `RELEASE_NOTES_FILE` (heading per date, "What's new" and "Why this matters" for features, enhancements and fixes in collapsible blocks). If unmerged drafts cover the same surface, do not edit them. Flag the needed change to the user for that branch.+The docs PR is a ship gate: the user approves before it opens. To publish the note to a wiki, see the `publish-to-confluence` skill.++### 4. Slack announcement draft (`ANNOUNCE_CHANNEL`)+Format: an announcement line (`:mega: *Product Release Announcement* | <release note link> | Available now`), a channel-wide greeting, then emoji-prefixed bold-name bullets with one benefit sentence each, a known-issue heads-up, and a link to the full release note. Keep it terse. Draft only: the user posts or approves posting.++### 5. Marketing package (`MARKETING_CHANNEL`)+Use a lightweight changelog-thread format, not positioning essays:+1. **Lead post:** "This week's release:" plus a numbered list (`1/ ...`), one line per shipped feature, and one short closing line. No media required.+2. **One detail post per feature:** a hook line (the pain or the punch), 2 to 4 short lines on what it does, the benefit and a use case, an honest caveat if any, and a specific demo video, GIF or screenshot from `assets/` (name the file and note any trim or convert work). Each post reuses cleanly as an X or LinkedIn thread, a Slack lead with thread replies, or a newsletter section.+3. **Media manifest:** each asset marked near-ready, needs trim, or missing (record fresh). The `release-video`, `social-media-kit` and `youtube-video-kit` skills cover producing media.+4. **Suggested channel message** for the people who compile and review the newsletter.+Draft only: gate on the user.++### 5b. Demo videos back to the tickets (optional)+Once demo videos are published somewhere the team can open, write each video link into a "Demo" field on every shipped issue it covers (for example a GitHub Project text field, set through `gh api graphql` with `updateProjectV2ItemFieldValue`). One link per issue. Check an existing value before overwriting it. Verify by re-reading the field.++### 6. Verify (closed loop)+- A fresh-context verifier re-checks release-note claims against the issue links and tags each Verified, Weakened or Falsified. Drop or demote accordingly.+- Media check: every embedded asset exists locally and renders (size above zero, correct extension).+- After any approved Slack post or docs PR, re-fetch the artifact and confirm it matches intent.++## Cockpit+Keep a `session-review.md` in `RELEASE_DIR` (the `review-cockpit` pattern): progress, one card per deliverable, the user's approvals logged. Delete staging files after consolidation.diff --git a/skills/release-video/SKILL.md b/skills/release-video/SKILL.mdindex 8f0e776..5dc2586 100644--- a/skills/release-video/SKILL.md+++ b/skills/release-video/SKILL.md@@ -30,11 +30,23 @@ These came from a real review of the first cut. Each one cost a full re-render w6. **Pace for reading.** Feature scenes run 6-8 s, long enough to read every line twice. In demos, sped-up stretches say so in the caption ("sped up 2.5x"), and the payoff plays at 1x with a zoom and a highlight ring.7. **Real product, real data.** Demos come from recordings of the live product on a demo project. Numbers on screen match what the recording shows.+8. **Upbeat music.** Beds are bright and uplifting (major key, about 115-125 BPM). A calm or sad bed reads as boring.+9. **Say acronyms right.** On `eleven_v4`, write "AI" plain and use no alias dictionary: the hyphenated alias "ay-eye" sounds unnatural, and v4 says "AI" correctly by itself (Scribe hears "AI", about 0.35 s). Keep aliases only for acronyms that v4 gets wrong in a test clip, and never use dotted spellings like A.I. Check a test clip and Scribe word timestamps before rendering the full set.++10. **Zoom slowly, keep context.** Show the target in the full frame first with a ring or spotlight for about 1 s, zoom over at least 1.2 s with easing, never past about 1.6x, keep surrounding UI visible, and zoom back out before the next step. Prefer a spotlight dim to a hard crop. A zoom box must match the window aspect: expand it before cropping, never resize a narrower box into the window, because that stretches the UI sideways (see `fit()` in `scripts/compose_demo.py`). Zoom back out with an eased move, never a cut.+11. **Explain before demoing.** Each feature clip opens with what it does and how it helps, then shows how to turn it on or set it up, then the demo.++12. **Energetic narration.** Target about 185-195 words per minute with an excited, upbeat delivery, like a social-media creator. The API's max speed of 1.2 on `eleven_v4` gives only about 160 wpm, so add `atempo=1.15` after generation. Energy comes from pace and delivery, not hype words. Write plain product language: "Select Run", "Choose Separate", "four times faster". No social-media slang such as "hit", "boom", "magic switch", "crank it". Narration runs continuously: fit the visuals to the voice-over, never leave long silent gaps between lines.++13. **Human input on camera.** Drive recordings with `scripts/human_input.py`. It reproduces timings measured on real human recordings. The cursor is visible, and its shape follows the hovered element: arrow, pointing hand, or I-beam. Moves take 150-450 ms, run nearly straight with a slight bow, and peak in speed mid-move. A long move ends with 1-3 small corrections and a 200-400 ms dwell, then a click held 80-120 ms. Real `mouseMoved` events show hover states before each click. Keys come 60-120 ms apart, with longer pauses between words; never paste a whole string. Keep the cursor still about two thirds of the time, with 1.5-2.5 s reading pauses after new content. While an AI answer streams, keep the cursor still and speed-ramp the wait. A headless capture has no OS cursor, so draw one from the event path. Record at 2x scale and at least 60 fps, on a production build: pre-release builds can show license watermarks.+## Workflow1. **Inventory.** List the shipped items from the release milestone or changelog. Pick the ones a user would notice and leave internal fixes to the written notes. For each, write one sentence of what changed and one of why it matters.2. **Record.** Capture each feature end to end in the real product. Any recorder works. `scripts/frames_from_video.sh rec.mp4 <name>` turns a recording into the frames folder and manifest the composer reads.3. **Storyboard.** Copy `templates/` into a working folder with `scripts/engine.js`. One `<section class="scene">` per beat, with `data-start` and `data-dur` in seconds. Element timings are relative to their scene. The comment at the top of `templates/index.html` lists every animation attribute.+ Real UI inside a scene: crop stills and recorded frames into windows rather than redrawing the product, and map ring boxes from source pixels into each crop. A frame sequence plays with `<div data-seq="start,fps">` holding one `<img>` per frame; keep it to a few seconds at 30 fps. Crops of 1x captures read on a phone only at about 1.4x or more, so crop narrow and fade the right edge when lines run long; 2x captures stay sharp.+ Spotlight and zoom: dim the frame with a hole over the target plus a ring, glide the hole between boxes over about 640 ms so beats never jump-cut between crops, and ease any zoom toward a point, capped at 1.6x and back to 1x before the beat ends. Check that no ring crosses text, no shot renders under 1x, and no two caption lines show at once. Captions are one bar per scene whose text swaps out then in, so bars of different widths never cross-fade.4. **Review stills before rendering.** `render.py stills <t1> <t2> ... --dir <folder>` writes PNGs at chosen times. Take one per scene midpoint, tile them into a contact sheet with ffmpeg `hstack`, and look at it against the rules above. Fix, then re-take the stills.5. **Sound effects.** `gen_audio.sh sfx <name> "<prompt>" <seconds> <folder>/sfx` once per sound (whoosh, pop, tick, chime, thump, a soft riser). Keep them short and quiet in character. `mix_sfx.py --dir <folder>` reads every `data-sfx` cue from the page and builds `sfx-track.wav`.6. **Music.** Adapt `templates/music-plan.example.json` so section durations sum to the video length, then `gen_audio.sh music plan.json bed-a.mp3`. Run `music_check.py bed-*.mp3`, which prints scores and rejects nothing itself, and keep the candidate with the lowest far-similarity and an intro quieter than the body.@@ -53,6 +65,8 @@ These came from a real review of the first cut. Each one cost a full re-render w| `scripts/music_check.py` | Tempo, beat phase, loudness curve and repetition score per candidate || `scripts/mix_final.sh` | Sidechain mix, loudness check, web copy, silence check || `scripts/compose_demo.py` | Recording, window frame, captions, zoom, ring, intro and outro cards |+| `scripts/plain_demo.py` | Plain demo cut: the same spec on a browser card over a gradient, no captions or cards; honors per-segment `blur` and `speed` |+| `scripts/human_input.py` | Human-looking mouse paths, corrections, clicks and typing over CDP (`python3 human_input.py` self-checks the timings) || `scripts/frames_from_video.sh` | Recording to frames plus manifest || `templates/` | Starter scenes, theme tokens, demo spec, music plan |diff --git a/skills/release-video/scripts/compose_demo.py b/skills/release-video/scripts/compose_demo.pyindex c073b75..5635da4 100755--- a/skills/release-video/scripts/compose_demo.py+++ b/skills/release-video/scripts/compose_demo.py@@ -12,6 +12,8 @@ makes one from any .mp4/.mov. Theme (colors, fonts) comes from spec["theme"].Intro/outro title, body and kicker are inserted as HTML so <em> works; escape & < > yourself.+Optional per-segment "blur": [[x0,y0,x1,y1], ...] in source pixels masks regions (history rails, customer names).+usage: compose_demo.py <spec.json> (see templates/demo-spec.example.json)"""import json, math, pathlib, subprocess, sys, html, os@@ -131,6 +133,11 @@ def main():sp = seg.get("speed", 1)st = seg["src"][0] + lt * spimg = src_frame(st)+ if seg.get("blur"):+ img = img.copy()+ for bx in seg["blur"]:+ bx = tuple(int(v) for v in bx)+ img.paste(img.crop(bx).filter(ImageFilter.GaussianBlur(16)), bx[:2])z = seg.get("zoom")box = fullif z:diff --git a/skills/release-video/scripts/engine.js b/skills/release-video/scripts/engine.jsindex a51f31f..8e50c10 100644--- a/skills/release-video/scripts/engine.js+++ b/skills/release-video/scripts/engine.js@@ -53,7 +53,7 @@function init() {scenes = [...document.querySelectorAll('.scene')].map(el => ({el, start: +el.dataset.start, dur: +el.dataset.dur, enter: el.dataset.enter || 'cut',- nodes: [...el.querySelectorAll('[data-draw],[data-fade],[data-rise],[data-pop],[data-count],[data-type],[data-rot],[data-wipe],[data-unwipe],[data-zoom],[data-pulse],[data-out],[data-float],[data-blink],[data-grow],[data-slide],canvas[data-burst]')],+ nodes: [...el.querySelectorAll('[data-draw],[data-fade],[data-rise],[data-pop],[data-count],[data-type],[data-rot],[data-wipe],[data-unwipe],[data-zoom],[data-pulse],[data-out],[data-float],[data-blink],[data-grow],[data-slide],[data-seq],canvas[data-burst]')],}));document.querySelectorAll('[data-type]').forEach(n => { n.dataset.full = n.textContent; });document.querySelectorAll('[data-draw]').forEach(n => {@@ -113,6 +113,13 @@if (n.tagName === 'CANVAS' && d.burst != null) {burst(n, lt, JSON.parse(d.burst || '{}'));}+ // Recorded frame sequence: data-seq="start,fps"; children are the frames in order.+ if (d.seq) {+ const [s, fps] = nums(d.seq);+ const kids = n.children;+ const i = Math.max(0, Math.min(kids.length - 1, Math.floor((lt - s) * fps)));+ for (let k = 0; k < kids.length; k++) kids[k].style.visibility = k === i ? 'visible' : 'hidden';+ }if (d.rise || d.pop || d.slide || d.float) {const isSvg = n instanceof SVGElement;if (isSvg) { n.style.transformBox = 'fill-box'; n.style.transformOrigin = 'center'; }diff --git a/skills/release-video/scripts/human_input.py b/skills/release-video/scripts/human_input.pynew file mode 100644index 0000000..0782343--- /dev/null+++ b/skills/release-video/scripts/human_input.py@@ -0,0 +1,137 @@+#!/usr/bin/env python3+"""Human-looking mouse and keyboard input for demo recordings.++Timings come from 120 fps recordings of a real person using the UI:+long moves take 150-250 ms (up to ~450 ms for very long ones), run nearly+straight with a slight curve and a bell-shaped speed peak near the middle,+then 1-3 small corrections of 15-100 px and a 200-400 ms dwell before the+click. The cursor is still about two thirds of the time.++The planners are pure functions. `drive` sends the events through any+`send(method, params)` callable, so it works with a CDP session from+browser-harness, Playwright (`cdp.send`), or a raw websocket.++ from human_input import Human+ h = Human(send, start=(400, 300))+ h.click(820, 512) # move, correct, dwell, press, release+ h.type("Empty Weekend") # per-key timing with word-boundary pauses+ h.pause("read") # 1.5-2.5 s still cursor after new content+"""+import math, random, time++def min_jerk(s):+ return 10 * s**3 - 15 * s**4 + 6 * s**5++def move_duration(dist, rng):+ # 200 px -> ~0.16 s, 1400 px -> ~0.25 s, capped near 0.45 s+ base = 0.11 + 0.05 * math.log2(1 + dist / 100)+ return min(0.45, max(0.08, base * rng.uniform(0.9, 1.15)))++def plan_move(p0, p1, rng, hz=120):+ """Points (x, y, dt) along a slightly curved minimum-jerk path."""+ (x0, y0), (x1, y1) = p0, p1+ dist = math.dist(p0, p1)+ if dist < 1:+ return []+ dur = move_duration(dist, rng)+ n = max(3, int(dur * hz))+ # perpendicular bow: 2-6 % of the distance, random side+ bow = dist * rng.uniform(0.02, 0.06) * rng.choice((-1, 1))+ nx, ny = -(y1 - y0) / dist, (x1 - x0) / dist+ pts = []+ for i in range(1, n + 1):+ s = min_jerk(i / n)+ b = bow * math.sin(math.pi * s)+ pts.append((x0 + (x1 - x0) * s + nx * b, y0 + (y1 - y0) * s + ny * b, dur / n))+ return pts++def plan_approach(p0, target, rng, hz=120):+ """Long move that lands slightly off, then 1-3 corrections onto the target."""+ dist = math.dist(p0, target)+ if dist < 120:+ return plan_move(p0, target, rng, hz)+ err = min(60, dist * rng.uniform(0.02, 0.06))+ a = rng.uniform(0, 2 * math.pi)+ land = (target[0] + err * math.cos(a), target[1] + err * math.sin(a))+ pts = plan_move(p0, land, rng, hz)+ cur = land+ k = rng.choice((1, 1, 2, 3))+ for j in range(k):+ f = 1.0 if j == k - 1 else rng.uniform(0.5, 0.8)+ nxt = (cur[0] + (target[0] - cur[0]) * f, cur[1] + (target[1] - cur[1]) * f)+ gap = rng.uniform(0.04, 0.12)+ if pts:+ x, y, dt = pts[-1]+ pts[-1] = (x, y, dt + gap)+ step = plan_move(cur, nxt, rng, hz)+ # corrections are slower per pixel: 70-300 ms+ scale = rng.uniform(0.07, 0.3) / max(1e-6, sum(p[2] for p in step) or 1)+ pts += [(x, y, dt * scale) for x, y, dt in step]+ cur = nxt+ return pts++def plan_typing(text, rng):+ """(char, delay_before) pairs: 60-120 ms per key, longer at boundaries."""+ out = []+ for i, ch in enumerate(text):+ d = rng.uniform(0.06, 0.12)+ if i and text[i - 1] in " .,;:-/@":+ d += rng.uniform(0.08, 0.25)+ if rng.random() < 0.04:+ d += rng.uniform(0.2, 0.45) # occasional hesitation+ out.append((ch, d))+ return out++class Human:+ PAUSES = {"beat": (0.2, 0.45), "read": (1.5, 2.5), "think": (0.6, 1.1)}++ def __init__(self, send, start=(0, 0), seed=None, sleep=time.sleep):+ self.send, self.pos, self.sleep = send, start, sleep+ self.rng = random.Random(seed)++ def _mouse(self, type_, x, y, **kw):+ self.send("Input.dispatchMouseEvent", {"type": type_, "x": round(x, 1), "y": round(y, 1), **kw})++ def move(self, x, y):+ for px, py, dt in plan_approach(self.pos, (x, y), self.rng):+ self._mouse("mouseMoved", px, py)+ self.sleep(dt)+ self.pos = (x, y)++ def click(self, x, y, dwell=None):+ self.move(x, y)+ self.sleep(dwell if dwell is not None else self.rng.uniform(0.2, 0.4))+ self._mouse("mousePressed", x, y, button="left", clickCount=1)+ self.sleep(self.rng.uniform(0.08, 0.12))+ self._mouse("mouseReleased", x, y, button="left", clickCount=1)++ def type(self, text):+ for ch, d in plan_typing(text, self.rng):+ self.sleep(d)+ if ch == "\n":+ for t in ("rawKeyDown", "keyUp"):+ self.send("Input.dispatchKeyEvent", {"type": t, "key": "Enter", "code": "Enter", "windowsVirtualKeyCode": 13})+ self.send("Input.dispatchKeyEvent", {"type": "char", "text": "\r"})+ else:+ self.send("Input.dispatchKeyEvent", {"type": "keyDown", "text": ch, "key": ch})+ self.send("Input.dispatchKeyEvent", {"type": "keyUp", "key": ch})++ def pause(self, kind="beat"):+ lo, hi = self.PAUSES[kind]+ self.sleep(self.rng.uniform(lo, hi))++if __name__ == "__main__":+ # Self-check against the measured ranges.+ rng = random.Random(7)+ for d in (200, 600, 1400):+ pts = plan_move((0, 0), (d, 0), rng)+ dur = sum(p[2] for p in pts)+ steps = [abs(pts[i + 1][0] - pts[i][0]) for i in range(len(pts) - 1)]+ peak = steps.index(max(steps)) / (len(steps) - 1)+ assert 0.08 <= dur <= 0.45 and 0.3 <= peak <= 0.7, (d, dur, peak)+ print(f"{d:>5}px {dur*1000:4.0f} ms speed peak at {peak:.2f}")+ a = plan_approach((0, 0), (900, 400), rng)+ print("approach events", len(a), "ends at", tuple(round(v) for v in a[-1][:2]))+ assert math.dist(a[-1][:2], (900, 400)) < 1+ t = plan_typing("Empty Weekend", rng)+ print("typing ms", [round(d * 1000) for _, d in t])diff --git a/skills/release-video/scripts/plain_demo.py b/skills/release-video/scripts/plain_demo.pynew file mode 100644index 0000000..b7ca092--- /dev/null+++ b/skills/release-video/scripts/plain_demo.py@@ -0,0 +1,52 @@+#!/usr/bin/env python3+"""Plain demo: the same cut as the explained spec, browser card on a gradient, no captions, no cards.+usage: plain_demo.py <spec.json> <out.mp4> (honors per-segment "blur" and "speed")"""+import json, pathlib, subprocess, sys+import numpy as np+from PIL import Image, ImageDraw, ImageFilter, ImageFont+W, H, FPS = 1920, 1080, 30+CW = 1568; CH = round(CW * 1080 / 1920); BAR = 48+L = (W - CW) // 2; T = (H - CH - BAR) // 2++def gradient():+ y, x = np.mgrid[0:H, 0:W].astype(np.float32)+ t = np.clip((x / W) * 0.35 + (y / H) * 0.65, 0, 1)[..., None]+ a = np.array([34, 193, 220], np.float32); b = np.array([37, 99, 201], np.float32)+ return Image.fromarray((a + (b - a) * t).astype(np.uint8))++def main():+ spec = json.load(open(sys.argv[1])); out = sys.argv[2]+ man = json.load(open(spec["manifest"]))+ fdir = pathlib.Path(man["frames_dir"]); sfps = man["fps"]; nfr = man["frame_count"]+ bg = gradient().convert("RGBA")+ sh = Image.new("RGBA", (W, H), (0, 0, 0, 0))+ ImageDraw.Draw(sh).rounded_rectangle((L, T + 24, L + CW, T + BAR + CH + 24), radius=16, fill=(0, 0, 0, 90))+ bg.alpha_composite(sh.filter(ImageFilter.GaussianBlur(28)))+ d = ImageDraw.Draw(bg)+ d.rounded_rectangle((L, T, L + CW, T + BAR + CH), radius=16, fill=(255, 255, 255, 255))+ d.rectangle((L, T + BAR - 1, L + CW, T + BAR), fill=(230, 232, 236, 255))+ for i, c in enumerate([(255, 95, 87), (254, 188, 46), (40, 200, 64)]):+ d.ellipse((L + 18 + i * 20, T + 18, L + 30 + i * 20, T + 30), fill=c)+ d.rounded_rectangle((L + 90, T + 9, L + CW - 18, T + 39), radius=15, fill=(244, 246, 248, 255))+ try: f = ImageFont.truetype("/System/Library/Fonts/Helvetica.ttc", 20)+ except Exception: f = ImageFont.load_default()+ d.text((L + 112, T + 15), spec["address"].split("/")[0], fill=(70, 78, 88, 255), font=f)+ mask = Image.new("L", (CW, CH), 0)+ ImageDraw.Draw(mask).rounded_rectangle((0, -30, CW, CH), radius=16, fill=255)+ ff = subprocess.Popen(["ffmpeg", "-v", "error", "-y", "-f", "rawvideo", "-pix_fmt", "rgb24", "-s", f"{W}x{H}", "-r", str(FPS), "-i", "-",+ "-c:v", "libx264", "-pix_fmt", "yuv420p", "-crf", "18", "-preset", "medium", "-movflags", "+faststart", out], stdin=subprocess.PIPE)+ total = 0.0+ for seg in spec["segments"]:+ sp = seg.get("speed", 1); dur = (seg["src"][1] - seg["src"][0]) / sp+ for k in range(int(round(dur * FPS))):+ i = min(nfr - 1, int(round((seg["src"][0] + k / FPS * sp) * sfps)))+ img = Image.open(fdir / f"{i:05d}.jpg").convert("RGB")+ for bx in seg.get("blur", []):+ bx = tuple(int(v) for v in bx)+ img.paste(img.crop(bx).filter(ImageFilter.GaussianBlur(16)), bx[:2])+ fr = bg.copy(); fr.paste(img.resize((CW, CH), Image.LANCZOS), (L, T + BAR), mask)+ ff.stdin.write(fr.convert("RGB").tobytes())+ total += dur+ ff.stdin.close(); ff.wait(); print(f"{out} {total:.1f}s")++if __name__ == "__main__": main()diff --git a/skills/release-video/scripts/render.py b/skills/release-video/scripts/render.pyindex b88cf86..58aefed 100755--- a/skills/release-video/scripts/render.py+++ b/skills/release-video/scripts/render.py@@ -30,6 +30,7 @@ def _open(p):pg.goto(URL)pg.wait_for_function("window.ENGINE_READY === true")pg.evaluate("document.fonts.ready")+ pg.evaluate("Promise.all([...document.images].map(i => i.decode().catch(() => null)))")return b, pgdiff --git a/skills/review-cockpit/SKILL.md b/skills/review-cockpit/SKILL.mdindex 94544d9..c52c3a1 100644--- a/skills/review-cockpit/SKILL.md+++ b/skills/review-cockpit/SKILL.md@@ -28,7 +28,7 @@ Copy `references/session-review-template.md`. Save the working copy in the relev**Cockpit (top):**1. **Status line** — one line: how many items await review + last-updated timestamp.2. **🧭 Progress** — a checklist, one row per item, each with a status glyph; a text progress bar + "X/N done · A awaiting review · B pending". **Make each item a clickable anchor to its review card** — `[N. Title](#n-title)` using GitHub-slug rules (lowercase, spaces→`-`, drop punctuation/emoji). Keep item headings free of `+ # ← → ( )` so slugs stay clean single-hyphen and the links resolve in Obsidian + the Claude side panel.-3. **📁 Working folder** — table of every artifact produced this session with its `~/vault/...` path or link (meeting note, this doc, evidence dir, external issues/PRs, posted messages).+3. **📁 Working folder** — table of every artifact produced this session with its vault path or link (meeting note, this doc, evidence dir, external issues/PRs, posted messages).4. **🔌 Context** — sources the work is grounded in (recordings, Slack threads, issues), tools/connectors used, related tickets.**Review items (below):** one card per item:diff --git a/skills/social-media-kit/SKILL.md b/skills/social-media-kit/SKILL.mdnew file mode 100644index 0000000..2aa45fa--- /dev/null+++ b/skills/social-media-kit/SKILL.md@@ -0,0 +1,205 @@+---+name: social-media-kit+description: Produce and attach native media (video teaser, GIF, card images) for every social post to maximize reach and interaction. Use whenever you post to X, LinkedIn, Reddit, or prepare HN/IndieHackers handoffs, and whenever a social-publishing step runs. A text-only social post is a draft, not a post.+---++# Social media kit++Every social post carries a video, GIF, or image. Native media is the largest reach lever the feed algorithms give you. This skill defines the kit of assets, the visual rules that keep a campaign from looking templated, and the browser mechanics for attaching media on each platform.++## Configuration++Set these once. Scripts read them from environment variables, so nothing personal is hardcoded.++| Setting | Env var | Default |+|---|---|---|+| Signature shown bottom-right on cards | `BRAND_URL` | `yourblog.example` |+| Output folder for cards | `CARD_OUT_DIR` | `.` |+| Screenshot for the runner card | `CARD_SCREENSHOT` | unset (card skipped) |+| Quote card attribution | `QUOTE_ATTRIBUTION` | `Your Name · your role` |+| Pass / fail dot colors | `CARD_ACCENT_PASS`, `CARD_ACCENT_FAIL` | `3DD68C`, `F2555A` |+| Banner accent color | `BANNER_ACCENT` | `e13f5e` (coral, configurable) |+| Fonts | `HEADLINE_FONT`, `MONO_FONT` | macOS Helvetica Neue and Menlo, DejaVu on Linux |++Your handles, avatar and brand colors belong in your own config or prompt, never in this skill.++## Requirements++- Python 3 with Pillow (`pip install pillow`)+- ffmpeg, for teaser cuts and clips+- A browser automation tool that can drive your logged-in Chrome over CDP (for example the `browser-harness` skill, if you have it)++## The kit contract++Before posting, produce a kit folder (`<scratchpad>/social-kit-<slug>/`) with whichever of these the source material supports, in priority order:++| Asset | Spec | Best for |+|---|---|---|+| `teaser-16x9.mp4` | 30-60s cut of a master video, hook in the first 3s, H.264/AAC, captions burned in (feeds autoplay muted) | X thread root, LinkedIn |+| `teaser-1x1.mp4` | Same cut, 1080x1080 center-crop or pad | Mobile feeds |+| `hero-card.png` | 1600x900 card with a padded screenshot or lane art | X, LinkedIn, Reddit image |+| `terminal.gif` | Animated terminal replay, 15MB or less (X GIF cap), 2-6 frames or a reveal sequence | X, Reddit |+| `quote-card.png` | 1600x900 dark card with one strong line | Follow-up posts, LinkedIn comment |++Reuse before creating. If your blog pipeline already produces per-post assets (OG gif, screenshots, a deep-dive mp4), a 30-60s ffmpeg cut of an existing master video beats a new render.++## Style variety across a campaign++One visual language repeated on every asset reads as AI-generated. Rules:++- Never render every asset in a campaign in the same style. Rotate: lane-art card, terminal replica (see the `terminal-replica` skill), ASCII or OG gif, bare quote card, raw screenshot or recording.+- Match style to audience. Developer forums get terminal replicas or raw screenshots, because authentic beats polished. LinkedIn and X heroes get designed cards.+- PIL gotcha for terminal renders: Menlo lacks the TUI glyphs for the record dot, the elbow and the spinner. Draw them as vector shapes (filled circle, elbow lines), never ship tofu boxes.++## House card style++Cards follow a dark thin-line art language, inspired by linear.app/now. The renderer is `scripts/linearcard.py`. The accent colors and signature are configurable.++- Canvas 1600x900 (render at 2x, LANCZOS downscale). Background `#0A0B0D`, flat. No gradients, no glow, no dot grids.+- Art is thin-line lane fields: horizontal 1.5px `#43464C` strokes flowing left to right, dots `#9A9DA2` at start points, arrowheads at ends, lines breaking around thin circle nodes. Dashed lanes mean failures. The only accents are tiny green (pass) and red (fail) dots.+- Type: a bold sans for the big headline (white, 2-3 short lines, top-left). Mono for the eyebrow and data chips. Never set the headline in mono, and never bury the message in a caption.+- Real numbers in a chip row ("7 passed · 4 failed"), not decoration.+- Signature bottom-right: your URL in bold mono plus a cursor block. Nothing else.+- Screenshots sit on the art field with a 1px `#303338` border and 20px rounded corners. Never full-bleed. Keep a headline beside them.+- Anything terminal-looking follows the `terminal-replica` skill.++```bash+BRAND_URL="myblog.dev" CARD_OUT_DIR=./kit python3 .claude/skills/social-media-kit/scripts/linearcard.py+```++The three cards in the script are examples. Edit the copy and numbers for your post.++## Content type to visual treatment++Pick the treatment by what the post is, not by one default recipe.++| Post is about | Reach for | Why |+|---|---|---|+| A flagship or launch idea | `linearcard.py` art field, but invent one concrete metaphor object for this post first (a shape that puns the idea) | A bespoke metaphor is more scroll-stopping than the same background every time |+| "Watch it actually run" proof (a real terminal session, an agent run) | `cardrender.py` screenshot or clip without the padded card frame, raw footage | A card frame reads as marketing polish. Raw footage reads as "this is happening" |+| A tool or stack story with numbers | `linearcard.py` standard recipe with a mono data-chip row | The data chips carry the story |+| A long essay excerpt or killer quote | `quote-card.png`, and drop the lane art entirely: pure type on the dark field | Background linework competes with a typographic excerpt |++## Thread media placement++In any multi-message thread (X thread, LinkedIn post plus comments, Reddit post plus comments), media goes on the first message only, preferably a gif or video. Later messages stay text-only unless an illustration adds information (a chart under discussion, a before/after). Decorating every reply with a card reads as botting and dilutes the root asset.++## Production recipes++### Teaser cut from a master video++```bash+# pick the strongest 30-60s arc: hook section plus one payoff section+ffmpeg -i master.mp4 -ss <hook_start> -to <hook_end> -c copy a.mp4+ffmpeg -i master.mp4 -ss <payoff_start> -to <payoff_end> -c copy b.mp4+printf "file 'a.mp4'\nfile 'b.mp4'\n" > cut.txt+ffmpeg -f concat -safe 0 -i cut.txt -c:v libx264 -crf 21 -pix_fmt yuv420p teaser-16x9.mp4+# 1:1 variant+ffmpeg -i teaser-16x9.mp4 -vf "crop=ih:ih,scale=1080:1080" -c:a copy teaser-1x1.mp4+```++If the teaser relies on narration, burn subtitles (`-vf subtitles=teaser.srt:force_style='FontSize=22'`). Muted autoplay kills uncaptioned voice-over.++### Padded-card screenshots and cursor-animated clips++`scripts/cardrender.py` renders 1920x1080 frames: a screenshot floating on a gradient with rounded corners and shadow, an optional animated cursor with click ripples, row highlight pulses, and zoom. Use `Seg(...)` and `render()` for motion clips. For a static `hero-card.png`, render one frame:++```python+from cardrender import Seg+seg = Seg("screenshot.png", 1.0, waypoints=[(0.5, 800, 400)], clicks=[], highlights=[], zoom=None)+seg.frame(0.5).save("hero-card.png")+```++Edit the gradient colors at the top of `make_bg()` to match your brand.++### Terminal GIF++Author frames with PIL and a mono font on a dark background, reveal lines progressively, then `img.quantize(colors=64)` and `save(..., save_all=True, duration=[...], loop=0)`. Keep under 15MB for X: 64 colors and 20 frames or fewer does it.++### Terminal-style banner (article cover)++`scripts/terminal_banner.py <out.png>` draws a 5:2 (1500x600) terminal-window banner with a prompt line, a big wordmark with a block cursor, status lines and a feature list. Edit the CONFIG block per product. Use it when a raw app screenshot makes a poor cover.++## Attaching media per platform++These mechanics assume a CDP-driven Chrome. Coordinates drift, so resolve elements through JS or `getBoundingClientRect()` each time. Screenshots can be a few percent larger than CSS pixels on retina displays, so never click straight from image coordinates.++### Stream a file into the page++The raw `DOM.setFileInputFiles` call is the cleanest path when an `input[type=file]` exists (see below). When it does not work, stream the file in:++1. Base64 the asset, split it into 50KB chunks, and append each chunk with a `js("window.__g += '<chunk>'")` call. The JS pipe breaks above about 60KB.+2. In the page, build the file: `atob`, then `Uint8Array`, then `new File`, then `DataTransfer`.+3. Hand it to the composer as described per platform.++### X++- Media, image or mp4: `DOM.getDocument(depth=-1, pierce=True)`, then `DOM.querySelector('input[data-testid="fileInput"]')`, then `DOM.setFileInputFiles(files=[path], nodeId=...)`. An 8MB 64s mp4 was ready in about 20s. Wait until the attachments strip stops showing upload progress.+- Fallback: a synthetic `DragEvent('drop')` (with dragenter and dragover first) on `[data-testid="tweetTextarea_0"]` works. Click the reply box first, wait about 2s, type the text, verify via innerText, then drop.+- Text entry: use CDP `Input.insertText`, not `document.execCommand('insertText')`. The draft editor silently mangles long multi-paragraph strings with execCommand. Focus the textarea via JS, call `Input.insertText`, then verify innerText (marker count, length range, URL present) before clicking Post.+- Self-reply chain: go to the parent status URL, focus `tweetTextarea_0`, insert text, verify, click `tweetButtonInline` by its rect, then find the new reply's status href by matching the first 40 characters of its text.+- Attach media to the thread root. Media plus a link in the same tweet suppresses the link card, which is fine: keep the canonical URL in the final reply, which then renders the card. Limits: mp4 2:20 or shorter, GIF 15MB, images 5MB. Screenshot-verify the media preview before clicking Post.+- Deleting your own tweet: the caret menu needs a real coordinate click, and it soft-rate-limits after several opens. Fallback is the web client's own delete GraphQL call from the page context with the session's csrf cookie. Look up the current query id in the web client's network log, because it changes.+++- Feed Photo and Video buttons both open a native file chooser. Use the file-chooser intercept below.+- Comments: drop does not work, and the visible `input[type=file]` elements belong to the messaging widget (attaching there sends it to a chat draft). Correct flow: patch `HTMLInputElement.prototype.click` to capture the input instead of opening the picker, click the comment box's "Add a photo" button (capture lands about 1s later), then set `input.files = dt.files` and dispatch `change`. Restore the prototype afterwards.+- Video post: set a thumbnail before Next (image icon under the preview, then "Add video thumbnail"). Otherwise the feed shows a black first frame.+- Native video beats a link preview card for reach. The URL can stay in the body text. 30-90s is the sweet spot.+- The create composer text box is reachable through `.ql-editor, [contenteditable=true][role=textbox]` with `focus()` plus `Input.insertText`. Some composers are closed shadow roots, so click by coordinates and verify by screenshot.+- LinkedIn rewrites links to `lnkd.in` shorteners. Verify an edit by curling the shortener, not by matching the raw URL.+++- The composer lives in shadow DOM: walk `el.shadowRoot` recursively. `input[type=file][accept*=image]` exists without clicking: assign `files` and dispatch `input` and `change` (bubbles and composed).+- The reopened composer restores old drafts. Clear it with real keys (click the editor, Select All, Backspace, verify innerText length 0) before typing, or new text interleaves with the stale draft.+- Read each subreddit's rules before posting. Image or video post types get more feed surface where allowed.++### Native file-chooser intercept++Cleanest path when a real picker opens: `cdp("Page.setInterceptFileChooserDialog", enabled=True)`, real-click the upload button, drain events, grab `Page.fileChooserOpened`'s `backendNodeId`, call `cdp("DOM.setFileInputFiles", files=[path], backendNodeId=bid)`, then disable the intercept. No base64 needed.++### Hacker News and IndieHackers++HN is link-only: the OG image on the blog page does the work, so verify `og:image` renders before submitting. IndieHackers allows images in the body: include `hero-card.png`.++### Facebook groups++Check the group's language and rules on its About page first, and confirm you are a member. Then:++1. Click "Write something..." and confirm the `div[role=dialog]` with a `div[role=textbox]` exists before typing. Closing the dialog preserves the draft.+2. Focus the textbox via JS and call `Input.insertText`.+3. The dialog already contains `input[type=file]`. Do not click Photo/video. Use `DOM.querySelector('div[role=dialog] input[type=file]')` plus `DOM.setFileInputFiles` with 2-4 images, and wait for blob `<img>` previews.+4. Click the `div[aria-label="Post"]` button. Posting shows a spinner for 15-25s in big groups.+5. Verify under the group's "my posted content" page. Large groups hold new posts as Pending (admin approval). Pending is success. Never repost while pending.++### X Articles (long-form)++- Route: sidebar "Articles", then Write (not a direct compose URL). Drafts autosave server-side, so a browser restart loses nothing.+- Title: `textarea[placeholder="Add a title"]`. `Input.insertText` doubles text here, so set it with the native value setter plus an `input` event.+- Body: the single `div[contenteditable=true]`. `Input.insertText` works and preserves paragraphs.+- Cover (5:2, 1500x600): `input[data-testid="fileInput"]`, then `DOM.setFileInputFiles`, then Apply in the crop dialog. Generate a banner with `scripts/terminal_banner.py` instead of using a raw app screenshot.+- Publish: Publish, then the audience dialog's Publish. The redirect to the article's status URL means it is live.++## Session discipline++- Never delete an engaged post. Edit in place (LinkedIn: control menu, Edit post, which exposes a real `.ql-editor`).+- If you use the same Chrome the agent drives, the agent can re-attach to your focused tab between calls. Before any click batch, list tabs, switch to the target by URL, and assert `location.href` inside the same call. Do whole flows in one script, and prefer JS or API actions over coordinate clicks while you are working in the browser.+- Close leftover agent tabs before starting. Gate any Post click behind a content-verify loop that refuses to fire on a mismatch.++## Post-shape rules that compound with media++1. Hook line above the media: one sentence, no link. The media stops the scroll, the first line earns the click.+2. One asset per post, root-only by default (see Thread media placement).+3. Match the asset to the claim. "Watch the agent work" gets the run clip. "One command" gets the terminal GIF.+4. Verify visually after posting. Screenshot each item and confirm the media rendered, because uploads fail silently during composer timeouts.+5. Reddit: verify with the JSON API. Moderator removal is invisible to the author: the post looks live while `removed_by_category` is `moderator`. Fetch `/r/<sub>/comments/<id>.json` and check `removed_by_category` and `is_robot_indexable`. A shadow-DOM file-input assign can also report success while attaching nothing, so check `media_metadata` on the live post JSON. If a subreddit removes your posts, move to a sibling community.+6. Keep your voice and content rules from your own publishing checklist: canonical URL everywhere, no marketing speak on Reddit, and hand off at auth walls.++## Definition of done++- [ ] Kit folder produced, or an explicit note why no media exists for this topic+- [ ] Every posted item has native media attached and visually verified+- [ ] X thread: the root has the strongest asset and the final tweet carries the link+- [ ] Handoff files (HN, IndieHackers) reference the OG image or include `hero-card.png`diff --git a/skills/social-media-kit/scripts/cardrender.py b/skills/social-media-kit/scripts/cardrender.pynew file mode 100644index 0000000..ccab334--- /dev/null+++ b/skills/social-media-kit/scripts/cardrender.py@@ -0,0 +1,145 @@+"""Padded floating-card renderer with animated cursor, ripples, highlights, zoom.+Gradient colors: edit TOP/BOT in make_bg() or set CARD_BG_TOP / CARD_BG_BOT (hex)."""+from PIL import Image, ImageDraw, ImageFilter+import math, os, subprocess++W, H = 1920, 1080+FPS = 30++def make_bg():+ # diagonal soft blue gradient, Xnapper-ish+ def hx(n, d):+ h = (os.environ.get(n) or d).lstrip("#")+ return tuple(int(h[i:i + 2], 16) for i in (0, 2, 4))+ top = hx("CARD_BG_TOP", "4facfe")+ bot = hx("CARD_BG_BOT", "00d2d8")+ bg = Image.new("RGB", (W, H))+ px = bg.load()+ for y in range(H):+ for x in range(0, W, 4):+ t = (x / W * 0.45 + y / H * 0.55)+ r = int(top[0] + (bot[0] - top[0]) * t)+ g = int(top[1] + (bot[1] - top[1]) * t)+ b = int(top[2] + (bot[2] - top[2]) * t)+ for dx in range(4):+ if x + dx < W: px[x + dx, y] = (r, g, b)+ return bg++BG = make_bg()++def rounded_card(img, radius=22, border=2):+ """screenshot -> RGBA card with rounded corners and hairline border"""+ w, h = img.size+ card = img.convert("RGBA")+ mask = Image.new("L", (w, h), 0)+ d = ImageDraw.Draw(mask)+ d.rounded_rectangle([0, 0, w - 1, h - 1], radius=radius, fill=255)+ card.putalpha(mask)+ d2 = ImageDraw.Draw(card)+ d2.rounded_rectangle([0, 0, w - 1, h - 1], radius=radius, outline=(255, 255, 255, 90), width=border)+ return card++def make_shadow(w, h, radius=22, blur=38, alpha=120):+ pad = blur * 2+ sh = Image.new("RGBA", (w + pad * 2, h + pad * 2), (0, 0, 0, 0))+ d = ImageDraw.Draw(sh)+ d.rounded_rectangle([pad, pad, pad + w - 1, pad + h - 1], radius=radius, fill=(10, 30, 50, alpha))+ return sh.filter(ImageFilter.GaussianBlur(blur)), pad++def smoothstep(a, b, t):+ t = max(0.0, min(1.0, (t - a) / (b - a))) if b > a else 1.0+ return t * t * (3 - 2 * t)++CURSOR_PTS = [(0,0),(0,16.5),(3.9,13.2),(6.3,19.2),(8.7,18.2),(6.3,12.2),(11.4,12.2)]+def draw_cursor(draw, x, y, scale=2.0):+ pts = [(x + px * scale, y + py * scale) for px, py in CURSOR_PTS]+ draw.polygon(pts, fill=(20, 20, 25, 255), outline=(255, 255, 255, 255))++class Seg:+ """One screenshot segment: waypoints, clicks, highlight, zoom."""+ def __init__(self, shot_path, D, waypoints, clicks, highlights, zoom):+ self.shot = Image.open(shot_path).convert("RGB")+ self.D = D+ self.wps = waypoints # [(t, x, y)] screenshot coords+ self.clicks = clicks # [t]+ self.hls = highlights # [(t0, t1, rect)]+ self.zoom = zoom # (t0, t1, t2, t3, zmax, anchor)+ self.card = rounded_card(self.shot)++ def cursor_at(self, t):+ wps = self.wps+ if t <= wps[0][0]: return wps[0][1], wps[0][2]+ for i in range(len(wps) - 1):+ t0, x0, y0 = wps[i]; t1, x1, y1 = wps[i + 1]+ if t0 <= t <= t1:+ u = smoothstep(t0, t1, t)+ return x0 + (x1 - x0) * u, y0 + (y1 - y0) * u+ return wps[-1][1], wps[-1][2]++ def transform(self, t):+ sw, sh_ = self.shot.size+ k0 = (W * 0.86) / sw+ z = 1.0+ u = 0.0+ if self.zoom:+ t0, t1, t2, t3, zmax, anchor = self.zoom+ if t < t0: z = 1.0+ elif t < t1: z = 1 + (zmax - 1) * smoothstep(t0, t1, t)+ elif t < t2: z = zmax+ elif t < t3: z = zmax - (zmax - 1) * smoothstep(t2, t3, t)+ else: z = 1.0+ u = (z - 1) / (zmax - 1) if zmax > 1 else 0+ else:+ anchor = (sw / 2, sh_ / 2)+ k = k0 * z+ float_y = 5 * math.sin(2 * math.pi * t / self.D * 2)+ off0 = ((W - k0 * sw) / 2, (H - k0 * sh_) / 2 + float_y)+ offz = (W / 2 - k * anchor[0], H / 2 - k * anchor[1])+ off = (off0[0] * (1 - u) + offz[0] * u, off0[1] * (1 - u) + offz[1] * u)+ return k, off++ def frame(self, t):+ img = BG.copy()+ k, off = self.transform(t)+ sw, sh_ = self.shot.size+ cw, ch = int(sw * k), int(sh_ * k)+ card = self.card.resize((cw, ch), Image.BILINEAR)+ shadow, pad = make_shadow(cw, ch, blur=30)+ img.paste(shadow, (int(off[0]) - pad, int(off[1]) - pad + 14), shadow)+ img.paste(card, (int(off[0]), int(off[1])), card)+ ov = Image.new("RGBA", (W, H), (0, 0, 0, 0))+ d = ImageDraw.Draw(ov)+ # highlights+ for (h0, h1, rect) in self.hls:+ if h0 <= t <= h1:+ a = smoothstep(h0, h0 + 0.4, t) * (1 - smoothstep(h1 - 0.4, h1, t))+ pulse = 0.75 + 0.25 * math.sin(2 * math.pi * (t - h0) * 1.6)+ alpha = int(230 * a * pulse)+ r = [off[0] + rect[0] * k, off[1] + rect[1] * k, off[0] + rect[2] * k, off[1] + rect[3] * k]+ d.rounded_rectangle(r, radius=8, outline=(255, 90, 80, alpha), width=4)+ # click ripples+ cx, cy = self.cursor_at(t)+ px, py = off[0] + cx * k, off[1] + cy * k+ for ct in self.clicks:+ if ct <= t <= ct + 0.8:+ u = (t - ct) / 0.8+ rr = 10 + 42 * u+ alpha = int(220 * (1 - u))+ cxs, cys = self.cursor_at(ct)+ pxs, pys = off[0] + cxs * k, off[1] + cys * k+ d.ellipse([pxs - rr, pys - rr, pxs + rr, pys + rr], outline=(255, 255, 255, alpha), width=5)+ draw_cursor(d, px, py)+ img = Image.alpha_composite(img.convert("RGBA"), ov)+ return img.convert("RGB")++def render(seg, out):+ n = int(seg.D * FPS)+ p = subprocess.Popen(+ ["ffmpeg", "-y", "-v", "error", "-f", "rawvideo", "-pix_fmt", "rgb24",+ "-s", f"{W}x{H}", "-r", str(FPS), "-i", "-",+ "-c:v", "libx264", "-crf", "20", "-preset", "medium", "-pix_fmt", "yuv420p", out],+ stdin=subprocess.PIPE)+ for i in range(n):+ p.stdin.write(seg.frame(i / FPS).tobytes())+ p.stdin.close(); p.wait()+ assert p.returncode == 0, outdiff --git a/skills/social-media-kit/scripts/linearcard.py b/skills/social-media-kit/scripts/linearcard.pynew file mode 100644index 0000000..dae07df--- /dev/null+++ b/skills/social-media-kit/scripts/linearcard.py@@ -0,0 +1,251 @@+#!/usr/bin/env python3+"""Social cards in a dark thin-line "lane field" art language.++Configuration (environment variables, all optional):+ BRAND_URL signature text bottom-right (default "yourblog.example")+ CARD_OUT_DIR output folder (default ".")+ CARD_SCREENSHOT path to a screenshot for the runner card (card skipped if unset)+ HEADLINE_FONT / MONO_FONT paths to .ttf/.ttc files (macOS defaults used if present)+ CARD_ACCENT_PASS / CARD_ACCENT_FAIL hex colors for the pass/fail dots++Inspired by the line-art cards on linear.app/now.++Verified against Linear's real OG art (linear-og.png):+bg #0A0B0D, thin gray strokes, dashed alt-paths, lines flow around circle+nodes with small dots at the break points, arrowheads at line ends.+Text: Helvetica Neue Bold headline, Menlo only for eyebrow/signature.+Render at 2x, downscale for AA.+"""+from PIL import Image, ImageDraw, ImageFont+import math, os+++def _hex(h, default):+ h = (os.environ.get(h) or default).lstrip("#")+ return tuple(int(h[i:i + 2], 16) for i in (0, 2, 4))++W, H = 3200, 1800 # 2x+BG = (10, 11, 13)+LINE = (67, 70, 76) # stroke gray+NODE = (154, 157, 162) # dots/arrowheads+TXT = (242, 243, 244)+MUT = (138, 143, 152)+GREEN = _hex("CARD_ACCENT_PASS", "3DD68C")+RED = _hex("CARD_ACCENT_FAIL", "F2555A")+BRAND_URL = os.environ.get("BRAND_URL", "yourblog.example")+OUT_DIR = os.environ.get("CARD_OUT_DIR", ".")++def _first(*paths):+ for p in paths:+ if p and os.path.exists(p):+ return p+ raise SystemExit("No font found: set HEADLINE_FONT / MONO_FONT to a .ttf or .ttc path")+++HN = _first(os.environ.get("HEADLINE_FONT"), "/System/Library/Fonts/HelveticaNeue.ttc",+ "/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf")+MEN = _first(os.environ.get("MONO_FONT"), "/System/Library/Fonts/Menlo.ttc",+ "/usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf")+_TTC = HN.endswith(".ttc")+_MTC = MEN.endswith(".ttc")+++def _f(path, size, idx, ttc):+ return ImageFont.truetype(path, size, index=idx) if ttc else ImageFont.truetype(path, size)+f_head = _f(HN, 124, 1, _TTC) # Bold+f_head_s = _f(HN, 104, 1, _TTC)+f_chip = _f(MEN, 42, 0, _MTC) # mono chips (has arrows)+f_eyebrow = _f(MEN, 34, 0, _MTC)+f_sig = _f(MEN, 38, 1, _MTC) # Menlo Bold+f_sig_dim = _f(MEN, 38, 0, _MTC)+f_quote = _f(HN, 150, 1, _TTC)+f_attr = _f(HN, 48, 10 if _TTC else 0, _TTC)+++def rounded_line(d, pts, fill, width, dash=None):+ """polyline from float points; dash = (on, off) in px."""+ if dash is None:+ d.line(pts, fill=fill, width=width, joint="curve")+ return+ on, off = dash+ acc, drawing, seg_start = 0.0, True, pts[0]+ for i in range(1, len(pts)):+ x0, y0 = pts[i - 1]; x1, y1 = pts[i]+ seg = math.hypot(x1 - x0, y1 - y0)+ t = 0.0+ while t < seg:+ step = min((on if drawing else off) - acc, seg - t)+ nt = t + step+ xa, ya = x0 + (x1 - x0) * t / seg, y0 + (y1 - y0) * t / seg+ xb, yb = x0 + (x1 - x0) * nt / seg, y0 + (y1 - y0) * nt / seg+ if drawing:+ d.line([(xa, ya), (xb, yb)], fill=fill, width=width)+ acc += step+ if acc >= (on if drawing else off) - 0.01:+ acc, drawing = 0.0, not drawing+ t = nt+++def lane_points(x0, x1, y, bulges):+ """horizontal lane with smooth vertical bulges.+ bulges: list of (cx, radius, amount): lane bends by `amount` at cx."""+ pts = []+ x = x0+ while x <= x1:+ dy = 0.0+ for cx, r, amt in bulges:+ u = (x - cx) / r+ if abs(u) < 2.2:+ dy += amt * math.exp(-u * u * 1.6)+ pts.append((x, y + dy))+ x += 6+ return pts+++def arrowhead(d, x, y, col=NODE, s=13):+ d.polygon([(x, y), (x - s * 1.5, y - s * 0.85), (x - s * 1.5, y + s * 0.85)], fill=col)+++def dot(d, x, y, col=NODE, r=7):+ d.ellipse([x - r, y - r, x + r, y + r], fill=col)+++def circle_node(d, cx, cy, r, width=3):+ d.ellipse([cx - r, cy - r, cx + r, cy + r], outline=LINE, width=width)+ dot(d, cx - r, cy); dot(d, cx + r, cy)+++def draw_lane_field(d, x0, x1, lanes, circles, statuses):+ """lanes: list of y. circles: list of (cx, cy_lane_idx, r).+ statuses: per-lane 'pass'|'fail'|None → end accent."""+ circ = [(cx, lanes[li], r) for cx, li, r in circles]+ for i, y in enumerate(lanes):+ bulges = []+ on_circle = None+ for cx, cy, r in circ:+ dyl = y - cy+ if abs(dyl) < 2: # lane passes THROUGH this circle+ on_circle = (cx, cy, r)+ elif abs(dyl) < r + 60: # neighbour: bulge away+ sgn = 1 if dyl > 0 else -1+ amt = sgn * (r + 34 - abs(dyl)) * 0.62+ if (r + 34 - abs(dyl)) > 0:+ bulges.append((cx, r * 1.35, amt))+ dash = (10, 14) if statuses[i] == "fail" else None+ if on_circle:+ cx, cy, r = on_circle+ p1 = lane_points(x0, cx - r - 4, y, bulges)+ p2 = lane_points(cx + r + 4, x1, y, bulges)+ rounded_line(d, p1, LINE, 3, dash)+ rounded_line(d, p2, LINE, 3, dash)+ else:+ rounded_line(d, lane_points(x0, x1, y, bulges), LINE, 3, dash)+ dot(d, x0, y)+ if statuses[i] == "pass":+ arrowhead(d, x1 + 16, y); dot(d, x1 - 26, y, GREEN, 9)+ elif statuses[i] == "fail":+ # dashed lane stops short with a red node, no arrow+ dot(d, x1 - 170, y, RED, 9)+ else:+ arrowhead(d, x1 + 16, y)+ for cx, cy, r in circ:+ circle_node(d, cx, cy, r)+++def text_block(d, x, y, eyebrow, head_lines, chips, font_head=f_head):+ d.text((x, y), eyebrow, font=f_eyebrow, fill=MUT)+ yy = y + 90+ for ln in head_lines:+ d.text((x, yy), ln, font=font_head, fill=TXT)+ yy += font_head.size + 26+ yy += 40+ for chip_txt, col in chips:+ dot(d, x + 12, yy + 30, col, 10)+ d.text((x + 44, yy), chip_txt, font=f_chip, fill=MUT)+ yy += 86+ return yy+++def signature(d, img_w, img_h):+ t = BRAND_URL+ w = d.textlength(t, font=f_sig)+ x = img_w - w - 120 - 34+ y = img_h - 130+ d.text((x, y), t, font=f_sig, fill=(200, 203, 208))+ d.rectangle([x + w + 14, y + 2, x + w + 34, y + 44], fill=GREEN)+++def new_canvas():+ img = Image.new("RGB", (W, H), BG)+ return img, ImageDraw.Draw(img)+++def save(img, path):+ img.resize((W // 2, H // 2), Image.LANCZOS).save(path)+ print("saved", path)+++def out(name):+ os.makedirs(OUT_DIR, exist_ok=True)+ return os.path.join(OUT_DIR, name)+++# The three cards below are EXAMPLES. Replace the copy with your own claim,+# real numbers and attribution, then re-run.++# ---------- hero card: 11 lanes through a central circle, 7 pass 4 fail ----+img, d = new_canvas()+lanes = [300 + i * 118 for i in range(11)]+statuses = ["pass", "pass", "fail", "pass", "pass", "fail", "pass", "fail", "pass", "fail", "pass"]+draw_lane_field(d, 1560, 3020, lanes, circles=[(2210, 5, 150), (1840, 1, 84), (2660, 8, 84)], statuses=statuses)+text_block(d, 120, 240,+ "YOUR PRODUCT x YOUR TOOL",+ ["One agent runs the", "whole test cycle."],+ [("43 issues -> 134 test cases", NODE),+ ("designed, executed, reported back", NODE)])+signature(d, W, H)+save(img, out("hero-card.png"))++# ---------- runner card: lanes converge into a screenshot ----+shot_path = os.environ.get("CARD_SCREENSHOT")+if shot_path:+ img, d = new_canvas()+ shot = Image.open(shot_path).convert("RGB")+ tw = 1720+ th = int(shot.height * tw / shot.width)+ shot = shot.resize((tw, th), Image.LANCZOS)+ mask = Image.new("L", shot.size, 0)+ md = ImageDraw.Draw(mask)+ md.rounded_rectangle([0, 0, tw - 1, th - 1], radius=20, fill=255)+ px, py = W - tw - 150, (H - th) // 2 + 60+ # short entry stubs leading into the shot (must not cross the text block)+ lanes = [py + 120 + i * ((th - 240) // 6) for i in range(7)]+ sts = ["pass", "pass", "fail", "pass", "fail", "pass", "pass"]+ for i, y in enumerate(lanes):+ dashed = (10, 14) if sts[i] == "fail" else None+ rounded_line(d, lane_points(px - 280, px - 40, y, []), LINE, 3, dashed)+ dot(d, px - 280, y)+ dot(d, px - 40, y, GREEN if sts[i] == "pass" else RED, 9)+ img.paste(shot, (px, py), mask)+ db = ImageDraw.Draw(img)+ db.rounded_rectangle([px, py, px + tw - 1, py + th - 1], radius=20, outline=(48, 51, 56), width=3)+ text_block(db, 120, 200,+ "REAL RUN · REAL VERDICTS",+ ["The AI runner", "grades my own", "work."],+ [("7 passed · 4 failed", NODE),+ ("every failure filed as a ticket", NODE)], font_head=f_head_s)+ signature(db, W, H)+ save(img, out("runner-card.png"))++# ---------- quote card ----------+img, d = new_canvas()+lanes = [1330 + i * 90 for i in range(3)]+draw_lane_field(d, 2380, 3020, lanes, circles=[(2680, 1, 90)], statuses=[None, None, None])+d.text((120, 330), "\u201c", font=_f(HN, 300, 1, _TTC), fill=(60, 63, 70))+qy = 560+for ln in ["The failures are", "the product."]:+ d.text((120, qy), ln, font=f_quote, fill=TXT)+ qy += 180+d.text((126, qy + 60), os.environ.get("QUOTE_ATTRIBUTION", "Your Name · your role"), font=f_attr, fill=MUT)+signature(d, W, H)+save(img, out("quote-card.png"))diff --git a/skills/social-media-kit/scripts/terminal_banner.py b/skills/social-media-kit/scripts/terminal_banner.pynew file mode 100644index 0000000..87bda83--- /dev/null+++ b/skills/social-media-kit/scripts/terminal_banner.py@@ -0,0 +1,78 @@+#!/usr/bin/env python3+"""Terminal/GitHub-README-style banner generator (dark panel + one accent color).++Produces a 5:2 (1500x600) PNG that looks like a terminal window: titlebar with+traffic-light dots, a prompt line, a big mono wordmark with a coral block+cursor, status lines on the left, feature list on the right, url + cursor+bottom-right. Good as an X Article cover when a raw app screenshot looks bad.+Adapt the CONFIG block per product; keep the layout.++Usage: python3 terminal_banner.py <out.png>+Env: BANNER_ACCENT (hex, default e13f5e), BANNER_URL, MONO_FONT (path)+"""+import os, sys+from PIL import Image, ImageDraw, ImageFont++# CONFIG, edit per product+TITLE = "myapp - the deck your agents work on"+PROMPT = "myapp start"+WORD_A, WORD_B = "My", "App" # white part, accent part+STATUS = [+ ("green", "●", "agent 1 coding src/search.ts:42"),+ ("amber", "●", 'agent 2 needs you "ship the fix?"'),+ ("green", "●", "agent 3 docs report.md"),+ ("muted", "○", "agent 4 idle done · 2m ago"),+]+FEATURES = ["click any path -> rendered", "tweak UI -> send to agent",+ "wiki · grid · canvas", "self-hosted · MIT"]+URL = os.environ.get("BANNER_URL", "myapp.example.com")++W, H = 1500, 600+C = {"bg": "#161616", "panel": "#1e1e1e", "border": "#3d3d3d", "fg": "#dadada",+ "muted": "#9b9b9b", "coral": "#" + os.environ.get("BANNER_ACCENT", "e13f5e").lstrip("#"), "green": "#4ec9a0", "amber": "#e5b567"}++def font(size, bold=False):+ p = os.environ.get("MONO_FONT")+ if p and os.path.exists(p):+ return ImageFont.truetype(p, size)+ if os.path.exists("/System/Library/Fonts/Menlo.ttc"):+ return ImageFont.truetype("/System/Library/Fonts/Menlo.ttc", size, index=1 if bold else 0)+ return ImageFont.truetype("/usr/share/fonts/truetype/dejavu/DejaVuSansMono%s.ttf" % ("-Bold" if bold else ""), size)++def main(out):+ img = Image.new("RGB", (W, H), C["bg"])+ d = ImageDraw.Draw(img)+ x0, y0, x1, y1 = 70, 60, W - 70, H - 60+ d.rounded_rectangle([x0, y0, x1, y1], radius=16, fill=C["panel"], outline=C["border"], width=2)+ d.rounded_rectangle([x0, y0, x1, y0 + 52], radius=16, fill="#282828")+ d.rectangle([x0, y0 + 30, x1, y0 + 52], fill="#282828")+ d.line([x0, y0 + 52, x1, y0 + 52], fill=C["border"], width=2)+ for i, c in enumerate(["#ff5f57", "#febc2e", "#28c840"]):+ d.ellipse([x0 + 24 + i * 30, y0 + 18, x0 + 40 + i * 30, y0 + 34], fill=c)+ d.text(((x0 + x1) // 2, y0 + 26), TITLE, font=font(17), fill=C["muted"], anchor="mm")++ big, mono, sm = font(92, True), font(24), font(20)+ d.text((x0 + 48, y0 + 100), "$", font=mono, fill=C["green"])+ d.text((x0 + 78, y0 + 100), PROMPT, font=mono, fill=C["fg"])+ d.text((x0 + 44, y0 + 150), WORD_A, font=big, fill="#ffffff")+ wa = d.textlength(WORD_A, font=big)+ d.text((x0 + 44 + wa, y0 + 150), WORD_B, font=big, fill=C["coral"])+ cx = x0 + 44 + wa + d.textlength(WORD_B, font=big) + 18+ d.rectangle([cx, y0 + 168, cx + 40, y0 + 248], fill=C["coral"])++ ys = y0 + 300+ for col, dot, txt in STATUS:+ d.text((x0 + 48, ys), dot, font=mono, fill=C[col])+ d.text((x0 + 84, ys), txt, font=mono, fill=C["fg"] if col != "muted" else C["muted"])+ ys += 38+ fy = y0 + 300+ for f in FEATURES:+ d.text((x1 - 48, fy), f, font=sm, fill=C["muted"], anchor="ra")+ fy += 34+ d.text((x1 - 48, y1 - 36), URL, font=sm, fill=C["coral"], anchor="rm")+ d.rectangle([x1 - 44, y1 - 46, x1 - 36, y1 - 26], fill=C["coral"])+ img.save(out, optimize=True)+ print("saved", out)++if __name__ == "__main__":+ main(sys.argv[1] if len(sys.argv) > 1 else "banner.png")diff --git a/skills/terminal-replica/SKILL.md b/skills/terminal-replica/SKILL.mdnew file mode 100644index 0000000..c892342--- /dev/null+++ b/skills/terminal-replica/SKILL.md@@ -0,0 +1,87 @@+---+name: terminal-replica+description: >+ Reproduce YOUR real terminal and CLI agents (Claude Code, Codex CLI, Gemini+ CLI) faithfully in any generated graphic, GIF, or video frame. Use whenever+ an asset shows a terminal, an agent transcript, a statusline, or a CLI+ banner. Capture your actual theme, font, prompt and statusline first, and+ never invent a generic "hacker terminal" look.+---++# Terminal replica++Terminal-like graphics must match the real tool and the real setup of the person who ships the asset. A generic green-on-black "hacker terminal" reads as fake. This skill is a method for capturing your own setup, plus a render recipe and a worked example.++## Method++1. Capture the ground truth. Take a fresh screenshot of your real terminal running the tool. Sample background, foreground and accent colors from it with an eyedropper or `PIL.Image.getpixel`. A live screenshot beats any spec in this file.+2. Record these five facts about your setup:+ - Emulator (Terminal.app, iTerm2, Warp, the VS Code integrated terminal, Ghostty).+ - Font family and size. Check the emulator's settings. VS Code on macOS defaults to Menlo 12.+ - Theme: background, default foreground, and the 16 ANSI colors.+ - Shell prompt shape (for example `user@host ~ %` for default macOS zsh, or your powerline or starship layout).+ - Statusline format, if your agent has a custom one.+3. Use your own session logs for transcript shapes. Claude Code stores them at `~/.claude/projects/<project-slug>/*.jsonl`. The assistant and tool-use turns show exactly what text appears.+4. Draw from those facts, then verify by placing the render next to a real screenshot before you publish.++Keep a small config in your own project (a JSON or Python dict) holding the five facts, and read it from your render scripts. Do not hardcode them in shared code.++## Claude Code TUI++Layout top to bottom on launch (verify against your installed version):++1. A pixel-art logo on the left: a blocky creature in Anthropic terracotta (`#D97757`), roughly 5x4 fat pixels with feet. Do not redraw it as an emoji or a robot.+2. A header text block to its right: `Claude Code` in bold white plus the version in gray, a gray model and account line, and a gray working-directory path.+3. Warnings: a warning glyph plus orange-yellow text (for example "N MCP servers need authentication") and a gray `· run /mcp`.+4. Notice blocks: an orange left border `│`, an orange bold title line, the body in the default foreground, and underlined blue links.+5. Prompt: `❯` then a dim gray placeholder with a block cursor over its first character.+6. Statusline at the bottom, one line, if you have configured one. Draw exactly your own format, including filled bars in green and empty bars dimmed.+7. Mode line below the statusline when a permission mode is active (for example "bypass permissions on (shift+tab to cycle)").++Transcript shapes (session JSONL to TUI rendering):++- Assistant tool call: `⏺ Bash(git status)`, with the dot colored (green when ok), the tool name white and the args dim.+- Result continuation: ` ⎿ <first line of output>` dim, and `… +N lines` in gray.+- Working spinner: a single animated glyph cycling `✳ ✶ ✻ ✽`, plus a gerund word ("Reticulating…") and a gray token count.+- User turn: `>` followed by plain text.+- Never show affordances that do not exist: no tabs, no menu bar, no fake buttons inside the TUI.++Animation notes for GIF and video: the cursor blinks as a square block at about 530ms, the spinner steps at about 120ms, and output appears in whole-line chunks. Only the user's typing appears character by character.++## Codex CLI++- Invoked as `codex` in the same terminal, so the same background and font as above.+- Banner: a minimal `>_ OpenAI Codex (vX.Y.Z)` style header line with a blue accent, then a bordered input box drawn with rounded box-drawing characters (`╭─╮ │ ╰─╯`) and a dim placeholder such as "Ask Codex to do anything".+- A dim gray shortcuts line at the bottom.+- Verify live before shipping: run `codex` yourself in a scratch directory and screenshot it. Check `~/.codex/config.toml` for a custom theme.++## Gemini CLI++- Do not fake it from memory. If an asset needs it, install it in a scratch environment (`npm i -g @google/gemini-cli`), run it and screenshot it.+- Known shape if you cannot verify: a large `GEMINI` ASCII banner in a blue to purple gradient, a tips list, a bordered input box (`> Type your message`), and a bottom status line with cwd, sandbox note, model name and context percent. Mark any unverified render as a draft.++## Render recipe (PIL)++- Render at 2x, then downscale 50% with LANCZOS for anti-aliasing.+- Mono font from your captured setup (`/System/Library/Fonts/Menlo.ttc` on macOS if that is what you use). Draw TUI glyphs that your font lacks (record dot, elbow, spinner) as vector shapes. Never ship tofu boxes.+- Line height about 1.35em, left padding about 2 characters, no drop shadows inside the terminal.+- Window chrome: either a flat panel matching your emulator, or crop the chrome entirely and show only content.++## Example values++An example only, taken from a typical VS Code Dark Modern setup. Replace every value with what you captured in the Method section.++- Emulator: VS Code integrated terminal. Font: Menlo 12.+- Background `#181818`, default foreground `#CCCCCC`.+- ANSI normal: black `#000000`, red `#CD3131`, green `#0DBC79`, yellow `#E5E510`, blue `#2472C8`, magenta `#BC3FBC`, cyan `#11A8CD`, white `#E5E5E5`.+- ANSI bright: `#666666` `#F14C4C` `#23D18B` `#F5F543` `#3B8EEA` `#D670D6` `#29B8DB` `#FFFFFF`.+- Prompt: `user@host ~ %`.+- Statusline (a custom one): `🤖 Model | ctx: 0% | s:▰▰▰▰▰ 87% | $4.06`, with filled bars in green `#23D18B` and empty bars dim.++## Definition of done++- [ ] Colors sampled from a real screenshot of your own terminal, or matched to your captured config+- [ ] The mono font matches your emulator, with no emoji-style logo substitutes+- [ ] Transcript lines copied or adapted from a real session log+- [ ] The statusline matches your own format if shown+- [ ] Codex and Gemini banners verified live, or explicitly flagged as unverifieddiff --git a/skills/vector-cover/SKILL.md b/skills/vector-cover/SKILL.mdnew file mode 100644index 0000000..08a64f7--- /dev/null+++ b/skills/vector-cover/SKILL.md@@ -0,0 +1,131 @@+---+name: vector-cover+description: >+ Generate flat vector editorial cover illustrations in a warm editorial style:+ near-black canvas, cream organic blob, serif display type, one terracotta+ accent, and thin line-art concept motifs (grids, node charts, dashed+ "unknown" paths, mountains, question marks). Output is code (HTML + inline+ SVG) rendered to a crisp 2400x960 PNG via headless Chrome. Use when you want+ a blog, article or X-article cover image, a "hero graphic", or "make a cover+ for <title>".+---++# Vector cover++## Configuration++The palette below is a default. Swap the hex values in `template.html` for your own brand, and keep the rule of exactly one accent color. Cover copy (eyebrow, title) comes from your article, not from this skill.++## Requirements++- Google Chrome or Chromium. `render.sh` finds it in the standard macOS locations or on `PATH`. Set `CHROME` to override.+- No other dependencies, and no browser automation setup.++## What this is++A designed vector graphic built as code: flat SVG on a small set of color tokens, rendered and screenshotted. It is not a diffusion image.++- Yes: flat vector, geometric line-art, precise serif type, one accent color.+- No: photorealism, gradients, glow, drop shadows, 3D, texture. If a request needs a photo, this is the wrong tool.++## Design system (default palette, configurable)++| Token | Hex | Use |+|---------|------------|----------------------------------------------|+| ink | `#141413` | background canvas |+| ivory | `#FAF9F5` | the organic blob and primary headline text |+| clay | `#D97757` | accent: eyebrow, rule, the "unknown" motif |+| grid | `rgba(20,20,19,.09)` | faint grid drawn inside the blob |+| undercurve | `#E7D9C4` | faint warm curves near the blob's base |++Rules:++- Exactly one accent color (clay by default). Never add a second hue.+- Serif for the eyebrow (italic) and the headline (bold). Sans only for tiny annotations.+- Keep the dark field mostly empty. 3-5 decorative marks at most, low opacity.+- Everything on the cream is clipped to the blob. Nothing floats half off it except the intentional motif that escapes (for example the dashed unknown path).++## Canvas++`1200 x 480` logical (2.5:1), rendered at 2x → **2400x960 PNG** (X-article cover+size). For a square social card use `1200x1200`; for a 16:9 slide use `1280x720`+and pass those to `render.sh`.++## Layout skeleton (every cover)++```++--------------------------------------------------------------++| ? (clay, top-right) |+| A Field Guide: (eyebrow, italic clay) .-''''-. |+| / BLOB \|+| Finding Your (headline, bold ivory)| + grid |+| Unknowns | + MOTIF |+| ___ (clay rule) \ / |+| '-....-' |++--------------------------------------------------------------++ left ~40% = type right ~60% = blob + concept motif+```++## The concept motif is the whole point++Every cover encodes the article's *idea* as a small line-art diagram inside the+blob. Pick / adapt from this library (or invent one in the same visual grammar):++| Article theme | Motif |+|---------------|-------|+| journey, growth, unknowns, "map vs territory" | rising curve, solid→dashed, node dots, a `?` and mountains at the frontier (the shipped `template.html`) |+| agents, systems, networks | 5-7 nodes joined by thin lines; one node filled clay = the active one |+| architecture, layers, stack | 3-4 stacked rounded rects, offset, one outlined clay |+| search, exploration, discovery | scattered dots + a dashed search path weaving between them + one magnifier ring |+| tradeoff, comparison, A vs B | two curves crossing; the winner solid, the other dashed |+| pipeline, process, workflow | left→right stages (small circles) joined by arrows; last one clay |+| iteration, loops, refinement | a spiral / concentric arcs tightening toward a center dot |++Motif drawing rules: strokes `#141413` at 2–2.6px, `stroke-linecap="round"`;+hollow nodes = `fill=ivory stroke=ink`; filled nodes = `fill=ink`; anything+"uncertain / future / unknown" is **dashed and clay**.++## Workflow++1. Get inputs from the user, or infer them from the article:+ - `eyebrow` (italic kicker, e.g. "A Field Guide:") - optional.+ - `title` (1–2 short lines; break it yourself for balance).+ - `theme` → pick a motif from the table above.+ - `size` (default 1200x480).+2. **Copy the template**: start from `template.html` in this folder. It already+ has the tokens, blob, grid, type block, and the journey motif wired up.+3. **Edit three regions only**:+ - the `<text>` nodes (eyebrow / two headline lines / rule width),+ - the CONCEPT MOTIF group (swap for the theme's motif),+ - the 3–5 decorative marks on the dark field.+ Leave the blob path, grid, and token colors alone unless deliberately restyling.+4. **Render**:+ ```bash+ .claude/skills/vector-cover/render.sh <in.html> <out.png> [W] [H]+ # e.g. render.sh cover.html cover.png -> 2400x960+ # render.sh cover.html card.png 1200 1200 -> 2400x2400+ ```+ `render.sh` launches its own headless Chrome. It needs no remote-debugging port and no browser automation setup.+5. **Verify visually**: Read the PNG. Check nothing is clipped off-canvas+ (the escaping motif must land on the dark field, not get cut), text fits the+ left ~40%, and the blob doesn't collide with the headline. Iterate on coords.+6. Deliver the single PNG. Keep working files in your project folder.++## Font note++The template uses a system serif stack (`Charter`/`Iowan Old Style`/Georgia).+For a pixel-exact editorial look, drop a `@font-face` (e.g. a Tiempos/Copernicus-+like serif) as a base64 `data:` URI at the top of the HTML - headless Chrome+renders embedded fonts fine. Do not link remote fonts (offline render).++## Gotchas++- **Off-canvas clipping**: `<text>` anchored past x=1200 (or the escaping motif)+ gets cut. Keep the "unknown" cluster inside the canvas on the dark strip right+ of the blob (~x 1120–1195).+- **Headline overflow**: at 72px the serif eats ~11 chars/line. Longer titles →+ drop to 60px or add a third line; re-check against the blob's left edge (~x498).+- **Blob edge vs grid**: the grid is clipped to the blob, so extend grid lines+ well past the blob bounds - clipping handles the rest.+- **Never** add gradients, shadows, blur, or a second accent color. One clay.+```diff --git a/skills/vector-cover/render.sh b/skills/vector-cover/render.shnew file mode 100755index 0000000..2603ae0--- /dev/null+++ b/skills/vector-cover/render.sh@@ -0,0 +1,32 @@+#!/usr/bin/env bash+# Render a vector-cover HTML file to a crisp PNG using headless Chrome.+# No remote-debugging port needed. This launches its own headless instance.+#+# Usage: ./render.sh <input.html> <output.png> [WIDTH] [HEIGHT]+# WIDTH/HEIGHT are the LOGICAL canvas size (default 1200x480).+# Output is 2x that (scale factor 2) => 2400x960 by default.+set -euo pipefail++IN="${1:?usage: render.sh input.html output.png [W] [H]}"+OUT="${2:?usage: render.sh input.html output.png [W] [H]}"+W="${3:-1200}"+H="${4:-480}"++# absolute file:// url+case "$IN" in+ /*) URL="file://$IN" ;;+ *) URL="file://$(cd "$(dirname "$IN")" && pwd)/$(basename "$IN")" ;;+esac++CHROME="${CHROME:-/Applications/Google Chrome.app/Contents/MacOS/Google Chrome}"+[ -x "$CHROME" ] || CHROME="/Applications/Chromium.app/Contents/MacOS/Chromium"+[ -x "$CHROME" ] || CHROME="$(command -v google-chrome || command -v chromium || true)"+[ -x "$CHROME" ] || { echo "Chrome/Chromium not found"; exit 1; }++"$CHROME" --headless --disable-gpu --hide-scrollbars --default-background-color=00000000 \+ --force-device-scale-factor=2 \+ --window-size="${W},${H}" \+ --screenshot="$OUT" \+ "$URL" >/dev/null 2>&1++echo "wrote $OUT ($((W*2))x$((H*2)))"diff --git a/skills/vector-cover/template.html b/skills/vector-cover/template.htmlnew file mode 100644index 0000000..6b01cc1--- /dev/null+++ b/skills/vector-cover/template.html@@ -0,0 +1,92 @@+<!doctype html>+<meta charset="utf-8">+<style>+ html,body{margin:0;padding:0;background:#141413}+ /* Render at 1200x480 logical; use --force-device-scale-factor=2 for a 2400x960 png. */+ svg{display:block}+ /* Serif stack close to an editorial display face. Swap in a webfont via @font-face if you want an exact match. */+ .eyebrow{font-family:"Charter","Iowan Old Style","Palatino Linotype",Georgia,serif;font-style:italic;font-weight:500}+ .display{font-family:"Charter","Iowan Old Style","Palatino Linotype",Georgia,serif;font-weight:700}+</style>++<!-- ============================================================+ TOKENS (default palette, swap to your own brand):+ ink #141413 background+ ivory #FAF9F5 blob + primary text+ clay #D97757 accent (eyebrow, rule, "unknown" motifs)+ grid rgba(20,20,19,.09) faint lines inside the ivory blob+ CANVAS: 1200 x 480 (2.5:1). Left ~40% = type. Right ~60% = blob + motif.+ ============================================================ -->++<svg width="1200" height="480" viewBox="0 0 1200 480" xmlns="http://www.w3.org/2000/svg">++ <!-- background -->+ <rect width="1200" height="480" fill="#141413"/>++ <!-- decorative motifs scattered on the dark field (keep sparse: 3-5 max) -->+ <g fill="none" stroke-linecap="round">+ <circle cx="330" cy="118" r="17" stroke="rgba(250,249,245,.14)" stroke-width="1.5" stroke-dasharray="3 5"/>+ <circle cx="300" cy="300" r="9" stroke="rgba(250,249,245,.12)" stroke-width="1.5" stroke-dasharray="3 5"/>+ <text x="392" y="438" class="display" font-size="30" fill="rgba(250,249,245,.10)">?</text>+ </g>++ <!-- ============ ORGANIC BLOB (the signature shape) ============ -->+ <defs>+ <path id="blob" d="M 700 92+ C 552 86 466 188 498 270+ C 520 340 500 398 602 412+ C 716 426 800 404 884 416+ C 986 430 1074 414 1096 330+ C 1112 262 1096 168 1010 118+ C 924 80 812 82 700 92 Z"/>+ <clipPath id="blobClip"><use href="#blob"/></clipPath>+ </defs>+ <use href="#blob" fill="#FAF9F5"/>++ <!-- everything drawn on the cream is clipped to the blob -->+ <g clip-path="url(#blobClip)">+ <!-- faint grid -->+ <g stroke="rgba(20,20,19,.09)" stroke-width="1">+ <line x1="530" y1="60" x2="530" y2="440"/><line x1="600" y1="60" x2="600" y2="440"/>+ <line x1="670" y1="60" x2="670" y2="440"/><line x1="740" y1="60" x2="740" y2="440"/>+ <line x1="810" y1="60" x2="810" y2="440"/><line x1="880" y1="60" x2="880" y2="440"/>+ <line x1="950" y1="60" x2="950" y2="440"/><line x1="1020" y1="60" x2="1020" y2="440"/>+ <line x1="1090" y1="60" x2="1090" y2="440"/>+ <line x1="470" y1="130" x2="1200" y2="130"/><line x1="470" y1="200" x2="1200" y2="200"/>+ <line x1="470" y1="270" x2="1200" y2="270"/><line x1="470" y1="340" x2="1200" y2="340"/>+ </g>+ <!-- faint warm undercurves near the base -->+ <g fill="none" stroke="#E7D9C4" stroke-width="1.5" opacity=".7">+ <path d="M 500 410 C 640 356 820 356 1160 392"/>+ <path d="M 500 442 C 660 392 860 396 1160 428"/>+ </g>+ </g>++ <!-- ============ CONCEPT MOTIF: known path -> unknown ============ -->+ <!-- solid rise (the mapped, known work) -->+ <path d="M 560 382 C 656 356 730 332 806 306 C 892 276 958 244 1010 214"+ fill="none" stroke="#141413" stroke-width="2.6" stroke-linecap="round"/>+ <!-- dashed continuation leaving the blob (the unknown) -->+ <path d="M 1010 214 C 1070 190 1116 176 1158 158"+ fill="none" stroke="#141413" stroke-width="2.2" stroke-linecap="round" stroke-dasharray="2 8" opacity=".85"/>++ <!-- nodes -->+ <circle cx="560" cy="382" r="6" fill="#141413"/> <!-- start (filled) -->+ <circle cx="806" cy="306" r="8" fill="#FAF9F5" stroke="#141413" stroke-width="2.4"/><!-- mid (hollow) -->+ <circle cx="1010" cy="214" r="8" fill="#141413"/> <!-- last known (filled) -->+ <circle cx="1176" cy="150" r="11" fill="none" stroke="#D97757" stroke-width="2" stroke-dasharray="3 4"/><!-- the unknown -->+ <text x="1162" y="112" class="display" font-size="30" fill="#D97757">?</text>++ <!-- mountains near the frontier (outline) -->+ <g fill="none" stroke="#141413" stroke-width="2" stroke-linejoin="round" opacity=".8">+ <path d="M 900 268 l 22 -40 l 22 40 Z"/>+ <path d="M 940 268 l 20 -34 l 20 34 Z"/>+ </g>++ <!-- ============ TYPE (left column) ============ -->+ <text x="64" y="150" class="eyebrow" font-size="27" fill="#D97757" letter-spacing=".2">A Field Guide:</text>+ <text x="62" y="230" class="display" font-size="72" fill="#FAF9F5">Finding Your</text>+ <text x="62" y="306" class="display" font-size="72" fill="#FAF9F5">Unknowns</text>+ <rect x="66" y="342" width="84" height="4" rx="2" fill="#D97757"/>++</svg>diff --git a/skills/youtube-video-kit/SKILL.md b/skills/youtube-video-kit/SKILL.mdnew file mode 100644index 0000000..723ebf1--- /dev/null+++ b/skills/youtube-video-kit/SKILL.md@@ -0,0 +1,115 @@+---+name: youtube-video-kit+description: >+ Produce YouTube-ready video packaging: a branded thumbnail, an animated+ opening title, background music via ElevenLabs Music, and the upload metadata+ bundle. Use whenever you make or publish a video (deep dives, demos, blog+ companions) or want thumbnails, intros, video music, or channel and playlist+ consistency.+---++# YouTube video kit++Package videos like a channel, not a screen recording. The template fuses two reference styles: cinematic stills with minimal text (the Anthropic channel) and dark IDE screenshots with huge boxed text, one accent word, readable at 320px (AI-coding channels). It uses the dark lane-art language from the `social-media-kit` skill.++## Configuration++Scripts read environment variables, so nothing personal is hardcoded.++| Setting | Env var | Default |+|---|---|---|+| Signature text (bottom-left) | `BRAND_URL` | `yourblog.example` |+| Avatar PNG with a white background (optional) | `AVATAR_PATH` | unset (no avatar drawn) |+| Accent word color | `ACCENT` | `D97757` (terracotta, configurable) |+| Fonts | `HEADLINE_FONT`, `MONO_FONT` | macOS Helvetica Neue and Menlo, DejaVu on Linux |+| Opening eyebrow and chip text | `OPEN_EYEBROW`, `OPEN_CHIP` | example strings |+| ElevenLabs key | `ELEVENLABS_API_KEY` | none, required for music |++Your channel ID, handle and avatar belong in your own config.++## Requirements++- Python 3 with Pillow+- ffmpeg+- `ELEVENLABS_API_KEY` for music generation+- A CDP-driven Chrome logged in to YouTube Studio, for publishing (for example the `browser-harness` skill)++## Thumbnail++`scripts/ytthumb.py`, 1280x720 (rendered at 2560x1440, then downscaled). Keep the template identical across a playlist and vary only headline, accent word and lane pattern.++- Background `#0A0B0D` plus lane art on the right third, with green and red end dots.+- Your avatar, if you set one, is keyed (white above 235 becomes transparent), resized with NEAREST, and placed bottom-right over the lanes. Use one consistent avatar as the channel identity rather than varying photo cutouts.+- Headline: 2 lines at most, about 5 words, bold sans around 210px at 2x, white, with one accent word. It must stay legible at 320px wide (squint test).+- One mono chip with real numbers and a green dot.+- Signature and a cursor block, bottom-left.++```bash+AVATAR_PATH=./avatar.png BRAND_URL=myblog.dev python3 .claude/skills/youtube-video-kit/scripts/ytthumb.py "MY AI TESTS|MY PRODUCT." AI "7 passed · 4 failed" thumb.png+```++## Opening title++`scripts/ytopen.py [out.mp4]` renders 4.2s at 30fps, 1920x1080, with PIL frames piped to ffmpeg (rawvideo to libx264 crf 19). Sequence: lanes draw in, staggered (0-1.2s); eyebrow (0.6s); headline fades in by line (0.9, 1.2, 1.5s, accent word colored); chip (2.2s); avatar rises (1.6-2.6s); signature with a blinking cursor (2.6s); 0.5s fade to black. Edit `HEAD` in the script for the headline.++To join it to the main video, give the opening a silent AAC track (`-f lavfi -i anullsrc=r=44100:cl=mono -shortest`) matching the main video's audio params, then use the concat demuxer with `-c copy`.++## Music with ElevenLabs++```bash+curl -X POST "https://api.elevenlabs.io/v1/music" \+ -H "xi-api-key: $ELEVENLABS_API_KEY" -H "Content-Type: application/json" \+ -d '{"prompt": "<style prompt>", "music_length_ms": 250000}' -o bgm.mp3+```++Check that your plan includes the Music API first. For a narration bed, ask for "very minimal, unobtrusive, no melody hooks, no vocals". Mix the bed about 20dB under the voice-over, and louder only during the title:++```bash+ffmpeg -i video.mp4 -i bgm.mp3 -filter_complex \+ "[1:a]atrim=0:<dur>,volume='if(lt(t,4.2),0.45,0.13)':eval=frame,afade=t=in:d=1.2,afade=t=out:st=<dur-3>:d=3[bg];\+ [0:a][bg]amix=inputs=2:duration=first:normalize=0[a]" \+ -map 0:v -map "[a]" -c:v copy -c:a aac -b:a 160k out.mp4+```++Sanity check with `volumedetect` on a narration window: mean near -25dB, max at or above -6dB. Store generated tracks durably so a playlist reuses the same music family.++## Storyboarding: illustrate, do not slide++The principle: every frame should show the concept being narrated, not print it. A text-list frame is a slide, and viewers skim it.++- For each voice-over sentence ask "what is the picture of this idea?" A loop that eats itself gets a drawn loop. Two lanes converging get drawn converging. Fall back to typography only for the one or two anchor statements.+- Screenshots count as illustration only with a guided camera: a cursor moving to the thing discussed, click ripples, a highlight wrapping the exact row, zooms. A static screenshot is a slide.+- Voice-over pacing: on non-illustration frames (rules, recaps, quotes) narrate faster, with shorter sentences or trimmed silence. Slow down only where the visual needs watching time (footage, terminal replay). A boring frame with slow narration is the biggest drop-off combination.+- Animation speed: cursor hops 0.4s or less, element fade-ins 0.5s or less, and no static frame longer than 2.5s without something moving (cursor, spinner, highlight pulse).++## Shot-segment QA before assembling++A highlight box once shipped floating over empty page space because its coordinates were guessed. Every screenshot segment passes this before concat:++1. Highlights are in card coordinates (the screenshot scaled to card width). Cursor waypoints are in screen coordinates. Do not mix them.+2. A highlight wraps one actual UI row or element edge to edge. It never slices through a row or floats in whitespace. Snap it to the real bounding box read off the image.+3. Audit before rendering: paste the highlight rect onto the scaled screenshot with PIL and look at it. After rendering, extract a frame at each highlight's midpoint (`ffmpeg -ss <t> -frames:v 1`) and look at it.+4. Highlights must not overlap zoom windows. The highlight rect does not scale with zoom, so end it before the zoom starts.+5. Cursor waypoints and click ripples land on the element being narrated, not in dead space.++## Upload bundle and Studio publishing++Per video, keep in the kit folder: the final mp4, the thumbnail PNG, and `youtube-description.txt` (hook line, chapters, blog link first, skill links, tags). Title formula: benefit, plus the named product, plus the "AI agent" keyword, 70 characters or fewer. For playlist consistency use the same thumbnail template, the same opening and the same music family.++To publish through YouTube Studio in a logged-in Chrome (your own channel):++- The upload dialog's file input is sometimes in shadow DOM. Use `cdp("DOM.performSearch", query="input[type=file]")` plus `DOM.setFileInputFiles` by nodeId.+- Title and description boxes are `#textbox` elements: select all, then type.+- Thumbnail: `input#file-loader`.+- Audience: click the `VIDEO_MADE_FOR_KIDS_NOT_MFK` radio through JS `.click()`.+- Playlist: the dropdown checkbox in the dialog.+- Advance: `#next-button` three times through JS click. Set visibility with the PUBLIC radio through JS `.click()`, then `#done-button`.+- Deleting an old upload: video edit page, Options, Delete, consent checkbox, Delete forever.+- Replacing a video file creates a new video ID, so update every posted link. An X reply must be deleted and reposted. LinkedIn posts and Reddit comments are editable.++## Definition of done++- [ ] Thumbnail passes the 320px squint test, with signature (and avatar if you use one)+- [ ] Opening uses the channel animation, and terminal shots follow the `terminal-replica` skill+- [ ] Music bed generated, mixed and level-checked, and tracks stored durably+- [ ] Upload bundle complete for manual publishdiff --git a/skills/youtube-video-kit/scripts/ytopen.py b/skills/youtube-video-kit/scripts/ytopen.pynew file mode 100644index 0000000..9091c9f--- /dev/null+++ b/skills/youtube-video-kit/scripts/ytopen.py@@ -0,0 +1,161 @@+#!/usr/bin/env python3+"""Animated opening title, 4.2s @30fps 1920x1080, channel template.+Lanes draw in -> headline fades word by word -> chip + avatar + signature -> fade out.+Pipes RGB24 frames to ffmpeg.++Usage: python3 ytopen.py [out.mp4]+Env (all optional): AVATAR_PATH, BRAND_URL, ACCENT (hex), HEADLINE_FONT, MONO_FONT,+OPEN_EYEBROW, OPEN_CHIP. Edit HEAD below for the headline."""+from PIL import Image, ImageDraw, ImageFont+import subprocess, math, os, sys++def _first(*paths):+ for p in paths:+ if p and os.path.exists(p):+ return p+ raise SystemExit("No font found: set HEADLINE_FONT / MONO_FONT to a .ttf or .ttc path")+++HN = _first(os.environ.get("HEADLINE_FONT"), "/System/Library/Fonts/HelveticaNeue.ttc",+ "/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf")+MEN = _first(os.environ.get("MONO_FONT"), "/System/Library/Fonts/Menlo.ttc",+ "/usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf")+++def _f(path, size, idx=0):+ return ImageFont.truetype(path, size, index=idx) if path.endswith(".ttc") else ImageFont.truetype(path, size)+++def _hex(name, default):+ h = (os.environ.get(name) or default).lstrip("#")+ return tuple(int(h[i:i + 2], 16) for i in (0, 2, 4))+++BRAND_URL = os.environ.get("BRAND_URL", "yourblog.example")+AVATAR = os.environ.get("AVATAR_PATH", "") # optional: PNG with white background++W, H = 1920, 1080+FPS = 30+DUR = 4.2+N = int(DUR * FPS)+BG = (10, 11, 13)+LINE = (67, 70, 76)+NODE = (154, 157, 162)+TXT = (245, 246, 247)+MUT = (150, 155, 163)+GREEN = (61, 214, 140)+RED = (242, 85, 90)+CORAL = _hex("ACCENT", "D97757")++f_eyebrow = _f(MEN, 26)+f_big = _f(HN, 96, 1)+f_chip = _f(MEN, 32)+f_sig = _f(MEN, 30, 1)++# avatar keyed (optional)+av = None+if AVATAR and os.path.exists(AVATAR):+ av = Image.open(AVATAR).convert("RGBA")+ px = av.load()+ for yy in range(av.height):+ for xx in range(av.width):+ r, g, b, a = px[xx, yy]+ if r > 235 and g > 235 and b > 235:+ px[xx, yy] = (r, g, b, 0)+ av = av.resize((640, 640), Image.NEAREST)++LANES = [(170 + i * 130) for i in range(7)]+STS = ["pass", "pass", "fail", "pass", "fail", "pass", "pass"]+X0, X1 = 1150, 1850++HEAD = [("How I test", None), ("my product", None), ("with an AI agent", "AI")]+++def ease(t):+ return 0 if t <= 0 else 1 if t >= 1 else (1 - math.cos(math.pi * t)) / 2+++def frame(i):+ t = i / FPS+ img = Image.new("RGB", (W, H), BG)+ d = ImageDraw.Draw(img)+ # 1) lanes draw 0.0-1.2+ lp = ease(t / 1.2)+ for li, y in enumerate(LANES):+ stagger = ease((t - li * 0.06) / 1.0)+ xe = X0 + (X1 - X0) * stagger+ if xe <= X0:+ continue+ if STS[li] == "fail":+ x = X0+ while x < xe:+ d.line([(x, y), (min(x + 10, xe), y)], fill=LINE, width=3)+ x += 24+ else:+ d.line([(X0, y), (xe, y)], fill=LINE, width=3)+ d.ellipse([X0 - 7, y - 7, X0 + 7, y + 7], fill=NODE)+ if stagger >= 0.999:+ c = GREEN if STS[li] == "pass" else RED+ d.ellipse([X1 - 9, y - 9, X1 + 9, y + 9], fill=c)+ # avatar fades/rises 1.6-2.6+ ap = ease((t - 1.6) / 1.0)+ if ap > 0 and av is not None:+ yoff = int(40 * (1 - ap))+ a2 = av.copy()+ if ap < 1:+ alpha = a2.getchannel("A").point(lambda v: int(v * ap))+ a2.putalpha(alpha)+ img.paste(a2, (1180, H - 660 + yoff), a2)+ d = ImageDraw.Draw(img)+ # eyebrow 0.6+ ep = ease((t - 0.6) / 0.5)+ if ep > 0:+ d.text((110, 200), os.environ.get("OPEN_EYEBROW", "AGENTIC DOGFOODING"),+ font=f_eyebrow, fill=(int(MUT[0]*ep), int(MUT[1]*ep), int(MUT[2]*ep)))+ # headline lines fade 0.9 / 1.2 / 1.5+ for k, (ln, accent) in enumerate(HEAD):+ p = ease((t - (0.9 + k * 0.3)) / 0.5)+ if p <= 0:+ continue+ x = 106+ y = 280 + k * 118+ for word in ln.split(" "):+ base = CORAL if word == accent else TXT+ col = tuple(int(c * p) for c in base)+ d.text((x, y), word, font=f_big, fill=col)+ x += d.textlength(word + " ", font=f_big)+ # chip 2.2+ cp = ease((t - 2.2) / 0.5)+ if cp > 0:+ cy = 680+ d.ellipse([116, cy + 10, 132, cy + 26], fill=tuple(int(c * cp) for c in GREEN))+ d.text((150, cy), os.environ.get("OPEN_CHIP", "134 cases designed · run · graded · filed back"),+ font=f_chip, fill=tuple(int(c * cp) for c in MUT))+ # signature 2.6+ sp = ease((t - 2.6) / 0.5)+ if sp > 0:+ sx, sy = 110, H - 120+ d.text((sx, sy), BRAND_URL, font=f_sig, fill=tuple(int(c * sp) for c in (210, 213, 218)))+ w = d.textlength(BRAND_URL, font=f_sig)+ # blinking cursor+ if int(t * 2) % 2 == 0:+ d.rectangle([sx + w + 10, sy + 2, sx + w + 26, sy + 34], fill=tuple(int(c * sp) for c in GREEN))+ # fade out last 0.5s+ if t > DUR - 0.5:+ f = (t - (DUR - 0.5)) / 0.5+ img = Image.eval(img, lambda v: int(v * (1 - f)))+ return img+++OUT = sys.argv[1] if len(sys.argv) > 1 else "opening.mp4"+proc = subprocess.Popen([+ "ffmpeg", "-y", "-f", "rawvideo", "-pix_fmt", "rgb24", "-s", f"{W}x{H}",+ "-r", str(FPS), "-i", "-",+ "-c:v", "libx264", "-crf", "19", "-pix_fmt", "yuv420p",+ OUT+], stdin=subprocess.PIPE)+for i in range(N):+ proc.stdin.write(frame(i).tobytes())+proc.stdin.close()+proc.wait()+print("done", OUT)diff --git a/skills/youtube-video-kit/scripts/ytthumb.py b/skills/youtube-video-kit/scripts/ytthumb.pynew file mode 100644index 0000000..606aae9--- /dev/null+++ b/skills/youtube-video-kit/scripts/ytthumb.py@@ -0,0 +1,138 @@+#!/usr/bin/env python3+"""YouTube thumbnail, channel template.++Template = dark lane-art bg + huge bold headline with one accent word++ your avatar (right, optional) + data chip + signature.+Playlist consistency: same layout, vary headline/accent/lane pattern only.++Env (all optional): AVATAR_PATH, BRAND_URL, ACCENT (hex, default D97757),+HEADLINE_FONT, MONO_FONT.+Usage: python3 ytthumb.py "MY AI TESTS|MY PRODUCT." AI "7 passed · 4 failed" out.png+"""+from PIL import Image, ImageDraw, ImageFont, ImageFilter+import math, os, sys++def _first(*paths):+ for p in paths:+ if p and os.path.exists(p):+ return p+ raise SystemExit("No font found: set HEADLINE_FONT / MONO_FONT to a .ttf or .ttc path")+++HN = _first(os.environ.get("HEADLINE_FONT"), "/System/Library/Fonts/HelveticaNeue.ttc",+ "/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf")+MEN = _first(os.environ.get("MONO_FONT"), "/System/Library/Fonts/Menlo.ttc",+ "/usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf")+++def _f(path, size, idx=0):+ return ImageFont.truetype(path, size, index=idx) if path.endswith(".ttc") else ImageFont.truetype(path, size)+++def _hex(name, default):+ h = (os.environ.get(name) or default).lstrip("#")+ return tuple(int(h[i:i + 2], 16) for i in (0, 2, 4))+++BRAND_URL = os.environ.get("BRAND_URL", "yourblog.example")+AVATAR = os.environ.get("AVATAR_PATH", "") # optional: PNG with white background++W, H = 2560, 1440 # 2x of 1280x720+BG = (10, 11, 13)+LINE = (67, 70, 76)+NODE = (154, 157, 162)+TXT = (245, 246, 247)+MUT = (150, 155, 163)+GREEN = (61, 214, 140)+RED = (242, 85, 90)+CORAL = _hex("ACCENT", "D97757") # one accent word color, configurable++f_big = _f(HN, 210, 1)+f_chip = _f(MEN, 54)+f_sig = _f(MEN, 44, 1)+++def lane_field(d, x0, x1, ys, statuses, circles=()):+ circ = list(circles)+ for i, y in enumerate(ys):+ dash = None if statuses[i] != "fail" else (14, 18)+ # simple straight lanes with optional circle break+ brk = next(((cx, r) for cx, li, r in circ if li == i), None)+ segs = [(x0, x1)] if not brk else [(x0, brk[0]-brk[1]-6), (brk[0]+brk[1]+6, x1)]+ for (a, b) in segs:+ if dash:+ x = a+ while x < b:+ d.line([(x, y), (min(x+14, b), y)], fill=LINE, width=4)+ x += 32+ else:+ d.line([(a, y), (b, y)], fill=LINE, width=4)+ d.ellipse([x0-9, y-9, x0+9, y+9], fill=NODE)+ endc = GREEN if statuses[i] == "pass" else RED if statuses[i] == "fail" else NODE+ d.ellipse([x1-12, y-12, x1+12, y+12], fill=endc)+ for cx, li, r in circ:+ y = ys[li]+ d.ellipse([cx-r, y-r, cx+r, y+r], outline=LINE, width=4)+ d.ellipse([cx-r-8, y-8, cx-r+8, y+8], fill=NODE)+ d.ellipse([cx+r-8, y-8, cx+r+8, y+8], fill=NODE)+++def avatar_cut(size):+ """avatar, near-white keyed to transparent. Returns None if no AVATAR_PATH."""+ if not AVATAR or not os.path.exists(AVATAR):+ return None+ im = Image.open(AVATAR).convert("RGBA")+ px = im.load()+ w, h = im.size+ for yy in range(h):+ for xx in range(w):+ r, g, b, a = px[xx, yy]+ if r > 235 and g > 235 and b > 235:+ px[xx, yy] = (r, g, b, 0)+ return im.resize((size, size), Image.NEAREST)+++def signature(d, x, y):+ t = BRAND_URL+ d.text((x, y), t, font=f_sig, fill=(210, 213, 218))+ w = d.textlength(t, font=f_sig)+ d.rectangle([x + w + 16, y + 4, x + w + 40, y + 52], fill=GREEN)+++def thumb(headline_lines, accent_word, chip_txt, out):+ img = Image.new("RGB", (W, H), BG)+ d = ImageDraw.Draw(img)+ # lane art behind avatar zone, right third+ ys = [200 + i * 180 for i in range(7)]+ lane_field(d, 1490, 2450, ys,+ ["pass", "pass", "fail", "pass", "fail", "pass", "pass"],+ circles=[(1900, 3, 120)])+ # avatar on right, sitting on the lanes+ av = avatar_cut(1120)+ if av:+ img.paste(av, (W - 1150, H - 1140), av)+ d = ImageDraw.Draw(img)+ # headline top-left, accent word colored+ y = 150+ for ln in headline_lines:+ x = 110+ for word in ln.split(" "):+ col = CORAL if word.strip(".") == accent_word else TXT+ d.text((x, y), word, font=f_big, fill=col)+ x += d.textlength(word + " ", font=f_big)+ y += 232+ # chip+ cy = y + 60+ d.ellipse([122, cy+18, 146, cy+42], fill=GREEN)+ d.text((170, cy), chip_txt, font=f_chip, fill=MUT)+ signature(d, 110, H - 130)+ img.resize((1280, 720), Image.LANCZOS).save(out)+ print("saved", out)+++if __name__ == "__main__":+ a = sys.argv[1:]+ head = (a[0] if a else "MY AI TESTS|MY PRODUCT.").split("|")+ thumb(head, a[1] if len(a) > 1 else "AI",+ a[2] if len(a) > 2 else "7 passed · 4 failed · every failure filed",+ a[3] if len(a) > 3 else "yt-thumb.png")