Skip to content
CAI
Software that uses CAICheck a score

mstrYoda/go-arctest

55.5

Adequate · 21 September 2026

931

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 library for validating layered architecture and dependency rules within codebases. It provides tools to parse package structures, define architectural layers, and enforce dependency constraints between them. The system includes an example project that demonstrates user management and logging, while also serving as a test case for architectural violations. Additionally, it offers comprehensive test coverage for validating architecture, dependencies, and interface implementations.

Features

Add example project with user management and logging

Added an example project in the examples/example\_project directory that demonstrates a complete user management system. This includes domain models (User, Logger interface, UserRepositoryInterface), application services (UserService with user creation and retrieval), infrastructure (in-memory UserRepository), presentation layer (HTTP handlers for user endpoints), and utility components (Logger implementation). The example also includes a deliberate architectural violation where the domain layer imports the utils package, serving as a test case for architecture validation.

_examples/example\project · medium confidence

Behavioural changes

Enhanced package parsing and dependency checking for layered architecture

The \ParsePackage\ function now recursively processes subdirectories to include subpackages in the architecture model, ensuring that nested Go packages are correctly identified. Dependency checking logic was updated to skip standard library imports that lack dots or slashes, and layer pattern matching was improved to support subpackages by modifying regex patterns to match both exact package paths and their subpackages. Additionally, the \LayeredArchitecture\ was refactored to store a reference to the main \Architecture\ and layers, simplifying the \Check\ method by removing the need to pass the architecture explicitly.

pkg · medium confidence

Test coverage

Added example tests for architecture validation

Added example tests in the \examples\ directory that demonstrate how to use the \arctest\ library to validate layered architecture, dependency rules, interface implementations, and method parameters. The new test files (\architecture\_test.go\, \dependency\_violation\_test.go\, \interface\_parameter\_violation\_test.go\, \layer\_dependency\_test.go\, \layer\_specific\_rules\_test.go\, and \nested\_packages\_test.go\) provide concrete examples of how to define layers, set up dependency rules, and check for architectural violations in a Go project.

examples · 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 49 → 56 (+6.2)
  • Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 71 → 81 (+10.3)
  • Architecture 69 → 69 (+0.0)
  • Maturity 69 → 68 (-0.4)
  • Readiness 24 → 36 (+11.7)
  • Security 99 → 100 (+0.2)

Resolved (11)

  • Coverage not included — suite not readable by the collector
  • Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
  • Duplicated block (11 lines × 2) (pkg/arctest/dependencies.go)
  • Medium CVE: GO-2024-2598 (go.mod)
  • No exposed public API
  • Test reliability not included
  • The Usage section clips mid-sentence ('valid, violations := arch.ValidateDependenciesWithRules') before covering checking interface implementations and parameter-type-violation rules. (README.md)
  • early-stage repository — too little history to judge knowledge freshness
  • git history depth insufficient
  • git history depth insufficient
  • single-maintainer — knowledge-concentration (bus factor) risk

New (4)

  • Documentation: no architecture or design documentation (README.md)
  • Duplicated block (10 lines × 2) (pkg/arctest/dependencies.go)
  • Hotspot: pkg/arctest/dependencies.go (pkg/arctest/dependencies.go)
  • Medium CVE: GO-2024-2598 (go.mod)

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

Survey your own repository

mstrYoda/go-arctest 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 ff9fe79f31d7e397585bd0c747f4fd1e63320981 — 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.