{% extends "base.html" %} {% import "_links.html" as links with context %} {% block title %}Knowledge Graph — Cairn Dashboard{% endblock %} {% block view_title %}Knowledge Graph{% endblock %} {% block content %}

Knowledge graph

The knowledge layer as a canvas — ingested documents and memory items as nodes, their stored relationships as directed edges. One edge per indexed row, so a supersede pair reads as the two-way link ("supersedes" on the newer item, "superseded-by" on the older) the related CLI and the detail panels report. Inferred links render dashed; extracted and derived links solid. Diamonds are memory items; dots are documents.

{% if graph.nodes %} {#- Legend as filter (the /graph pattern): kind + relation chips toggle whole edge groups via client-side DataSet updates — a filter change never reloads or refetches. Hidden until filled; the script renders the chips from the same data the canvas drew, so they cannot drift. -#}

{#- The canvas script rewrites this line with the live shown/total share as legend filters toggle. -#} {{ graph.metadata.node_count }} items — {{ graph.metadata.edge_count }} edges shown

{#- Overlay controls float over the canvas's bottom-left; the canvas script wires the data-graph-action buttons to vis zoom/fit. -#}
{#- Inspect panel: a node click fetches the doc's summary fragment from /knowledge/graph/inspect into this panel (the canvas owns the click, the server owns the markup). Hidden when nothing is selected so the canvas keeps the full width. -#}
{#- A selected store rides the page for the inspect fetch, the same #graph-data data-store seam /graph uses. -#} {% else %}

No knowledge documents — ingest some first: cairn knowledge ingest.

{% endif %}
{% endblock %} {% block scripts %} {% if graph.nodes %} {% endif %} {% endblock %}