I’ve been designing a simple structured language, Metaphor, to make it easy to build and maintain software using LLMs. I’ve built quite a few applications where the coding is entirely done by the LLM (usually ChatGPT 4o).
The format is very simple, and designed to allow people to focus on what they want in natural language form.
To support this I build a prompt compiler library that can process strings or files. It supports including other files to allow for modularizing the prompt elements and to also support different actions and personas being applied to the same application problem. It also supports embedding files that can be used as additional context (e.g. it could be some earlier version of code that you want to retain as a template).
The idea is to capture a full description of what the software is supposed to do, leaving the LLM with the ability to make any changes it needs to. This also means an LLM can build an entirely new version (although it will typically look very different).
I’ve built various different apps and libraries using this approach - usually in TypeScript or Python, but occasionally C++ too. One of the more fun ones in the last few days is an app called commit-critic that will do code reviews based on a series of Metaphor coding guidelines. That app was also coded and enhanced by an LLM based on a Metaphor description.
The code is under and Apache 2.0 license if you’re interested in taking a look: