← Blog

The S-System Design: A Dual-Process Architecture for a Self-Auditing Forecasting Agent

Prediction Mind is a small autonomous agent that forecasts financial markets. The domain is incidental. What this article describes is the architecture — three loosely coupled systems for reaction, deliberation, and self-monitoring — and the design invariants that recur at every level. The questions it tries to answer are general ones for agent design: when should an agent spend expensive inference, how does it prove the spend was worth it, how is it allowed to modify itself, and who watches it when nobody else is watching. 2026-07-07.


The idea

Dual-process accounts of cognition — Kahneman's System 1 (fast, automatic, cheap) and System 2 (slow, deliberate, expensive) being the most familiar — distinguish reflexive responses from effortful reasoning. The transfer to forecasting is direct: most observations deserve a reflex, a few deserve genuine thought, and a bounded agent should know the difference, allocating costly computation only where the world has surprised it. This is rational metareasoning in the classic sense: treating computation itself as an action with a cost, taken only when its expected value justifies it.

The architecture adds a third layer the psychology literature doesn't need but autonomous systems do: System 3, a metacognitive monitor. The dominant failure mode of an unattended pipeline is not wrong output but silence — a prediction machine that quietly stops predicting is worse than one that predicts badly, because nothing looks wrong.

Three systems, three verbs:

  • System 1 reacts. It ingests the world, files it, and makes cheap mechanical predictions about everything under watch, every cycle.
  • System 2 deliberates. It ranks System 1's open predictions by surprise, spends a strictly budgeted LLM call thinking hard about the single most surprising one — then grades whether thinking actually beat the reflex.
  • System 3 doctors. It scans both systems for symptoms, keeps a findings ledger, emits repair prompts, and only ever declares something healed when it observes the symptom gone.

Each system is an isolated module with its own storage; the couplings between them are deliberately narrow and asymmetric.

        ┌─────────────────────────────────────────────┐
        │  SYSTEM 3 — metacognitive monitor           │
        │  observes both, writes to neither           │
        └───────▲─────────────────────────▲───────────┘
                │ observes                │ observes
┌───────────────┴──────────┐  ┌───────────┴────────────────────┐
│  SYSTEM 1 — reflex       │  │  SYSTEM 2 — deliberation       │
│  ingest → corpus →       │─▶│  surprise → thesis → scoring   │
│  episodes → scoring      │RO│  → reflection → beliefs        │
│                          │◀─│                                │
└───────▲─────────▲────────┘ C└────────────▲───────────────────┘
        │         │                        │
┌───────┴───┐ ┌───┴──────────┐  ┌──────────┴───────────┐
│ price     │ │ macro scalar │  │ change-based         │
│ series    │ │ series       │  │ representation       │
└───────────┘ └──────────────┘  └──────────────────────┘

RO = read-only observation, through a single access contract
C  = a signed, gated parameter-adoption channel — never direct writes

System 1 — the reflex spine

