← All writing

The Schema Is the Editorial Policy

When AI is generating the content side of a RECALL brief, PIC X field declarations stop being a formatting detail and become a quality contract. Four rendering problems, one root cause — and why every fix pointed back to the schema, never the renderer.

Michael Shatny··7 min read

The Problem That Isn't Where You Think It Is

You are running an AI-driven publishing workflow. The AI writes the brief — a structured JSON object with declared fields for every piece of content. RECALL compiles it to a self-contained HTML page. Something renders wrong.

Where do you look first?

Most reach for the renderer. The HTML template. The CSS. The plugin element that draws the box or the table or the stat strip. That is usually the wrong direction. The renderer is almost always fine. It is doing exactly what the schema told it to do. What went wrong is earlier — in the data, in the declared field sizes, in the mismatch between what the AI wrote and what the field was designed to hold.

The renderer does not lie. It surfaces what the schema contains. And the schema is the editorial policy — whether you thought of it that way when you wrote it or not.

Four Problems, One Root Cause

During a production run of a recent 6D cascade analysis case study — compiled from an AI-generated brief through RECALL — four rendering problems appeared:

1

FETCH breakdown box rendered formula strings

The DRIFT display value showed "|CHIRP − DRIFT| = |85 − 35| = 50" — the full computation, not the clean output number. The CONFIDENCE field showed a narrative sentence instead of "0.85".

2

stat-box-context truncated mid-sentence

A 360-character context paragraph was cut off at roughly 300 characters. The sentence ended mid-clause. The page rendered cleanly — except the content was incomplete.

3

Section 2 showed literal \n\n and a trailing backslash

The AI had written three logical paragraphs into a single field, separated by \n\n. RECALL stores PIC X values as-is. The escape sequences were passed through to the renderer unchanged.

4

Footer legal links rendered as mangled HTML

The brief contained raw anchor tags. The footer renderer expected "Label https://url" pairs. The two formats are not compatible — the HTML was parsed as link-pair data and the output was broken.

In every case, the fix was not in the renderer. It was in the schema declaration — field sizes that hadn't kept pace with content, or content that was written in the wrong register for its declared field type.

What the Field Is Actually Saying

A PIC X(6) field is a declaration. It says: this field holds a short display value — a number, a score, a label. Six characters is enough for "0.85" or "50". It is not enough for the computation that produced the number.

When the AI wrote the confidence field as a narrative — explaining how the figure was derived, citing the source methodology, contextualising the range — it was doing something reasonable in isolation. The analysis is richer with that context. But the field was not declared for context. It was declared for a display value. The compiler truncated at six characters and rendered exactly what the schema said. Correctly.

Original declarations — too narrow for formula content
01 FETCH-DATA-DRIFT       PIC X(6).
01 FETCH-DATA-CONFIDENCE  PIC X(6).
01 FETCH-DATA-CHIRP       PIC X(10).
01 FETCH-DATA-VERDICT     PIC X(30).
Fixed declarations — sized for their actual purpose
01 FETCH-DATA-DRIFT       PIC X(20).   * display formula e.g. "|85 − 35| = 50"
01 FETCH-DATA-CONFIDENCE  PIC X(6).    * display value only — "0.85"
01 FETCH-DATA-CHIRP       PIC X(60).   * room for calibration context
01 FETCH-DATA-VERDICT     PIC X(50).   * verdict label + qualifier

The truncation is not the bug. The truncation is the schema telling you the content was in the wrong register. A PIC X(6) confidence field paired with a narrative AI response is a mismatch between what the field was designed to hold and what was put into it. Expanding the field is one fix. Changing the content is another. The schema tells you the question to ask.

Structure Cannot Be Embedded

The paragraph-break problem reveals a different constraint, but the same principle.

RECALL does not interpret \n\n inside a PIC X value as a paragraph break. It stores the value as-is and passes it to the renderer as a string. The renderer renders a string. There is no layer that interprets escape sequences as structural intent — because structure in RECALL is declared, not embedded.

AI content with embedded paragraph breaks — passes through literally
"SECTION-2-BODY": "Three commercial engines run simultaneously...the package.[1]


Corporate sponsorship activations build the second engine...[8]

