feat(graph): viz upgrade + GraphML/DOT/Neo4j exports (Phase 4/4)#15
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5470231592
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "target": dst_key, | ||
| "type": row["edge_type"], | ||
| "line": row["line"], | ||
| "confidence": row["confidence"] if "confidence" in row.keys() else "extracted", |
There was a problem hiding this comment.
Include ambiguous edges in graph exports
When a build leaves an edge unresolved, such as an external import or a non-unique symbol name, build_graph marks it with confidence = 'ambiguous' while keeping resolved = 0; _edge_rows still filters to WHERE e.resolved = 1, so the newly exported confidence field can never be ambiguous in normal indexes. This makes the HTML legend and GraphML/DOT/Neo4j confidence export imply that no ambiguous edges exist even when the index contains them; either include unresolved edges as named/external nodes or avoid advertising/exporting the ambiguous style here.
Useful? React with 👍 / 👎.
c72d05b to
a6e2c81
Compare
Phase 4 (final) of porting graphify into codebase-index. - HTML graph: nodes coloured by module (community), sized by connectivity, edges styled by confidence (solid/dashed/red-dotted) with a legend. Community + degree computed on the displayed subgraph. - `graph --format graphml|dot|neo4j`: export the enriched graph for Gephi/yEd, Graphviz, and Neo4j/FalkorDB. Pure-stdlib, zero new deps. html stays default. - analysis community/degree functions generalised over node-key type (tuple in analyze, str in export). - Skill template + all installed copies document architecture/path/describe and graph --format. Tests for every export format + enriched HTML. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
5470231 to
2e1e7d2
Compare
Phase 4 of 4 (final) — porting safishamsi/graphify into codebase-index
Closes the loop: the graph is now legible and portable.
Added
HTML graph upgrade — nodes coloured by module (community), sized by connectivity (god nodes biggest), edges styled by confidence: solid
extracted, dashedinferred, red-dottedambiguous, with a legend. Community + degree are computed on the displayed subgraph, reusing the Phase-1 analysis engine.codebase-index graph --format graphml|dot|neo4j— export the same enriched graph for external tools:All pure-stdlib, zero new dependencies.
--format html(default) unchanged.Skill docs — the canonical skill template + all installed copies (claude/codex/opencode/plugin/installer) now document
architecture,path,describe, andgraph --format, kept in sync viascripts/sync_skill_copies.py.Notes
analysiscommunity/degree functions are now generic over the node-key type (tuple keys inanalyze, string keys in the export) — same deterministic algorithm, two call sites.Tests / CI
pytest: 395 passed, 14 skipped ·ruff: clean ·mypy: clean🤖 Generated with Claude Code