Metaphor

An AI prompt creation language

Metaphor was an AI prompt creation language designed to help users generate high-quality prompts for a wide range of AI models. It pioneers the approach that has since become known as "spec driven development".

It had a simple declarative syntax that allows users to define roles, context, and actions in a structured way. As with programming languages, Metaphor files could be included in other files, allowing for modular and reusable prompt definitions.

Metaphor emphasized the importance of context. By providing precise context it allowed users to generate prompts that focused an AI's attention on the specific relevant information, rather than drawing on its entire training corpus. This dramatically reduced the chances of hallucinations and makes it much easier to get consistent results.

Active development of Metaphor ceased in March 2026. The move to tool use meant AIs could discover context in a more dynamic way, without needing pre-planning. At the same time, state of the art LLMs no longer benefited from being assigned a formal role.

Metaphor and Humbug

Metaphor was used extensively in the early development of Humbug. Humbug is an experimental human/AI operating system.

Blog posts

I wrote a few blog posts about Metaphor, which you can read here:

Source code

A tutorial for using Metaphor can be found on GitHub: https://github.com/m6r-ai/getting-started-with-metaphor

The source code for the stand-alone Metaphor prompt compiler can be found on GitHub: https://github.com/m6r-ai/m6rc