set_diagram
Create or replace a code-review diagram from nodes and links to map impact, process flow, or concepts; the GUI lays it out and colors nodes by status.
Instructions
Create a diagram, or fully replace the one with diagram_id, when a picture helps the reviewer (impact perimeter, process flow, concept map). Give nodes and links only, with no coordinates or colours: the GUI lays the diagram out and colours nodes by status. flow = a process with steps and decisions, laid out left to right along the links, where a side branch without a join and the last node of a chain hang below the node before them; layers = the impact perimeter, one column per entry of layers (e.g. GUI, API, core, storage), each node in its layer; mindmap = a tree of concepts drawn radially around its root: exactly one root, one incoming link for every other node, no cycle (refused otherwise). Rules: one subject per diagram, 5 to 12 nodes; declare nodes in reading order, since the declaration order is the initial order of every rank or column; zero crossings expected. The result reports every link crossing and every link through a node, with advice: reorder the nodes, split the diagram or change its kind, then send it again.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | flow = a process with steps and decisions, laid out left to right along the links, where a side branch without a join and the last node of a chain hang below the node before them; layers = the impact perimeter, one column per entry of `layers` (e.g. GUI, API, core, storage), each node in its layer; mindmap = a tree of concepts drawn radially around its root: exactly one root, one incoming link for every other node, no cycle (refused otherwise). | |
| links | No | Directed links between nodes (default: none). In a mindmap, from parent to child. | |
| nodes | Yes | Nodes in reading order (5 to 12): the declaration order is the initial order of every rank or column. | |
| title | Yes | Title of the diagram. | |
| layers | No | Required when kind is layers, forbidden otherwise: column names from left to right. | |
| diagram_id | No | Id of the diagram to replace, or of the new one; generated when omitted. | |
| analysis_id | Yes | Id of the analysis, as returned by create_analysis or list_analyses. |