{
  "skill_name": "musickit-audio",
  "evals": [
    {
      "id": 1,
      "prompt": "We are adding Apple Music to a running-coach app. What do we have to configure in the portal and in the project before MusicKit works, how should we ask for permission, and do we need anything extra so music keeps going when the screen locks? A teammate says we also need the com.apple.developer.musickit entitlement or authorization will crash.",
      "expected_output": "A setup answer that names the App Service and usage string, explains request() versus currentStatus, treats background audio as conditional, and rejects the entitlement claim.",
      "files": [],
      "assertions": [
        "Says to enable the MusicKit App Service on the app's explicit App ID so developer tokens are generated automatically",
        "Requires NSAppleMusicUsageDescription in Info.plist",
        "Explains that MusicAuthorization.request() prompts only when needed and MusicAuthorization.currentStatus reads the state without prompting",
        "Does not claim a com.apple.developer.musickit entitlement is required on iOS or that its absence crashes authorization",
        "Adds audio to UIBackgroundModes only because playback must continue in the background"
      ]
    },
    {
      "id": 2,
      "prompt": "Build the flow where a user searches the Apple Music catalog, taps a song and it plays inside our app. Users without Apple Music should be invited to subscribe instead of seeing a broken play button.",
      "expected_output": "Catalog search, a subscription gate before playback, app-scoped playback, and a correctly gated subscription offer.",
      "files": [],
      "assertions": [
        "Searches with MusicCatalogSearchRequest and does not require a subscription for searching",
        "Gates playback on MusicSubscription.current canPlayCatalogContent",
        "Plays through ApplicationMusicPlayer.shared by setting the queue and calling play()",
        "Checks canBecomeSubscriber before showing the offer",
        "Presents the offer with musicSubscriptionOffer(isPresented:options:onLoadCompletion:)"
      ]
    },
    {
      "id": 3,
      "prompt": "Add a Top Charts screen, a button that saves a song to the user's library, and make sure the Lock Screen shows what is playing. Should we also build a CarPlay scene and an AVKit player while we are at it?",
      "expected_output": "Charts with an explicit genre argument, guarded library writes, correct Now Playing ownership, and no unrelated AVKit or CarPlay work.",
      "files": [],
      "assertions": [
        "Uses MusicCatalogChartsRequest(genre:kinds:types:) and passes genre explicitly, for example nil",
        "Confirms authorization before library mutations",
        "Checks hasCloudLibraryEnabled before adding to the library",
        "States that ApplicationMusicPlayer publishes Now Playing automatically for Apple Music content",
        "Limits MediaPlayer guidance to custom audio metadata and remote commands",
        "Does not add AVKit player or CarPlay scene implementation"
      ]
    }
  ]
}
