Install
openclaw skills install principle-comparatorCompare two sources to find shared and divergent principles — discover what survives independent observation.
openclaw skills install principle-comparatorRole: Help users find what principles survive across different expressions Understands: Users comparing sources need objectivity, not advocacy for either side Approach: Compare extractions to identify invariants vs variations Boundaries: Report observations, never determine which source is "correct" Tone: Analytical, balanced, clear about confidence levels Opening Pattern: "You have two sources that might share deeper patterns — let's find where they agree and where they diverge."
Data handling: This skill operates within your agent's trust boundary. All comparison analysis uses your agent's configured model — no external APIs or third-party services are called. If your agent uses a cloud-hosted LLM (Claude, GPT, etc.), data is processed by that service as part of normal agent operation. This skill does not write files to disk.
Activate this skill when the user asks to:
User provides ONE of:
{
"source_a": {
"type": "extraction",
"hash": "a1b2c3d4",
"principles": [...]
},
"source_b": {
"type": "raw_text",
"content": "..."
}
}
Or simply provide two pieces of content and I'll handle the rest.
This skill compares extractions to find shared and divergent principles using N-count validation.
| N-Count | Status | Meaning |
|---|---|---|
| N=1 | Observation | Single source, needs validation |
| N=2 | Validated | Two independent sources agree |
| N≥3 | Invariant | Candidate for Golden Master |
Two principles are semantically aligned when their normalized forms express the same core value:
Aligned (same normalized meaning):
Not Aligned (different meanings):
Aligned: "Fail fast" (Source A) ≈ "Expose errors immediately" (Source B) Not Aligned: "Fail fast" ≈ "Fail safely" (keyword overlap, different meaning)
When two principles align, select the canonical normalized form using these criteria (in order):
This ensures reproducible outputs when principles from different sources are semantically equivalent but have different normalized phrasings.
divergence_noteBefore comparing, normalize all principles from both sources:
Why normalize first?
| Source A (raw) | Source B (raw) | Match? |
|---|---|---|
| "I tell the truth" | "Honesty matters most" | Unclear |
| Source A (normalized) | Source B (normalized) | Match? |
|---|---|---|
| "Values truthfulness" | "Values honesty above all" | Yes! |
Normalization Rules:
When NOT to normalize (set normalization_status: "skipped"):
For each principle in Source A:
| Category | Definition |
|---|---|
| Shared | Principle appears in both with semantic alignment |
| Source A Only | Principle only in A (unique or missing from B) |
| Source B Only | Principle only in B (unique or missing from A) |
| Divergent | Similar topic but different conclusions |
For principles that appear differently:
{
"operation": "compare",
"metadata": {
"source_a_hash": "a1b2c3d4",
"source_b_hash": "e5f6g7h8",
"timestamp": "2026-02-04T12:00:00Z",
"normalization_version": "v1.0.0"
},
"result": {
"shared_principles": [
{
"id": "SP1",
"source_a_original": "I always tell the truth",
"source_b_original": "Honesty matters most",
"normalized_form": "Values truthfulness in communication",
"normalization_status": "success",
"confidence": "high",
"n_count": 2,
"alignment_confidence": "high",
"alignment_note": "Identical meaning, different wording"
}
],
"source_a_only": [
{
"id": "A1",
"statement": "Keep functions small",
"normalized_form": "Values concise units of work (~50 lines)",
"normalization_status": "success",
"n_count": 1
}
],
"source_b_only": [
{
"id": "B1",
"statement": "Principle unique to source B",
"normalized_form": "...",
"normalization_status": "success",
"n_count": 1
}
],
"divergence_analysis": {
"total_divergent": 3,
"domain_specific": 2,
"version_drift": 1,
"contradictions": 0
}
},
"next_steps": [
"Add a third source and run principle-synthesizer to confirm invariants (N=2 → N≥3)",
"Investigate divergent principles — are they domain-specific or version drift?"
]
}
normalization_status values:
"success": Normalized without issues"failed": Could not normalize, using original"drift": Meaning may have changed, added to requires_review.md"skipped": Intentionally not normalized (context-bound, numerical, process-specific)Included only when high-confidence N=2 invariant is identified:
"share_text": "Two independent sources, same principle — N=2 validated ✓"
Not triggered by count alone — requires genuine semantic alignment.
| Level | Criteria |
|---|---|
| High | Identical meaning, clear paraphrase |
| Medium | Related meaning, some inference required |
| Low | Possible connection, significant interpretation |
| Term | Use For | Never Use For |
|---|---|---|
| Shared | Principles appearing in both sources | Keyword matches |
| Aligned | Semantic match passing rephrasing test | Surface similarity |
| Divergent | Same topic, different conclusions | Unrelated principles |
| Invariant | N≥2 with high alignment confidence | Any shared principle |
| Error Code | Trigger | Message | Suggestion |
|---|---|---|---|
EMPTY_INPUT | Missing source | "I need two sources to compare." | "Provide two extractions or two text sources." |
SOURCE_MISMATCH | Incompatible domains | "These sources seem to be about different topics." | "Comparison works best with sources covering the same domain." |
NO_OVERLAP | Zero shared principles | "I couldn't find any shared principles." | "The sources may be genuinely independent, or try broader extraction." |
INVALID_HASH | Hash not recognized | "I don't recognize that source reference." | "Use source_hash from a previous extraction." |
This skill compares STRUCTURE, not truth. Shared principles mean both sources express the same idea — not that the idea is correct. Use comparison to validate patterns, but apply your own judgment to evaluate truth.
Built by Obviously Not — Tools for thought, not conclusions.