Host city
hospitality and tourism form the third engine...next rights cycle."
Structure declared as separate fields — renders correctly
"SECTION-2-BODY":   "Three commercial engines run simultaneously...the package.[1]",
"SECTION-2-BODY-2": "Corporate sponsorship activations build the second engine...[8]",
"SECTION-2-BODY-3": "Host city hospitality and tourism form the third engine..."

Three fields, three paragraphs. The schema declares that this section has three distinct text blocks. The renderer displays three paragraphs. No interpretation, no escape sequences, no ambiguity.

The same applies to the footer. RECALL's footer renderer processes legal links through parseLinkPairs(), which expects a semantic format: label and URL as a pair. The AI had written raw HTML anchor tags — a reasonable assumption for a field that will appear in a footer. But the field is not an HTML passthrough. It is a semantic contract. The renderer handles the markup. The brief supplies the intent.

Raw HTML in brief — parseLinkPairs cannot process it
"FOOTER-LEGAL": "<a href="https://stratiqx.com/disclaimer">Disclaimer</a> · ..."
Semantic pairs — renderer handles the anchor markup
"FOOTER-LEGAL": "Disclaimer https://stratiqx.com/disclaimer, Terms https://stratiqx.com/terms, Privacy https://stratiqx.com/privacy"
!

The brief supplies intent. The renderer supplies markup.

This is the boundary RECALL establishes — not to limit what the AI can do, but to give it exactly what it needs to do its best work. The AI focuses on content: the analysis, the narrative, the judgment. The schema handles the rest: field sizes, rendering format, structural decisions. Clear contract, clean output.

Where the AI Fits — and Where It Stops

In the StratIQX publishing workflow, Claude generates the case brief: the analysis, the cascade narrative, the dimension evidence, the supporting statistics, the cross-references to related cases. That generation step is where AI adds value — synthesising research, structuring argument, calibrating the six-dimensional score.

What the AI does not do is decide how any of that content renders. It does not choose whether a paragraph break becomes a <p> or a <br>. It does not decide whether footer links are rendered as anchors or plain text. It does not control whether a field value is escaped, truncated, or passed through raw. All of those decisions are made at compile time, by the schema and the renderer.

That separation is the design. The AI is not responsible for producing valid HTML — it is responsible for filling a declared contract. The contract is what makes the AI's output trustworthy. RECALL compiles the contract. The output is deterministic regardless of what the AI wrote, because the schema defines the boundaries of what it needs to write.

When something goes wrong, the diagnosis is always the same question: is the content right for the field? That question has a concrete, schema-derived answer. An HTML template with arbitrary string interpolation does not ask that question. It renders whatever was provided. A RECALL schema with PIC X declarations makes the question unavoidable — and answerable.

The Right Kind of Rigidity

RECALL's field declaration discipline comes from COBOL. In COBOL, it was a memory layout constraint — the runtime allocated exactly the bytes declared, and the programmer had to work within that. The constraint was physical.

In RECALL, the constraint is semantic. A PIC X(500) narrative field is a statement that this content is prose, up to 500 characters — not a formula, not a block of markup, not an embedded structure. A PIC X(6) score field is a statement that this content is a display value — not a narrative, not a methodology note, not a citation.

When AI is generating the brief, those declarations are the only boundary between “the model wrote something” and “the output is correct.” The schema does not prevent the AI from writing a formula into a display value field. It surfaces the mismatch immediately — as truncation, as a literal escape sequence, as a rendering artefact that is exactly as wrong as the schema says it should be.

That is not a bug in the compiler. It is the compiler working as designed. Every truncation is diagnostic information. Every rendering artefact points back to a specific schema declaration and a specific content decision that didn't match it.

An HTML template renders whatever it receives. RECALL surfaces what was intended versus what was actually provided. In an AI-assisted workflow, that distinction is the difference between output you can trust and output you have to inspect on every run.

The schema is not the output. It is the policy that makes the output trustworthy.

Related

Michael Shatny is a software developer and methodology engineer and founding contributor to .netTiers (2005–2010), one of the earliest schema-driven code generation frameworks for .NET. His work spans 28 years of the same architectural pattern: structured input, generated output, auditable artifacts. RECALL is the latest expression of that instinct — applied to the question of what a publishing language looks like when the content author is an AI and the quality bar is set in the schema declaration.

ORCID: 0009-0006-2011-3258