WITH INTENT: The Clause That Writes the Source
RECALL compiles WITH INTENT to a placeholder. The clause that compiled to nothing produces source that compiles to something real — structured, field-typed, verified by the same compiler that validates everything else.
The Clause That Compiles to Nothing
RECALL compiles WITH INTENT without expanding it. The output is a placeholder comment in the HTML. The compiler flags it as RCL-W09 — an unexpanded intent clause — and moves on. The page renders. The section is empty.
That is the correct behaviour. A language that refused to compile an unexpanded clause would be unusable for authoring. You write the intent first, expand it when you are ready. The compiler holds the position. The AI fills it later.
What makes WITH INTENT unusual is what happens when expansion runs. The clause is not a comment. It is not a directive. It is a typed statement in a language that has a strict element registry — and the expansion engine uses that registry, the DATA DIVISION field list, and the intent string together to produce valid RECALL source. Not prose. Not HTML. Source that the compiler can immediately verify.
The clause that compiled to nothing produces source that compiles to something real.
What the Syntax Actually Says
A WITH INTENT statement is a DISPLAY statement with an unresolved element. The element is the intent — the AI chooses which RECALL element to render and which fields to bind. The DATA clause scopes what data is available. Everything else the AI might need comes from the DATA DIVISION.
DATA DIVISION.
LOAD FROM "data.json".
PROCEDURE DIVISION.
RENDER-STATS.
DISPLAY STAT-GRID
WITH INTENT "Display the 4 performance stats in a 4-column grid, then a CTA button below."
WITH DATA STATS, CTA-TEXT, CTA-HREF.
STOP RUN.Three things are declared. The element type — STAT-GRID — narrows the search space. The intent string — natural language, written by the author — states the goal. The DATA clause names which fields from the DATA DIVISION are in scope. The expansion engine sees all three before it calls the AI compositor.
The LOAD FROM line is equally deliberate. In the compiler's original design, LOAD FROM reads a JSON or CSV file from disk and auto-generates the DATA DIVISION — field names, PIC types, and VALUES inferred from the payload. In the playground, there is no disk. The JSON panel in the editor takes its place. The Worker intercepts the LOAD FROM directive, injects the panel data in-memory, and the compiler receives a fully populated DATA DIVISION as if the file had been there all along.
What the Compositor Receives
The expansion engine does not send the intent string to the AI as a raw prompt. It builds a structured payload from the parsed AST — the full set of context a compositor needs to produce valid output.
{
"schemaVersion": "1.0",
"intent": "Display the 4 performance stats in a 4-column grid, then a CTA button below.",
"element": "STAT-GRID",
"availableFields": [
{ "name": "STATS", "pic": "GROUP", "section": "items" },
{ "name": "S1-VALUE", "pic": "X(95)", "section": "items" },
{ "name": "S1-LABEL", "pic": "X(50)", "section": "items" },
{ "name": "CTA-TEXT", "pic": "X(44)", "section": "items" },
{ "name": "CTA-HREF", "pic": "X(50)", "section": "items" }
],
"palette": { "bg": "#080808", "text": "#f0f0f0", "accent": "#00ff41" },
"componentRegistry": []
}The compositor receives field names, PIC types, group membership, the current palette, and the component registry. It knows what a GROUP field means — that STATS is the group name to pass to STAT-GRID, not a scalar value. It knows what fields it can reference and what their types are. The intent string is the goal; everything else is the constraint set.
The AI compositor is Llama 3.3 70B running on Cloudflare Workers AI, reachable from the same Worker that handles compilation. The response is a JSON object with a single source field containing valid RECALL DISPLAY statements. That source replaces the WITH INTENT block in the original program. The rewritten source compiles immediately.
Results are cached in Workers KV by SHA-256 hash of the payload. The same intent with the same fields and the same palette returns the cached expansion in milliseconds. The AI is called once per unique combination. Everything after that is a cache hit.
Why This Is Not Prompt Engineering
Prompt engineering is a practice layered on top of a system. WITH INTENT is a clause in a language — one that the compiler parses, type-checks against the element registry, and flags with a specific diagnostic code when unexpanded. That is a different thing.
The difference matters most at the boundary between what the author controls and what the AI produces. In prompt engineering, that boundary is invisible. The prompt flows into the model and the output flows back. Validation — if it happens — is downstream and manual. The author cannot know whether the AI's response is valid until they look at it.
In RECALL, the boundary is enforced by the compiler. The expansion engine produces RECALL source. The compiler validates that source against the same element registry it uses for every other program it compiles. If the AI produces a DISPLAY statement with an element that does not exist, the compiler rejects it. If a field name referenced in a DISPLAY statement is not declared in the DATA DIVISION, the compiler flags it. The AI's output is not trusted — it is verified.
The intent string is scoped. The field list is typed. The output is compiled. At no point does arbitrary text move unchecked into the rendered page.
LOAD FROM and the Data Side of Intent
The earliest version of WITH INTENT in the playground had a limitation: the AI compositor could only expand layout — which elements to display, in what order. The data was already in the DATA DIVISION, written by hand. The intent produced structure around fixed values.
LOAD FROM changes that. When the DATA DIVISION contains a single LOAD FROM directive and the JSON panel holds live data, the author controls both layout intent and data content from the same interface. Changing a value in the JSON panel and clicking Expand produces a different page — same structural intent, different content, valid RECALL source both times.
DATA DIVISION.
LOAD FROM "data.json".That is the complete DATA DIVISION for the playground's WITH INTENT preset. One line. The JSON panel provides the rest — scalar fields to WORKING-STORAGE, arrays to ITEMS groups with the nested 05/10 structure that STAT-GRID and CARD-LIST require. The author edits JSON; the Worker generates RECALL; the compiler renders HTML.
The architecture is the same one COBOL used for its record layouts — a declared field set that travels across the full pipeline, from data source to compiled output, with no translation loss at any boundary. The mechanism is 2026. The discipline is 1959.
Try It in the Playground
The playground is live. Load the WITH INTENT preset, review the JSON panel alongside the source, and click Expand. The source rewrites in place. The preview updates. Click Reset to restore the original intent clause and start again with different data.
recall.semanticintent.dev/playground.html
The full flow is visible in the editor: LOAD FROM at the top of the DATA DIVISION, the WITH INTENT clause in the PROCEDURE DIVISION, the JSON data panel below the editor. After expansion, the WITH INTENT block is replaced by concrete DISPLAY statements — STAT-GRID, BUTTON, or whatever the compositor determines fits the intent. The Expand button disappears. A Reset button takes its place.
Nothing about the flow requires an external framework, a build step, or a third-party plugin. The compiler is a Cloudflare Worker. The AI is a Cloudflare Worker. The playground is a single HTML file. The architecture is consistent with what RECALL produces — self-contained artifacts, no runtime dependencies.
The Statement That Writes the Source
The original RECALL premise was that a compiler could produce self-contained HTML from a source that reads like intent — field names, not DOM nodes; DISPLAY, not markup; PIC types, not style sheets. The author declares what they want. The compiler produces what the browser needs.
WITH INTENT extends that premise one level further. Some of what the author wants is not yet specific enough to be declared as a field binding. The goal is known — “display the performance stats in a grid with a call to action below” — but which elements, which columns, which layout is still open. WITH INTENT holds that open question at the language level, where it can be typed, scoped, and eventually resolved into valid source by an AI compositor working within the compiler's constraints.
The result is a language that has two kinds of DISPLAY statement: one that the author writes, and one that the author intends. Both compile. Both produce output. The difference is that the second kind passes through an AI that understands the field types, the element registry, and the palette before it decides what to write.
The statement declares intent. The compositor reads intent. The compiler verifies the result. What ships is the same artifact RECALL has always produced — structured, self-contained, auditable. The only thing that changed is who wrote one section of it.