GitHubGitHub Stars

Vision

A product model is meaning in data form — structure, geometry, tolerances, kinematics. Yet most engineering tools lock that meaning into proprietary binary formats, GUI click paths and vendor silos. kSTEP starts from the opposite premise: engineering models expressed as a type-safe Kotlin DSL — versionable, diffable, precise, and deliberately designed for the LLM era.

CAD is the starting point, not the boundary. kSTEP is scoped to the full breadth of ISO 10303: CAD geometry, manufacturing with STEP-NC, electrical and electronic assemblies, kinematics, composites, FEM and simulation. The first release is deliberately narrow — AP242 product structure and metadata; geometry is under way in the repository but not part of that scope — because a small, shippable core beats a broad promise.

Why kSTEP?

Today's CAD landscape splits into two camps. The first: classical suites — SolidWorks, CATIA, Siemens NX, Fusion 360, Onshape. GUI-centric, click-based, proprietary binary formats, AI bolted on afterward.

The second: code-first CAD — OpenSCAD, CadQuery, Build123d, Replicad, JSCAD. Script-based, parametric, git-friendly — but niche, and without real AI integration. And the Python-based tools lack the one thing a reliable LLM feedback loop needs: a static type system.

kSTEP is the deliberate third way. Code-first like the second camp. AI-first like neither. And STEP-native instead of proprietary — the open ISO standard as the data model, not an export afterthought.

Values

  • Correctness first: the compiler and the STEP schema decide what is valid — not a drawing tool after the fact.
  • STEP-native: ISO 10303 is the data model, not merely an export target.
  • AI-first: LLM agents are users of the language, designed for from day one.
  • Open by default: Apache 2.0, a public roadmap, development in the open.

Relationship to kUML and kTRIZ

kSTEP is the engineering sibling in a family of Typed Domain Grounding DSLs.kUMLcovers the IT and software domain — UML 2, SysML 2, C4 — as a type-safe Kotlin DSL that already ships. kSTEP applies the same philosophy to the engineering domain, across the breadth of ISO 10303. AndkTRIZapplies it to structured innovation methodology (TRIZ). Together the three span a continuous, AI-operable modeling space from IT into engineering and inventive problem solving — same author, same architecture, shared conventions from file format to release discipline.

History

kSTEP grew out of a simple observation: Typed Domain Grounding works. In kUML, a statically typed DSL plus compiler feedback turned LLMs into reliable modeling partners for software architecture. The natural next question was whether the same architecture could ground an LLM in physical engineering data — in STEP. A Discovery phase answered it: kernel, constraint solver, licenses, scope and target users are settled. The first implementation milestone is now complete — a semantic AP242 core that parses EXPRESS, generates type-safe Kotlin, validates against WHERE rules, and round-trips STEP Part 21 files. The core has since deepened: the generator resolves type aliases, enumerations and closed SELECT types, DERIVE attributes become computed properties, reverse references (USEDIN, INVERSE) and the UNIQUE and acyclic-usage rules of assemblies are evaluated, and the AP242 excerpt covers sixteen entities — still an excerpt of the schema, not all of AP242. An AI layer is underway next: an MCP server already exposes the DSL to LLM agents as tool-calling tools. And the geometry track, once just a first bridge, now has real substance: an OpenCascade (OCCT) binding builds real B-Rep solids — boxes, extruded profiles, filleted edges — with an early parametric feature-history layer on top; a PlaneGCS-based 2D constraint solver resolves coincidence, distance, alignment, parallel, and perpendicular constraints; geometry shares a single STEP file with product structure; and the desktop viewer is now interactive — drag to orbit, scroll to zoom, multiple shapes composed into one shaded scene — alongside a headless renderer that exports SVG, PNG, and self-contained glTF/GLB files. The viewer has kept moving since: pan now joins orbit and zoom (shift-drag or a middle-button drag), each part in a scene can carry its own material color, and curved surfaces — a fillet, a cylinder — now shade smoothly instead of faceted, via real per-vertex normals computed from OCCT's own triangulation data. The headless SVG/PNG exports stay flat-shaded on purpose, a documented format limitation rather than an oversight. Since v0.2.0 the geometry track also covers union, difference and intersection, cylinders, holes, revolve and chamfer; a sketch DSL with PlaneGCS constraints; edges selected by geometric rules and followed through later operations instead of addressed by index;kstep export that writes geometry and placed assemblies into the STEP file (FreeCAD shows hierarchy and position); andkstep import, which reads STEP files with geometry back, files written by FreeCAD included — external file references are rejected, not loaded. v0.3.0 adds circle and arc radii as solver unknowns and several separate contours in one sketch, a sketch as a step of the feature history, persistent naming of the edges that operations generate, undo/redo for feature histories, mirror, scale and shell, face and vertex selection, render and GLB of placed assemblies, and colours and layers in STEP export and import. PMI and pocket, draft and thickening operations are not included yet. Geometry, sketches and kstep import need a system OpenCascade (Linux x86-64, or macOS arm64 via Homebrew) and a self-built native bridge; interoperability is verified only with OpenCascade-based readers (OpenCascade, FreeCAD), other CAD/PLM systems are unchecked.

Tooling

The first real editor integration exists too: obsidian-kstep, an Obsidian plugin that renders kstep code blocks inline, built on the same headless preview renderer kstep renderuses. A geometry card doesn't stop at a static poster: click the3D toggle and it mounts a real interactive viewer — WebGL2 via three.js, fed by a second, GLB-format render of the same model — so a part can be orbited and inspected directly inside a note, no separate application needed. A model without geometry gets a formatted product-structure card instead, and a script that fails to compile or fails validation surfaces a structured error card with line/column or rule-violation detail. It mirrors whatkUML's own Obsidian plugin already does for UML/SysML diagrams. Still an early scaffold (V0.2.0, desktop-only, not yet on the Community Plugin store) — seekstep-lang/obsidian-kstep.

Documentation authors get their own integration too:kstep asciidoc, a CLI subcommand that pre-renderskstep script blocks — a Markdown fence, an AsciiDoc[kstep] block, or a kstep::path[] macro — found inside .adoc files into SVG/PNG images, then rewrites the document to plain AsciiDoc with image::references in their place. It mirrorskUML's own kuml-asciidoc extension in spirit, and even in mechanism: both turned out to be a pre-processing step rather than a live Asciidoctor extension, since Antora's Node.js-based pipeline cannot load a JVM extension anyway. Aimed at Asciidoctor/Antora-based project documentation, not at end-user CAD interaction.

Get involved

kSTEP is being built in the open, and it is still early — the repository atgithub.com/kstep-lang/kSTEPhas a working semantic core and a pre-release, v0.3.0(see What's New; JVM-only CLI zip, no native bridges — geometry, sketches and kstep import need a self-build —, not on Maven Central or Homebrew). Star or watch the repo to follow along; issues and discussions are open for questions, use cases and ideas — especially from PLM, interop and digital-twin practitioners.