[importlinter]
root_package = commissioner
include_external_packages = True

[importlinter:contract:no-application-imports]
name = Commissioner must not import applications
type = forbidden
source_modules = commissioner
forbidden_modules =
    freeweight
    loadcoach
    ideapress
    promptcadence

[importlinter:contract:no-sibling-packages]
name = Commissioner must not import sibling capability packages
type = forbidden
source_modules = commissioner
forbidden_modules =
    modelrack
    sweatmeter
    weightsdb
    mirrorwall
    cutctx
    toolyard
    loadledger

[importlinter:contract:only-the-sql-module-imports-sqlalchemy]
# ADR-0050 §4: `sqlalchemy` is an optional extra so the pure-value core stays installable with
# nothing but baseaicore and setspec. `alembic` has no exemption at all — the host owns every
# migration (ADR-0050 decision 5), so nothing in this package imports it, `commissioner.sql`
# included; it is a `[dev]` dependency for the miniature host only. With
# `include_external_packages = True`, import-linter collapses every external import to the
# top-level package, so `commissioner.sql -> sqlalchemy.**` would match nothing and is not written.
name = Only commissioner.sql may import SQLAlchemy, and nothing may import Alembic
type = forbidden
source_modules = commissioner
forbidden_modules =
    sqlalchemy
    alembic
ignore_imports =
    commissioner.sql -> sqlalchemy
