Developer David Temkin has introduced Declare, a new UI language designed explicitly for the era of AI-assisted coding. Unlike traditional frameworks where AI agents often hallucinate dependencies or break state logic, Declare treats layout, motion, and state as native language constructs rather than libraries. The core pitch is that the compiler acts as a truth-teller for both human developers and AI agents, ensuring that the generated code actually runs and behaves as intended.
The AI Verification Loop
The standout feature of Declare is its suite of tools designed to help AI agents self-correct. Temkin notes that while AI can write code, it struggles to identify its own errors. Declare addresses this with four specific mechanisms: an installable skill that provides context, diagnostics that name broken rules and valid rewrites, an Inspector that explains live value dependencies, and a formal six-rung verification ladder. This ladder checks everything from parsing to pixel rendering, allowing an agent to climb the verification process one step at a time.
Performance and Code Density
In a preliminary test, an AI agent was given the same brief to build a ticket-buying application using both Declare and React. The Declare implementation resulted in 1,279 lines of code compared to React’s 2,666. More importantly, the Declare app passed all eleven hidden checks on its first build, whereas the React version passed only six. Temkin emphasizes that these are single runs and not yet a comprehensive benchmark, but the repository includes every run for transparency. The language also boasts zero hand-typed lines for certain demo apps, relying entirely on AI generation guided by the compiler.
Practical Implications for Builders
For infrastructure teams and frontend engineers, Declare represents a shift from managing complex dependency graphs to writing declarative relationships. The language supports continuous zooming between views (day, week, month, year) and real-time data manipulation without virtualization code. It handles complex UI tasks like window management, drag-and-drop, and live thumbnails as single programs rather than assembled libraries. The project is currently live with several demo applications, including a calendar, a market map, and a to-do list, all rendered without image assets.
Key Takeaways
- Declare integrates verification directly into the language syntax to help AI agents catch errors.
- Initial tests show Declare apps can be roughly half the size of equivalent React apps.
- The language eliminates the need for virtualization code in complex list views.
- Verification happens through a formal six-rung ladder from parse to pixels.
The Bottom Line
If the verification loop works as advertised, Declare could solve the biggest bottleneck in AI coding: the gap between plausible-looking code and working software. It is a bold bet that strict language constraints can make AI agents more reliable than current framework-heavy approaches.