Kernel Language
Status: 🟡 In progress — ADR-0006 is Proposed and build-off-gated. This page describes the hypothesis and the decision criteria, not a decided language. Do not treat the default as decided.
What is being decided
The implementation language for the Reality Kernel affects the agent SDK language, the codegen-sharing surface with the TypeScript app layer, and early team velocity. The source pack recommends Java/Spring Boot for the kernel on enterprise-hiring grounds; the team’s existing depth and the current codebase are TypeScript/Vinxi/Node.
The hypothesis
Default: TypeScript-first (Node/Vinxi + Postgres/PostGIS), pending the build-off result. The default is TypeScript because: codegen-sharing with the TS app layer is natural; the tsc/vitest feedback loop is tight for AI agent development; the team’s existing depth is in TypeScript; and Better Auth (TS) is already chosen. A JVM performance win in a microbenchmark does not justify the three-language split (Java kernel + TS apps/auth + Python agents) that Java-first would impose on a 2–3 person team.
The build-off: implement the same Action → Event → synchronous projection slice in TypeScript and Java in parallel, implemented by AI agents. Score on agent velocity + correctness (dominant), Value Type codegen sharing, optimistic-concurrency ergonomics, and raw throughput (tie-breaker only).
Falsification: if Java demonstrably wins on agent velocity and codegen sharing, the default flips. If the result is a wash, TypeScript wins.
Java and Python remain generated SDK targets for external consumers regardless of the kernel language.
See also
- Agent Runtime — the agent writes code in the kernel’s SDK language
- ADR-0006 — full hypothesis and scoring criteria
Open questions
- The language itself. The entire content of this page is open until the build-off runs and ADR-0006 is updated to Accepted with the build-off result.
- Codegen-sharing ergonomics between the kernel and the TS/app layer vary significantly between the two candidates — the build-off must measure this.