Packages

High-level package dependency view after the vectorcore split; top-level packages only.

Packages
Figure 2. Packages
Diagram source
Diagram JSON
{
  "shapes": [
    {
      "shapes": [],
      "id": "pkg_drawmode~e1790626868095",
      "category": "Class diagram",
      "type": "package",
      "props": {
        "name": "drawmode",
        "color": 9
      },
      "smZ": null,
      "smTab": null,
      "fileLink": null,
      "fileLinkDesc": null,
      "smGroup": null,
      "deleted": false,
      "x": 450,
      "y": 52,
      "w": 109,
      "h": 88
    },
    {
      "shapes": [],
      "id": "pkg_vectorcore~e1790626868098",
      "category": "Class diagram",
      "type": "package",
      "props": {
        "name": "vectorcore",
        "color": 3
      },
      "smZ": null,
      "smTab": null,
      "fileLink": null,
      "fileLinkDesc": null,
      "smGroup": null,
      "deleted": false,
      "x": 701,
      "y": 162,
      "w": 109,
      "h": 88
    },
    {
      "shapes": [],
      "id": "pkg_aicore~e1790626868099",
      "category": "Class diagram",
      "type": "package",
      "props": {
        "name": "aicore",
        "color": 8
      },
      "smZ": null,
      "smTab": null,
      "fileLink": null,
      "fileLinkDesc": null,
      "smGroup": null,
      "deleted": false,
      "x": 556,
      "y": 254,
      "w": 109,
      "h": 88
    },
    {
      "shapes": [],
      "id": "pkg_mindmapcore~e1790626868100",
      "category": "Class diagram",
      "type": "package",
      "props": {
        "name": "mindmapcore",
        "color": 8
      },
      "smZ": null,
      "smTab": null,
      "fileLink": null,
      "fileLinkDesc": null,
      "smGroup": null,
      "deleted": false,
      "x": 202,
      "y": 254,
      "w": 109,
      "h": 88
    },
    {
      "shapes": [],
      "id": "pkg_widgetcore~e1790626868101",
      "category": "Class diagram",
      "type": "package",
      "props": {
        "name": "widgetcore",
        "color": 8
      },
      "smZ": null,
      "smTab": null,
      "fileLink": null,
      "fileLinkDesc": null,
      "smGroup": null,
      "deleted": false,
      "x": 363,
      "y": 254,
      "w": 109,
      "h": 88
    },
    {
      "shapes": [],
      "id": "pkg_drawcore~e1790626868102",
      "category": "Class diagram",
      "type": "package",
      "props": {
        "name": "drawcore",
        "color": 6,
        "stereotype": "global"
      },
      "smZ": null,
      "smTab": null,
      "fileLink": null,
      "fileLinkDesc": null,
      "smGroup": null,
      "deleted": false,
      "x": 286,
      "y": 514,
      "w": 468,
      "h": 90
    },
    {
      "shapes": [],
      "id": "pkg_pypdfium2~e1790626868103",
      "category": "Class diagram",
      "type": "package",
      "props": {
        "name": "pypdfium2",
        "color": 7,
        "stereotype": "library"
      },
      "smZ": null,
      "smTab": null,
      "fileLink": null,
      "fileLinkDesc": null,
      "smGroup": null,
      "deleted": false,
      "x": 701,
      "y": 394,
      "w": 109,
      "h": 88
    },
    {
      "shapes": [],
      "id": "md-4d4hz7~e1794206172294",
      "category": "Always available",
      "type": "markdown",
      "props": {
        "markdown": "# Explanation\n\nThis was drawn to direct the agent to create DrawMode as a set of packages so I can reuse the parts in other projects. The domain model on the right is reverse engineered from code I wrote at the start of the project, intended to direct the agent for the drawing functionality I wanted.",
        "fill": "#ffffff",
        "outline": "#d0d7de",
        "magnification": 1
      },
      "smZ": null,
      "smTab": null,
      "fileLink": null,
      "fileLinkDesc": null,
      "smGroup": null,
      "deleted": false,
      "x": 260,
      "y": 636,
      "w": 488,
      "h": 230
    },
    {
      "shapes": [
        {
          "shapes": [],
          "id": "Project-8au3dp~e1791228412411",
          "category": "Class diagram",
          "type": "class",
          "props": {
            "name": "Project",
            "attributes": [
              "+id · name · owner",
              "+diagram_ids: List[str]",
              "+members: List[TeamMember]",
              "+org_shares: List[OrgShare]",
              "+deleted: bool"
            ],
            "operations": [],
            "color": 3,
            "abstract": false,
            "stereotype": "dataclass",
            "iface": false,
            "hideAttrs": false,
            "hideOps": true,
            "hideArgs": false,
            "hideReturn": false,
            "sort": false,
            "width": 0,
            "description": "A directory of diagrams under one storage owner, shared by role or through organisations."
          },
          "smZ": null,
          "smTab": null,
          "fileLink": "packages/drawcore/src/modebit/drawcore/domain_objects.py:555",
          "fileLinkDesc": "A directory of diagrams under one storage owner, shared by role or through organisations.\nanchor: class Project:",
          "smGroup": null,
          "deleted": false,
          "x": 1054,
          "y": -31,
          "w": null,
          "h": null
        },
        {
          "shapes": [],
          "id": "Diagram-9hfchr~e1791228412412",
          "category": "Class diagram",
          "type": "class",
          "props": {
            "name": "Diagram",
            "attributes": [
              "+id · name · category · tags",
              "+stamp: EditStamp",
              "+touched_ms · last_editor",
              "+ai_guidance · variables"
            ],
            "operations": [],
            "color": 3,
            "abstract": false,
            "stereotype": "dataclass",
            "iface": false,
            "hideAttrs": false,
            "hideOps": true,
            "hideArgs": false,
            "hideReturn": false,
            "sort": false,
            "width": 0,
            "description": "Identity + metadata plus one tree of shapes; built only on persistence — the live canonical is a getModel dict."
          },
          "smZ": null,
          "smTab": null,
          "fileLink": "packages/drawcore/src/modebit/drawcore/domain_objects.py:227",
          "fileLinkDesc": "Identity + metadata plus one tree of shapes; built only on persistence — the live canonical is a getModel dict.\nanchor: class Diagram(Container):",
          "smGroup": null,
          "deleted": false,
          "x": 1074,
          "y": 171,
          "w": null,
          "h": null
        },
        {
          "shapes": [],
          "id": "Shape-5gd10m~e1791228412413",
          "category": "Class diagram",
          "type": "class",
          "props": {
            "name": "Shape",
            "attributes": [
              "+id: str",
              "+category · type",
              "+props: dict",
              "+smZ · smTab",
              "+fileLink · fileLinkDesc",
              "+deleted: bool  (tombstone)"
            ],
            "operations": [],
            "color": 3,
            "abstract": false,
            "stereotype": "dataclass",
            "iface": false,
            "hideAttrs": false,
            "hideOps": true,
            "hideArgs": false,
            "hideReturn": false,
            "sort": false,
            "width": 0,
            "description": "Base of everything on a diagram: a typed shape whose props the shape registry defines."
          },
          "smZ": null,
          "smTab": null,
          "fileLink": "packages/drawcore/src/modebit/drawcore/domain_objects.py:26",
          "fileLinkDesc": "Base of everything on a diagram: a typed shape whose props the shape registry defines.\nanchor: class Shape:",
          "smGroup": null,
          "deleted": false,
          "x": 1434,
          "y": 236,
          "w": null,
          "h": null
        },
        {
          "shapes": [],
          "id": "Link-4x169e~e1791228412414",
          "category": "Class diagram",
          "type": "class",
          "props": {
            "name": "Link",
            "attributes": [
              "+source: str «id»",
              "+target: str «id»",
              "+vertices · vrel",
              "+subtitle · description",
              "+straight · bezier · noAvoid",
              "+labMove · labOff"
            ],
            "operations": [],
            "color": 3,
            "abstract": false,
            "stereotype": "dataclass",
            "iface": false,
            "hideAttrs": false,
            "hideOps": true,
            "hideArgs": false,
            "hideReturn": false,
            "sort": false,
            "width": 0,
            "description": "A connector; source and target are shape ids, never names or geometry."
          },
          "smZ": null,
          "smTab": null,
          "fileLink": "packages/drawcore/src/modebit/drawcore/domain_objects.py:51",
          "fileLinkDesc": "A connector; source and target are shape ids, never names or geometry.\nanchor: class Link(Shape):",
          "smGroup": null,
          "deleted": false,
          "x": 1460,
          "y": 461,
          "w": null,
          "h": null
        },
        {
          "shapes": [],
          "id": "Node-469awo~e1791228412415",
          "category": "Class diagram",
          "type": "class",
          "props": {
            "name": "Node",
            "attributes": [
              "+x · y · w · h"
            ],
            "operations": [],
            "color": 3,
            "abstract": false,
            "stereotype": "dataclass",
            "iface": false,
            "hideAttrs": false,
            "hideOps": true,
            "hideArgs": false,
            "hideReturn": false,
            "sort": false,
            "width": 0,
            "description": "A placed shape that is also a container: whatever nests inside it lives in its shapes list."
          },
          "smZ": null,
          "smTab": null,
          "fileLink": "packages/drawcore/src/modebit/drawcore/domain_objects.py:184",
          "fileLinkDesc": "A placed shape that is also a container: whatever nests inside it lives in its shapes list.\nanchor: class Node(Shape, Container):",
          "smGroup": null,
          "deleted": false,
          "x": 1267,
          "y": 461,
          "w": null,
          "h": null
        },
        {
          "shapes": [],
          "id": "EditStamp-avy226~e1791228412416",
          "category": "Class diagram",
          "type": "class",
          "props": {
            "name": "EditStamp",
            "attributes": [
              "+epoch: float",
              "+user: str",
              "+nonce: int"
            ],
            "operations": [],
            "color": 3,
            "abstract": false,
            "stereotype": "dataclass",
            "iface": false,
            "hideAttrs": false,
            "hideOps": true,
            "hideArgs": false,
            "hideReturn": false,
            "sort": false,
            "width": 0,
            "description": "Identifies one edit so concurrent saves can be ordered."
          },
          "smZ": null,
          "smTab": null,
          "fileLink": "packages/drawcore/src/modebit/drawcore/domain_objects.py:198",
          "fileLinkDesc": "Identifies one edit so concurrent saves can be ordered.\nanchor: class EditStamp:",
          "smGroup": null,
          "deleted": false,
          "x": 1094,
          "y": 431,
          "w": null,
          "h": null
        },
        {
          "shapes": [],
          "id": "DiagramMeta-bv4ko8~e1791228412417",
          "category": "Class diagram",
          "type": "class",
          "props": {
            "name": "DiagramMeta",
            "attributes": [
              "+id · name · category · tags",
              "+order · deleted · open",
              "+touched_ms · last_editor"
            ],
            "operations": [],
            "color": 3,
            "abstract": false,
            "stereotype": "dataclass",
            "iface": false,
            "hideAttrs": false,
            "hideOps": true,
            "hideArgs": false,
            "hideReturn": false,
            "sort": false,
            "width": 0,
            "description": "The projection a project switch reads: everything about a diagram WITHOUT its shapes."
          },
          "smZ": null,
          "smTab": null,
          "fileLink": "packages/drawcore/src/modebit/drawcore/domain_objects.py:283",
          "fileLinkDesc": "The projection a project switch reads: everything about a diagram WITHOUT its shapes.\nanchor: class DiagramMeta:",
          "smGroup": null,
          "deleted": false,
          "x": 892,
          "y": 374,
          "w": null,
          "h": null
        },
        {
          "shapes": [],
          "id": "Container-5lkwf1~e1791228412418",
          "category": "Class diagram",
          "type": "class",
          "props": {
            "name": "Container",
            "attributes": [
              "+shapes: List[Shape]"
            ],
            "operations": [
              "+all_shapes(): Iterator[Shape]",
              "+all_nodes(): Iterator[Node]",
              "+all_links(): Iterator[Link]",
              "+node(ref): Optional[Node]",
              "+remove_links(predicate): int",
              "+remove_node(nid): bool",
              "+subtree_ids(nid): set"
            ],
            "color": 3,
            "abstract": false,
            "stereotype": "dataclass",
            "iface": false,
            "hideAttrs": false,
            "hideOps": true,
            "hideArgs": false,
            "hideReturn": false,
            "sort": false,
            "width": 0,
            "description": "Anything that holds shapes: the Diagram root and every Node. Owns ONE flat shapes list and the recursive traversal and mutation over it. NOT a Shape — a diagram is a container but not an element on a canvas."
          },
          "smZ": null,
          "smTab": null,
          "fileLink": "packages/drawcore/src/modebit/drawcore/domain_objects.py:77",
          "fileLinkDesc": "Anything that holds shapes — the Diagram root and every Node — owning one flat shapes list and the traversal over it.\nanchor: class Container:",
          "smGroup": null,
          "deleted": false,
          "x": 1267,
          "y": 101,
          "w": null,
          "h": null
        },
        {
          "id": "05d8961b-27ff-40b1-858c-1490616de303",
          "category": "Class diagram",
          "type": "inheritance",
          "props": {
            "name": "",
            "stereotype": ""
          },
          "smZ": null,
          "smTab": null,
          "fileLink": "packages/drawcore/src/modebit/drawcore/domain_objects.py:51",
          "fileLinkDesc": "A link is a shape.\nanchor: class Link(Shape):",
          "smGroup": null,
          "deleted": false,
          "source": "Link-4x169e~e1791228412414",
          "target": "Shape-5gd10m~e1791228412413",
          "vertices": [],
          "straight": false,
          "bezier": false,
          "noAvoid": null,
          "vrel": false,
          "labMove": false,
          "labOff": {},
          "subtitle": null,
          "description": null,
          "animation": null
        },
        {
          "id": "11553c02-0bc9-474e-bf89-287715d0ab3a",
          "category": "Class diagram",
          "type": "inheritance",
          "props": {
            "name": "",
            "stereotype": ""
          },
          "smZ": null,
          "smTab": null,
          "fileLink": "packages/drawcore/src/modebit/drawcore/domain_objects.py",
          "fileLinkDesc": "Node combines Shape with Container so it can own nested shapes.",
          "smGroup": null,
          "deleted": false,
          "source": "Node-469awo~e1791228412415",
          "target": "Container-5lkwf1~e1791228412418",
          "vertices": [
            [
              18,
              -149
            ]
          ],
          "straight": false,
          "bezier": false,
          "noAvoid": null,
          "vrel": true,
          "labMove": false,
          "labOff": {},
          "subtitle": null,
          "description": null,
          "animation": null
        },
        {
          "id": "372b8ead-1383-4e8b-9e13-5aef9a0430e9",
          "category": "Class diagram",
          "type": "composition",
          "props": {
            "name": "",
            "qualifier": "",
            "sourceRole": "",
            "targetRole": "stamp",
            "sourceMult": "1",
            "targetMult": "1",
            "directed": false,
            "assocClass": "",
            "stereotype": ""
          },
          "smZ": null,
          "smTab": null,
          "fileLink": "packages/drawcore/src/modebit/drawcore/domain_objects.py:227",
          "fileLinkDesc": "The canonical edit this stored diagram represents.\nanchor: class Diagram(Container):",
          "smGroup": null,
          "deleted": false,
          "source": "Diagram-9hfchr~e1791228412412",
          "target": "EditStamp-avy226~e1791228412416",
          "vertices": [],
          "straight": false,
          "bezier": false,
          "noAvoid": null,
          "vrel": false,
          "labMove": false,
          "labOff": {},
          "subtitle": null,
          "description": null,
          "animation": null
        },
        {
          "id": "390db165-cbc2-4cbc-b897-42328e2281f1",
          "category": "Class diagram",
          "type": "inheritance",
          "props": {
            "name": "",
            "stereotype": ""
          },
          "smZ": null,
          "smTab": null,
          "fileLink": "packages/drawcore/src/modebit/drawcore/domain_objects.py:184",
          "fileLinkDesc": "A node is a shape and a container.\nanchor: class Node(Shape, Container):",
          "smGroup": null,
          "deleted": false,
          "source": "Node-469awo~e1791228412415",
          "target": "Shape-5gd10m~e1791228412413",
          "vertices": [],
          "straight": false,
          "bezier": false,
          "noAvoid": null,
          "vrel": false,
          "labMove": false,
          "labOff": {},
          "subtitle": null,
          "description": null,
          "animation": null
        },
        {
          "id": "40cd9d18-a515-47fd-b724-2cdc42527b66",
          "category": "Class diagram",
          "type": "dependency",
          "props": {
            "name": "",
            "sourceRole": "",
            "targetRole": "",
            "sourceMult": "",
            "targetMult": "",
            "stereotype": "projection of"
          },
          "smZ": null,
          "smTab": null,
          "fileLink": "packages/drawcore/src/modebit/drawcore/domain_objects.py:283",
          "fileLinkDesc": "Rebuilt from the blob on every save_diagram.\nanchor: class DiagramMeta:",
          "smGroup": null,
          "deleted": false,
          "source": "DiagramMeta-bv4ko8~e1791228412417",
          "target": "Diagram-9hfchr~e1791228412412",
          "vertices": [],
          "straight": false,
          "bezier": false,
          "noAvoid": null,
          "vrel": false,
          "labMove": false,
          "labOff": {},
          "subtitle": null,
          "description": null,
          "animation": null
        },
        {
          "id": "6e12118a-97a7-487e-b944-7d23e9a3b6d9",
          "category": "Class diagram",
          "type": "inheritance",
          "props": {
            "name": "",
            "stereotype": ""
          },
          "smZ": null,
          "smTab": null,
          "fileLink": "packages/drawcore/src/modebit/drawcore/domain_objects.py",
          "fileLinkDesc": "Diagram is a container of shapes.",
          "smGroup": null,
          "deleted": false,
          "source": "Diagram-9hfchr~e1791228412412",
          "target": "Container-5lkwf1~e1791228412418",
          "vertices": [],
          "straight": false,
          "bezier": false,
          "noAvoid": null,
          "vrel": false,
          "labMove": false,
          "labOff": {},
          "subtitle": null,
          "description": null,
          "animation": null
        },
        {
          "id": "7b0d46e1-bc5f-4ed9-a34e-9af1d9ffbd26",
          "category": "Class diagram",
          "type": "association",
          "props": {
            "name": "source, target «by id»",
            "qualifier": "",
            "sourceRole": "",
            "targetRole": "",
            "sourceMult": "",
            "targetMult": "2",
            "directed": true,
            "assocClass": "",
            "stereotype": ""
          },
          "smZ": null,
          "smTab": null,
          "fileLink": "packages/drawcore/src/modebit/drawcore/domain_objects.py:51",
          "fileLinkDesc": "A link references its ends by shape id only.\nanchor: class Link(Shape):",
          "smGroup": null,
          "deleted": false,
          "source": "Link-4x169e~e1791228412414",
          "target": "Node-469awo~e1791228412415",
          "vertices": [],
          "straight": false,
          "bezier": false,
          "noAvoid": null,
          "vrel": false,
          "labMove": true,
          "labOff": {
            "m0": {
              "x": -35,
              "y": 66
            }
          },
          "subtitle": null,
          "description": null,
          "animation": null
        },
        {
          "id": "c9f2d210-b29f-4ad5-9082-bbee577ef335",
          "category": "Class diagram",
          "type": "association",
          "props": {
            "name": "",
            "qualifier": "",
            "sourceRole": "",
            "targetRole": "",
            "sourceMult": "",
            "targetMult": "0..*",
            "directed": true,
            "assocClass": "",
            "stereotype": ""
          },
          "smZ": null,
          "smTab": null,
          "fileLink": "packages/drawcore/src/modebit/drawcore/domain_objects.py:568",
          "fileLinkDesc": "The project's diagrams, in menu order.\nanchor: diagram_ids: List[str] = field(default_factory=list)",
          "smGroup": null,
          "deleted": false,
          "source": "Project-8au3dp~e1791228412411",
          "target": "Diagram-9hfchr~e1791228412412",
          "vertices": [],
          "straight": false,
          "bezier": false,
          "noAvoid": null,
          "vrel": false,
          "labMove": true,
          "labOff": {
            "m0": {
              "x": 37,
              "y": -57
            }
          },
          "subtitle": null,
          "description": null,
          "animation": null
        },
        {
          "id": "e10cb5e8-7677-4987-b845-d0822c3c17aa",
          "category": "Class diagram",
          "type": "composition",
          "props": {
            "name": "",
            "qualifier": "",
            "sourceRole": "",
            "targetRole": "shapes",
            "sourceMult": "1",
            "targetMult": "0..*",
            "directed": false,
            "assocClass": "",
            "stereotype": ""
          },
          "smZ": null,
          "smTab": null,
          "fileLink": "packages/drawcore/src/modebit/drawcore/domain_objects.py:83",
          "fileLinkDesc": "The ONE shapes list, declared on Container — Diagram and Node both get it by inheritance.\nanchor: shapes: List[Shape] = field(default_factory=list)",
          "smGroup": null,
          "deleted": false,
          "source": "Container-5lkwf1~e1791228412418",
          "target": "Shape-5gd10m~e1791228412413",
          "vertices": [],
          "straight": false,
          "bezier": false,
          "noAvoid": null,
          "vrel": false,
          "labMove": false,
          "labOff": {},
          "subtitle": null,
          "description": null,
          "animation": null
        }
      ],
      "id": "b_domain-ywy23~e1791228412409",
      "category": "C4",
      "type": "boundary",
      "props": {
        "name": "Domain",
        "type": "drawcore · domain_objects.py, shape_registry.py",
        "stroke": "#9a7b0a",
        "fill": "#ffffff",
        "namePos": "bl"
      },
      "smZ": null,
      "smTab": null,
      "fileLink": "docs/diagram-delta-architecture.md",
      "fileLinkDesc": "Invariant: a diagram is a tree of shapes and every reference is an id.",
      "smGroup": null,
      "deleted": false,
      "x": 870,
      "y": -47,
      "w": 791,
      "h": 716
    },
    {
      "id": "link-ai-1~e1790626868096",
      "category": "Class diagram",
      "type": "dependency",
      "props": {
        "name": "",
        "sourceRole": "",
        "targetRole": "",
        "sourceMult": "",
        "targetMult": "",
        "stereotype": ""
      },
      "smZ": null,
      "smTab": null,
      "fileLink": null,
      "fileLinkDesc": null,
      "smGroup": null,
      "deleted": false,
      "source": "pkg_drawmode~e1790626868095",
      "target": "pkg_vectorcore~e1790626868098",
      "vertices": [
        [
          246,
          10
        ]
      ],
      "straight": false,
      "bezier": false,
      "noAvoid": null,
      "vrel": true,
      "labMove": false,
      "labOff": {},
      "subtitle": null,
      "description": null,
      "animation": null
    },
    {
      "id": "link-ai-2~e1790626868096",
      "category": "Class diagram",
      "type": "dependency",
      "props": {
        "name": "",
        "sourceRole": "",
        "targetRole": "",
        "sourceMult": "",
        "targetMult": "",
        "stereotype": ""
      },
      "smZ": null,
      "smTab": null,
      "fileLink": null,
      "fileLinkDesc": null,
      "smGroup": null,
      "deleted": false,
      "source": "pkg_drawmode~e1790626868095",
      "target": "pkg_aicore~e1790626868099",
      "vertices": [
        [
          111,
          84
        ]
      ],
      "straight": false,
      "bezier": false,
      "noAvoid": null,
      "vrel": true,
      "labMove": false,
      "labOff": {},
      "subtitle": null,
      "description": null,
      "animation": null
    },
    {
      "id": "link-ai-3~e1790626868096",
      "category": "Class diagram",
      "type": "dependency",
      "props": {
        "name": "",
        "sourceRole": "",
        "targetRole": "",
        "sourceMult": "",
        "targetMult": "",
        "stereotype": ""
      },
      "smZ": null,
      "smTab": null,
      "fileLink": null,
      "fileLinkDesc": null,
      "smGroup": null,
      "deleted": false,
      "source": "pkg_drawmode~e1790626868095",
      "target": "pkg_mindmapcore~e1790626868100",
      "vertices": [
        [
          -248,
          10
        ]
      ],
      "straight": false,
      "bezier": false,
      "noAvoid": null,
      "vrel": true,
      "labMove": false,
      "labOff": {},
      "subtitle": null,
      "description": null,
      "animation": null
    },
    {
      "id": "link-ai-4~e1790626868096",
      "category": "Class diagram",
      "type": "dependency",
      "props": {
        "name": "",
        "sourceRole": "",
        "targetRole": "",
        "sourceMult": "",
        "targetMult": "",
        "stereotype": ""
      },
      "smZ": null,
      "smTab": null,
      "fileLink": null,
      "fileLinkDesc": null,
      "smGroup": null,
      "deleted": false,
      "source": "pkg_drawmode~e1790626868095",
      "target": "pkg_widgetcore~e1790626868101",
      "vertices": [
        [
          -99,
          78
        ]
      ],
      "straight": false,
      "bezier": false,
      "noAvoid": null,
      "vrel": true,
      "labMove": false,
      "labOff": {},
      "subtitle": null,
      "description": null,
      "animation": null
    },
    {
      "id": "link-ai-5~e1790626868096",
      "category": "Class diagram",
      "type": "dependency",
      "props": {
        "name": "",
        "sourceRole": "",
        "targetRole": "",
        "sourceMult": "",
        "targetMult": "",
        "stereotype": ""
      },
      "smZ": null,
      "smTab": null,
      "fileLink": null,
      "fileLinkDesc": null,
      "smGroup": null,
      "deleted": false,
      "source": "pkg_drawmode~e1790626868095",
      "target": "pkg_drawcore~e1790626868102",
      "vertices": [
        [
          4,
          262
        ]
      ],
      "straight": false,
      "bezier": false,
      "noAvoid": null,
      "vrel": true,
      "labMove": false,
      "labOff": {},
      "subtitle": null,
      "description": null,
      "animation": null
    },
    {
      "id": "link-ai-13~e1790626868096",
      "category": "Class diagram",
      "type": "dependency",
      "props": {
        "name": "",
        "sourceRole": "",
        "targetRole": "",
        "sourceMult": "",
        "targetMult": "",
        "stereotype": ""
      },
      "smZ": null,
      "smTab": null,
      "fileLink": null,
      "fileLinkDesc": null,
      "smGroup": null,
      "deleted": false,
      "source": "pkg_vectorcore~e1790626868098",
      "target": "pkg_aicore~e1790626868099",
      "vertices": [
        [
          1,
          110
        ]
      ],
      "straight": false,
      "bezier": false,
      "noAvoid": null,
      "vrel": true,
      "labMove": false,
      "labOff": {},
      "subtitle": null,
      "description": null,
      "animation": null
    },
    {
      "id": "link-ai-15~e1790626868096",
      "category": "Class diagram",
      "type": "dependency",
      "props": {
        "name": "",
        "sourceRole": "",
        "targetRole": "",
        "sourceMult": "",
        "targetMult": "",
        "stereotype": ""
      },
      "smZ": null,
      "smTab": null,
      "fileLink": null,
      "fileLinkDesc": null,
      "smGroup": null,
      "deleted": false,
      "source": "pkg_vectorcore~e1790626868098",
      "target": "pkg_pypdfium2~e1790626868103",
      "vertices": [
        [
          28,
          146
        ]
      ],
      "straight": false,
      "bezier": false,
      "noAvoid": null,
      "vrel": true,
      "labMove": false,
      "labOff": {},
      "subtitle": null,
      "description": null,
      "animation": null
    },
    {
      "id": "link-ai-16~e1790626868096",
      "category": "Class diagram",
      "type": "dependency",
      "props": {
        "name": "",
        "sourceRole": "",
        "targetRole": "",
        "sourceMult": "",
        "targetMult": "",
        "stereotype": ""
      },
      "smZ": null,
      "smTab": null,
      "fileLink": null,
      "fileLinkDesc": null,
      "smGroup": null,
      "deleted": false,
      "source": "pkg_aicore~e1790626868099",
      "target": "pkg_drawcore~e1790626868102",
      "vertices": [
        [
          25,
          270
        ]
      ],
      "straight": false,
      "bezier": false,
      "noAvoid": null,
      "vrel": true,
      "labMove": false,
      "labOff": {},
      "subtitle": null,
      "description": null,
      "animation": null
    },
    {
      "id": "link-ai-17~e1790626868096",
      "category": "Class diagram",
      "type": "dependency",
      "props": {
        "name": "",
        "sourceRole": "",
        "targetRole": "",
        "sourceMult": "",
        "targetMult": "",
        "stereotype": ""
      },
      "smZ": null,
      "smTab": null,
      "fileLink": null,
      "fileLinkDesc": null,
      "smGroup": null,
      "deleted": false,
      "source": "pkg_mindmapcore~e1790626868100",
      "target": "pkg_drawcore~e1790626868102",
      "vertices": [
        [
          0,
          270
        ]
      ],
      "straight": false,
      "bezier": false,
      "noAvoid": null,
      "vrel": true,
      "labMove": false,
      "labOff": {},
      "subtitle": null,
      "description": null,
      "animation": null
    },
    {
      "id": "link-ai-18~e1790626868096",
      "category": "Class diagram",
      "type": "dependency",
      "props": {
        "name": "",
        "sourceRole": "",
        "targetRole": "",
        "sourceMult": "",
        "targetMult": "",
        "stereotype": ""
      },
      "smZ": null,
      "smTab": null,
      "fileLink": null,
      "fileLinkDesc": null,
      "smGroup": null,
      "deleted": false,
      "source": "pkg_widgetcore~e1790626868101",
      "target": "pkg_drawcore~e1790626868102",
      "vertices": [
        [
          -7,
          103
        ]
      ],
      "straight": false,
      "bezier": false,
      "noAvoid": null,
      "vrel": true,
      "labMove": false,
      "labOff": {},
      "subtitle": null,
      "description": null,
      "animation": null
    }
  ],
  "id": "d5bae633d",
  "name": "Packages",
  "category": "domain",
  "description": "High-level package dependency view after the vectorcore split; top-level packages only.",
  "tags": [],
  "order": null,
  "publish_ignore": false,
  "ai_guidance": "",
  "deleted": false,
  "open": false,
  "view": {},
  "stamp": {
    "epoch": 0.0,
    "user": "",
    "nonce": 0
  },
  "touched_ms": 0.0,
  "last_editor": "",
  "schema_version": 1,
  "variables": [],
  "projection": ""
}
Pure model
{
  "elements": [
    {
      "id": "pkg_drawmode~e1790626868095",
      "category": "Class",
      "kind": "package",
      "name": "drawmode"
    },
    {
      "id": "pkg_vectorcore~e1790626868098",
      "category": "Class",
      "kind": "package",
      "name": "vectorcore"
    },
    {
      "id": "pkg_aicore~e1790626868099",
      "category": "Class",
      "kind": "package",
      "name": "aicore"
    },
    {
      "id": "pkg_mindmapcore~e1790626868100",
      "category": "Class",
      "kind": "package",
      "name": "mindmapcore"
    },
    {
      "id": "pkg_widgetcore~e1790626868101",
      "category": "Class",
      "kind": "package",
      "name": "widgetcore"
    },
    {
      "id": "pkg_drawcore~e1790626868102",
      "category": "Class",
      "kind": "package",
      "name": "drawcore",
      "stereotype": "global"
    },
    {
      "id": "pkg_pypdfium2~e1790626868103",
      "category": "Class",
      "kind": "package",
      "name": "pypdfium2",
      "stereotype": "library"
    },
    {
      "id": "md-4d4hz7~e1794206172294",
      "category": "Notes",
      "kind": "markdown",
      "text": "# Explanation\n\nThis was drawn to direct the agent to create DrawMode as a set of packages so I can reuse the parts in other projects. The domain model on the right is reverse engineered from code I wrote at the start of the project, intended to direct the agent for the drawing functionality I wanted."
    },
    {
      "id": "b_domain-ywy23~e1791228412409",
      "category": "C4",
      "kind": "boundary",
      "name": "Domain",
      "technology": "drawcore · domain_objects.py, shape_registry.py",
      "elements": [
        {
          "id": "Project-8au3dp~e1791228412411",
          "category": "Class",
          "kind": "class",
          "name": "Project",
          "stereotype": "dataclass",
          "description": "A directory of diagrams under one storage owner, shared by role or through organisations.",
          "attributes": [
            {
              "name": "id · name · owner",
              "visibility": "public"
            },
            {
              "name": "diagram_ids",
              "type": "List[str]",
              "visibility": "public"
            },
            {
              "name": "members",
              "type": "List[TeamMember]",
              "visibility": "public"
            },
            {
              "name": "org_shares",
              "type": "List[OrgShare]",
              "visibility": "public"
            },
            {
              "name": "deleted",
              "type": "bool",
              "visibility": "public"
            }
          ]
        },
        {
          "id": "Diagram-9hfchr~e1791228412412",
          "category": "Class",
          "kind": "class",
          "name": "Diagram",
          "stereotype": "dataclass",
          "description": "Identity + metadata plus one tree of shapes; built only on persistence — the live canonical is a getModel dict.",
          "attributes": [
            {
              "name": "id · name · category · tags",
              "visibility": "public"
            },
            {
              "name": "stamp",
              "type": "EditStamp",
              "visibility": "public"
            },
            {
              "name": "touched_ms · last_editor",
              "visibility": "public"
            },
            {
              "name": "ai_guidance · variables",
              "visibility": "public"
            }
          ]
        },
        {
          "id": "Shape-5gd10m~e1791228412413",
          "category": "Class",
          "kind": "class",
          "name": "Shape",
          "stereotype": "dataclass",
          "description": "Base of everything on a diagram: a typed shape whose props the shape registry defines.",
          "attributes": [
            {
              "name": "id",
              "type": "str",
              "visibility": "public"
            },
            {
              "name": "category · type",
              "visibility": "public"
            },
            {
              "name": "props",
              "type": "dict",
              "visibility": "public"
            },
            {
              "name": "smZ · smTab",
              "visibility": "public"
            },
            {
              "name": "fileLink · fileLinkDesc",
              "visibility": "public"
            },
            {
              "name": "deleted",
              "type": "bool  (tombstone)",
              "visibility": "public"
            }
          ]
        },
        {
          "id": "Link-4x169e~e1791228412414",
          "category": "Class",
          "kind": "class",
          "name": "Link",
          "stereotype": "dataclass",
          "description": "A connector; source and target are shape ids, never names or geometry.",
          "attributes": [
            {
              "name": "source",
              "type": "str «id»",
              "visibility": "public"
            },
            {
              "name": "target",
              "type": "str «id»",
              "visibility": "public"
            },
            {
              "name": "vertices · vrel",
              "visibility": "public"
            },
            {
              "name": "subtitle · description",
              "visibility": "public"
            },
            {
              "name": "straight · bezier · noAvoid",
              "visibility": "public"
            },
            {
              "name": "labMove · labOff",
              "visibility": "public"
            }
          ]
        },
        {
          "id": "Node-469awo~e1791228412415",
          "category": "Class",
          "kind": "class",
          "name": "Node",
          "stereotype": "dataclass",
          "description": "A placed shape that is also a container: whatever nests inside it lives in its shapes list.",
          "attributes": [
            {
              "name": "x · y · w · h",
              "visibility": "public"
            }
          ]
        },
        {
          "id": "EditStamp-avy226~e1791228412416",
          "category": "Class",
          "kind": "class",
          "name": "EditStamp",
          "stereotype": "dataclass",
          "description": "Identifies one edit so concurrent saves can be ordered.",
          "attributes": [
            {
              "name": "epoch",
              "type": "float",
              "visibility": "public"
            },
            {
              "name": "user",
              "type": "str",
              "visibility": "public"
            },
            {
              "name": "nonce",
              "type": "int",
              "visibility": "public"
            }
          ]
        },
        {
          "id": "DiagramMeta-bv4ko8~e1791228412417",
          "category": "Class",
          "kind": "class",
          "name": "DiagramMeta",
          "stereotype": "dataclass",
          "description": "The projection a project switch reads: everything about a diagram WITHOUT its shapes.",
          "attributes": [
            {
              "name": "id · name · category · tags",
              "visibility": "public"
            },
            {
              "name": "order · deleted · open",
              "visibility": "public"
            },
            {
              "name": "touched_ms · last_editor",
              "visibility": "public"
            }
          ]
        },
        {
          "id": "Container-5lkwf1~e1791228412418",
          "category": "Class",
          "kind": "class",
          "name": "Container",
          "stereotype": "dataclass",
          "description": "Anything that holds shapes: the Diagram root and every Node. Owns ONE flat shapes list and the recursive traversal and mutation over it. NOT a Shape — a diagram is a container but not an element on a canvas.",
          "attributes": [
            {
              "name": "shapes",
              "type": "List[Shape]",
              "visibility": "public"
            }
          ],
          "operations": [
            {
              "name": "all_shapes",
              "returnType": "Iterator[Shape]",
              "visibility": "public"
            },
            {
              "name": "all_nodes",
              "returnType": "Iterator[Node]",
              "visibility": "public"
            },
            {
              "name": "all_links",
              "returnType": "Iterator[Link]",
              "visibility": "public"
            },
            {
              "name": "node",
              "parameters": [
                {
                  "name": "ref"
                }
              ],
              "returnType": "Optional[Node]",
              "visibility": "public"
            },
            {
              "name": "remove_links",
              "parameters": [
                {
                  "name": "predicate"
                }
              ],
              "returnType": "int",
              "visibility": "public"
            },
            {
              "name": "remove_node",
              "parameters": [
                {
                  "name": "nid"
                }
              ],
              "returnType": "bool",
              "visibility": "public"
            },
            {
              "name": "subtree_ids",
              "parameters": [
                {
                  "name": "nid"
                }
              ],
              "returnType": "set",
              "visibility": "public"
            }
          ]
        }
      ]
    }
  ],
  "links": [
    {
      "id": "link-ai-1~e1790626868096",
      "category": "Class",
      "kind": "dependency",
      "source": "pkg_drawmode~e1790626868095",
      "target": "pkg_vectorcore~e1790626868098"
    },
    {
      "id": "link-ai-2~e1790626868096",
      "category": "Class",
      "kind": "dependency",
      "source": "pkg_drawmode~e1790626868095",
      "target": "pkg_aicore~e1790626868099"
    },
    {
      "id": "link-ai-3~e1790626868096",
      "category": "Class",
      "kind": "dependency",
      "source": "pkg_drawmode~e1790626868095",
      "target": "pkg_mindmapcore~e1790626868100"
    },
    {
      "id": "link-ai-4~e1790626868096",
      "category": "Class",
      "kind": "dependency",
      "source": "pkg_drawmode~e1790626868095",
      "target": "pkg_widgetcore~e1790626868101"
    },
    {
      "id": "link-ai-5~e1790626868096",
      "category": "Class",
      "kind": "dependency",
      "source": "pkg_drawmode~e1790626868095",
      "target": "pkg_drawcore~e1790626868102"
    },
    {
      "id": "link-ai-13~e1790626868096",
      "category": "Class",
      "kind": "dependency",
      "source": "pkg_vectorcore~e1790626868098",
      "target": "pkg_aicore~e1790626868099"
    },
    {
      "id": "link-ai-15~e1790626868096",
      "category": "Class",
      "kind": "dependency",
      "source": "pkg_vectorcore~e1790626868098",
      "target": "pkg_pypdfium2~e1790626868103"
    },
    {
      "id": "link-ai-16~e1790626868096",
      "category": "Class",
      "kind": "dependency",
      "source": "pkg_aicore~e1790626868099",
      "target": "pkg_drawcore~e1790626868102"
    },
    {
      "id": "link-ai-17~e1790626868096",
      "category": "Class",
      "kind": "dependency",
      "source": "pkg_mindmapcore~e1790626868100",
      "target": "pkg_drawcore~e1790626868102"
    },
    {
      "id": "link-ai-18~e1790626868096",
      "category": "Class",
      "kind": "dependency",
      "source": "pkg_widgetcore~e1790626868101",
      "target": "pkg_drawcore~e1790626868102"
    },
    {
      "id": "05d8961b-27ff-40b1-858c-1490616de303",
      "category": "Class",
      "kind": "inheritance",
      "source": "Link-4x169e~e1791228412414",
      "target": "Shape-5gd10m~e1791228412413"
    },
    {
      "id": "11553c02-0bc9-474e-bf89-287715d0ab3a",
      "category": "Class",
      "kind": "inheritance",
      "source": "Node-469awo~e1791228412415",
      "target": "Container-5lkwf1~e1791228412418"
    },
    {
      "id": "372b8ead-1383-4e8b-9e13-5aef9a0430e9",
      "category": "Class",
      "kind": "composition",
      "source": "Diagram-9hfchr~e1791228412412",
      "target": "EditStamp-avy226~e1791228412416",
      "targetRole": "stamp",
      "sourceMult": "1",
      "targetMult": "1"
    },
    {
      "id": "390db165-cbc2-4cbc-b897-42328e2281f1",
      "category": "Class",
      "kind": "inheritance",
      "source": "Node-469awo~e1791228412415",
      "target": "Shape-5gd10m~e1791228412413"
    },
    {
      "id": "40cd9d18-a515-47fd-b724-2cdc42527b66",
      "category": "Class",
      "kind": "dependency",
      "source": "DiagramMeta-bv4ko8~e1791228412417",
      "target": "Diagram-9hfchr~e1791228412412",
      "stereotype": "projection of"
    },
    {
      "id": "6e12118a-97a7-487e-b944-7d23e9a3b6d9",
      "category": "Class",
      "kind": "inheritance",
      "source": "Diagram-9hfchr~e1791228412412",
      "target": "Container-5lkwf1~e1791228412418"
    },
    {
      "id": "7b0d46e1-bc5f-4ed9-a34e-9af1d9ffbd26",
      "category": "Class",
      "kind": "association",
      "source": "Link-4x169e~e1791228412414",
      "target": "Node-469awo~e1791228412415",
      "name": "source, target «by id»",
      "targetMult": "2",
      "directed": true
    },
    {
      "id": "c9f2d210-b29f-4ad5-9082-bbee577ef335",
      "category": "Class",
      "kind": "association",
      "source": "Project-8au3dp~e1791228412411",
      "target": "Diagram-9hfchr~e1791228412412",
      "targetMult": "0..*",
      "directed": true
    },
    {
      "id": "e10cb5e8-7677-4987-b845-d0822c3c17aa",
      "category": "Class",
      "kind": "composition",
      "source": "Container-5lkwf1~e1791228412418",
      "target": "Shape-5gd10m~e1791228412413",
      "targetRole": "shapes",
      "sourceMult": "1",
      "targetMult": "0..*"
    }
  ]
}

Figure code: drawmode:p7bc9c303/d5bae633d

Explanation

This was drawn to direct the agent to create DrawMode as a set of packages so I can reuse the parts in other projects. The domain model on the right is reverse engineered from code I wrote at the start of the project, intended to direct the agent for the drawing functionality I wanted.