Skip to main content

Module diff

Module diff 

Source
Expand description

Two-ref structural diff types.

Diff is the engine-level response shape for Engine::diff(ref_a, ref_b, config). Consumers (LLM replay skills, PR-review UIs, pre-merge previews, snapshot comparisons, cross-mem reflection tools) all consume this one struct rather than re-walking git trees themselves.

Wire format is deterministic and stable so external tooling (memstead-mcp, memstead-cli, future Webhooks) can deserialise into the same types it serialises.

The rename-chain + ripple fields are motivated by the LLM-replay flow that consumes these diffs.

Structs§

Diff
Top-level diff response. Echoes the two refs the caller passed in (verbatim), reports the SHAs they resolved to, surfaces the configuration the operation used, and lists every per-entity entry.
DiffConfig
Caller-supplied diff configuration. Defaults yield a useful diff without requiring callers to opt in to every feature.
IncomingRipple
One entry in an entity’s incoming-wikilink ripple list. The referrer entity is on either ref_a or ref_b (side discriminates); consumers building a “what would break” preview consult both sides.

Enums§

EntityDiff
Per-entity diff entry. Variants mirror the change kinds an entity-level diff can produce; InvalidEntity is the soft-failure path for entities that fail to parse on either side (consumers decide how to handle each case — memstead_diff does not refuse the whole call just because one entity is malformed).