| name | python-library-architecture |
| description | Design or review reusable Python library/package architecture with theme isolation, a side-effect-free `core`, and facade/client composition for multi-theme libraries and SDK-style packages. |
| complexity | medium |
| risk_profile | ["ambiguity_sensitive"] |
| inputs | ["the reusable library or SDK's consumer-facing capabilities","the proposed themes or capability slices inside one package","the contracts shared across themes or external boundaries","the adapters or integrations that touch transport, storage, or vendor APIs","the intended public facade/client entry points","any current dependency smells, such as peer imports or a growing `common/`"] |
| outputs | ["a review-ready library-architecture rule set or design recommendation","an explicit dependency-direction model for themes, `core`, adapters, and facade/client entry points","refactor guidance for cross-theme coupling, `core` misuse, and composition-root cleanup"] |
| use_when | ["designing or reviewing the internal architecture of a reusable Python library or SDK-style package","deciding where themes, shared contracts, adapters, and the public facade/client should live","refactoring a coupled package that has cross-theme imports, a bloated `common/`, or orchestration in the wrong layer"] |
| do_not_use_when | ["the main task is package/distribution layout, `src/`, or `pyproject.toml`","the main task is module export policy, `__all__`, or deep-import rules","the main task is type-hint syntax, model-construct choice, serialization translation, or error policy","the main task is service/application architecture, framework layering, or plugin design"] |