Commit Graph
206 Commits
Author SHA1 Message Date
dsremo c3ba79f5aa feat(tree): graphify tree — D3 v7 collapsible-tree HTML emitter
Adds a new `graphify tree` subcommand that emits a self-contained D3
v7 collapsible-tree HTML view of an existing graph.json.

Why
---
The existing `graph.html` (force-directed) is great for finding hubs
and unexpected connections.  But for code review and onboarding, a
hierarchical tree-of-modules view is much faster: you can collapse
everything and expand only the package you care about, the depth-
based colour palette gives instant orientation, and the layout
mirrors the on-disk structure.

UX choices include expand-all / collapse-all / reset-view buttons,
multi-line `wrapText` labels with separately-coloured name and count,
a depth-based palette, click-to-toggle subtrees, and a hover-inspector
that surfaces the top-K outbound edges per symbol.

Implementation
--------------
- `graphify/tree_html.py` (575 LOC, single file, no new runtime
  dependencies).  D3 v7 is loaded from cdn.jsdelivr.net at view time.
- Hierarchy is built from `source_file` longest-common-prefix;
  symbols are grouped by containing module so the tree mirrors the
  on-disk layout exactly.
- Inspector pre-computes top-K outbound edges per symbol so the page
  works fully offline once loaded.
- `__main__.py` adds the subcommand + help text after the
  `check-update` block.

Configuration
-------------
- `--graph PATH`     path to graph.json (default: graphify-out/graph.json)
- `--output HTML`    output path (default: graphify-out/GRAPH_TREE.html)
- `--root PATH`      filesystem root (default: LCP of source_files)
- `--max-children N` cap visible children per node (default: 200)
- `--top-k-edges N`  per-symbol outbound edges in inspector (default: 12)
- `--label NAME`     project label shown in the page header

Tested locally on a 17 641-node graph — emits a 4.9 MB HTML file
that renders smoothly in Firefox / Chromium.
2026-04-26 10:24:36 +05:30
Safi 770d7f54c4 Add The Memory Layer book badge to README 2026-04-25 15:56:59 +01:00
Safi 8bed332ff4 release: bump to v0.5.0 — clone, merge-graphs, shrink guard, dedup, bug fixes v0.5.0 2026-04-23 20:09:03 +01:00
Safi df9b7ec54f fix #479 #451: build_merge(), pre-write shrink guard, label dedup, chunk-suffix prompt block 2026-04-23 20:04:43 +01:00
Safi 2faeed99a2 feat: cross-repo merge-graphs; fix #527 CLAUDE_CONFIG_DIR; fix #524 graphify-out excluded from source scan 2026-04-23 19:59:14 +01:00
Safi 2c49da24f0 feat: graphify clone <github-url> — clone any repo and run full pipeline on it 2026-04-23 19:49:56 +01:00
Safi 5843ffc277 gitignore: exclude local benchmark scripts from repo 2026-04-23 19:38:54 +01:00
Safi b326aa83c4 update README: add check-update command, Java inheritance note 2026-04-22 23:32:25 +01:00
Safi e915a877e2 bump to v0.4.31 2026-04-22 23:28:22 +01:00
Safi 64f38acf3e implement #488 #482 #472 #490: legacy schema canonicalization, Java inheritance, aggregated HTML viz, check-update subcommand 2026-04-22 23:28:09 +01:00
Safi e4bdcc2487 add tests for canvas vault-relative paths and hook .exe skip 2026-04-22 23:04:40 +01:00
Safi 8981f7c8ef bump to v0.4.30 2026-04-22 23:02:41 +01:00
Safi 4bc20527c3 fix #513 #514: skip head -1 on .exe hook binary, fix to_canvas() hardcoded obsidian path 2026-04-22 23:01:53 +01:00
Safi 85e713644e bump to v0.4.29 2026-04-22 09:28:41 +01:00
Safi 52ad45bd27 fix #504: export PYTHONUTF8=1 in Step 1 to prevent garbled CJK output on Windows 2026-04-22 09:28:26 +01:00
Safi 86d6d9317f fix #498: opencode config to .opencode/opencode.json, fix skill temp file paths, add --wiki step 2026-04-22 09:19:53 +01:00
SafiandClaude Sonnet 4.6 d9b2928da1 fix: deterministic GRAPH_REPORT on large graphs, stable edge node IDs, correct common-root inference
- analyze.py: add seed=42 to betweenness_centrality() — eliminates non-deterministic GRAPH_REPORT.md diffs on graphs >1000 nodes (#499)
- extract.py: fix common-root inference to stop at first diverging segment not sum of all matches (#502)
- extract.py: resolve root to absolute path; post-process file node IDs to project-relative after extraction so graph.json edge endpoints are stable across machines (#502)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
v0.4.27
2026-04-22 09:04:38 +01:00
SafiandClaude Sonnet 4.6 f8fd8f8479 fix: wiki encoding+collisions, hook rebase guard, detect path resolve, readme gitignore docs
- wiki.py: add encoding="utf-8" to all write_text() calls (fixes Windows cp1252 crash #496)
- wiki.py: deduplicate filenames with _unique_slug() to prevent silent article overwrites (#497)
- hooks.py: skip post-commit/post-checkout during rebase/merge/cherry-pick (#485)
- detect.py: resolve root path at detect() entry so .graphifyignore patterns match consistently (#495)
- README.md: document manifest.json, cost.json gitignore and .graphifyignore platform file examples (#369)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
v0.4.26
2026-04-22 06:26:15 +01:00
Safi f938714df0 make logo link to graphifylabs.ai 2026-04-21 22:51:21 +01:00
SafiandClaude Sonnet 4.6 7cb639ae5d fix(report): complete empty-community fix — hubs, summary count, thin-community gaps; add graph-query CLI rules to install sections
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
v0.4.25
2026-04-21 22:42:53 +01:00
SafiandClaude Sonnet 4.6 39bf0a3f80 Move translations/ to docs/translations/
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 22:36:20 +01:00
SafiandClaude Sonnet 4.6 e241ce96cf Bump version to 0.4.24
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
v0.4.24
2026-04-21 22:30:44 +01:00
SafiandClaude Sonnet 4.6 dbde78ca03 Fix four bugs from community PRs
- cache: skip directory source_file in save_cached to prevent IsADirectoryError (#444)
- report: skip structural-only communities with no real nodes (#443)
- hooks: allow @ in python path allowlist for Homebrew paths (#474)
- watch: keep source_file paths project-relative after rebuild (#434)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 22:26:17 +01:00
SafiandClaude Sonnet 4.6 9c3d0fa517 Fix chunk temp files not cleaned up after graph build
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 22:21:37 +01:00
SafiandClaude Sonnet 4.6 69d4d7e9c3 Move 27 translation READMEs to translations/ subdirectory
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 22:14:53 +01:00
SafiandClaude Sonnet 4.6 2a35d7fd38 Add 17 language translations and expand language bar to 28 languages
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 22:12:55 +01:00
SafiandClaude Sonnet 4.6 ed4f12ab82 add country flags to language links, remove Trendshift badge
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 21:53:36 +01:00
SafiandClaude Sonnet 4.6 de136676ef add Trendshift badge and move star history to top of README
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 21:51:22 +01:00
SafiandClaude Sonnet 4.6 339d9783fb add multilingual READMEs: de, fr, es, hi, pt, ru, ar; fix .agents refs in README
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 21:47:46 +01:00
SafiandClaude Sonnet 4.6 4738e88aaf fix #453 antigravity install uses .agents not .agent, fix #436 _is_sensitive false positives on directory names, fix #433 update command writes absolute paths in artifacts
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 21:33:33 +01:00
Safi 81b6e7d7b4 fix #455 #448 IsADirectoryError in file_hash and save_semantic_cache, fix #454 sanitize_label crash on None source_file 2026-04-21 21:25:13 +01:00
Safi f0ebd07fd5 Improve packaging: uv tool install support, fix interpreter detection on Mac/Linux 2026-04-21 21:11:27 +01:00
Safi 2fd15115d9 Center language links and badges 2026-04-21 11:37:13 +01:00
Safi 0973af2be0 Add dark background to text logo 2026-04-21 11:34:33 +01:00
Safi 3bf096438f Add Graphify text logo to README 2026-04-21 11:33:35 +01:00
Safi 45643380d1 Add logo to README 2026-04-21 11:31:28 +01:00
Safi 0f30cfb6ad Add logo icon SVG 2026-04-20 19:13:40 +01:00
Safi cc53e00bcc readme: revert to pepy.tech total downloads badge 2026-04-18 16:52:36 +01:00
Safi 3f5df2513b readme: show 200k+ total downloads badge 2026-04-18 16:51:36 +01:00
Safi 6892fd9309 readme: swap pepy badge for shields.io downloads 2026-04-18 16:50:15 +01:00
Safi 9c2275ad82 fix #432 to_html crash on large graphs, fix #431 Go import node ID collision v0.4.23 2026-04-18 10:54:39 +01:00
Safi d67436c065 v0.4.23: fix #178 stale version stamp, fix #260 add .html to DOC_EXTENSIONS 2026-04-18 10:47:37 +01:00
Safi f8a5328197 readme: add pipx as alternative install method 2026-04-18 09:51:38 +01:00
Safi 8171abf583 readme: add .mdx to docs extensions table 2026-04-18 09:50:14 +01:00
Safi c24cde9d9e v0.4.22: fix #429 AST cache root, fix #428 add .mdx to DOC_EXTENSIONS v0.4.22 2026-04-18 09:47:06 +01:00
Safi d0d8d80581 bump to 0.4.21, changelog v0.4.21 2026-04-17 20:33:28 +01:00
Safi 8666c6994c v0.4.21: fix #422 cluster-only KeyError total_files, fix #423 --update drops existing nodes 2026-04-17 20:33:06 +01:00
Safi 72d9779aaf readme: clarify graph.html opens in any browser 2026-04-17 15:50:05 +01:00
Safi 1805813a56 bump to 0.4.20, changelog v0.4.20 2026-04-17 15:48:30 +01:00
Safi a507c97822 v0.4.20: fix #414 JS imports_from path normalisation, fix #418 graph.html missing from CLI 2026-04-17 15:47:56 +01:00