How Claude-Obsidian Enforces High-Risk Acceptance Claims with Independent Sources

Claude-Obsidian requires at least two independent supporting sources for any claim marked as accepted with high risk, validated through the validate_claim_ledger function in claude_obsidian/ledgers.py.

The open-source knowledge management system Claude-Obsidian maintains factual integrity through a rigorous validation pipeline. When contributors attempt to accept high-risk assertions, the system enforces a strict requirement for corroborating evidence from independent origins. This validation occurs against the claim ledger (wiki/meta/ledgers/claim-ledger.json) and protects the knowledge base from unverified or single-source dependencies.

The Three-Step Validation Pipeline for High-Risk Claims

The validation logic in claude_obsidian/ledgers.py processes high-risk acceptance claims through a sequential pipeline that ensures evidentiary rigor.

Step 1: Collecting Fresh Supporting Evidence

Before independence is assessed, the validator filters the claim's evidence to include only qualifying sources. The validate_claim_ledger function (lines [0112-0111]) checks that each supporting source:

  • Passes origin validation via _source_origin_is_valid
  • Maintains an active review status
  • Is not synthetic or stale (verified via source_is_stale)
  • Was retrieved on or before the claim's review date

Sources failing these criteria are excluded from the independence count.

Step 2: Grouping Sources by Independence

The helper function _independent_group_count (lines [0097-0106]) uses a union-find algorithm to collapse sources into equivalence classes based on shared identifiers. Sources are considered dependent (and grouped together) if they share any of the following:

  • Identical source ID
  • Identical origin (combination of kind and canonical locator)
  • Identical content SHA-256
  • Identical declared independence_key

This algorithm returns the number of distinct independent groups (lines [01013-01037]), ensuring that superficially different sources pointing to the same underlying content are counted as one.

Step 3: Enforcing the Two-Source Rule

After grouping, the validator applies the critical check (lines [0118-0126]):

if (
    assessment == "accepted"
    and risk == "high"
    and _independent_group_count(fresh_support) < 2
):
    _error(
        errors,
        f"{prefix}.evidence",
        "high-risk acceptance requires two independent sources",
    )

If fewer than two independent groups support the claim, validation fails and the error message "high-risk acceptance requires two independent sources" is recorded.

Practical Implementation Examples

The following examples demonstrate valid and invalid high-risk claim configurations using the Claude-Obsidian Python API.

Valid High-Risk Claim with Two Independent Sources

This example creates a high-risk claim supported by two distinct sources with different origins, content hashes, and independence keys:

from claude_obsidian.ledgers import validate_claim_ledger, empty_claim_ledger, empty_source_ledger

# Minimal source ledger with two distinct sources

source_ledger = empty_source_ledger()
source_ledger["sources"]["src-aaa111"] = {
    "origin": {"kind": "url", "locator": "https://example.com/report1"},
    "content_kind": "document",
    "title": "Report 1",
    "authority": "official",
    "content_sha256": "a"*64,
    "review_status": "active",
    "retrieved_at": "2024-01-15",
    "refresh_due": "2025-01-15",
    "independence_key": "report-1"
}
source_ledger["sources"]["src-bbb222"] = {
    "origin": {"kind": "url", "locator": "https://another.org/study"},
    "content_kind": "document",
    "title": "Study 2",
    "authority": "primary",
    "content_sha256": "b"*64,
    "review_status": "active",
    "retrieved_at": "2024-01-14",
    "refresh_due": "2025-01-14",
    "independence_key": "study-2"
}

# Claim that references both sources

claim_ledger = empty_claim_ledger()
claim_ledger["claims"]["clm-xyz123"] = {
    "text": "The new drug reduces mortality by 30 %.",
    "risk": "high",
    "assessment": "accepted",
    "confidence": "high",
    "location": {"path": "wiki/drug.md", "anchor": None},
    "reviewed_at": "2024-02-01",
    "evidence": [
        {"source_id": "src-aaa111", "relation": "supports"},
        {"source_id": "src-bbb222", "relation": "supports"},
    ],
}

# Validate – should return an empty error list

errors = validate_claim_ledger(claim_ledger, source_ledger)
assert not errors, errors

Invalid Configuration with Insufficient Independence

Removing one source demonstrates the validation failure:


# Re-use the same source ledger but remove the second source

del source_ledger["sources"]["src-bbb222"]

# Validation now raises the high-risk error

errors = validate_claim_ledger(claim_ledger, source_ledger)
print(errors[0]["message"])

# → high-risk acceptance requires two independent sources

Summary

  • High-risk acceptance claims in Claude-Obsidian must reference at least two independent sources before validation succeeds.
  • The validate_claim_ledger function in claude_obsidian/ledgers.py orchestrates this validation across three distinct phases: evidence filtering, independence grouping, and threshold enforcement.
  • Independence is determined by the _independent_group_count helper, which uses union-find to detect sources sharing IDs, origins, content hashes, or explicit independence keys.
  • Claims failing the two-source rule generate a specific validation error: "high-risk acceptance requires two independent sources".
  • This architecture prevents the knowledge base from accepting consequential assertions based on singular or duplicated evidence.

Frequently Asked Questions

What constitutes a "high-risk" claim in Claude-Obsidian?

A high-risk claim is any factual assertion stored in the claim ledger with the metadata field "risk": "high". This designation typically applies to statements with significant consequences if incorrect, such as medical, legal, or safety-critical information. When combined with "assessment": "accepted", the system triggers the two-independent-source requirement defined in claude_obsidian/ledgers.py.

How does Claude-Obsidian determine if two sources are independent?

The system evaluates independence through four equivalence criteria implemented in _independent_group_count: identical source IDs, identical origins (kind and locator), identical content SHA-256 hashes, or identical explicit independence_key values. Sources matching on any of these dimensions are grouped together and counted as a single unit of evidence.

Can a claim with three sources still fail validation?

Yes, if the three sources are not truly independent. For example, if two sources share the same content hash or origin, the union-find algorithm collapses them into one group, resulting in only two effective sources. If one of those is also dependent or excluded during freshness filtering, the total independent count may drop below the required threshold of two.

Where is the validation error logged when a high-risk claim fails?

Validation errors are returned by validate_claim_ledger as structured error objects containing the message "high-risk acceptance requires two independent sources". These errors prevent the claim from being persisted to wiki/meta/ledgers/claim-ledger.json until the evidence deficiency is resolved.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →