Skip to main content

clarity-gate

Pre-ingestion verification for epistemic quality in RAG systems.

Core Question: "If another LLM reads this document, will it mistake assumptions for facts?"

Status

⚠️ v0.1.0 is a placeholder release to reserve the package name. Full validation is coming soon.

For working validators now, use the existing packages:

  • pip install cgd-validator
  • pip install sot-validator

Or use the Claude skill directly.


What It Does

Clarity Gate validates documents before they enter knowledge bases, ensuring:

  • Claims are properly marked as hypotheses vs. established facts
  • Projections have uncertainty markers
  • Assumptions are explicit, not buried
  • Data is internally consistent

Installation

pip install clarity-gate

CLI Usage

# Validate a Clarity-Gated Document
clarity-gate validate-cgd document.cgd

# Validate a Source of Truth file
clarity-gate validate-sot reference.sot

# Auto-detect format
clarity-gate check document.md

# Options
clarity-gate validate-cgd document.cgd --json      # JSON output
clarity-gate validate-cgd document.cgd --strict    # Treat warnings as errors

Programmatic Usage

from clarity_gate import validate_cgd, validate_sot, validate

result = validate_cgd("path/to/document.cgd")

if result.valid:
    print("Document passes all checks")
    print(f"RAG-ingestable: {result.metadata.rag_ingestable}")
else:
    for error in result.errors:
        print(f"[{error.rule}] {error.message}")

Document Formats

CGD (Clarity-Gated Document)

Documents that have been verified for epistemic quality:

  • YAML frontmatter with verification status
  • Epistemic markers inline (e.g., *(not specified)*)
  • HITL verification records
  • End marker: Clarity Gate: CLEAR | REVIEWED

SOT (Source of Truth)

Authoritative reference documents:

  • Strict structure requirements
  • Staleness tracking with markers: [STABLE], [CHECK], [VOLATILE]
  • Verified claims with citations

Specification

This validator implements:

Related Packages

Package Purpose
clarity-gate Unified validator (this package)
claritygate Alias → redirects here
cgd-validator Legacy CGD validator
sot-validator Legacy SOT validator

Links

License

CC-BY-4.0

Metadata

Release files for clarity-gate 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for clarity-gate 1.0.0
File Size Uploaded
clarity_gate-1.0.0.tar.gz 19.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for clarity-gate 1.0.0
File Interpreter ABI Platform
clarity_gate-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 44.2 kB

Release files / clarity_gate-1.0.0.tar.gz

Download URL clarity_gate-1.0.0.tar.gz
Size 19.1 kB
Tags Source
SHA-256 checksum
How to use checksums
ae0a30181cd47b4b9af5c5ece771c61dac8689e28c0fc6934440387eeaceed70
BLAKE2b-256 checksum
How to use checksums
155986d07deb3bed8a65d32da730e6649926ece63ab89e1e8f868d7632101554
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.2

Release files / clarity_gate-1.0.0-py3-none-any.whl

Download URL clarity_gate-1.0.0-py3-none-any.whl
Size 25.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
90bc2826a7dbe0a4889a3476befd6ca19d1836072a4d251528c0202db7261691
BLAKE2b-256 checksum
How to use checksums
5c91694536dcd61ee24eb0b1a28e766eaa50bbc2a4fdd4a45fab08e10323cdfb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.2

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page