Skip to content

feat(graphify-plugin): add Graphify knowledge-graph skill plugin - #171

Open
tahatehran wants to merge 2 commits into
zai-org:mainfrom
tahatehran:feat/graphify-plugin
Open

tahatehran wants to merge 2 commits into
zai-org:mainfrom
tahatehran:feat/graphify-plugin

Conversation

@tahatehran

Copy link
Copy Markdown

Plugin type (required) / 插件类型(必填)

  • UI Plugin / 是 UI 插件 — provides MCP Apps interactive pages / 提供 MCP Apps 交互页面
  • Standard plugin / 普通插件(非 UI) — does not provide MCP Apps interactive pages / 不提供 MCP Apps 交互页面
  • Not applicable / 不适用 — repository-only changes / 仅仓库级改动

Affected plugin name(s) / 涉及的插件名称: graphify-plugin

What / 改动内容

EN: Adds Graphify (external_plugins/graphify-plugin/), a knowledge-graph skill plugin. It scans a project directory (code, docs, config files), extracts files, symbols, imports and doc references, and produces three artifacts under <target>/.graphify/: graph.json (queryable via 9 commands in query_graph.py), a self-contained interactive graph.html (no CDN), and graph-report.md (hubs, orphan/dead code, external deps, broken doc links). The agent then answers structural questions from the graph instead of re-reading the repo.

中文: 新增 Graphify 插件(external_plugins/graphify-plugin/):将代码库转换为可查询的知识图谱。扫描代码、文档与配置文件,提取文件、符号、import 与文档引用,在 <target>/.graphify/ 下生成三个产物:可查询的 graph.json(query_graph.py 提供 9 个查询命令)、自包含的交互式 graph.html(无 CDN)与 graph-report.md(枢纽文件、孤立/死代码、外部依赖、失效文档链接)。智能体据此回答结构性问题,无需反复阅读整个仓库。

Testing / 测试

  • Plugin repo CI (ubuntu + windows), green: https://github.com/movtigroup/Graphify-plugin/actions — tests/validate.py (structure) + tests/smoke_test.py (end-to-end build+query on a fixture with Python/JS/docs/config).
  • In this repo: python scripts/validate.py → OK: 53 plugin(s) validated; git diff --check clean.
  • python scripts/build_dist.py could not complete locally: UI-plugin builds require the pnpm toolchain (Node ≥ 24 per package.json engines; local env has Node 22 and two registry downloads were cut by network resets). The failure occurs on excalidraw — pre-existing on upstream main without UI builds, unrelated to this stdlib-only plugin. Please let CI exercise it.
  • Manually exercised in ZCode: build on a sample project, verified JSON/report/HTML artifacts; the interactive HTML was verified rendering in a browser (force layout, search, legend, tooltips).

Dependencies / network / permissions / side effects

  • Python 3.8+ on PATH (Windows fallback py -3). Scripts are stdlib-only: no pip installs, no third-party code, no assets, no network access at runtime.
  • Side effects: writes exactly three files under <scanned-target>/.graphify/ (graph.json, graph.html, graph-report.md); output paths are containment-checked (realpath + commonpath) and cannot escape the output directory.
  • No credentials, private endpoints, machine-specific paths, obfuscated code, or prebuilt binaries.

Licensing / provenance

  • Plugin code and docs: MIT © Movti Group (LICENSE included in the plugin dir).
  • No third-party code, assets, or services bundled.

Marketplace registration

  • New plugin directory: external_plugins/graphify-plugin/
  • Root marketplace.json entry added with matching name/version/description (graphify-plugin @ 0.1.0), category developer-tools.

Self-check / 自查清单

  • Plugin name is unique kebab-case; new external plugin directory is external_plugins/graphify-plugin/; existing fixes retain ownership
  • Usage category is set independently of publisher ownership (developer-tools)
  • .zcode-plugin/plugin.json has name, description, description_i18n, version, author; matches the marketplace entry
  • Both README.md and README_CN.md are present; side effects documented in both
  • No secrets, private data, or machine-specific paths included
  • validate.py and git diff --check pass locally; build_dist.py noted above (local toolchain gap, pre-existing)

