Skip to content
CAI
Software that uses CAICheck a score

roblaszczak/go-cleanarch

55.3

Adequate · 21 September 2026

443

lines of production code

Go

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a Go-based tool for validating Clean Architecture rules within Go projects. It enforces layering constraints between domain, application, interfaces, and infrastructure layers, while allowing users to customize layer names and exclude specific packages or test files. The tool also provides example code to demonstrate valid and invalid architectural patterns for educational purposes.

Features

Added CLI flags for layer aliases, test/package filtering, and debug mode

Users can now customize the expected layer names via the -domain, -application, -interfaces, and -infrastructure flags, allowing flexible directory structures. The tool also supports the -ignore-tests flag to skip \*\_test.go files and the -ignore-package flag to whitelist specific packages from architecture checks. A -debug flag is available to output detailed logs to stderr.

(repo-wide) · high confidence

Added example code for invalid and valid dependency structures

Added new Go source files in the examples directory to demonstrate architectural patterns. Specifically, the change introduces files illustrating invalid cross-module dependencies (where application layer types are directly imported across modules, violating dependency rules) and a valid simple structure where the application layer correctly depends on the domain layer. These examples serve as educational references for clean architecture principles.

(repo-wide) · high confidence

Added example projects demonstrating valid and invalid architecture patterns

The examples directory now includes several new example projects that illustrate valid and invalid architectural patterns. Valid examples include a simple valid architecture, valid cross-module dependencies, and valid imports inside a module. Invalid examples demonstrate violations such as invalid app-to-domain imports, invalid infrastructure-in-domain imports, and invalid cross-module dependencies. These examples serve as reference implementations for users to understand and apply clean architecture principles.

examples · high confidence

Initial release of the Clean Architecture validator

The cleanarch package introduces a new tool for validating Clean Architecture rules within Go projects. It enforces layering constraints (domain, application, interfaces, infrastructure) and supports configurable layer aliases, allowing users to map custom directory names to standard layers. The validator also provides options to ignore test files and specific packages during validation.

cleanarch · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 51 → 55 (+4.2)
  • Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 99 → 98 (-1.1)
  • Architecture 69 → 69 (+0.0)
  • Maturity 69 → 69 (+0.0)
  • Readiness 24 → 33 (+9.1)
  • Security 99 → 100 (+0.2)
  • Domain Modelling 81 → 81 (+0.0)

Resolved (8)

  • Coverage not included — suite not readable by the collector
  • Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
  • Medium CVE: GO-2021-0142 (go.mod)
  • No exposed public API
  • Test reliability not included
  • The README describes Clean Architecture benefits but does not state how to install or run the tool (e.g. go get + ./bin/...). (README.md)
  • early-stage repository — too few commits for a meaningful bus factor
  • early-stage repository — too little history to judge knowledge freshness

New (8)

  • Documentation: no contributor guidance (README.md)
  • Documentation: no installation or build instructions (README.md)
  • Documentation: no usage examples (README.md)
  • Medium CVE: GO-2021-0142 (go.mod)
  • No ADRs found
  • TodoComment (cleanarch/cleanarch.go)
  • TodoComment (cleanarch/cleanarch.go)
  • TodoComment (examples/valid-cross-module-deps/cms/content/usecases/add_article.go)

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

roblaszczak/go-cleanarch was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 21 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 03b96056c4c9ff2a739629f1e39f32715d3f9e65 — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-fa71c66cabd8.