axiom audit swiftui architecture

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: Understand Architecture Strategy

Read 3-5 key files (main view, a model/viewmodel, a service) to understand: Is there a consistent architecture pattern? (vanilla SwiftUI, MVVM, TCA, coordinator) Where does business logic live? (views, models, services) How are dependencies injected? (environment, init, singleton) Is the code testable without UI? (can you test logic without importing SwiftUI)

Output

Write a brief Architecture Boundary Map (8-12 lines) summarizing: Architecture pattern used (or mixed/none) View count vs model/viewmodel count (ratio indicates separation) Logic location (views, models, or mixed) Dependency injection strategy

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
Lean
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
Local-only
Install commands
None (reference only)

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

01
Phase 1: Map View/Model Boundaries

Phase 1: Map View/Model Boundaries

02
Step 1: Identify Architecture Pattern

Step 1: Identify Architecture Pattern

03
Step 2: Identify Logic Locations

Step 2: Identify Logic Locations

04
Step 3: Understand Architecture Strategy

Read 3-5 key files (main view, a model/viewmodel, a service) to understand: Is there a consistent architecture pattern? (vanilla SwiftUI, MVVM, TCA, coordinator) Where does business logic live? (views, models, services) How are dependencies injected? (environment, init, singleton) Is the code testable without UI? (can you test logic without importing SwiftUI)

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 Architecture Completeness

Using the Architecture Boundary 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 there business logic in view bodies that has no corresponding unit tests? · Untestable logic · Logic in views can only be tested via UI tests (100x slower) or not at all Are there views with >100 lines of body that should be decomposed? · Monolithic views · Large views are hard to understand, impossible to preview in isolation, and resist refactoring

07
Phase 4: Cross-Reference Findings

Bump severity for these combinations: Finding A · + Finding B · = Compound · Severity Logic in view body · No unit tests for that logic · Untested business logic · CRITICAL Async boundary violation · In critical flow (purchase, auth) · Untestable, timing-sensitive critical transaction · CRITICAL @State copying parent data · Parent updates the data · Source-of-truth bug — UI shows stale data · CRITICAL

08
Phase 5: Architecture Health Score

Scoring: CLEAN: No CRITICAL issues, >80% logic in models, consistent architecture pattern, <3 views with business logic in body, 0 non-View SwiftUI imports TANGLED: No CRITICAL issues, but logic split between views and models, or inconsistent patterns, or some async boundary violations MONOLITHIC: Any CRITICAL issues, or >50% of logic in views, or no model layer, or pervasive async boundary violations

Discussion

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