[project]
name = "mille"
root = "."
languages = ["rust"]

[[layers]]
name = "domain"
paths = ["src/domain/**"]
dependency_mode = "opt-out"
allow = []
deny = ["infrastructure", "usecase", "presentation"]
external_mode = "opt-in"
external_allow = ["serde"]

[[layers]]
name = "infrastructure"
paths = ["src/infrastructure/**"]
dependency_mode = "opt-in"
allow = ["domain"]
external_mode = "opt-in"
external_allow = ["serde", "toml", "tree_sitter", "glob"]

[[layers]]
name = "usecase"
paths = ["src/usecase/**"]
dependency_mode = "opt-in"
allow = ["domain"]
external_mode = "opt-in"
external_allow = []

[[layers]]
name = "presentation"
paths = ["src/presentation/**"]
dependency_mode = "opt-in"
allow = ["usecase", "domain"]
external_mode = "opt-in"
external_allow = ["clap"]

[[layers]]
name = "main"
paths = ["src/main.rs"]
dependency_mode = "opt-in"
allow = ["domain", "infrastructure", "usecase", "presentation"]
external_mode = "opt-in"
external_allow = ["clap"]

  [[layers.allow_call_patterns]]
  callee_layer = "usecase"
  allow_methods = ["check"]

  [[layers.allow_call_patterns]]
  callee_layer = "presentation"
  allow_methods = ["parse"]
