Does your AI-generated code actually do what you asked?
Project description
Converge
Does your AI-generated code actually do what you asked?
Converge validates AI-generated code against the original intent using three pillars:
| Pillar | Question |
|---|---|
| Intent Fidelity | Does the code do what was asked? |
| Optimal Design | Is this the most natural solution? |
| Code Consistency | Is the code internally coherent? |
Install
pip install converge
export ANTHROPIC_API_KEY=sk-...
Usage
from converge import ConvergeValidator
validator = ConvergeValidator()
result = validator.validate(code=my_code, intent=my_intent)
print(result)
# Converge — Iteration 1
# Verdict : ✅ CONVERGED
# Intent Fidelity : 92.0 (threshold 80)
# Optimal Design : 85.0 (threshold 80)
# Code Consistency: 88.0 (threshold 75)
if result.verdict != "CONVERGED":
improved_code = agent_iterate(result.feedback)
Iterative loop
from converge import ConvergeValidator, ConvergeLoop
loop = ConvergeLoop(ConvergeValidator(), max_iterations=5)
for result in loop.run(initial_code, intent, generate_fn):
print(result)
if result.verdict == "CONVERGED":
break
Verdicts
| Verdict | Meaning |
|---|---|
CONVERGED |
All 3 pillars above threshold — ship it |
PARTIAL |
2/3 pillars OK — iterate on feedback |
NON_CONVERGED |
Needs significant rework |
Without API key
Converge works offline using a fast syntactic analyser (no LLM calls).
Set ANTHROPIC_API_KEY for full LLM-powered validation.
License
MIT
Project details
Release history Release notifications | RSS feed
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 converge_ai-0.1.0.tar.gz.
File metadata
- Download URL: converge_ai-0.1.0.tar.gz
- Upload date:
- Size: 25.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3a971fb508dca8183db061c3ac8629051f51ce6e851aa0069c219956f4905407
|
|
| MD5 |
136f6c2c974f545366134127fb4b5312
|
|
| BLAKE2b-256 |
e63ff994a0ca579b67b839447717a50b3e07df49a88fa57d13db35838bf19d0f
|
File details
Details for the file converge_ai-0.1.0-py3-none-any.whl.
File metadata
- Download URL: converge_ai-0.1.0-py3-none-any.whl
- Upload date:
- Size: 21.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5dcc9098c77b1f9e3767375407198f74f6acbe4c5a3c8787b17f457ccce9bd22
|
|
| MD5 |
9e3e8d0cb728e0180fc4090fa2399518
|
|
| BLAKE2b-256 |
08b1d4afa1e5dc45ca50cae3ae00a03082bfe70c8548e8ebdb4eb52b1dc3b4fe
|