CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl-labs/separation-of-concerns

Enforce strict three-layer architecture: thin HTTP routes, pure service logic with domain errors, isolated data access with dependency injection.

94

1.08x
Quality

93%

Does it follow best practices?

Impact

97%

1.08x

Average score across 5 eval scenarios

SecuritybySnyk

Passed

No known issues

Overview
Quality
Evals
Security
Files

Evaluation results

95%

6%

Order Management API — Error Handling

Error boundary mapping

Criteria
Without context
With context

Domain error file

100%

100%

Framework-agnostic errors

100%

100%

Service throws typed errors

100%

100%

No HTTP in service

100%

100%

No status codes in service

100%

100%

Route maps domain errors

70%

100%

Route re-throws unexpected

0%

100%

Route uses plain data

100%

100%

No SQL in service

100%

100%

Repo handles null

100%

50%

Plan describes flow

100%

100%

100%

9%

Notification Service — Unit Test Setup

Dependency injection for testability

Criteria
Without context
With context

Factory/constructor injection

100%

100%

Dependencies typed as interfaces

100%

100%

Tests use injected mocks

100%

100%

No direct imports in service

100%

100%

Wiring shows real deps

100%

100%

No HTTP in service

100%

100%

Routes pass plain data

100%

100%

Service throws domain errors

50%

100%

Routes map errors to HTTP

37%

100%

No SQL in service

100%

100%

Tests are self-contained

100%

100%

100%

4%

Healthcare Platform — API Restructure

Focused services and file structure

Criteria
Without context
With context

No god service

100%

100%

Focused services per domain

100%

100%

Correct services/ directory

100%

100%

Correct repositories/ directory

100%

100%

Correct routes/ directory

100%

100%

Domain errors file

100%

100%

No SQL in services

70%

100%

No HTTP errors in services

100%

100%

No HTTP imports in services

100%

100%

Routes handle HTTP mapping

100%

100%

Telehealth service present

100%

100%

Restructure plan accurate

100%

100%

Side effects in services

87%

100%

96%

10%

Library Catalog API

Criteria
Without context
With context

Repository file exists

100%

100%

No SQL in service

100%

100%

No SQL in routes

100%

100%

Repo returns null for missing

100%

100%

Service decides on null

100%

100%

Repo maps to domain type

50%

60%

No business logic in repo

70%

100%

Routes pass plain data

100%

100%

No HTTP in service

100%

100%

Route re-throws unexpected errors

25%

100%

Types separated

100%

100%

Architecture notes layers

100%

100%

98%

11%

User Registration Flow

Criteria
Without context
With context

Shape validation in route

50%

80%

Business rules in service

100%

100%

No business logic in route

100%

100%

Side effects in service

100%

100%

No side effects in route

100%

100%

Service throws typed errors

100%

100%

Route maps errors to HTTP

100%

100%

Route re-throws unexpected errors

0%

100%

Separate repository module

100%

100%

No HTTP in service

100%

100%

Side effects notes accurate

100%

100%

Route passes plain data

100%

100%

Evaluated
Agent
Claude Code
Model
Claude Sonnet 4.6

Table of Contents