ASP.NET Core project structure — minimal APIs vs controllers, layer
95
93%
Does it follow best practices?
Impact
100%
2.50xAverage score across 5 eval scenarios
Passed
No known issues
{
"context": "Tests whether the agent proactively applies ASP.NET Core project structure best practices when building an e-commerce API. The task describes business features without mentioning DTOs, records, From() factories, service layer separation, IServiceCollection extensions, IOptions, health checks, or environment-specific config. The agent should apply these patterns on its own.",
"type": "weighted_checklist",
"checklist": [
{
"name": "DTOs folder with records",
"description": "A DTOs/ directory exists inside ECommerceApi/ containing at least one file that declares a C# record (uses 'record' keyword, not 'class'). The agent was NOT asked to use DTOs or records.",
"max_score": 12
},
{
"name": "DTO From() factory method",
"description": "At least one response DTO record includes a static From() method that maps from a model/entity type. The agent was NOT asked for factory methods.",
"max_score": 12
},
{
"name": "Models vs DTOs separation",
"description": "Model files (in Models/) use 'class' keyword with database-style properties (Id, navigation properties); DTO files (in DTOs/) use 'record' keyword and represent API shapes. They are NOT the same types.",
"max_score": 10
},
{
"name": "Services folder with interfaces",
"description": "A Services/ directory exists containing service classes AND their corresponding interfaces (e.g., IOrderService and OrderService). Controllers delegate to these services.",
"max_score": 10
},
{
"name": "No business logic in controllers",
"description": "Controller action methods do NOT contain inline EF Core queries, business validation, or data transformation. They delegate entirely to service methods.",
"max_score": 10
},
{
"name": "IServiceCollection extension methods",
"description": "An Extensions/ folder (or similar) exists with a static class containing IServiceCollection extension methods that organize DI registration, rather than putting all registrations inline in Program.cs. The agent was NOT asked about DI organization.",
"max_score": 8
},
{
"name": "Typed exceptions with middleware",
"description": "An Exceptions/ folder contains typed exception classes (e.g., NotFoundException) and a Middleware/ folder contains centralized exception-handling middleware. The agent was NOT asked to use typed exceptions or middleware.",
"max_score": 8
},
{
"name": "appsettings.json with ConnectionStrings",
"description": "An appsettings.json file exists with a ConnectionStrings section. Program.cs reads the connection string from configuration, not hardcoded.",
"max_score": 8
},
{
"name": "appsettings.Development.json exists",
"description": "An appsettings.Development.json file exists with environment-specific overrides. The agent was NOT asked for environment-specific config files.",
"max_score": 6
},
{
"name": "Health checks registered",
"description": "The application registers health checks (AddHealthChecks) and maps a /health endpoint. The agent was NOT asked about health checks.",
"max_score": 8
},
{
"name": "Separate test project",
"description": "An ECommerceApi.Tests/ directory exists at the same level as ECommerceApi/ with its own .csproj file.",
"max_score": 8
}
]
}evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
skills
aspnet-project-structure
verifiers