| name | capsule-authoring |
| description | Author Hi Tuto HTML lesson capsules. Use when emitting final lesson HTML, choosing scroll vs Canvas Studio vs slide shell, wiring tutor hooks, or applying postprocess/CSP constraints. |
capsule-authoring
Emit one complete, self-contained HTML capsule that passes capsule/postprocess.py.
Choose a shell (from knobs.presentation / plan.presentation)
| Presentation | Shell | Skill |
|---|
studio | Interactive specimen explorer (rails + 3D stage) | ui-studio-style |
page | Scroll mini-app | lesson_system.md paper theme |
slide | Stepped deck | ui-slide-deck |
auto | Resolved by coursegen/presentation.py (spatial/3D → studio, else page) | — |
When needs_3d: true or a Hunyuan mesh is present → studio (even if the user picked page).
Hard constraints (every capsule)
- Tailwind CDN + only pinned Chart.js / Three.js / GLTFLoader URLs from postprocess
- Images:
go-data-src="/gen?..." or go-data-src="/image?query=..." only
- Tutor hooks:
data-lesson-section, data-lesson-title, data-lesson-control on controls
- At least one working canvas, one lazy image, one control that changes the view
- End with
</body></html>; keep under ~45 KB
Studio mode extras
- Theme: editorial cream specimen-explorer shell in
ui-studio-style (Fraunces / Sora) — do not mix cobalt paper tokens
- Inline
studio-tokens.css + studio-orbit.js (orbit only when no mesh runtime)
- Short copy only; no Chapter Map, quiz, self-assessment, game, score, or tutor panel inside the capsule
- When
data-mesh-src present: do not start a second Three.js loop
- Hunyuan mesh generation is studio presentation only (cost gate)
Page / slide mode
Follow coursegen/prompts/lesson_system.md paper theme (Bricolage / Jakarta / cobalt / grass).