axiom audit textkit

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 6: Read Key Files

Read 1-2 representative text-editor files (TextEditorView / NotesController / similar) to understand: Whether the implementation prefers textLayoutManager over layoutManager Whether glyph APIs appear in measurement code (broken on Arabic, Hebrew, Thai, Devanagari, Kannada) Whether Writing Tools is configured (behavior set, state checked, result options applied) Whether NSRange↔NSTextRange conversion happens correctly when both APIs cross

Output

Write a brief TextKit Map (5-10 lines) summarizing: Number of UITextView/NSTextView and their custom subclasses TextKit version in use (TextKit 2 only / TextKit 1 only / mixed / unclear) Glyph API sites (count, files) Writing Tools wiring (full / partial / absent / SwiftUI default)

Phase 2: Detect Known Anti-Patterns

Run all 6 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
Moderate
Setup complexity
Guided setup
External API key
Not required
Operating systems
macOS
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 Text Layout Architecture

Phase 1: Map Text Layout Architecture

02
Step 1: Identify Text View Inventory

Step 1: Identify Text View Inventory

03
Step 2: Identify TextKit Surface (1 vs 2)

Step 2: Identify TextKit Surface (1 vs 2)

04
Step 3: Identify Glyph and Range APIs

Step 3: Identify Glyph and Range APIs

05
Step 4: Identify Writing Tools Surface (iOS 18+/macOS 15+)

Step 4: Identify Writing Tools Surface (iOS 18+/macOS 15+)

06
Step 5: Identify Fallback Observation and SwiftUI Wrappers

Step 5: Identify Fallback Observation and SwiftUI Wrappers

07
Step 6: Read Key Files

Read 1-2 representative text-editor files (TextEditorView / NotesController / similar) to understand: Whether the implementation prefers `textLayoutManager` over `layoutManager` Whether glyph APIs appear in measurement code (broken on Arabic, Hebrew, Thai, Devanagari, Kannada) Whether Writing Tools is configured (behavior set, state checked, result options applied) Whether NSRange↔NSTextRange conversion happens correctly when both APIs cross

08
Phase 2: Detect Known Anti-Patterns

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

09
Phase 3: Reason About TextKit Completeness

Using the TextKit 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 Does the codebase observe `_UITextViewEnablingCompatibilityMode` (UIKit) or `willSwitchToNSLayoutManagerNotification` (AppKit)? · Silent TextKit 1 fallback · Without observation, fallback happens invisibly; Writing Tools disappears with no error or log

10
Phase 4: Cross-Reference Findings

Bump severity for these combinations: Finding A · + Finding B · = Compound · Severity Direct `.layoutManager` access (Pattern 1) · iOS 18+ deployment target + UITextView with edit content · Guaranteed Writing Tools loss; users on iOS 18 silently lose a system feature · CRITICAL Glyph APIs (Pattern 3) · Codebase ships in non-English locales · Layout corruption + measurement errors for any user typing Arabic/Hebrew/Thai/Indic · CRITICAL

11
Phase 5: TextKit Modernity Health Score

Metric · Value Text view count · N UITextView/NSTextView/TextEditor instances TextKit version · TextKit 2 / TextKit 1 / mixed Glyph API sites · M deprecated-glyph-API references Writing Tools coverage · M of N edit views configure `writingToolsBehavior` (Z%)

Discussion

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