know.

CookbookBooks and writingNo. 1

A technical bookchapters, code notes and a glossary that stay in step with the software

Recipe No. 1 · Books and writing

For: A developer writing a book about a web framework

You get: A sourced document per chapter and a glossary built from the API

Time: An evening, then minutes a session

See it in know.sh

A chapter’s document: the version it was checked against, a file tree of its example folder with the drifted file highlighted, then its concepts as Evidence.

Larkspur in PracticeNo. 14

Chapter 7Data loading

11 sections, 3,940 words, about 17 minutes, filed 2 August, revised 19 September, 4 highlights.

By the end of this chapter a reader can load data for a route, cache it sensibly and stream the slow parts. Checked against Larkspur 4.2.0 on 2 August; drift check against 4.3.0 on 19 September, see section 10.

The sample code is examples/ch07 in the book repository; the manuscript is ch07-data-loading.adoc.

Sections

  1. 1Route loadersEvidence, keyA loader runs on the server before the route renders; its return type flows into the component’s props. Sources: docs, “Loading data”; 4.0 release notes.
  2. 2Loader errors and the error boundaryEvidenceA thrown response renders the nearest error boundary; a thrown error renders it with a 500.
  3. 3Loader cachingEvidence, 1 noteRenamed in 4.3: cache became revalidate. The example still uses the old name.
  4. 4Form actions belong in chapter 8Decision, keyReaders need loaders before mutations make sense. Chapter 7 mentions actions once, with a forward reference.
  5. 5Does streaming work on the edge adapter?QuestionThe docs say yes; issue 4127 says not with compression on. Test before the review draft.

and 6 more sections

Claude Code reads the chapter’s sections and the installed framework in one session, and files what it found as sections, not edits.

Claude Code, connected to know.sh

You

Check chapter 7 against the sample app. The sections are in “Chapter 7 — Data loading” in know.sh; the code is in examples/ch07. Report only; do not touch the manuscript.

document_list_sections Read 9 sections from Chapter 7 — Data loading

Claude Code

The lockfile has larkspur 4.3.0; the chapter says it was checked against 4.2.0. I compared each section with node_modules/larkspur/dist/index.d.ts and the example code.

  • 1, Route loaders: holds.
  • 3, Loader caching: changed. The cache option is now revalidate; the example still passes cache and logs a deprecation warning.
  • 6, Deferred data with defer(): cannot tell. It is still exported, but marked @experimental.
  • The other six hold.

section_add Added “Drift check against 4.3.0” to Chapter 7 — Data loading, 10

section_add Added “Is defer() stable in 4.3?” to Chapter 7 — Data loading, 11

Claude Code

Filed. Want me to update examples/ch07/loader.ts to use revalidate on a new branch?

Installing the know.sh plugin for Claude Code, then signing in with /mcp from inside the sample repository.

Terminal

$ claude plugin marketplace add knowsh-curtis/know-cli
$ claude plugin install know-dev@know-sh
$ claude
> /mcp
  know-dev: sign in with your know.sh account in the browser window that opens

How it works

A framework moves faster than a book. A coding assistant with the know.sh plugin reads your manuscript and the official docs, files a sourced section for every concept, and later checks chapter 7 against the version in your lockfile: holds, changed or cannot tell. The index becomes the first draft of your glossary.

  1. Connect a coding assistant in the repository

    Install the know.sh plugin, start Claude Code in the book’s repository and sign in with /mcp. One session can now read your chapters, your sample app and your library.

  2. Have it build a document per chapter

    Ask for a document per chapter with an Evidence section per concept: what the API does, its signature and its official sources. Title sections in the framework’s own words, so useLoader reaches the index.

  3. Check each chapter against the code

    When a release lands, ask it to compare every section with the lockfile and the chapter’s example folder, and file a drift check marking each claim holds, changed or cannot tell.

  4. Map the examples, then send a preview

    Ask for a file tree element in each chapter’s overview, every file noted with the section it illustrates. Then Share a draft chapter with technical reviewers, with a password and an expiry.

Try this prompt

A coding assistant with the know.sh plugin, such as Claude Code:

Read the sections in the know.sh document “Chapter 7 — Data loading” and the code under examples/ch07. Check each claim against the framework version in the lockfile and its installed type definitions, and report each as holds, changed or cannot tell, quoting what you checked. File the report as one Evidence section called “Drift check”, plus a Question section for anything you could not settle. Do not edit the manuscript.

A coding assistant with the know.sh plugin, such as Claude Code:

Read proposal.md and chapters/ch07-data-loading.adoc. Using know.sh, create a document “Chapter 7 — Data loading” on my Larkspur in Practice shelf with one Evidence section per concept the chapter teaches: what it does, its signature in a code block, and sources from the official documentation and changelog only. File scope choices as Decision sections and open items as Question sections.

Made with

ShelfDocumentYour AI assistantElementsThe A–Z indexPublic link