Learn Center content schema (data-driven)

All content is data; the JS engine renders it. Files in learn/data/. JSON (or JS exporting the same shape). This schema folds the plan audit: lessons carry not just text + quiz + flashcards but optional INTERACTIVE EXERCISES (active learning), the audit’s key upgrade against the “passive textbook trap”.

tracks.json

[
  { "id": "foundations", "title": "Foundations of ML", "order": 1,
    "level_range": "Beginner to Advanced", "blurb": "one tight sentence",
    "icon": "optional emoji or svg id", "lessons": ["f01_weights", "f02_..."] },
  ... (agents, vibe-coding, evaluating-ai, frontier)
]

lessons/.json (array of lesson objects)

{
  "id": "f01_weights",
  "track": "foundations",
  "title": "What is a weight?",
  "level": "Beginner",            // Beginner | Intermediate | Advanced | Expert
  "minutes": 2,                    // est. read time
  "summary": "one-line hook",
  "body_html": "<p>...</p>",       // concise, dense, non-patronizing; em-dash-free
  "key_points": ["...", "..."],   // 2-4 bullets, the takeaways
  "links": [ {"title":"3Blue1Brown: Neural Networks","url":"https://...",
              "level":"Beginner","kind":"video","note":"visual intuition"} ],
  "flashcards": [ {"front":"...","back":"..."} ],
  "quiz": [ {"q":"...","choices":["a","b","c","d"],"answer":1,"explain":"why"} ],
  "exercise": null   // or one of the exercise objects below
}

Exercise types (the active-learning upgrade)

exercise.type is one of:

The engine renders each type with click-to-answer + instant explanation. Lessons may have 0 or 1 exercise (quizzes + flashcards are always allowed).

[ { "title":"Karpathy: Zero to Hero", "url":"https://...", "track":"foundations",
    "level":"Intermediate", "kind":"course", "note":"build it from scratch",
    "start_here": true } ]

kind: video | course | paper | docs | article | tool | interactive. start_here:true marks the curated beginner on-ramp.

prereqs.json (concept dependency graph, for the landing map; audit improvement #4)

[ {"id":"foundations","needs":[]}, {"id":"agents","needs":["foundations"]},
  {"id":"vibe-coding","needs":["foundations"]}, {"id":"evaluating-ai","needs":["foundations"]},
  {"id":"frontier","needs":["foundations","evaluating-ai"]} ]

Folded from the plan audit (Codex + Gemini convergent)

Active learning is the core, not a garnish. Add one more exercise type and per-lesson competency metadata; the frontier track gets source discipline.

Build sequencing (scope realism)

Build the engine + ONE exemplar lesson to final (>=88) quality as the TEMPLATE (“Trust but verify AI-written code” or “Debug an agent failure”), goal-loop it, THEN replicate breadth across all five tracks using that template. This reconciles “massive compilation” with a sound one-night build: the template de-risks everything downstream.

Invariants