Your documents are programs.
Your prose is the programming language.
SpecScript is an open specification for programmable documents. It treats every markdown content block as a typed, addressable node in a universal AST — and adds a natural language scripting layer that AI can interpret and run.
The document isn't content waiting for a program to act on it. The document is the program.
Any structured data becomes readable prose. Any prose round-trips back to structured data. A schema contract ensures determinism where you need it. AI handles the rest. Universal content translation — write once, emit anything.
Key-value pairs render as prose, not frontmatter. The document is the data. A human reads a sentence; the system reads a structured field. The content model and the content are the same thing.
Embedded directive blocks run at transformation time. Written in plain language. Interpreted by AI. They can conditionally include content, generate sections from data, call external tools, or reshape the document for a target audience. The scripting language is the one you already speak.
---
schema: product-announcement/v1
output: [html, pdf, slack-post]
---
# Introducing {{product.name}}
{{product.description}}
```spec
Generate a comparison table against our three nearest
competitors using the features listed in the schema.
Cite only public pricing pages.
```
## Pricing
[price: $29/mo] [trial: 14 days]
```spec
If the output target is slack-post, condense everything
above into three sentences and drop the pricing table.
Keep the tone casual.
```
Most tools put the intelligence in the application. SpecScript puts it in the document. A conforming runtime reads the directives, interprets them via an AI pass, and emits the result. The app doesn't matter. The format does.
A SpecScript document is simultaneously content, data, and transformation logic. Any runtime that implements the spec can execute it. The reference implementation is Prose.
SpecScript is an open specification. The format belongs to no one. Runtimes can be built in any language, for any platform, against any AI provider. If your tool reads markdown, it can read SpecScript.
We're drafting the RFC now.
Read the spec.
Build a runtime.
Write a living document.