Skip to main content

Structural code quality layer based on IIT 4.0

Project description

Phi47 Superpowers Layer

CI PyPI License: MIT

Structural code quality layer based on Integrated Information Theory (IIT 4.0). Works on top of any editor (VS Code, Cursor, Neovim) or LLM (Claude, GPT-4, Gemini). No vendor lock-in. Use your own API keys.

Install

pip install phi47-superpowers
pip install "phi47-superpowers[llm]"

Quick start

phi47 analyze mycode.py
phi47 analyze .
phi47 generate "Build a REST API" --output api.py
phi47 init

Diagnostic codes

Code Issue Severity
P001 Low system Phi error / warning
P002 Zombie function warning
P003 High cyclomatic complexity error / warning
P004 Low causal density info
P006 Disconnected class hint
P007 God function hint

Use as a library

from phi47 import Phi47Linter
linter = Phi47Linter()
for d in linter.lint_file("mycode.py"):
    print(d)

Scientific background

Phi47 applies spectral IIT 4.0 to dependency graphs: Phi = H(eigenvalues(C*C^T)) * (1 - e^(-k)) Runs in O(n^3) instead of exact O(2^n).

License

MIT License -- Copyright (c) 2025 Walter Calmels Von dem Knesebeck TUCH Systems Research Laboratory

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

phi47_superpowers-0.1.1.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

phi47_superpowers-0.1.1-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

Details for the file phi47_superpowers-0.1.1.tar.gz.

File metadata

  • Download URL: phi47_superpowers-0.1.1.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for phi47_superpowers-0.1.1.tar.gz
Algorithm Hash digest
SHA256 ca353bcf211122804cfe566d83231c2b5cd1a8c7bc2b1f831695c92cdce48cf4
MD5 f411b39223df5819cb5001e131217def
BLAKE2b-256 11197ecd1d8802f0d10759e774dfca154a32fcacc92cf812dcda840d7dd8c13c

See more details on using hashes here.

File details

Details for the file phi47_superpowers-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for phi47_superpowers-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 eff6b3212ca7ad35f07f9fc9aa95ff36f0a28d787f8e3c029ef075e269e274d7
MD5 51cfcd971388b6dfb642fae684dd26e1
BLAKE2b-256 46e9da28a848efd10aa55805f5037b29135e66ffa29b4a8adb26fc2e6b60f39f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page