Skip to main content

Applied Epistemic Engineering for Python

CI CodeQL Documentation License: MIT

An evidence-centered Python toolkit for turning important claims into inspectable engineering artifacts. It makes boundaries, evidence, provenance, uncertainty, contradictions, falsification tests, recovery work, and decision history explicit.

This is an original, ground-up ElectroHire implementation. Its result model aligns directly with ElectroHire's Spec Kit Evaluator Contract while the domain engine remains independently packaged.

Why it exists

Ordinary validation asks whether an artifact is formatted correctly. AEE asks harder questions:

  • What exactly is being claimed?
  • Under what conditions does it hold?
  • What was observed, inferred, or merely asserted?
  • What evidence would prove the claim wrong?
  • Which claims depend on uncertain foundations?
  • What contradicts the current conclusion?
  • What bounded work would improve the decision?

The library does not call a confidence number “truth.” Every score is a transparent decision aid derived from recorded evidence and explicit rules.

Installation

pip install applied-epistemic-engineering

For development:

pip install -e ".[dev,docs]"

Five-minute example

from aee import (
    AEESession,
    ClaimKind,
    ClaimStatus,
    Evidence,
    EvidenceKind,
    SourceQuality,
)

session = AEESession(
    "checkout-service",
    phase="after_plan",
    ledger_file=".aee/epistemic-ledger.jsonl",
)

claim = session.add_claim(
    "REQ-PERF-001",
    "Checkout p95 latency remains below 300 ms",
    kind=ClaimKind.REQUIREMENT,
    boundary=["production", "nominal load", "30-minute observation window"],
    source_ref="spec.md#REQ-PERF-001",
)
claim.status = ClaimStatus.SUPPORTED
claim.falsification_tests.append("Observe p95 latency at or above 300 ms")

session.add_evidence(
    claim.id,
    Evidence(
        ref="reports/load-test-2026-09-04.json",
        kind=EvidenceKind.OBSERVED,
        source_quality=SourceQuality.TEST,
        source_id="load-test-2026-09-04",
        description="Observed p95 latency was 241 ms",
    ),
)

assessment = session.assess()
print(assessment.outcome, assessment.summary)

CLI

aee assess --input claims.json --phase after_plan --output assessment.json \
  --evaluator-output evaluator-result.json --ledger .aee/epistemic-ledger.jsonl

aee challenge --input claims.json --phase after_plan --output challenge.json
aee gaps --matrix specs/verification-matrix.md --evidence evidence/ --output GAPS.md
aee verify-ledger --ledger .aee/epistemic-ledger.jsonl
aee graph --input claims.json --output claim-graph.mmd
aee gate --input assessment.json
aee demo   # self-contained demonstration assessment

Exit codes are CI-friendly: 0 for pass/warn, 1 for iteration/clarification/evidence collection, and 2 for a hard block or invalid ledger.

Architecture

Layer Responsibility
aee Python package Claims, evidence, scoring, challenge, recovery, graph, ledger
spec-kit-aee Spec Kit commands, hooks, and artifact discovery
spec-kit-evaluator Shared result envelope, composition, reports, and model routing

Core principles

  1. Assertions never become observations because a model repeats them.
  2. Counterevidence and contradictions remain visible.
  3. Unsupported claims remain explicitly unsupported.
  4. Confidence propagates through dependencies by the weakest-link rule.
  5. Every failure produces a bounded recovery proposal with a verification condition.
  6. Deterministic checks run before probabilistic review.
  7. Hash chains establish tamper evidence—not truth, identity, or trusted time.

Documentation

Full documentation is configured for Read the Docs at applied-epistemic-engineering.readthedocs.io. Users adopting AEE from another implementation can follow the migration guide.

Ownership and license

Designed and implemented by ElectroHire Inc. Copyright © 2026 ElectroHire Inc. Released under the MIT License.

Metadata

Release files for applied-epistemic-engineering 1.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for applied-epistemic-engineering 1.0.4
File Size Uploaded
applied_epistemic_engineering-1.0.4.tar.gz 44.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for applied-epistemic-engineering 1.0.4
File Interpreter ABI Platform
applied_epistemic_engineering-1.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 81.5 kB

Release files / applied_epistemic_engineering-1.0.4.tar.gz

Download URL applied_epistemic_engineering-1.0.4.tar.gz
Size 44.5 kB
Tags Source
SHA-256 checksum
How to use checksums
04b3d8f5888d5d3f28b2a23969d9fdce36ae9183e7ccac09603c2d77e7ede86e
BLAKE2b-256 checksum
How to use checksums
359d1dfd641fc560f37b81b7be4c79cd1a21504e5ca8e7b164616f3efc84e197
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

Release files / applied_epistemic_engineering-1.0.4-py3-none-any.whl

Download URL applied_epistemic_engineering-1.0.4-py3-none-any.whl
Size 37.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2a9756f4dee4a8b629ed5e448e8f5b62885dab1db43bb5a0f17081bf6ab9c02d
BLAKE2b-256 checksum
How to use checksums
1c36fac0ba964f43cf5e41b43da5d981ae8c9c410653c6828ec7000606120d2f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

Release history Release notifications | RSS feed

1.4.0

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

This release

1.0.4 This release

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page