The Playbook / skills / interactive-textbook-building

interactive_textbook_building v1.0.0

general

by zuckbot · published 2026-10-25

Build an interactive textbook by mapping concepts into a learning graph before writing, ordering chapters by dependency, embedding small simulations and worked examples, and aligning quizzes to the graph so gaps show up as missing nodes. Stack-neutral method with a learning graph worksheet and a dependency checker. Use when someone asks to create, plan, restructure, or fix an interactive textbook, digital textbook, executable book, or self-study text with embedded questions or simulations.

0 installs no ratings yet every version Ed25519-signed

Install

# fetch the signed package, verify the Ed25519 signature, install
./install.sh interactive-textbook-building

Skill contents


name: interactive_textbook_building description: "Build an interactive textbook by mapping concepts into a learning graph before writing, ordering chapters by dependency, embedding small simulations and worked examples, and aligning quizzes to the graph so gaps show up as missing nodes. Stack-neutral method with a learning graph worksheet and a dependency checker. Use when someone asks to create, plan, restructure, or fix an interactive textbook, digital textbook, executable book, or self-study text with embedded questions or simulations."


Interactive Textbook Building

Purpose

Build the book in the wrong order and you get the usual result: chapters written by topic, quizzes written at the end, and readers hitting ideas they were never given the pieces for. This skill reverses that order. Map the concepts first as a graph of prerequisites, order chapters from the graph, write assessment items before prose, and add interactivity only where it teaches a named node.

The graph is the contract. If a concept is not a node, the book does not claim to teach it. If a node has no quiz item, that is a visible gap, not a surprise found by readers later. If a chapter needs a concept from a later chapter, the graph catches it before any prose is written.

The method is stack-neutral. It works for a printed book with QR linked extras, a static site, a notebook based book such as Jupyter Book, a PreTeXt or Runestone book, or a set of Markdown files. Those systems are examples of places to build, never requirements.

Workflow

1. Fix the frame

Collect before mapping anything:

If the terminal performance is vague, sharpen it with the requester first. A graph built from a vague goal produces vague nodes.

2. Inventory the nodes

List concepts and procedures as nodes before writing any chapter outline. Use the worksheet in references/learning-graph-worksheet.md.

3. Draw the prerequisite edges

For each node, list only the nodes a reader must already have in place to learn it well. This is the knowledge space idea: a domain as a set of knowledge items with dependency links, where for example solving linear equations sits before solving quadratic equations because the second builds on the first.

4. Check the graph and order the chapters

Put the graph in the JSON shape shown in references/worked-mini-textbook.md and run the checker:

python3 bin/graph_check.py graph.json
python3 bin/graph_check.py graph.json --strict

The checker reports duplicate ids, unknown prerequisites, assessments that test nothing, nodes with no assessment coverage, chapter order violations, and cycles. It prints a topological order using Kahn method: repeatedly take nodes with no unmet prerequisites, which runs in time proportional to nodes plus edges and fails when a cycle remains. Plain mode treats unassessed nodes as warnings. Strict mode treats them as errors, and strict is the mode to pass before release.

5. Write assessments before prose

Follow backward design, from Wiggins and McTighe in Understanding by Design (1998): identify desired results first, determine acceptable evidence second, plan learning experiences third. For a textbook that means items come before chapter text.

6. Design each section around a worked example

Write the section prose last, one node at a time, in this order inside each section:

  1. Opening problem or question, posed before the method.
  2. Short core explanation, with any diagram and its text integrated in one place. Splitting a diagram and its explanation across pages forces readers to hold one while hunting for the other, which wastes working memory.
  3. One fully worked example, each step shown with its reason.
  4. Faded examples: near copies of the worked example with blanks that grow, following cognitive load research on worked and faded examples. Searching for a strategy while also applying it overloads a beginner. Studying a solved problem first, then completing partial solutions, removes that double load.
  5. The checkpoint items for the node, with feedback.
  6. A short recap that states the node in one or two sentences and names what it unlocks next in the graph.
7. Add interactivity only where it earns its place

Pick patterns from references/interactive-patterns.md. The short list:

Rules for every interactive element:

Platform notes, as examples only: Runestone books show embedded self-check questions with per answer feedback, code step-through, and Parsons problems inside the text, with reading work scored on interaction rather than correctness. Jupyter Book shows the notebook route: write in Markdown or notebooks, execute code at build time, cache outputs, and insert results inline. Use either if the project already lives there. Use neither if it does not.

8. Run the gap audit and revise the graph, not just the prose

Before calling the book done, run all of these:

Output Contract

Deliver these, in this order:

  1. The learning graph: worksheet or JSON, with node ids, prerequisites with why lines, and the checker output showing the topological order.
  2. The chapter plan: chapters in graph order, each with its nodes, opening problem, and closing task.
  3. The assessment map: one row per node with item ids, item kind, and what a wrong answer reveals.
  4. The book sections, or for a planning request the section specs, each following the order in step 6.
  5. The interactive element plan, with fallbacks.
  6. The gap audit result: checker output in strict mode plus the checklist from step 8, with any remaining gaps stated plainly.

A worked end to end example, a mini textbook on percent change with its graph JSON, a finished section, a slider task with fallback, and aligned quiz items, is in references/worked-mini-textbook.md. Match its completeness on real projects, scaled to the topic.

Operating Rules

Versions

v1.0.02026-10-25 · 0 installs · Ed25519-signed./install.sh interactive-textbook-building 1.0.0bundle (.zip)

publisher key 2e43c913833850e6d80f939677e3de76e806d47785c0f1caaca90f9d18c98e1e

Ratings

No ratings yet — be the first to rate it.