Rambling thoughts on LLM consistency and harness inflexibility
Large language models struggle to follow nuanced instructions over extended sequences of steps and prompts because their attention and recall degrade unevenly.
By Dillip Chowdary • Dec 06, 2026 • Source: HN AI Agents

At a glance
- Author
- our_are_why on Hacker News
- Core dimensions
- Semantic alignment and structural conformance
- Scope hierarchy
- Project, directory, file, and content-node
- Orthogonal scopes
- File-kind and node-kind
- Known gap
- New yet-to-exist code lacks AST anchor nodes
In this post
Developer and Hacker News user our_are_why published a detailed proposal arguing that large language models lose consistency over multi-step prompts due to what the author calls "swiss cheese memory degradation," outlined in our_are_why's Hacker News essay. Rather than relying on the model alone, the essay calls for harness-driven control that goes beyond current shallow and primitive tooling. The author divides that control into two distinct layers: semantic alignment during context assembly and deterministic structural verification before output is applied.
This breakdown covers how the proposed architecture uses abstract syntax trees, nested code scopes, and opinionated linters to keep generated code within user-defined bounds. It also examines the trade-offs between probabilistic semantic checks and deterministic mechanical rules, along with the blindspots the author identifies for newly created files. Software engineers building or configuring AI coding harnesses will find a concrete blueprint for bounding model variance.
01Swiss cheese memory and shallow harnesses
Large language models struggle to follow nuanced instructions over extended sequences of steps and prompts because their attention and recall degrade unevenly. While harness-driven solutions have become a mainstream idea for addressing this drift, our_are_why argues that existing implementations remain shallow and primitive. Keeping models reliable at scale requires harnesses that are granular, precise, semantic, targeted, and efficient.
To organize that control, the essay splits harness design into two dimensions: semantic alignment and structural or mechanical adherence. Treating them separately acknowledges that meaning and syntax behave differently when verified by software, requiring different points of intervention in the prompt-and-response loop.
02AST scopes for semantic rule injection
Semantic alignment is difficult to validate after generation because deterministic tests rarely capture whether code satisfies nuanced intent. Machine learning or AI evaluators can only somewhat verify semantics, and the lack of a 100 percent pass-or-fail signal creates problems on critical work or at scale. Consequently, our_are_why contends that the best way to keep an LLM on track is injecting semantic guidance during context assembly.
Under the hood, the proposed harness parses source files into an abstract syntax tree to deterministically locate target nodes and run checks, while still feeding the model the normal raw text file. When a user prompts the harness to modify a function, that target node sits inside four nested scopes: project, directory, file, and content-node. Orthogonal scopes such as file-kind and node-kind cut across those altitudes.
Using that hierarchy, the harness injects rules directly into the raw text at the matching altitude. Function naming rules sit right next to the target function, file rules appear near the top of the file, and project rules sit just above that, minimizing semantic drift efficiently and deterministically.
Advertisement
Tech Pulse Daily
Get tomorrow's pulse first
Join engineers who read Tech Pulse before stand-up. Free, weekday mornings.
03Pre-application linters for opinionated structure
Unlike semantic alignment, structural, mechanical, and syntactic conformance can be leaned on and trusted much more because structure is deterministically measurable. The harness runs model output through a custom parser or linter embodying the user's rules before applying any edits. Checking basic syntax this way is probably overkill, since modern models rarely output malformed syntax and valid syntax is a shared cultural agreement beyond any single application.
The real value of pre-application verification lies in enforcing opinionated structure that reflects a team's specific standards. Examples cited in the essay include minimizing cyclomatic complexity and forcing function identifiers to match a strict grammar. When any check fails its configured threshold, the harness rejects the output before application and forces the LLM to iterate until the code passes, with the scoped architecture allowing checks at any granular level.
04New code blindspots and opinionated variance
The author acknowledges that the proposal has blindspots, even though the underlying problem is hard to refute. Everyone using LLMs with standard harnesses encounters nuanced semantic drift over long sessions. Syntax is trained into models because developer communities agree on it, whereas individual opinions are what partition engineers into unique problem solvers.
Note: The AST-based rule injection model works for existing code because there is already a target node in the syntax tree to anchor rules against. As our_are_why notes while drafting the proposal, new and yet-to-exist content still has unsolved holes under this design.
Because general-purpose LLM output cannot be relied on unchecked by its very nature, teams must stay on top of every input and output to bound variance. Standard harnesses leave too much of that opinionated enforcement to chance across multi-step workflows.
05Pluggable harness platforms for bounded output
Regardless of whether developers agree with the specific AST or linter mechanisms outlined, the essay argues that harnesses must evolve into pluggable platforms. Tailored context assembly and pre-application output verification should be treated as first-class, user-configurable features rather than rigid defaults. Making those extension points configurable lets teams encode their own architectural opinions directly into the loop.
Ultimately, our_are_why frames the goal as keeping LLM output contained within acceptable deviation as defined by its human pilot. Bounding variance at both input assembly and output verification turns an unpredictable general-purpose model into a more consistent engineering tool.
Frequently asked questions
Why does our_are_why argue semantic alignment should happen during context assembly?
Deterministic post-hoc tests cannot reliably validate semantic intent, and ML or AI checks do not provide a 100 percent pass-or-fail answer at scale. Injecting rules at the right AST scope during context assembly keeps the model on track before it generates output.
How does the proposed harness combine AST parsing with raw text prompts?
The harness parses source files into an abstract syntax tree under the hood to deterministically locate target nodes and run checks. It still passes the normal raw text file to the LLM, with scope-specific rules injected near the target function, top of the file, or project level.
What should pre-application linters enforce instead of basic syntax?
Because models rarely produce malformed syntax, pre-application parsers and linters are most valuable for enforcing opinionated structural rules. The essay cites minimizing cyclomatic complexity and requiring function identifiers to match a strict grammar, rejecting failing outputs so the LLM iterates until it passes.
What is the main blindspot in the AST scope-injection approach?
While the scoped rule-injection design works for modifying existing code, the author notes that new, yet-to-exist content still has unsolved holes.
Sources
Author
Dillip Chowdary
Writes Tech Bytes coverage of AI, engineering, and the tools that actually ship. Editor of Tech Pulse Daily.
Related on Tech Bytes
Advertisement