Loading...
Loading...
Design, write, and validate chapter-based learning materials (<topic>-book/01-quickstart.md, 02-….md …) that cannot fit into a single quick-study guide, tailored to the reader persona. verify-book.mjs checks the mapping between per-chapter learning objectives and comprehension checks, the ordering that prevents concepts from being used before they are introduced, chapter reading-time budgets, exercises that “fail when incomplete and pass with the answer,” and the chapter dependency graph generated from book.json; explainer’s verify-doc.mjs checks each chapter’s outputs, diagrams, and HTML. Use when the user asks for a book, a tutorial series, a course, “learning materials,” “tutorial,” “hands-on,” “turn it into a book,” “organize it into chapters,” “start with 01-quickstart,” or when an explainer crash course would exceed ~20 minutes or needs exercises.
npx skill4agent add mizchi/explainer explainer-bookexplainerexplainer../explainer/SKILL.md<skill>scripts/verify-book.mjsexplainerscripts/verify-doc.mjsexplainerexplainer<topic>-book/
README.md 目次:想定読者、章ごとの「読み終えたらできること」、章の依存図、再現方法
book.json 章の順序・学習目標・導入する概念・演習(references/book-json.md)
01-quickstart.md 最初の章は必ず quickstart:理論の前に、動く結果に着く
02-….md concept:1 章 1 つの判定を身につける
03-….md practice:演習が中心
checks.json 本文の出力と演習の答えを再生成するコマンド(explainer と同じ形式)
examples/ 章で使うコード・モデル。演習の出発点と答えを別ファイルにする
figures/ book-map.*(生成)と各章の図1. ペルソナ explainer と同じ。「怪しいところ」から、本全体の問いを 1 つ決める
2. 目標を並べる 問いに答えるために読み手ができるべき判定を 3〜6 個。1 章に 1〜2 個
3. 概念の順序 各判定に要る概念を書き出し、どの章で導入するかを決める(book.json introduces / requires)
4. 実物を先に 各章の例と演習を作り、走らせる。演習は「出発点で落ちる」「答えで通る」を両方確かめる
5. 章を書く explainer の writing.md の型。章の冒頭に所要時間とゴール、末尾に理解度チェック
6. 検証 node <skill>/scripts/verify-book.mjs <book-dir> [--write]
7. 読ませる first-reader で、少なくとも 01-quickstart と演習の章を、ペルソナ本人に読ませる(explainer の手順 8)
8. 渡す dist/index.html と、各章の 1 行要約。未検証の点を明記<!-- quiz: <objective-id> -->assumedintroducesrequires| kind | Example | Check |
|---|---|---|
| Have the reader write conditions, functions, or configuration | |
| Have the reader run a tool to make a determination | |
<details><!-- exercise: <id> -->explainer→ [02 …](02-….md)node <skill>/scripts/verify-book.mjs <book-dir> # 検査
node <skill>/scripts/verify-book.mjs <book-dir> --write # 依存図と SVG を作り直す| Check | Failure condition |
|---|---|
| chapters | A chapter file is missing. The |
| objectives | An objective has no quiz. A quiz explicitly refers to an objective in a different chapter. |
| concepts | A concept is used in a chapter before it is introduced. A |
| budget | The estimated body reading time (500 characters/min + 15 lines of code/min) exceeds |
| exercises | A marker is missing. The answer is not in |
| map | |
verify-doc.mjs --pagesbook verdict: VERIFIED| Path | Contents |
|---|---|
| All fields of book.json |
| Whole-book validation → verify-doc.mjs |
| Builds multiple pages into HTML, with a table of contents and previous/next chapter navigation |