-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Problem
Domain entity pages on repos.supermodeltools.com show no connections between domains. The Supermodel API returns inter-domain relationships (e.g., DOMAIN_RELATES, dependsOn, processes_requests_from) in graph.relationships, but graph2md silently drops them because the relationship switch block in internal/graph2md/graph2md.go has no handler for domain-to-domain relationship types.
Expected Behavior
When the Supermodel graph contains relationships between Domain nodes, the generated markdown should:
- Include a "Related Domains" section in the domain body
- Show related domains in the Mermaid diagram with labeled arrows
- Include related domain edges in the
graph_dataJSON frontmatter
Root Cause
The relationship indexing switch block (~line 167) only handles known types (IMPORTS, calls, belongsTo, etc.). Any relationship type connecting two Domain nodes falls through silently. No domainEdge struct or index maps exist for domain-to-domain relationships.
Fix
- Add a
domainEdgestruct anddomainRelatesOut/domainRelatesInindex maps - Catch domain-to-domain relationships in a
defaultcase - Thread the new maps through
renderContext - Update
writeGraphData(),writeMermaidDiagram(), andwriteDomainBody()for Domain entities
Migrated from https://github.com/supermodeltools/graph2md/issues/1