axiom audit codable

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 Serialization Boundaries

Read 2-3 key files (one API model, one decoder usage site, any custom codable wrapper) to understand: What Codable types cross which boundaries (network, disk, inter-process, pasteboard) Which decoders/encoders are shared across files and which are one-offs Whether date and key strategies are consistent per-boundary or drift between sites Whether any types are encoded in one file and decoded in another (round-trip)

Output

Write a brief Serialization Architecture Map (5-10 lines) summarizing: Codable type count and manual-implementation count Decoder configuration patterns (which strategies are set, where, consistently or not) Serialization boundaries (external API, local persistence, cache) Custom wrappers present and their decode behavior (strict vs lenient)

Phase 2: Detect Known Anti-Patterns

Run all 8 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
Heavy
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
  • Shell exec
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 Serialization Architecture

Phase 1: Map Serialization Architecture

02
Step 1: Inventory Codable Types

Step 1: Inventory Codable Types

03
Step 2: Inventory Encoder/Decoder Sites

Step 2: Inventory Encoder/Decoder Sites

04
Step 3: Map Serialization Boundaries

Read 2-3 key files (one API model, one decoder usage site, any custom codable wrapper) to understand: What Codable types cross which boundaries (network, disk, inter-process, pasteboard) Which decoders/encoders are shared across files and which are one-offs Whether date and key strategies are consistent per-boundary or drift between sites Whether any types are encoded in one file and decoded in another (round-trip)

05
Phase 2: Detect Known Anti-Patterns

Run all 8 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 Serialization Completeness

Using the Serialization Architecture Map from Phase 1 and your domain knowledge, check for what's *missing* — not just what's wrong. Each check requires cross-referencing code, not a single grep hit.

07
Phase 4: Cross-Reference Findings

Bump severity for these combinations: Finding A · + Finding B · = Compound · Severity Manual JSON string building (P2.1) · User-supplied input interpolated into the string · Injection vulnerability · CRITICAL `try?` on decode (P2.2) · Decoded data drives payment, paywall, or auth logic · Silent revenue/security loss · CRITICAL @propertyWrapper silent fallback (P3) · Wrapper applied to payment, subscription, or security fields · Guaranteed silent zero-ing of critical values · CRITICAL

08
Phase 5: Serialization Health Score

Scoring: SAFE: Explicit strategies on all decoders, 0 manual JSON building, 0 `try?` decode, all camelCase structs have CodingKeys or snake-case strategy, all server-decoded enums have unknown-case handling, 0 cross-file drift HARDENING NEEDED: Most decoders configured, rare `try?` with logging nearby, 1-2 CodingKeys gaps, no cross-file drift UNSAFE: Manual JSON with user input, OR missing decoder strategies on persistence types, OR silent fallbacks on payment/auth data, OR cross-file strategy drift, OR `try?` on decode without logging

Discussion

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