Boundary rules in archlens.toml #6

Closed
opened 2026-06-16 14:47:59 +00:00 by GKaszewski · 0 comments
Owner

What to build

Add a [rules] section to archlens.toml where users can define allowed and forbidden dependency directions between modules. The tool checks the generated CodeGraph against these rules and reports violations.

Example config:

[rules]
allow = ["Application --> Domain", "Adapters --> Domain"]
deny = ["Domain --> Adapters", "Domain --> Application"]

Violations are reported as warnings (or errors with --strict).

Acceptance criteria

  • [rules] section parsed from archlens.toml
  • allow and deny rules checked against module-level edges
  • Violations reported to stderr with file/module context
  • --strict makes violations fail with non-zero exit code
  • archlens init scaffolds example rules section
  • Tests for rule checking logic

Blocked by

None - can start immediately

## What to build Add a `[rules]` section to `archlens.toml` where users can define allowed and forbidden dependency directions between modules. The tool checks the generated CodeGraph against these rules and reports violations. Example config: ```toml [rules] allow = ["Application --> Domain", "Adapters --> Domain"] deny = ["Domain --> Adapters", "Domain --> Application"] ``` Violations are reported as warnings (or errors with `--strict`). ## Acceptance criteria - [ ] `[rules]` section parsed from `archlens.toml` - [ ] `allow` and `deny` rules checked against module-level edges - [ ] Violations reported to stderr with file/module context - [ ] `--strict` makes violations fail with non-zero exit code - [ ] `archlens init` scaffolds example rules section - [ ] Tests for rule checking logic ## Blocked by None - can start immediately
GKaszewski added the P3 label 2026-06-17 06:46:17 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: GKaszewski/archlens#6