Add business diff policies, JSON Patch, and portable Agent Skill - #18
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
BusinessDiffPolicyAPIexplain()with business-level counts, affected paths, matched pairs, and machine-readable violationsjycm-business-diffAgent Skill for Codex, Claude Code, and open Agent Skills clientsWhy
JYCM already had powerful operators, but applications had to assemble them through runtime-specific configuration and manually interpret event dictionaries. This change adds a portable policy contract and an executive summary suitable for CI, audit logs, dashboards, and cross-language services.
The unordered-list final comparison also previously used identity matches as the final equality score. A matching key could therefore hide a failed child-field rule. Identity now controls pairing only; child comparisons control equality.
The Agent Skill makes the same workflow reusable by coding agents: derive rules from explicit business examples, validate positive and negative fixtures, verify Patch semantically, integrate the viewer, and deploy with guardrails.
Developer impact
Existing constructors and legacy rule shapes remain supported. New applications can store one policy as JSON, use it in Python and JavaScript, inspect named violations, and generate a consistent JSON Patch. Teams can install the bundled Skill user-wide or commit it at project scope; existing installations are backed up before forced replacement.
Validation
python -m pytest -q— 44 passedpython -m flake8 jycm tests skills/jycm-business-diff/scriptsquick_validate.py skills/jycm-business-diff— validCloses #8.
Fixes #5.