Digital Independence with the Immich 3.0 Update
A Hyper-Relational Approach to Knowledge Management

At the core of kb-prolog lies the concept of a hyper-relational graph, which elevates data management to an entirely new level. In traditional semantic models, data is represented as simple "subject-predicate-object" triplets. However, real-world knowledge is rarely so linear; it demands context, attributes, and nuance. The hyper-relational model allows properties to be attached directly to the relationships themselves, while a reification mechanism enables any statement to be transformed into a first-class object. This means the system can make assertions about its own assertions, creating a multi-layered knowledge structure where metadata is as accessible for analysis as the primary data.

The project's technological foundation rests on Content Addressable Storage (CAS). Unlike traditional file systems, where access is managed via paths or filenames, CAS uses a cryptographic SHA-256 hash of the data itself as the unique identifier. This approach guarantees absolute data integrity and enables automatic deduplication: if two identical fragments of knowledge enter the system, they are stored as a single instance. The atomic commitment of graph metadata alongside these hashes transforms the knowledge base into an immutable log—a critical requirement for ensuring data provenance and authenticity.
Particular emphasis has been placed on the temporal dimension and the evolution of knowledge. A built-in "Time-travel" feature allows users to track the version history of every single assertion. Through the replaces_id mechanism, updates do not overwrite existing records; instead, they create a new version linked to its predecessor. This establishes a continuous chain of versions, allowing researchers or developers to restore the state of the knowledge base to any point in the past and analyze the trajectory of how a specific fact has evolved.
The computational engine of the system is the Trealla Prolog runtime. The choice of a logic programming language is driven by its inherent affinity for graph structures and its capacity for efficient querying via complex rules. To ensure high performance and seamless interaction with external environments, the system leverages C and a Foreign Function Interface (FFI). This architecture allows for the integration of SQLite as a lightweight database for metadata storage and the Raylib graphical library for process visualization.
The concept is rounded out by an interactive interface that transforms abstract logical inferences into an intuitive knowledge map. The Raylib-based visualizer provides the ability not only to browse and search graph nodes but also to preview associated imagery. Consequently, kb-prolog represents a complete closed-loop ecosystem: from low-level hashed storage to high-level logical inference and visual analysis.

