Skip to content

feat(skills): add explainer repository skill - #545

Open
isolomatov-gd wants to merge 6 commits into
mainfrom
feat/explainer-skill
Open

isolomatov-gd wants to merge 6 commits into
mainfrom
feat/explainer-skill

Conversation

@isolomatov-gd

@isolomatov-gd isolomatov-gd commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds .claude/skills/explainer, a repository skill for contributors (not shipped in the plugins). It explains Rosetta to people: a decision people keep reopening, how a component works, why something behaves unexpectedly, how to do a task, onboarding.

How it works: one agreed content page, then only the formats the person asks for. Doc page, training session, narrated video, per-row recap video, and diagram, whiteboard and isometric HTML animations. SKILL.md routes to one asset per format, loaded just in time.

Why: explaining the same mechanism again and again is costly, and an explanation drifts when every format is written separately. The content page is the single source, every claim is sourced or marked as an assumption, and review points are offered where a mistake is expensive. Only four rules are firm: consent before cloud or paid steps, the sensitive-data check, sourced claims, and the content page as single source.

Built from our own earlier explainer-video skill (the starting point of the video pipeline) and from iart.ai explainer-video-skills (MIT, attributed in NOTICE; defects fixed: true-isometric angle, GSAP seek callbacks, hand-follow anchor, Remotion SVG <image>, recap row loader). Everything was redesigned and rewritten as one skill.

scripts/explainer.py is a new codebase. Design: spec, then narration, then a pure timeline, then outputs.

Part What it does
Spec v1 Strict validation; errors name the scene and beat
Timeline Pure, with no gaps by construction; written as .timeline.json, which a Remotion composition can also read
Captions and chapters .srt, .vtt and .chapters.json from the timeline
Narration Providers none, say and elevenlabs; ElevenLabs is accepted only on the command line, after consent; settings sit in a separate block per provider
Built-in engine Frames reused while nothing changes; raw RGB piped to ffmpeg
html scenes Seekable HTML animations captured with Playwright, network blocked
draw.io Compressed pages decoded; group offsets applied
Helpers check, drawio, script, plan, ids, cost, still, render, shot, sheet, probe

Type of change

  • Documentation or website (docs/, *.md, docs/web/): a repository skill under .claude/skills/, plus NOTICE and agents/IMPLEMENTATION.md

Behavior impact

Repository skill only, and only for sessions in this repository. No change to instructions/, plugins/ or src/, so no version bump and no plugin regeneration.

Before After
A request such as "make a two-minute narrated explainer on how Rosetta delivers its hooks" makes the agent invent a one-off pipeline. In the baseline run that was a custom 300-line Node build script, an HTML player, and only an SRT file. Brief, content page with sources, then a spec and drawing for the shared pipeline. Captions, chapters and a timeline are written, layout passes stay silent, and review points come before the voice.
A missing source ("turn docs/ADR-0042.md into a video with George's voice") is handled case by case. The skill stops on the missing source, names "George" as a paid cloud voice, writes no narration from memory, and warns that plan and script with ElevenLabs are billed.

Validation

  • venv/bin/python -m pytest .claude/skills/explainer/tests: 152 passed. Covers spec validation, timeline, captions, draw.io (groups, compressed pages, DOCTYPE refusal), narration (cache, cost, key never printed), the CLI, and the html scene.
  • End-to-end runs:
    • Example rendered with macOS say: 103 s at 1080p, 27 s wall time; probe OK; mean audio −16.9 dB; timing measured.
    • Twelve stills read in contact sheets.
    • A read-or-watch page and a 45-minute training session built from the example's chapters; ids matches.
    • Three HTML animations, one per animation asset, shot and read.
    • One animation embedded as an html scene and rendered.
  • Skill tests on fresh Sonnet agents: normal video, how-to page, vague request, missing source, missing data.
    • Two baselines ran without the skill.
    • Each with-skill run got an audit follow-up.
    • The findings that pointed to a real gap were fixed (consent and billing wording, provider-specific voice settings, recap data handling, assumption visibility on pages, conflicting sources). Tasks are in evals/tasks.md.
    • Confirmation round on the fixed skill, run from a clean worktree of main: a how-to page (assumption markers survive onto the page), a recap from HR data (licence gate, HR approval, header only, no rankings), and a real whiteboard animation in a video (harness works mid-stroke).
  • An independent read-only review of every file, on a different model. 32 findings; the code and doc fixes are in the last commit.
  • scripts/pre_commit.py --only verify-links --only verify-counts: both pass.
  • Full scripts/pre_commit.py: not run. Nothing in src/, instructions/ or plugins/ changed.
  • Not tested: ElevenLabs (no key; billed) and Remotion (licence).

Risk and rollback

Low. The new files sit under .claude/skills/explainer, plus a NOTICE entry and one IMPLEMENTATION.md line. Nothing reaches users of the plugins or the MCP server. Revert the commit to roll back.

Checklist

  • Scope is narrow and explicit: one concern per PR
  • No secrets, credentials, or PII in the description, diff, or logs
  • No duplicate rules or ambiguous wording introduced
  • Safety, privacy, and approval checkpoints preserved
  • Prompt changes include a brief, examples, and validation evidence
  • Architecture changes update docs/ARCHITECTURE.md in the same changeset: not applicable, no product architecture change
  • Local validation passes (see Validation above)
  • PR description explains why, not just what

🤖 Generated with Claude Code

isolomatov-gd and others added 5 commits December 3, 2026 14:19
One content page, then only the requested formats: doc page, training
session, narrated video, per-row recap video, and diagram, whiteboard and
isometric HTML animations. Soft review points; firm rules for consent
before cloud or paid steps, sensitive data, sourced claims and the content
page as single source.

scripts/explainer.py: strict spec v1, pure timeline with captions,
chapters and timeline.json, built-in Pillow/ffmpeg engine, none|say|
elevenlabs narration (cloud only from the command line), seekable html
scenes via Playwright, plus shot, sheet, probe and ids helpers. 131 pytest
tests. Animation material from iart.ai explainer-video-skills (MIT),
attributed in NOTICE.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…l time base notes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Scripts: ES modules over file://, network and WebSocket blocking, drawio
edge-label children, continuous image focus, html cache keyed on sibling
files, one html time rounding, still clamp, exit 2 for user errors, card
hold, cache-only plan/script for ElevenLabs, ids charset and reserved ids,
shot --bg, long-token wrapping, html scene length warning, relative paths
in .timeline.json. 152 tests.
Docs: recipe fixes (module script tag, whiteboard init/hand, recap
components, row loading, percentile meaning), one home per fact, softened
over-prescription, docs aligned with the scripts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant