Vyasa Context Syntax — engine handoff

Resolution semantics (the engine contract)URL copied

  1. Discover. Glob contexts=. Parse each @context header. Order by seq. Do not sort by filename (day10 must not sort before day2).
  1. Lazy-load. Load default_context on open. Load others on demand. Evict contexts not in use to bound browser memory. Each context is independent, so eviction is safe.
  1. Presence. A node appears in a context if and only if an @edges line in that context references it as a source or target. Nodes wired by no edge are absent (this is how pruning works — a superseded node is simply not wired in later contexts).
    • Discard-on-death-day (tombstone). A node is not dropped silently. On the one context where it is discarded, keep it wired by a supersedes edge from the node that replaces it, and mark it superseded in @attrs. The reader sees what is leaving and why. From the next context on, omit both the node and the edge.
  1. Attribute resolution. For each present node, start from kg.attrs (base), then merge the context's @attrs over it; the context wins on any key it sets. For status specifically, if the merged result assigns no status to a node, fall back to @status_defaults[kind].
  1. Render. Draw the present nodes and the context's edges. Apply the active view's group_by/color_by/filter. Nothing else; a context is a plain graph.
  1. Diff. "What changed between A and B" is computed by the engine as the set difference of nodes, edges, and resolved attributes between two loaded contexts. This is the navigation primitive, not a property stored in any context.