Skip to main content

Structural codebase analysis — no parsers, no config, any language

Project description

quale

A CLI that tells you what to edit, what to test, and what to leave alone. Works on any language, no ASTs, no config.

Quickstart

pip install quale

cd my-project

# For Humans: Review your current changes
quale review

# For CI: Automated gates
quale ci check origin/main HEAD

# For LLM Agents: JSON-formatted safety packet
quale agent guard src/my_file.ts

That's it. One command tells you which files to read, which test to run, and what not to touch.

What it solves

Every LLM guesses the wrong test file path on a plain prompt. They all guess src/foo.test.ts when the test is in tests/foo.test.ts. This is a directory layout problem, not a model quality problem.

quale reads your repo's structure and gives the model what it's missing. 900+ trials across 12 repos and 7 model families: the wrong-path mistake is universal, and quale fixes it every time.

Persona-Driven Commands

Quale is organized into namespaces tailored for how you work:

🧑‍💻 For Human Developers (Top-Level)

Command What it does
quale review Single human review summary: blast radius, test gaps, hub risk, clones
quale onboard 3-step onboarding plan (landmarks, modules, safe directories)
quale refactor-cost path/to/file Estimate refactoring effort (blast + escape + clones + hub)
quale explore . Onboarding map: best files to read first

🤖 For LLM Agents (quale agent)

Agents shouldn't waste tokens memorizing flags. Commands in the agent namespace inherently return optimized JSON/IR output.

Command What it does
quale agent edit src/file.ts File-scoped edit context and risk card in JSON
quale agent guard src/file.ts Combined safety packet: guide + hub-risk + complexity
quale agent orient Token-optimized structural repo map

🚦 For CI Maintainers (quale ci)

Command What it does
quale ci init Generates a ready-to-use GitHub Actions YAML
quale ci check base head Runs structural CI gates (--fail-on-hub-risk, --fail-on-mirror-gap, etc)
quale ci comment base head Posts the PR structural report as a GitHub comment
quale ci trend Tracks CI metric trends over time

🔬 For Advanced Analysis (quale core)

Over 30 advanced mathematical and structural primitives (e.g., spectral-gap, heisenberg, capillary) are tucked away in the core namespace. See quale core --help for the full list.

How it works

Reads code as text. Splits on delimiters, counts phrase frequency per file, measures co-occurrence across files. Same pipeline for every language. Deterministic: same input, same output.

Limits

  • Useless on a new repo (no structure to measure)
  • Not a linter, coverage tool, or security scanner
  • Verification peaks around 80%. When the candidate set lacks the right test, quale says so

Further reading

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

quale-0.8.0.tar.gz (184.6 kB view details)

Uploaded Source

Built Distribution

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

quale-0.8.0-py3-none-any.whl (167.1 kB view details)

Uploaded Python 3

File details

Details for the file quale-0.8.0.tar.gz.

File metadata

  • Download URL: quale-0.8.0.tar.gz
  • Upload date:
  • Size: 184.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for quale-0.8.0.tar.gz
Algorithm Hash digest
SHA256 3094c0a914942e96a79488acd09950ddf32bde95f2a790e12d8b9fef4cdd1d08
MD5 4c2b6f8d4d2f30881963d56c9207ad7e
BLAKE2b-256 46e2e6f740beaf4786b532fe7d6c1b31147292a0b437d58c3b1d1a9a75b4574b

See more details on using hashes here.

File details

Details for the file quale-0.8.0-py3-none-any.whl.

File metadata

  • Download URL: quale-0.8.0-py3-none-any.whl
  • Upload date:
  • Size: 167.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for quale-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e0fea63d076c28db2aeb16645876020621c24c26b4ac4c48a36978afa97a00c3
MD5 bdd31f9b6e0da5cd5a896bfc91ad1980
BLAKE2b-256 fc76e546e918d3082159d2b8370cb76fb7c2bfb1d45369f8f7dace6b7b0c910c

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