Metadata-Version: 2.4
Name: ckgraphify
Version: 0.2.8
Summary: AI coding assistant skill for Claude Code and Codex - graph-main boundary graphs, multi-repo call chains, business-map concepts, and business search
License-Expression: MIT
Project-URL: Homepage, https://github.com/safishamsi/graphify
Project-URL: Repository, https://github.com/safishamsi/graphify
Project-URL: Issues, https://github.com/safishamsi/graphify/issues
Keywords: claude,claude-code,codex,knowledge-graph,graph-main,business-map,multi-repo,hsf,mtop,rag,graphrag,tree-sitter,llm
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: networkx
Requires-Dist: datasketch
Requires-Dist: rapidfuzz
Requires-Dist: tree-sitter>=0.23.0
Requires-Dist: tree-sitter-python
Requires-Dist: tree-sitter-javascript
Requires-Dist: tree-sitter-typescript
Requires-Dist: tree-sitter-go
Requires-Dist: tree-sitter-rust
Requires-Dist: tree-sitter-java
Requires-Dist: tree-sitter-groovy
Requires-Dist: tree-sitter-c
Requires-Dist: tree-sitter-cpp
Requires-Dist: tree-sitter-ruby
Requires-Dist: tree-sitter-c-sharp
Requires-Dist: tree-sitter-kotlin
Requires-Dist: tree-sitter-scala
Requires-Dist: tree-sitter-php
Requires-Dist: tree-sitter-swift
Requires-Dist: tree-sitter-lua
Requires-Dist: tree-sitter-zig
Requires-Dist: tree-sitter-powershell
Requires-Dist: tree-sitter-elixir
Requires-Dist: tree-sitter-objc
Requires-Dist: tree-sitter-julia
Requires-Dist: tree-sitter-verilog
Requires-Dist: tree-sitter-fortran
Provides-Extra: mcp
Requires-Dist: mcp; extra == "mcp"
Provides-Extra: neo4j
Requires-Dist: neo4j; extra == "neo4j"
Provides-Extra: pdf
Requires-Dist: pypdf; extra == "pdf"
Requires-Dist: markdownify; extra == "pdf"
Provides-Extra: watch
Requires-Dist: watchdog; extra == "watch"
Provides-Extra: svg
Requires-Dist: matplotlib; extra == "svg"
Provides-Extra: leiden
Requires-Dist: graspologic; python_version < "3.13" and extra == "leiden"
Provides-Extra: office
Requires-Dist: python-docx; extra == "office"
Requires-Dist: openpyxl; extra == "office"
Provides-Extra: google
Requires-Dist: openpyxl; extra == "google"
Provides-Extra: video
Requires-Dist: faster-whisper; extra == "video"
Requires-Dist: yt-dlp; extra == "video"
Provides-Extra: kimi
Requires-Dist: openai; extra == "kimi"
Requires-Dist: tiktoken; extra == "kimi"
Provides-Extra: ollama
Requires-Dist: openai; extra == "ollama"
Provides-Extra: bedrock
Requires-Dist: boto3; extra == "bedrock"
Provides-Extra: gemini
Requires-Dist: openai; extra == "gemini"
Requires-Dist: tiktoken; extra == "gemini"
Provides-Extra: openai
Requires-Dist: openai; extra == "openai"
Requires-Dist: tiktoken; extra == "openai"
Provides-Extra: sql
Requires-Dist: tree-sitter-sql; extra == "sql"
Provides-Extra: all
Requires-Dist: mcp; extra == "all"
Requires-Dist: neo4j; extra == "all"
Requires-Dist: pypdf; extra == "all"
Requires-Dist: markdownify; extra == "all"
Requires-Dist: watchdog; extra == "all"
Requires-Dist: graspologic; python_version < "3.13" and extra == "all"
Requires-Dist: python-docx; extra == "all"
Requires-Dist: openpyxl; extra == "all"
Requires-Dist: faster-whisper; extra == "all"
Requires-Dist: yt-dlp; extra == "all"
Requires-Dist: matplotlib; extra == "all"
Requires-Dist: openai; extra == "all"
Requires-Dist: tiktoken; extra == "all"
Requires-Dist: boto3; extra == "all"
Requires-Dist: tree-sitter-sql; extra == "all"
Dynamic: license-file

# ckgraphify

本目录用于 Claude Code plugin。仓库源码统一放在 `${CLAUDE_PLUGIN_ROOT}/repos/`，图谱和业务地图统一放在 `${CLAUDE_PLUGIN_ROOT}/graphify-out/`。

## 安装依赖

```bash
# 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`。

```bash
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/` 下的仓库名：

```bash
# 健康卡 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
```

```bash
# 健康卡 增量更新 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：

```bash
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实体的全部链路
```bash
graphify main-trace \
    --graph "${CLAUDE_PLUGIN_ROOT}/graphify-out/graph.json" \
    --from ehealth-member \
    --max-depth 8
```

选择ehealth-member实体的/shopping/healthCard/createHealthCard 支线链路
```bash
graphify main-trace \
    --graph "${CLAUDE_PLUGIN_ROOT}/graphify-out/graph.json" \
    --from ehealth-member \
    --api /shopping/healthCard/createHealthCard \
    --max-depth 8
```

### 输出追踪结果和来源文件

```bash
graphify main-trace \
    --graph "${CLAUDE_PLUGIN_ROOT}/graphify-out/graph.json" \
    --from ehealth-member \
    --max-depth 8 --sources
```
