Skip to content

Rename examples and reorder catalog by topic#120

Merged
chris-colinsky merged 4 commits into
mainfrom
refactor/examples-flat-names-topical-catalog
Jun 2, 2026
Merged

Rename examples and reorder catalog by topic#120
chris-colinsky merged 4 commits into
mainfrom
refactor/examples-flat-names-topical-catalog

Conversation

@chris-colinsky

Copy link
Copy Markdown
Member

Summary

Drops the NN- numeric prefix from all 13 example directories and walk-through docs. Regroups 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, or 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, 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.

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 ::before pseudo-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__link items 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.py green (13/13 demos)
  • uv run mkdocs build --strict clean (no broken intra-docs links)
  • uv run ruff check examples/ tests/ docs/ clean
  • uv run pyright examples/ clean
  • Zero em dashes in example sources and examples/README.md
  • No stale examples/NN-name references in tracked files (only one historical CHANGELOG entry intentionally left as a record of what shipped under those names)
  • Nav sidebar visually verified across Documentation / Examples / Patterns tabs via headless Chromium captures, with all sub-section / top-level page text aligned at the same X column

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.
Copilot AI review requested due to automatic review settings June 2, 2026 15:05

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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-name to name and updated all internal/external references.
  • Reorganized docs/examples/index.md and mkdocs.yml Examples 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 QuestionProjection docstring 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.

Comment thread docs/concepts/llms.md Outdated
Comment thread docs/concepts/llms.md Outdated
Comment thread docs/concepts/llms.md Outdated
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.
@chris-colinsky chris-colinsky merged commit d16a08e into main Jun 2, 2026
6 checks passed
@chris-colinsky chris-colinsky deleted the refactor/examples-flat-names-topical-catalog branch June 2, 2026 15:56
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