Skip to content

Domain entity pages show no inter-domain relationships #6

@jonathanpopham

Description

@jonathanpopham

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:

  1. Include a "Related Domains" section in the domain body
  2. Show related domains in the Mermaid diagram with labeled arrows
  3. Include related domain edges in the graph_data JSON 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 domainEdge struct and domainRelatesOut/domainRelatesIn index maps
  • Catch domain-to-domain relationships in a default case
  • Thread the new maps through renderContext
  • Update writeGraphData(), writeMermaidDiagram(), and writeDomainBody() for Domain entities

Migrated from https://github.com/supermodeltools/graph2md/issues/1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions