axiom audit core data

Engineering Community

Skill notes

Tool Use Is Mandatory

Run every Glob, Grep, and Read this prompt lists. Do not reason from training data instead of scanning. Run each Grep pattern as written; do not collapse them into one mega-regex. Run the Read verifications each section calls for. "Build a mental model" / "map the architecture" means with tool output in hand, not from memory.

Files to Exclude

Skip: *Tests.swift, *Previews.swift, */Pods/*, */Carthage/*, */.build/*, */DerivedData/*, */scratch/*, */docs/*, */.claude/*, */.claude-plugin/*

Step 3: Map Persistence Patterns

Read 2-3 key persistence files (stack setup, a data manager, a model class) to understand: How many contexts exist and what roles they play Whether background work uses background contexts or misuses viewContext What the migration strategy is (automatic, custom, none) How entities relate to each other (complexity of object graph)

Output

Write a brief Core Data Architecture Map (5-10 lines) summarizing: Stack type (modern container vs legacy coordinator, CloudKit vs local) Context strategy (single viewContext, viewContext + background, per-operation) Migration configuration (automatic lightweight, custom mapping, unconfigured) Entity/relationship complexity

Phase 2: Detect Known Anti-Patterns

Run all 5 existing detection categories. For every grep match, use Read to verify the surrounding context before reporting — grep patterns have high recall but need contextual verification.

Fluxly profile Runtime and permissions are inferred by Fluxly static checks, not author declarations or runtime test results.
Domain
Engineering
Author-declared agents
No explicit declaration found; this is not inferred or tested compatibility
Static check
94 / 100 · heuristic scan, not runtime safety proof
Runtime evidence
Not run; no isolated runtime test evidence is currently recorded
Author / version / license
@CharlesWiltgen · MIT
Token usage
Moderate
Setup complexity
Guided setup
External API key
Not required
Operating systems
Unspecified (assume cross-platform)
Runtime requirements
No explicit requirements detected
Detected file/system behavior
  • Read-only
  • Write / modify
Network behavior
External requests
Install commands
None (reference only)

Heads up: Tool permissions are not declared; actual access depends on the runtime.

01
Phase 1: Map Core Data Architecture

Phase 1: Map Core Data Architecture

02
Step 1: Identify Core Data Stack

Step 1: Identify Core Data Stack

03
Step 2: Identify Context Usage Patterns

Step 2: Identify Context Usage Patterns

04
Step 3: Map Persistence Patterns

Read 2-3 key persistence files (stack setup, a data manager, a model class) to understand: How many contexts exist and what roles they play Whether background work uses background contexts or misuses viewContext What the migration strategy is (automatic, custom, none) How entities relate to each other (complexity of object graph)

05
Phase 2: Detect Known Anti-Patterns

Run all 5 existing detection categories. For every grep match, use Read to verify the surrounding context before reporting — grep patterns have high recall but need contextual verification.

06
Phase 3: Reason About Core Data Completeness

Using the Core Data Architecture Map from Phase 1 and your domain knowledge, check for what's *missing* — not just what's wrong. Question · What it detects · Why it matters Is merge policy configured on all contexts? · Missing conflict resolution · Without merge policy, conflicting saves crash instead of resolving gracefully Is `automaticallyMergesChangesFromParent` enabled on viewContext? · Stale UI · Background saves don't appear in UI until manual refresh — users think data wasn't saved

07
Phase 4: Cross-Reference Findings

Bump severity for these combinations: Finding A · + Finding B · = Compound · Severity Missing migration options · Multiple model versions in .xcdatamodeld · Guaranteed 100% crash rate on update · CRITICAL Missing merge policy · CloudKit sync enabled · Silent data loss on sync conflicts · CRITICAL viewContext on background thread · No perform block wrapping · Random thread-confinement crash · CRITICAL

08
Phase 5: Core Data Health Score

Scoring: PRODUCTION READY: Migration configured, >90% operations in perform blocks, no try!, no store deletion, merge policy set NEEDS HARDENING: Migration configured, some perform gaps or missing batch size, no CRITICAL issues UNSAFE: Missing migration options, OR thread-confinement violations, OR try! on persistence operations, OR unguarded store deletion

Discussion

Powered by GitHub Discussions. Sign in with GitHub to comment, react, or subscribe.