bookwright/skills/notebook-paired-with-prose/SKILL.md
Use when drafting or executing a paired notebook for a bookwright chapter. Covers when notebooks are required vs optional, numerical-sanity-target convention, exec-from-fresh-kernel requirement, and stack-specific execution commands (Jupyter/R Markdown/Quarto).
npx skillsauth add queelius/claude-anvil notebook-paired-with-proseInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
In a technical textbook, paired notebooks are not optional decoration. They are empirical verifiers: a chapter that claims a formula or worked example has a notebook that COMPUTES the formula and shows the empirical result matches. Broken notebook means broken chapter.
Required:
Optional or omitted:
The master spec's chapter outline marks which chapters have notebooks. The per-chapter plan's notebook task spec lists the content + numerical-sanity targets.
The plan lists explicit targets like:
The notebook-author agent computes these and compares. Match = pass. Miss = flag for user review (could be the prose is wrong, could be the notebook is wrong, could be sampling noise).
Notebooks MUST execute end-to-end from a fresh kernel with no errors. The notebook-author runs:
cd <project>/notebooks && uv run jupyter nbconvert --to notebook --execute <name>.ipynb --output <name>.ipynbcd <project>/rmd && Rscript -e 'rmarkdown::render("<name>.Rmd")'cd <project>/qmd && quarto render <name>.qmdExit code 0 is required for commit.
np.random.default_rng(seed=42) or similar.pyproject.toml. New dependencies require cd <project> && uv add <pkg> before re-executing.renv::status() should be clean; new packages require renv::install("pkg") then renv::snapshot().Match the cell count of prior chapter notebooks for the project (typically 12-18 cells). Light notebooks have ~10; substantive have ~16-20.
The project's docs/superpowers/bookwright.config.yaml records the stack choice (set during /bookwright:init). The notebook-author reads this config before drafting. Stack-specific commands above; stack-specific conventions (Python uv, R renv, Quarto rendering) are picked up from the config.
If a chapter is theory-only per the master spec, skip the notebook task entirely. Do NOT write an empty placeholder notebook (clutters the project). The integration check verifies which chapters have notebooks vs theory-only.
tools
This skill should be used when the user asks about research directions, open problems, future work, or follow-up research from the academic literature. Trigger phrases include "open problems in X", "what's next for Y", "future work for paper Z", "research directions on T", "salient follow-up research", "what should I work on next in", "find me follow-up research unrelated to my prior work", "broad survey of W", "neglected directions in V". Routes the request to the right Vista MCP tool, reads back the structured paper sections, and synthesizes research directions in the conversation.
testing
Discover latent themes in the metafunctor corpus. Use when the user wants to find implicit through-lines across their blog posts, surface recurring ideas they have not consciously framed as a series, or get candidate themes for a synthesis post. Reads titles, descriptions, and tags; proposes 3 themes that connect 4+ posts each, each with a single-sentence through-line. Output is a proposal, not a draft. Trigger phrases include "find themes in my posts", "what threads connect my writing", "latent themes in my corpus", "scribe".
development
Use when drafting prose sections for a bookwright (technical non-fiction) project. Encodes the Bernoulli-textbook workflow: atom-outward design, deferral discipline, running threads, page budgets, Path A subagent pattern, header comment block convention.
testing
Use when writing cross-referenced sections in a bookwright project. Covers the header comment block template, label-naming conventions, when to use prose-only vs Cref, forward-reference documentation, and the integration-check baseline.