{{!--
  TEST_CASE Template - Test Definition

  Purpose: Generate input/expected output pairs with metadata for evals.

  Use Cases:
  - Defining test cases for prompt evaluation
  - Creating golden output sets
  - Regression testing prompts
  - Building eval datasets

  Input Data Structure:
  ```yaml
  test_suite:
    name: string
    version: string
    description: string
    target_prompt: string (path or identifier)
  test_cases:
    - id: string
      name: string
      category: string
      difficulty: string (easy | medium | hard)
      input:
        content: string
        variables: object (optional)
      expected:
        output: string (optional - golden output)
        must_contain: [string] (optional)
        must_not_contain: [string] (optional)
        format: string (optional)
      metadata:
        tags: [string]
        notes: string
  ```

  Usage:
  bun run RenderTemplate.ts -t Evals/TestCase.hbs -d Data/SummaryTestCases.yaml
--}}

# {{test_suite.name}}

{{#if test_suite.version}}
**Version:** {{test_suite.version}}
{{/if}}
{{#if test_suite.description}}
{{test_suite.description}}
{{/if}}

{{#if test_suite.target_prompt}}
**Target Prompt:** `{{test_suite.target_prompt}}`
{{/if}}

---

## Test Cases ({{test_cases.length}} total)

{{#each test_cases}}
### {{id}}: {{name}}

{{#if category}}
**Category:** `{{category}}`
{{/if}}
{{#if difficulty}}
**Difficulty:** {{difficulty}}
{{/if}}
{{#if metadata.tags}}
**Tags:** {{join metadata.tags ", "}}
{{/if}}

#### Input

{{#if input.variables}}
**Variables:**
```yaml
{{#each input.variables}}
{{@key}}: {{this}}
{{/each}}
```
{{/if}}

**Content:**
```
{{input.content}}
```

#### Expected Output

{{#if expected.output}}
**Golden Output:**
```
{{expected.output}}
```
{{/if}}

{{#if expected.must_contain}}
**Must Contain:**
{{#each expected.must_contain}}
- `{{this}}`
{{/each}}
{{/if}}

{{#if expected.must_not_contain}}
**Must NOT Contain:**
{{#each expected.must_not_contain}}
- `{{this}}`
{{/each}}
{{/if}}

{{#if expected.format}}
**Expected Format:** {{expected.format}}
{{/if}}

{{#if metadata.notes}}
**Notes:** {{metadata.notes}}
{{/if}}

---

{{/each}}

## Summary Statistics

| Category | Count |
|----------|-------|
| Total Test Cases | {{test_cases.length}} |
{{!-- Could add category counts if needed --}}

---

## Usage

To run these test cases:

```bash
# Run all test cases
bun run ~/.opencode/Skills/Evals/EvalServer/Lib/run-eval.ts \
  --use-case {{test_suite.name}} \
  --all

# Run specific test case
bun run ~/.opencode/Skills/Evals/EvalServer/Lib/run-eval.ts \
  --use-case {{test_suite.name}} \
  --test-id <test_id>
```

---

{{#if test_suite.notes}}
## Notes

{{test_suite.notes}}
{{/if}}
