Skip to content

feat(graph): viz upgrade + GraphML/DOT/Neo4j exports (Phase 4/4)#15

Merged
denfry merged 1 commit into
mainfrom
feat/viz-and-exports
Jun 23, 2026
Merged

feat(graph): viz upgrade + GraphML/DOT/Neo4j exports (Phase 4/4)#15
denfry merged 1 commit into
mainfrom
feat/viz-and-exports

Conversation

@denfry

@denfry denfry commented Jun 23, 2026

Copy link
Copy Markdown
Owner

Phase 4 of 4 (final) — porting safishamsi/graphify into codebase-index

Stacked on #14#13#12. Last in the chain. GitHub retargets the base as each merges.

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, dashed inferred, red-dotted ambiguous, 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:

    • GraphML → Gephi / yEd / NetworkX (node attrs: kind, name, path, community, degree; edge attrs: edge_type, confidence)
    • DOT → Graphviz (edge style encodes confidence)
    • Cypher → Neo4j / FalkorDB (MERGE statements)

    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, and graph --format, kept in sync via scripts/sync_skill_copies.py.

Notes

  • The analysis community/degree functions are now generic over the node-key type (tuple keys in analyze, string keys in the export) — same deterministic algorithm, two call sites.

Tests / CI

  • export format tests (graphml well-formed, dot, neo4j, invalid-format rejected) + enriched-HTML assertions; skill copies verified in sync.
  • pytest: 395 passed, 14 skipped · ruff: clean · mypy: clean

🤖 Generated with Claude Code

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@denfry denfry force-pushed the feat/path-describe-navigation branch from c72d05b to a6e2c81 Compare June 23, 2026 20:52
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>
@denfry denfry force-pushed the feat/viz-and-exports branch from 5470231 to 2e1e7d2 Compare June 23, 2026 20:53
@denfry denfry changed the base branch from feat/path-describe-navigation to main June 23, 2026 21:01
@denfry denfry merged commit 9542fe2 into main Jun 23, 2026
10 checks passed
@denfry denfry deleted the feat/viz-and-exports branch June 23, 2026 21:13
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.

1 participant