Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

CodeClone

Deterministic Structural Change Controller for AI-assisted Python development

PyPI Python Tests

CodeClone helps developers use AI coding agents without losing control of structural change. Before an agent edits code, it records the intended change, maps the structural blast radius, and establishes explicit edit boundaries. After the edit, it compares the real patch with the declared scope, verifies structural regressions, and leaves an auditable review receipt.

Every finding and every gate comes from deterministic repository facts — not an LLM opinion — shared across agents, human reviewers, IDEs, reports, and CI. CodeClone does not generate or rewrite source files.

Note: Features marked 2.1 alpha require the CodeClone 2.1 prerelease. Everything else works with the current stable release.

Quick start

Requires Python 3.10 or newer.

uvx codeclone@latest .              # analyze without installing
uvx codeclone@latest . --html --open-html-report

uv tool install codeclone           # install as a local tool
codeclone .

Record the accepted structural baseline once, then gate future changes against it in CI:

codeclone . --update-baseline
codeclone . --ci

The baseline separates new regressions from findings that already existed, so CI fails only on what the current change introduced.

What it provides

  • Structural Change Controller2.1 alpha: intent-first change control, blast radius, explicit edit boundaries, patch verification, and review receipts.
  • Baseline-aware governance — records accepted legacy debt and separates it from regressions introduced by the current change.
  • One canonical report — clones, complexity, coupling, cohesion, dead code, dependency cycles, a package/module dependency map (Module Map), public API inventory, coverage joins, and a guided finding-review queue, rendered through CLI, HTML, JSON, Markdown, SARIF, and CI from one payload.
  • Engineering Memory2.1 alpha: local, typed, evidence-linked project knowledge and reusable histories of prior controlled changes.
  • Agent coordination2.1 alpha: conflict-safe multi-agent intents, queues, recovery, and workspace hygiene.

CodeClone requires no hosted service or cloud account. Analysis state, controller state, Engineering Memory, and trajectories are stored locally.

MCP control surface and native clients

uv tool install --prerelease allow "codeclone[mcp]"
codeclone-mcp --transport stdio

The MCP server is read-only by contract: it never mutates source files, baselines, cache, or repository state. The same canonical structural facts back every client — VS Code, Cursor, Claude Code, Codex, and Claude Desktop.

Links

License

  • Code: MPL-2.0
  • Documentation: MIT

See LICENSES.md for the license scope map.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

codeclone-2.1.0a1.tar.gz (1.6 MB view details)

Uploaded Source

Built Distribution

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

codeclone-2.1.0a1-py3-none-any.whl (1.2 MB view details)

Uploaded Python 3

File details

Details for the file codeclone-2.1.0a1.tar.gz.

File metadata

  • Download URL: codeclone-2.1.0a1.tar.gz
  • Upload date:
  • Size: 1.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for codeclone-2.1.0a1.tar.gz
Algorithm Hash digest
SHA256 56eaa52deabecfdadcaaa351fc7fa647ffce133e8c5c31c98d9b029a593cd252
MD5 5cb8b3bd5132cb07971439c1733c4a1d
BLAKE2b-256 b19a5dc2231fa114808719527491b9e7bfd7dc79caf7f5029c91d27b5d2039e6

See more details on using hashes here.

Provenance

The following attestation bundles were made for codeclone-2.1.0a1.tar.gz:

Publisher: publish.yml on orenlab/codeclone

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file codeclone-2.1.0a1-py3-none-any.whl.

File metadata

  • Download URL: codeclone-2.1.0a1-py3-none-any.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for codeclone-2.1.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 4a1359d681742b3f8df74ac0c48c4d0ffa8b4f311aa4ecf5a970e9e54fefd2a5
MD5 2c3b456e9396163bfdcf07e0c7bae524
BLAKE2b-256 4d19d6e22192cff172b21125a7adbf35ad7bb28669a63916541d040d4f1ab840

See more details on using hashes here.

Provenance

The following attestation bundles were made for codeclone-2.1.0a1-py3-none-any.whl:

Publisher: publish.yml on orenlab/codeclone

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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