kUML brings type-checked UML/SysML modeling built for the LLM era
kUML models UML/SysML as typed Kotlin code so diagrams stay in sync with source, letting compilers verify LLM output, with AUTOSAR ARXML round-trip and OCL support.
A developer with two decades of automotive R&D experience built kUML to fix a chronic problem: UML/SysML diagrams silently drifting out of sync with the code they describe. Unlike PlantUML or Mermaid, which are bespoke text formats disconnected from source code, kUML defines diagrams as ordinary typed Kotlin code — a model that fails type-checking simply won't render, catching drift at compile time.
The tool is explicitly designed for an LLM-assisted workflow: its typed Kotlin DSL rejects hallucinated models before they compile, named parameters guard against argument-order mistakes common in LLM output, and an MCP server (kuml-mcp) lets agents validate and render models in a sandboxed process rather than emitting unchecked text. A dedicated benchmark also measures how often LLM-generated kUML code actually type-checks, compared against PlantUML and Mermaid.
Version 0.24.6 already supports all UML2 and SysML2 diagram types, C4 and BPMN 2.0, AUTOSAR ARXML round-tripping, a full OCL 2.4/2.5 expression engine, reverse-engineering from Java/Kotlin source, model-to-model transformers, executable state machines, and on-chain model signing. A JetBrains plugin, VS Code extension, and standalone desktop editor exist but remain untested — a limitation the author openly acknowledges.
For engineers, this matters because it tackles the model-code divergence problem at the compiler level rather than through discipline or process. As LLMs increasingly generate diagrams and specs, a verifiable, typed modeling language offers a more durable foundation than text formats whose only advantage is training-data familiarity.