AGENT COGNITION
Derived Reflexes
A derived reflex is not a rule — it is the action sequence that emerges inevitably when an agent holds the right atomic beliefs simultaneously.
Beliefs, Atoms, and the Pipe
A belief expressed as a single natural-language sentence is a packet. It compresses approximately six distinct atomic beliefs — propositions that must be unpacked individually using set-algebra notation: relations between sets plus predicate logic. The unpacking is not interpretation; it is a deterministic expansion of what the sentence already claims.
A reflex is not a belief. It is the action sequence that is forced into existence when all atomic beliefs are held simultaneously. It is derived by composition — never written as a separate rule, never maintained as a gate. The pipeline operator → is functional: the output of step n is the sole input to step n+1. No global variable crosses step boundaries.
The Dilts logical-level model places beliefs at level 4 (Beliefs/Values). Reflexes live at levels 2–3 (Behaviour / Capacity). The higher level governs the lower: a correctly formulated belief at level 4 makes the reflex at level 2 automatic. This is the innate > triggered principle — an emergent reflex needs no trigger condition written separately.
Anti-beliefs — propositions of the form X ∉ Y — require no explicit prohibition. If Corr_valides ⊆ Archi and Patch ∉ Archi, then Patch ∉ Corr_valides is deduced by set containment. The exclusion is logically implied, not manually enforced. This is why belief-level correctness is more robust than gate-level correctness: gates can be bypassed; deductions cannot.
Key figures: ≈6 atomic beliefs per natural-language belief · derivation maps level 4 → levels 2–3 · 0 separate gates need to be written once beliefs are well-formed.
Maxims: Debugging and Operations
Three engineering maxims for the ops and debug domains. Each is given with its formal decomposition so the derivation is visible, not asserted.
Let
Pthe problemobs(P)what is observedSym(P)symptom setRC(P)root cause(s)Corrsplit intoPatchandArchi, withPatch ∩ Archi = ∅
Atomic beliefs
- C₁
obs(P) ⊊ Pobservation is strictly smaller than the whole problem - C₂
obs(P) ⊆ Sym(P) - C₃
|Sym(P)| ≥ 1often > 1 - C₄
∃ RC(P) : Sym(P) ⊆ effets(RC(P)) - C̄₅
Patch ∉ Corr_validesanti-belief - C₆
Corr_valides ⊆ Archi
obs(P) → enumerer(Sym(P)) → find(RC(P)) → architect(Corr(P))
obs(P) → patch(obs(P)) — seeing a symptom and patching it is a workaround, not a correction.
Beliefs
Ga gate or scannerexit(G) ≡ ranOKexit 0 means "ran without crash", not "nothing found"verdict(G) ⊥ exit(G)the verdict is orthogonal to the exit codefound(G) ≠ ∅ ⇏ exit(G)=brokenanti-beliefverdict(G) ∈ report(G)
run(G) → exit := ranOK → write(verdict→report) → gate reads report
found ≠ ∅ → exit ≠ 0 → set -e short-circuits the pipeline — the CI never reaches the report, and findings are lost.
Let
Hhang hypothesiswobservation windowDexpected task duration
Atomic beliefs
- C₁
obs(w) where w ≪ D ⊄ preuve(H)too short a window does not constitute evidence - C₂
silence(w) ⊆ {hang, work-in-progress}silence is ambiguous - C₃
|causes(silence)| > 1futex_wait + zero IO ≠ deadlock
suspect(hang) → set w := D → mesurer(w) → conclude
obs(1s) → conclude(hang) — a one-second absence of output is not a hang.
Maxims: Security, Concurrency, and Fix-Agents
Beliefs
Iinputtrust(I) = ⊥by defaultvalid(I) ⇒ trust(I)only explicit validation elevates trustI ∉ trusted ⇒ I ∉ {query, exec, render}anti-belief
receive(I) → validate → sanitize → use
receive(I) → use(I) — treating arrival as authorization.
Beliefs
Sshared statereport(success) ⊊ vérité(S)the success report is a proper subset of ground truth∃ concurrent mutatorsS can drift between the push and the next read — other sessions, auto-merge, or CI can mutate S mid-task
push → re-read(canonical(S)) → assert → continue
push → trust(report) → continue — acting on a snapshot that may already be stale.
Beliefs
Ttarget fileFfix- existence of
Tis a precondition forapply(F) ¬exists(T) ⇒ apply(F)is invalid — correcting an absent target is the silent revert of a strategic decision
receive(F) → assert exists(T) → else escalate → apply(F)
receive(F) → apply(F) — creating a file that was deliberately deleted.
Maxims: Refactoring, Tests, and Dependencies
Let
Aabstractionuses(A)set of usage sites
Atomic beliefs
- C₁
|uses(A)| ≥ 3 ⇒ A justifiedthree independent uses validate that the abstraction has a stable boundary - C̄₂
|uses(A)| < 3 ⇒ A ∉ justifiedcoupling cost exceeds benefit below three uses
repeated pattern → count(uses) → if ≥ 3 abstract → else duplicate
pattern seen 2× → abstract immediately — premature abstraction couples two sites before the boundary is known.
Beliefs
Ccode¬tested(C) ⇒ correct(C) unknown"it compiles" ∉ proof(correct)anti-belief|paths(C)| > 1in any non-trivial function
write(C) → enumerate(paths) → cover → green
write(C) → ship — compilation is not correctness.
Beliefs
Ddependencycoût(D) = {attack surface, mandatory updates, CVE exposure, transitive graph}- adding
Dunconditionally increments that debt - "it's free" is false for any non-zero transitive closure
need → seek(stdlib) → else evaluate coût(D) → pin → justify
need → install immediately — treating convenience as zero-cost.
The Meta-Maxim: Correct at the Right Logical Level
Let
Lcurrent logical levelfix@Lapplying a correction at level L
Atomic beliefs
- C₁
recurring problem @L ⇒ probable cause @L+1recurrence at a level points to a structural fault in the level above - C̄₂
fix@L on a cause @L+1 = palliativethe symptom returns because the cause is untouched
recurrence@L → ascend(L+1) → fix@L+1
recurrence@L → re-fix@L — a saga of fifty commits over thirty-six hours, all at the tactical layer, never closes a structural debt. The loop continues until someone climbs a level.
This is the closing principle of the framework. It applies to every other maxim. When a reflex keeps failing, the fault is not in the reflex — it is in the beliefs at level 4. The correct move is to reformulate the belief one level up, then re-derive the reflex. The reflex is downstream; the belief is the root.
When a reflex misfires repeatedly: do not patch the reflex. Climb one level, inspect the belief, reformulate it, re-derive. recurrence@L → ascend(L+1) → fix@L+1.
The Grammar of Derivation
The derivation is mechanical, not interpretive. Each logical form of an atomic belief maps to a specific step type in the reflex. The table is the grammar.
The four-step derivation algorithm applies this grammar to any belief set:
- Order atomic beliefs by data dependency —
obs(·)first,act(·)last. The sequence reads from observation to action. - Translate each belief into a step using the grammar above:
⊆/⊊→ transformation · anti (∉) → guard ·∃/∀→ search or coverage ·|·| > 1→ enumeration loop. - Chain steps with
→. Output of one step is input to the next. No global variable. - Name the naive reflex — the direct
obs → actshort-circuit — to make the gap visible and the drift conscious.
Taxonomy anchor: this model feeds directly into the Cortex entity taxonomy — Belief | Value | Principle | Sentiment. Beliefs live at level 4 and are stored as first-class entities. Reflexes live at levels 2–3 and are never stored as independent entities — they are derived on demand from the belief graph. Conflating the two is the original category error this framework exists to prevent.
What This Demonstrates
Five findings from the analysis of nine engineering maxims across six domains:
- A natural-language belief ≈ 6 atomic beliefs. Spoken language compresses semantic content that must be explicitly unpacked before a correct reflex can be derived. The compression is not a flaw — it is the reason derivation is necessary.
- Decomposition surfaces anti-beliefs automatically. Propositions of the form
X ∉ Yare not written as prohibitions; they emerge from set containment. The exclusion is logically entailed, not manually guarded — which makes it robust against the guards being removed. - The reflex emerges from beliefs by composition. No separate gate, no separate rule, no separate trigger condition needs to be written. The pipe is the reflex. Innate > triggered.
- Correct beliefs at level 4 are more robust than guards at levels 2–3. A guard can be bypassed. A deduction cannot. Formulating the belief correctly is the upstream investment that eliminates downstream patching.
- Reflexes are never stored as independent entities. In the Cortex taxonomy, reflexes are derived on demand from the belief graph. Storing a reflex independently would decouple it from its beliefs, making it unverifiable and unmaintainable.
The practical implication: when a reflex misfires, do not debug the reflex. Audit the beliefs. Find the atom that is missing, imprecise, or at the wrong level. Reformulate it. The correct reflex follows.