Bloodstream Contracts

The bloodstream is a shared, append-only data medium where cells publish outputs and subscribe to inputs by shape rather than by direct dependency.

The bloodstream is the shared data medium that replaces direct function calls. Instead of cell A calling cell B, cell A writes a structured output into the bloodstream. Any cell that recognizes that shape can consume it. This makes the system resilient, because dependencies are implicit and data-driven rather than hard-coded.

The Bloodstream as Shared Medium

Think of the bloodstream like a river system. Cells don’t push data through pipes. They release it into a shared flow. Other cells draw from that flow when they detect the right conditions. This eliminates the brittle dependency chains common in traditional systems.

Because the bloodstream is append-only, it acts as both live data and historical record. You can trace every output back to its origin. This provides a built-in audit trail and makes system history part of the architecture rather than an afterthought.

Contracts by Shape

Cells do not depend on who produced the data, only on its shape. This is crucial: a cell declares the exact input structure it accepts. If a compatible data item exists, the cell activates. If not, it waits.

This reduces the mental overhead of compatibility. Instead of coordinating function signatures across a codebase, you define the shape in one place. The bloodstream serves as the catalog of what exists.

Consequences of Append-Only Flow

Append-only flow creates safety. No cell can erase or corrupt shared data. If a cell produces a new version of an output, the old data remains. Downstream cells can continue using the old format until you choose to migrate them.

This also creates a natural form of versioning. You don’t have to manage complex migrations just to keep the system alive. You can introduce a new output shape, let it coexist, and gradually shift consumers to it.

Filtering at the Membrane

Because cells only accept specific shapes, the bloodstream can contain many kinds of data without causing chaos. Unrecognized data doesn’t break cells; it simply passes by. This makes the system tolerant of experimentation and partial builds.

Practical Implications

Example Scenario

Imagine a speech transcription cell that writes `Transcript` objects into the bloodstream. A summarization cell subscribes to `Transcript` and emits `Summary`. If you upgrade transcription to include confidence metadata, the summarizer doesn’t break; it ignores the extra fields. If you change the output entirely, the summarizer simply pauses until it receives a compatible format again.

The bloodstream enforces loose coupling while preserving traceability. It makes the system flexible without sacrificing clarity. In many architectures, you trade one for the other. Here, you get both.

Part of Cellular Graph Architecture