or run

npx @tessl/cli init
Log in

Version

Files

docs

index.md
tile.json

rubric.jsonevals/scenario-5/

{
  "context": "This evaluation assesses how effectively the engineer uses the json-schema-traverse package to analyze and extract schemas from array keywords (allOf, anyOf, oneOf). The focus is on proper usage of the traverse function, callback parameters, and schema filtering logic specific to array keywords.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Uses traverse function",
      "description": "Uses the traverse function from json-schema-traverse to walk through the schema structure (either as require('json-schema-traverse') or as a default import).",
      "max_score": 15
    },
    {
      "name": "Callback implementation",
      "description": "Provides a callback function to the traverse function using the correct API (either {cb: callback} in options object or as the second parameter).",
      "max_score": 10
    },
    {
      "name": "Uses parentKeyword parameter",
      "description": "Accesses and uses the parentKeyword parameter in the callback to identify when the current schema is within an array keyword (checks if parentKeyword is 'allOf', 'anyOf', or 'oneOf').",
      "max_score": 25
    },
    {
      "name": "Uses keyIndex parameter",
      "description": "Accesses and uses the keyIndex parameter in the callback to determine the index of the schema within the array keyword.",
      "max_score": 15
    },
    {
      "name": "Uses jsonPtr parameter",
      "description": "Accesses and uses the jsonPtr parameter (or parentJsonPtr) in the callback to construct the path to the array keyword location in the schema.",
      "max_score": 15
    },
    {
      "name": "Counts array keywords",
      "description": "Correctly counts occurrences of allOf, anyOf, and oneOf keywords by tracking when parentKeyword matches these values or by detecting when these keywords are encountered in the schema.",
      "max_score": 10
    },
    {
      "name": "Collects schema objects",
      "description": "Collects the actual schema objects that are children of array keywords along with their metadata (keyword type, path, index) by accessing the schema parameter in the callback.",
      "max_score": 10
    }
  ]
}