archy_contracts
Call after any Python edit that adds, removes, or changes an import statement to enforce architecture contracts like Layers, Forbidden, and AcyclicSiblings via import-linter.
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 |