Compatibility: AskUserQuestion falls back to numbered list on non-Claude-Code platforms.
ed
Author graduate-level, literature-grounded interactive textbooks as diffbook MDX — vetted sources, a dependency-ordered syllabus, scaffolded lessons, Bloom-distributed quizzes, and real-assignment projects, all behind scored quality gates.
Skill Requirements
command -v npx >/dev/null 2>&1 || echo "MISSING: npx"
# diffbook skill provides /diffbook init|author; used to scaffold and validate the book.
Inline Usage
Each verb operates on a {course} slug; planning artifacts live under .codevoyant/ed/{course}/, published MDX under the diffbook book (default book/).
/ed explore "transformer architectures" # vet & annotate reference materials
/ed plan-syllabus transformer-architectures # dependency-ordered module program (gate ≥85)
/ed plan-module transformer-architectures 02 # lesson-level outline for one module (gate ≥80)
/ed create-lesson transformer-architectures 02 01 # author one lesson .mdx into the book
/ed create-quiz transformer-architectures 02 # author the module quiz .mdx
/ed create-project transformer-architectures 02 # author the module project + solution guide
/ed autodidact "reinforcement learning" --yes # one-shot: brief → … → whole book, gated, best-effort
/ed update transformer-architectures 02/01 # re-run the minimal affected slice / apply annotations
/ed help
Bare-noun ergonomics: /ed syllabus …, /ed module …, /ed lesson …, /ed quiz …, /ed project … map to the plan-/create- verbs.
Critical Rules
- Never execute workflow logic here — this file only parses args and dispatches
- Step 0 always runs first — no exceptions
- Unknown verb → run
help.md — never error silently
- Pass all remaining args through — the workflow receives
$REMAINING_ARGS unchanged (course, module, lesson, and all --book/--dir/--yes flags)
- MDX output goes to the diffbook book, plan/draft artifacts go to
.codevoyant/ed/{course}/ — see references/artifact-layout.md
- Markdown/MDX output: soft-wrap prose, never hard-wrap — every workflow and agent writes each paragraph as one continuous line; newlines separate paragraphs, list items, headings, and fences only. LaTeX uses
\( \) / \[ \], never $…$. (Full guidance: references/pedagogy.md.)
- Model tiers, never model IDs — the
ed-lesson-author agent declares metadata: model-tier: heavy; the platform maps tiers to concrete models (see references/model-tiers.md). Never hardcode a provider model ID (such as claude-*) in this skill.
- Gates before advancing — every stage scores its output and refuses to advance a weak artifact; interactive runs STOP on repeated failure,
autodidact --yes logs to state.md and continues best-effort (see references/quality-gates.md)
- See
references/workflows/ for per-verb behaviour; see references/ for shared references and templates
Step 0: Parse Arguments
The raw invocation args (filled by Claude Code / OpenCode slash commands): $ARGUMENTS. If this line is not filled in, read the verb and remaining args from the user's current message.
VERB="[first non-flag argument, or empty]"
REMAINING_ARGS="[everything after VERB, preserving order and flags]"
# Normalise bare-noun aliases to their full verbs
case "$VERB" in
"") VERB="help" ;;
"syllabus") VERB="plan-syllabus" ;; # /ed syllabus → /ed plan-syllabus
"module") VERB="plan-module" ;; # /ed module → /ed plan-module
"lesson") VERB="create-lesson" ;; # /ed lesson → /ed create-lesson
"quiz") VERB="create-quiz" ;; # /ed quiz → /ed create-quiz
"project") VERB="create-project" ;; # /ed project → /ed create-project
"fix") VERB="doctor" ;; # /ed fix → /ed doctor
"repair") VERB="doctor" ;; # /ed repair → /ed doctor
esac
Step 1: Dispatch to Workflow
Read and execute references/workflows/{VERB}.md, passing $REMAINING_ARGS as the argument string.
If references/workflows/{VERB}.md does not exist, fall back to references/workflows/help.md and note the unknown verb.
Workflow Index
- explore (
references/workflows/explore.md) — find & vet reference materials for a course; verify URLs; annotate → explore/sources.md
- plan-syllabus (
references/workflows/plan-syllabus.md) — dependency-ordered module program with Bloom objectives (gate ≥85) → syllabus.md
- plan-module (
references/workflows/plan-module.md) — read a module's sources and craft a lesson-level outline (gate ≥80) → modules/{NN}/plan.md
- create-lesson (
references/workflows/create-lesson.md) — author one lesson .mdx into the book, Feynman-style at graduate level
- create-quiz (
references/workflows/create-quiz.md) — author a Bloom-distributed module quiz .mdx
- create-project (
references/workflows/create-project.md) — author a module project + solution guide grounded in a real sourced assignment
- autodidact (
references/workflows/autodidact.md) — chain everything from a topic into a whole book, gated, with a state.md ledger
- update (
references/workflows/update.md) — re-run the minimal affected slice; consume <!-- > --> / <!-- >> --> annotations
- doctor (
references/workflows/doctor.md) — repair a mis-scaffolded book in place (project at root, book/ as contentPath); dry-run by default, --fix to apply
- help (
references/workflows/help.md) — print command reference
Agent Index
- ed-lesson-author (
agents/ed-lesson-author.md) — authors ONE lesson .mdx from {module}/plan.md + the module's source shortlist; self-checks against the lesson gate; used by create-lesson (single) and autodidact (per-lesson fan-out)
1---2name: ed3description: Builds high-quality, literature-grounded, graduate-level interactive textbooks as diffbook MDX. Triggers on: "ed explore", "ed plan-syllabus", "ed plan-module", "ed create-lesson", "ed create-quiz", "ed create-project", "ed autodidact", "ed update", "ed doctor", "ed help", plus natural language like "build an interactive textbook", "create a course on", "study syllabus for", "graduate lesson on", "quiz me on", "course project for", "fix/repair a diffbook book", "unbork an ed book". Unified dispatcher — pass a subcommand as the first argument.4license: MIT5---67> **Compatibility**: AskUserQuestion falls back to numbered list on non-Claude-Code platforms.89# ed1011Author graduate-level, literature-grounded **interactive textbooks** as diffbook MDX — vetted sources, a dependency-ordered syllabus, scaffolded lessons, Bloom-distributed quizzes, and real-assignment projects, all behind scored quality gates.1213## Skill Requirements1415```bash16command -v npx >/dev/null 2>&1 || echo "MISSING: npx"17# diffbook skill provides /diffbook init|author; used to scaffold and validate the book.18```1920## Inline Usage2122Each verb operates on a `{course}` slug; planning artifacts live under `.codevoyant/ed/{course}/`, published MDX under the diffbook book (default `book/`).2324```25/ed explore "transformer architectures" # vet & annotate reference materials26/ed plan-syllabus transformer-architectures # dependency-ordered module program (gate ≥85)27/ed plan-module transformer-architectures 02 # lesson-level outline for one module (gate ≥80)28/ed create-lesson transformer-architectures 02 01 # author one lesson .mdx into the book29/ed create-quiz transformer-architectures 02 # author the module quiz .mdx30/ed create-project transformer-architectures 02 # author the module project + solution guide31/ed autodidact "reinforcement learning" --yes # one-shot: brief → … → whole book, gated, best-effort32/ed update transformer-architectures 02/01 # re-run the minimal affected slice / apply annotations33/ed help34```3536Bare-noun ergonomics: `/ed syllabus …`, `/ed module …`, `/ed lesson …`, `/ed quiz …`, `/ed project …` map to the `plan-`/`create-` verbs.3738## Critical Rules3940- **Never execute workflow logic here** — this file only parses args and dispatches41- **Step 0 always runs first** — no exceptions42- **Unknown verb → run `help.md`** — never error silently43- **Pass all remaining args through** — the workflow receives `$REMAINING_ARGS` unchanged (course, module, lesson, and all `--book`/`--dir`/`--yes` flags)44- **MDX output goes to the diffbook book**, plan/draft artifacts go to `.codevoyant/ed/{course}/` — see `references/artifact-layout.md`45- **Markdown/MDX output: soft-wrap prose, never hard-wrap** — every workflow and agent writes each paragraph as one continuous line; newlines separate paragraphs, list items, headings, and fences only. LaTeX uses `\( \)` / `\[ \]`, never `$…$`. (Full guidance: `references/pedagogy.md`.)46- **Model tiers, never model IDs** — the `ed-lesson-author` agent declares `metadata: model-tier: heavy`; the platform maps tiers to concrete models (see `references/model-tiers.md`). Never hardcode a provider model ID (such as `claude-*`) in this skill.47- **Gates before advancing** — every stage scores its output and refuses to advance a weak artifact; interactive runs STOP on repeated failure, `autodidact --yes` logs to `state.md` and continues best-effort (see `references/quality-gates.md`)48- See `references/workflows/` for per-verb behaviour; see `references/` for shared references and templates4950## Step 0: Parse Arguments5152The raw invocation args (filled by Claude Code / OpenCode slash commands): `$ARGUMENTS`. If this line is not filled in, read the verb and remaining args from the user's current message.5354```bash55VERB="[first non-flag argument, or empty]"56REMAINING_ARGS="[everything after VERB, preserving order and flags]"5758# Normalise bare-noun aliases to their full verbs59case "$VERB" in60 "") VERB="help" ;;61 "syllabus") VERB="plan-syllabus" ;; # /ed syllabus → /ed plan-syllabus62 "module") VERB="plan-module" ;; # /ed module → /ed plan-module63 "lesson") VERB="create-lesson" ;; # /ed lesson → /ed create-lesson64 "quiz") VERB="create-quiz" ;; # /ed quiz → /ed create-quiz65 "project") VERB="create-project" ;; # /ed project → /ed create-project66 "fix") VERB="doctor" ;; # /ed fix → /ed doctor67 "repair") VERB="doctor" ;; # /ed repair → /ed doctor68esac69```7071## Step 1: Dispatch to Workflow7273Read and execute `references/workflows/{VERB}.md`, passing `$REMAINING_ARGS` as the argument string.7475If `references/workflows/{VERB}.md` does not exist, fall back to `references/workflows/help.md` and note the unknown verb.7677## Workflow Index7879- **explore** (`references/workflows/explore.md`) — find & vet reference materials for a course; verify URLs; annotate → `explore/sources.md`80- **plan-syllabus** (`references/workflows/plan-syllabus.md`) — dependency-ordered module program with Bloom objectives (gate ≥85) → `syllabus.md`81- **plan-module** (`references/workflows/plan-module.md`) — read a module's sources and craft a lesson-level outline (gate ≥80) → `modules/{NN}/plan.md`82- **create-lesson** (`references/workflows/create-lesson.md`) — author one lesson `.mdx` into the book, Feynman-style at graduate level83- **create-quiz** (`references/workflows/create-quiz.md`) — author a Bloom-distributed module quiz `.mdx`84- **create-project** (`references/workflows/create-project.md`) — author a module project + solution guide grounded in a real sourced assignment85- **autodidact** (`references/workflows/autodidact.md`) — chain everything from a topic into a whole book, gated, with a `state.md` ledger86- **update** (`references/workflows/update.md`) — re-run the minimal affected slice; consume `<!-- > -->` / `<!-- >> -->` annotations87- **doctor** (`references/workflows/doctor.md`) — repair a mis-scaffolded book in place (project at root, `book/` as contentPath); dry-run by default, `--fix` to apply88- **help** (`references/workflows/help.md`) — print command reference8990## Agent Index9192- **ed-lesson-author** (`agents/ed-lesson-author.md`) — authors ONE lesson `.mdx` from `{module}/plan.md` + the module's source shortlist; self-checks against the lesson gate; used by create-lesson (single) and autodidact (per-lesson fan-out)