Repository navigation
docs: adopt Jupyter notebooks for all cookbooks - #94
Conversation
Establish notebooks (.ipynb) as the format for Python cookbooks, with markdown chapters + sample/ retained for other languages. Add shared Cookbook Content Requirements so authoring rules apply across both formats, describe the notebook directory layout (notebooks plus requirements.txt/docker-compose.yml sidecars, no separate sample/), and require CI to execute every notebook end-to-end. Reconcile the sample guidelines with vendor neutrality: the default path must run for free; paid or specialized capabilities are optional, clearly-labeled extensions. Signed-off-by: MatthiasHowellYopp <matthias.howell@improving.com>
Jupyter has kernels for every language this repo uses (Python, plus Go, TypeScript/JavaScript, Java via community kernels), so drop the per-language notebook-vs-markdown split. All cookbooks are now notebook series regardless of language. Collapse the two structure sections into a single language-agnostic Cookbook Structure (with a per-language kernel table), make the content requirements notebook-only, and rework the Sample Code section into a notebook-native Runnable Code & CI section. Signed-off-by: MatthiasHowellYopp <matthias.howell@improving.com>
Jonathan-Improving
left a comment
There was a problem hiding this comment.
QA review — docs: adopt Jupyter notebooks for all cookbooks
Scope: single-file docs/policy change to CONTRIBUTING.md (+151/-72). No .ipynb, source, or GLIDE API code is added by this PR, so there is no notebook cell code to validate against the GLIDE SDK. The change is well-organized and the security posture is actually strengthened (explicit no-auth/TLS-localhost-only callout; "never commit secrets/tokens/machine paths in notebook outputs").
Verified independently:
- All 8 internal anchor links (
#cookbook-structure,#cookbook-content-requirements,#notebook-content-structure,#vendor-neutrality, …) resolve to real header slugs — no broken cross-links introduced. - All
.ipynb/.mdlink references in the diff are illustrative relative examples, not real targets.
A few consistency gaps are worth resolving before merge (see inline comments). None are blocking.
Findings: 1 Medium, 1 Low–Medium, 1 Low, 1 Tidy.
Process note (transparency): the CAO orchestration server was unreachable during this run (port 9889 refused), so the specialized reviewer sub-agents, the independent Haiku nitpick-filter pass, and the independent spot-check audit could NOT be spawned. This review was conducted directly across all reviewer lenses (docs/domain, DRY, anti-pattern, link integrity, security) with grep-confirmed line numbers, but it lacks the independent multi-agent cross-check the full pipeline provides. Jira could not be searched (no Jira CLI/MCP access in this environment) and the PR links no GitHub issue, so upstream acceptance criteria were taken from the PR description only.
| └── ... | ||
| ``` | ||
|
|
||
| ### Directory Naming |
There was a problem hiding this comment.
[Tidy — optional] New ### Directory Naming heading creates a duplicate slug.
This section adds a third ### Directory Naming heading (also under Demo Structure and Sample App Structure). GitHub auto-suffixes duplicate slugs (#directory-naming-1, -2), so no cross-link is broken today and nothing here targets these anchors. Purely a note: if a future doc links to a specific "Directory Naming" section, the suffixed slugs are brittle. No action required — recorded for awareness only.
There was a problem hiding this comment.
Noted, thanks. I'm leaving it as-is: nothing links to those anchors today, and renaming the heading would be churn for no current benefit. Recording it here so we catch it if a future doc needs to deep-link a specific Directory Naming section.
Address Jonathan's QA review on the notebook-convention rewrite: - Promote the dependency manifest and docker-compose.yml into the 'Every cookbook must have' table; they were treated as required everywhere else but listed only as prose, so the self-check table read as if they were optional. - Make Compose the canonical Valkey startup for cookbooks: Step 1 and the Valkey Startup section now use 'docker compose up -d --wait' (matching the required compose file) instead of a conflicting bare 'docker run', and note that --wait needs a healthcheck to block. - Reduce the .gitignore table row to a pointer to the dedicated subsection so the guidance has a single source of truth. Signed-off-by: MatthiasHowellYopp <matthias.howell@improving.com>
Make a single self-contained notebook the default cookbook (no separate README; the opening cell is the index), drop the mandatory Step N headings and numbered-series assumptions in favor of topical headings, and reserve the numbered series + README index for genuinely large multi-part cookbooks. Codify the operational patterns the LMCache cookbook proved out: an optional config-reference file and test file, a fail-early preflight cell, and per-run nonces for reproducible cache demos. Signed-off-by: MatthiasHowellYopp <matthias.howell@improving.com>
Python cookbooks manage dependencies with uv: a committed pyproject.toml and uv.lock rather than a bare requirements.txt, with requires-python pinned so the interpreter is reproduced alongside the packages, uv listed in the cookbook's Prerequisites, and uv sync / uv run for setup. Scope the dependency-manifest references so the Python example is pyproject.toml + uv.lock while the other languages (go.mod, package.json, pom.xml) are unchanged. Signed-off-by: MatthiasHowellYopp <matthias.howell@improving.com>
Applies #100 on top of the uv requirement: - CI starts Valkey as a service container on 127.0.0.1:6379 (VALKEY_HOST/PORT), not the cookbook's docker-compose.yml — the wording now says so. - Adds the heavy-runtime exception: a cookbook whose stack can't run on a hosted runner commits .ci-structural-only; CI runs lint and the structural tier only, the default path must still run locally free, and authors still run the notebook end-to-end before submitting. - Review checklist now asks for the concept/prereqs/how-to-run in the README for demos and sample apps, and the notebook's opening cells for cookbooks. Applied cleanly over the uv acceptance criterion (different sections). Signed-off-by: MatthiasHowellYopp <matthias.howell@improving.com>
Summary
This makes Jupyter notebooks (
.ipynb) the format for all cookbooks, in every language. Prose and runnable code live in one file, so a reader runs the cells as they read and CI runs the same code the reader runs. Jupyter has kernels for every language this repo uses (Python is built in; Go, TypeScript/JavaScript, and Java come from community kernels), so there's no need for a different format per language.What changed in
CONTRIBUTING.mdipykernel,gophernotes,tslab,IJava).docker-compose.yml, optional shared helper,.gitignore) in the same directory, with no separatesample/subtree. Adds notebook content rules (cleared/reproducible outputs, no secrets in outputs,.ipynbnav links).Notes
MD060table-style findings elsewhere in the file are unrelated and left untouched.