Why are prompts a single self-contained HTML file?
Because a single self-contained HTML file is stack-agnostic. It carries no build step, no dependency tree, and no assumptions about your project — so it drops cleanly into any AI environment and can be rebuilt anywhere.
The alternative — emitting framework code directly, a React component or a Vue SFC — makes a choice that should be yours. The moment a prompt emits React, it's wrong for everyone who isn't on React.
One file is also the cleanest handoff to another AI: it fits comfortably in context, complete and unambiguous. Give a model a folder tree instead and it starts guessing.
The file isn't the final format — it's the portable intermediate you translate from, into whatever you actually ship.