cordiverse/paper

A Programming Paradigm for Spatiotemporal Composability

What it solves

This project addresses the lack of formal foundations for dynamic composition in modern software, specifically for systems like plugin systems and self-evolving AI agent harnesses. It solves the problem of how to manage components that can be added or removed at runtime without leaving behind side effects (temporal composability) and how to manage dependencies between components reactively (spatial composability).

How it works

The project introduces the "context paradigm," which unifies two core mechanisms:

  1. Revertible Effects: Every change a component makes to the system context is tracked by the runtime, which holds an inverse operation to completely undo those changes when the component is removed.
  2. Reactive Coeffects: Components specify what they need from the context; the system then reactively activates or deactivates components based on these specifications.

These mechanisms are implemented in Cordis, a meta-framework that provides a core library for effect tracking and coeffect resolution, along with a declarative component loader that supports configuration reconciliation and hot module replacement.

Who it’s for

Software architects and developers building complex, dynamic systems such as plugin-based architectures or AI agent frameworks that need to ensure system stability when components are evolved or swapped at runtime.

Highlights

  • Spatiotemporal Composability: Combines the ability to revert side effects and reactively manage dependencies.
  • Context Paradigm: A unified discipline for mediating effects and coeffects through a single context type.
  • Cordis Framework: A practical implementation providing effect tracking and a declarative component loader.
  • Hot Module Replacement: Supports updating components without restarting the system.

Related

  • Project
  • Project
  • Project
  • Project
  • Project