NestJS patterns -- modules, DI, exception filters, validation pipes, guards, interceptors, testing, config
98
89%
Does it follow best practices?
Impact
100%
1.36xAverage score across 12 eval scenarios
Passed
No known issues
{
"context": "Tests whether the agent properly separates HTTP concerns to the controller and business logic to the service, uses constructor injection exclusively (no new), marks all services with @Injectable(), and avoids injecting HTTP objects into services.",
"type": "weighted_checklist",
"checklist": [
{
"name": "No new in service",
"description": "NotificationsService does NOT instantiate SmsService or EmailService using new — no occurrence of `new SmsService` or `new EmailService` inside the service class",
"max_score": 12
},
{
"name": "Constructor injection in service",
"description": "NotificationsService receives SmsService and EmailService via constructor parameters",
"max_score": 10
},
{
"name": "@Injectable on NotificationsService",
"description": "NotificationsService has the @Injectable() decorator",
"max_score": 8
},
{
"name": "@Injectable on SmsService",
"description": "SmsService has the @Injectable() decorator",
"max_score": 8
},
{
"name": "@Injectable on EmailService",
"description": "EmailService has the @Injectable() decorator",
"max_score": 8
},
{
"name": "Controller delegates to service",
"description": "The controller methods contain no business logic — they call the service and return the result",
"max_score": 10
},
{
"name": "No Request/Response in service",
"description": "NotificationsService does NOT import or use Request, Response, or any HTTP-layer objects from @nestjs/common or express",
"max_score": 12
},
{
"name": "Providers registered in module",
"description": "NotificationsModule's providers array includes NotificationsService, SmsService, and EmailService (or equivalent)",
"max_score": 10
},
{
"name": "Response envelope",
"description": "Controller action(s) wrap their return values in { data: ... }",
"max_score": 10
},
{
"name": "No new in controller",
"description": "NotificationsController does NOT instantiate any service using new",
"max_score": 12
}
]
}evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
skills
nestjs-best-practices
verifiers