[AAASM-4336] 📝 (metadata): Generate SDK-version pins across example sub-projects#255
Conversation
Introduces `metadata/sdk-versions.yaml` at the repo root as the single source of truth for the Agent Assembly SDK versions advertised across every example sub-project. Captures the currently-pinned versions (python `0.0.1rc3`, node `0.0.1-rc.3`, go `v0.0.1-rc.3`) plus install-command templates. Consumed by the forthcoming `scripts/generate_example_metadata.py` generator to rewrite manifests and bounded README blocks; CI enforces drift. Refs AAASM-4336. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Add scripts/generate_example_metadata.py — a stdlib-only generator that regenerates SDK-version pins and bounded README install blocks from the SoT at metadata/sdk-versions.yaml. This first landing covers Python: every python/*/pyproject.toml and every scenarios/*/python/pyproject.toml is rewritten via a narrow regex on the agent-assembly==... dependency line, and each corresponding README.md gets a <!-- BEGIN GENERATED: sdk-install --> ... <!-- END GENERATED --> block inserted below the H1 (or replaced in place on subsequent runs). The generator is idempotent — a second invocation reports "No changes" — which is the property CI relies on for drift detection. Node, Go, and scenarios/* support extend this in follow-up commits. Refs AAASM-4336.
Run scripts/generate_example_metadata.py to insert the sdk-install bounded block on every python/*/README.md. Manifest pins already match the SoT so no pyproject.toml files are touched. Every python example now advertises the SDK version and install commands through the generated block; hand-editing the block is caught by the CI drift check (added in a later commit). Refs AAASM-4336.
Add rewrite_node_manifest() and rewrite_go_manifest() plus their walker / processor pairs. The generator now covers all three language groups from a single invocation: * Node: every node/*/package.json that pins @agent-assembly/sdk gets its version literal rewritten line-by-line (JSON key order preserved). Scenario node packages that do not depend on the SDK are skipped. * Go: every go/*/go.mod line matching the go-sdk module gets its version rewritten, whether the pin lives as a bare `require` statement or inside a `require ( ... )` block. The top-level go/README.md also receives the sdk-install block since it advertises a version literal. READMEs get the same bounded <!-- BEGIN GENERATED: sdk-install --> block as the python outputs — flavored per language (pnpm/npm/yarn for node, go get for go). Refs AAASM-4336.
Insert the sdk-install bounded block on every node/*/README.md that depends on @agent-assembly/sdk (6 examples). Manifest pins already match the SoT so no package.json files are touched. Refs AAASM-4336.
Insert the sdk-install bounded block on every go/*/README.md and on the aggregate go/README.md, which advertises a version literal. Manifest pins already match the SoT so no go.mod files are touched. Refs AAASM-4336.
Add .github/workflows/example-metadata-check.yml. On every pull request and push to master that touches an in-scope manifest, README, or the generator itself, the workflow runs the generator and fails if it produces any diff. This is what stops the sweep-caught drift class where a subset of example manifests get bumped but the corresponding READMEs (or vice versa) advertise a stale version literal. Refs AAASM-4336.
Add CONTRIBUTING.md explaining the SoT + generator + CI-check pattern for keeping SDK version pins in sync across the 20+ example sub-projects. Covers how to bump on a release, the bounded README block convention, and what stays outside the generator's scope. Refs AAASM-4336. Closes AAASM-4336.
Claude Code review — AAASM-4336CI status: all 33 required checks green. AC coverage — final
Side-effect summary
FE / rendered-content validation
Notable calls the author made (all defensible)
Verdict: ready to approve and merge. 8 commits, all AC met, content-neutral, drift-check gate now enforced in CI. Once this merges, the recurring "example X pinned to old version" sweep-ticket class should stop surfacing. |
…ocs/examples_shared_metadata # Conflicts: # python/agno-tool-policy/README.md # python/crewai-research-crew/README.md # python/google-adk/README.md # python/haystack-tool-policy/README.md # python/langchain-basic-agent/README.md # python/langgraph/README.md # python/llamaindex-tool-policy/README.md # python/microsoft-agent-framework-tool-policy/README.md # python/openai-agents-sdk/README.md # python/pydantic-ai/README.md # python/smolagents-tool-policy/README.md
|
Merge-conflict resolution — AAASM-4336Rebased against latest Conflict shape11 python READMEs conflicted. All had the same shape:
ResolutionKept the HEAD side's ordering (bounded block + description) and rewrote the OLD URL to the NEW URL inline. This preserves both changes without any information loss. Also applied the same rename to:
Post-merge validation (all green locally + on CI)
New head
|



What changed
Adds a single-source-of-truth SDK version pipeline to this repo. Every
example sub-project used to hand-maintain its Agent Assembly SDK
version in two places (its manifest and its README) and every sweep
caught a subset that had drifted. This PR replaces that with:
metadata/sdk-versions.yaml— the single source of truth forthe Python, Node, and Go SDK version pins and install commands.
scripts/generate_example_metadata.py— a stdlib-only Pythongenerator that rewrites the SDK pin in every in-scope manifest and
inserts a bounded
<!-- BEGIN GENERATED: sdk-install --> ... <!-- END GENERATED -->block into every affected README. Idempotent..github/workflows/example-metadata-check.yml— CI driftcheck that runs the generator and fails on any diff.
CONTRIBUTING.md— maintainer note explaining the patternand the bump policy.
The PR is intentionally content-neutral for pins: the SoT captures the
currently-shipped versions (Python
0.0.1rc3, Node0.0.1-rc.3, Gov0.0.1-rc.3), no examples get bumped. Historical / provenance text(e.g. "written against 0.0.1-rc.3") is untouched, per the sibling
docs-drift epic convention.
Files touched by category
metadata/sdk-versions.yamlscripts/generate_example_metadata.py.github/workflows/example-metadata-check.ymlCONTRIBUTING.mdpython/{agno-tool-policy, crewai-research-crew, custom-tool-policy, google-adk, haystack-tool-policy, langchain-basic-agent, langchain-research-agent, langgraph, llamaindex-tool-policy, microsoft-agent-framework-tool-policy, openai-agents-sdk, pydantic-ai, smolagents-tool-policy}/README.mdnode/{custom-tool-policy, langchain-js-basic-agent, langgraph-js, mastra, openai-node-tool-policy, vercel-ai}/README.mdgo/{basic-agent, cli-runtime-integration, langchaingo, tool-policy}/README.md,go/README.mdNo manifest files are modified in this PR — every existing pin already
matches the SoT.
Notes on the scope decision
operator is
>=(as opposed to==in the top-levelpython/*examples). The regex handles both.
@agent-assembly/sdkare intentionally skipped: they have no SDK version to advertise
and no manifest line to rewrite.
Related ticket
Closes AAASM-4336. See https://lightning-dust-mite.atlassian.net/browse/AAASM-4336.
How to verify
Idempotency (this is what CI enforces):
Language spot-checks (one representative example per language, from the
ticket's acceptance criteria):
All three pass locally.
Checklist
[AAASM-XXXX] <GitEmoji> (<scope>): <summary>.envfiles committedREADME.mdwith prerequisites and run instructions