Storycraft — Markdown storyboard → SCORM 1.2
Stack: Pure JavaScript (Node CLI), pure DOM runtime, no external dependencies Repo: [autonomous_lab/01_storycraft](../01_storycraft/) Live playground: psidex.com → playground
The problem
The default pipeline:
storyboard (doc) → manual re-type → Storyline build → publish → SCORM zip → LMS
Two of those arrows are pure transcription. The storyboard is the source of truth in spirit; the Storyline file becomes the source of truth in practice, and they drift the moment review comments come in.
For visual-rich or interaction-heavy modules, Storyline is the right tool. For the chunk of corporate compliance work that is essentially "slides + narration + a knowledge check + maybe a branching scenario" — POSH awareness, code of conduct, induction, soft-skills onboarding — there's no good reason the path needs to touch Storyline at all.
What Storycraft is
A CLI that takes a structured Markdown storyboard and emits a SCORM 1.2 package. Markdown is the source of truth. The SCORM zip is a deterministic build artifact — same input, byte-identical output.
storycraft posh-awareness.md
# → posh-awareness.zip (uploadable to any SCORM 1.2 LMS)
The storyboard syntax is intentionally minimal:
---
title: Workplace Respect — POSH Awareness
passing_score: 70
language: en
---
## Slide: Welcome
[Narration] Welcome to this 15-minute course on...
## Check: Recognising harassment
[Q] A colleague repeatedly sends jokes with sexual innuendo over Slack. Is this harassment?
[A*] Yes — verbal/written conduct of a sexual nature qualifies.
[A] No — Slack isn't covered.
[Feedback correct] Right. POSH applies wherever work happens.
## Branch: The hallway moment
[Prompt] You overhear a senior colleague making a suggestive comment...
[Option: Speak up → moment-speak]
[Option: Check in privately → moment-check]
What's in the box
- Parser (
src/parser.js) — Markdown + storyboard DSL → AST - Manifest generator (
src/manifest.js) — SCORM 1.2-compliantimsmanifest.xml - CLI (
src/storycraft.js) — orchestrator + zip - Runtime (
runtime/) — pure-DOM player, no build step - Linear, branching, knowledge-check slides
- SCORM 1.2 RTE:
cmi.core.score.raw,cmi.interactions.*,cmi.core.session_time,cmi.core.lesson_status - Optional xAPI emit
- WCAG 2.2 AA — keyboard nav, focus management, ARIA,
prefers-reduced-motion,prefers-color-scheme - Standalone fallback — no LMS, SCORM calls degrade to no-ops, course still runs
- Web playground — paste Markdown in a browser, get a SCORM zip download. Pure client-side.
About 700 lines of code. Zero npm dependencies on the build side. Zero JS dependencies in the runtime.
Design decisions worth flagging
- Runtime is dependency-free on purpose. A SCORM package gets unzipped into someone else's LMS and served back to the browser. Pulling in React or lucide via CDN means the course breaks the day the school's firewall blocks unpkg. Pure DOM is forever-portable.
- No build step in the runtime. The same JS that ships in the zip is the JS in the repo. There is no bundler output to mistrust.
- Standalone-or-LMS in one file.
scorm12-api.jswalks the parent/opener chain, finds the LMS API if present, otherwise stubs everything to no-ops. The same zip works double-clicked from a desktop and uploaded to Moodle. - Branching outcomes are first-class. Most lightweight SCORM tools are linear-only. Storycraft treats branch outcomes as a sibling group that converges, which matches how IDs actually draft scenario-based learning.
- Deterministic builds. Same Markdown in, same zip out. Makes QA diffs a
diff -rinstead of a manual review.
Why this fits
I lead an 8-person SCORM team at Kidvento and previously POC'd on 6-language localised compliance work at Learning Owl. The slowest step in both pipelines is consistently the doc-to-Storyline transcription. Storycraft is the tool I'd hand a content writer on day one so they can ship a publishable draft without booking a developer.
The localised-variants angle is the strongest reuse: one Markdown source per language, one command, N SCORM packages. The previous version of that workflow was N Storyline files and N publish cycles.
What it doesn't do
- Drag-and-drop, hotspot, dial interactions — Storyline territory.
- SCORM 2004, AICC, cmi5 — SCORM 1.2 only today. (cmi5 is a planned target; the runtime already speaks the relevant subset.)
- Custom triggers and variables beyond branching and scoring.
It's not a Storyline replacement. It's a Storyline complement, for the class of course where the visual design isn't the differentiator.
Try it
git clone <repo>
cd autonomous_lab/01_storycraft
node src/storycraft.js examples/posh-awareness.md
# Open dist/posh-awareness/player.html in a browser — full course, no LMS required.
# Or upload dist/posh-awareness.zip to any SCORM 1.2 LMS.
Or open playground/index.html in any browser and skip the install step.