Skip to content

/axiom:audit

Unified audit command with two modes: Smart mode analyzes your project and suggests audits; Direct mode runs a specific audit immediately.

Usage

bash
# Smart mode — analyze project and suggest audits
/axiom:audit

# Direct mode — run specific audit
/axiom:audit [area]

Smart Mode

When run without arguments, analyzes your project and recommends relevant audits based on:

  • Project type (SwiftUI vs UIKit)
  • Data models (Core Data, SwiftData)
  • Framework imports (CloudKit, Network.framework)
  • Deployment target
  • Code patterns (async/await, Timer usage)

Available Audit Areas

Grouped to mirror the sidebar exactly — same group names, same group order, same items in the same order within each group.

Build

AreaWhat It Checks
buildBuild time optimization opportunities

Debugging

AreaWhat It Checks
codableManual JSON building, error swallowing, Sendable violations
core-dataThread safety, schema migrations, N+1 queries
energyTimer abuse, polling patterns, continuous location, animation leaks
memoryRetain cycles, Timer/observer leaks, closure captures
modernizationObservableObject→@Observable, @StateObject→@State, deprecated APIs
swift-performanceARC issues, allocation patterns, generic specialization

Testing

AreaWhat It Checks
testingFlaky tests, slow tests, Swift Testing migration

Concurrency

AreaWhat It Checks
concurrencySwift 6 data races, unsafe Task captures, actor isolation

UI & Design

AreaWhat It Checks
liquid-glassiOS 26 adoption opportunities, toolbar improvements
swiftui-architectureLogic in views, MVVM/TCA boundary violations
swiftui-layoutGeometryReader misuse, deprecated screen APIs, hardcoded breakpoints
swiftui-navNavigationStack issues, path management, deep linking
swiftui-performanceExpensive body, formatters, missing lazy containers
textkitTextKit issues, text rendering problems
ux-flowDead-end views, dismiss traps, missing empty/loading/error states

Integration

AreaWhat It Checks
cameraDeprecated camera APIs, missing interruption handlers
foundation-modelsAvailability checks, main-thread blocking, guardrail handling
networkingDeprecated APIs (SCNetworkReachability), anti-patterns

Storage

AreaWhat It Checks
database-schemaUnsafe ALTER TABLE, DROP operations, FK integrity
icloudiCloud entitlements, file coordination, CloudKit errors
storageFile protection, backup exclusions, storage strategies
swiftdata@Model correctness, VersionedSchema, relationship defaults

Accessibility

AreaWhat It Checks
accessibilityVoiceOver, Dynamic Type, WCAG compliance

Games

AreaWhat It Checks
spritekitPhysics bitmask issues, draw call waste, action leaks

Shipping

AreaWhat It Checks
screenshotsPlaceholder text, wrong dimensions, debug indicators
securityAPI keys in code, insecure storage, Privacy Manifests, ATS violations

Priority Levels

  1. CRITICALcore-data, swiftdata, database-schema, storage, icloud (data corruption/loss risk)
  2. HIGHconcurrency, memory, energy, networking, security, testing (crashes, App Store rejection)
  3. MEDIUMswiftui-architecture, ux-flow, swiftui-performance, swiftui-layout, swift-performance, foundation-models (architecture, performance, UX)
  4. LOWaccessibility, liquid-glass, codable, modernization, camera, screenshots (enhancement opportunities)

Batch Patterns

bash
# Pre-release audit (CRITICAL + HIGH)
/axiom:audit core-data
/axiom:audit concurrency
/axiom:audit memory
/axiom:audit security

# Architecture review
/axiom:audit swiftui-architecture
/axiom:audit swiftui-nav
/axiom:audit swiftui-layout
/axiom:audit swiftui-performance

# Data layer review
/axiom:audit swiftdata
/axiom:audit database-schema
/axiom:audit core-data
/axiom:audit storage

# Battery optimization
/axiom:audit energy
/axiom:audit memory
/axiom:audit networking

Released under the MIT License