Skip to content

feat: graph diff between commits (git mind diff) #203

@flyingrobots

Description

@flyingrobots

Summary

git mind diff <ref-a>..<ref-b> — show what changed in the knowledge graph between two git commits.

Materialize the graph at two epoch ceilings, compute set differences on nodes and edges, report additions/removals/property changes.

Use cases

  • PR review: "What did this branch do to the knowledge model?"
  • CI gates: "Did this refactor increase orphan count?"
  • Observability: "How has the graph evolved over the last 10 commits?"

Foundation for

  • CI policies (fail on topology regression)
  • Review summaries
  • Trend metrics
  • Future provenance/timeline features

Technical approach

  • Two materialize({ ceiling }) calls via epoch system
  • Set diff on node/edge collections
  • CLI output + --json structured output
  • Formatter for human-readable diff

Acceptance criteria

  • git mind diff <ref-a>..<ref-b> produces accurate diff
  • --json output for CI consumption
  • Handles missing epochs (nearest ancestor fallback)
  • Tests with deterministic fixtures
  • CHANGELOG + GUIDE updated

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions