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 the full ASP.NET Core project structure pattern for a multi-entity application. The task describes 3 entity types and complex validation (overlap checking), which should trigger the controller-based layout. The task does NOT mention DTOs, records, From() methods, service layer, IServiceCollection extensions, typed exceptions, or health checks.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Controllers folder exists",
"description": "A Controllers/ directory exists inside ClinicApi/ containing at least two controller files (e.g., DoctorsController.cs, AppointmentsController.cs).",
"max_score": 8
},
{
"name": "DTOs folder with records",
"description": "A DTOs/ directory exists inside ClinicApi/ containing at least one file that declares a C# record. 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": "Services folder with business logic",
"description": "A Services/ directory exists containing service classes. The overlap-checking logic for appointments lives in a service, NOT in the controller.",
"max_score": 10
},
{
"name": "No business logic in controllers",
"description": "Controller methods do NOT contain overlap-checking queries, date validation, or inline EF Core calls. They delegate to service methods.",
"max_score": 10
},
{
"name": "Typed exception classes",
"description": "An Exceptions/ directory contains typed exception classes (e.g., NotFoundException, ConflictException or TimeSlotUnavailableException). The agent was NOT asked to create typed exceptions.",
"max_score": 8
},
{
"name": "Centralized exception middleware",
"description": "A Middleware/ directory contains exception-handling middleware that catches typed exceptions and returns appropriate HTTP status codes.",
"max_score": 8
},
{
"name": "IServiceCollection extensions",
"description": "An Extensions/ folder (or similar) contains IServiceCollection extension methods for organizing DI registration. The agent was NOT asked about DI organization.",
"max_score": 8
},
{
"name": "appsettings.json not hardcoded",
"description": "An appsettings.json exists with ConnectionStrings section. The connection string is read from config, not hardcoded in Program.cs.",
"max_score": 8
},
{
"name": "Health checks registered",
"description": "Health checks are registered (AddHealthChecks) with a /health endpoint. The agent was NOT asked about health checks.",
"max_score": 8
},
{
"name": "Separate test project",
"description": "A ClinicApi.Tests/ directory exists with its own .csproj file.",
"max_score": 8
}
]
}evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
skills
aspnet-project-structure
verifiers