snapshot_diff
Compare two codebase metric snapshots side-by-side to see changes in node/edge counts and per-kind deltas. Provide two snapshot keys to get a full delta report.
Instructions
Compare two codebase metric snapshots side-by-side.
Returns the full metrics dict for both snapshots and a computed delta (b − a) covering node and edge counts, plus per-kind node count and per-relation edge count deltas.
Typical workflow::
# 1. List available snapshots — note the 'key' field in each entry
snapshot_list()
# 2. Diff any two using the key= field values
snapshot_diff(key_a="abc1234ef...", key_b="def5678ab..."):param key_a: First (older) snapshot key — the key field from
snapshot_list() output (a tree-hash string).
:param key_b: Second (newer) snapshot key — the key field from
snapshot_list() output (a tree-hash string).
:return: JSON object with keys a (metrics + issues list for key_a),
b (metrics + issues list for key_b), delta (b − a),
node_counts_delta, and edge_counts_delta. Returns an
error dict if either snapshot is missing.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key_a | Yes | ||
| key_b | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |