diffing-policies

Compares two policy versions and classifies changes as relaxed, tightened, added, or removed.

1|Updated Jun 11, 2026
One-click install
npx skills add https://github.com/fianulabs/fianu-skills --skill diffing-policies-fianulabs
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: diffing-policies
Source: https://github.com/fianulabs/fianu-skills/tree/main/skills/diffing-policies
Command: npx skills add https://github.com/fianulabs/fianu-skills --skill diffing-policies-fianulabs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Reviewing changes to compliance policies by hand is error-prone: it is hard to tell whether a threshold edit relaxes or tightens a control, and variation arrays make naive diffs report false changes. This Skill produces a structured, classified diff of two policy or exception versions so reviewers see exactly what changed and in which direction. ## Core Features & Use Cases - Key-path comparison: Walks both policy YAML documents, captures before/after values at every leaf path, and treats missing keys as null. - Directional classification: Labels each change as threshold_relaxed, threshold_tightened, key_added, key_removed, value_changed_neutral, or unchanged, then computes an aggregate direction (net_relaxation, net_tightening, or neutral). - Variation-aware diffing: Matches policy variations by criteria identity rather than array position, and classifies effect and criteria changes (e.g. apply to exempt counts as a relaxation). - Use Case: When a ticket proposes lowering a coverage minimum from 0.8 to 0.5 and adding a branch minimum, the Skill outputs a change table plus the summary "Direction: net relaxation" for the approval workflow. ## Quick Start Ask the agent to diff the before and after versions of a Fianu policy YAML and summarize whether the changes relax or tighten compliance.

Frequently Asked Questions about diffing-policies

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I compare two versions of a compliance policy?▼

Walk both policy YAML documents key path by key path, capture before and after values at each leaf, and classify each change as relaxed, tightened, added, removed, or neutral. The result is a structured change list plus an aggregate direction summary.

How to tell if a policy change relaxes or tightens a control?▼

Check the key semantics: a decrease in a minimum or an increase in a maximum is a relaxation, while the inverse is a tightening. Effect changes from apply to exempt count as relaxation, and widened variation criteria also relax the control.

Why does a naive diff report false changes on policy variations?▼

Variations are an ordered array, so index-based matching reports spurious changes when a variation is inserted or reordered. Match variations by criteria identity (asset type, expressions, or index reference) instead, then diff each matched pair.

What does the aggregate direction in a policy diff mean?▼

Aggregate direction sums the classifications: net_relaxation when relaxed changes outnumber tightened ones, net_tightening for the reverse, and neutral when counts are equal or only adds/removes occurred. It surfaces as a one-line summary in analysis and approval workflows.

Can policy exceptions be diffed the same way as policies?▼

Yes, exception policies diff with the same method. Removing an exception variation with effect exempt counts as a tightening, because the affected assets return to the standard policy.