or run

npx @tessl/cli init
Log in

Version

Files

tile.json

rubric.jsonevals/scenario-2/

{
  "context": "This criteria evaluates how well the engineer uses pixelmatch's anti-aliasing detection capabilities to build a screenshot comparison tool. The focus is on correctly using the includeAA option to distinguish between genuine content differences and anti-aliasing artifacts.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Uses pixelmatch function",
      "description": "Imports and uses the pixelmatch function from the pixelmatch package to perform the image comparison",
      "max_score": 10
    },
    {
      "name": "Loads PNG images",
      "description": "Uses pngjs (PNG.sync.read or similar) to load the two input PNG files and extract their image data buffers, width, and height",
      "max_score": 10
    },
    {
      "name": "Comparison with includeAA false",
      "description": "Calls pixelmatch with includeAA set to false (or relies on default false) to get mismatch count excluding anti-aliased pixels",
      "max_score": 25
    },
    {
      "name": "Comparison with includeAA true",
      "description": "Calls pixelmatch a second time with includeAA set to true to get mismatch count including anti-aliased pixels",
      "max_score": 25
    },
    {
      "name": "Creates output buffer",
      "description": "Allocates an output buffer (Uint8Array or similar) of the correct size (width * height * 4) to receive the diff image",
      "max_score": 10
    },
    {
      "name": "Configures AA color",
      "description": "Uses the aaColor option to display anti-aliased pixels in a different color (e.g., yellow) in the visual diff output",
      "max_score": 10
    },
    {
      "name": "Writes diff PNG",
      "description": "Creates a PNG from the output buffer and writes it to the specified output path using pngjs",
      "max_score": 10
    }
  ]
}