docs
evals
scenario-1
scenario-10
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
{
"context": "This criteria evaluates how well the engineer uses koa-route's automatic HEAD request handling feature for GET routes. The focus is on whether the engineer understands that defining a GET route automatically supports HEAD requests without additional configuration.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Uses route.get()",
"description": "Uses the route.get() method from koa-route to define the resource route at '/api/resources/:id'",
"max_score": 30
},
{
"name": "Single route definition",
"description": "Defines only a single GET route for '/api/resources/:id' without creating a separate HEAD route, demonstrating understanding that GET routes automatically handle HEAD requests in koa-route",
"max_score": 40
},
{
"name": "Parameter extraction",
"description": "Correctly extracts the :id parameter using koa-route's parameter extraction feature (the id parameter is passed as an argument to the handler function)",
"max_score": 15
},
{
"name": "Proper middleware usage",
"description": "Registers the koa-route middleware with app.use() and properly implements the route handler function signature with (ctx, id) or (ctx, id, next) parameters",
"max_score": 15
}
]
}