Reference Implementations
Piea — the complete AIEP architecture in production
Piea is an enterprise AI assistant built from scratch on the full AIEP Piea Surface (P116–P128). It is not a subset implementation. It is a production system running GENOME R1–R8, streaming live evidence artefacts over SSE, committing every response as a response_hash, archiving dissent records as governed ledger artefacts, replaying reasoning chains step by step, and detecting semantic ambiguity to answer both valid interpretations with shared evidence.
The current build adds a three-perspective synthesis engine (mainstream · alternative · outlier) with pairwise Jaccard divergence scoring, a source overlap gate that collapses co-sourced perspectives to prevent fabricated disagreement, and a spec corpus — over 130 published AIEP OS specifications (P10–P300) harvested into a Vectorize semantic index — giving Piea authoritative grounding in its own published architecture.
Piea is the proof that the AIEP architecture is complete, coherent, and powerful enough to build production systems on.
| What Piea implements | Specification |
|---|---|
| GENOME R1–R8 cryptographic primitives | Core |
| User challenge records against evidence sources | P113 |
| Source retraction registry with propagation | P114 |
| Substrate continuity (Durable Objects, multi-channel) | P116 |
| Parametric unburdening — evidence window qualification (P117 JSON gate on live fetch) | P117 |
| Session memory and identity substrate (verify/:hash) | P118 |
| Multimodal document ingestion (PDF, DOCX, plain text) | P119 |
| Governed file output (signed Markdown audit pack) | P120 |
| Computer-use execution surface (governed actions) | P121 |
| Authoritative Open Data Source Registry (AODSR) | P122 |
| Live evidence retrieval with confidence tiers | P122–P124 |
| Bulk ingestion and delta feed subscriptions | P123 |
| Source provenance classification and confidence ceiling | P124 |
| Source integrity inspection (VPN/proxy/no-TLS) | P124 |
| Subscription and billing protocol (Artefact KV cache) | P125 |
| Dissent Signal Engine | P126 |
| Replayable Reasoning Chain (5-step, SSE-streamed, persisted) | P127 |
| Semantic Branch Detection (both interpretations, shared evidence) | P128 |
| Multi-model role selection (per-perspective provider/model config) | P127 |
| Three-perspective synthesis engine (mainstream · alternative · outlier) | P37, P126 |
| Pairwise Jaccard divergence scoring across all perspectives | P37 |
| Source overlap gate — collapses to mainstream when >80% shared sources | P37 |
| AIEP spec corpus — 130+ OS specs (P10–P300) in Vectorize semantic index | P122 |
| IP protection at LLM synthesis layer — filed specs and trade secrets excluded from all LLM context | P277 |
| Meta-query detection — corpus-building and self-assessment queries refused before retrieval | P279 |
| Commercial contamination gate — ad/affiliate/SEO rejection at retrieval | P282 |
| Query classification schema — 8-class taxonomy; admin/smalltalk fast-path | P279 |
| Mode resolution engine — mode chip derived from evidence topology, not config | P278 |
| Vertical specialist modes — 7 domains; sources, confidence ceiling, citation format reconfigured per mode | P280 |
| HAIR injection protocol — governed evidence package only; 9-invariant system prompt; IP guards | P277 |
| Multi-tenancy, RBAC (5 roles), per-tenant evidence ledger | — |
| OIDC/SAML SSO — Google, Microsoft Entra, Okta, Cloudflare Access | — |
| Data connectors — PostgreSQL, MySQL, REST, SharePoint, S3/R2, CSV → Evidence Ledger | — |
| Dual D1 ledger — PIEA_LEDGER (32 migrations) + PIEA_LEDGER_AUDIT (append-only) | P80 |
How Piea compares to standard AI assistants
Every major AI assistant — ChatGPT, Claude, Gemini, Copilot, Perplexity — uses a large language model. That is not a differentiator. The differentiator is what wraps the generation: the evidence substrate, the commitment primitives, the failure modes when evidence is absent. Piea is built on a different foundation.
| Property | Piea | ChatGPT (GPT-4o) | Claude | Gemini | Perplexity | Copilot |
|---|---|---|---|---|---|---|
| Source citations | ✓ full rail | partial (web search) | partial (some modes) | partial (grounding) | ✓ URL list | ✓ URL list |
| Content hashing — tamper detection | ✓ SHA-256 per source | ✗ | ✗ | ✗ | ✗ | ✗ |
| Cryptographic response commitment | ✓ response_hash R8 | ✗ | ✗ | ✗ | ✗ | ✗ |
| Response independently verifiable by third party | ✓ verify/:hash endpoint | ✗ | ✗ | ✗ | ✗ | ✗ |
| Governed dissent when evidence is insufficient | ✓ ledger artefact | ✗ | ✗ | ✗ | ✗ | ✗ |
| Replayable reasoning chain | ✓ 5-step, stored | ✗ | ✗ | ✗ | ✗ | ✗ |
| Source integrity inspection (VPN/proxy/no-TLS) | ✓ | ✗ | ✗ | ✗ | ✗ | ✗ |
| Source provenance tier enforcement | ✓ 5-class ceiling | ✗ | ✗ | ✗ | ✗ | ✗ |
| Multi-perspective synthesis with divergence scoring | ✓ Jaccard P37 | ✗ | ✗ | ✗ | ✗ | ✗ |
| Source overlap gate (prevents fabricated disagreement) | ✓ | ✗ | ✗ | ✗ | ✗ | ✗ |
| Semantic branch detection (ambiguous queries answered both ways) | ✓ P128 | ✗ | ✗ | ✗ | ✗ | ✗ |
| Commercial contamination rejection | ✓ 3-layer gate | ✗ | ✗ | ✗ | ✗ | ✗ |
| Source retraction propagation to historical sessions | ✓ P114 | ✗ | ✗ | ✗ | ✗ | ✗ |
| Dual append-only audit ledger | ✓ D1 dual-ledger | ✗ | ✗ | ✗ | ✗ | ✗ |
| Architecture-grounded spec corpus in retrieval index | ✓ 130+ OS specs | ✗ | ✗ | ✗ | ✗ | ✗ |
| Internal database sources treated identically to web sources | ✓ P122 connectors | ✗ | ✗ | ✗ | ✗ | ✗ |
The absence of a cryptographic commitment is not a design choice by competitors — it is an architectural impossibility for prediction-based systems. A model that outputs tokens cannot, by definition, commit to a hash of what sources it used, because it does not have sources in the structural sense Piea does. Perplexity lists URLs; it does not hash them, does not check their integrity, does not enforce confidence ceilings, and does not archive a governed record when they are insufficient. The gap is architectural.
→ Full Piea specification · → Try Piea at piea.ai
Forecast — construction management built on AIEP
Forecast is the first AIEP vertical SaaS — a full-stack construction project management platform where every legally significant event (instruction, variation, notice, snag, incident) is automatically committed to an evidence substrate backed by AIEP GENOME. Evidence is not a feature. It is a consequence of how the platform works.
| What Forecast implements | Specification |
|---|---|
| GENOME canonical artefacts on every contract event | P41 |
| SHA-256 chain hash across evidence bundles | P80 |
| Legal evidence report (self-contained, hash-verifiable) | P41, P80 |
| Edge-first architecture (Cloudflare Workers + D1 + R2) | — |
QARDL — AIEP proof of identity
QARDL is the first product to use AIEP as a proof-of-identity layer. Cryptographically verifiable professional identity cards for UK tradespeople, contractors, and regulated professionals. Every credential — a CSCS card, a Gas Safe registration, a Companies House number — is committed as a GENOME artefact, chain-linked, divergence-checked, and optionally attested under the AIEP governance protocol.
The QIC (QARDL Identity Code) is a machine-readable, GENOME-derived identity handle:
QARDL-USR-3a8f1c-7 (individual)
QARDL-ORG-b72d04-3 (company)
QARDL-AGT-c91f22-9 (AI agent — P118)
| What QARDL implements | Specification |
|---|---|
| GENOME artefact on every identity mutation | P41 |
| Chain ledger with deterministic replay | P80, P83 |
| Divergence proof on every re-verification | P37 |
| Time-bounded attestation records | P46 |
| 4-tier governance level (computed, not manual) | P89 |
Canonical mirror at /.well-known/aiep/mirror/{qic} | P134, P142, P144 |
| Agent-type entity identity (AGT QIC) | P118 |
AIEP Miner — governed compute proof-of-concept
AIEP Miner is an open-source reference implementation of the AIEP protocol applied to constrained hardware — a governed compute proof-of-concept. It connects to ASIC cryptocurrency miners and demonstrates that hardware operating in a well-defined, telemetry-rich environment can have every decision, every suppressed action, and every failure committed as tamper-evident evidence.
This is not a cryptocurrency product. It is a proof-of-concept exploring whether AIEP governance can operate at the hardware level. The goal is a general platform for governed compute environments — constrained, repurposed or distributed — and we are actively looking for developers to build it.
| What AIEP Miner implements | Specification |
|---|---|
| Content-hashed telemetry records on every poll | P41 |
| Divergence detection — staleness, error state, physical impossibility, temperature gates | P37 |
| Negative Proof records — absence proven, not merely asserted | P37 |
| Append-only evidence ledger, chain-linked per record | P80 |
| Execution governance — MANUAL / AUTONOMOUS mode enforcement before hardware dispatch | P80 |
| Full cycle replay — any decision reproducible from committed inputs | P80 |
| Open-source under Apache 2.0 | — |
→ Full specification and contributor guide · → GitHub
Open-source repositories — 22 implementations
| Repository | Tests | Language | Specification |
|---|---|---|---|
| aiep-hub-validator | ✓ canon self-test + 6/6 V-checks | TypeScript | P60–P63 |
| aiep-genome-sdk | 115 passed | Python | P01, P10, P14, P16 |
| aiep-recall-substrate | 133 passed | Python | P41, P83 |
| aiep-divergence-proof | 129 passed | Python | P37, P46 |
| aiep-quantum-plausibility | 119 passed | Python | P103 |
| aiep-swarm-extended | 119 passed | Python | P97, P98 |
| aiep-dual-ledger | 122 passed | Python | P80 |
| aiep-moral-branch | 113 passed | Python | P102 |
| aiep-cognitive-pattern | 110 passed | Python | P95, P96 |
| aiep-self-model | 106 passed | Python | P71, P72 |
| aiep-swarm-consensus | 101 passed | Python | P90, P91 |
| aiep-chip-migration | 100 passed | Python | P99, P100 |
| aiep-goalvector | 100 passed | Python | P50, P79 |
| aiep-mirror | 106 passed | Python | P60–P63 |
| aiep-governance-chip-goal | 91 passed | Python | P89 |
| aiep-compliance | 87 passed | Python | P92, P93 |
| aiep-divergence-detector | 67 passed | Python | P16 |
| aiep-well-known | 66 passed | Python | P60–P63 |
| aiep-branch-surfacing | 63 passed | Python | P94 |
| aiep-normaliser | 62 passed | Python | P10, P17 |
| aiep-evidence-ledger | 46 passed | Python | P01, P10, P14 |
Quick Install
Every Python repo ships with a pyproject.toml, zero runtime dependencies, and a unified CLI. All 19 packages install with the same 3-command flow:
# 1. Install from zip (no git clone needed)
pip install https://aiep.dev/downloads/repos/<name>-v<version>.zip
# 2. Verify LOCKFILE and Canon constants
<name> --self-test
# 3. Run as a module
python -m <pkg_name> --version
Example — install and run aiep-mirror (zero-friction):
# One-click install (pre-built wheel, no compiler needed)
pip install https://aiep.dev/downloads/repos/aiep_mirror-2.1.0-py3-none-any.whl
# OR install from source zip
pip install https://aiep.dev/downloads/repos/aiep-mirror-v2.1.0.zip
aiep-mirror init # auto-detect config
aiep-mirror build # build .well-known/aiep/
aiep-mirror verify # verify all hashes
All packages also expose python -m <pkg_name> --self-test for environments without PATH entry points.
Highlighted Repositories
aiep-hub-validator TypeScript v2.0.0
15-check endpoint validator for AIEP Mirror surfaces — pre-compiled, SSRF guard, zero runtime dependencies.
Validates a live .well-known/aiep/ surface against the full specification. 15 structural checks, JSON schema compliance, canonical hash field verification, SSRF guard. Pre-compiled — no build step needed.
# Validate a live mirror endpoint
node repos/aiep-hub-validator/dist/cli.js --site https://aiep.dev
# Validate this site's local build (generates v2 manifest first)
npm run validate:deep
# Run Canon kernel self-test
npm run validate:canon
Implements: P60 · P61 · P62 · P63 · Source: repos/aiep-hub-validator/ · Download zip
aiep-genome-sdk Python v1.2.0 — 115 tests
Two-command AIEP adoption for any Python project — init or adopt.
The Genome SDK bridges any Python project to the AIEP kernel. Two modes:
aiep-genome init— scaffold a brand-new AIEP-compliant project in one command (4 patterns:bare,evidence-ledger,mirror,governance)aiep-genome adopt— auto-detects your existing project structure and injects the genome layer with zero manual wiring
The frozen kernel (R1–R8 canon, I1–I6 invariant gates, P16 Negative Proof, CC-001–CC-005 constitutional constraints) ships as a pure-stdlib package with zero runtime dependencies.
# Fastest install (pre-built wheel)
pip install https://aiep.dev/downloads/repos/aiep_genome_sdk-1.2.0-py3-none-any.whl
# Or from source zip
pip install https://aiep.dev/downloads/repos/aiep-genome-sdk-v1.2.0.zip
# Start a new AIEP-compliant project
aiep-genome init my-service --name my-service --pattern evidence-ledger
# OR adopt an existing project (run inside it)
cd existing-project
aiep-genome adopt # auto-detects pattern
aiep-genome adopt --dry-run # preview without writing
aiep-genome verify # 6-check compliance audit
Implements: P01 · P10 · P14 · P16 · Source: repos/AIEP-GENOME-SDK/ · Download zip · Download wheel
aiep-mirror Python v2.1.0 — 106 tests
Builds and validates the AIEP .well-known/ machine-readable web surface.
Generates and validates the complete /.well-known/aiep/ directory structure from HTML source. Canon determinism self-test, policy hash verification (FC §§4), and capability hash binding (FC §§3) all verified. Zero-friction CLI: init auto-detects your framework’s build output; no flags required on subsequent builds.
# Fastest install (pre-built wheel)
pip install https://aiep.dev/downloads/repos/aiep_mirror-2.1.0-py3-none-any.whl
# Or from source zip
pip install https://aiep.dev/downloads/repos/aiep-mirror-v2.1.0.zip
# Zero-friction three-command workflow
aiep-mirror init # creates .aiep-mirror.json, auto-detects dist/out/_site
aiep-mirror build # reads config, outputs .well-known/aiep/
aiep-mirror verify # re-reads config, checks all canonical hashes
Implements: P60 · P61 · P62 · P63 · Source: repos/aiep-mirror/ · Download zip · Download wheel
aiep-evidence-ledger Python v2.0.0 — 46 tests
Deterministic, append-only, cryptographically anchored evidence ledger — foundational layer.
Ships with AIEP_v1.0.0_Canonical.json (a fully conformant reference artefact) and check_canon_determinism.py — proves canonicalisation produces a bit-identical hash across runs, environments, and Python versions.
aiep-evidence-ledger --self-test
python repos/ledger_v2/scripts/check_canon_determinism.py
python repos/ledger_v2/scripts/verify_sums.py
Implements: P01 · P10 · P14 · Source: repos/ledger_v2/ · Request access
aiep-recall-substrate Python v1.0.0 — 133 tests
Multi-cycle recall state substrate — highest test count in the stack.
Implements deterministic recall state management across multiple cycles with invariant-gated execution control. 133 tests cover recall admission, cycle tracking, and frontier management.
pip install https://aiep.dev/downloads/repos/aiep-recall-substrate-v1.0.0.zip
aiep-recall-substrate --self-test
Implements: P41 · P83 · Source: repos/aiep-recall-substrate/ · Download zip
aiep-divergence-proof Python v1.0.0 — 129 tests
Divergence detection and Negative Proof Integrity.
Implements the Negative Proof Integrity Commit (NPIC) scheme and environment attestation. Proves the Canon produces no false divergence signals and node fingerprints are stable across reboots.
pip install https://aiep.dev/downloads/repos/aiep-divergence-proof-v1.0.0.zip
aiep-divergence-proof --self-test
Implements: P37 · P46 · Source: repos/aiep-divergence-proof/ · Download zip
aiep-node TypeScript v1.0.0 — Hardware Substrate Demonstration
A locally runnable proof of the AIEP hardware governance architecture — power-governed reasoning, live evidence ingestion, dissent detection, and signed substrate migration.
Instantiates a full cryptographic substrate node in a zero-dependency Node.js/TypeScript runtime. ECDSA P-256 identity minted from WebCrypto on every boot, 15-second evidence ingestion cycle against four live legislative sources (legislation.gov.uk, bills.parliament.uk, eur-lex.europa.eu, api.congress.gov), four-state power governor with capability gating, negative proofs issued on every blocked operation, and sealAndMigrate() auto-triggered at State D. Live web dashboard at http://localhost:9001 via SSE.
npm install
npm start
# Open http://localhost:9001
# Or run the automated A→D→A power degradation demo:
POWER_DEMO=1 npm start
Implements: GB2519826.8 · P89 · P99 · P16 · P83 · GENOME R1–R8 · Available under evaluation licence · Full explainer · Hardware thesis
Running Tests Locally
All Python repos have zero runtime dependencies (stdlib only). Only pytest is needed for tests.
# Install pytest
pip install pytest
# Install a single repo from zip
pip install https://aiep.dev/downloads/repos/aiep-mirror-v2.1.0.zip
# Or install from source (editable mode)
pip install -e repos/aiep-mirror
# Run tests for one repo
cd repos/aiep-mirror
python -m pytest --tb=short -q
# Quick CLI self-check (all repos support this)
aiep-mirror --self-test
python -m aiep_mirror --self-test # module form
All 22 Repositories
| Repository | Source | Download |
|---|---|---|
| aiep-hub-validator | repos/aiep-hub-validator/ | zip |
| aiep-mirror | repos/aiep-mirror/ | zip · wheel |
| aiep-evidence-ledger | repos/ledger_v2/ | Request access |
| aiep-divergence-proof | repos/aiep-divergence-proof/ | Request access |
| aiep-recall-substrate | repos/aiep-recall-substrate/ | Request access |
| aiep-dual-ledger | repos/aiep-dual-ledger/ | Request access |
| aiep-moral-branch | repos/aiep-moral-branch/ | Request access |
| aiep-swarm-extended | repos/aiep-swarm-extended/ | Request access |
| aiep-cognitive-pattern | repos/aiep-cognitive-pattern/ | Request access |
| aiep-self-model | repos/aiep-self-model/ | Request access |
| aiep-chip-migration | repos/aiep-chip-migration/ | Request access |
| aiep-goalvector | repos/aiep-goalvector/ | Request access |
| aiep-swarm-consensus | repos/aiep-swarm-consensus/ | Request access |
| aiep-governance-chip-goal | repos/aiep-governance-chip-goal/ | Request access |
| aiep-compliance | repos/aiep-compliance/ | Request access |
| aiep-quantum-plausibility | repos/aiep-quantum-plausibility/ | Request access |
| aiep-branch-surfacing | repos/aiep-branch-surfacing/ | Request access |
| aiep-divergence-detector | repos/aiep-divergence-detector/ | Request access |
| aiep-well-known | repos/aiep-well-known/ | zip |
| aiep-normaliser | repos/aiep-normaliser/ | Request access |
| AIEP-GENOME-SDK | repos/AIEP-GENOME-SDK/ | zip · wheel |