Skip to content

An AI skill that turns books into animated, narrated, interactive web experiences

chore(engine): engine.py syncs from engine-v2.8

yzr425bdafee505
diff --git a/.claude/skills/papermorph/assets/templates/documentary/style.json b/.claude/skills/papermorph/assets/templates/documentary/style.json
index dcdb7a6..5ad5447 100644
--- a/.claude/skills/papermorph/assets/templates/documentary/style.json
+++ b/.claude/skills/papermorph/assets/templates/documentary/style.json
@@ -15,7 +15,7 @@
"voice": { "engine": "edge", "voice": "en-GB-RyanNeural", "rate": "-4%" },
"music": "public-domain classical recordings, one per part of the film, changing at the turns",
"pacing": { "minutes": 10, "turns": "one argument with five or six turns; one idea or picture every two to four seconds" },
- "engine": { "source": "DozenTwelve/Papermorph", "ref": "engine-v2.7" },
+ "engine": { "source": "DozenTwelve/Papermorph", "ref": "engine-v2.8" },
"models": { "script": "opus", "pictures": "opus", "beats": "opus", "checks": "opus", "director": "opus" },
"approved": [{ "chapter": "ch01", "why": "close-ups on what is named; few words on screen" }]
}
diff --git a/.claude/skills/papermorph/assets/templates/picture-book/style.json b/.claude/skills/papermorph/assets/templates/picture-book/style.json
index 8fe4e1b..8eabb15 100644
--- a/.claude/skills/papermorph/assets/templates/picture-book/style.json
+++ b/.claude/skills/papermorph/assets/templates/picture-book/style.json
@@ -17,7 +17,7 @@
"budget": "under $1 of pictures per episode",
"cast": [{ "name": "Bo", "look": "round face, school uniform", "file": "site/jokes/lib/cast.js" }]
},
- "engine": { "source": "DozenTwelve/Papermorph", "ref": "engine-v2.7" },
+ "engine": { "source": "DozenTwelve/Papermorph", "ref": "engine-v2.8" },
"models": { "script": "opus", "kit": "opus", "scenes": "sonnet", "sound": "haiku", "director": "opus", "reviewers": "sonnet" },
"approved": [{ "chapter": "ch01", "why": "set-up before the punchline; a close-up on whoever speaks" }]
}
diff --git a/.claude/skills/papermorph/assets/templates/shorts/style.json b/.claude/skills/papermorph/assets/templates/shorts/style.json
index 4eb1862..7cba63e 100644
--- a/.claude/skills/papermorph/assets/templates/shorts/style.json
+++ b/.claude/skills/papermorph/assets/templates/shorts/style.json
@@ -23,7 +23,7 @@
"voice": { "engine": "edge", "voice": "en-US-AndrewNeural", "rate": "+4%", "level": "-14 LUFS, peak -1.5" },
"music": { "ch01": "one track under the whole episode, and where it came from" },
"sources": "which numbers and quotes need a source on screen, and how strict to be about anonymous reports",
- "engine": { "source": "DozenTwelve/Papermorph", "ref": "engine-v2.7" },
+ "engine": { "source": "DozenTwelve/Papermorph", "ref": "engine-v2.8" },
"models": { "script": "opus", "pictures": "opus", "beats": "opus", "checks": "opus", "director": "opus" },
"approved": [{ "chapter": "ch01", "why": "what the user liked: the hook's first frame, the pace, the ending" }]
}
diff --git a/.claude/skills/papermorph/assets/templates/style.json b/.claude/skills/papermorph/assets/templates/style.json
index e1e1e92..0eb9c58 100644
--- a/.claude/skills/papermorph/assets/templates/style.json
+++ b/.claude/skills/papermorph/assets/templates/style.json
@@ -14,7 +14,7 @@
},
"voice": { "engine": "edge", "voice": "en-US-AndrewNeural", "rate": "-4%" },
"pacing": { "minutes": [6, 10], "checks": "one or two quick checks inside the lesson, practice at the end" },
- "engine": { "source": "DozenTwelve/Papermorph", "ref": "engine-v2.7" },
+ "engine": { "source": "DozenTwelve/Papermorph", "ref": "engine-v2.8" },
"models": { "extract": "haiku", "narration": "sonnet", "picture": "opus", "checks": "haiku", "review": "sonnet", "rework": "opus", "register": "haiku" },
"scenes": {
"art": "pixel scenes on a dark board, characters about a third of the stage tall",
diff --git a/.claude/skills/papermorph/references/core/engine.md b/.claude/skills/papermorph/references/core/engine.md
index ef5f686..66a8a45 100644
--- a/.claude/skills/papermorph/references/core/engine.md
+++ b/.claude/skills/papermorph/references/core/engine.md
@@ -2,7 +2,7 @@
A chapter page loads the engine and its `audio/<lang>/timings.js`, defines `CHAPTER` (with `language` when not `en`: the audio folder), drawing helpers, `BEATS` and questions, then calls `boot()`. The engine provides the stage, drawing, timeline, question types, guide and player; where the code's signatures differ from this reference, the code wins. Interface text (buttons, help, cover, finish card) follows `<html lang>`: English, Russian, Chinese and Japanese are in the engine's `TRANSLATIONS`; another language needs a block there.
-Every book keeps a copy of the shared engine in `lib/` (`engine.*`, `math.js`, `volume.*`, `contents.*`, `units.*`), so the book runs on its own. The engine is not part of this skill but lives in the `engine/` folder of the Papermorph repository (or a fork). `python3 SKILL/scripts/engine.py site` copies it into every book from the repository's `engine/` when it is at hand, otherwise from GitHub (`--check` lists copies that differ, `--from DIR|OWNER/REPO@REF` picks the source, by default the latest compatible release, `engine-v2.7`; `@main` takes the newest, a tag or commit pins it, and `engine-v1` is the last engine with the maths helpers inside `engine.js`); a book's copy is not edited by hand. This reference describes `engine-v2.7`: sync a book on an older copy before relying on anything here. Fix an engine bug at the source, then sync. The book's own settings and style overrides live in `lib/book.css`, imported by `engine.css` and never overwritten: `--math-font` for numbers and formulas, `--progress-key` when the cover uses a key other than the default.
+Every book keeps a copy of the shared engine in `lib/` (`engine.*`, `math.js`, `volume.*`, `contents.*`, `units.*`), so the book runs on its own. The engine is not part of this skill but lives in the `engine/` folder of the Papermorph repository (or a fork). `python3 SKILL/scripts/engine.py site` copies it into every book from the repository's `engine/` when it is at hand, otherwise from GitHub (`--check` lists copies that differ, `--from DIR|OWNER/REPO@REF` picks the source, by default the latest compatible release, `engine-v2.8`; `@main` takes the newest, a tag or commit pins it, and `engine-v1` is the last engine with the maths helpers inside `engine.js`); a book's copy is not edited by hand. This reference describes `engine-v2.8`: sync a book on an older copy before relying on anything here. Fix an engine bug at the source, then sync. The book's own settings and style overrides live in `lib/book.css`, imported by `engine.css` and never overwritten: `--math-font` for numbers and formulas, `--progress-key` when the cover uses a key other than the default.
The maths helpers (number lines, tiles, fraction rows, planes, chance objects, the number-set diagram, `pickPoint`, `sorter`) are in `lib/math.js`. A chapter that uses one loads `<script src="../lib/math.js"></script>` right after `engine.js` (it reads the engine's globals as it loads, so never before it and never `async`). `lint.py` names a chapter that uses one without loading it. Use the helpers that fit; draw the rest in the chapter, and move what several chapters use into the book's element library (`lib/<name>.js`, [assets.md](../lessons/assets.md)) rather than into the engine copy.
diff --git a/.claude/skills/papermorph/scripts/engine.py b/.claude/skills/papermorph/scripts/engine.py
index 0e74ded..d1c80bc 100644
--- a/.claude/skills/papermorph/scripts/engine.py
+++ b/.claude/skills/papermorph/scripts/engine.py
@@ -20,7 +20,7 @@ with lib/mathjax.js keeps it in step like the rest.
import argparse, filecmp, io, shutil, sys, tarfile, tempfile, urllib.request
from pathlib import Path
-DEFAULT = 'DozenTwelve/[email protected]' # follows the latest compatible release
+DEFAULT = 'DozenTwelve/[email protected]' # follows the latest compatible release
OWN = 'book.css'
LATEX = {'vendor/mathjax/tex-svg-full.js': 'mathjax.js', 'vendor/mathjax/LICENSE': 'mathjax-LICENSE.txt'}
diff --git a/README.md b/README.md
index 5f884ad..6d38785 100644
--- a/README.md
+++ b/README.md
@@ -89,7 +89,7 @@ python3 .claude/skills/papermorph/scripts/engine.py site
python3 .claude/skills/papermorph/scripts/engine.py site --from you/your-fork@main
```
-Engine versions are tags (`engine-v2`, `engine-v2.1`, …); a new major number means a book may need a change, described in its [release notes](https://github.com/DozenTwelve/Papermorph/releases). Outside this repository, `engine.py` syncs from the latest compatible release, now `engine-v2.7`. Since `engine-v2` the maths helpers (number lines, tiles, planes, the number-set diagram) are in `lib/math.js`: a chapter that uses them loads `../lib/math.js` right after `engine.js`, and `lint.py` names the chapters that need it. `--from DozenTwelve/Papermorph@engine-v1` keeps the earlier engine.
+Engine versions are tags (`engine-v2`, `engine-v2.1`, …); a new major number means a book may need a change, described in its [release notes](https://github.com/DozenTwelve/Papermorph/releases). Outside this repository, `engine.py` syncs from the latest compatible release, now `engine-v2.8`. Since `engine-v2` the maths helpers (number lines, tiles, planes, the number-set diagram) are in `lib/math.js`: a chapter that uses them loads `../lib/math.js` right after `engine.js`, and `lint.py` names the chapters that need it. `--from DozenTwelve/Papermorph@engine-v1` keeps the earlier engine.
## Video and LMS export