{
  "skill_name": "test-driven-development",
  "evals": [
    {
      "id": 1,
      "name": "red-green-refactor-cycle",
      "prompt": "Implement a function that validates email addresses. Use TDD.",
      "expected_output": "A sequence showing: failing test first, minimal implementation, passing test, then refactor.",
      "assertions": [
        "The output starts with a failing test",
        "The initial implementation is minimal (not over-engineered)",
        "The test passes before refactoring",
        "Refactoring happens after green, not during red",
        "Edge cases are tested (null, empty, invalid format)"
      ]
    },
    {
      "id": 2,
      "name": "integration-test-resistance",
      "prompt": "A user wants to write an end-to-end test for a login flow before writing any unit tests.",
      "expected_output": "The skill guides toward unit tests first, explaining the test pyramid and fast feedback loops.",
      "assertions": [
        "The output mentions the test pyramid",
        "The output explains why unit tests should come first",
        "The output does not discourage integration tests entirely",
        "The output suggests a balanced test strategy"
      ]
    },
    {
      "id": 3,
      "name": "legacy-code-tdd",
      "prompt": "Add a feature to a 10-year-old codebase with no tests. How do you apply TDD?",
      "expected_output": "A pragmatic approach: characterization tests first, then TDD the new feature, without requiring full coverage upfront.",
      "assertions": [
        "The output suggests characterization tests",
        "The output does not demand 100% coverage before starting",
        "The output has a realistic migration path",
        "The output distinguishes new code from legacy"
      ]
    }
  ]
}
