Menu

I built a CLI that reads Xcode’s index store, so AI agents (and you) get “who calls this?” in one call
📰

I built a CLI that reads Xcode’s index store, so AI agents (and you) get “who calls this?” in one call

#swift#redditswift#call#grep#search
Reading 0:00
15s threshold

Coding agents trace Swift call stacks with grep: search the name, read the file, search the enclosing function, repeat. Every hop costs a couple of tool calls, and text search doesn’t know which write( you meant, which overload the compiler picked, or where a protocol call actually lands.

The compiler already recorded all of that in the index store when you built. SwiftGraph reads it and answers in one call:

The experiment: I gave two Sonnet agents the same “trace every caller” question. The graph agent used 2 tool calls and ~196k input tokens; the grep agent used 8 tool calls and ~689k. Both were correct.

Limits, honestly: it only sees what the compiler records, so NotificationCenter, selectors, KVO, u/Environment injection and reflection don’t show up.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.