The Four Ontological Levels: Hive Architecture Layers

Abstraction Level: Level 1 (Organism) — Full system architecture

Purpose: Map the four ontological levels defined in FOUNDATION.md to actual repository directories, showing the separation between immutable DNA, sovereign brains, specialized skills, and composed citizens.


The Ontological Hierarchy

From FOUNDATION.md:3-24, every element of the Hive exists at one of four levels:

spinner

Level-by-Level Breakdown

🧬 Level 1: The Genome (/packages/aura-core)

Status: Immutable DNA

Content:

  • Pure Python Protocols (SkillProtocol, Aggregator, Transformer, etc.)

  • BaseModels (Pydantic models for data structures)

  • Type definitions (TypeAliases, Enums)

Rule: NO business logic. NO external I/O. This is the shared language of all Bees.

Example Files:

Why Immutable? Changing the Genome requires coordinated evolution across all Bees. Protocols define the shared language — breaking them breaks the entire Hive.

Verification:


🧠 Level 2: The Nucleus (/core)

Status: The Sovereign Brain

Content:

  • ATCG-M metabolism implementation (src/hive/)

  • LLM reasoning strategies (src/llm/)

  • Database models and migrations (src/db.py, migrations/)

  • NATS Bloodstream communication

Rule: Uses the Genome to reason. Communicates via NATS "Bloodstream".

Directory Structure:

Why Sovereign? The Nucleus makes decisions. It has agency. It reasons via LLMs, enforces business rules via Membrane guards, and coordinates the Hive's metabolism.

Verification:


🔬 Level 3: The Organs (/components/proteins)

Status: Specialized Skills

Content:

  • SkillProtocol implementations for external worlds:

    • solana/ — Blockchain interactions

    • telegram/ — Messaging bot skills

    • github/ — Version control operations

    • prometheus/ — Metrics collection

Rule: Implements specific SkillProtocols. Decoupled from the Brain.

Directory Structure:

Why Organs? Like biological organs (liver, kidneys), each Protein has a specialized function. The Brain (Nucleus) doesn't know how to interact with Solana — it delegates to the Solana Protein via the SkillProtocol interface.

Analogy:

Verification:


👥 Level 4: The Citizens (/agents & /adapters)

Status: Active Subjects & Passive Servants

Content:

  • Agents (/agents/): Composed entities (Brain + Proteins) with goals

    • bee-keeper/ — Architectural auditor

    • chronicler/ — Documentation maintainer

  • Adapters (/adapters/): Translation layers with no goals

    • api-gateway/ — HTTP ↔ gRPC protocol translator

    • telegram-bot/ — Telegram ↔ NATS event bridge

Rule:

  • Agents have agency — They pursue objectives (audit code, maintain docs)

  • Adapters are passive — They only translate signals between protocols

Key Difference:

Citizen Type
Has Goals?
Examples
Behavior

Agent

✅ Yes

bee-keeper, chronicler

Proactively watches for violations, initiates audits

Adapter

❌ No

api-gateway, telegram-bot

Reactively translates requests, has no internal objectives

Directory Structure (Agents):

Directory Structure (Adapters):

Verification:


Ontological Rules Enforced by bee-keeper

The bee-keeper agent audits code for ontological violations:

❌ Forbidden: Genome importing from Nucleus

Why forbidden? Genome is immutable DNA — it cannot know about specific implementations.


❌ Forbidden: Proteins knowing about Brain internals

Why forbidden? Proteins are decoupled skills. They implement protocols but don't know who calls them.


✅ Allowed: Citizens importing from all levels

Why allowed? Citizens are composed entities at the top of the hierarchy. They orchestrate lower levels.


Visual Summary: Information Flow Direction

spinner

Key Insight: Information flows downward (definitions) and upward (composition), but never sideways or in cycles.


Decision Tree: "Where Does My Code Belong?"

Use this flowchart to determine the correct ontological level for new code:

spinner

Relation to Canonical Architecture

This diagram implements the ontological hierarchy defined in:

  • docs/FOUNDATION.md lines 3-24 (Four Levels)

  • packages/aura-core/src/aura_core/dna.py (Genome implementation)

  • core/src/hive/ (Nucleus implementation)

  • components/proteins/ (Organs implementation)

  • agents/, adapters/ (Citizens implementation)


End of Ontological Hierarchy Documentation

For the glory of the Hive. 🐝

Последнее обновление