graph-query
Queries the code graph database to understand component relationships, dependencies, and the impact of changes. Use when the user asks to "find callers", "check dependencies", "what uses this", or whe
SKILL.mdsrc/skills/graph-query/SKILL.md
GitHubCode Graph Query
AI Maestro keeps a graph of your agent's project: functions, classes and their calls, inheritance, includes, model associations and serializers. It answers "what breaks if I change this" faster and more completely than grep, which misses indirect callers, subclasses and serializers. The scripts find your agent from the tmux session; names are case-sensitive.
graph-describe.sh <name> # summary: callers, callees, extends/extended by, includes, serializers
graph-find-callers.sh <function> # who calls it: check before changing a signature
graph-find-callees.sh <function> # what it calls
graph-find-related.sh <component> # extends, includes and other relationships
graph-find-path.sh <from> <to> # call path between two functions (up to 5 hops)
graph-find-by-type.sh <type> # model | serializer | controller | service | job | mailer | concern | component | hook
graph-find-associations.sh <model> # belongs_to / has_many etc.
graph-find-serializers.sh <model> # serializers to update when a model changes
For a change to shared code, graph-describe.sh usually answers the question in one call; use the narrower scripts when you need the full list.
Keeping the graph current
graph-index-delta.sh [project-path]
Re-indexes only new, modified and deleted files (seconds); the first run on a project does the full index. Without a path it uses the agent's working directory. Run it after significant code changes if results look stale.
If the command fails
command not foundorcommon.sh not found: run./install-graph-tools.shfrom the AI Maestro checkout (update-aimaestro.shalso reinstalls the tools).- Empty results: check the exact name, list candidates with
graph-find-by-type.sh, or index withgraph-index-delta.sh. - AI Maestro unreachable: fall back to grep and tell the user the dependency check was manual.