or run

npx @tessl/cli init
Log in

Version

Files

tile.json

rubric.jsonevals/scenario-6/

{
  "context": "This criteria evaluates how well the engineer uses the cli package's line-by-line file input processing capability to build a log file analyzer. The focus is on proper usage of cli.withInput() for memory-efficient streaming, along with appropriate argument parsing and output methods.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Uses cli.withInput()",
      "description": "The solution correctly uses cli.withInput() method to process the file line-by-line rather than reading the entire file into memory at once (e.g., not using fs.readFileSync or fs.readFile without streaming).",
      "max_score": 40
    },
    {
      "name": "Proper callback signature",
      "description": "The callback function passed to cli.withInput() correctly handles the parameters (line, separator, eof) and processes each line as it's received.",
      "max_score": 20
    },
    {
      "name": "Handles EOF correctly",
      "description": "The solution properly detects end-of-file using the eof parameter and outputs the final statistics only after all lines have been processed.",
      "max_score": 15
    },
    {
      "name": "Uses cli.parse()",
      "description": "The solution uses cli.parse() to handle command-line argument parsing for accepting the file path, rather than manually parsing process.argv.",
      "max_score": 10
    },
    {
      "name": "Accumulates state correctly",
      "description": "The solution correctly accumulates counts for each log level across all lines processed, maintaining state between callback invocations.",
      "max_score": 10
    },
    {
      "name": "Uses cli output methods",
      "description": "The solution uses cli package output methods (such as cli.output, cli.info, cli.ok, or similar) to display results rather than using console.log directly.",
      "max_score": 5
    }
  ]
}