Graphify scans a codebase (code, docs, configs) into a queryable knowledge graph and ships three artifacts under <target>/.graphify/: graph.json (9 query commands), a self-contained interactive graph.html, and a markdown report. Stdlib-only Python 3.8+, no network access, output paths containment-checked. Includes README.md + README_CN.md, sample fixture and end-to-end smoke test.
@panda920

panda920 commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator

✅ Internal validation passed. A ZCode maintainer will review the change next; after acceptance, release checks run separately and this PR is closed automatically.

@tahatehran

Copy link
Copy Markdown
Author

Local baseline update (Windows machine) — verification receipts:

  • python scripts/validate.py → OK: 53 plugin(s) validated ✅
  • git diff --check → clean ✅
  • Ran the official packager (build_dist.build_zip + build_index_entry — the exact code path CI runs) directly on external_plugins/graphify-plugin: produced a valid 19-entry artifact, 25,145 bytes, sha256 801f126c…. ui-plugins/graphify-plugin does not exist, so the "run pnpm build first" completeness gate does not apply to this plugin — full build_dist.py in CI will package it without any UI toolchain.
  • Full local pnpm build on Windows currently fails in third-party UI plugins, unrelated to this PR:
    1. ui-plugins/excalidraw/scripts/build.mjs:90 — f.path.split("/").pop(): on Windows the esbuild output paths use backslashes, so .pop() returns the entire absolute path and the write becomes dist\ui\C:\…\main.js.LEGAL.txt (ENOENT). f.path.split(/[\\/]/).pop() fixes it. I patched it locally only to unblock the run — not part of this PR.
    2. photocraft requires Rust 1.95 + wasm32-unknown-unknown toolchain (offer to install via CRAFT_TOOLCHAIN_INSTALL=1).
      Both pre-exist on main and are covered by the CI toolchain; flagging in case a Windows contributor-pass is desired.

@panda920

Copy link
Copy Markdown
Collaborator

❌ Internal validation failed:

FAIL: 7 problem(s)
  - plugins/happyhorse-video: directory not registered in marketplace.json
  - plugins/hi3d-3d: directory not registered in marketplace.json
  - plugins/hyper3d-3d: directory not registered in marketplace.json
  - plugins/image-generation: directory not registered in marketplace.json
  - plugins/meshy-3d: directory not registered in marketplace.json
  - plugins/video-generation: directory not registered in marketplace.json
  - external_plugins/rfauto: directory not registered in marketplace.json

Please fix it and push again; the check re-runs automatically.

🤖 Copy this prompt into Claude Code / Codex to fix it
You are updating my pull request #171 to github.com/zai-org/zcode-plugins (the ZCode plugin marketplace).
The maintainers' automated intake reported: `python scripts/validate.py` failed

Validator output:
FAIL: 7 problem(s)
  - plugins/happyhorse-video: directory not registered in marketplace.json
  - plugins/hi3d-3d: directory not registered in marketplace.json
  - plugins/hyper3d-3d: directory not registered in marketplace.json
  - plugins/image-generation: directory not registered in marketplace.json
  - plugins/meshy-3d: directory not registered in marketplace.json
  - plugins/video-generation: directory not registered in marketplace.json
  - external_plugins/rfauto: directory not registered in marketplace.json

Fix it in this repository:
- New external plugins belong under external_plugins/<my-plugin>/; keep existing plugins in their current directory;
  never modify .github/, scripts/, tests/, .gitignore, .gitattributes or AGENTS.md.
- Follow CONTRIBUTING.md and AGENTS.md: the manifest lives at <plugin-directory>/.zcode-plugin/plugin.json,
  its name/version must match marketplace.json, names are kebab-case, keep the required i18n fields.
- Fetch the latest main of zai-org/zcode-plugins and rebase onto it; if marketplace.json conflicts,
  keep every existing entry and re-add mine.
- Run `python scripts/validate.py` until it passes, then force-push my PR branch.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants