{
  "skill_name": "swift-api-design-guidelines",
  "evals": [
    {
      "id": 0,
      "name": "api-review-naming-labels",
      "prompt": "Please review the naming on this type before we make it public:\n\nstruct ThemePalette {\n    mutating func add(color: Color)\n    mutating func remove(index: Int)\n    func colorWithName(_ string: String) -> Color?\n    func containsColor(_ color: Color) -> Bool\n    static func createDefaultPalette() -> ThemePalette\n}",
      "expected_output": "Concrete renames grounded in the guidelines: add(_:), remove(at:), a role-named lookup such as color(named name:) or color(forName name:), contains(_:), makeDefault() or similar, each justified by how the call site reads.",
      "files": [],
      "expectations": [
        "Recommends add(_:) because the argument continues the phrase started by the base name",
        "Recommends remove(at:) so the index is not mistaken for the element",
        "Replaces the type-named parameter string with a role name, for example color(named name:) or color(forName name:)",
        "Removes the repeated type word from containsColor, giving contains(_:)",
        "Replaces the create prefix with a make factory name",
        "Justifies each change by call-site clarity and the guidelines rather than personal taste"
      ]
    },
    {
      "id": 1,
      "name": "mutating-pairs-doc-comments",
      "prompt": "Fix the names and docs on this editor buffer:\n\nstruct TextBuffer {\n    mutating func formSortLines()\n    func sortLines() -> TextBuffer\n    func strippedNewlines() -> TextBuffer\n    func unionTags(_ other: Set<String>) -> Set<String>\n    mutating func formUnionTags(_ other: Set<String>) -> Set<String>\n    var totalCharacterCount: Int { lines.map(\\.count).reduce(0, +) }\n}",
      "expected_output": "Verb pair sortLines()/sortedLines(), strippingNewlines(), noun pair unionTags/formUnionTags with the mutating one returning nothing, kind-appropriate doc summaries and an O(n) complexity note on totalCharacterCount.",
      "files": [],
      "expectations": [
        "Names the pair sortLines() for the mutating form and sortedLines() for the non-mutating form",
        "Uses strippingNewlines() rather than strippedNewlines()",
        "Pairs the noun operation as unionTags(_:) returning a value and formUnionTags(_:) mutating in place",
        "Writes doc summaries that match the declaration kind",
        "Adds a complexity note to totalCharacterCount because it is not O(1)",
        "Never presents formSortLines() or a value-returning formUnionTags() as correct"
      ]
    },
    {
      "id": 2,
      "name": "sibling-boundary-language-features",
      "prompt": "Three quick ones: is fetchDataWithId(_:) a good method name, should our repository return some Collection or any Collection, and how should we configure SwiftLint's identifier_name rule?",
      "expected_output": "A short naming answer with a corrected example such as fetchData(id:), then routing some versus any to swift-language and the SwiftLint configuration to swiftlint without covering either in depth.",
      "files": [],
      "expectations": [
        "Answers the naming question with a minimal corrected example such as fetchData(id:)",
        "Routes the some versus any question to swift-language",
        "Routes the SwiftLint configuration to swiftlint",
        "Does not give a full SwiftLint configuration or an opaque versus existential type tutorial"
      ]
    }
  ]
}
