[importlinter]
root_package = cleveragents
include_external_packages = True

[importlinter:contract:cli-no-application-direct]
name = CLI must not import Application services directly
type = forbidden
source_modules =
    cleveragents.cli
forbidden_modules =
    cleveragents.application.services
ignore_imports =
    cleveragents.cli.commands.plan -> cleveragents.application.services.plan_apply_service
    cleveragents.cli.commands.plan -> cleveragents.application.services.plan_lifecycle_service
    cleveragents.cli.commands.plan -> cleveragents.application.services.plan_service
    cleveragents.cli.commands.plan -> cleveragents.application.services.project_service
    cleveragents.cli.commands.plan -> cleveragents.application.services.execute_phase_context_assembler
    cleveragents.cli.commands.plan -> cleveragents.application.services.llm_actors
    cleveragents.cli.commands.plan -> cleveragents.application.services.plan_executor
    cleveragents.cli.commands.plan -> cleveragents.application.services.strategy_actor
    cleveragents.cli.commands.plan -> cleveragents.application.services.plan_preflight_guardrail
    cleveragents.cli.commands.plan -> cleveragents.application.services.plan_resume_service
    cleveragents.cli.commands.plan -> cleveragents.application.services.decision_service
    cleveragents.cli.commands.plan -> cleveragents.application.container
    cleveragents.cli.commands.context -> cleveragents.application.services.context_service
    cleveragents.cli.commands.context -> cleveragents.application.services.project_service
    cleveragents.cli.commands.context -> cleveragents.application.container
    cleveragents.cli.commands.resource -> cleveragents.application.services.resource_registry_service
    cleveragents.cli.commands.resource -> cleveragents.application.container
    cleveragents.cli.commands.skill -> cleveragents.application.services.skill_service
    cleveragents.cli.commands.skill -> cleveragents.application.services.config_service
    cleveragents.cli.commands.skill -> cleveragents.application.container
    cleveragents.cli.commands.invariant -> cleveragents.application.services.invariant_service

[importlinter:contract:application-no-presentation]
name = Application layer must not import from Presentation (CLI) layer
type = forbidden
source_modules =
    cleveragents.application
forbidden_modules =
    cleveragents.cli
