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

domain-errors-not-http.jsonverifiers/

{
  "instruction": "Services must throw domain-specific errors, and routes must map them to HTTP status codes",
  "relevant_when": "Agent creates services that need error handling across layers",
  "context": "Services should throw domain errors (NotFoundError, ValidationError, BusinessRuleError) rather than HTTP-specific errors. Route handlers catch these domain errors and map them to appropriate HTTP status codes (400, 404, 422, etc). This keeps services reusable from non-HTTP contexts like background jobs and CLI tools.",
  "sources": [
    {
      "type": "file",
      "filename": "skills/separation-of-concerns/SKILL.md",
      "tile": "tessl-labs/separation-of-concerns@0.1.3"
    }
  ],
  "checklist": [
    {
      "name": "domain-error-classes",
      "rule": "Service layer defines or uses domain-specific error classes (e.g., NotFoundError, ValidationError, BusinessRuleError) rather than generic errors with HTTP status codes",
      "relevant_when": "Agent creates service layer functions that can fail"
    },
    {
      "name": "route-maps-errors",
      "rule": "Route handlers catch domain errors and map them to appropriate HTTP status codes, rather than services setting status codes",
      "relevant_when": "Agent creates route handlers that call services which may throw"
    }
  ]
}

tile.json