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
// Bracket.kstep.kts — no imports required, kstep script host provides them
product(name = "Bracket-42") {
    description = "Mounting bracket, aluminum, 4-hole"
    partNumber = "BRK-42"

    partVersion(id = "C") {
        approvalStatus = Approved       // type-safe enum, not a string
        approvedBy = "J. Betchvaia"
    }
}
// kstep render Bracket.kstep.kts --out Bracket.step  (STEP Part 21 / AP242)

Target syntax — sketched for M1, not shipped yet.

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, filleted edges) with a first parametric feature-history layer, a 2D constraint solver (PlaneGCS) resolving coincidence, distance, alignment, parallel, and perpendicular constraints, geometry merged with product structure in a single STEP file, glTF/GLB export, and an interactive desktop viewer (orbit, pan, zoom, per-part material colors, smooth shading on curved surfaces). Full sketch authoring, stable geometric edge identity, and undo/redo are still ahead.

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 a first step into geometry has been taken.

  1. M0 Complete

    Discovery

    Market scan, stack and license decisions, V1 scope.

  2. M1 Complete

    Headless MVP

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

  3. M2 In progress

    AI Layer

    An MCP server with LLM tool calling and structured validation feedback exists; the LLM comparison benchmark is still ahead.

  4. M3 Started

    Geometry & Desktop Viewer

    Several foundation pieces now work end to end: real B-Rep solids (extrude, fillet) with a first parametric feature-history layer, an expanded 2D constraint solver, geometry merged with product structure in one STEP file, glTF/GLB export, and an interactive desktop viewer (orbit, pan, zoom, per-part colors, smooth shading on curved surfaces). Full sketch authoring and stable geometric edge identity are still ahead.

  5. M4 Planned

    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