{
  "skill_name": "core-data",
  "evals": [
    {
      "id": 0,
      "name": "staged-migration-setup",
      "prompt": "We're moving our Core Data app to NSStagedMigrationManager on iOS 17+. Our draft passes model names like \"Model_v2\" to NSLightweightMigrationStage, builds the custom stage from just the destination model, and sets the manager option after calling loadPersistentStores. Fix it.",
      "expected_output": "Uses version checksums instead of names for lightweight stages, builds NSManagedObjectModelReference(name:in:versionChecksum:) values, gives NSCustomMigrationStage both a source and a destination reference, and sets NSPersistentStoreStagedMigrationManagerOptionKey on the store description before loading stores.",
      "files": [],
      "expectations": [
        "Uses version checksums, not model names, for lightweight stages",
        "Uses NSManagedObjectModelReference(name:in:versionChecksum:)",
        "Supplies both source and destination references to the custom stage",
        "Sets NSPersistentStoreStagedMigrationManagerOptionKey before loadPersistentStores"
      ]
    },
    {
      "id": 1,
      "name": "app-and-widget-store-review",
      "prompt": "Our notes app and its widget share one Core Data store in an app group. The widget runs NSBatchDeleteRequest to trim old notes, and the app never sees the deletions until relaunch. The app also passes NSManagedObject instances into Task.detached, and our Note entity relies on a Deny delete rule. Review this.",
      "expected_output": "Explains that batch requests bypass the context and must be merged or observed through persistent history, enables NSPersistentHistoryTrackingKey and remote change notifications, observes NSPersistentStoreRemoteChange, keeps a separate history token per target, hands off objectIDs instead of managed objects, and warns that batch delete ignores the Deny rule and skips validation beyond basic delete rules.",
      "files": [],
      "expectations": [
        "States batch operations bypass context change tracking and need merging or persistent history",
        "Enables NSPersistentHistoryTrackingKey",
        "Observes NSPersistentStoreRemoteChange",
        "Keeps a persisted history token per target or consumer",
        "Passes NSManagedObjectID across concurrency boundaries",
        "Warns batch delete does not enforce the Deny rule"
      ]
    },
    {
      "id": 2,
      "name": "swiftdata-coexistence-routing",
      "prompt": "We want SwiftData screens to read the same data as our existing Core Data stack. Write us the full coexistence and migration guide.",
      "expected_output": "Routes the full coexistence or migration work to the swiftdata skill, keeps only the high-level rules here (reuse the existing store URL, keep entity and property names and schema compatible, map renames with @Attribute(originalName:)), and still answers any plain Core Data questions.",
      "files": [],
      "expectations": [
        "Hands the coexistence or migration guide to the swiftdata skill",
        "Does not write a full migration guide inside this skill",
        "Mentions reusing the existing store URL and compatible entity, property and schema names",
        "Mentions @Attribute(originalName:) for renamed properties",
        "Keeps standalone Core Data guidance available"
      ]
    }
  ]
}
