Fix compile and lint errors
Reads the diagnostics, rewrites the smallest declaration that fixes them.
80% of compile fixes, first answer
Kern TS module v0.13 4B parameters built for 16 GB Macs
Kern edits TypeScript on your laptop. Each edit is applied to a
copy of your project and checked by the project's own
tsc, ESLint and test suite. A failed check sends
the diagnostics back for one more try. If that fails too, the
edit is rolled back and you see why.
requestsrc/lib/schema.ts
"Apply z.string().trim().min(1) to the value fields of goalReportSchema, funnelReportSchema and attributionReportSchema. Keep everything else."
instruction given in Polish, shortened here
baselinebuild pass · lint pass · 0 diagnostics
plan4 steps, one declaration each · whole file in view
step 1goalReportSchema99 tok · 19.2 s
build pass · lint passaccepted
step 2funnelReportSchema216 tok · 20.5 s
build pass · lint passaccepted
step 3attributionReportSchema129 tok · 19.5 s
build pass · lint passaccepted
step 4reportTypeSchema424 tok · 33.9 s
same as the working copyno change
finalbuild pass · lint pass · repo tests 41/41 · hidden tests 5/5
done3 declarations, +3 -3 lines, 4 requests, 125.7 s end to end
<act:answer><fmt:block>
<edit path="src/lib/schema.ts" symbol="goalReportSchema">
export const goalReportSchema = z.object({
type: z.literal('goal'),
parameters: z.object({
startDate: z.coerce.date(),
endDate: z.coerce.date(),
type: z.string(),
value: z.string().trim().min(1),
}),
});
</edit>
Step 1, verbatim. The model replaces one whole top-level declaration; the runtime applies it and runs the checks.
@@ goalReportSchema @@
type: z.string(),
- value: z.string(),
+ value: z.string().trim().min(1),
@@ funnelReportSchema @@
type: z.enum(['path', 'event']),
- value: z.string(),
+ value: z.string().trim().min(1),
@@ attributionReportSchema @@
type: z.enum(['path', 'event']),
- step: z.string(),
+ step: z.string().trim().min(1),
The patch written to the project after the final checks.
01 / Why
Teams with client contracts, regulated data or simply a lot of private code can't send it to a vendor's servers. The models that run on their laptops are private and free, but nothing checks what they write: code that doesn't compile comes back as confidently as code that does.
Kern sits in the empty corner. It runs on the laptop, and the project's own toolchain checks every edit before a developer sees it.
02 / The short version
more edits right on the first try than the same 4B model without Kern: 196 of 450 against 72, on code from 14 open-source TypeScript repositories, graded by hidden tests. A bare model twice its size gets 175.
The proof, task by task03 / Results
A task passes only when the edit applies, compiles under strict TypeScript, passes ESLint and passes tests the model never saw. Exams never enter training, and training data is screened for overlap with them. Results that surprised us in the wrong direction stay on this page.
Kern 4B 196 of 450 passed (43.6%) TS module v0.13, first answer
| Qwen3.5-4B the trunk, no Kern | |
|---|---|
| Qwen3.5-9B 2× the size | |
| Kern 4B + one repair turn: 45.8% | |
| Qwen3.8-27B 6× the size; + repair: 67.8% |
of compile fixes right on the first answer (36 of 45). The trunk alone: 47%.
refactors that move code to a new module. Qwen3.8-27B, six times larger: 6 of 70.
against 38.9% for a bare model twice its size, a gap still inside the noise (95% interval −0.7 to +10.1 points). A 27B model is ahead at 56.4%.
Moxxy, our desktop agent, and Umami, an open-source analytics app. The tasks were written blind with hidden tests. Each configuration ran end to end on an M4 MacBook Air: answer, checks, one repair turn. The decision rule was written down before the run.
| Configuration | Within 15 s / any time |
|---|---|
| Kern 4B module v0.6 | |
| Kern 9B module, slower | |
| Qwen3.5-4B + worked examples in the prompt | |
| Qwen3.5-9B + worked examples | |
| Qwen3.5-4B bare | |
| Qwen3.5-9B bare | |
| Liquid LFM2.5-2.6B | |
| Liquid LFM2.5-8B-A1B |
| Model | SWE-bench Multilingual JS and TS | SWE-PolyBench Verified TS |
|---|---|---|
| Kern 4B v0.13 | 4 / 43 | 6 / 97 |
| Qwen3.5-4B | 1 / 43 | 1 / 97 |
| Kern 9B v0.12 | 5 / 43 | 6 / 98 |
| Qwen3.5-9B | 2 / 43 | 4 / 98 |
| Qwen3.8-27B | 3 / 43 | 11 / 99 |
04 / How it works
We call this a validated expert language model, VELM for short: a specialized model paired with tools that can check its answers. For code those tools already exist in every project.
Trunk
Qwen3.5-4B, 4-bit, 2.8 GB
One general model, loaded once. Chosen by measurement, so a better open model is a drop-in upgrade.
Experts
LoRA adapters of 65 MB, one per stack, trained on data the validator admitted.
Validator
your tsc · ESLint · Prettier · repo tests
It admits training data, grades the exams and checks every edit at run time.
The files the request names, their imports and the current diagnostics. Nothing else goes into the prompt.
The model replaces whole declarations in a format the runtime can apply, asks one question when a fact is missing, or declines.
The edit goes onto a copy of the repository. Type check, lint and the project's tests run there, not in your working tree.
Pass: the change is written. Fail: one repair turn with the diagnostics. Fail again: rolled back, with the reason.
Bigger changes run as a chain of these steps, one declaration at a time, each one checked before the next. The run at the top of this page is a chain of four.
05 / Today
Reads the diagnostics, rewrites the smallest declaration that fixes them.
80% of compile fixes, first answer
Keeps the rest of the file, the tests and the config untouched.
44% of function edits, 37% of test fixes
A chain of checked steps across a file, with the whole file in view.
3 declarations, repo tests 41 of 41
QWhich function in src/lib/date.ts sends the usage report to the billing API?
ANone of the exported functions in this file send a report to a billing API. generateTimeSeries builds a formatted time series and a lookup from supplied data, but it returns the generated records without an API call. …
explain expert v0.1 · Umami · 4.7 s · names checked against the code
Asked to rewrite a date helper with a different library, it declined in 4.2 s. Asked about a billing module the project doesn't have, it asked which file.
clarify · refuse
Not yet
06 / What we hold to
A 16 GB laptop is the floor. No per-token bill, and nothing has to leave the machine.
We never call an edit correct. We say it passed tsc, ESLint and these tests, on this snapshot.
One declaration per step, each checked before the next. Small steps are cheap to verify and to undo.
A question or a refusal costs the developer seconds. A confident wrong edit costs much more.
Picked by measurement and replaceable. Experts retrain on a new trunk in hours, and the exams carry over.
Each experiment has a written decision rule before it runs. An undecided result is published as undecided.
07 / Roadmap
Dates are targets. Each milestone ships only if it passes its own pre-written rule.
Oct 2026 · done
Nov 2026 to Jan 2027 · now
Feb to Apr 2027
Later in 2027
Targets, labeled as targets. Each one has a measurement attached.
less active developer time in the pilots, against the IDE quick fix, with no more errors left at the end.
lower bound on precision before any edit is applied without review. Today: 67 to 77%.
an expert for each stack a team uses, on the laptop they already own, from one shared trunk.
08 / Try it
The TypeScript module v0.6 and its 4-bit trunk are public on Hugging Face, with a script that sends a task in the exact prompt format the model was trained on. About 4 GB of free memory is enough. Newer modules are in private pilots.
# llama.cpp from October 2026 or newer
brew install llama.cpp
hf download MoxxyLabsAI/kern-ts-lora --local-dir kern-ts-lora
cd kern-ts-lora
llama-server -m qwen35-4b-base-Q4_K_M.gguf \
--lora kern-ts-v0.6-repair-s0-lora-f16.gguf \
-c 16384 --jinja --port 18001
# in a second terminal
python3 kern_try.py example/ex-ts-0001-parse-range
09 / FAQ
No. One request gets one structured answer: an edit, a question, a refusal or an explanation. It doesn't call tools or plan a feature. The runtime around it applies the edit and runs the checks.
No. The model, the checks and the repository all stay on the laptop. After the download, the public release runs with no network access.
The edit was applied to a copy of your repository, the TypeScript compiler reported no new errors, ESLint passed, and the repository's tests passed. We always say which of those ran. A check can only catch what it covers.
Yes. On our pilot, 67% of edits accepted on build and lint also pass hidden tests, and 77% with the repository's tests in the loop. That is why every edit is reviewed today, and why we publish this number.
A Mac with Apple silicon and 16 GB of memory is our floor. The server with the 4B trunk uses about 4.3 GB. It also runs anywhere llama.cpp does.
Ollama and LM Studio run a model. Kern is a trained expert plus the runtime that checks its edits with your toolchain. On our exam the same 4B model gets 16% of edits right without Kern and 43.6% with it.
Qwen3.5-4B, quantized to 4 bits, with LoRA adapters on top. We picked it by measuring several trunks on the same exams, and we will switch when a better open model wins.
The TypeScript module v0.6 and its trunk are public on Hugging Face. The exams, the training data and newer modules are private for now, so the exams stay unseen.
Pilots with design partners start in November 2026. If your team works in TypeScript and can't send code to the cloud, write to us.
10 / Contact
We are looking for two or three software teams and one regulated organization for a four-week pilot under a written protocol. We also like comparing notes with people who train small models.
Built by MoxxyLabs
Co-founder, ML. Creator of Moxxy. Built the Kern proof of concept end to end.
github.com/WebEferenCo-founder, platform. Built the Moxxy desktop app, computer use and browser automation.
github.com/kamail12Kern ships first inside Moxxy, our open-source CLI and desktop agent.