Inspiration
IntentCode is the first AI compiler, at least that I know of. The major AI coding tools are agentic in a very broad sense, so much so that they could be a general purpose AI assistant instead. IntentCode is different because it focuses on being an AI-powered compiler.
Besides being the name of the project, IntentCode is also a standard way of writing markdown as pseudo-code.
The problem with existing AI tools is that they operate on raw source code, with high-level specs sometimes added in. Without a layer of focused design they tend to easily generate AI slop and steep technical debt. With every iteration and as the codebase increases in size these problems tend to get worse.
What it does
The AI compiler operates at two levels of design:
- High-level specs, which compile to IntentCode.
- IntentCode, which compiles 1-to-1 to source files.
The IntentCode compiler includes an analyzer which scans for ambiguities and errors and offers a list of suggested changes to the user. These changes are typically useful in improving the IntentCode, which leads to a better developer experience.
Any errors or modifications corrected in the source aren't overwritten. Select source files can always be removed and regenerated.
How we built it
The tech-stack of the engine is:
- Framework: Next.js/TypeScript
- Database: SQLite
- ORM: Prisma
- AI library: Serene AI
- Core utils library: Serene Core
Challenges we ran into
The compiler needs a very high quality AI model. Gemini 3 Pro works well because of its high intelligence, and is the default model.
IntentCode (pseudo-code) can run into problems because of assumptions. This was resolved by implementing the Analyzer, which runs before the actual compiler does. The Analyzer looks for assumptions and errors in the IntentCode files and suggests recommended improvements and fixes. These are easily applied and add useful improvements even if the compiler could succeed without them.
Updating package files for 3rd party imports. Specific code to update package.json is in place, and will be improved and expanded to other build systems in the future.
Accomplishments that we're proud of
I wrote two examples:
- Calc, a basic CLI calculator described by two IntentCode files.
- Calc v2, which has specs only.
In both cases the examples were successfully compiled. In Calc v2 the specs are converted to IntentCode, which are converted to source. These produce working apps, although in some cases basic edits to the source may be required. These edits to the source are persisted and not overwritten by future updates to specs/IntentCode.
What we learned
AI compilers can and do work. The major concerns regarding assumptions and hallucinations can be overcome. The concept has been proven with basic examples, and can now be scaled to more complex projects.
What's next for IntentCode
I want to add another example that generates a web app. Following that even more complex projects will be attempted.
Built With
- gemini-3
- nextjs
- prisma
- serene-ai
- serene-core
- sqlite
- typescript
Log in or sign up for Devpost to join the conversation.