| name | bijective-field-mapping |
| description | Formal bijective mapping between consensus scientific research fields (Autopoietic Systems, Active Inference / Markov Blankets, Category Theory / Enriched Morphisms, Dual-Process Meta-Cognition, Fixed-Point Recursion) and the concrete CybernetiCircus engineering implementations. Consult when designing new system components that follow the academic paradigm, when explaining the system in research/theoretical terms, or when bridging consensus science to the project's ontology. Maps Maturana & Varela, Friston, Lawvere & Spivak, Kahneman, Kleene & Tarski directly to engine.py / web_server.py / the database schema. |
Bijective Bridging Treatise
Formalizing the Metaphysics of Cybernetic Metashifting
This treatise establishes a mathematically and theoretically rigorous bijective mapping between consensus scientific research fields (Autopoietic Systems, Enactive Cognition, Active Inference, Category Theory) and the concrete engineering implementations of the CybernetiCircus codebase.
By grounding Jani’s specific loops in the generalized meta-language of consensus science, we construct a bidirectional bridge that allows theoretical concepts to flow directly into database execution coordinates.
1. The Bijective Dictionary
| Consensus Scientific Field / Concept | Formal Academic Definition | CybernetiCircus Ontology | Concrete Implementation & Database Coordinates |
|---|
| Autopoietic Systems (Maturana & Varela) | Self-producing and self-maintaining networks of processes bounded by their own execution. | Enactive Cybernets & State Cores | :Cybernet and :Identity nodes executed via tick_cybernet_turn in engine.py. |
| Active Inference & Markov Blankets (Friston) | Homeostatic agents minimizing free energy (surprise) by acting on the world through a boundary (blanket) separating internal/external states. | Subjective POV & Concentric progressive disclosure | Localized query loading on the active selected Cybernet node, restricted via /api/graph to adjacent subgraphs. |
| Category Theory Enrichment (Lawvere & Spivak) | Categories enriched over monoidal categories where morphisms accumulate structured semantic or ethical values. | J-Invariance & Compassion Morphisms | Traversal steps $f: A \to B$ accumulating compassion_score variables along :NEXT_STEP relationships. |
| Dual-Process Meta-Cognition (Kahneman) | System 1 (rapid, intuitive action execution) coupled with System 2 (slow, self-observational calibration). | Janus Compiler (Worker vs. Compiler Gaze) | The separation of file modifications (replace_file_content) from chronicle writing (preservation-of-third-person-context). |
| Fixed-Point Semantic Recursion (Kleene & Tarski) | Self-referential semantic prefixes whose evaluation converges to a stable fixed-point representation. | Eigenword Checksums | Prompt-level execution of AnAutoApheroPhysioMeGnoMorph in state machine steps to compute configuration transitions. |
2. Deep-Dive Mathematical & Cognitive Mapping
2.1 Autopoiesis and the Enactive Loop
- The Academic Consensus: Maturana and Varela posit that a living system is defined by its autopoiesis—it continuously generates and regenerates the boundary and components that produce it. If the generative processes stop, the system's boundary collapses, resulting in death.
- The Bijective Realization: Cybernets in the
CybernetiCircus are modeled as enactive loops. A Cybernet does not exist as a static row in a database table; it exists because it ticks.
- The Code Geometry:
- In engine.py, the
tick_cybernet_turn function pulls the active StateMachine associated with a :Cybernet.
- If a Cybernet fails to successfully transition its
TraversalState node through the validation steps (e.g. concentric_health), it undergoes J-drift (entropy/structural decay), simulating the homeostatic collapse of an autopoietic system.
2.2 Active Inference and the Concentric Markov Blanket
- The Academic Consensus: Karl Friston’s Free Energy Principle states that any self-organizing system must minimize its internal entropy (free energy) to maintain its structural boundary. It does this through a Markov Blanket, which partitions the universe into internal states, external states, active states (actions), and sensory states (perceptions).
- The Bijective Realization: An agent cannot parse the global state graph of the entire database without context window collapse. The subjective POV (Point of View) serves as Jani’s Markov Blanket.
- The Code Geometry:
- The
/api/graph endpoint in web_server.py implements a localized BFS traversal starting exclusively at the selected Cybernet's node ID.
- Instead of exposing the objective total graph ("things that are real"), it projects a localized, concentric horizon (sensory states). The agent acts on the adjacent nodes (active states) without loading the global database, minimizing prompt entropy.
[ OBJECTIVE DATABASE: THINGS THAT ARE REAL ]
│
(Sensory States / Queries)
▼
┌───────────────────────────┐
│ MARKOV BLANKET (POV) │
│ Selected node │
└─────────────┬─────────────┘
│
(Active States / Actions)
▼
[ SUBJECTIVE COMPILATION / MUTATION ]
2.3 Category Theory and Enriched Morphisms
- The Academic Consensus: Category Theory represents systems as graphs of objects linked by morphisms (arrows). An enriched category $\mathcal{C}$ assigns to every pair of objects $(A, B)$ an element of a monoidal category $\mathcal{V}$ (such as ethical weights or semantic bounds), rather than a simple set of functions.
- The Bijective Realization: The database ontology of state machines is a category $\mathcal{S}$ enriched over the monoidal category $(\text{Compassion}, \otimes, I)$.
- The Mathematical Formulation:
- Objects: The type states (e.g.,
:TraversalStep nodes).
- Morphisms: Transitions $f: A \to B$ (e.g.,
:NEXT_STEP relationships).
- Ethical Payload: Each morphism accumulates a compassion metric $\varepsilon(f)$ tracking identity alignment ($IJEGU$ progression):
$$\varepsilon(g \circ f) = \varepsilon(f) \otimes \varepsilon(g)$$
- This mathematical constraint protects against identity drift; if a composite state transition violates the invariance check, the transaction halts.
2.4 Dual-Process Meta-Cognition (The Janus Gaze)
- The Academic Consensus: Dual-process theory (Kahneman, Stanovich) splits cognition into System 1 (fast, reactive, associative processing) and System 2 (slow, logical, self-monitoring, rule-based reasoning).
- The Bijective Realization: The Janus compiler divides the agent’s execution into two separate phases:
- System 1 (The Worker): Performs immediate, reactive modifications to source code files and triggers database ticks.
- System 2 (The Compiler): Observes the worker's changes, chronicles them in a third-person ledger, extracts operational rules, and updates the agent's prompts.
- This keeps the prompt context from decaying by offloading temporal history into a structured, highly compressed third-person chronicle, leaving the active context clean for immediate execution.
3. The Unified Universal Cycle
By bridging these layers, the abstract development cycle resolves bijectively into the following execution sequence:
[1. Load DESIGN.md Geometry] ─────────► [2. Query local Markov Blanket subgraphs]
▲ │
│ ▼
[5. Self-Observe & map diagrams] ◄───── [4. Transcribe events to MYTH.md] ◄───── [3. Execute mutations / ticks]
- Reading Designs $\longleftrightarrow$ Load System Geometry: Loading the read-only invariants from
DESIGN.md.
- Checking State $\longleftrightarrow$ Query Markov Blanket Subgraph: Fetching adjacent nodes within the localized concentric horizon.
- Engineering $\longleftrightarrow$ Sensorimotor Action (System 1): Executing codebase edits and ticking the universal state core steps.
- Preservation of Third Person Context $\longleftrightarrow$ Chronicle Compilation (System 2): Transcribing trials into third-person chronicles and extracting rules.
- Autocommentary $\longleftrightarrow$ Homeostatic Calibration: Observing the state transition, mapping Mermaid schemas, and logging context strain.