Rename examples and reorder catalog by topic#120
Merged
chris-colinsky merged 4 commits intoJun 2, 2026
Conversation
Drop the NN- numeric prefix from all 13 example directories and
their corresponding walk-through docs. Regroup the catalog at
docs/examples/index.md and the mkdocs nav into seven topical
sections: Foundations, Composition, Concurrency, Prompts, Tool
use, Reliability, Observability. The numbers were never load-
bearing; they implied a strict reading order the catalog never
actually needed.
Cross-references between examples are rewritten by-name ("the
observer-hooks example", "the fan-out-with-retry example"); no
more "Example NN" references in docs, walk-throughs, example
sources, READMEs, CHANGELOG. Walk-through H1s drop the prefix;
"Run with:" docstring blocks updated to the new paths.
examples/README.md brought up to date with the post-v0.11.0
catalog under the same topical grouping; entries for
chat-with-multimodal, langfuse-observability, and
production-observability were missing.
tests/test_examples_smoke.py's DEMOS list switches to flat
names; pytest parametrize IDs follow automatically.
Folds in the em-dash sweep across example source files and
examples/README.md to match the convention established in the
v0.11.0-cycle docs sweep.
The previous commit dropped trailing em dashes (` —` at end-of-line) on the assumption they were stylistic emphasis. They weren't; they were carrying the punctuation load a colon, semicolon, or comma would otherwise do. Seven affected sentences (in explicit-subgraph-mapping, langfuse-observability, observer-hooks x2, parallel-branches, routing-and-subgraphs x2) became ungrammatical clause-smashes. Now properly punctuated. Also fixes a pre-existing stale comment in routing-and-subgraphs that referenced `01-linear-pipeline` (a long-removed example name); updated to "the hello-world example" since that's the corresponding Foundations entry under the new catalog. Surfaced by self-review of commit dbaf2de.
After the rename PR introduced nested subsection groups in the left nav (the new topical grouping under Examples), the existing nav CSS was no longer sufficient. This commit: - Hides the redundant tab label inside the sidebar (the active tab name is already shown above the content via ``navigation.tabs``; Material was rendering it again as a ``.md-nav__title`` at the top of the level-1 nav). - Adds a 1px vertical guide line on sub-sections that have children, via a ``::before`` pseudo-element on the level-2 nav. Bottom-stops 5px short of the nav's lower edge. Excludes Getting Started (whose single ``index.md`` child got rolled up by ``navigation.indexes`` leaving its level-2 nav empty). - Shifts sub-section labels and their children's UL 10px LEFT to tighten the layout while leaving the guide line in place. - Adds a padding-left override on label-form and direct-link-form ``.md-nav__link`` items so they align horizontally with the container-form labels. Material renders Documentation sub-sections as ``<div class="md-nav__container"><a>``, which matches the base padding rule twice (once on the outer div, once on the inner a), giving the text 0.75rem of layered offset. Examples sub-sections (``<label>``) and Patterns pages (``<a>``) match the rule once, so without this override their text would sit 7.5px left of the Documentation equivalents. Also adds a Python-version shield to the docs homepage, mirroring the README's shield: img.shields.io/python/required- version-toml reads pyproject.toml's ``requires-python`` directly so the badge auto-updates if the floor moves. Verified across all three tabs via headless Chromium: all sub-section / top-level page text lands at 14.5px from the level-1 nav's left edge.
There was a problem hiding this comment.
Pull request overview
This PR removes numeric prefixes from all example directories and example docs, and reorganizes the Examples catalog + MkDocs navigation into topic-based groups, updating cross-references throughout the docs and source tree accordingly. It also applies a punctuation sweep in example sources/README to remove em dashes and includes CSS updates to improve sidebar alignment and subsection rendering.
Changes:
- Renamed example folders/docs from
NN-nametonameand updated all internal/external references. - Reorganized
docs/examples/index.mdandmkdocs.ymlExamples nav into seven topical sections. - Updated examples README/tests and applied docs/CSS polish (sidebar alignment, subsection guide line, docs homepage Python badge).
Reviewed changes
Copilot reviewed 44 out of 48 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_examples_smoke.py | Updates demo directory names used by the smoke test. |
| src/openarmature/AGENTS.md | Updates example links/paths and example list to new names/order. |
| src/openarmature/_patterns/tool-dispatch-as-node.md | Updates example link to renamed tool-use example. |
| src/openarmature/_patterns/session-as-checkpoint-resume.md | Updates example link to renamed checkpointing example. |
| src/openarmature/_patterns/caller-supplied-trace-identifiers.md | Updates example link to renamed langfuse example. |
| RELEASING.md | Updates the “quickest example” path to renamed hello-world. |
| README.md | Updates example path reference to renamed hello-world. |
| mkdocs.yml | Reworks Examples nav into topical subsections and updates paths. |
| examples/tool-use/main.py | Updates run instructions and replaces em dashes with other punctuation. |
| examples/routing-and-subgraphs/main.py | Updates run instructions and replaces em dashes with other punctuation. |
| examples/README.md | Rewrites examples catalog by topic and updates paths/cross-references. |
| examples/production-observability/main.py | Updates example cross-references and run path. |
| examples/parallel-branches/main.py | Updates cross-references and run path; punctuation sweep. |
| examples/observer-hooks/main.py | Updates run path and punctuation sweep in doc/comments. |
| examples/nested-subgraphs/main.py | Updates run path; replaces em dash in output placeholder. |
| examples/multimodal-prompt/prompts/production/describe-surface.j2 | Adds/updates production prompt template content. |
| examples/multimodal-prompt/prompts/production/describe-equipment.j2 | Adds/updates production prompt template content. |
| examples/multimodal-prompt/prompts_fallback/production/describe-surface.j2 | Adds fallback prompt template content. |
| examples/multimodal-prompt/prompts_fallback/production/describe-equipment.j2 | Adds fallback prompt template content. |
| examples/multimodal-prompt/main.py | Updates run path and punctuation sweep. |
| examples/langfuse-observability/main.py | Updates run path and punctuation sweep. |
| examples/hello-world/main.py | Updates run path and punctuation sweep. |
| examples/fan-out-with-retry/main.py | Updates run path, cross-references, and punctuation sweep. |
| examples/explicit-subgraph-mapping/main.py | Updates run path and punctuation sweep. |
| examples/checkpointing-and-migration/main.py | Updates run path. |
| examples/chat-with-multimodal/main.py | Updates cross-references and run paths. |
| docs/stylesheets/extra.css | Adds sidebar/tab label hiding, subsection alignment tweaks, and guide line styling. |
| docs/patterns/tool-dispatch-as-node.md | Updates example doc link to renamed tool-use page. |
| docs/patterns/session-as-checkpoint-resume.md | Updates example doc link to renamed checkpointing page. |
| docs/patterns/caller-supplied-trace-identifiers.md | Updates example doc link to renamed langfuse page. |
| docs/index.md | Adds Python-version shield matching README. |
| docs/examples/tool-use.md | Removes numeric prefix from H1; updates run path. |
| docs/examples/routing-and-subgraphs.md | Removes numeric prefix from H1; updates run path. |
| docs/examples/production-observability.md | Removes numeric prefix from H1; updates run path and references. |
| docs/examples/parallel-branches.md | Removes numeric prefix from H1; updates run path and wording. |
| docs/examples/observer-hooks.md | Removes numeric prefix from H1; updates run path. |
| docs/examples/nested-subgraphs.md | Removes numeric prefix from H1; updates run path. |
| docs/examples/multimodal-prompt.md | Removes numeric prefix from H1; updates run path. |
| docs/examples/langfuse-observability.md | Removes numeric prefix from H1; updates run path. |
| docs/examples/index.md | Rewrites examples catalog into topic-based groups and updates paths. |
| docs/examples/hello-world.md | Removes numeric prefix from H1; updates run path. |
| docs/examples/fan-out-with-retry.md | Removes numeric prefix from H1; updates run paths. |
| docs/examples/explicit-subgraph-mapping.md | Removes numeric prefix from H1; updates run path and references. |
| docs/examples/checkpointing-and-migration.md | Removes numeric prefix from H1; updates run path. |
| docs/examples/chat-with-multimodal.md | Removes numeric prefix from H1; updates run paths and cross-references. |
| docs/concepts/observability.md | Updates langfuse example link to renamed page. |
| docs/concepts/llms.md | Updates example link targets; some link text still includes numeric prefixes. |
| CHANGELOG.md | Updates changelog entries to renamed examples and new catalog organization. |
Comments suppressed due to low confidence (4)
examples/routing-and-subgraphs/main.py:373
- The
QuestionProjectiondocstring formatting is broken: the second paragraph has inconsistent indentation and a stray standalone;line, which will render poorly and is confusing to readers.
examples/tool-use/main.py:10 - This sentence now uses a semicolon before “so”, which is grammatically incorrect and reads awkwardly in the module docstring.
examples/parallel-branches/main.py:10 - The punctuation here produces an ungrammatical “either); which is …” construction. This should be a comma (or period) rather than a close-paren + semicolon.
examples/observer-hooks/main.py:332 - The bullet list comment has an accidental standalone
;prefix, which reads like a formatting artifact and makes the instruction unclear.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The rename PR's perl sweep keyed on ``examples/NN-name`` paths, which caught directory references but missed three other forms of stale numeric prefix: - Link DISPLAY text in docs/concepts/llms.md (three bullets in the "Where to next" section + one inline reference): the link targets were updated correctly but the text still read ``00 - Hello, world`` / ``07 - Multimodal prompt`` / ``09 - Tool use``. Rewriting to drop the prefix and match the by-name style used elsewhere. - Standalone example-name references in source comments (no ``examples/`` prefix), e.g. ``00-hello-world`` and ``01-routing-and-subgraphs`` in three example main.py files. Stripping the leading digit-digit-dash. Surfaced by CoPilot review on PR #120 (line 338 + 598 + 600 threads), plus a broader git-grep sweep to catch the source- comment cases the threads didn't flag.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Drops the
NN-numeric prefix from all 13 example directories and walk-through docs. Regroups the catalog atdocs/examples/index.mdand the mkdocs nav into seven topical sections (Foundations / Composition / Concurrency / Prompts / Tool use / Reliability / Observability). The numbers were never load-bearing; they implied a strict reading order the catalog never actually needed.Cross-references between examples are rewritten by-name ("the observer-hooks example", "the fan-out-with-retry example"); no more "Example NN" references in docs, walk-throughs, example sources, READMEs, or CHANGELOG. Walk-through H1s drop the prefix; "Run with:" docstring blocks updated to the new paths.
examples/README.mdbrought up to date with the post-v0.11.0 catalog under the same topical grouping (entries for chat-with-multimodal, langfuse-observability, production-observability were missing).tests/test_examples_smoke.py's DEMOS list switches to flat names; pytest parametrize IDs follow automatically.Folds in the em-dash sweep across example source files and
examples/README.mdto match the convention established in the v0.11.0-cycle docs sweep.Includes nav CSS polish for the new nested sub-section groups: hides the redundant tab label inside the sidebar, adds a vertical guide line on sub-sections with children (via
::beforepseudo-element on the level-2 nav, bottom-stopped 5px short of the nav's lower edge), and aligns sub-section labels horizontally across all three tabs (Documentation / Examples / Patterns) by overriding padding on label-form and direct-link-form.md-nav__linkitems to match Documentation's<div class="md-nav__container">layered offset. Also adds a Python-version shield to the docs homepage mirroring the README's shield.Test plan
uv run pytest tests/test_examples_smoke.pygreen (13/13 demos)uv run mkdocs build --strictclean (no broken intra-docs links)uv run ruff check examples/ tests/ docs/cleanuv run pyright examples/cleanexamples/README.mdexamples/NN-namereferences in tracked files (only one historical CHANGELOG entry intentionally left as a record of what shipped under those names)