ckgraphify 0.2.0__tar.gz → 0.2.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ckgraphify-0.2.0 → ckgraphify-0.2.2}/PKG-INFO +1 -1
- {ckgraphify-0.2.0 → ckgraphify-0.2.2}/graphify/__main__.py +2 -60
- {ckgraphify-0.2.0 → ckgraphify-0.2.2}/graphify/business_map.py +0 -18
- {ckgraphify-0.2.0 → ckgraphify-0.2.2}/pyproject.toml +1 -1
- {ckgraphify-0.2.0 → ckgraphify-0.2.2}/skill/skill-codex.md +2 -2
- {ckgraphify-0.2.0 → ckgraphify-0.2.2}/skill/skill.md +7 -7
- {ckgraphify-0.2.0 → ckgraphify-0.2.2}/LICENSE +0 -0
- {ckgraphify-0.2.0 → ckgraphify-0.2.2}/MANIFEST.in +0 -0
- {ckgraphify-0.2.0 → ckgraphify-0.2.2}/README.md +0 -0
- {ckgraphify-0.2.0 → ckgraphify-0.2.2}/ckgraphify.egg-info/SOURCES.txt +0 -0
- {ckgraphify-0.2.0 → ckgraphify-0.2.2}/graphify/__init__.py +0 -0
- {ckgraphify-0.2.0 → ckgraphify-0.2.2}/graphify/analyze.py +0 -0
- {ckgraphify-0.2.0 → ckgraphify-0.2.2}/graphify/benchmark.py +0 -0
- {ckgraphify-0.2.0 → ckgraphify-0.2.2}/graphify/bridge_mtop.py +0 -0
- {ckgraphify-0.2.0 → ckgraphify-0.2.2}/graphify/build.py +0 -0
- {ckgraphify-0.2.0 → ckgraphify-0.2.2}/graphify/cache.py +0 -0
- {ckgraphify-0.2.0 → ckgraphify-0.2.2}/graphify/callflow_html.py +0 -0
- {ckgraphify-0.2.0 → ckgraphify-0.2.2}/graphify/cluster.py +0 -0
- {ckgraphify-0.2.0 → ckgraphify-0.2.2}/graphify/dedup.py +0 -0
- {ckgraphify-0.2.0 → ckgraphify-0.2.2}/graphify/detect.py +0 -0
- {ckgraphify-0.2.0 → ckgraphify-0.2.2}/graphify/export.py +0 -0
- {ckgraphify-0.2.0 → ckgraphify-0.2.2}/graphify/extract.py +0 -0
- {ckgraphify-0.2.0 → ckgraphify-0.2.2}/graphify/global_graph.py +0 -0
- {ckgraphify-0.2.0 → ckgraphify-0.2.2}/graphify/google_workspace.py +0 -0
- {ckgraphify-0.2.0 → ckgraphify-0.2.2}/graphify/graph_main_backend.py +0 -0
- {ckgraphify-0.2.0 → ckgraphify-0.2.2}/graphify/graph_main_frontend.py +0 -0
- {ckgraphify-0.2.0 → ckgraphify-0.2.2}/graphify/graph_main_frontend_sdk.py +0 -0
- {ckgraphify-0.2.0 → ckgraphify-0.2.2}/graphify/graph_main_html.py +0 -0
- {ckgraphify-0.2.0 → ckgraphify-0.2.2}/graphify/graph_main_merge.py +0 -0
- {ckgraphify-0.2.0 → ckgraphify-0.2.2}/graphify/graph_main_trace.py +0 -0
- {ckgraphify-0.2.0 → ckgraphify-0.2.2}/graphify/hooks.py +0 -0
- {ckgraphify-0.2.0 → ckgraphify-0.2.2}/graphify/ingest.py +0 -0
- {ckgraphify-0.2.0 → ckgraphify-0.2.2}/graphify/llm.py +0 -0
- {ckgraphify-0.2.0 → ckgraphify-0.2.2}/graphify/manifest.py +0 -0
- {ckgraphify-0.2.0 → ckgraphify-0.2.2}/graphify/repo_registry.py +0 -0
- {ckgraphify-0.2.0 → ckgraphify-0.2.2}/graphify/report.py +0 -0
- {ckgraphify-0.2.0 → ckgraphify-0.2.2}/graphify/security.py +0 -0
- {ckgraphify-0.2.0 → ckgraphify-0.2.2}/graphify/serve.py +0 -0
- {ckgraphify-0.2.0 → ckgraphify-0.2.2}/graphify/transcribe.py +0 -0
- {ckgraphify-0.2.0 → ckgraphify-0.2.2}/graphify/tree_html.py +0 -0
- {ckgraphify-0.2.0 → ckgraphify-0.2.2}/graphify/validate.py +0 -0
- {ckgraphify-0.2.0 → ckgraphify-0.2.2}/graphify/watch.py +0 -0
- {ckgraphify-0.2.0 → ckgraphify-0.2.2}/graphify/wiki.py +0 -0
- {ckgraphify-0.2.0 → ckgraphify-0.2.2}/setup.cfg +0 -0
- {ckgraphify-0.2.0 → ckgraphify-0.2.2}/skill/__init__.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ckgraphify
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
4
4
|
Summary: AI coding assistant skill for Claude Code and Codex - graph-main boundary graphs, multi-repo call chains, business-map concepts, and business search
|
|
5
5
|
License-Expression: MIT
|
|
6
6
|
Project-URL: Homepage, https://github.com/safishamsi/graphify
|
|
@@ -22,31 +22,6 @@ def _default_graph_path() -> str:
|
|
|
22
22
|
return str(Path(_GRAPHIFY_OUT) / "graph.json")
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
def _check_skill_version(skill_dst: Path) -> None:
|
|
26
|
-
"""Warn if the installed skill is from an older ckgraphify package version."""
|
|
27
|
-
version_file = skill_dst.parent / ".ckgraphify_version"
|
|
28
|
-
if not version_file.exists():
|
|
29
|
-
return
|
|
30
|
-
if not skill_dst.exists():
|
|
31
|
-
print(" warning: skill dir exists but SKILL.md is missing. Run 'graphify install' to repair.")
|
|
32
|
-
return
|
|
33
|
-
installed = version_file.read_text(encoding="utf-8").strip()
|
|
34
|
-
if installed != __version__:
|
|
35
|
-
print(f" warning: skill is from ckgraphify {installed}, package is {__version__}. Run 'graphify install' to update.", file=sys.stderr)
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
def _refresh_all_version_stamps() -> None:
|
|
39
|
-
"""After a successful install, update .ckgraphify_version in all other known skill dirs.
|
|
40
|
-
|
|
41
|
-
Prevents stale-version warnings from platforms that were installed previously
|
|
42
|
-
but not explicitly re-installed during this upgrade.
|
|
43
|
-
"""
|
|
44
|
-
for cfg in _PLATFORM_CONFIG.values():
|
|
45
|
-
skill_dst = Path.home() / cfg["skill_dst"]
|
|
46
|
-
vf = skill_dst.parent / ".ckgraphify_version"
|
|
47
|
-
if skill_dst.exists():
|
|
48
|
-
vf.write_text(__version__, encoding="utf-8")
|
|
49
|
-
|
|
50
25
|
_SETTINGS_HOOK = {
|
|
51
26
|
# Claude Code v2.1.117+ removed dedicated Grep/Glob tools; searches now go through Bash.
|
|
52
27
|
# We match on Bash and inspect the command string to avoid firing on every shell call.
|
|
@@ -92,11 +67,6 @@ _PLATFORM_CONFIG: dict[str, dict] = {
|
|
|
92
67
|
}
|
|
93
68
|
|
|
94
69
|
|
|
95
|
-
def _claude_plugin_root() -> Path | None:
|
|
96
|
-
raw = os.environ.get("CLAUDE_PLUGIN_ROOT", "").strip()
|
|
97
|
-
return Path(raw).expanduser().resolve() if raw else None
|
|
98
|
-
|
|
99
|
-
|
|
100
70
|
def _claude_project_dir() -> Path | None:
|
|
101
71
|
raw = os.environ.get("CLAUDE_PROJECT_DIR", "").strip()
|
|
102
72
|
return Path(raw).expanduser().resolve() if raw else None
|
|
@@ -106,9 +76,6 @@ def _default_repos_root() -> Path:
|
|
|
106
76
|
project_dir = _claude_project_dir()
|
|
107
77
|
if project_dir is not None:
|
|
108
78
|
return project_dir / "repos"
|
|
109
|
-
plugin_root = _claude_plugin_root()
|
|
110
|
-
if plugin_root is not None:
|
|
111
|
-
return plugin_root / "repos"
|
|
112
79
|
return Path.home() / ".graphify" / "repos"
|
|
113
80
|
|
|
114
81
|
|
|
@@ -126,11 +93,7 @@ def install(platform: str = "claude") -> None:
|
|
|
126
93
|
print(f"error: {cfg['skill_file']} not found in package - reinstall ckgraphify", file=sys.stderr)
|
|
127
94
|
sys.exit(1)
|
|
128
95
|
|
|
129
|
-
|
|
130
|
-
installing_to_plugin = plugin_root is not None
|
|
131
|
-
if plugin_root is not None:
|
|
132
|
-
skill_dst = plugin_root / "skills" / "ckgraphify" / "SKILL.md"
|
|
133
|
-
elif platform == "claude" and os.environ.get("CLAUDE_CONFIG_DIR"):
|
|
96
|
+
if platform == "claude" and os.environ.get("CLAUDE_CONFIG_DIR"):
|
|
134
97
|
_claude_base = Path(os.environ["CLAUDE_CONFIG_DIR"])
|
|
135
98
|
skill_dst = _claude_base / "skills" / "ckgraphify" / "SKILL.md"
|
|
136
99
|
else:
|
|
@@ -149,7 +112,7 @@ def install(platform: str = "claude") -> None:
|
|
|
149
112
|
(skill_dst.parent / ".ckgraphify_version").write_text(__version__, encoding="utf-8")
|
|
150
113
|
print(f" skill installed -> {skill_dst}")
|
|
151
114
|
|
|
152
|
-
if cfg["claude_md"]
|
|
115
|
+
if cfg["claude_md"]:
|
|
153
116
|
# Register in ~/.claude/CLAUDE.md (Claude Code only)
|
|
154
117
|
claude_md = Path.home() / ".claude" / "CLAUDE.md"
|
|
155
118
|
if claude_md.exists():
|
|
@@ -163,13 +126,6 @@ def install(platform: str = "claude") -> None:
|
|
|
163
126
|
claude_md.parent.mkdir(parents=True, exist_ok=True)
|
|
164
127
|
claude_md.write_text(_SKILL_REGISTRATION.lstrip(), encoding="utf-8")
|
|
165
128
|
print(f" CLAUDE.md -> created at {claude_md}")
|
|
166
|
-
elif installing_to_plugin:
|
|
167
|
-
print(f" plugin root -> {plugin_root}")
|
|
168
|
-
|
|
169
|
-
# Refresh version stamps in all other previously-installed skill dirs so
|
|
170
|
-
# stale-version warnings don't fire for platforms not explicitly re-installed.
|
|
171
|
-
_refresh_all_version_stamps()
|
|
172
|
-
|
|
173
129
|
print()
|
|
174
130
|
print("Done. Open your AI coding assistant and type:")
|
|
175
131
|
print()
|
|
@@ -485,7 +441,6 @@ def _clone_repo(url: str, branch: str | None = None, out_dir: Path | None = None
|
|
|
485
441
|
|
|
486
442
|
Clones into ~/.graphify/repos/<owner>/<repo> by default so repeated
|
|
487
443
|
runs on the same URL reuse the existing clone (git pull instead of clone).
|
|
488
|
-
In Claude Code plugin mode, the cache lives under ${CLAUDE_PLUGIN_ROOT}/repos.
|
|
489
444
|
"""
|
|
490
445
|
import subprocess as _sp
|
|
491
446
|
import re as _re
|
|
@@ -539,15 +494,6 @@ def _clone_repo(url: str, branch: str | None = None, out_dir: Path | None = None
|
|
|
539
494
|
|
|
540
495
|
|
|
541
496
|
def main() -> None:
|
|
542
|
-
# Check all known skill install locations for a stale version stamp.
|
|
543
|
-
# Skip during install/uninstall (hook writes trigger a fresh check anyway).
|
|
544
|
-
# Skip during hook-check — it runs on every editor tool use and must be silent.
|
|
545
|
-
# Deduplicate paths so platforms sharing the same install dir don't warn twice.
|
|
546
|
-
_silent_cmds = {"install", "uninstall", "hook-check"}
|
|
547
|
-
if not any(arg in _silent_cmds for arg in sys.argv):
|
|
548
|
-
for skill_dst in {Path.home() / cfg["skill_dst"] for cfg in _PLATFORM_CONFIG.values()}:
|
|
549
|
-
_check_skill_version(skill_dst)
|
|
550
|
-
|
|
551
497
|
if len(sys.argv) >= 2 and sys.argv[1] in ("-v", "--version", "version"):
|
|
552
498
|
print(f"graphify {__version__}")
|
|
553
499
|
return
|
|
@@ -1887,10 +1833,6 @@ def main() -> None:
|
|
|
1887
1833
|
i += 1
|
|
1888
1834
|
else:
|
|
1889
1835
|
i += 1
|
|
1890
|
-
if repos_root is None:
|
|
1891
|
-
plugin_root = _claude_plugin_root()
|
|
1892
|
-
if plugin_root is not None:
|
|
1893
|
-
repos_root = plugin_root / "repos"
|
|
1894
1836
|
if repos_root is None:
|
|
1895
1837
|
print(
|
|
1896
1838
|
"Usage: graphify bridge-mtop --repos-root <path> [--graph-in in.json] "
|
|
@@ -300,9 +300,6 @@ def find_kg_banks_root(start: Path | None = None) -> Path | None:
|
|
|
300
300
|
|
|
301
301
|
|
|
302
302
|
def default_business_map_path(start: Path | None = None) -> Path:
|
|
303
|
-
plugin_root = os.environ.get("CLAUDE_PLUGIN_ROOT", "").strip()
|
|
304
|
-
if plugin_root:
|
|
305
|
-
return Path(plugin_root).expanduser().resolve() / "graphify-out" / "business-map.json"
|
|
306
303
|
root = find_kg_banks_root(start)
|
|
307
304
|
if root is not None:
|
|
308
305
|
return root / "graphify-out" / "business-map.json"
|
|
@@ -342,21 +339,6 @@ def resolve_bound_graph_path(map_path: Path, graph_ref: str) -> Path:
|
|
|
342
339
|
|
|
343
340
|
|
|
344
341
|
def default_business_graph_path(map_path: Path, start: Path | None = None) -> Path | None:
|
|
345
|
-
plugin_root = os.environ.get("CLAUDE_PLUGIN_ROOT", "").strip()
|
|
346
|
-
if plugin_root:
|
|
347
|
-
graphify_out = Path(plugin_root).expanduser().resolve() / "graphify-out"
|
|
348
|
-
graph = graphify_out / "graph.json"
|
|
349
|
-
if graph.exists():
|
|
350
|
-
return graph
|
|
351
|
-
legacy_graph = graphify_out / "graph-hc.json"
|
|
352
|
-
if legacy_graph.exists():
|
|
353
|
-
return legacy_graph
|
|
354
|
-
candidates = sorted(
|
|
355
|
-
p for p in graphify_out.glob("graph*.json")
|
|
356
|
-
if p.name != "business-map.json"
|
|
357
|
-
)
|
|
358
|
-
return candidates[0] if candidates else None
|
|
359
|
-
|
|
360
342
|
if Path(map_path).exists():
|
|
361
343
|
graph_ref = _business_map_graph_ref(load_business_map(Path(map_path)))
|
|
362
344
|
if graph_ref:
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "ckgraphify"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.2"
|
|
8
8
|
description = "AI coding assistant skill for Claude Code and Codex - graph-main boundary graphs, multi-repo call chains, business-map concepts, and business search"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "MIT"
|
|
@@ -15,8 +15,8 @@ The public API is `$ckgraphify ...`. Treat it as an assistant API: translate it
|
|
|
15
15
|
Before running any `graphify` command, prefer a project-local CLI. In a Claude plugin checkout, run the bundled setup script once per session:
|
|
16
16
|
|
|
17
17
|
```bash
|
|
18
|
-
if [ -n "${CLAUDE_PLUGIN_ROOT:-}" ] && [ -x "${CLAUDE_PLUGIN_ROOT}/scripts/
|
|
19
|
-
"${CLAUDE_PLUGIN_ROOT}/scripts/
|
|
18
|
+
if [ -n "${CLAUDE_PLUGIN_ROOT:-}" ] && [ -x "${CLAUDE_PLUGIN_ROOT}/scripts/prepare-ckgraphify.sh" ]; then
|
|
19
|
+
"${CLAUDE_PLUGIN_ROOT}/scripts/prepare-ckgraphify.sh"
|
|
20
20
|
export GRAPHIFY="${CLAUDE_PLUGIN_ROOT}/.graphify/bin/graphify"
|
|
21
21
|
else
|
|
22
22
|
command -v graphify >/dev/null 2>&1 || { echo "graphify is not installed; install ckgraphify with Python >= 3.10" >&2; exit 1; }
|
|
@@ -11,13 +11,13 @@ trigger: /ckgraphify
|
|
|
11
11
|
Before running any `graphify` command in the Claude plugin environment, ensure the project-local CLI is available by running the bundled setup script once per session:
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
|
-
"${CLAUDE_PLUGIN_ROOT}/scripts/
|
|
14
|
+
"${CLAUDE_PLUGIN_ROOT}/scripts/prepare-ckgraphify.sh"
|
|
15
15
|
export GRAPHIFY="${CLAUDE_PLUGIN_ROOT}/.graphify/bin/graphify"
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
The
|
|
18
|
+
The prepare script ensures the shared Python environment has `ckgraphify`, writes the plugin-local CLI wrapper, and runs `${CLAUDE_PLUGIN_ROOT}/scripts/sync-artifacts.sh`. If Bash does not inherit `${CLAUDE_PLUGIN_ROOT}`, the prepare script resolves the plugin root from its own script location. Before using the default graph or business map, the sync script queries the production kg-server (`KG_SERVER_URL`, default `https://kg-banks.alibaba.net`) for the lightweight latest manifest. If the remote graph/concept versions and checksums already match the local manifest, it does not download files.
|
|
19
19
|
|
|
20
|
-
If
|
|
20
|
+
If the plugin root cannot be determined from the skill context or the prepare script path, report that the Claude plugin environment is not active. Do not use macOS `/usr/bin/python3` or `sudo pip`. Do not inline the setup script from this skill; run the bundled script so quoting, checksum validation, and Python selection stay deterministic.
|
|
21
21
|
|
|
22
22
|
## User API
|
|
23
23
|
|
|
@@ -63,10 +63,10 @@ Show this API briefly.
|
|
|
63
63
|
Prefer existing deterministic commands:
|
|
64
64
|
|
|
65
65
|
```bash
|
|
66
|
-
"${GRAPHIFY:-graphify}" business-show --map
|
|
67
|
-
"${GRAPHIFY:-graphify}" business-query "<question>" --map
|
|
68
|
-
"${GRAPHIFY:-graphify}" business-trace --map
|
|
69
|
-
"${GRAPHIFY:-graphify}" main-trace --graph
|
|
66
|
+
"${GRAPHIFY:-graphify}" business-show --map "${CLAUDE_PLUGIN_ROOT}/graphify-out/business-map.json" --concept <concept>
|
|
67
|
+
"${GRAPHIFY:-graphify}" business-query "<question>" --map "${CLAUDE_PLUGIN_ROOT}/graphify-out/business-map.json" --graph "${CLAUDE_PLUGIN_ROOT}/graphify-out/graph.json" --trace --format text
|
|
68
|
+
"${GRAPHIFY:-graphify}" business-trace --map "${CLAUDE_PLUGIN_ROOT}/graphify-out/business-map.json" --graph "${CLAUDE_PLUGIN_ROOT}/graphify-out/graph.json" --concept <concept> --scenario <scenario> --flow <flow> --max-depth <n> --sources
|
|
69
|
+
"${GRAPHIFY:-graphify}" main-trace --graph "${CLAUDE_PLUGIN_ROOT}/graphify-out/graph.json" --from <exact-node> --api <api> --max-depth <n> --sources --prefer-repo <repo> --exclude-repo <repo>
|
|
70
70
|
```
|
|
71
71
|
|
|
72
72
|
## Graph Scope
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|