System 1 is the only layer nothing else can live without. It is a pipeline of four append-only stages:

  1. Capture. Documents (news, in this instantiation) are ingested on a fixed cadence and landed as immutable envelopes in an append-only, replayable capture archive. Every downstream store is a disposable materialized view of this archive; the archive, not any database, is the ground truth.
  2. Corpus. Envelopes move into a searchable evidence base with hybrid retrieval — sparse lexical ranking (BM25) fused with a dense embedding index — so the reflex and any later deliberation ground their claims on the same evidence.
  3. Episodes. Every prediction is an episode: a frozen context (exactly what was known at prediction time), a prediction, a horizon, and — later — an outcome. Episodes are hash-chained, so the record of what the agent believed and when is tamper-evident. Nothing is ever edited; resolution appends.
  4. Reflex + scoring. A cheap, deterministic scoring function (news tone fused with price momentum — one pure function, no learned weights it didn't earn; see the synapse below) produces a mechanical call per watched instrument and records it as an episode. Episodes are graded at horizon against realized outcomes with a Brier score, a proper scoring rule, so the reflex cannot game its own evaluation. Episodes that can never resolve reach a terminal unresolvable state instead of retrying forever.

The property that matters: System 1 is complete on its own. Ablate everything else and it still perceives, predicts, and scores itself, indefinitely, without a single LLM call.

System 2 — deliberation, and the measurement of whether it's worth it

System 2 is the expensive half, and the design treats expensive as a first-class constraint rather than an operating cost to be tolerated.

Attention before thought. A nightly, LLM-free surprise scan ranks System 1's open reflex episodes by how far realized behavior has diverged from what the reflex assumed — prediction error as an attention-allocation signal. Only the top-k candidates (default: one per night) earn a deliberation. The agent does not think because it can; it thinks because something didn't fit.

Thought with a contract. A deliberation is a single budgeted LLM call that must return a schema-validated thesis: a claim, a mechanism, a falsifier, a concrete prediction with a horizon, a confidence stated against a base rate, and citations into the shared corpus. The falsifier requirement is a Popperian gate applied at the schema level: a thesis that cannot name the observation that would prove it wrong is rejected before it is stored. This is a structural defense against the failure mode LLMs are best at — fluent, confident, unfalsifiable rationalization.

Grading against the counterfactual it replaced. Every thesis is paired with the baseline reflex episode for the same entity and graded with the same scoring rule at the same horizon. The architecture's founding question reduces to one queryable number: is deliberation beating the reflex, or is the agent paying more to be wrong differently?

A change-based representation. Beneath deliberation sits a representational commitment: System 2 sees every factor and macro series as its derivatives — velocity (first difference), acceleration, and a robust z-score against the series' own history — rather than levels. This one choice feeds several downstream views:

  • a change scanner that flags interval shifts, persistent drifts that a self-normalizing z-score would suppress, divergence pairs opening or closing, and composite extremes;
  • a correlation topology over all change series, tuned to make cross-domain couplings loud and within-domain couplings faint;
  • worldlines — macro dimensions rendered as composite velocity trajectories through time, with divergence windows re-evaluated point-in-time, never in hindsight;
  • a regime belief filter: a probability distribution over a small set of named regime scenarios, updated by a daily predict → score → correct cycle, whose predictive skill is measured against a uniform-belief baseline before every correction is applied. The resulting belief enters the deliberation prompt as one bounded line of measured context, not instruction — the LLM is told what the filter believes and how well it has been scoring, and no more.

Self-improvement, guarded. System 2 learns from its own graded record, but every feedback channel carries a proof obligation:

  • Confidence correction. Measured overconfidence is subtracted from stated confidence only after a strictly prequential replay of the graded history — each historical row corrected using only strictly earlier grades — demonstrates the correction would have improved the Brier score. Both raw and corrected scores are retained, so the improvement claim is itself auditable.
  • Beliefs. Graded outcomes accrue into decaying Beta evidence ledgers over fixed structural scopes. A belief becomes citable in the deliberation prompt only after sufficient effective evidence, and retires when it goes stale. Nothing the agent "knows" about itself is exempt from expiry.

The synapse — how System 2 is allowed to change System 1

The most dangerous idea in the design is the downward channel: letting the deliberative system retune the reflex. Unconstrained, this is how an agent laundered its own biases into its perception layer. The synapse makes the channel legal without making it casual — a pipeline of independent checkpoints, off by default and fail-closed:

  1. System 2 forms sensor beliefs — is the tone signal actually agreeing with realized moves? — through a single observation contract: one module through which all of its reads of System 1's record must pass.
  2. A playbook converts reliable sensor beliefs into at most three candidate parameter sets with deterministic, content-addressed identities.
  3. An adoption guard replays each candidate against a chronological holdout of the real graded record; a candidate must beat the incumbent out-of-sample by a minimum margin.
  4. Survivors are published as a cryptographically signed, hash-chained manifest. System 2 has no write access to System 1's state, ever; it can only publish a claim.
  5. System 1 verifies the signature and sequence, independently re-checks the claim on its own record with tighter tolerances, then stages the candidate as shadow episodes — paired predictions that are scored in production without influencing behavior.
  6. Only after live non-degradation across enough pairs and days does the active parameter set flip — audited, reversible, and stored on System 1's side of the boundary, so the reflex keeps its learned self even if its teacher is ablated.

Trust nothing you didn't verify yourself, stage everything, and keep the ability to revert: the synapse is the whole design philosophy in miniature, and a small-scale case study in what guarded self-modification can look like when the modifier and the modified are held to adversarial standards of proof.

System 3 — the machine that watches the machine

System 3 exists because the failure mode of autonomy is silence. A dead upstream feed does not look like an error; it looks like a quiet news day. Most of System 3's rules are motivated by that class of bug — failures that present as an absence of evidence rather than the presence of an exception.

  • Sensing. A periodic sweep runs a battery of crash-isolated scanners: task failures, staleness and duration trends, ingestion backlogs, integrity of the hash chains, data freshness, log anomalies, storage health, and end-to-end endpoint probes. Findings land in a ledger, deduplicated by fingerprint, with an explicit lifecycle: open → prompted → fixing → fix-claimed → closed.
  • Closure by observation only. No interface exists that can close a finding by assertion. A fix may be claimed, but the finding closes only when a later sweep observes the symptom gone — and if the symptom persists after a claim, the finding reopens as "fix did not hold." A crashed scanner exempts its own categories from closure that sweep: a broken sensor is not evidence of a healthy patient.
  • Findings as prompts. Each open finding renders a structured repair prompt — a regenerable artifact, a view of the ledger, never state of its own.
  • The effector lives outside the process. Actual repair belongs to an external tool-using agent with a restart budget, pre-change snapshots, test-gated code changes, and one standing rule: fix scanners, never weaken sensors. The monitored process does not perform surgery on itself.
  • Auto-remediation, barely. A whitelist of reversible actions (retry an ingestion task; temporarily disable a data universe with an automatic revert) sits behind its own switch, default off, rate-limited per finding, everything audited. The whitelist structurally excludes the monitor's own subsystem — the doctor cannot medicate itself.
  • Tests as findings. Each subsystem's test suite is runnable individually, and a failing suite opens a finding that only a fresh passing run can close. Sweeps never run tests, so a sweep can never close one — the evidence that closes a finding must come from the same kind of act that opened it.

The epistemics are deliberately the same as the prediction layer's: just as no forecast is right until the outcome is observed, no fix is real until the symptom is observed gone.

The shared substrate

Two further deletable modules act as the sensory organs both systems stand on: a store for daily price series and a store for scalar macroeconomic series. Both follow one recipe:

  • Raw observations are append-only. Derived quantities that upstream providers are known to rewrite retroactively (adjusted prices, revised macro figures) are kept as a derived, rewritable view, recomputed when a revision is detected — the only honest design when the data source itself does not respect point-in-time semantics.
  • A replay archive can rebuild each store observation-for-observation, making every database disposable and every analysis reproducible from first principles.
  • Local-first accessors resolve reads through a fixed chain — injected provider for tests, then the local store, then the live provider — so no consumer knows or cares which layer answered.

The design invariants

The same principles recur at every scale; they are what makes this an S-system design rather than three programs in a trench coat:

  1. Modules are organs — removable ones. Every layer above System 1 is a self-contained module with its own storage, mounted behind a guarded import and a kill switch. Deleting any of them leaves the rest running and the remaining tests green. Ablation is a first-class, test-proven property of the architecture, not a thought experiment.
  2. Facts are append-only; everything else is a view. Capture archive, episode spine, raw observations, findings: appended, never edited. Hash chains and replay archives make the record tamper-evident and reconstructible. Databases are disposable; the archive is the truth.
  3. Point-in-time honesty. Frozen episode contexts, prequential replays, per-date re-evaluation, staleness caps that keep eras from mixing — no component may grade itself with information it did not have at prediction time.
  4. Expensive inference is a budget, not a default. One deliberation per night; on-demand deliberation is an explicit, logged act; and the deliberation task is deliberately excluded from restart catch-up, so a process restart can never silently spend model tokens.
  5. Self-modification requires proof, staging, and reversibility. Calibration corrections pass a prequential gate; parameter adoption passes an out-of-sample gate, an independent re-check by the system being modified, and a live shadow period — and every adoption can be reverted.
  6. Health is observed, never asserted. Findings close by observation; claimed fixes that don't hold reopen; broken sensors block closure. The stance the grading layer takes toward predictions, the monitor takes toward the system itself.
  7. Fail closed at the edges. Network exposure is minimized; every route is authenticated; signed manifests freeze the channel on any mismatch; unreadable identity state denies access rather than granting it.
  8. Every internal state is interrogable. All of the machinery above is inspectable through a single operator surface, one command per question — surprise rankings, the deliberation-versus-reflex ledger, the regime belief and its skill, the synapse's staged candidates, the open findings. If a subsystem cannot be interrogated in one command, it isn't done.

Seeing it run

A cycle in the life of the agent: perception syncs on a rolling cadence through the day; in the evening the data layers land their observations, the change representation updates, and the regime belief corrects itself against what actually happened; at night the surprise scan ranks the open reflex predictions and the single most surprising one receives a deliberation; the playbook then considers whether the reflex has earned new parameters; overnight, due episodes and theses are graded against realized outcomes; and every hour the monitor sweeps it all. Any task that slept through its slot catches up exactly once at the next boot — except deliberation, which is never allowed to spend by accident.

The whole design fits in one sentence the system itself can verify: a cheap system predicts everything, an expensive system thinks about what surprised it, a third system makes sure the first two are still alive — and every layer has to prove, on its own graded record, that it earns its keep.

← Back to Blog