Shape-Driven Orchestration and Declarative Causality

How processes activate through shape compatibility, replacing explicit control flow with structural resonance.

Grasp replaces call chains with shape compatibility. A process declares what shapes it consumes and what it produces. When matching data appears, the process can activate without being explicitly called.

Declarative Causality

Instead of “call Process B,” you say “Data of Shape X exists.” Processes that consume Shape X awaken. The graph is the schedule. This creates a system that is message-based without explicit messages and event-driven without explicit events.

Why This Scales

Example: File Ingestion

  1. You create a `Folder` node with a path.
  2. Query `files` to awaken a resolver.
  3. Resolver reads the filesystem and creates `File` nodes.
  4. Query `content` to read file contents.

No batch jobs, no orchestration logic. The graph grows as you ask.

The Shape Contract

Shapes act as contracts. If a process consumes `MarkdownFileShape` and produces `ParsedMarkdownShape`, it can activate whenever a matching node appears. This lets you build pipelines without explicit routing code.

Declarative Convergence

When you query a field, the system settles toward a stable state. If the inputs exist, outputs resolve. If not, the system waits. Repeated queries are idempotent; once resolved, the graph stabilizes until the structure changes.

Result

You get a reactive system that doesn’t rely on fragile event buses or imperative orchestration. Structure itself becomes causality.
Part of Graph-Structured Declarative Computing (Grasp)