Enforce strict three-layer architecture: thin HTTP routes, pure service logic with domain errors, isolated data access with dependency injection.
94
93%
Does it follow best practices?
Impact
97%
1.08xAverage score across 5 eval scenarios
Passed
No known issues
{
"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"
}
]
}evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
skills
separation-of-concerns
verifiers