From 9aea0d3ab34246e20bfc100c812ded22e1182b19 Mon Sep 17 00:00:00 2001 From: cafzal Date: Mon, 8 Jun 2026 10:41:10 -0700 Subject: [PATCH 1/3] Move templates index to root README; enrich and normalize by industry - Restructure root README: replace "Repository layout" with a "Templates" section (per-folder contents list, now including runbook.md) plus a generated, collapsible-by-industry index - generate_version_indexes.py now extracts industry + reasoning_types and writes the index to both the root README (between markers) and each version README, grouped by industry - Normalize industry frontmatter into 8 coarse, mutually-exclusive buckets across all version dirs - Update CONTRIBUTING, pre-commit, and the verify-version-indexes workflow to cover the root README and the new front-matter fields --- .github/workflows/verify-version-indexes.yml | 1 + .pre-commit-config.yaml | 2 +- CONTRIBUTING.md | 6 +- README.md | 130 +++++++++++++- scripts/generate_version_indexes.py | 143 ++++++++++++--- v0.13/README.md | 105 ++++++++--- v0.13/ad_spend_allocation/README.md | 2 +- v0.13/diet/README.md | 2 +- v0.13/hospital_staffing/README.md | 2 +- v0.13/inventory_rebalancing/README.md | 2 +- v0.13/network_flow/README.md | 2 +- v0.13/order_fulfillment/README.md | 2 +- v0.13/portfolio_balancing/README.md | 2 +- v0.13/retail_markdown/README.md | 2 +- v0.13/shift_assignment/README.md | 2 +- v0.13/supplier_reliability/README.md | 2 +- v0.13/supply_chain_transport/README.md | 2 +- v0.13/test_data_generation/README.md | 2 +- v0.13/traveling_salesman/README.md | 2 +- v0.13/vehicle_scheduling/README.md | 2 +- v0.13/water_allocation/README.md | 2 +- v0.14/README.md | 105 ++++++++--- v0.14/ad_spend_allocation/README.md | 2 +- v0.14/diet/README.md | 2 +- v0.14/hospital_staffing/README.md | 2 +- v0.14/inventory_rebalancing/README.md | 2 +- v0.14/network_flow/README.md | 2 +- v0.14/order_fulfillment/README.md | 2 +- v0.14/portfolio_balancing/README.md | 2 +- v0.14/retail_markdown/README.md | 2 +- v0.14/shift_assignment/README.md | 2 +- v0.14/supplier_reliability/README.md | 2 +- v0.14/supply_chain_transport/README.md | 2 +- v0.14/test_data_generation/README.md | 2 +- v0.14/traveling_salesman/README.md | 2 +- v0.14/vehicle_scheduling/README.md | 2 +- v0.14/water_allocation/README.md | 2 +- v1/README.md | 163 ++++++++++++------ v1/ad_spend_allocation/README.md | 2 +- v1/book_slate_recommendation/README.md | 2 +- v1/campaign_roi/README.md | 2 +- v1/cell_tower_coverage/README.md | 2 +- v1/cicd_runner_allocation/README.md | 2 +- v1/commercial_underwriting/README.md | 2 +- v1/datacenter_compute_allocation/README.md | 2 +- v1/demand_forecasting/README.md | 2 +- v1/demand_planning_temporal/README.md | 2 +- v1/diet/README.md | 2 +- v1/disease-outbreak-prevention/README.md | 2 +- v1/financial_index_replication/README.md | 2 +- v1/hospital_staffing/README.md | 2 +- v1/humanitarian-aid-supply-chain/README.md | 2 +- v1/memory_supply_allocation/README.md | 2 +- v1/money_laundering_motif_detection/README.md | 2 +- v1/patient_cohort_recruitment/README.md | 2 +- v1/planogram_optimization/README.md | 2 +- v1/pod_placement/README.md | 2 +- v1/portfolio_balancing/README.md | 2 +- v1/rai-agent-scaffold/README.md | 2 +- v1/retail_markdown/README.md | 2 +- v1/retail_planning/README.md | 2 +- v1/shift_assignment/README.md | 2 +- v1/simple-start/README.md | 2 +- v1/smoker_status_prediction/README.md | 2 +- v1/sprint_scheduling/README.md | 2 +- v1/subscriber_retention/README.md | 2 +- v1/synthetic_eligibility_records/README.md | 2 +- v1/synthetic_order_lifecycle/README.md | 2 +- v1/telco_network_recovery/README.md | 2 +- v1/test_data_generation/README.md | 2 +- v1/traveling_salesman/README.md | 2 +- v1/underwriting_audit/README.md | 2 +- v1/water_allocation/README.md | 2 +- v1/wildlife-conservation-network/README.md | 2 +- 74 files changed, 593 insertions(+), 194 deletions(-) diff --git a/.github/workflows/verify-version-indexes.yml b/.github/workflows/verify-version-indexes.yml index b96b1a46..21256bee 100644 --- a/.github/workflows/verify-version-indexes.yml +++ b/.github/workflows/verify-version-indexes.yml @@ -3,6 +3,7 @@ name: Verify version indexes on: pull_request: paths: + - "README.md" - "v*/**/README.md" - "scripts/generate_version_indexes.py" - "requirements-dev.txt" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2fc2a691..9853a912 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -23,4 +23,4 @@ repos: pass_filenames: false additional_dependencies: - PyYAML==6.0.2 - files: ^(v\d.*/.*/README\.md|scripts/generate_version_indexes\.py)$ + files: ^(README\.md|v\d.*/.*/README\.md|scripts/generate_version_indexes\.py)$ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bf5ceebf..3e5b3457 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -159,11 +159,11 @@ Before opening a PR, make sure you can complete this checklist from a clean envi python scripts/generate_version_indexes.py --check ``` -## Keep version README indexes in sync +## Keep template indexes in sync -Version README files (`v0.13/README.md`, `v0.14/README.md`, `v1/README.md`) are generated from template README metadata, specifically the `description` field in front matter. +The template index is generated from each template README's front matter — the `description`, `industry`, and `reasoning_types` fields. It is written to each version README (`v0.13/README.md`, `v0.14/README.md`, `v1/README.md`) and to the repository root `README.md`, between its `` / `` markers. -If you add a template or update a template description, regenerate the version indexes and commit the resulting README changes. +If you add a template or change a template's `description`, `industry`, or `reasoning_types`, regenerate the indexes and commit the resulting README changes. ```bash python scripts/generate_version_indexes.py diff --git a/README.md b/README.md index 57004130..a288b85b 100644 --- a/README.md +++ b/README.md @@ -4,14 +4,7 @@ This repository contains runnable RelationalAI templates that demonstrate end-to Each template lives in its own folder with code, sample data, and a template-specific README. Templates are grouped into versioned directories so the repository can support multiple generations of examples side by side. -## Repository layout - -| Path | Purpose | -| --- | --- | -| [`sample-template/`](sample-template/) | Starting point for authoring a new template. Includes the expected file layout and README template. | -| [`v0.13/`](v0.13/) | Older templates for version `0.13` of the `relationalai` Python package. Included for reference, only. | -| [`v0.14/`](v0.14/) | Older templates for version `0.14` of the `relationalai` Python package. Included for reference, only. | -| [`v1/`](v1/) | Newer templates for versions `>=1.0` of the `relationalai` Python package. **Use these for new development.** | +## Templates Within a template folder, you will usually find: @@ -19,6 +12,125 @@ Within a template folder, you will usually find: - `pyproject.toml` for template-local dependencies - a main runner such as `