graph-query
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAI Maestro Code Graph Query
AI Maestro 代码图查询
Query your codebase's dependency graph to understand component relationships, call chains, and the impact of changes before making modifications. Part of the AI Maestro suite.
在进行代码修改前,查询代码库的依赖图,以理解组件关系、调用链和变更影响。本工具是AI Maestro套件的一部分。
Prerequisites
前置要求
Requires AI Maestro running locally with codebase indexed.
bash
undefined需要本地运行已索引代码库的AI Maestro。
bash
undefinedInstall graph tools
Install graph tools
git clone https://github.com/23blocks-OS/ai-maestro-plugins.git
cd ai-maestro-plugins && ./install-graph-tools.sh
undefinedgit clone https://github.com/23blocks-OS/ai-maestro-plugins.git
cd ai-maestro-plugins && ./install-graph-tools.sh
undefinedCore Behavior
核心行为
After reading any code file, query the graph to understand dependencies:
Read file -> Query graph -> Then proceed在读取任意代码文件后,查询代码图以理解依赖关系:
Read file -> Query graph -> Then proceedCommands
命令
Query
查询
| Command | Description |
|---|---|
| Describe a component or function |
| Find all callers of a function |
| Find all functions called by this function |
| Find related components |
| Find all components of a type |
| Find serializers for a model |
| Find model associations |
| Find call path between functions |
| 命令 | 描述 |
|---|---|
| 描述组件或函数 |
| 查找函数的所有调用者 |
| 查找该函数调用的所有函数 |
| 查找相关组件 |
| 查找指定类型的所有组件 |
| 查找模型对应的序列化器 |
| 查找模型关联关系 |
| 查找函数间的调用路径 |
Index
索引
| Command | Description |
|---|---|
| Index or update the code graph |
| 命令 | 描述 |
|---|---|
| 索引或更新代码图 |
Component Types
组件类型
Use with : , , , , , , ,
graph-find-by-type.shmodelserializercontrollerservicejobconcerncomponenthook与配合使用的组件类型:、、、、、、、
graph-find-by-type.shmodelserializercontrollerservicejobconcerncomponenthookUsage Examples
使用示例
bash
undefinedbash
undefinedAfter reading a model file
读取模型文件后
graph-describe.sh User
graph-find-serializers.sh User
graph-find-associations.sh User
graph-describe.sh User
graph-find-serializers.sh User
graph-find-associations.sh User
Before modifying a function
修改函数前
graph-find-callers.sh process_payment
graph-find-callees.sh process_payment
graph-find-callers.sh process_payment
graph-find-callees.sh process_payment
Find call chain between components
查找组件间的调用链
graph-find-path.sh handleRequest sendResponse
graph-find-path.sh handleRequest sendResponse
Index your codebase
索引代码库
graph-index-delta.sh /path/to/project
undefinedgraph-index-delta.sh /path/to/project
undefinedWhy Query Before Modifying
修改前查询的原因
Without checking the graph, you risk:
- Breaking callers when changing a function signature
- Missing serializers that need updating with a model change
- Overlooking child classes that inherit your modifications
如果不查询代码图,你可能会面临以下风险:
- 修改函数签名时破坏调用方
- 遗漏随模型变更需要更新的序列化器
- 忽略继承了修改内容的子类
Full AI Maestro Experience
完整AI Maestro体验
This skill is part of the AI Maestro platform, which provides 6 skills for AI agent orchestration: messaging, memory, docs, graph, planning, and agent management.
本技能是AI Maestro平台的一部分,该平台为AI Agent编排提供了6项技能:消息传递、记忆、文档、代码图、规划和Agent管理。