Skip to content
CAI
Software that uses CAICheck a score

swaggest/usecase

62.4

Adequate · 8 November 2026

688

lines of production code

Go

primary language

7

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a Go library that provides a structured framework for implementing use cases with middleware support and standardized error handling. It offers a generic, type-safe API for orchestrating business logic, along with a status package that implements gRPC-style canonical codes for consistent error wrapping and inspection. The project is initialized as a Go module with dependencies for development and testing.

Features

Introduce canonical status codes and error wrapping

Added a new \status\ package that defines a set of canonical status codes (such as OK, NotFound, AlreadyExists) following gRPC conventions. The package provides a \Wrap\ function to attach a status code to an existing error, enabling structured error handling. It also supports attaching a textual description to a status code via \WithDescription\. The implementation includes an \Is\ method on the status code to support \errors.Is\ checks, allowing callers to test for specific status conditions in their error handling logic.

status · high confidence

Introduce use case interactor with middleware, error handling, and generic support

Adds a new use case interactor that orchestrates business logic with support for input/output ports, metadata (title, description, tags, deprecation), and structured errors. The change introduces a classic API via \NewIOI\ and a type-safe generic API (\NewInteractor\) for Go 1.18+. It also adds a middleware system (\Wrap\) to decorate interactors, including an \ErrorCatcher\ middleware to collect errors, and provides output handling structures for streaming and no-content states.

(repo-wide) · high confidence

Dependencies

Initial Go module setup with test and dev dependencies

The project has been initialized as a Go module (github.com/swaggest/usecase) targeting Go 1.18. This adds the go.mod and go.sum files, establishing the project's dependency graph. The dependencies include github.com/bool64/dev v0.2.32 for development utilities and github.com/stretchr/testify v1.8.0 for testing, along with their respective indirect dependencies.

(dependencies) · high confidence

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

How this codebase got here

Score

  • CAI 66 → 62 (-3.7)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.

Lenses

  • Code Health 100 → 100 (+0.0)
  • Architecture 69 → 69 (+0.0)
  • Maturity 62 → 62 (+0.0)
  • Readiness 65 → 65 (+0.0)
  • Security 71 → 57 (-13.9)

Findings

  • No change — the same findings as the prior survey.

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

Survey your own repository

swaggest/usecase 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 8 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 90e267b09e101189bf5dba73049c7055a0babd28 — the exact code this score is about.
  • Scored under rubric-2026.11.2 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.3+preprod-45ab2cab63de.