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.0.tar.gz (11.2 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.0-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: phi47_superpowers-0.1.0.tar.gz
  • Upload date:
  • Size: 11.2 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.0.tar.gz
Algorithm Hash digest
SHA256 38d1f52a1b08d2055c16ac53bdacee4f3205c4490932e6c2415de50821dca23f
MD5 4d5a1e82bddad152b52f191ff2d028d2
BLAKE2b-256 02bfb01d913ee665127c10da3818aef5dd1fd1842960652d968d15ec10cb58b0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for phi47_superpowers-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d622f3d74bbd3c2a620435b8d947a73240c5de6405651d27e5f9ded060d37728
MD5 8aeb990fb566959aae25e1367dd29054
BLAKE2b-256 48cc55c36320d314fcffa8feb535d4c8b465ad89e60141d85d0e72bcb6e6e4e4

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