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 implementsSpecification
GENOME R1–R8 cryptographic primitivesCore
User challenge records against evidence sourcesP113
Source retraction registry with propagationP114
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 tiersP122–P124
Bulk ingestion and delta feed subscriptionsP123
Source provenance classification and confidence ceilingP124
Source integrity inspection (VPN/proxy/no-TLS)P124
Subscription and billing protocol (Artefact KV cache)P125
Dissent Signal EngineP126
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 perspectivesP37
Source overlap gate — collapses to mainstream when >80% shared sourcesP37
AIEP spec corpus — 130+ OS specs (P10–P300) in Vectorize semantic indexP122
IP protection at LLM synthesis layer — filed specs and trade secrets excluded from all LLM contextP277
Meta-query detection — corpus-building and self-assessment queries refused before retrievalP279
Commercial contamination gate — ad/affiliate/SEO rejection at retrievalP282
Query classification schema — 8-class taxonomy; admin/smalltalk fast-pathP279
Mode resolution engine — mode chip derived from evidence topology, not configP278
Vertical specialist modes — 7 domains; sources, confidence ceiling, citation format reconfigured per modeP280
HAIR injection protocol — governed evidence package only; 9-invariant system prompt; IP guardsP277
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.

PropertyPieaChatGPT (GPT-4o)ClaudeGeminiPerplexityCopilot
Source citations✓ full railpartial (web search)partial (some modes)partial (grounding)✓ URL list✓ URL list
Content hashing — tamper detection✓ SHA-256 per source
Cryptographic response commitmentresponse_hash R8
Response independently verifiable by third partyverify/: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 implementsSpecification
GENOME canonical artefacts on every contract eventP41
SHA-256 chain hash across evidence bundlesP80
Legal evidence report (self-contained, hash-verifiable)P41, P80
Edge-first architecture (Cloudflare Workers + D1 + R2)

→ Full Forecast specification


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 implementsSpecification
GENOME artefact on every identity mutationP41
Chain ledger with deterministic replayP80, P83
Divergence proof on every re-verificationP37
Time-bounded attestation recordsP46
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

→ Full QARDL specification


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 implementsSpecification
Content-hashed telemetry records on every pollP41
Divergence detection — staleness, error state, physical impossibility, temperature gatesP37
Negative Proof records — absence proven, not merely assertedP37
Append-only evidence ledger, chain-linked per recordP80
Execution governance — MANUAL / AUTONOMOUS mode enforcement before hardware dispatchP80
Full cycle replay — any decision reproducible from committed inputsP80
Open-source under Apache 2.0

→ Full specification and contributor guide · → GitHub


Open-source repositories — 22 implementations

RepositoryTestsLanguageSpecification
aiep-hub-validator✓ canon self-test + 6/6 V-checksTypeScriptP60–P63
aiep-genome-sdk115 passedPythonP01, P10, P14, P16
aiep-recall-substrate133 passedPythonP41, P83
aiep-divergence-proof129 passedPythonP37, P46
aiep-quantum-plausibility119 passedPythonP103
aiep-swarm-extended119 passedPythonP97, P98
aiep-dual-ledger122 passedPythonP80
aiep-moral-branch113 passedPythonP102
aiep-cognitive-pattern110 passedPythonP95, P96
aiep-self-model106 passedPythonP71, P72
aiep-swarm-consensus101 passedPythonP90, P91
aiep-chip-migration100 passedPythonP99, P100
aiep-goalvector100 passedPythonP50, P79
aiep-mirror106 passedPythonP60–P63
aiep-governance-chip-goal91 passedPythonP89
aiep-compliance87 passedPythonP92, P93
aiep-divergence-detector67 passedPythonP16
aiep-well-known66 passedPythonP60–P63
aiep-branch-surfacing63 passedPythonP94
aiep-normaliser62 passedPythonP10, P17
aiep-evidence-ledger46 passedPythonP01, 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

RepositorySourceDownload
aiep-hub-validatorrepos/aiep-hub-validator/zip
aiep-mirrorrepos/aiep-mirror/zip · wheel
aiep-evidence-ledgerrepos/ledger_v2/Request access
aiep-divergence-proofrepos/aiep-divergence-proof/Request access
aiep-recall-substraterepos/aiep-recall-substrate/Request access
aiep-dual-ledgerrepos/aiep-dual-ledger/Request access
aiep-moral-branchrepos/aiep-moral-branch/Request access
aiep-swarm-extendedrepos/aiep-swarm-extended/Request access
aiep-cognitive-patternrepos/aiep-cognitive-pattern/Request access
aiep-self-modelrepos/aiep-self-model/Request access
aiep-chip-migrationrepos/aiep-chip-migration/Request access
aiep-goalvectorrepos/aiep-goalvector/Request access
aiep-swarm-consensusrepos/aiep-swarm-consensus/Request access
aiep-governance-chip-goalrepos/aiep-governance-chip-goal/Request access
aiep-compliancerepos/aiep-compliance/Request access
aiep-quantum-plausibilityrepos/aiep-quantum-plausibility/Request access
aiep-branch-surfacingrepos/aiep-branch-surfacing/Request access
aiep-divergence-detectorrepos/aiep-divergence-detector/Request access
aiep-well-knownrepos/aiep-well-known/zip
aiep-normaliserrepos/aiep-normaliser/Request access
AIEP-GENOME-SDKrepos/AIEP-GENOME-SDK/zip · wheel