swiftdata-code-review
Installation
SKILL.md
SwiftData Code Review
Quick Reference
| Issue Type | Reference |
|---|---|
| @Model, @Attribute, @Relationship, delete rules | references/model-design.md |
| @Query, #Predicate, FetchDescriptor, #Index | references/queries.md |
| @ModelActor, ModelContext, background operations | references/concurrency.md |
| VersionedSchema, MigrationStage, lightweight/custom | references/migrations.md |
Hard gates (before reporting findings)
Run in order; do not assert an issue until the gate for that issue passes.
- Scope — pass when: You have the target
.swiftpath(s) and confirmed SwiftData surface in scope (e.g.import SwiftData,@Model,@Query,@ModelActor,VersionedSchema, or migration types). If none apply, stop or narrow scope with one sentence. - Reference — pass when: For each checklist area you evaluate (models, queries, concurrency, migrations), you opened the matching
references/*.mdfrom the Quick Reference table or wroteN/A: no <area> in this reviewwith a one-line reason. - Evidence — pass when: Every finding uses the
[FILE:LINE] ISSUE_TITLEheader (line range allowed) from the file you read; no finding without a cite. - Report — pass when: Findings list cites first (or inline) using
[FILE:LINE] ISSUE_TITLE, then severity or checklist grouping—no uncited assertions.