Diff Engine

Change comparison rules, severity, identity matching, or change correlation. Use when diffs look wrong, a capability needs a new ComparisonRule, or clustering/timeline is involved.

hoangsonww 2d657d4 1.1 KB Updated

File contents

Diff engine

The engine is generic. Capabilities declare ComparisonRule and ChangeSeverity on property descriptors. Do not add if capability == .docker branches.

  • ValueComparator is the only place two readings are judged "the same".
  • Identity matching is EntityIdentity (normalized value + kind + optional scope). Path identities use EntityIdentity.path.
  • diff(A, A) is empty. Reverse diffs swap added/removed counts. Property tests in Packages/DiffuseDiff/Tests and Tests/Invariants guard this.
  • Severity can escalate on a major version jump; do not special-case tools by name.
  • Correlation (ChangeCorrelator) groups by time window, not by inference.

Read Documentation/DiffEngine.md and Documentation/adr/0003-schema-driven-diff.md.

After changes: swift test --filter DiffuseDiffTests and swift test --filter DiffuseInvariantTests.

hoangsonww/diffuse-native-apps/tree/main/.agents/skills/diff-engine commit 2d657d498d

Frequently asked questions

npx skillmds@latest add hoangsonww/diff-engine