Animated learning page
A v2 learning page with GSAP figures added. The page itself — shell, typography, editors, terminals, line
explorer, paper diagrams, principles, quizzes — is the v2 learning-page contract
(the sibling skill's ../learning-page/SKILL.md; read its teaching, code-literacy and component sections). This skill
adds three to five stepper figures for the mechanisms that must be watched: a canvas with ‹ › controls and the
step's text underneath, never floating over it. One HTML file, opened from disk, no network.
The template is a complete, verified page (SQL injection, one request end to end) in the v2 shell: a static paper
diagram, a captured .term, a line explorer over the vulnerable handler, editors with marked lines and annotation
lines, and four figures — an annotated request, a state walk with a magic move, an exchange with a predict step, and
an architecture tour on warm paper that the camera pans around hop by hop (figures.md §6). Copy it and
replace the content; keep its GENERIC SHELL CSS and GENERIC RUNTIME unchanged.
Files
assets/template.html— the page to copy. Generic CSS at the top, then<main>(page content), the GENERIC RUNTIME script, the PAGE FIGURES script (this page's builds), and a placeholder for GSAP.references/teaching.md— how the page explains: the brief, the arc, headings, definitions, callouts vs step text, provenance, the newcomer read-back. Read before writing.references/figures.md— the figure contract, the build helpers, devices, annotation grammar, phone sizing. Read before building a figure.references/page.md— page components, colour and size tokens, phone rules, what not to add.references/gotchas.md— traps that were each hit for real.scripts/inline_gsap.mjs— puts GSAP into the page (idempotent).scripts/verify.mjs— the gate.--selftestproves its own checks fire.scripts/upgrade.mjs— moves a page built from an older template onto the current generic CSS and runtime (verify warns when one is out of date). It keeps GSAP inlined or stripped, as the page had it.scripts/filmstrip.mjs— 8 frames across one transition, to judge a camera pan (verify only sees resting steps).
Workflow
- Brief and research. Fill in the five lines of
teaching.md§1 (reader, outcome, subject artifact, turn, misconception). Research from primary sources: specs, RFC sections, official docs, the real tool's output. If you cannot cite it, do not animate it. - Glossary and outline. List every identifier that will appear on screen with a one-sentence definition, and
plan the sections against the arc (
teaching.md§2): which ones are prose, which get a figure, where the turn and the predict step go. - Copy the template.
(Use the working directory if the user names another place.) The copy has an empty GSAP placeholder, so it is small and easy to edit; inline GSAP when you are ready to look at it (step 5).mkdir -p ~/LearningPages && cp <skill>/assets/template.html ~/LearningPages/<topic-slug>.html - Write the page. Replace the demo inside
<main>and the PAGE FIGURES script, and keep PAGE STYLES small.- Prose and components: the v2 contract (
page.mdlists the class names). Arguedh2s with one<em>phrase,<dfn>at first use, connective prose before and after every component, provenance on everything. - Code the reader must understand line by line goes in a
.explorer(five views + state frame per line); code to glance at goes in an.editorwith a marked line and│ └─annotation lines. - Architecture and who-sees-what go on paper (
.figure > .paper > .arch.light); animate it only if the order of hops matters, by putting the same map in a stepper figure. - Figures (
figures.md):--W/--Hon each figure, annotations in the<pre>, one<li>perstop(). Frame every lit step withcamera(focusOn(...)). Callouts carry structure; step text (≤60 words) carries meaning and consequence. - Recompute every number from the code or data on the page.
- Prose and components: the v2 contract (
- Inline GSAP and verify (first time on a machine:
cd <skill>/scripts && npm i):
verify walks every figure forward and back at 1440 and 390px wide and prints one line per check, with the reason for every error. Fix all errors; if it prints UPGRADE first, run the command it gives. Then look: Readnode <skill>/scripts/inline_gsap.mjs ~/LearningPages/<topic-slug>.html node <skill>/scripts/verify.mjs ~/LearningPages/<topic-slug>.htmlcontact-1440.pngandcontact-390.png(figures) and the<width>-static-NN.pngshots (editors, terminals, explorers, paper diagrams), which it writes into the folder it names. Check that each step's lit part is the most prominent thing, labels sit beside their parts, and nothing is cut off. verify measures; it does not judge. After inlining, GSAP fills the last lines of the file: never Read past the line containingdata-inline="gsap"(or runinline_gsap.mjs <page> --stripbefore a big edit and inline again after). - Newcomer read-back. Send the step texts, the page's prose and the contact sheets to a subagent with no
context on the topic, using the prompt in
teaching.md§11. Fix what it finds. If the cause is general (a rule this skill should have stated), fix the skill too. - Deliver. Give the path. Say what verify reported and what the read-back changed. Offer to open it in the browser.
The checks verify runs
RUNTIME, NETWORK, LINT, STEPS, SEEK (forward vs backward state, and tweens that would jump), REBUILD (resize
round-trip), CROP, COLLIDE, DIAGRAM (architecture map layout), MINFONT, CONTRAST (from pixels), UNLIT, ANCHOR, UNDEFINED, PROVENANCE, CODESTYLE,
OVERFLOW, WORDS, WALL, EXPLORER, FOLD. Each is described at the top of scripts/verify.mjs and has a planted defect in
scripts/fixtures/mutations.mjs. If you change the runtime or verify, run node scripts/verify.mjs --selftest.
Preferences
- Pages stay local; publish or share only when asked.
- Real artifacts, honestly labelled: captured, excerpt or illustrative, with what was simplified.
- No quizzes for their own sake. The predict step is the recall moment, and the recap is sentences the reader can say.