axiom audit swiftui layout

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 Adaptivity Strategy

Read 3-5 key view files (root view, main content view, a detail view) to understand: Does the app adapt to different screen sizes, or assume one device class? Is GeometryReader used for sizing, or do views use flexible layouts? Are there device-specific code paths (iPad vs iPhone)? Does the app support multitasking (Split View, Stage Manager)?

Output

Write a brief Layout Strategy Map (8-10 lines) summarizing: Layout approach (flexible/fixed/mixed) GeometryReader usage count and pattern (sizing vs observation) Size class usage (present/absent, correct/misused) Fixed dimension count and range

Phase 2: Detect Known Anti-Patterns

Run all 10 existing detection patterns. 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
Windows
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 Layout Strategy

Phase 1: Map Layout Strategy

02
Step 1: Identify Layout Approach

Step 1: Identify Layout Approach

03
Step 2: Identify Fixed Dimensions and Breakpoints

Step 2: Identify Fixed Dimensions and Breakpoints

04
Step 3: Understand Adaptivity Strategy

Read 3-5 key view files (root view, main content view, a detail view) to understand: Does the app adapt to different screen sizes, or assume one device class? Is GeometryReader used for sizing, or do views use flexible layouts? Are there device-specific code paths (iPad vs iPhone)? Does the app support multitasking (Split View, Stage Manager)?

05
Phase 2: Detect Known Anti-Patterns

Run all 10 existing detection patterns. 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 Layout Completeness

Using the Layout Strategy 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 Do layouts work in iPad Split View and Slide Over (roughly half screen width)? · Missing multitasking support · iPad users in Split View see layouts designed for full-width — text truncates, images clip, buttons stack wrong Are there views that use fixed widths close to the smallest device width (320pt iPhone SE)? · Near-edge fixed sizing · A 300pt fixed frame on a 320pt screen leaves 10pt margins — one Dynamic Type bump and content clips

07
Phase 4: Cross-Reference Findings

Bump severity for these combinations: Finding A · + Finding B · = Compound · Severity GeometryReader in stack · Inside ScrollView/List · Layout loop or zero-height rendering · CRITICAL UIScreen.main.bounds · Used for layout decisions · Stale values break multitasking · CRITICAL Conditional VStack/HStack · In main content view · User loses state on rotation/resize · CRITICAL

08
Phase 5: Layout Health Score

Scoring: ADAPTIVE: No CRITICAL issues, size class or ViewThatFits used for adaptation, 0 deprecated APIs, no identity-losing conditional stacks, supports multitasking RIGID: No CRITICAL issues, but missing adaptivity (no size class usage), or some fixed dimensions that risk clipping, or conditional stacks without AnyLayout BROKEN: Any CRITICAL issues (GeometryReader in stacks, deprecated APIs, UIRequiresFullScreen), or layouts that clip on common device sizes

Discussion

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