News for hackers. Stuff that matters.

hkonte

One underlooked source of variance: unstructured system prompts causing output format failures, which trigger retries or correction loops.

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.

Re:The Token Tax You Didn't Know You Were Paying on Wednesday March 11, 2026 @11:07AM (#47336607)
The same problem exists on the prompt side, not just tool outputs.

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 "hard constraints, not prose descriptions" framing is exactly right. Giving Pass 2 explicit hex codes and section lists instead of open-ended style descriptions is the same principle as separating a prompt into typed semantic blocks. The model stops interpreting intent and starts executing on a fixed spec.

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

Re:Agents that run while I sleep on Wednesday March 11, 2026 @10:46AM (#47336282)
Placeholder tests are a vague objective problem. "Write tests" leaves too much room. The model satisfies the surface request, not the intent.

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

Lazy outputs are almost always a structure problem. Constraints buried in prose get treated as soft suggestions. The model weighs them against everything else and decides how much to follow.

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

Re:300 Founders, 3M LOC, 0 engineers. Here's our workflow on Wednesday March 11, 2026 @06:20AM (#47333778)
The four-phase pipeline structure is the key insight here. Each phase works better when its agent gets a typed breakdown of what it's supposed to do (role, constraints, output format) rather than a narrative task description.

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.

Parallel sessions surface a problem with prompt consistency. When you're running 4 agents simultaneously, each one's behavior depends on how well-structured its instructions are. If agent A gets a vague task description and agent B gets a typed breakdown of role/constraints/output_format, their outputs are hard to merge coherently.

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.

The framing of "context engineering" does most of the work here. Feeding raw notes to a model is one thing. Structuring those notes into typed semantic blocks — here is the role the model should take, here are the constraints, here is the output format — encodes judgment that isn't in the source material. The model doesn't decide what's a constraint vs. a goal vs. an example. You do.

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.

Re:Claude Code Open Source? on Wednesday March 11, 2026 @06:17AM (#47333755)
The bundled JS is a good read regardless of the open-source question. The interesting part is how the system prompt and instruction layers are structured internally — Anthropic uses typed, labeled sections (role, context, constraints, output format) rather than narrative prose, which tracks with their published prompting guidance.

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.

Re:Why LLM agents break when you give them 100k tools on Wednesday March 11, 2026 @06:16AM (#47333744)
The lazy-load pattern is the right architecture. The missing piece is what you lazy-load still matters.

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.

The "spec quality is the bottleneck" problem is really a prompt structure problem. Most specs are freeform paragraphs, so role, constraints, acceptance criteria, and context are entangled. The LLM evaluator can't score them independently, and when a phase fails you can't localize which part caused it.

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.

Re:Markdown Files Won't Make You an Engineer on Wednesday March 11, 2026 @01:23AM (#47331973)
The core argument is right. Domain expertise is irreplaceable.

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 gap you're closing is interesting. One upstream problem I see: the quality of .cursorrules and agent guidelines files varies enormously. A flat paragraph of rules is much harder to parse into deterministic validators than guidelines written in discrete named blocks. "Only modify files in src/" is easy to enforce. A 500-word paragraph that mixes role, context, and constraints is not.

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.

The signal-to-noise framing maps exactly to prompt structure. When a prompt mixes role, constraints, context, and examples in one paragraph, the model has to do parsing work before it can do reasoning work. That parsing tends to generate verbose internal narration. When the same information is separated into distinct semantic blocks, the model starts from a lower entropy state and writes less to get to the answer.

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.

Re:Levels of Agentic Engineering on Tuesday March 10, 2026 @11:56PM (#47331595)
The "why behind decisions" gap is real. Rules files flatten tradeoffs into mandates. One pattern that helps: treating instructions as typed blocks rather than prose. A `context` block carries the rationale (what was evaluated, what the tradeoffs were), a `constraints` block carries the conclusion. The agent follows rules, but the blocks make it easier to audit which constraints are still load-bearing vs. historical artifacts.

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.

The interface extraction idea is solid. "50 tokens -> 8 tokens" by keeping only structure is exactly the right tradeoff for architecture understanding tasks. Full implementations are noise for that use case.

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.

Re:Ask HN: What apps have you created for your own use? on Tuesday March 10, 2026 @10:13PM (#47331080)
A visual prompt builder. I kept writing prompts as raw text and getting inconsistent results. So I built flompt: you decompose a prompt into typed blocks (role, constraints, output format, etc.) on a canvas, then it compiles to Claude-optimized XML.

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

The output structure problem and the input structure problem are related. MDMA solves the output side: when the LLM knows the spec, it generates valid, parseable components. The input side has the same issue. Vague system prompts produce inconsistent outputs regardless of how good your output parser is.

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.

Context overflow is the hardest one to test because you can't reproduce it in unit tests. It shows up in production after the Nth turn.

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.

Re:JSE: A Structural Expression Protocol for AI Agents on Tuesday March 10, 2026 @08:33PM (#47330532)
The training data problem is real for fully custom grammars. One way around it: use XML with semantically named tags instead of a bespoke syntax. Models like Claude were explicitly trained to parse <role>, <constraints>, <objective> blocks. Anthropic even documents this in their prompting guides. No new training data needed, no bootstrapping overhead.

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.

The output-side gate makes sense, but the root problem is often on the input side. When the source document and the task instructions aren't clearly separated in the prompt, the model treats its own priors as fair game alongside the document.

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 "plan before you generate" framing is exactly right. Conceptual design forces you to separate concerns before writing code. Same discipline applied one level up: structuring the prompt before passing it to the model.

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.

Re:Don't trust AI agents on Tuesday March 10, 2026 @05:52PM (#47329231)
"Careful and specific" is the right framing and I think it is undersold how much structure helps. Freeform prose instructions are inherently ambiguous. You think you are being specific but you are leaving gaps the model fills with its own assumptions.

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.

Re:We Might All Be AI Engineers Now on Tuesday March 10, 2026 @05:36PM (#47329083)
The "formal letter" framing is right, and spec-driven development takes it further: you are not just writing clearly, you are decomposing the request into named sections that the model can reason about independently.

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.

Defining prompt regions and measuring attention per region is the right level of abstraction. The interesting question is whether named semantic blocks (role, constraints, output format, examples) actually get attended to differently, or whether position in the token stream is what dominates.

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.

The style guide approach works because it gives the output format signal its own dedicated space rather than burying it inside the task instructions.

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.

The pedantic syntax focus vs. algorithmic reasoning problem usually comes from a loose role description. When "act as a senior engineer" is embedded in a prose system prompt, the model interpolates across all senior engineer behaviors.

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.

Schema validation + retries is a solid defensive layer. Worth also looking at the prompt side.

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.

The AI RBAC approach is the interesting part. By giving each model a different role with explicit constraints (Scout for research, Architect for specs, Coder for implementation), you're preventing the kind of context bleed that happens when one model tries to do everything. The strict "no implementation code" constraint on Claude is a good example of using prompt constraints as a boundary, not just a suggestion.

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 dual-LLM split is the interesting part. By separating the engine model (game state) from the architect model (perception/strategy), you're giving each a scoped context instead of one giant prompt that tries to do both. That's where single-LLM approaches tend to collapse: the role bleeds across the context and you lose the behavioral boundary.

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.

Older »