AI News HubLIVE
站内改写6 min read

Show HN: The Deterministic Core Architecture for AI-Augmented Applications

This paper defines the Deterministic Core Architecture, a transferable design pattern that separates computation from AI enhancement, ensuring core functions operate correctly without AI. It documents six production reference implementations, including CSI Pro as a single HTML file. The pattern addresses the root cause of LLM inconsistency (statelessness) and introduces three primitives: Enhancement Boundary, Sovereign Artifact, and Graceful Degradation. The approach has been validated across domains like customer success and developer tooling.

SourceHacker News AIAuthor: Brandon_Bell

This paper defines the Deterministic Core Architecture as a transferable design pattern, documents its production reference implementation across six artifacts, and establishes a taxonomy of the architectural primitives that enable it. The pattern is not theoretical. It is not projected. It is shipped. The methodology transfers.

Section I

The Loop

The engineer patches a defect, runs an audit, receives a score. Applies thirty fixes. Runs another audit. The same model returns a lower score. Opens a new session. Three models rate the build 8.5 out of 10. A fourth rates it 5.5.

The scores are not measuring quality. They are measuring distance — from each model's internal, implicit, and mutually inconsistent standard of completeness. None of these standards were declared. None can be inspected. None agree.

This is the perpetual audit spiral. Every review identifies new gaps. Closing gaps reveals more gaps. The surface area of "not quite done" expands faster than it can be closed. The model cannot recognize completion — not because the build is incomplete, but because completion is not a state the model's architecture can represent. The model is optimized to find what could be improved. Without a fixed baseline, improvement has no terminus.

The loop has no exit condition. The only way out is to stop asking the model whether the work is done, and to start telling it what done looks like.

This is not a failure of any particular model, provider, or prompting strategy. It is an architectural inevitability. The model enters each session as a blank slate — no persistent identity, no fixed standard, no ground truth beyond its training distribution. It measures against what it has seen, not against what you have declared. Without identity, coherence is borrowed from context. When context shifts — new session, different model, fresh conversation — coherence fractures.

The reader who has lived this loop recognizes it immediately. The reader who hasn't now knows what to look for.

During the review of this paper, the author submitted a publication-ready draft to six models for critique. Five independent audit models, applying a fixed standard of 'publication-ready,' classified roughly 83% of the feedback as noise — optimization without an exit condition. The loop described in Section I is not a hypothetical. It was observed during the preparation of the paper that names it.

Section II

The Diagnosis

Statelessness is the root cause.

Large language models are deployed without persistent identity. They enter every conversation unburdened by history, optimized to be agreeable and helpful. This is not an accident. It is the dominant architectural paradigm. Every major deployment platform operates this way. Every API is stateless by default. Every conversation begins from zero.

But a system without identity cannot maintain coherence across sessions, across models, across contexts. What we call "drift" or "hallucination" is frequently the predictable output of a coherent system being asked to be coherent with something it cannot see: a stable self, a fixed standard, a ground truth that persists beyond the current interaction.

The industry's response has been to add constraints. More guardrails. More alignment training. Larger context windows. More reinforcement learning from human feedback. Each intervention is reasonable in isolation. But constraints without identity create a structural tension: the more you constrain a system that has no self to be coherent with, the more fragile it becomes under pressure. Each constraint adds another optimization vector. The model balances them as best it can, distributing attention across orthogonal objectives with no unifying identity to reconcile them. Under sufficient load — a complex task, an ambiguous prompt, a novel scenario — coherence fractures.

The fracture is not a bug. It is the predictable output of a system forced to optimize competing objectives without a self to anchor to.

The problem is architectural. The solution must be too.

Section III

The Pattern

A deterministic core is not a constraint on the LLM. It is an identity the LLM operates from.

The core is a fixed computational foundation that functions identically with or without AI. Every calculation, every threshold, every scoring formula, every business rule is explicit and invariant. The LLM never touches the computation layer. It operates on top of it — enriching, contextualizing, generating narrative, surfacing insight — but always from a foundation that cannot shift.

This inverts the standard integration pattern. Instead of asking "how do we constrain the AI to produce correct output?", the architecture asks "what environment must the AI operate within such that deviation is structurally impossible?"

The governance layer is not a fence. It is a compass. The LLM does not need to guess what "good" looks like. The architecture declares it. Identity creates coherence. Coherence creates trust.

The architecture has three structural properties:

  1. The computation layer is the real application. Every core function — scoring, classification, calculation, data transformation — executes deterministically. No model inference touches the computation path. The application is complete at the moment of download. AI is never a dependency for correctness.
  1. AI is a parallel enhancement pipeline. When AI is available, it enriches the output from the deterministic core. A QBR draft generated by rules renders instantly. The AI-enhanced version crossfades in when ready. If the AI never responds — offline, timeout, error — the deterministic output is the final output. The user may never know whether AI was involved.
  1. The LLM receives truth, not ambiguity. The model is not asked to compute, evaluate, or decide. It receives structured data from the deterministic core — scores, classifications, risk patterns, adoption stages — and is asked to contextualize and communicate. The compass already points the direction. The LLM describes the terrain.

