{
 "$schema": "../lib/umlimator.schema.json",
 "schemaVersion": 2,
 "title": "Umlimator Atlas",
 "root": "overview",
 "nodes": [
  {
   "id": "author",
   "label": "Author",
   "kind": "person",
   "sublabel": "writes a model",
   "what": "Whoever draws a system: a person in an editor, or an assistant on their behalf.",
   "how": "Writes a model as JSON (nodes, edges, views), checks it with `umlimator.py check`, and shares the page it renders.",
   "icon": "users"
  },
  {
   "id": "assistant",
   "label": "AI assistant",
   "kind": "agent",
   "sublabel": "an MCP client",
   "what": "An AI assistant that reads a model and shows its reader what it means.",
   "how": "Calls the MCP server's read tools (`describe`, `paths`, `reach`) and its page tools (`show_view`, `highlight`, `tour`, `play_story`)."
  },
  {
   "id": "skill",
   "label": "map-repo skill",
   "kind": "skill",
   "sublabel": "plugins/umlimator",
   "what": "An agent skill that maps a repository: it reads the code and writes a model of it.",
   "how": "Its SKILL.md tells the assistant how to find the parts and their lines, write the model and check it with the CLI."
  },
  {
   "id": "model-file",
   "label": "Model JSON",
   "kind": "file",
   "sublabel": "nodes, edges, views",
   "what": "One file holds the whole map: cards, lines, the views that show them, stories, lenses and rules.",
   "how": "Schema version 2 adds typed views (`diagram`), each drawn by its type; lib/umlimator.schema.json describes every field."
  },
  {
   "id": "readers",
   "label": "Readers",
   "kind": "module",
   "sublabel": "what umlimator.py import reads",
   "what": "The importers: a diagram written in another notation, read into a model.",
   "how": "`umlimator.py import` runs them in Node: Mermaid, Structurizr DSL and JSON, PlantUML, Compose, Kubernetes, DBML and BPMN XML."
  },
  {
   "id": "cli",
   "label": "umlimator.py",
   "kind": "cli",
   "sublabel": "render, check, pdf, diff",
   "what": "The command line: one Python file, standard library only.",
   "how": "Renders a page, checks its layout and draws stills and PDFs in headless Chrome; diff, drift, trace and timelapse run the module's functions in Node."
  },
  {
   "id": "module",
   "label": "The module",
   "kind": "module",
   "sublabel": "lib/umlimator.js",
   "what": "The core: `render()`, `layout()`, `validate()`, `check()`, `diff()` and the map's canvas, in one file with no dependency.",
   "how": "Built from src/ by tools/build.mjs. Its layers are the views list's package diagram; double-click for it.",
   "opensView": "layers"
  },
  {
   "id": "typed",
   "label": "umlimator/all",
   "kind": "module",
   "sublabel": "28 typed diagrams",
   "what": "The module with every typed diagram: UML, SysML, C4, ER, flowchart, data flow, BPMN, mindmap and three clouds.",
   "how": "Each type registers its layout, drawing, rules and editing with the core's registry. Double-click for the families.",
   "opensView": "registry",
   "opensCount": 9
  },
  {
   "id": "host",
   "label": "Host page",
   "kind": "frontend",
   "sublabel": "render(element, model)",
   "what": "A web page that embeds a map with `render()` and drives it through its handle.",
   "how": "The handle's machines (navigation, the story player, tours) report every change as one `MapState`. Double-click for them.",
   "opensView": "machines"
  },
  {
   "id": "element",
   "label": "<umlimator-map>",
   "kind": "frontend",
   "sublabel": "lib/umlimator-element.js",
   "what": "A custom element: a map from HTML alone, its still shown until the map is drawn.",
   "how": "Loads its `src` or the model written inside it, and draws it with `render()`."
  },
  {
   "id": "docs",
   "label": "Docs site",
   "kind": "frontend",
   "sublabel": "VitePress, docs/",
   "what": "The guide, the API and the conformance notes, published with this gallery.",
   "how": "A fenced `umlimator` block becomes a `<umlimator-map>` through umlimator/markdown-it."
  },
  {
   "id": "action",
   "label": "Diff Action",
   "kind": "hook",
   "sublabel": "action.yml",
   "what": "A GitHub Action: what a pull request changes in its map models, posted on the pull request.",
   "how": "Runs `umlimator.py diff --base`, uploads the pages and stills, and writes one comment. Double-click for its sequence.",
   "opensView": "diff-run",
   "opensCount": 5
  },
  {
   "id": "github",
   "label": "GitHub",
   "kind": "external",
   "sublabel": "pull requests",
   "what": "Where the code lives: a pull request starts the diff Action, and shows its comment.",
   "how": "The Action's token posts the comment; a fork's read-only token gets the job summary instead."
  },
  {
   "id": "chrome",
   "label": "Chrome",
   "kind": "external",
   "sublabel": "headless",
   "what": "Google Chrome or Chromium, which the CLI drives to draw what a page shows.",
   "how": "`stills`, `pdf`, `record` and `check` open the rendered page headless and read it back."
  },
  {
   "id": "page",
   "label": "The page",
   "kind": "frontend",
   "icon": "window",
   "sublabel": "mountPage(): keys, link",
   "opensView": "keys",
   "what": "The standalone page around the map, `mountPage()`: breadcrumbs, search, menus, the details panel and the story recorder.",
   "how": "One key router reads each key from the top open layer down. One function writes the link from what the map shows, and another follows a link, on load and on Back or Forward."
  },
  {
   "id": "mcp",
   "label": "MCP page",
   "kind": "ai",
   "icon": "bot",
   "sublabel": "umlimator.py mcp",
   "opensView": "mcp",
   "what": "The page `umlimator.py mcp` serves, which an AI assistant drives with its page tools: `show_view`, `highlight`, `tour`, `play_story` and `clear`.",
   "how": "The server folds the assistant's commands into what the page should show, and sends that. The page shows it on the map's handle and posts its `MapState` back, which `page_state()` returns."
  },
  {
   "id": "navigation",
   "label": "Navigation",
   "kind": "backend",
   "icon": "network",
   "sublabel": "setView(): latest wins",
   "opensView": "navigation",
   "what": "A move from one view to another: `setView()`, a drill-down, up, a story's step, or a link.",
   "how": "One move at a time. A request during a move takes it to its own view, and every request's promise says whether its view was shown."
  },
  {
   "id": "story",
   "label": "Story player",
   "kind": "backend",
   "icon": "flag",
   "sublabel": "play(): step by step",
   "opensView": "story",
   "what": "A story told step by step: `play()`, the page's Stories menu, or a link's `story=` and `step=`.",
   "how": "`player.state` is entering, playing or paused, then ended or stopped. A `story` event comes on each change. A move or a selection the story didn't make pauses it."
  },
  {
   "id": "tour",
   "label": "Tour and replay",
   "kind": "backend",
   "icon": "retry",
   "sublabel": "a dot that rides",
   "opensView": "tour",
   "what": "One trip at a time: `tour()`, `replay()`, or a story step's tour.",
   "how": "Its promise is true when the dot reaches the end, and false when the trip is cut short."
  },
  {
   "id": "mapstate",
   "label": "MapState",
   "kind": "database",
   "icon": "state",
   "sublabel": "handle.state, state event",
   "what": "The map's state as one snapshot: fresh, frozen and plain JSON on every read. The `state` event says which of its keys changed.",
   "how": "`handle.state`, the page's `window.umlimatorMap.state`, `<umlimator-map>`'s `el.map.state`, and the MCP tool `page_state()`."
  },
  {
   "id": "nav-rest",
   "label": "At rest",
   "kind": "state",
   "sublabel": "navigating: null",
   "what": "A view is shown and no move is under way."
  },
  {
   "id": "nav-leaving",
   "label": "Leaving",
   "kind": "state",
   "sublabel": "into the card or out",
   "what": "The camera zooms into the card that opens the view, or out, and the view fades (130 ms). Skipped under reduced motion."
  },
  {
   "id": "nav-drawing",
   "label": "Drawing",
   "kind": "state",
   "sublabel": "the latest target",
   "what": "The view asked for last is drawn, and the selection is cleared (a `select` event with `null`)."
  },
  {
   "id": "nav-entering",
   "label": "Entering",
   "kind": "state",
   "sublabel": "zoom to fit",
   "what": "The camera zooms to fit the new view. A press on the map settles the glide, and the move goes on."
  },
  {
   "id": "st-none",
   "label": "No story",
   "kind": "state",
   "sublabel": "handle.story: null",
   "what": "`handle.story` is `null`. `play()` of a story the model lacks returns `null` and leaves the story shown."
  },
  {
   "id": "st-entering",
   "label": "Entering a step",
   "kind": "state",
   "sublabel": "view, camera, highlight",
   "what": "The step's view, camera, selection and highlight are on their way. The `story` event comes first."
  },
  {
   "id": "st-playing",
   "label": "Playing",
   "kind": "state",
   "sublabel": "next step on its own",
   "what": "The next step comes once this one's time is up (4 s unless the step says) and its tour has ended."
  },
  {
   "id": "st-paused",
   "label": "Paused",
   "kind": "state",
   "icon": "pause",
   "sublabel": "its tour held too",
   "what": "`pause()`, ❚❚ on the bar, or the reader taking the map: a press, a wheel that zooms, a key, a view or a selection the story didn't make."
  },
  {
   "id": "st-ended",
   "label": "Ended",
   "kind": "external",
   "icon": "checks",
   "sublabel": "done: true",
   "what": "Past the last step: `next()`, ✓ on the bar, or the last step's time. `player.done` resolves `true`."
  },
  {
   "id": "st-stopped",
   "label": "Stopped",
   "kind": "external",
   "icon": "eyeoff",
   "sublabel": "done: false",
   "what": "`stop()`, ✕, Esc, `play(null)`, another `play()`, an `update()` whose model lacks the story, or `destroy()`. `player.done` resolves `false`."
  },
  {
   "id": "tr-none",
   "label": "No trip",
   "kind": "state",
   "sublabel": "state.tour: false",
   "what": "No dot rides. `tour()` and `replay()` start one; a new one ends the one before."
  },
  {
   "id": "tr-riding",
   "label": "Riding",
   "kind": "state",
   "sublabel": "state.tour: true",
   "what": "The dot rides the line between each pair of cards in turn, and each card it reaches flashes."
  },
  {
   "id": "tr-held",
   "label": "Held",
   "kind": "state",
   "icon": "pause",
   "sublabel": "where it is",
   "what": "The page's ❚❚, a paused story (for its step's tour), or the replay's `pause()`."
  },
  {
   "id": "tr-end",
   "label": "Reached the end",
   "kind": "external",
   "icon": "checks",
   "sublabel": "resolves true",
   "what": "`tour()` resolves `true`, and so does a replay's `done`; a replay's labels stay."
  },
  {
   "id": "tr-cut",
   "label": "Cut short",
   "kind": "external",
   "icon": "eyeoff",
   "sublabel": "resolves false",
   "what": "Esc on the map, `tour(null)`, the next tour or replay, a new picture of the view, the replay's `stop()`, or `destroy()`."
  },
  {
   "id": "tr-rest",
   "label": "Lit at rest",
   "kind": "state",
   "sublabel": "the path lit and said",
   "what": "Under reduced motion no dot rides: the path is lit in the `tour` layer and said, and `tour()` resolves `true` at once. It stays until Esc, `tour(null)`, the next trip or a new picture."
  },
  {
   "id": "ky-lightbox",
   "label": "An example, full size",
   "kind": "state",
   "sublabel": "holds every key",
   "what": "An example shown full size, from a thumbnail in the details panel. It holds every key while open; Esc closes it and focus goes back to the thumbnail."
  },
  {
   "id": "ky-search",
   "label": "Search",
   "kind": "state",
   "sublabel": "/ or ⌘K opens it",
   "what": "Esc closes it and gives focus back; ⌘K (Ctrl K) closes it too."
  },
  {
   "id": "ky-help",
   "label": "The key list",
   "kind": "state",
   "sublabel": "? opens it",
   "what": "One of search, the key list and the menus is open at a time."
  },
  {
   "id": "ky-menu",
   "label": "A menu",
   "kind": "state",
   "sublabel": "Export, Stories, Lenses",
   "what": "Esc closes it and gives focus back to its button."
  },
  {
   "id": "ky-pill",
   "label": "The view's popover",
   "kind": "state",
   "sublabel": "i opens it",
   "what": "The popover of the view's pill."
  },
  {
   "id": "ky-recorder",
   "label": "The recorder",
   "kind": "state",
   "sublabel": "asks if not saved",
   "what": "Export ▸ Record a story...: Esc closes it, asking first while it holds steps not saved."
  },
  {
   "id": "ky-story",
   "label": "A story",
   "kind": "state",
   "sublabel": "stopped: play(null)",
   "what": "Esc or Backspace stops the story shown."
  },
  {
   "id": "ky-trip",
   "label": "A tour or replay",
   "kind": "state",
   "sublabel": "Esc ends it",
   "what": "Esc ends it and says so: \"Tour stopped\", \"Replay stopped\"."
  },
  {
   "id": "ky-selection",
   "label": "The selection",
   "kind": "state",
   "sublabel": "Esc clears it"
  },
  {
   "id": "ky-up",
   "label": "Up a level",
   "kind": "state",
   "sublabel": "else: at the top",
   "what": "Esc or Backspace with nothing selected goes up a level; at the top, the hint line says \"Already at the top\"."
  },
  {
   "id": "mc-asked",
   "label": "A page tool",
   "kind": "ai",
   "icon": "bot",
   "sublabel": "show_view, highlight...",
   "what": "`show_view`, `highlight`, `tour`, `play_story` or `clear`. A view, card, line or story the model lacks is an error, and nothing is sent."
  },
  {
   "id": "mc-want",
   "label": "Folded",
   "kind": "state",
   "sublabel": "view, highlight, tour, story",
   "what": "The latest of each, so a page that opens later shows what the assistant built, not its last command."
  },
  {
   "id": "mc-sent",
   "label": "Sent",
   "kind": "state",
   "sublabel": "to each open page",
   "what": "One event (Server-Sent Events) to each open page."
  },
  {
   "id": "mc-showing",
   "label": "Shown on the page",
   "kind": "frontend",
   "icon": "window",
   "sublabel": "once, within 5 s",
   "what": "The page shows each command once, one at a time; one that takes more than 5 s is answered as not shown."
  },
  {
   "id": "mc-acked",
   "label": "Acknowledged",
   "kind": "state",
   "sublabel": "its MapState, posted",
   "what": "The page posts its `MapState` with the command's id, or the error that stopped it."
  },
  {
   "id": "mc-answer",
   "label": "Answered",
   "kind": "ai",
   "icon": "checks",
   "sublabel": "Shown on 1 page",
   "what": "\"Shown on 1 page at ..., on view ...\". Otherwise the tool says the page could not show it and why, that the open pages did not show it within 6 s, or that no page is connected and the URL to open."
  },
  {
   "id": "c4-author",
   "type": "c4.Person",
   "label": "Author",
   "props": {
    "description": "Writes map models and renders, checks and shares their pages."
   }
  },
  {
   "id": "c4-reader",
   "type": "c4.Person",
   "label": "Reader",
   "props": {
    "description": "Opens a map, pans and zooms, and goes into its cards."
   }
  },
  {
   "id": "c4-umlimator",
   "type": "c4.SoftwareSystem",
   "label": "umlimator",
   "props": {
    "description": "Draws layered architecture maps and 28 typed diagrams from one JSON model."
   },
   "opensView": "containers"
  },
  {
   "id": "c4-assistant",
   "type": "c4.SoftwareSystem",
   "label": "AI assistant",
   "props": {
    "description": "Reads a model and drives its page for its user.",
    "external": true
   }
  },
  {
   "id": "c4-github",
   "type": "c4.SoftwareSystem",
   "label": "GitHub",
   "props": {
    "description": "Hosts the repository, runs its workflows and shows the diff Action's comment on a pull request.",
    "external": true
   }
  },
  {
   "id": "c4-chrome",
   "type": "c4.SoftwareSystem",
   "label": "Chrome",
   "props": {
    "description": "Google Chrome or Chromium, run headless.",
    "external": true
   }
  },
  {
   "id": "c4-cli",
   "type": "c4.Container",
   "label": "umlimator.py",
   "props": {
    "description": "render, check, stills, pdf, record, import, export, diff, drift, trace, timelapse and pack.",
    "technology": "Python 3, standard library"
   },
   "parent": "c4-umlimator"
  },
  {
   "id": "c4-module",
   "type": "c4.Container",
   "label": "Core module",
   "props": {
    "description": "lib/umlimator.js: render(), layout(), validate(), check(), diff() and the canvas.",
    "technology": "JavaScript, no dependency"
   },
   "parent": "c4-umlimator",
   "opensView": "layers"
  },
  {
   "id": "c4-all",
   "type": "c4.Container",
   "label": "umlimator/all",
   "props": {
    "description": "lib/umlimator-all.js: the core and the 28 typed diagram types.",
    "technology": "JavaScript"
   },
   "parent": "c4-umlimator",
   "opensView": "registry"
  },
  {
   "id": "c4-page",
   "type": "c4.Container",
   "label": "Standalone page",
   "props": {
    "description": "One HTML file the CLI writes: the map, its views list, search, panels and stories.",
    "technology": "HTML, one file"
   },
   "parent": "c4-umlimator",
   "opensView": "keys"
  },
  {
   "id": "c4-mcp",
   "type": "c4.Container",
   "label": "MCP server",
   "props": {
    "description": "umlimator.py mcp: read tools, and page tools that drive the page it serves.",
    "technology": "Python, JSON-RPC over stdio"
   },
   "parent": "c4-umlimator",
   "opensView": "mcp"
  },
  {
   "id": "c4-action",
   "type": "c4.Container",
   "label": "Diff Action",
   "props": {
    "description": "What a pull request changes in its models, as pages, stills and one comment.",
    "technology": "GitHub composite action"
   },
   "parent": "c4-umlimator",
   "opensView": "diff-run"
  },
  {
   "id": "c4-skill",
   "type": "c4.Container",
   "label": "map-repo skill",
   "props": {
    "description": "Tells an assistant how to map a repository into a model.",
    "technology": "Agent skill, Markdown"
   },
   "parent": "c4-umlimator"
  },
  {
   "id": "c4-docs",
   "type": "c4.Container",
   "label": "Docs site",
   "props": {
    "description": "The guide, the API, the conformance notes and this gallery.",
    "technology": "VitePress"
   },
   "parent": "c4-umlimator"
  },
  {
   "id": "pk-core",
   "type": "uml.Package",
   "label": "core"
  },
  {
   "id": "pk-draw",
   "type": "uml.Package",
   "label": "draw"
  },
  {
   "id": "pk-layout",
   "type": "uml.Package",
   "label": "layout"
  },
  {
   "id": "pk-map",
   "type": "uml.Package",
   "label": "map"
  },
  {
   "id": "pk-canvas",
   "type": "uml.Package",
   "label": "canvas"
  },
  {
   "id": "pk-page",
   "type": "uml.Package",
   "label": "page"
  },
  {
   "id": "cp-registry",
   "type": "uml.Component",
   "label": "Registry"
  },
  {
   "id": "cp-typed",
   "type": "uml.Component",
   "label": "Typed canvas"
  },
  {
   "id": "cp-uml",
   "type": "uml.Component",
   "label": "UML"
  },
  {
   "id": "cp-sysml",
   "type": "uml.Component",
   "label": "SysML"
  },
  {
   "id": "cp-c4",
   "type": "uml.Component",
   "label": "C4"
  },
  {
   "id": "cp-data",
   "type": "uml.Component",
   "label": "ER and data flow"
  },
  {
   "id": "cp-process",
   "type": "uml.Component",
   "label": "Flowchart and BPMN"
  },
  {
   "id": "cp-mindmap",
   "type": "uml.Component",
   "label": "Mindmap"
  },
  {
   "id": "cp-cloud",
   "type": "uml.Component",
   "label": "Cloud"
  },
  {
   "id": "ll-github",
   "type": "uml.Lifeline",
   "label": "github",
   "props": {
    "represents": "GitHub"
   }
  },
  {
   "id": "ll-action",
   "type": "uml.Lifeline",
   "label": "action",
   "props": {
    "represents": "DiffAction"
   }
  },
  {
   "id": "ll-cli",
   "type": "uml.Lifeline",
   "label": "cli",
   "props": {
    "represents": "umlimator.py"
   }
  },
  {
   "id": "ll-node",
   "type": "uml.Lifeline",
   "label": "node",
   "props": {
    "represents": "Module"
   }
  },
  {
   "id": "ll-chrome",
   "type": "uml.Lifeline",
   "label": "chrome",
   "props": {
    "represents": "Chrome"
   }
  }
 ],
 "edges": [
  {
   "id": "o1",
   "from": "author",
   "to": "model-file",
   "label": "writes",
   "weight": 2
  },
  {
   "id": "o2",
   "from": "assistant",
   "to": "skill",
   "label": "runs"
  },
  {
   "id": "o3",
   "from": "skill",
   "to": "model-file",
   "label": "writes",
   "kind": "feeds"
  },
  {
   "id": "o5",
   "from": "model-file",
   "to": "cli",
   "label": "read by",
   "kind": "feeds",
   "weight": 2
  },
  {
   "id": "o6",
   "from": "cli",
   "to": "readers",
   "label": "import",
   "sublabel": "in Node"
  },
  {
   "id": "o7",
   "from": "cli",
   "to": "module",
   "label": "runs diff(), drift()",
   "sublabel": "in Node"
  },
  {
   "id": "o8",
   "from": "cli",
   "to": "page",
   "label": "renders",
   "kind": "feeds",
   "weight": 2
  },
  {
   "id": "o9",
   "from": "cli",
   "to": "chrome",
   "label": "stills, PDF",
   "sublabel": "headless"
  },
  {
   "id": "o10",
   "from": "page",
   "to": "typed",
   "label": "draws with",
   "weight": 2
  },
  {
   "id": "o11",
   "from": "typed",
   "to": "module",
   "label": "registers types"
  },
  {
   "id": "o12",
   "from": "host",
   "to": "module",
   "label": "render()"
  },
  {
   "id": "o13",
   "from": "element",
   "to": "module",
   "label": "render()"
  },
  {
   "id": "o14",
   "from": "docs",
   "to": "element",
   "label": "umlimator blocks"
  },
  {
   "id": "o15",
   "from": "assistant",
   "to": "mcp",
   "label": "page tools",
   "sublabel": "MCP, stdio"
  },
  {
   "id": "o16",
   "from": "mcp",
   "to": "page",
   "label": "serves, drives",
   "kind": "state"
  },
  {
   "id": "o17",
   "from": "github",
   "to": "action",
   "label": "pull_request",
   "kind": "triggers"
  },
  {
   "id": "o18",
   "from": "action",
   "to": "cli",
   "label": "diff --base"
  },
  {
   "id": "o19",
   "from": "action",
   "to": "github",
   "label": "posts a comment"
  },
  {
   "id": "r1",
   "type": "c4.Relationship",
   "from": "c4-author",
   "to": "c4-umlimator",
   "label": "Writes models and renders pages with"
  },
  {
   "id": "r2",
   "type": "c4.Relationship",
   "from": "c4-reader",
   "to": "c4-umlimator",
   "label": "Reads maps in"
  },
  {
   "id": "r3",
   "type": "c4.Relationship",
   "from": "c4-assistant",
   "to": "c4-umlimator",
   "label": "Reads a model and drives its page with",
   "props": {
    "technology": "MCP"
   }
  },
  {
   "id": "r4",
   "type": "c4.Relationship",
   "from": "c4-github",
   "to": "c4-umlimator",
   "label": "Runs the diff Action of",
   "props": {
    "technology": "GitHub Actions"
   }
  },
  {
   "id": "r6",
   "type": "c4.Relationship",
   "from": "c4-umlimator",
   "to": "c4-chrome",
   "label": "Draws stills, PDFs and checks with",
   "props": {
    "technology": "DevTools protocol"
   }
  },
  {
   "id": "r7",
   "type": "c4.Relationship",
   "from": "c4-author",
   "to": "c4-cli",
   "label": "Renders, checks and exports with",
   "props": {
    "technology": "shell"
   }
  },
  {
   "id": "r8",
   "type": "c4.Relationship",
   "from": "c4-reader",
   "to": "c4-page",
   "label": "Reads maps in",
   "props": {
    "technology": "a browser"
   }
  },
  {
   "id": "r9",
   "type": "c4.Relationship",
   "from": "c4-reader",
   "to": "c4-docs",
   "label": "Reads the guide in",
   "props": {
    "technology": "HTTPS"
   }
  },
  {
   "id": "r10",
   "type": "c4.Relationship",
   "from": "c4-cli",
   "to": "c4-page",
   "label": "Writes"
  },
  {
   "id": "r11",
   "type": "c4.Relationship",
   "from": "c4-cli",
   "to": "c4-module",
   "label": "Runs diff(), drift() and the readers of",
   "props": {
    "technology": "Node"
   }
  },
  {
   "id": "r12",
   "type": "c4.Relationship",
   "from": "c4-page",
   "to": "c4-all",
   "label": "Draws with"
  },
  {
   "id": "r13",
   "type": "c4.Relationship",
   "from": "c4-all",
   "to": "c4-module",
   "label": "Extends"
  },
  {
   "id": "r14",
   "type": "c4.Relationship",
   "from": "c4-docs",
   "to": "c4-module",
   "label": "Embeds maps with",
   "props": {
    "technology": "<umlimator-map>"
   }
  },
  {
   "id": "r15",
   "type": "c4.Relationship",
   "from": "c4-assistant",
   "to": "c4-mcp",
   "label": "Calls the tools of",
   "props": {
    "technology": "MCP"
   }
  },
  {
   "id": "r16",
   "type": "c4.Relationship",
   "from": "c4-assistant",
   "to": "c4-skill",
   "label": "Follows"
  },
  {
   "id": "r17",
   "type": "c4.Relationship",
   "from": "c4-skill",
   "to": "c4-cli",
   "label": "Renders and checks with"
  },
  {
   "id": "r18",
   "type": "c4.Relationship",
   "from": "c4-mcp",
   "to": "c4-page",
   "label": "Drives",
   "props": {
    "technology": "Server-Sent Events"
   }
  },
  {
   "id": "r19",
   "type": "c4.Relationship",
   "from": "c4-github",
   "to": "c4-action",
   "label": "Runs on a pull request",
   "props": {
    "technology": "GitHub Actions"
   }
  },
  {
   "id": "r20",
   "type": "c4.Relationship",
   "from": "c4-action",
   "to": "c4-cli",
   "label": "Runs diff --base with"
  },
  {
   "id": "r22",
   "type": "c4.Relationship",
   "from": "c4-cli",
   "to": "c4-chrome",
   "label": "Draws stills and PDFs with",
   "props": {
    "technology": "DevTools protocol"
   }
  },
  {
   "id": "pk-draw-after-pk-core",
   "type": "uml.Dependency",
   "from": "pk-draw",
   "to": "pk-core",
   "label": "built after"
  },
  {
   "id": "pk-layout-after-pk-core",
   "type": "uml.Dependency",
   "from": "pk-layout",
   "to": "pk-core",
   "label": "built after"
  },
  {
   "id": "pk-map-after-pk-draw",
   "type": "uml.Dependency",
   "from": "pk-map",
   "to": "pk-draw",
   "label": "built after"
  },
  {
   "id": "pk-map-after-pk-layout",
   "type": "uml.Dependency",
   "from": "pk-map",
   "to": "pk-layout",
   "label": "built after"
  },
  {
   "id": "pk-canvas-after-pk-map",
   "type": "uml.Dependency",
   "from": "pk-canvas",
   "to": "pk-map",
   "label": "built after"
  },
  {
   "id": "pk-page-after-pk-canvas",
   "type": "uml.Dependency",
   "from": "pk-page",
   "to": "pk-canvas",
   "label": "built after"
  },
  {
   "id": "cp-uml-registers",
   "type": "uml.Dependency",
   "from": "cp-uml",
   "to": "cp-registry",
   "label": "registers"
  },
  {
   "id": "cp-sysml-registers",
   "type": "uml.Dependency",
   "from": "cp-sysml",
   "to": "cp-registry",
   "label": "registers"
  },
  {
   "id": "cp-c4-registers",
   "type": "uml.Dependency",
   "from": "cp-c4",
   "to": "cp-registry",
   "label": "registers"
  },
  {
   "id": "cp-data-registers",
   "type": "uml.Dependency",
   "from": "cp-data",
   "to": "cp-registry",
   "label": "registers"
  },
  {
   "id": "cp-process-registers",
   "type": "uml.Dependency",
   "from": "cp-process",
   "to": "cp-registry",
   "label": "registers"
  },
  {
   "id": "cp-mindmap-registers",
   "type": "uml.Dependency",
   "from": "cp-mindmap",
   "to": "cp-registry",
   "label": "registers"
  },
  {
   "id": "cp-cloud-registers",
   "type": "uml.Dependency",
   "from": "cp-cloud",
   "to": "cp-registry",
   "label": "registers"
  },
  {
   "id": "typed-needs-registry",
   "type": "uml.Dependency",
   "from": "cp-typed",
   "to": "cp-registry",
   "label": "looks up"
  }
 ],
 "views": [
  {
   "id": "overview",
   "title": "Umlimator",
   "parent": null,
   "caption": "What umlimator is made of, and who uses each part. Double-click the module, umlimator/all, the host page, the page, the MCP page or the diff Action to go in.",
   "nodeIds": [
    "author",
    "assistant",
    "skill",
    "model-file",
    "readers",
    "cli",
    "module",
    "typed",
    "page",
    "mcp",
    "host",
    "element",
    "docs",
    "action",
    "github",
    "chrome"
   ],
   "layout": {
    "author": [
     0,
     0.5
    ],
    "assistant": [
     0,
     1.5
    ],
    "skill": [
     1,
     1.5
    ],
    "model-file": [
     2,
     1
    ],
    "readers": [
     4,
     0
    ],
    "cli": [
     3,
     1
    ],
    "module": [
     6,
     0.5
    ],
    "typed": [
     5,
     2
    ],
    "page": [
     4,
     2
    ],
    "mcp": [
     3,
     2
    ],
    "host": [
     5,
     1
    ],
    "element": [
     1,
     4.5
    ],
    "docs": [
     0,
     4.5
    ],
    "action": [
     0,
     3.5
    ],
    "github": [
     1,
     3.5
    ],
    "chrome": [
     4,
     1
    ]
   },
   "containers": [
    {
     "id": "py",
     "label": "Python, standard library",
     "nodeIds": [
      "cli",
      "mcp"
     ]
    }
   ]
  },
  {
   "id": "context",
   "diagram": "c4.context",
   "title": "umlimator: system context",
   "parent": "overview",
   "subject": "c4-umlimator",
   "nodeIds": [
    "c4-author",
    "c4-reader",
    "c4-umlimator",
    "c4-assistant",
    "c4-github",
    "c4-chrome"
   ]
  },
  {
   "id": "containers",
   "diagram": "c4.container",
   "title": "umlimator: containers",
   "parent": "context",
   "subject": "c4-umlimator",
   "nodeIds": [
    "c4-umlimator",
    "c4-author",
    "c4-reader",
    "c4-cli",
    "c4-module",
    "c4-all",
    "c4-page",
    "c4-mcp",
    "c4-action",
    "c4-skill",
    "c4-docs",
    "c4-assistant",
    "c4-github",
    "c4-chrome"
   ]
  },
  {
   "id": "layers",
   "diagram": "uml.package",
   "title": "The module's packages, in build order",
   "parent": "overview",
   "direction": "down",
   "nodeIds": [
    "pk-page",
    "pk-canvas",
    "pk-map",
    "pk-draw",
    "pk-layout",
    "pk-core"
   ],
   "edges": [
    "pk-draw-after-pk-core",
    "pk-layout-after-pk-core",
    "pk-map-after-pk-draw",
    "pk-map-after-pk-layout",
    "pk-canvas-after-pk-map",
    "pk-page-after-pk-canvas"
   ]
  },
  {
   "id": "registry",
   "diagram": "uml.component",
   "title": "umlimator/all: the typed families",
   "parent": "overview",
   "nodeIds": [
    "cp-registry",
    "cp-typed",
    "cp-uml",
    "cp-sysml",
    "cp-c4",
    "cp-data",
    "cp-process",
    "cp-mindmap",
    "cp-cloud"
   ]
  },
  {
   "id": "diff-run",
   "diagram": "uml.sequence",
   "title": "The diff Action on a pull request",
   "parent": "overview",
   "nodeIds": [
    "ll-github",
    "ll-action",
    "ll-cli",
    "ll-node",
    "ll-chrome"
   ],
   "edges": [
    {
     "id": "d1",
     "type": "uml.Message",
     "from": "ll-github",
     "to": "ll-action",
     "label": "pull_request",
     "props": {
      "sort": "async"
     }
    },
    {
     "id": "d2",
     "type": "uml.Message",
     "from": "ll-action",
     "to": "ll-cli",
     "label": "diff --base",
     "props": {
      "sort": "call"
     }
    },
    {
     "id": "d3",
     "type": "uml.Message",
     "from": "ll-cli",
     "to": "ll-cli",
     "label": "changed models",
     "props": {
      "sort": "call"
     }
    },
    {
     "id": "d4",
     "type": "uml.Message",
     "from": "ll-cli",
     "to": "ll-node",
     "label": "diff(before, after)",
     "props": {
      "sort": "call"
     }
    },
    {
     "id": "d5",
     "type": "uml.Message",
     "from": "ll-node",
     "to": "ll-cli",
     "label": "summary, marks",
     "props": {
      "sort": "reply",
      "replyTo": "d4"
     }
    },
    {
     "id": "d6",
     "type": "uml.Message",
     "from": "ll-cli",
     "to": "ll-chrome",
     "label": "stills",
     "props": {
      "sort": "call"
     }
    },
    {
     "id": "d7",
     "type": "uml.Message",
     "from": "ll-chrome",
     "to": "ll-cli",
     "label": "PNG files",
     "props": {
      "sort": "reply",
      "replyTo": "d6"
     }
    },
    {
     "id": "d8",
     "type": "uml.Message",
     "from": "ll-cli",
     "to": "ll-action",
     "label": "pages, stills, summary",
     "props": {
      "sort": "reply",
      "replyTo": "d2"
     }
    },
    {
     "id": "d9",
     "type": "uml.Message",
     "from": "ll-action",
     "to": "ll-github",
     "label": "post the comment",
     "props": {
      "sort": "call"
     },
     "parent": "f-write"
    },
    {
     "id": "d10",
     "type": "uml.Message",
     "from": "ll-action",
     "to": "ll-github",
     "label": "job summary",
     "props": {
      "sort": "async"
     },
     "parent": "f-fork"
    }
   ],
   "fragments": [
    {
     "id": "f-token",
     "type": "uml.CombinedFragment",
     "props": {
      "operator": "alt"
     },
     "members": [
      {
       "id": "f-write",
       "type": "uml.InteractionOperand",
       "label": "token can write"
      },
      {
       "id": "f-fork",
       "type": "uml.InteractionOperand",
       "label": "else"
      }
     ]
    }
   ]
  },
  {
   "id": "machines",
   "title": "umlimator's state machines",
   "caption": "The machines a host, a reader or an agent drives, and the state they all report. Double-click one for its states.",
   "gap": 290,
   "rgap": 64,
   "nodeIds": [
    "page",
    "mcp",
    "story",
    "navigation",
    "tour",
    "mapstate"
   ],
   "containers": [
    {
     "id": "handle",
     "label": "render()'s handle",
     "nodeIds": [
      "story",
      "navigation",
      "tour"
     ]
    }
   ],
   "layout": {
    "page": [
     0,
     0
    ],
    "mcp": [
     0,
     1
    ],
    "story": [
     1,
     0.5
    ],
    "navigation": [
     2,
     1
    ],
    "tour": [
     3,
     0
    ],
    "mapstate": [
     4,
     0.5
    ]
   },
   "edges": [
    {
     "id": "c1",
     "from": "page",
     "to": "handle",
     "label": "keys, a link"
    },
    {
     "id": "c2",
     "from": "mcp",
     "to": "handle",
     "label": "page tools"
    },
    {
     "id": "c3",
     "from": "story",
     "to": "navigation",
     "label": "a step's view"
    },
    {
     "id": "c4",
     "from": "story",
     "to": "tour",
     "label": "a step's tour"
    },
    {
     "id": "c5",
     "from": "navigation",
     "to": "tour",
     "label": "ends it"
    },
    {
     "id": "c6",
     "from": "handle",
     "to": "mapstate",
     "label": "every change"
    }
   ],
   "parent": "overview"
  },
  {
   "id": "navigation",
   "parent": "machines",
   "title": "Navigation",
   "caption": "One move at a time, and the latest request wins. setView() resolves true once its view shows, else false.",
   "render": "sequence",
   "lanes": false,
   "gap": 120,
   "rgap": 90,
   "nodeIds": [
    "nav-rest",
    "nav-leaving",
    "nav-drawing",
    "nav-entering"
   ],
   "edges": [
    {
     "id": "n1",
     "from": "nav-rest",
     "to": "nav-leaving",
     "label": "setView(), open, up"
    },
    {
     "id": "n2",
     "from": "nav-leaving",
     "to": "nav-drawing",
     "label": "faded"
    },
    {
     "id": "n3",
     "from": "nav-drawing",
     "to": "nav-entering",
     "label": "drawn"
    },
    {
     "id": "n4",
     "from": "nav-entering",
     "to": "nav-leaving",
     "label": "a later request",
     "toSide": "top"
    },
    {
     "id": "n5",
     "from": "nav-entering",
     "to": "nav-rest",
     "label": "shown: true"
    }
   ]
  },
  {
   "id": "story",
   "parent": "machines",
   "title": "Story player",
   "caption": "player.state: entering a step, playing or paused on it, then ended or stopped. A story event comes on each change.",
   "rgap": 110,
   "nodeIds": [
    "st-none",
    "st-entering",
    "st-playing",
    "st-paused",
    "st-ended",
    "st-stopped"
   ],
   "containers": [
    {
     "id": "st-shown",
     "label": "A story shown",
     "nodeIds": [
      "st-entering",
      "st-playing",
      "st-paused"
     ],
     "badges": [
      "one at a time"
     ]
    }
   ],
   "layout": {
    "st-none": [
     0,
     0.5
    ],
    "st-entering": [
     1,
     0.5
    ],
    "st-playing": [
     2,
     0
    ],
    "st-paused": [
     2,
     1
    ],
    "st-ended": [
     3,
     0
    ],
    "st-stopped": [
     3,
     1
    ]
   },
   "edges": [
    {
     "id": "s1",
     "from": "st-none",
     "to": "st-entering",
     "label": "play(id)"
    },
    {
     "id": "s2",
     "from": "st-entering",
     "to": "st-playing",
     "label": "shown"
    },
    {
     "id": "s3",
     "from": "st-playing",
     "to": "st-entering",
     "label": "time up, next()"
    },
    {
     "id": "s4",
     "from": "st-entering",
     "to": "st-paused",
     "label": "shown"
    },
    {
     "id": "s5",
     "from": "st-paused",
     "to": "st-entering",
     "label": "next(), prev()"
    },
    {
     "id": "s6",
     "from": "st-playing",
     "to": "st-paused",
     "label": "pause(), reader input"
    },
    {
     "id": "s7",
     "from": "st-paused",
     "to": "st-playing",
     "label": "resume()"
    },
    {
     "id": "s8",
     "from": "st-shown",
     "to": "st-ended",
     "label": "past the last step"
    },
    {
     "id": "s9",
     "from": "st-shown",
     "to": "st-stopped",
     "label": "stop(), ✕, Esc"
    }
   ]
  },
  {
   "id": "tour",
   "parent": "machines",
   "title": "Tour and replay",
   "caption": "One trip at a time. tour() and a replay's done resolve true at the end, false when cut short.",
   "gap": 96,
   "rgap": 80,
   "nodeIds": [
    "tr-none",
    "tr-riding",
    "tr-held",
    "tr-end",
    "tr-cut",
    "tr-rest"
   ],
   "containers": [
    {
     "id": "tr-trip",
     "label": "A dot rides",
     "nodeIds": [
      "tr-riding",
      "tr-held"
     ]
    }
   ],
   "layout": {
    "tr-none": [
     0,
     0
    ],
    "tr-riding": [
     1,
     0
    ],
    "tr-held": [
     1,
     1
    ],
    "tr-end": [
     2,
     0
    ],
    "tr-cut": [
     2,
     1
    ],
    "tr-rest": [
     2,
     2
    ]
   },
   "edges": [
    {
     "id": "t1",
     "from": "tr-none",
     "to": "tr-riding",
     "label": "tour(), replay()"
    },
    {
     "id": "t2",
     "from": "tr-riding",
     "to": "tr-held",
     "label": "❚❚, pause()"
    },
    {
     "id": "t3",
     "from": "tr-held",
     "to": "tr-riding",
     "label": "▶, resume()"
    },
    {
     "id": "t4",
     "from": "tr-riding",
     "to": "tr-end",
     "label": "the last line"
    },
    {
     "id": "t5",
     "from": "tr-trip",
     "to": "tr-cut",
     "label": "Esc, tour(null)"
    },
    {
     "id": "t6",
     "from": "tr-none",
     "to": "tr-rest",
     "label": "reduced motion"
    }
   ],
   "tour": [
    "tr-none",
    "tr-riding",
    "tr-end"
   ]
  },
  {
   "id": "keys",
   "parent": "machines",
   "title": "The page's keys",
   "caption": "Esc and Backspace close the top open layer first, in this order. On the map, Esc ends a tour or replay, then clears the selection, then goes up.",
   "render": "sequence",
   "lanes": false,
   "nodeIds": [
    "ky-lightbox",
    "ky-search",
    "ky-help",
    "ky-menu",
    "ky-pill",
    "ky-recorder",
    "ky-story",
    "ky-trip",
    "ky-selection",
    "ky-up"
   ],
   "edges": [
    {
     "id": "k1",
     "from": "ky-lightbox",
     "to": "ky-search",
     "label": "Esc"
    },
    {
     "id": "k2",
     "from": "ky-search",
     "to": "ky-help",
     "label": "Esc"
    },
    {
     "id": "k3",
     "from": "ky-help",
     "to": "ky-menu",
     "label": "Esc"
    },
    {
     "id": "k4",
     "from": "ky-menu",
     "to": "ky-pill",
     "label": "Esc"
    },
    {
     "id": "k5",
     "from": "ky-pill",
     "to": "ky-recorder",
     "label": "Esc"
    },
    {
     "id": "k6",
     "from": "ky-recorder",
     "to": "ky-story",
     "label": "Esc"
    },
    {
     "id": "k7",
     "from": "ky-story",
     "to": "ky-trip",
     "label": "Esc"
    },
    {
     "id": "k8",
     "from": "ky-trip",
     "to": "ky-selection",
     "label": "Esc"
    },
    {
     "id": "k9",
     "from": "ky-selection",
     "to": "ky-up",
     "label": "Esc"
    }
   ]
  },
  {
   "id": "mcp",
   "parent": "machines",
   "title": "The MCP page",
   "caption": "A page tool, step by step: it answers \"shown\" only once a page has shown it.",
   "render": "sequence",
   "lanes": false,
   "gap": 240,
   "nodeIds": [
    "mc-asked",
    "mc-want",
    "mc-sent",
    "mc-showing",
    "mc-acked",
    "mc-answer"
   ],
   "containers": [
    {
     "id": "mc-server",
     "label": "umlimator.py mcp",
     "nodeIds": [
      "mc-asked",
      "mc-want",
      "mc-sent"
     ]
    },
    {
     "id": "mc-page",
     "label": "The served page",
     "nodeIds": [
      "mc-showing",
      "mc-acked"
     ]
    }
   ],
   "edges": [
    {
     "id": "m1",
     "from": "mc-asked",
     "to": "mc-want",
     "label": "rendered"
    },
    {
     "id": "m2",
     "from": "mc-want",
     "to": "mc-sent",
     "label": "SSE"
    },
    {
     "id": "m3",
     "from": "mc-sent",
     "to": "mc-showing",
     "label": "applied"
    },
    {
     "id": "m4",
     "from": "mc-showing",
     "to": "mc-acked",
     "label": "posted"
    },
    {
     "id": "m5",
     "from": "mc-acked",
     "to": "mc-answer",
     "label": "within 6 s"
    }
   ]
  }
 ],
 "stories": [
  {
   "id": "assistant",
   "title": "An assistant, then the reader",
   "steps": [
    {
     "view": "machines",
     "caption": "An assistant calls show_view. The MCP page asks render()'s handle for the view.",
     "highlight": [
      "mcp",
      "navigation"
     ],
     "select": "mcp"
    },
    {
     "view": "mcp",
     "caption": "The server folds the command into what the page should show and sends it. The page shows it and posts its MapState back, so the tool can answer \"Shown on 1 page\".",
     "highlight": [
      "mc-asked",
      "mc-want",
      "mc-sent",
      "mc-showing",
      "mc-acked",
      "mc-answer"
     ],
     "tour": [
      "mc-asked",
      "mc-want",
      "mc-sent",
      "mc-showing",
      "mc-acked",
      "mc-answer"
     ],
     "duration": 6000
    },
    {
     "view": "navigation",
     "caption": "On the page, the move leaves the view, draws the new one and zooms in. setView() resolves true, and one viewchange follows.",
     "highlight": [
      "nav-rest",
      "nav-leaving",
      "nav-drawing",
      "nav-entering"
     ],
     "tour": [
      "nav-rest",
      "nav-leaving",
      "nav-drawing",
      "nav-entering",
      "nav-rest"
     ]
    },
    {
     "view": "story",
     "caption": "The reader plays a story: each step enters, then plays. A press on the map pauses it, and ▶ plays on.",
     "highlight": [
      "st-none",
      "st-entering",
      "st-playing",
      "st-paused"
     ],
     "tour": [
      "st-none",
      "st-entering",
      "st-playing",
      "st-paused"
     ]
    },
    {
     "view": "tour",
     "caption": "A tour rides until the dot reaches the end: tour() resolves true. The page's ❚❚ holds it, and Esc cuts it short: false.",
     "highlight": [
      "tr-none",
      "tr-riding",
      "tr-held",
      "tr-end"
     ],
     "select": "tr-held"
    },
    {
     "view": "keys",
     "caption": "Esc closes the top open layer first: the story, then the tour, then the selection, then up a level.",
     "highlight": [
      "ky-story",
      "ky-trip",
      "ky-selection",
      "ky-up"
     ],
     "tour": [
      "ky-story",
      "ky-trip",
      "ky-selection",
      "ky-up"
     ]
    },
    {
     "view": "machines",
     "caption": "Every change reaches MapState as one state event, and page_state() reads it back for the assistant.",
     "highlight": [
      "navigation",
      "story",
      "tour",
      "mapstate",
      "mcp"
     ],
     "select": "mapstate"
    }
   ]
  },
  {
   "id": "pull-request",
   "title": "A pull request, from push to comment",
   "steps": [
    {
     "view": "overview",
     "caption": "A pull request changes a model. GitHub starts the diff Action.",
     "highlight": [
      "github",
      "action"
     ],
     "select": "action"
    },
    {
     "view": "overview",
     "caption": "The Action runs umlimator.py diff --base, which runs diff() in Node and draws stills of the changed views in Chrome.",
     "highlight": [
      "action",
      "cli",
      "module",
      "chrome"
     ],
     "tour": [
      "action",
      "cli",
      "module"
     ]
    },
    {
     "view": "overview",
     "caption": "The Action posts one comment on the pull request, with a summary in words and the stills.",
     "highlight": [
      "action",
      "github"
     ],
     "tour": [
      "action",
      "github"
     ]
    }
   ]
  }
 ]
}
