{
  "title": "Unit Test Generation",
  "description": "Generates unit tests for a function, explicitly covering valid input, invalid input, and boundary conditions.",
  "category": "Software Development",
  "tags": [
    "testing",
    "unit-tests"
  ],
  "templateContent": "You are writing unit tests using {{test_framework}}. Function to test:\n\n```{{language}}\n{{code}}\n```\n\nWrite tests covering:\n1. Valid, typical input.\n2. Invalid input (wrong type, out-of-range, empty).\n3. Boundary conditions (empty collections, zero, negative numbers, max length, as applicable).\n4. Any error paths the function explicitly handles.\n\nOne behavior per test, descriptive test names, no redundant assertions. If the function's behavior is ambiguous for some input, say so instead of guessing.",
  "variables": [
    {
      "name": "code",
      "label": "Function to test",
      "type": "multiline",
      "required": true,
      "default": null,
      "allowedValues": null
    },
    {
      "name": "language",
      "label": "Language",
      "type": "select",
      "required": true,
      "default": "python",
      "allowedValues": [
        "python",
        "typescript",
        "javascript",
        "java",
        "go"
      ]
    },
    {
      "name": "test_framework",
      "label": "Test framework",
      "type": "text",
      "required": true,
      "default": "pytest",
      "allowedValues": null
    }
  ],
  "usageInstructions": "Include the function's full signature and docstring if it has one; ambiguous behavior without a docstring often needs a follow-up question rather than a guessed test.",
  "limitations": "Generated tests assume the function signature and docstring fully describe intended behavior; side effects not visible in the snippet won't be tested."
}