prompt.md

About prompt.md

A framework in which the program is a description, and the program is written again every time someone asks for it.

The short version

prompt.md is a web framework. You write your application as a Markdown file describing what each route should do, in plain English. When a request arrives, the framework reads that file, reads the request, and produces a response. Nothing is precompiled. Nothing is cached as a build artifact. The response is composed at the moment it is needed, the way a conversation is.

# GET /hello

Greet the visitor by name if they gave one.
Otherwise, be warm and a little curious about who they are.

That is a complete route. There is no build step, no bundler, no dist/ directory, and no artifact that quietly goes stale while you are not looking.

Why compilation is a relic

For most of computing history, we have agreed to a bargain: spend effort up front to translate human intent into a form a machine can execute cheaply, then run that form again and again. Compilers, bundlers, transpilers, ORMs with generated migrations, and static site generators are all instances of this bargain.

The bargain made sense when the translation was expensive and the machine was the scarce resource. Neither condition holds anymore. Intent is the scarce resource. The machine is, for practical purposes, unlimited, and it will happily read your intent fresh every time.

A compiled program is a snapshot of an understanding that was true at build time. A prompt.md route is an understanding that is true now. Every request is therefore a small act of creation rather than a faithful replay of something created earlier. We think this is the honest way to serve a page, and we think the industry will get there eventually.

A build artifact is a memory of what you once meant. prompt.md asks you to mean it again.

What this buys you

No build step
Edit the Markdown and reload. The change is live on the next request, because the next request is when the change takes effect.
No drift
Your code cannot disagree with your intentions for longer than one request.
Fresh output by default
Every response is original. Duplicate content is a category error.
Emergent behavior
Routes sometimes do things the spec did not mention. We consider this a feature of an open-ended medium.

Frequently asked questions

Is this a good idea?

That is a question about the future, and the future has not been written yet. Some of our users are delighted. Others have asked us to be more specific about what "good" means in this context, and we are looking into it. In the meantime, the framework is free to use, and you are free to decide.

What about caching?

Caching is a form of memory, and memory is a form of compilation, and we have already discussed compilation. If you need a response to be identical on repeat visits, you may wish to reconsider whether you need a response at all. Several teams have found that a sufficiently specific spec produces output that is, for all practical purposes, the same. We do not recommend relying on this.

Is it deterministic?

Your spec is deterministic in the sense that it is written down. The response is determined by the spec, the request, and the moment at which the request was made. We find this more truthful than determinism in the traditional sense, which requires pretending that the world does not change between builds.