axiom audit memory

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 2: Identify Cleanup Patterns

Read 3-5 key resource-owning classes to understand: What's the ownership graph? (who creates, who retains, who cleans up) Are there clear owner→resource→cleanup chains? Which classes have deinit and which don't? Are there objects that accumulate resources without bounds?

Output

Write a brief Resource Ownership Map (5-10 lines) summarizing: Which classes own long-lived resources Where cleanup happens (deinit, onDisappear, explicit teardown) Any classes that own resources but lack cleanup Singleton/static instances (intentionally long-lived — not bugs)

Phase 2: Detect Known Leak Patterns

Run all 6 existing detection patterns with pair counting. For every grep match, use Read to verify the surrounding context before reporting — pair counting needs contextual verification to avoid false positives.

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 Resource Ownership

Phase 1: Map Resource Ownership

02
Step 1: Identify Resource-Owning Classes

Step 1: Identify Resource-Owning Classes

03
Step 2: Identify Cleanup Patterns

Read 3-5 key resource-owning classes to understand: What's the ownership graph? (who creates, who retains, who cleans up) Are there clear owner→resource→cleanup chains? Which classes have `deinit` and which don't? Are there objects that accumulate resources without bounds?

04
Step 3: Identify Long-Lived Objects

Step 3: Identify Long-Lived Objects

05
Phase 2: Detect Known Leak Patterns

Run all 6 existing detection patterns with pair counting. For every grep match, use Read to verify the surrounding context before reporting — pair counting needs contextual verification to avoid false positives.

06
Phase 3: Reason About Memory Completeness

Using the Resource Ownership 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 all classes that own stored Tasks cancel them in deinit? · Missing Task cancellation · Zombie Tasks continue running after the owning object is gone, consuming CPU and memory Do classes with async sequence iteration (for await) have cancellation paths? · Infinite sequence retention · AsyncStream consumers retain their Task forever if not cancelled

07
Phase 4: Cross-Reference Findings

Bump severity for these combinations: Finding A · + Finding B · = Compound · Severity No deinit · Owns stored Task + timer + observer · No cleanup path exists for multiple resources · CRITICAL [weak self] missing in closure · Closure stored in collection · Accumulating retain cycles · CRITICAL Timer without invalidate · No deinit on owning class · Timer runs forever, class never deallocates · CRITICAL

08
Phase 5: Resource Lifecycle Health Score

Scoring: CLEAN: No CRITICAL issues, all resource pairs match, >90% cleanup coverage, 0 unbounded collections NEEDS ATTENTION: No CRITICAL issues, some mismatched pairs or <90% cleanup coverage LEAKING: Any CRITICAL issues, or multiple unmatched resource pairs, or unbounded growth in long-lived objects

Discussion

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