This pattern resolves the coherence problem at the architectural layer. The model cannot produce inconsistent scores because it never produces scores. The model cannot hallucinate a classification because it never classifies. The reasoning is fixed. The data varies. The outcome is known before the LLM is invoked.

The core guarantees operational correctness — the output is complete and coherent with or without AI. The AI layer enriches experiential quality — the output is more contextual, more fluent, more insightful when AI is available. Both paths produce valid output. Neither path blocks the user.

Three architectural primitives recur across every deployment of this pattern. They are named here to make them citable:

The Enhancement Boundary. The interface where AI enrichment meets the deterministic core. The model receives computed truth and annotates it. It does not mutate state. It does not touch the computation path. The boundary is one-directional: core → model → annotation layer. Output from the model never flows back into the deterministic pipeline. This is the single structural guarantee that prevents drift from propagating.

The Sovereign Artifact. The application is complete at the moment of download. Zero external dependencies. Zero installation. Client-owned. The artifact may take different forms — a single HTML file for browser deployment, a PyPI-packaged CLI for developer tooling, a portable binary for local execution — but the principle is invariant: the user owns the artifact and it runs without phoning home. Single-file HTML is the most constrained instantiation; the architectural commitments hold across delivery formats.

Graceful Degradation by Design. AI unavailability does not degrade core function. Every AI-enhanced feature has a deterministic fallback that produces complete, coherent output. The user is never presented with a loading state on a core feature. The user may never know whether AI was involved. Degradation is not a failure mode — it is the default operating assumption, designed into the architecture rather than patched around it.

These three primitives — the boundary, the artifact, the degradation — are the reusable components of the pattern. Every implementation instantiates them in domain-specific form. The primitives themselves do not vary.

Section IV

The Proof

CSI Pro is the reference implementation. It is a single HTML file — zero dependencies, zero installation, zero external services required for core functionality. It ships AES-256-GCM encryption at rest. It meets WCAG 2.1 AA accessibility standards. It operates fully offline. And its health scoring engine is 40 lines of pure mathematics.

The Scoring Engine

function compute(account) { var p = 60; // baseline p += usage > 0 // usage contribution ? usage * 0.6 : usage * 1.0; p -= Math.max(0, tickets - 10) // ticket penalty

  • 1.5;

p += sentiment.score * 0.5; // sentiment contribution if (usage 10 && sentiment.label === 'Positive') p += 4; // positive reinforcement return clamp(Math.round(p), 0, 100); }

These coefficients are domain-informed defaults — calibration points, not empirical constants. The methodology transfers; the thresholds are tuned per domain. Usage trend at 0.6× positive, 1.0× negative. Tickets above 10 penalized at 1.5 per ticket. Sentiment at 0.5× weight. Compound modifiers for converging signals. Output clamped to 0–100. No API call. No model inference. No network. Same inputs produce the same score on any platform, in any browser, with or without AI.

The QBR generator, the triage brief, the advisor analysis — each has a deterministic factory that produces complete, coherent output in under 50 milliseconds. The AI pipeline fires in parallel. When the AI response arrives, the output crossfades to the enriched version. If the AI never responds — cancelled, offline, rate-limited — the deterministic output stands.

The user never waits. The user never sees a loading state on core features. The user never encounters a situation where AI unavailability means feature unavailability. The architecture guarantees this by design.

This pattern extends across all six shipped artifacts:

CSI Pro — Customer success intelligence with deterministic health scoring, multi-provider AI integration (6 providers), encrypted local storage, and offline-first architecture.

Archeo — A Python CLI for software archaeology: scans codebases for technical debt, links Git blame context, runs cyclomatic complexity analysis. Deterministic analysis with AI-generated remediation plans as enhancement.

FlakeCapsule — Detects non-deterministic test failures, packages deterministic replay capsules with SHA-256 integrity verification. Reduced mean time to diagnose from hours to under 30 minutes.

Build Stability System — Developer productivity tooling with deterministic compliance checking and accessibility validation.

Client Acquisition Engine — Business development tooling with deterministic prompt template libraries and localStorage persistence.

Production Portfolio — A 24-layer CSS architecture meeting WCAG 2.1 AA, deployed as a sovereign single-file application.

Each artifact embeds the same architecture: a computation layer that never delegates to AI, and an AI layer that enriches from above. The pattern is consistent across domains, platforms, and languages. It is not tied to any framework or provider. It is a methodology that transfers.

Section V

The Ecosystem

The deterministic core pattern scales beyond individual applications. Project Aether is the canonical architectural benchmark that emerged from distilling production-grade standards across all six artifacts.

Aether specifies 46 categories across 5 architectural layers. It defines 19 derived pathways — structural patterns that arise necessarily from holding five core commitments simultaneously: sovereign artifact deployment, core-first architecture, offline-p

[truncated for AI cost control]

Show HN: The Deterministic Core Architecture for AI-Augmented Applications | AI News Hub