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 json-schema-traverse to implement schema collection and filtering functionality. The focus is on proper usage of the traverse function with callbacks to visit and process schema objects.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Import traverse function",
"description": "Correctly imports the traverse function from json-schema-traverse package (e.g., `const traverse = require('json-schema-traverse')` or equivalent)",
"max_score": 10
},
{
"name": "Basic traverse invocation",
"description": "Uses traverse function with proper syntax in collectSchemas function, passing schema and options object with cb property (e.g., `traverse(schema, {cb: callback})`)",
"max_score": 25
},
{
"name": "Callback implementation",
"description": "Implements callback function that correctly receives and uses schema object parameter to collect schemas (e.g., `(sch) => schemas.push(sch)`)",
"max_score": 20
},
{
"name": "Schema collection pattern",
"description": "Uses appropriate pattern to collect all visited schemas into an array, initializing array and returning it after traversal completes",
"max_score": 15
},
{
"name": "Type filtering callback",
"description": "In collectSchemasByType, implements callback that checks schema.type property and conditionally collects matching schemas (e.g., `if (sch.type === typeFilter)`)",
"max_score": 20
},
{
"name": "Consistent traverse usage",
"description": "Uses traverse function consistently in both collectSchemas and collectSchemasByType functions rather than implementing custom traversal logic",
"max_score": 10
}
]
}