{
  "skill_name": "flutter-retrofit-networking",
  "evals": [
    {
      "id": 1,
      "prompt": "Create a Retrofit client for the orders API in Flutter.",
      "expected_output": "Define an abstract class with @RestApi(). Use @GET and @POST annotations. Methods return Future<DTO>. Use @freezed and @JsonSerializable for DTOs.",
      "assertions": [
        { "type": "contains", "value": "RestApi" },
        { "type": "contains", "value": "Future" }
      ]
    },
    {
      "id": 2,
      "prompt": "How do I handle JWT token refresh on 401 in Flutter with Dio?",
      "expected_output": "Create an AuthInterceptor extending Interceptor. In onError, check for 401 (DioException), call refreshToken(), update the stored token, then retry with dio.fetch(). Lock Dio during refresh to prevent concurrent token refreshes.",
      "assertions": [
        { "type": "contains", "value": "Interceptor" },
        { "type": "contains", "value": "401" }
      ]
    },
    {
      "id": 3,
      "prompt": "The server sends an enum field with values I haven't seen before. How do I prevent crashes?",
      "expected_output": "Use @JsonKey(unknownEnumValue: Status.unknown) on the enum field in the DTO. Add an 'unknown' fallback value to the enum to handle new server values gracefully.",
      "assertions": [
        { "type": "contains", "value": "JsonKey" },
        { "type": "contains", "value": "unknownEnumValue" }
      ]
    }
  ],
  "should_not_trigger": [
    "How do I parse JSON manually from an HTTP response?",
    "Add error handling in the BLoC for network failures",
    "Write a unit test for the repository",
    "Set up GraphQL with ferry or artemis"
  ]
}
