Skip to content

Add an indexed examples/README.md grouping the 30+ example scripts by workflow #409

@dgenio

Description

@dgenio

Summary

Add an examples/README.md that indexes and categorizes the example scripts (linear/DAG basics, caching/checkpointing, MCP, integrations, coding-agent, cost/observability, export) with one-line descriptions and the command to run each, so newcomers can find the right starting point.

Why this matters

The examples/ directory holds 30+ scripts flat at the root with no index, so a newcomer cannot tell simple_linear_flow.py from skdr_policy_eval_flow.py without opening each. A short categorized index is the lowest-cost onboarding improvement and complements the existing cookbook docs by pointing from the repo (where contributors land) to runnable code.

Current evidence

  • examples/ contains 30+ files (simple_linear_flow.py, etl_flow.py, caching.py, checkpoint_resume.py, mcp_*, coding_agent_*, export_openai_anthropic.py, otel_export.py, …) plus cookbook/, integrations/, release_readiness_flow/, weaver_stack_golden_path/ subdirs — and no examples/README.md.
  • docs/cookbook/ mirrors several examples but the repo-side examples/ has no map back to docs.
  • The notebook CI lane (nbmake) and example-running already exist, so examples are maintained — they just lack discoverability.

External context

A categorized examples index is a near-universal convention in mature Python libraries' examples/ directories.

Proposed implementation

  1. Author examples/README.md with sections (Basics, DAG & branching, Caching/Checkpointing, MCP, Integrations, Coding-agent, Cost & observability, Export, Weaver Stack) listing each script with a one-line purpose and run command.
  2. Link each entry to its cookbook page where one exists.
  3. Add a CI check (extend the existing examples lane) that fails if a .py in examples/ root is missing from the index — keeping it from going stale.

AI-agent execution notes

Inspect examples/ (full listing), docs/cookbook/index.md for category language to reuse, the examples/notebook CI lane in .github/workflows/ci.yml. Keep descriptions factual and runnable; verify each listed command actually runs (the CI lane already runs many). The staleness check should enumerate examples/*.py and assert membership in the index.

Acceptance criteria

  • examples/README.md lists every root-level example with a one-line description and run command.
  • A CI check fails when a new root example is not indexed.
  • Entries link to cookbook pages where they exist.

Test plan

A small test/script (under scripts/ or the examples lane) asserting index completeness; manual render check on GitHub.

Documentation plan

examples/README.md (new), link from top-level README Quick Start/examples mention and from docs/cookbook/index.md.

Migration and compatibility notes

Not expected to require migration.

Risks and tradeoffs

Index can drift from reality — mitigated by the completeness check. Minimal maintenance cost.

Suggested labels

documentation, contributor-experience, good-first-ai-issue

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions