Skip to content

feat(grafiphy): add ELI5 pseudocode diagram generation for PR reviews - #6

Merged
ChonSong merged 7 commits into
masterfrom
feat/grafiphy-diagrams
Jul 28, 2026
Merged

ChonSong merged 7 commits into
masterfrom
feat/grafiphy-diagrams

Conversation

@ChonSong

@ChonSong ChonSong commented Jul 27, 2026 •

Copy link
Copy Markdown
Owner

Summary

Add grafiphy module that generates ELI5 pseudocode diagrams for PR reviews using real graphify data.

What's New

  • grafiphy/orchestrator.py — Coordinates renderers, labeler, and GitHub upload
  • grafiphy/labeler.py — Template-based label generator with strict format rules
  • grafiphy/renderers/sankey.py — Flow/pipeline diagrams (matplotlib)
  • grafiphy/renderers/mermaid.py — Sequence/call-flow diagrams (Playwright + Mermaid.js)
  • grafiphy/renderers/architecture.py — System topology diagrams (matplotlib)
  • grafiphy/renderers/graphify_tree.py — Dependency tree screenshots (Playwright)

Label Rules (Strict)

  1. Every label MUST include exact code names in backticks
  2. "(not Z)" ONLY for real decisions visible in code
  3. Edges: "sends X to Y" (payload + target)
  4. 5-8 words per label

Integration

  • Companion calls grafiphy on PR events when COMPANION_ENABLE_DIAGRAM=1
  • Diagrams uploaded to GitHub release assets
  • Embedded in TL;DR comments as Markdown images

Testing

Tested end-to-end on PR #73 (hermes-webui-extensions). See comment: hermes-webui/hermes-webui-extensions#73 (comment)

Summary by CodeRabbit

  • New Features
    • PR reviews can now include a single Excalidraw-style diagram summarizing code flow and relationships.
    • Review automation can add inline suggestions and structured review summaries.
  • Bug Fixes
    • Updated reaction GIFs now provide distinct animations for supported review categories.
    • Improved handling of incomplete issue-comment metadata.
  • Improvements
    • Automated reviews avoid repeating work for the same change or within a 24-hour window.
  • Documentation
    • Added documentation describing diagram generation and review integration.

Loading
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