Before I let Claude change a function, I ask what reaches it
checkAdminOrOwner is a small permission check. Give it a role and it tells you whether that role is an owner or an administrator. Open its definition and there is very little to read.
Changing it is another matter.
In the cal.diy revision I used for this experiment, that check appears in shared application code, React components and API services. A signature change starts in one file, then follows imports into packages you would never discover by reading the definition alone.
This is the question I want answered before Claude starts editing: which parts of the application depend on this function, and which of those relationships have we actually checked?
I build Pharaoh, which gives AI agents a structural map of a repository over MCP. I used it alongside native code search for this investigation. Both workflows could find the relevant names; the interesting difference in these runs was the work needed to assemble the answer.
Start with a change, not an overview
The example comes from Pharaoh-so/cal.diy at 54343aa6. The function definition accepts a membership role and acts as a TypeScript type guard.
A general request to explain this repository would leave Claude with an enormous amount