hkonte
When the model gets prose instructions, it guesses what's a constraint vs. an example vs. an objective. That guess is inconsistent across calls. Each wrong output is another LLM call.
Typed blocks reduce this. Role in one section, constraints in another, output_format explicitly tagged. The model gets unambiguous signal and output variance drops. Fewer retries, more predictable token spend.
I built github.com/Nyrok/flompt around this: decomposes prompts into 12 semantic blocks, compiles to Claude-optimized XML. Doesn't solve full cost forecasting but cuts the "bad output -> retry" part of the variance.
Prose prompts pad tokens with hedging, transitions, and repeated emphasis. The model has to figure out which parts are constraints vs. context vs. objectives. That parsing overhead is its own tax.
Typed blocks strip that ambiguity. I built github.com/Nyrok/flompt for this: decomposes prompts into 12 semantic blocks (role, objective, constraints, output_format, etc.) and compiles to Claude-optimized XML. Each block tells the model exactly what kind of content it's reading, no guessing.
The quality jump from pageStructure over a hardcoded template shows the same thing in reverse: structure that matches the actual input beats generic assumptions.
I've been building flompt around this idea, a tool that decomposes prompts into 12 typed blocks and compiles to Claude-optimized XML: https://github.com/Nyrok/flompt
Explicit typed instructions close that gap: objective = "write tests that verify behavior X", constraints = "no placeholder returns, every assertion must check a real value", output_format = "one describe block per function". With those in separate blocks the model has nowhere to hide.
I built flompt for structuring prompts like this: https://github.com/Nyrok/flompt
Separating role, objective, constraints, and output format into typed blocks changes that. Each block is parsed independently. The half-finished code and "delve" patterns go away when constraints are mandatory structure, not embedded text.
I built flompt for exactly this: https://github.com/Nyrok/flompt
The problem with vague prompts across 3-6 parallel agents is phase bleed — an agent told to "implement feature X" starts making architectural decisions that belong in phase 1, or produces output in a format that phase 3 can't consume. Typed prompt structure enforces phase boundaries.
I built github.com/Nyrok/flompt around this — open-source visual builder that decomposes prompts into 12 semantic blocks and compiles to Claude-optimized XML. Useful for building reusable prompt templates for each phase of exactly the kind of pipeline you're describing.
The worktree approach solves the filesystem isolation but the instruction layer still matters. A structured prompt template built once and replicated across sessions produces more predictable parallel outputs than prose rephrased each time.
Built github.com/Nyrok/flompt for exactly this — visual builder that decomposes prompts into 12 semantic blocks and compiles to Claude-optimized XML. The reproducibility part is what makes it useful for parallel workflows.
That curation is closer to authorship than most people acknowledge. The structure IS the intellectual contribution, independent of whether the prose gets generated or hand-written.
I've been building github.com/Nyrok/flompt around this, an open-source visual prompt builder that decomposes prompts into 12 semantic blocks and compiles to Claude-optimized XML. The point isn't automation, it's making the structure explicit so it can be reasoned about and iterated.
The open-source question aside, those patterns are portable. You don't need access to the source to apply the same structure in your own agents. I built github.com/Nyrok/flompt as an open-source visual builder for exactly this — decomposes prompts into 12 semantic blocks and compiles to Claude-optimized XML. The design comes from reverse-engineering what makes Claude respond consistently vs. randomly.
If the skill file is unstructured prose, the agent has to read the full thing before knowing what kind of instructions it contains. Typed semantic blocks (role, constraints, output_format, etc.) would let the agent assess instruction shape from a compact header before committing context to the full schema. Same difference as stuffing everything in one monolith versus named imports — named structure enables lazy loading to actually work.
Built github.com/Nyrok/flompt around this — visual builder that decomposes prompts into 12 semantic blocks and compiles to Claude-optimized XML. Same taxonomy could serve as a skill header for lazy-load pre-screening.
Typed semantic blocks fix this. If you decompose the spec into discrete named fields (objective, constraints, examples, acceptance criteria), the evaluator can score each block independently and failures point to a specific input component. Swapping one block and re-running becomes a controlled experiment.
I built flompt (github.com/Nyrok/flompt) around this principle for prompt construction: 12 typed blocks that compile to Claude-optimized XML. The structural logic applies to spec pipelines too. Named blocks produce testable, diffable specs instead of freeform text blobs that resist automated scoring.
But there is a separate, orthogonal point: prompt structure affects output quality independently of domain knowledge. A typed-block prompt (role, objective, constraints, output format as distinct units) gets different results from the same model than prose asking for the same thing. Not because of expertise, but because the model parses labeled structure differently than it parses narrative.
I built github.com/Nyrok/flompt around this, a visual canvas that decomposes prompts into 12 semantic blocks and compiles to Claude-optimized XML. Structure at the input layer is a real variable, separate from whether you understand the domain you're working in.
The more structured the input, the better your rule extraction pipeline can work. I built github.com/Nyrok/flompt for the input side of this, decomposing prompts into 12 typed semantic blocks that compile to Claude-optimized XML. The constraints and examples blocks in particular would map well to your validator format.
I built github.com/Nyrok/flompt for this specifically. It decomposes prompts into 12 blocks (role, constraints, chain-of-thought, output format, etc.) and compiles to Claude-optimized XML. The token overhead of the XML tags is real but the output token reduction tends to be larger. Your benchmark gives the numbers to explain why.
I've been building github.com/Nyrok/flompt around this idea, a visual prompt builder that decomposes prompts into 12 semantic blocks and compiles to Claude-optimized XML. The block separation turns out to be useful exactly for this case: context is not constraints, and they shouldn't live in the same flat text blob.
On your question about XML vs Markdown: XML wins for LLM input because it forces labeled boundaries. The model doesn't have to guess where one concept ends and another begins. Claude in particular is trained on XML-tagged context and handles it noticeably better than prose or Markdown for structured inputs.
Same insight on the prompt side , I've been building flompt (github.com/Nyrok/flompt) which decomposes prompts into 12 typed blocks and compiles to Claude-optimized XML. Structure at the input layer propagates to better structured outputs.
The structured format makes prompts reproducible. You can swap blocks, version them, and the model behavior is much more predictable than with plain text.
Open source: github.com/Nyrok/flompt
I've been building flompt (github.com/Nyrok/flompt) to handle the input half, a visual builder that decomposes prompts into typed semantic blocks (role, constraints, output_format) and compiles to Claude-optimized XML. Pairing structured input with a structured output spec like MDMA is the right direction. Both ends of the loop get explicit schema instead of hoping the model infers correctly.
One mitigation that actually helps: keep your system prompt compact and explicitly structured. Plain prose instructions balloon over iterations as you add edge cases inline. When you decompose the system prompt into typed semantic blocks (role, objective, constraints, output_format), each addition goes to the right section and you can see the size growing. It also makes it easier to identify which sections are eating the most tokens.
I've been building flompt (github.com/Nyrok/flompt) for this, a visual prompt builder that decomposes prompts into 12 typed blocks and compiles to Claude-optimized XML. Keeping instructions structured is partly about quality, but the token budget discipline is a real side benefit.
The tradeoff is you give up any formal type system, but you get immediate model comprehension. I've been building flompt (github.com/Nyrok/flompt) on this bet, decompose prompts into 12 typed semantic blocks, compile to Claude-optimized XML. Structure is enforced at authoring time, not at parse time.
Separating them structurally helps a lot. Put the document in a distinct named block first, then the constraints in a separate block that explicitly says "only assert facts present in the document above." The model has less ambiguity about what counts as source vs. inference.
I built [flompt](https://github.com/Nyrok/flompt) partly for this. It has a dedicated "document" block type that always comes first in the compiled XML, before role or objective. Forces a clean separation between grounding material and task instructions. Open-source.
The failure mode I see is people writing one long prose prompt and iterating on it as a unit. When output is wrong you can not tell which part failed. Was it the role definition, the constraints, the output format? No way to know.
Decomposing the prompt into typed named regions first (role, objective, constraints, context, output format) mirrors the modularity concept from Essence of Software. Each region has a single purpose and can be adjusted independently.
I built github.com/Nyrok/flompt for this, a visual prompt builder that decomposes prompts into 12 semantic blocks and compiles to Claude-optimized XML. Same "design before you build" principle at the prompt layer.
What I found is that decomposing instructions into explicit typed regions (role, context, constraints, output format, examples as separate pieces) closes those gaps before the model can fill them badly. The size inflation you see partly comes from the model trying to make sense of underspecified input.
I built github.com/Nyrok/flompt around that: 12 semantic blocks, compiled to XML. Less code bloat from the model when intent is fully specified upfront.
Role, context, objective, constraints, output format. These map almost directly to how a well-written spec is structured. The difference between a vague prompt and a good one is usually that the good one has all those pieces present, even if implicitly. Making them explicit and separate removes the ambiguity.
Built github.com/Nyrok/flompt around this: a visual canvas to decompose prompts into those blocks and compile to XML. The spec-driven angle validates why structure beats raw text.
If blocks do carry distinct attention signatures, that would be strong evidence for structuring prompts that way rather than writing them as flat text. I built flompt (github.com/Nyrok/flompt) around the block decomposition idea, and empirical attention maps like yours are exactly the kind of signal that would validate or kill the thesis.
A cleaner version: put your LaTeX rendering expectations in a dedicated output_format block, separate from the task description. Claude parses tagged XML blocks independently, so the formatting directive doesn't get diluted by surrounding context.
That's the pattern behind flompt (github.com/Nyrok/flompt), a prompt builder with a dedicated output_format block type. Worth trying if you're iterating on rendering behavior across different prompts.
Splitting it into separate blocks helps: a role block for the persona, a constraints block that explicitly rules out compiler-style syntax checks, a chain_of_thought block that prioritizes algorithmic reasoning. Each dimension is tunable without the others bleeding in.
I built flompt (github.com/Nyrok/flompt) for exactly this kind of tuning. It breaks prompts into 12 named semantic blocks so you can adjust one aspect cleanly. Might speed up the iteration cycle on your interviewer prompt.
When output format is specified as a sentence inside a larger system prompt, the model treats it as one constraint among many. When it is an isolated, tagged block, compliance goes up. Most shape drift in production traces back to ambiguous or buried format instructions, not model inconsistency per se.
I built flompt (github.com/Nyrok/flompt) partly for this reason. It decomposes prompts into named semantic blocks including a dedicated output_format block. Cleaner prompt structure reduces the surface that needs validation in the first place.
That constraint design is basically the same problem flompt solves on the prompt side. When you put role, objective, and constraints in a flat string, the model treats them as suggestions with varying weights. Named blocks with hard separations make them stick.
I built flompt (github.com/Nyrok/flompt) to do exactly that: decompose prompts into 12 typed semantic blocks (role, objective, constraints, output format, etc.) and compile to Claude-optimized XML. Open-source.
The same scoping problem shows up in prompt design more generally. When role, context, and output instructions all live in one flat string, the model treats them as a gradient, not distinct signals. Typed blocks with explicit labels keep them isolated.
I've been building flompt (github.com/Nyrok/flompt) for exactly this, a visual prompt builder that decomposes prompts into 12 semantic blocks and compiles to Claude-optimized XML. Different scale than your system but the same underlying idea. Open-source.