{
  "skill_name": "golang-concurrency",
  "evals": [
    {
      "id": 1,
      "prompt": "I'm spawning goroutines inside a for loop to process orders in parallel. How do I make sure none of them leak?",
      "expected_output": "Use errgroup or sync.WaitGroup so every goroutine has a known exit path. Pass context.Context for cancellation. Call wg.Wait() or g.Wait() to ensure all goroutines complete.",
      "assertions": [
        { "type": "contains", "value": "errgroup" },
        { "type": "contains", "value": "context" }
      ]
    },
    {
      "id": 2,
      "prompt": "Multiple goroutines need to update a shared counter. What's the idiomatic Go approach?",
      "expected_output": "Use sync/atomic for simple counters or a sync.Mutex to protect shared state. Do not mutate global variables without synchronization. Prefer channels to communicate results back rather than shared mutation.",
      "assertions": [
        { "type": "contains", "value": "Mutex" },
        { "type": "contains", "value": "channel" }
      ]
    },
    {
      "id": 3,
      "prompt": "How do I run go test with the race detector?",
      "expected_output": "Run `go test -race ./...` to enable the race detector. Always include -race in CI to catch data races.",
      "assertions": [
        { "type": "contains", "value": "-race" },
        { "type": "contains", "value": "CI" }
      ]
    }
  ],
  "should_not_trigger": [
    "How do I connect to PostgreSQL in Go?",
    "Write a REST handler in Go",
    "Set up golangci-lint for my project"
  ]
}
