Skip to content

feat(web): memory-network graph view — render the kb as a pannable graph, pending included #604

Description

@plind-junior

What you're trying to do

vouch knows the shape of its own knowledge — claims cite sources, pages cite
claims, entities and relations link across both, and provenance/graph.py
already walks those edges. there is no way to look at it. kb.graph_export
emits graphviz dot and the webapp has browse/claims/pending/sessions/stats
views but nothing that renders the graph.

ditto's flagship screen (heyditto.ai/docs/memory-network) is a pannable,
zoomable graph of memories with click-for-detail. it is the single most legible
thing about their product, and it is the one place where a system that has
strictly better data than vouch's competitors shows less of it.

What you've tried

  • kb.graph_export --format dot → correct data, requires graphviz and a
    separate render step; not interactive, not linked to the review flow.
  • kb.neighbors → right primitive, one hop, json, no layout.
  • BrowseView → lists, not topology. you cannot see that a page is propped up
    by one lonely claim, or that an entity has no inbound citations.

Suggested shape

two parts, one issue:

  1. kb.graph_export gains format="json"{nodes: [{id, kind, label, status}], edges: [{src, dst, kind}]}. same walk, new serializer; the dot
    path stays byte-identical so nothing downstream breaks.
  2. webapp/src/views/MemoryNetworkView.tsx beside BrowseView, wired into
    Shell. pan/zoom, click a node → existing ArtifactDrawer, node colour by
    status so pending proposals are visually distinct from approved
    knowledge, and edge style by kind (cites / supersedes / relates).

colouring by status is the part that matters. the graph is not decoration — it
is the review gate rendered. a reviewer should be able to see the pending
frontier of the KB at a glance.

Compatibility considerations

additive. no schema change, no storage change, no new kb.* method (existing
method gains a format value, so no four-site registration needed). the json
format is opt-in; dot stays the default.

Alternatives

  • ship only the json format and let people bring their own renderer — cheaper,
    but leaves the visible-artifact gap open.
  • render server-side to svg in src/vouch/web/ — no interactivity, and the
    webapp is the primary UI target.

part of the ditto-style track — see .superpowers/DITTO-STYLE-PLAN.md (T1.1).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestmcpmcp, jsonl, and http surfacesreview-uibrowser review ui

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions