archy_contracts
Validate Python imports after every edit that adds, removes, or alters imports, enforcing architecture contracts like Layers and Forbidden dependencies across package boundaries.
Instructions
Call after any Python edit that adds, removes, or changes an import statement, especially across package boundaries. A failed contract means the new import violates the architecture - revert or restructure before continuing. Runs import-linter contracts (transitive Layers, Forbidden, Independence, Protected, AcyclicSiblings); stricter than archy_check, which only catches direct edges between layers in archy.yaml. Reads .importlinter (or pyproject.toml). Requires pip install archy[contracts].
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| config_path | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| available | Yes | ||
| error | No | ||
| all_kept | No | ||
| kept | No | ||
| broken | No | ||
| module_count | No | ||
| import_count | No | ||
| contracts | No |