Skip to content

docs(examples): per-example docs pages with mermaid diagrams#54

Merged
chris-colinsky merged 2 commits into
mainfrom
chore/docs-example-pages
May 19, 2026
Merged

docs(examples): per-example docs pages with mermaid diagrams#54
chris-colinsky merged 2 commits into
mainfrom
chore/docs-example-pages

Conversation

@chris-colinsky
Copy link
Copy Markdown
Member

@chris-colinsky chris-colinsky commented May 19, 2026

Summary

Second of the docs-phase PRs. Adds a new top-level Examples section to the docs site, sitting between Concepts and Model Providers in the left nav.

  • Per-example pages. One page per example (00 through 09) plus an index, each following the same structure: overview / what it teaches / how to run / mermaid graph / reading the output. Cross-links into the relevant concepts/*.md pages in each "what it teaches" section.
  • Mermaid wiring. pymdownx.superfences picks up a mermaid custom fence so per-example graph shapes render inline. No external script tag; Material's bundled JS loads the mermaid runtime when it sees a .mermaid element.
  • Nav indent. A small left-pad on nested primary-nav links in extra.css so the section hierarchy reads at a glance now that Examples runs 11 entries deep.
  • llms.txt coverage. The plugin config picks up the new Examples section plus Model Providers (which had been silently omitted since the plugin was first added), so AI-assistant ingestion covers the full public docs surface.

Out of scope (next PR): README / Quickstart / Concepts re-read against v0.6.0.

Test plan

  • uv run --group docs mkdocs build --strict succeeds
  • Examples section appears between Concepts and Model Providers in the left nav
  • Each per-example page renders its mermaid graph as an SVG (not as a code block)
  • Nav children sit slightly to the right of section labels (small indent)
  • site/llms.txt contains an ## Examples section listing all 10 example pages plus the index
  • site/llms.txt contains a ## Model Providers section listing both pages
  • Cross-links from "what it teaches" land on the right concepts pages

New top-level Examples section in the docs nav, sitting between
Concepts and Model Providers. One page per example (00 through 09)
plus an index, each following the same structure: overview /
what it teaches / how to run / mermaid graph / reading the output.

Mermaid is wired into pymdownx.superfences so the per-example graph
shapes render inline. Cross-links to the relevant concepts pages
appear in each "What it teaches" section.

extra.css gets a small left-pad on nested primary-nav links so the
section hierarchy reads at a glance now that the Examples section
runs 11 entries deep.

The llms.txt / llms-full.txt plugin config picks up the new
Examples section plus Model Providers (which had been omitted
since the plugin was first added) so AI-assistant ingestion covers
the full public docs surface.
Copilot AI review requested due to automatic review settings May 19, 2026 02:17
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new Examples documentation section with per-example walkthrough pages, Mermaid graphs, navigation updates, and llms.txt coverage for the expanded docs surface.

Changes:

  • Adds docs pages for examples 00–09 plus an examples index.
  • Configures Mermaid rendering and includes Examples/Model Providers in llms.txt sections.
  • Adds primary-nav indentation styling for nested nav items.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
mkdocs.yml Adds Examples nav entries, llms.txt sections, and Mermaid superfences config.
docs/stylesheets/extra.css Adds indentation for nested primary navigation links.
docs/examples/index.md Introduces the Examples landing page and catalog.
docs/examples/00-hello-world.md Documents the hello-world routed pipeline example.
docs/examples/01-routing-and-subgraphs.md Documents routing and subgraph composition.
docs/examples/02-explicit-subgraph-mapping.md Documents explicit mapping for reused subgraphs.
docs/examples/03-observer-hooks.md Documents observer hook usage and output.
docs/examples/04-nested-subgraphs.md Documents nested subgraph composition.
docs/examples/05-fan-out-with-retry.md Documents fan-out, retry, timing, and collect-mode behavior.
docs/examples/06-parallel-branches.md Documents parallel branch execution.
docs/examples/07-multimodal-prompt.md Documents multimodal prompts and prompt grouping.
docs/examples/08-checkpointing-and-migration.md Documents checkpoint resume and state migration.
docs/examples/09-tool-use.md Documents tool-calling agent loop behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/examples/09-tool-use.md Outdated
Comment thread docs/examples/04-nested-subgraphs.md Outdated
Comment thread docs/examples/03-observer-hooks.md
- 09-tool-use: drop the invented third call_llm. The conditional
  edge inspects each call_llm result and routes directly; the
  happy path is 2 turns, not 3. Trace block was already correct.
- 04-nested-subgraphs: "name spaces" -> "namespaces".
- 03-observer-hooks: correct the per-invocation metrics counts.
  The default Observer subscription is both started and completed,
  so 4 nodes produce 8 events with 4 distinct namespaces. Added a
  note above the trimmed tracer sample that started events fire
  too (printing as -> {} since post_state isn't yet populated).
@chris-colinsky chris-colinsky merged commit e125494 into main May 19, 2026
6 checks passed
@chris-colinsky chris-colinsky deleted the chore/docs-example-pages branch May 19, 2026 02:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants