pramana-protocol
v1.3.0
Published
PRAMANA/1.0 — SHREEA Protocol Layers 3+4. Three strands. Four signals. Five levels. HBT PRB + kitchen_mask + TraversalResult + DomainBranchIndex types. Binary truth at every level.
Downloads
45
Maintainers
Readme
pramana-protocol
PRAMANA/1.0 — A Self-Verifying Cognition Protocol for AI-Native Service Universes
Named after Dharmakīrti's epistemological framework (c. 600–660 CE, Nalanda). Pramana = valid cognition.
The Problem
At 200+ AI services, capability registries decay into stale documentation. Services claim capabilities they no longer have. Knowledge bases contain rules that were never validated. Routing succeeds while cognition fails. Declaration without proof is hallucination at scale.
The Protocol
Three intertwined strands. Four signals. Five authenticity levels. One return signal that closes the loop.
Strand 1 — CAPABILITY What services exist and what they can do (AnkrCodex-compatible)
Strand 2 — KNOWLEDGE Domain rules — SHASTRA / YUKTI / VIVEKA (Knowledge Codex-compatible)
Strand 3 — PROOF Implementation matches declaration (CCA-compatible)Signal 1 — STATE What the service knows and can do
Signal 2 — TRUST What is authorised
Signal 3 — SENSE What is happening now
Signal 4 — PHALA Delivery outcome → returned to SOURCE RULE ← the novel signalPHALA closes the loop. Every delivery outcome returns to the rule that generated the answer — not the service log. Wrong outcomes trigger RCA. Correct outcomes reaffirm the rule. The system learns from every transaction.
Authenticity Markers
Every output carries a marker. Never a percentage. A binary checklist per strand.
| Level | Label | Action | |---|---|---| | PRAMANA-0 | UNVERIFIED | Mandatory human check — do not act | | PRAMANA-1 | SINGLE SOURCE | Verify independently. System explains which strand + why it answered. | | PRAMANA-2 | PARTIAL AUTHENTIC | Missing strand named explicitly. Proceed with caution. | | PRAMANA-3 | AUTHENTIC | All three strands confirmed. Reliable. | | PRAMANA-3+ | AUTHENTICATED + INFERRED | Full coverage + SLM inference. Highest confidence. |
Install
npm install pramana-protocolUsage
import {
STRAND, SIGNAL, PRAMANA_LEVEL,
getPramanaLevel, buildMarker,
PhalaPayload
} from 'pramana-protocol';
// Determine authenticity level from available strands
const level = getPramanaLevel(
[STRAND.CAPABILITY, STRAND.KNOWLEDGE], // proof strand missing
false // SLM not available
);
// → PRAMANA_LEVEL.PARTIAL_AUTHENTIC (2)
// Build a display marker for the output
const marker = buildMarker(
[STRAND.CAPABILITY, STRAND.KNOWLEDGE],
false,
'Proof strand unavailable — CCA not yet run for this service'
);
// → { level: 2, label: 'PRAMANA-2 — PARTIAL AUTHENTIC', strands_missing: ['proof'], ... }
// PHALA payload — fire on every delivery outcome
const phala: PhalaPayload = {
signal_type: 'phala',
rule_id: 'MAR-YK-007',
applied_by: 'mari8x-legal',
query_context: 'charter party clause, English law',
outcome: 'failure',
strands_available: [STRAND.CAPABILITY, STRAND.KNOWLEDGE],
strand_missing: [STRAND.PROOF],
authenticity_level: PRAMANA_LEVEL.PARTIAL_AUTHENTIC,
rca_triggered: true,
timestamp: new Date().toISOString()
};Reference Implementation
ANKR is Customer Zero — 200+ services running PRAMANA/1.0.
- AnkrCodex (capability registry) — Strand 1
- GRANTHX Knowledge Codex (5,336 rules, SHASTRA/YUKTI/VIVEKA) — Strand 2
- CCA Capability Closure Audit (174 services audited) — Strand 3
- PHALA signal wired across all services
Protocol Specification
Full RFC-style spec: PROTOCOL.md
Academic paper (Zenodo DOI: 10.5281/zenodo.19273330): PAPER.md
Built on Forja
PRAMANA is the cognition layer built on top of the Forja declaration protocol.
Forja = declaration protocol (what a service IS and can do)
PRAMANA = cognition protocol (whether that declaration holds under real usage)- Forja: rocketlang/forja-protocol
- Trust constants: ankr-trust-constants
Author
Capt. Anil Kumar Sharma PowerPbox IT Solutions Pvt Ltd [email protected]
DPIIT Registered Startup, Haryana, India
License
Apache 2.0 — see LICENSE
