[AAASM-113] 📝 (docs): SDK adapter authoring guide#126
Conversation
A minimal runnable FrameworkAdapter implementing all four required methods (get_framework_name, get_supported_versions, register_hooks, unregister_hooks) over a self-contained fictional framework. Demonstrates the wrapper-based monkey-patch pattern, idempotent teardown, and a __main__ lifecycle demo. Passes `aasm adapter validate` (7/7). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
New guides/authoring-adapters.md covering prerequisites, quickstart from the template adapter, the FrameworkAdapter four-method interface reference, the duck-typed GovernanceInterceptor contract and conventional event methods, the three hook patterns (callback/wrapper/monkey-patch), testing via the in-tree `aasm adapter validate` contract validator, entry-point publishing (aa-adapter-<framework>), and a PR checklist. Wired into mkdocs nav and the guides index. Grounded in real code: agent_assembly/adapters/base.py, agent_assembly/adapters/registry.py, agent_assembly/cli/adapter_validator.py. Notes that no AdapterTestHarness exists in the current tree. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
🤖 Claude Code — PR reviewTicket: AAASM-113 — F69: SDK adapter authoring guide. Epic AAASM-13. CI — ✅ green
Scope vs. acceptance criteria
2 atomic commits (template adapter + guide). ruff + ruff format + mypy clean on the new file; mkdocs build OK. Re-scope items for the owner
ReadinessReady to merge pending one Pioneer-team approval, with the Recorded as a review note; no formal approval submitted. |
Description
Adds the framework adapter authoring guide and a runnable reference template adapter (JIRA AAASM-113).
docs/guides/authoring-adapters.md— 8-section guide: (1) prerequisites, (2) quickstart from the template, (3)FrameworkAdapterfour-method interface reference, (4) the duck-typedGovernanceInterceptorcontract + conventional event methods, (5) hook patterns (callback / wrapper / monkey-patch with pros/cons), (6) testing via the in-treeaasm adapter validatecontract validator + lifecycle unit tests, (7) entry-point publishing andaa-adapter-<framework>naming, (8) PR checklist. Wired into mkdocs nav and the guides index.examples/adapters/template_adapter.py— minimal, runnableFrameworkAdapterimplementing all four required methods over a self-contained fictional framework. Runs offline with no third-party deps; passesaasm adapter validate7/7.The guide is grounded only in real, importable code:
agent_assembly/adapters/base.py,registry.py, andcli/adapter_validator.py.Type of Change
Breaking Changes
Related Issues
Testing
Validation performed on the changed files:
examples/adapters/template_adapter.pyruns end to end (python examples/adapters/template_adapter.py) and imports cleanly.aasm adapter validate examples/adapters/template_adapter.py→ 7 passed, 0 failed.ruff check+ruff format --check+mypyon the template adapter all clean.mkdocs buildsucceeds with the new page in nav (no link/nav errors).No tests added: this PR is documentation + an illustrative example; the template adapter's
__main__is itself a self-checking lifecycle demo, and the repo's mypy/ruff hooks cover it.Checklist
mypyhook is red on pre-existing errors in untouched files (client/gateway.py,core/assembly.py,types.py, etc.); the changed template adapter is mypy-clean in isolation.🤖 Generated with Claude Code