All posts
Engineering
6 min read
How we taught CodeCraft to read your tsconfig
Strict mode, path aliases and naming conventions — a look inside the project scan that makes generated code feel native to your repo.
Written by
Lena Hartmann

Most AI code tools write code for an imaginary project. It compiles in isolation, then breaks the moment it meets your aliases, your lint rules or your strict null checks. We wanted CodeCraft to write code for the project you actually have.
Scanning before generating
Before the first token is generated, CodeCraft runs a lightweight scan of your repository. It reads package.json to detect frameworks and versions, tsconfig.json for compiler flags and path aliases, and your lint and formatter configs for style. The result is a compact project profile that travels with every prompt.
What the profile contains
The profile is deliberately small: framework and version, language strictness, import style, test runner and a handful of naming conventions inferred from existing files. Keeping it small means it fits alongside your prompt without crowding out the code that matters.
The result
In our internal benchmark, generated files that pass lint on the first run went from 58% to 94% once the project profile was enabled. That is the difference between a draft you rewrite and a change you commit.
KEEP READING


