graphify icon indicating copy to clipboard operation
graphify copied to clipboard

Offer: OKF (Open Knowledge Format) exporter/importer bridge — in-tree or standalone?

Open asphwathpc opened this issue 4 months ago • 0 comments

Summary

Offering an integration: graphify-okf-bridge is a standalone tool that exports graph.json to/from Google's Open Knowledge Format (vendor-neutral markdown+YAML knowledge bundles), plus a linker that infers cross-silo edges between code nodes and OKF data/table concepts (dbt ref()/source(), SQL literal matching, exact-name fallback — all INFERRED confidence, precision-first).

Concretely this lets a merged graph answer things like graphify path "stg_orders.sql" "customers", ending in a reads_from [INFERRED] edge that crosses from application/pipeline code into a BigQuery table concept imported from an OKF bundle (e.g. Google's own GA4 sample bundle). Demo'd end-to-end against a real dbt-labs/jaffle-shop checkout + the GA4 bundle — see demo/.

What it does today (standalone)

  • okf-bridge export <graph.json> <bundle-dir> — Graphify graph → OKF bundle, passes okf-bridge validate --strict.
  • okf-bridge import <bundle-dir> <graph.json> — any OKF bundle (including foreign/official ones, e.g. GA4) → a graph.json mergeable via graphify merge-graphs.
  • okf-bridge link --repo-root <repo> <graph.json> <bundle-dir> — infers code↔data edges, output is self-contained so it composes cleanly with merge-graphs (each link() run emits both endpoints of every edge it produces, avoiding cross-file id-reuse issues we hit with merge-graphs's per-file namespacing).
  • Ships a skill/SKILL.md (okf-bridge install-skill, mirroring graphify install) and documents the MCP path (Graphify's own graphify.serve already covers it — no second server needed).

Ask

Would an okf-format exporter/importer be something Graphify core wants in-tree (e.g. graphify export okf / graphify import okf), or is a standalone bridge (current state, already on PyPI as graphify-okf-bridge) the preferred shape? Happy to contribute a PR either way — wanted to check appetite before proposing a specific integration surface, since this touches merge-graphs composability and might warrant design input from maintainers first.

asphwathpc avatar Jul 11 '26 18:07 asphwathpc