GitHub
Kotlin DSL · ISO 10303 · AP242 · CAD · Engineering

Engineering that compiles.

One typed source. STEP-native models. Readable for humans and AI.

kSTEP is the first AI-first, code-first, STEP-native engineering modeling DSL for Kotlin/JVM. It brings Typed Domain Grounding — the architecture proven in kUML — to physical engineering: a statically typed DSL plus compiler feedback that gives humans and LLMs a reliable ground truth, from product structure to geometry.

Bracket.kstep.kts
// product-structure.kstep.kts — shortened excerpt of the playground example
val appCtx = applicationContext { application = "configuration control" }.getOrThrow()
val prodCtx =
    productContext {
        name = "engineering"
        frameOfReference = appCtx
        disciplineType = "mechanical"
    }.getOrThrow()

val housing =
    product("HSG-100") {
        name = "Housing"
        description = "Enclosure housing"
        frameOfReference = setOf(prodCtx)
    }.getOrThrow()
// ... product definitions, nextAssemblyUsageOccurrence, stepFile { } -> STEP Part 21

Shortened excerpt of the playground example — pre-release v0.3.0 (JVM-only CLI zip without native bridges), geometry only in a local build.

Why kSTEP

Code-first. AI-first. STEP-native.

Today's CAD world offers GUI suites with proprietary formats — or code-first scripting without real AI integration. kSTEP is the deliberate third way.

Typed Domain Grounding

A statically typed Kotlin DSL plus compiler and validation feedback gives LLMs a ground truth to work against — the same principle that makes kUML reliable, applied to engineering data.

STEP-native, not proprietary

kSTEP speaks ISO 10303 directly — AP242, Part 21 export, product structure and beyond. No binary vendor formats, no lossy conversion.

A proven geometry kernel

Geometry builds on OpenCascade (OCCT), accessed via JNI on the desktop first — with a WASM path already open for a later browser playground, from the same codebase. Several foundation pieces already work end to end: real B-Rep solids (boxes, extrusions, fillets, chamfers, cylinders, holes, revolve, union/difference/intersection) with a parametric feature history, a sketch DSL with PlaneGCS constraints and geometric edge selectors, geometry and placed assemblies in a single STEP file, `kstep import` to read STEP files with geometry back, glTF/GLB export, and an interactive desktop viewer (orbit, pan, zoom, per-part material colors, smooth shading on curved surfaces). Since v0.3.0 it also has persistent naming of generated edges, undo/redo, mirror, scale and shell, face and vertex selection, and colours and layers in STEP export and import; PMI, pocket or hole from a face, draft and thickening are still ahead. Geometry needs a system OpenCascade and a self-build; the release zip contains no native bridges.

AI-first, not AI bolted on

LLM agents are a first-class user of the DSL — named parameters everywhere, validation loops, and an MCP server that already exposes the DSL as tool-calling tools, mirroring what kUML already ships.

Type safety as a feature

CadQuery and Build123d are Python — no static types, no compiler feedback. Kotlin's type system is kSTEP's deliberate differentiator, not an accident of language preference.

Open source, license-clean

Apache 2.0 for kSTEP's own code, dynamically linked against LGPL OCCT and PlaneGCS. Cleared deliberately during Discovery — no GPL traps.

Roadmap

Built in the open, milestone by milestone

kSTEP's semantic core is done, the AI layer is under way, and geometry is growing: operations, sketches and STEP import are in.

  1. M0Complete

    Discovery

    Market scan, stack and license decisions, V1 scope.

  2. M1Complete

    Headless MVP

    EXPRESS parser, Kotlin codegen, WHERE-rule validation, STEP Part 21 round-trip, CLI.

  3. M2In progress

    AI Layer

    An MCP server with LLM tool calling and structured validation feedback exists, including opt-in model-level validation (USEDIN, INVERSE, UNIQUE, acyclic usage; in `kstep export` via `--validate`); the LLM comparison benchmark is still ahead.

  4. M3Started

    Geometry & Desktop Viewer

    Real B-Rep solids with feature history and operations (union, difference, intersection, hole, revolve, chamfer), a sketch DSL with PlaneGCS constraints, geometric and persistently named edge selectors with undo/redo, mirror, scale and shell, colours and layers, geometry and placed assemblies in one STEP file (`kstep export`), `kstep import` for STEP files with geometry, glTF/GLB export, and an interactive desktop viewer. Geometry needs a system OpenCascade and a self-build (Linux x86-64, macOS arm64); the release zip contains no native bridges. PMI and pocket or hole from a face are still ahead.

  5. M4Planned

    Ecosystem

    Gradle plugin, IDE plugin, docs embedding.

Follow the build.

The repository is real, the milestones are public, and every step lands in the open.

kSTEP on GitHub