Skip to content

Add business diff policies, JSON Patch, and portable Agent Skill - #18

Merged
eggachecat merged 6 commits into
masterfrom
agent/json-patch-and-large-list-performance
Aug 16, 2026
Merged

Add business diff policies, JSON Patch, and portable Agent Skill#18
eggachecat merged 6 commits into
masterfrom
agent/json-patch-and-large-list-performance

Conversation

@eggachecat

@eggachecat eggachecat commented Aug 15, 2026

Copy link
Copy Markdown
Owner

What changed

  • add a versioned, JSON-serializable BusinessDiffPolicy API
  • add named rules for ignore, unordered arrays, identity matching, numeric tolerance, string normalization, expected change/existence, and ranges
  • add explain() with business-level counts, affected paths, matched pairs, and machine-readable violations
  • ensure identity matching does not hide child-field violations
  • generate and apply RFC 6902 patches with the same semantic rules used by diff
  • replace recursive LCS backtracking for large-list safety
  • ship the portable jycm-business-diff Agent Skill for Codex, Claude Code, and open Agent Skills clients
  • include deterministic policy validation/comparison and safe user/project installation scripts
  • document policy design, CI, service, UI, deployment, rollback, and operational safeguards

Why

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 passed
  • python -m flake8 jycm tests skills/jycm-business-diff/scripts
  • quick_validate.py skills/jycm-business-diff — valid
  • workflow script and project-scope installer exercised by regression tests

Closes #8.
Fixes #5.

@eggachecat eggachecat changed the title Add semantic JSON Patch support and iterative LCS backtracking Add declarative business diff policies and semantic JSON Patch Aug 15, 2026
@eggachecat eggachecat changed the title Add declarative business diff policies and semantic JSON Patch Add business diff policies, JSON Patch, and portable Agent Skill Aug 16, 2026
@eggachecat
eggachecat marked this pull request as ready for review August 16, 2026 15:41
@eggachecat
eggachecat merged commit 5b00f31 into master Aug 16, 2026
6 checks passed
@eggachecat
eggachecat deleted the agent/json-patch-and-large-list-performance branch August 16, 2026 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Applying a diff to a json Error trying to diff very large objects

1 participant