Typed Domain Grounding
A statically typed Kotlin DSL plus compiler feedback gives LLMs a ground truth — the same architecture that makes kUML reliable, applied to inventive problem solving.
One typed vocabulary. Verifiable contradictions. Readable for humans and AI.
kTRIZ turns TRIZ (Theory of Inventive Problem Solving) into a type-safe Kotlin DSL — the 39 engineering parameters, the 40 inventive principles and the classical contradiction matrix become compiler-checked types instead of flipcharts and spreadsheet transcriptions. An LLM that invents a parameter simply fails to compile.
import dev.ktriz.core.EngineeringParameter
import dev.ktriz.core.contradiction
import dev.ktriz.core.resolve
val problem = contradiction(
improving = EngineeringParameter.WEIGHT_OF_MOVING_OBJECT,
worsening = EngineeringParameter.STRENGTH,
)
problem.resolve().forEach { p -> println("#${p.id} ${p.labelEn}") }
// -> #1 Segmentation, #8 Anti-weight, #40 Composite materials, #15 DynamicsThis compiles today — ktriz-core, wave 1.
LLM+TRIZ tools already exist. None of them are compiler-checked. kTRIZ is the deliberate, verifiable third way.
A statically typed Kotlin DSL plus compiler feedback gives LLMs a ground truth — the same architecture that makes kUML reliable, applied to inventive problem solving.
The 39 engineering parameters and 40 inventive principles are Altshuller's own classical vocabulary, expressed directly as Kotlin enums — not a bespoke ontology that TRIZ practitioners have to relearn.
AutoTRIZ, TRIZ-GPT and TRIZ-RAGNER extract TRIZ artifacts via prompting, RAG or named-entity recognition — none of them validate the result against a type system. The one formal strand that exists, IDM/OTSM-TRIZ, is an external, pre-LLM ontology. kTRIZ is the first to combine an embedded typed DSL with an LLM generation loop for TRIZ.
LLM agents are a first-class user of the DSL — named parameters everywhere, a compiler-error-as-repair-signal loop, an MCP server over stdio (ktriz mcp) and a *.ktriz.kts scripting host (ktriz run), both already shipped, mirroring what kUML already ships.
The 39 parameters and 40 principles are public domain. The contradiction matrix is not automatically so — a concrete digitised transcription can carry its own database right, and later commercial matrices (2003/2010) are proprietary. kTRIZ ships the full classical 39×39 matrix (1248 cells) as its own compilation, reconciled from four independent free sources — the sui-generis database-right question on that compilation stays openly documented, not claimed settled. Holders of their own licensed matrix can supply it through a hardened, pluggable data-source interface.
Same Typed Domain Grounding architecture already shipping in kUML (IT and software modeling) and under active development in kSTEP (mechanical engineering) — kTRIZ is the third domain, same author, same conventions.
The repository is real, the waves are public, and every step lands in the open.
kTRIZ on GitHub