[AAASM-4513] ✨ (docs): Per-framework tabs in quick-start - #242
Conversation
The vendored quick-start snippets are verbatim, partial governance slices; some end on a bodyless `try:`/`with … as ctx:` that is a valid doc excerpt but not a standalone module. Formatting or parsing them would rewrite the vendored copy and break the drift check, so exclude the dir from all hooks. Refs AAASM-4513 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rk7iwwAuGv6HbwK8hY8Fbr
The python slice of the manifest produced by the examples repo's scripts/extract_snippets.py (AAASM-4512, PR examples#267) plus a README documenting the vendoring contract. The manifest's `frameworks` array (listed order) is the single source of truth for which tabs the generator emits; the per-framework .py slices land in the following commits. Refs AAASM-4513 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rk7iwwAuGv6HbwK8hY8Fbr
Vendored verbatim `quickstart` region slice from the examples repo's python/agno-tool-policy entrypoint (AAASM-4512) — init_assembly() plus that framework's governance wiring. Partial by design (cut at the region boundary), which is why the dir is hook-excluded and drift-gated rather than linted. Refs AAASM-4513 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rk7iwwAuGv6HbwK8hY8Fbr
Vendored verbatim `quickstart` region slice from the examples repo's python/autogen-tool-policy entrypoint (AAASM-4512) — init_assembly() plus that framework's governance wiring. Partial by design (cut at the region boundary), which is why the dir is hook-excluded and drift-gated rather than linted. Refs AAASM-4513 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rk7iwwAuGv6HbwK8hY8Fbr
Vendored verbatim `quickstart` region slice from the examples repo's python/crewai-research-crew entrypoint (AAASM-4512) — init_assembly() plus that framework's governance wiring. Partial by design (cut at the region boundary), which is why the dir is hook-excluded and drift-gated rather than linted. Refs AAASM-4513 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rk7iwwAuGv6HbwK8hY8Fbr
Vendored verbatim `quickstart` region slice from the examples repo's python/custom-tool-policy entrypoint (AAASM-4512) — init_assembly() plus that framework's governance wiring. Partial by design (cut at the region boundary), which is why the dir is hook-excluded and drift-gated rather than linted. Refs AAASM-4513 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rk7iwwAuGv6HbwK8hY8Fbr
Vendored verbatim `quickstart` region slice from the examples repo's python/google-adk entrypoint (AAASM-4512) — init_assembly() plus that framework's governance wiring. Partial by design (cut at the region boundary), which is why the dir is hook-excluded and drift-gated rather than linted. Refs AAASM-4513 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rk7iwwAuGv6HbwK8hY8Fbr
Vendored verbatim `quickstart` region slice from the examples repo's python/haystack-tool-policy entrypoint (AAASM-4512) — init_assembly() plus that framework's governance wiring. Partial by design (cut at the region boundary), which is why the dir is hook-excluded and drift-gated rather than linted. Refs AAASM-4513 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rk7iwwAuGv6HbwK8hY8Fbr
Vendored verbatim `quickstart` region slice from the examples repo's python/langchain-basic-agent entrypoint (AAASM-4512) — init_assembly() plus that framework's governance wiring. Partial by design (cut at the region boundary), which is why the dir is hook-excluded and drift-gated rather than linted. Refs AAASM-4513 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rk7iwwAuGv6HbwK8hY8Fbr
Vendored verbatim `quickstart` region slice from the examples repo's python/langchain-research-agent entrypoint (AAASM-4512) — init_assembly() plus that framework's governance wiring. Partial by design (cut at the region boundary), which is why the dir is hook-excluded and drift-gated rather than linted. Refs AAASM-4513 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rk7iwwAuGv6HbwK8hY8Fbr
Vendored verbatim `quickstart` region slice from the examples repo's python/langgraph entrypoint (AAASM-4512) — init_assembly() plus that framework's governance wiring. Partial by design (cut at the region boundary), which is why the dir is hook-excluded and drift-gated rather than linted. Refs AAASM-4513 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rk7iwwAuGv6HbwK8hY8Fbr
Vendored verbatim `quickstart` region slice from the examples repo's python/llamaindex-tool-policy entrypoint (AAASM-4512) — init_assembly() plus that framework's governance wiring. Partial by design (cut at the region boundary), which is why the dir is hook-excluded and drift-gated rather than linted. Refs AAASM-4513 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rk7iwwAuGv6HbwK8hY8Fbr
Vendored verbatim `quickstart` region slice from the examples repo's python/microsoft-agent-framework-tool-policy entrypoint (AAASM-4512) — init_assembly() plus that framework's governance wiring. Partial by design (cut at the region boundary), which is why the dir is hook-excluded and drift-gated rather than linted. Refs AAASM-4513 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rk7iwwAuGv6HbwK8hY8Fbr
Vendored verbatim `quickstart` region slice from the examples repo's python/openai-agents-sdk entrypoint (AAASM-4512) — init_assembly() plus that framework's governance wiring. Partial by design (cut at the region boundary), which is why the dir is hook-excluded and drift-gated rather than linted. Refs AAASM-4513 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rk7iwwAuGv6HbwK8hY8Fbr
Vendored verbatim `quickstart` region slice from the examples repo's python/pydantic-ai entrypoint (AAASM-4512) — init_assembly() plus that framework's governance wiring. Partial by design (cut at the region boundary), which is why the dir is hook-excluded and drift-gated rather than linted. Refs AAASM-4513 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rk7iwwAuGv6HbwK8hY8Fbr
Vendored verbatim `quickstart` region slice from the examples repo's python/semantic-kernel-tool-policy entrypoint (AAASM-4512) — init_assembly() plus that framework's governance wiring. Partial by design (cut at the region boundary), which is why the dir is hook-excluded and drift-gated rather than linted. Refs AAASM-4513 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rk7iwwAuGv6HbwK8hY8Fbr
Vendored verbatim `quickstart` region slice from the examples repo's python/smolagents-tool-policy entrypoint (AAASM-4512) — init_assembly() plus that framework's governance wiring. Partial by design (cut at the region boundary), which is why the dir is hook-excluded and drift-gated rather than linted. Refs AAASM-4513 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rk7iwwAuGv6HbwK8hY8Fbr
Vendored verbatim `quickstart` region slice from the examples repo's python/strands-agents-tool-policy entrypoint (AAASM-4512) — init_assembly() plus that framework's governance wiring. Partial by design (cut at the region boundary), which is why the dir is hook-excluded and drift-gated rather than linted. Refs AAASM-4513 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rk7iwwAuGv6HbwK8hY8Fbr
Turns the vendored quickstart_snippets/ (manifest + per-framework .py slices) into the pymdownx.tabbed block inside a bounded BEGIN/END GENERATED region of docs/quick-start.md. Data-driven from manifest.json's frameworks array in listed order, stdlib-only, and idempotent so a CI drift check can re-run it and diff. A `--check` mode fails without writing when the doc is stale. Refs AAASM-4513 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rk7iwwAuGv6HbwK8hY8Fbr
Replace the hard-coded LangChain snippet in "Govern your first agent" with a pymdownx.tabbed block — one tab per supported Python framework (16 tabs, both LangChain variants labelled distinctly), each showing that framework's real governance-wiring slice. The tab block is generated by scripts/generate_quickstart_tabs.py; the surrounding prose is generalised from LangChain-specific wording to framework-agnostic guidance and points at the runnable examples for the full scripts. Refs AAASM-4513 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rk7iwwAuGv6HbwK8hY8Fbr
Re-runs scripts/generate_quickstart_tabs.py on PRs touching the snippets, generator, or quick-start.md and fails on any diff, so the generated tab block can never drift from the vendored snippets + manifest. Mirrors the examples repo's example-metadata-check gate. Refs AAASM-4513 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rk7iwwAuGv6HbwK8hY8Fbr
FE-rendered verification for AAASM-4513: built the MkDocs site locally (mkdocs build --strict) and drove the rendered §3 tab set with headless chromium (Playwright). Captures the 16-tab strip plus the active panels for LangChain, Pydantic AI, CrewAI, and Custom, each showing that framework's governance snippet. Refs AAASM-4513 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rk7iwwAuGv6HbwK8hY8Fbr
f328e3c to
097185b
Compare
Review + restructure — Claude CodeReviewed, restructured into fine-grained commits, FE-validated, and force-pushed ( 4-point verdict
Front-End validation (Playwright, headless chromium)Built the site locally and drove the rendered
Commit re-split (one commit per framework)Re-split the original 5 commits into 22 atomic, bisectable, gitmoji commits:
Bot-comment disposition (github-code-quality)All 10 inline findings target vendored, verbatim
The correct place for any real cleanup is the upstream extractor ( Overall: ✅ APPROVEDocs-only + tooling, drift-gated, FE-verified, CI green. Ready to merge (≥1 Pioneer approval still required per repo policy). — Claude Code |
Description
Convert the Python SDK quick-start §3 "Govern your first agent" from a single hard-coded LangChain snippet into a
pymdownx.tabbedblock with one tab per supported Python framework (16 tabs), so a developer on any framework can copy a working governed-agent example immediately.scripts/generate_quickstart_tabs.pywrites the tab block into a bounded<!-- BEGIN/END GENERATED: quickstart-framework-tabs -->region ofdocs/quick-start.mdfromquickstart_snippets/manifest.json+ the per-framework.pyslices. Tab list = the manifest'sframeworksarray in listed order; both LangChain variants are labelled distinctly ("LangChain" / "LangChain (Research Agent)").quickstart_snippets/is a committed copy of the 16 Python "govern" slices produced by the examples repo'sscripts/extract_snippets.py(AAASM-4512). We vendor rather than fetch becauseexamplesis a separate repo and the MkDocs build must stay hermetic. A new CI workflow (quickstart-tabs-check.yml) re-runs the generator and fails on any diff, mirroring the examples repo'sexample-metadata-checkgate.Type of Change
Breaking Changes
Related Issues
ai-agent-assembly/examples#267(source of the vendored snippets + manifest).Testing
Validated locally:
mkdocs build --strictexits 0; the builtsite/quick-start/index.htmlcontains the 16-tab set (data-tabs="2:16") with all 16 framework labels.--checkand the CI-styleregenerate + git diffboth catch a deliberately desynced snippet and pass again after restore.Checklist