Focus: graph
A graph directive asks architxt to explore the contextual graph itself: entities, edges, and the relationships that connect them. Unlike a diagram, which produces a static visual flowchart, a graph focus gives you an interactive network view that you can pan, zoom, filter, and inspect in the Preview tab.
When to use a graph focus
Use a graph focus when you want:
- An interactive map of entities and their relationships.
- To explore neighbours, paths, or clusters rather than read a fixed visual.
- To start from one entity and discover what it connects to.
- Output that invites exploration before you settle on a static diagram or narrative.
What a graph envelope looks like
A graph envelope contains one or more graph blocks. Each block has:
| Field | Purpose |
|---|---|
| Name | The title shown above the graph canvas. |
| Nodes | The entities rendered as interactive nodes. Each node shows its entity label and type. |
| Edges | The relationships between entities. Edge labels describe the relationship type or role. |
| Details panel | A side panel that opens when you select a node or edge. It shows properties, evidence, and attached mental models. |
Graph blocks are rendered inside an interactive canvas in the Preview tab. They are exploration-first views: you cannot directly edit the graph nodes and edges. The graph changes only when the underlying query or merged mental-model graph changes.
Preview controls
Graph previews share the common envelope controls and add graph-specific exploration tools.
| Control | Behavior |
|---|---|
| Zoom / Pan | Scroll or pinch to zoom; drag the canvas to pan around the graph. |
| Filter | Hide nodes by type, edge label, or entity count to reduce visual noise. |
| Search | Jump to and highlight a node by name or entity type. |
| Details | Opens a panel with full properties and evidence for the selected node or edge. |
| Focus | Opens the graph in a modal where you can add its content to a curated page. Fit-to-page is enabled when the modal opens. |
The Focus modal
The Focus modal is the main action surface for a graph. It opens the graph in a larger view and exposes controls for turning the graph into other section types.
| Action | Result |
|---|---|
| Add diagram to page | Converts the graph into a Mermaid diagram section on the active curated page. Evidence attached to nodes and edges is carried over to the diagram. |
| Add table to page | Converts the graph into a table section on the active curated page, giving you a structured view of nodes, edges, or both. |
| Copy | Copies the graph source or image, depending on the control you use. |
| Fit to page | The modal opens with fit-to-page enabled so the whole graph is visible at a glance. |
A curated page cannot hold a live graph section. Instead, the Focus modal lets you add a diagram (static Mermaid flowchart) or a table derived from the graph. The graph itself stays read-only in the Preview tab.
From graph to curated page
The typical flow is:
- Ask a Reflect question that requests a graph, or open a mental model whose output is a graph.
- Inspect the interactive canvas in the Preview tab.
- Pan, zoom, and filter until the important relationships are visible.
- Select nodes to read their details and evidence.
- Open the Focus modal and choose Add diagram to page or Add table to page.
- In the curated page, edit the generated diagram source or table cells, then save the page.
Relationship to other focus pages
Graphs and diagrams are closely related but serve different purposes. A graph is for exploration; a diagram is for presentation. Narrative and table sections can sit alongside either one, giving you prose context and structured data next to the visual.
- Focus: narrative for prose sections.
- Focus: diagram for static Mermaid flowcharts.
- Focus: table for structured grid sections.
- Preview and curated pages for the tab model this focus type fits into.
Summary
The graph focus turns Reflect output into an interactive network canvas. Previews give you zoom, filter, search, and details controls; the Focus modal converts the graph into a diagram or table section on a curated page.