[importlinter]
root_package = sigmalint

# Base layering: each layer below may import any layer above its own,
# but not the other way around.
[importlinter:contract:layers]
name = sigmalint layered architecture
type = layers
layers =
    sigmalint.cli
    sigmalint.reporting
    sigmalint.rules
    sigmalint.data
    sigmalint.core

# Reporting works on the canonical JSON shape only — it must not depend on
# rules/, data/, or anything domain-specific.
[importlinter:contract:reporting-core-only]
name = reporting imports core only
type = forbidden
source_modules =
    sigmalint.reporting
forbidden_modules =
    sigmalint.rules
    sigmalint.data

# Only the cli composes rules into the runner. No other layer may pull rules
# in, which would defeat the lazy-registration model.
[importlinter:contract:rules-only-from-cli]
name = rules importable only from cli
type = forbidden
source_modules =
    sigmalint.core
    sigmalint.data
    sigmalint.reporting
forbidden_modules =
    sigmalint.rules
