ckgraphify
本目录用于 Claude Code plugin。仓库源码统一放在 ${CLAUDE_PLUGIN_ROOT}/repos/,图谱和业务地图统一放在 ${CLAUDE_PLUGIN_ROOT}/graphify-out/。
安装依赖
# codex
python3 -m pip install -e ./ckgraphify && graphify install --platform codex
# claude code plugin
python3 -m pip install -e ./ckgraphify && CLAUDE_PLUGIN_ROOT=/Users/alsc/code/shop-ai/genius-kg/apex-kg/claude-plugin graphify install
生成并合并仓库图谱
repo-list.json 是兼容 graph 流程的统一 repository catalog。当前记录以 repo_id 为唯一身份,配合 git/branch/position/description/project_type/business_domains/aliases/tags/capabilities/boundaries/review_status;graph 内部从 repo_id 派生 name/group,repo-profiles.json 也是可重建投影。旧版 name/group/summary 记录继续可读。
下面命令会分别进入 ${CLAUDE_PLUGIN_ROOT}/repos/kl-health 和 ${CLAUDE_PLUGIN_ROOT}/repos/ele-newretail-health-audit 生成 graphify-out/graph-main.json,然后合并到 ${CLAUDE_PLUGIN_ROOT}/graphify-out/graph.json。
scripts/graph-main-repos.sh --space-id sgrt --repos-root "${CLAUDE_PLUGIN_ROOT}/repos" --out "${CLAUDE_PLUGIN_ROOT}/graphify-out/graph.json" kl-health ele-newretail-health-audit
也可以传入更多 ${CLAUDE_PLUGIN_ROOT}/repos/ 下的仓库名:
# 健康卡 init all repos
scripts/graph-main-repos.sh --space-id sgrt --repos-root "${CLAUDE_PLUGIN_ROOT}/repos" --out "${CLAUDE_PLUGIN_ROOT}/graphify-out/graph.json" ele-newretail-drug ele-newretail-health-task ele-newretail-drug-grow ele-newretail-health-audit ele-newretail-health-client ele-newretail-drug-trade kl-health health-vip-card medicine-unicore p ele-newretail-venus ele-newretail-summaryx china-alsc-sales-eleme-newretail-app
# 健康卡 增量更新 p、medicine-unicore repos
scripts/graph-main-repos.sh \
--space-id sgrt \
--incremental \
--repos-root "${CLAUDE_PLUGIN_ROOT}/repos" \
--out "${CLAUDE_PLUGIN_ROOT}/graphify-out/graph.json" \
p medicine-unicore
repo-scope 仓库范围探索
repo-scope 从一个或多个精确仓库出发,沿 graph-main 关系递归发现上下游仓库。仓库目录只用于身份准入和职责上下文,关系证据全部来自 Graph:
graphify repo-scope \
--graph "${CLAUDE_PLUGIN_ROOT}/graphify-out/graph.json" \
--repo newretail-shopping/ele-newretail-hasee \
--repo-catalog "${CLAUDE_PLUGIN_ROOT}/graphify-out/repo-profiles.json" \
--direction both \
--max-depth 3 \
--format json
JSON 主协议为 repo-scope-v1,提供仓库 hop、节点/边证据、结构置信度、repo-profile 路由画像和未解析边界。结构置信度只描述图关系是否可靠,不代表该仓库与当前业务需求语义相关;skill 可以基于用户目标和 profile 做快速近似判断,但不会把该判断伪装成 Graph 事实。调用方可以用 --max-depth 1 按层重复调用,默认最多返回 20 个代表性边界,并在 summary 保留总数与分类计数。
main-trace 追踪
只输出追踪结果
关于ehealth-member实体的全部链路
graphify main-trace \
--graph "${CLAUDE_PLUGIN_ROOT}/graphify-out/graph.json" \
--from ehealth-member \
--max-depth 8
选择ehealth-member实体的/shopping/healthCard/createHealthCard 支线链路
graphify main-trace \
--graph "${CLAUDE_PLUGIN_ROOT}/graphify-out/graph.json" \
--from ehealth-member \
--api /shopping/healthCard/createHealthCard \
--max-depth 8
输出追踪结果和来源文件
graphify main-trace \
--graph "${CLAUDE_PLUGIN_ROOT}/graphify-out/graph.json" \
--from ehealth-member \
--max-depth 8 --sources
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ckgraphify-0.2.8.tar.gz.
File metadata
- Download URL: ckgraphify-0.2.8.tar.gz
- Upload date:
- Size: 312.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
388dd4e2e6fa627d9e098084c4aed7323d8564077a0e5646349bc5f1d40c7857
|
|
| MD5 |
2a88abc857f246a13e6d22bd848e5754
|
|
| BLAKE2b-256 |
3cefe11f1c994313cd36185c448b9c35eff43b7ca6ccf1412418bf00fd534c3a
|
File details
Details for the file ckgraphify-0.2.8-py3-none-any.whl.
File metadata
- Download URL: ckgraphify-0.2.8-py3-none-any.whl
- Upload date:
- Size: 335.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c4e65fae991a3e5195765ecda5c4b04240ebde4308acd90c5087aae0325a3f68
|
|
| MD5 |
768f61ca5a43af277c52260a006fad3b
|
|
| BLAKE2b-256 |
a02a9a0da6dd2431d0ede10763d98fa4d52c5932b35db808dbf4148d94fb9368
|