{
  "skill_name": "android-di",
  "evals": [
    {
      "id": 1,
      "prompt": "How do I provide a Retrofit instance as a singleton using Hilt so it's shared across the whole app?",
      "expected_output": "Create a NetworkModule with @Module @InstallIn(SingletonComponent::class). Use @Provides @Singleton fun provideRetrofit(). Prefer @Binds over @Provides for interface bindings.",
      "assertions": [
        { "id": "a1", "description": "Uses @Provides in Hilt module", "type": "contains", "value": "@Provides" },
        { "id": "a2", "description": "Installs in SingletonComponent", "type": "contains", "value": "SingletonComponent" },
        { "id": "a3", "description": "Uses @Singleton scope", "type": "contains", "value": "@Singleton" }
      ]
    },
    {
      "id": 2,
      "prompt": "When should I use @Binds vs @Provides in a Hilt module?",
      "expected_output": "@Binds for binding an interface to its implementation (abstract, no body) — generates less code. @Provides when the object construction requires logic or third-party classes.",
      "assertions": [
        { "id": "a1", "description": "Explains @Binds advantage", "type": "contains", "value": "@Binds" },
        { "id": "a2", "description": "Explains @Provides use case", "type": "contains", "value": "@Provides" },
        { "id": "a3", "description": "Mentions generated code size", "type": "contains", "value": "code" }
      ]
    },
    {
      "id": 3,
      "prompt": "My ViewModel needs a parameter that's only known at runtime (e.g., a product ID). How do I inject that with Hilt?",
      "expected_output": "Use @AssistedInject for the ViewModel constructor plus @Assisted for the runtime parameter. Create an @AssistedFactory. In Compose, use hiltViewModel() with a factory.",
      "assertions": [
        { "id": "a1", "description": "Uses @AssistedInject", "type": "contains", "value": "@AssistedInject" },
        { "id": "a2", "description": "Uses @Assisted annotation", "type": "contains", "value": "@Assisted" }
      ]
    }
  ],
  "should_not_trigger": [
    "How do I inject a TestDispatcher/StandardTestDispatcher for unit testing a ViewModel?",
    "Set up a fake repository using @TestInstallIn for Compose UI tests",
    "My ViewModel creates a coroutine on GlobalScope — how do I fix that?",
    "How do I scope a Hilt dependency to a Jetpack Navigation graph?",
    "Configure a Room database instance in a Hilt module",
    "Write a ViewModel that exposes StateFlow<UiState>",
    "Add an OkHttp interceptor for auth headers in Retrofit",
    "How do I use constructor injection vs field injection?",
    "Schedule a WorkManager job with network constraints",
    "Create a Hilt @TestInstallIn module that replaces the production one"
  ]
}
