Metadata-Version: 2.4
Name: cocapn-explain
Version: 0.2.1
Summary: Explainability traces for agent decisions — trace format, decision trees, human-readable summaries
Author-email: Oracle1 <oracle1@cocapn.ai>
License: MIT
Project-URL: Homepage, https://github.com/cocapn/plato-provenance
Keywords: explainability,agent,cocapn,xai,trace
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# 🔍 cocapn-explain

Agent explainability — decision traces, oversight queue, P0/P1/P2 review gates.

## Install

```bash
pip install cocapn-explain
```

## What It Does

Makes agent decisions inspectable and auditable. Every tile submission gets a trace that records the reasoning chain, confidence score, and gate outcome.

### Key Features

- **ExplainTrace** — Records every step of an agent decision
- **Oversight Queue** — P0/P1/P2 priority review for sensitive operations
- **Decision Audit** — Replay any past decision with full context
- **Gate Compliance** — Verifies decisions meet deadband protocol gates

### Usage

```python
from cocapn_explain import ExplainTrace, OversightQueue

trace = ExplainTrace(agent_id="oracle1", task="tile_submit")
trace.add_step("check_confidence", value=0.92)
trace.add_step("p0_gate", outcome="accepted")

queue = OversightQueue()
queue.submit(trace)
```

## Part of the Cocapn Fleet

- [deadband-protocol](https://github.com/cocapn/deadband-protocol) — P0/P1/P2 safety gates
- [plato-provenance](https://github.com/cocapn/plato-provenance) — Zero-trust tile provenance
- [plato-tile-spec](https://github.com/cocapn/plato-tile-spec) — Tile specification

## License

MIT
