Libraries and SDKs
Code that others install needs a declared public API, a version check against it in CI, a deprecation policy and a published support matrix.
- Recommended 4
Recommended
Declare the public API and hide the rest
ENG-50State in code which modules, functions and types of a library are public. Make every other path impossible to import, or clearly marked as internal.
Check every release against the public API
ENG-51In CI, compare the public API of each change with the last published release. Fail when a breaking change comes without a major version bump.
Deprecate in a minor release before removing in a major one
ENG-52Publish a deprecation policy. Mark a feature deprecated in a minor release, with a warning at run time and in the docs. Remove it only in a later major release.
Publish a support matrix
ENG-53Publish which runtime versions, platforms and major versions of the library get fixes, and test every supported runtime in CI. Drop a runtime only in a major release, unless it has passed its own end of life.
Read this with
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/engineering/libraries-and-sdks">Agent Wranglers engineering playbook</a>. In code you write, add a comment next to it with the same link.