Software Poet Conscience — language-agnostic code aesthetic evaluation
Project description
eigenhelm
A conscience for agents, not an agent — language-agnostic code aesthetic evaluation sidecar.
Eigenhelm scores agent-generated code against mathematical aesthetic metrics derived from information theory, complexity science, and a PCA eigenspace trained on curated elite corpora. It runs alongside code-generating agents as a real-time quality signal.
Quick Start
Install
uv tool install eigenhelm
For the HTTP server:
uv tool install "eigenhelm[serve]"
Evaluate a file
eh evaluate path/to/file.py --model models/demo-python-v0.npz
Run the scoring server
eh serve --model models/demo-python-v0.npz --host 0.0.0.0 --port 8080
API example
curl -X POST http://localhost:8080/evaluate \
-H "Content-Type: application/json" \
-d '{"source": "def add(a, b):\n return a + b\n", "language": "python"}'
CLI Reference
All commands are available as eigenhelm <command> or eh <command>:
| Command | Description |
|---|---|
eh evaluate |
Evaluate source files against an eigenspace model |
eh train |
Train a new eigenspace model from a corpus directory |
eh inspect |
Inspect a saved model's metadata |
eh serve |
Run the evaluation HTTP server |
eh harness |
Run a statistical comparison harness across two code sets |
eh corpus |
Manage training corpora (sync from manifest) |
Run eh --help or eh <command> --help for details.
HTTP API
| Endpoint | Method | Description |
|---|---|---|
/health |
GET | Liveness probe |
/evaluate |
POST | Evaluate a code unit |
/evaluate/batch |
POST | Evaluate multiple code units |
Supported Languages
| Language | Extension |
|---|---|
| Python | .py |
| JavaScript | .js |
| TypeScript | .ts |
| Go | .go |
| Rust | .rs |
| Java | .java |
| C | .c |
| C++ | .cpp |
| Ruby | .rb |
| Swift | .swift |
Models
The bundled models/demo-python-v0.npz is a small demo model so you can run the full
pipeline without a hosted account. Production-grade models trained on curated elite corpora
are available via the hosted service or as a paid download.
Development Setup
git clone https://github.com/metacogdev/eigenhelm.git
cd eigenhelm
# Install with dev and serve dependencies
uv sync --extra dev --extra serve
# Run tests
uv run pytest
# Lint
uv run ruff check .
Architecture
eigenhelm/
├── virtue_extractor.py — Tree-sitter + Lizard → FeatureVector (69 dimensions)
├── critic/ — AestheticCritic: Birkhoff, entropy, compression metrics
├── eigenspace.py — EigenspaceModel: PCA projection, drift scoring
├── training/ — train_eigenspace(), save_model(), inspect_model()
├── helm.py — DynamicHelm: PID-controlled inference steering
└── serve.py — FastAPI HTTP evaluation server
Current Status
- 5-dim scoring: manifold drift, alignment, entropy, compression, NCD exemplar distance
- 5 languages: Python, JavaScript, TypeScript, Go, Rust — all discriminating (Cohen's d > 0.5)
- Human correlation: Spearman rho = 0.56 (p < 0.0001, n = 52)
- Calibrated thresholds: Models store empirical score distribution; accept/reject boundaries derived from training corpus percentiles (p25/p75)
License
eigenhelm is licensed under the GNU Affero General Public License v3.0.
Commercial Licensing
Looking to use eigenhelm in a proprietary SaaS or enterprise product without AGPL-3.0 obligations? A commercial license is available.
Contact us at licensing@eigenhelm.sh to discuss terms.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file eigenhelm-0.4.0.tar.gz.
File metadata
- Download URL: eigenhelm-0.4.0.tar.gz
- Upload date:
- Size: 1.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a9c035786a2d73e066e22a11fa0be980fec2a30150a645efa8a3d53918e6157c
|
|
| MD5 |
f4bd309a8e9926e4ea798ea17b3a5408
|
|
| BLAKE2b-256 |
a12eeeb6e3e4e05fbf697142bb5334166e6780c35637ee2cbc2137466f7b517f
|
Provenance
The following attestation bundles were made for eigenhelm-0.4.0.tar.gz:
Publisher:
publish.yml on metacogdev/eigenhelm
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
eigenhelm-0.4.0.tar.gz -
Subject digest:
a9c035786a2d73e066e22a11fa0be980fec2a30150a645efa8a3d53918e6157c - Sigstore transparency entry: 1127413221
- Sigstore integration time:
-
Permalink:
metacogdev/eigenhelm@3096a2ea52e3eca7e842b770b0512537012fa955 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/metacogdev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3096a2ea52e3eca7e842b770b0512537012fa955 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file eigenhelm-0.4.0-py3-none-any.whl.
File metadata
- Download URL: eigenhelm-0.4.0-py3-none-any.whl
- Upload date:
- Size: 1.4 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3badadfd5079dfc7fd92c1f5b70108d8005ed9ad410be2002033cd8083545a19
|
|
| MD5 |
d29b2d6e9ec364f4c9dc8c0f700a855a
|
|
| BLAKE2b-256 |
c370de564dc24e25a98b95a534e87e8dc53294515cd27ac99f5e670efa63a3a9
|
Provenance
The following attestation bundles were made for eigenhelm-0.4.0-py3-none-any.whl:
Publisher:
publish.yml on metacogdev/eigenhelm
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
eigenhelm-0.4.0-py3-none-any.whl -
Subject digest:
3badadfd5079dfc7fd92c1f5b70108d8005ed9ad410be2002033cd8083545a19 - Sigstore transparency entry: 1127413324
- Sigstore integration time:
-
Permalink:
metacogdev/eigenhelm@3096a2ea52e3eca7e842b770b0512537012fa955 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/metacogdev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3096a2ea52e3eca7e842b770b0512537012fa955 -
Trigger Event:
workflow_dispatch
-
Statement type: