Metadata-Version: 2.4
Name: deepsigma
Version: 2.1.3
Summary: DeepSigma Core - Drift to Patch governed execution
Author-email: Bryan David White <8ryanWh1t3@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/8ryanWh1t3/DeepSigma
Project-URL: Repository, https://github.com/8ryanWh1t3/DeepSigma
Project-URL: Issues, https://github.com/8ryanWh1t3/DeepSigma/issues
Keywords: governance,coherence-ops,drift-patch
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: jsonschema
Requires-Dist: referencing>=0.35.0
Requires-Dist: pyyaml>=6.0
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Requires-Dist: ruff; extra == "dev"
Requires-Dist: pyright; extra == "dev"
Requires-Dist: pre-commit; extra == "dev"
Provides-Extra: excel
Requires-Dist: openpyxl>=3.1.0; extra == "excel"
Dynamic: license-file

[![CI](https://github.com/8ryanWh1t3/DeepSigma/actions/workflows/ci.yml/badge.svg)](https://github.com/8ryanWh1t3/DeepSigma/actions/workflows/ci.yml)
[![PyPI](https://img.shields.io/pypi/v/deepsigma)](https://pypi.org/project/deepsigma/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](./LICENSE)
[![Python 3.10+](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://www.python.org/downloads/)
[![Coherence Score](https://img.shields.io/badge/coherence-90%2F100-brightgreen)](./docs/metrics.md)
[![Authority Coverage](https://img.shields.io/badge/authority_coverage-100%25-brightgreen)](./enterprise/release_kpis/authority_evidence.json)
[![Drift Density](https://img.shields.io/badge/drift_density-0.0000-brightgreen)](./enterprise/release_kpis/KPI_GATE_REPORT.md)
[![Memory Coverage](https://img.shields.io/badge/memory_coverage-1.0-brightgreen)](./enterprise/release_kpis/KPI_GATE_REPORT.md)
[![version](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/8ryanWh1t3/DeepSigma/main/docs/badges/version.json)](https://github.com/8ryanWh1t3/DeepSigma)
[![LOC](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/8ryanWh1t3/DeepSigma/main/docs/badges/loc.json)](./docs/telemetry.json)
[![tests](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/8ryanWh1t3/DeepSigma/main/docs/badges/tests.json)](./tests/)
[![EDGE](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/8ryanWh1t3/DeepSigma/main/docs/badges/edge.json)](./edge/)
[![workflows](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/8ryanWh1t3/DeepSigma/main/docs/badges/workflows.json)](./.github/workflows/)

**[System Architecture](./enterprise/docs/mermaid/01-system-architecture.md)** | **[Feature Catalog](./enterprise/docs/FEATURE_CATALOG.md)** | **[TEC Summary](./enterprise/release_kpis/TEC_SUMMARY.md)** | **[KPI Standards Overlay](./docs/kpi_standards_overlay.md)**

# DeepSigma

**DeepSigma prevents decision amnesia in AI systems.**

Log every agent decision. Detect when it drifts. Prove what happened.

## Quickstart

```bash
pip install deepsigma

# Log an agent decision
coherence agent log decision.json

# Audit all logged decisions
coherence agent audit --json

# Coherence score
coherence agent score
```

## 60-Second Proof

```bash
coherence demo
```

```
BASELINE   90.00 (A)
DRIFT      85.75 (B)   red=1
PATCH      90.00 (A)   patch=RETCON  drift_resolved=true
```

Three states, deterministic every run:
1. **BASELINE** — sealed episode, coherence scored
2. **DRIFT** — data changed, drift detected automatically
3. **PATCH** — governed retcon applied, coherence restored

Machine-readable: `coherence demo --json`

## What It Does

DeepSigma is the institutional memory layer that makes AI decisions reconstructable.

Every agent decision becomes a sealed, hash-chained episode. Drift between decisions is detected automatically across 8 types. Authority is captured cryptographically, not implied. The full "why" is retrievable in under 60 seconds.

> In practice:
> - the "why" is retrievable (not tribal)
> - authority is explicit (not implied)
> - changes are patched, not overwritten
> - drift is detected early and corrected consistently

## Editions

One product line, one version, two editions:

- **CORE edition:** minimal, demo-first, deterministic (`pip install deepsigma`)
- **ENTERPRISE edition:** extended adapters, dashboards, and ops surfaces (repo-native under `enterprise/`)

Edition boundary ledger: `EDITION_DIFF.md`

## Operating Modes

### Core Mode

Use Core mode when you need fast adoption and low cognitive load.

Active Core surface at repo root:

- `run_money_demo.sh`
- `src/core/`
- `docs/examples/demo-stack/`
- `tests/test_money_demo.py`

### Enterprise Mode

Use Enterprise mode when you need connectors, dashboards, extended security, broader telemetry, and integration-heavy workflows.

Dependency note:
- `pip install "deepsigma[enterprise]"` installs enterprise runtime extras used by telemetry/radar tooling.
- Full enterprise code surfaces are repository-native under `enterprise/` and are run from source in this repo.

Enterprise surfaces are first-class under:

- [`enterprise/README.md`](enterprise/README.md)

Examples of parked modules:

- `enterprise/dashboard/`
- `enterprise/docker/`
- `enterprise/release_kpis/`
- `enterprise/schemas/`
- `enterprise/scripts/`
- `enterprise/src/` (non-core packages)
- `enterprise/docs/` (full enterprise docs)

Run the enterprise wedge:

```bash
make enterprise-demo
make test-enterprise
```

## Primitive Loop: CERPA

**Claim -> Event -> Review -> Patch -> Apply**

CERPA is the foundational adaptation loop for the platform. Every governance flow — across IntelOps, ReOps, FranOps, AuthorityOps, and ActionOps — follows this cycle:

1. **Claim** — an asserted truth or commitment
2. **Event** — an observable occurrence
3. **Review** — evaluate the claim against the event
4. **Patch** — corrective action if drift is detected
5. **Apply** — execute the patch and update state

```bash
python -m src.core.examples.cerpa_contract_demo
python -m src.core.examples.cerpa_agent_supervision_demo
```

## Release Artifacts

Build both edition artifacts from one version line:

```bash
make release-artifacts
```

Outputs in `dist/`:
- `deepsigma-core-vX.Y.Z.zip`
- `deepsigma-enterprise-vX.Y.Z.zip`

## Full Platform References

For the full-platform docs and architecture map, use parked docs directly:

- `enterprise/docs/positioning/positioning_manifesto.md`
- `enterprise/docs/positioning/executive_briefing_one_page.md`
- `enterprise/docs/release/`
- `enterprise/docs/security/`
- `enterprise/docs/mermaid/`

<!-- REPO_STATS_START -->
**Repo Snapshot** (auto-generated 2026-03-07 04:23 UTC)

- **1,732** files | **318,085** lines of code
- **41** CI workflows | **163** test files | **5** pyproject.toml
- **21** EDGE modules

LOC by extension:
  `.py` 105,380
  `.html` 59,838
  `.json` 56,166
  `.md` 47,787
  `.svg` 28,054
  `.jsonl` 5,278
  `.tsx` 2,942
  `.ttl` 2,804
  `.patch` 1,438
  `.ts` 1,244
<!-- REPO_STATS_END -->

## Repo Intent

- Keep root focused on a reliable first proof.
- Keep enterprise depth available without deleting capability.
- Expand from Core into Enterprise intentionally, not by drift.

## License

[MIT](LICENSE)
