Architecture Diagram
Engine Deep Dive
Metaplasma favors explicit, human-readable definitions. Below are canonical forms.
Sigil (canonical)
sigil:
id: room
type: object
properties:
label: "Misty Room"
mood: calm
relations:
connected_to: ["@hall"]
Relation Type
sigil:
id: connected_to
type: relation
properties:
directed: false # symmetric
symmetric: true
arity: 2
roles: [subject, object]
category: association
script: Scripts/connected_to.py # optional edge handler
Relation Instance (reified)
sigil:
id: transfer_001
type: relation_instance
properties:
relation: "@transforms_to"
roles:
subject: "@water"
object: "@steam"
timestamp: "2025-01-01T12:00:00Z"
tags: ["chemistry", "phase"]
relations:
instance_of: ["@transforms_to"]
Pulse Script (Python)
def handle(pulse: dict, src: str, rel: str, dst: str, api) -> dict:
# Example: mark the destination as "visited" and continue
api.graph.set_property(dst, "visited", True)
return {
"targets": None, # follow default: all outgoing from dst
"updates": {}, # or {dst: {"visited": True}}
"emit": []
}
Minimal Runtime API
# graph
api.graph.get_sigil(id)
api.graph.set_property(id, key, value)
api.graph.neighbors(id, rel=None)
api.graph.add_relation(a, rel, b)
api.graph.remove_relation(a, rel, b)
# pulse
await api.pulse.emit(origin, payload={})
# resolve / meta
api.resolve.resolve_ref("@room:label")
api.meta.log("info", "hello")
Core Primitives
- Sigils: canonical symbolic units, stored as YAML.
- Glyphs: properties of Sigils; values can reference other Sigils via
@sigil[:prop...]. - Relations: preposition-like connectors (e.g.,
in,part_of,causes), themselves Sigils. - Relation Instances: reified events with roles, metadata, and identity.
- Pulses: async waves that propagate along relations, executing relation scripts.
Structural Layers
- Hypergraph: in-memory adjacency of Sigils and relations.
- Metagraph: metadata (file paths, timestamps, authorship, schema).
- Hypermatrix: semantic coordinates enabling similarity and clustering.
Pulses
Pulses propagate wave-by-wave through outgoing relations. Relation scripts may update state, select next targets, or emit new pulses. A pulse never revisits the same Sigil twice.
> emit @origin payload:{ key: value }
> await wave // relation scripts handle edge-local logic
> continue // next frontier expands
Files & Directories
ROOT/*: engine defaults (read-only).User/*: project content (overrides & writes).Sigils/,Relations/,Scripts/,Commands/,Modules/ROOT/Utilities/: Windows tools (.exe/.bat/.cmd/.ps1/.py).User/Logs/: runtime pulse and change logs.