Metadata-Version: 2.4
Name: claim-plane
Version: 0.56.3
Summary: Execution control and semantic concurrency for autonomous coding agents.
Author: SkeinRank
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/SkeinRank/claim-plane
Project-URL: Repository, https://github.com/SkeinRank/claim-plane
Project-URL: Issues, https://github.com/SkeinRank/claim-plane/issues
Project-URL: Research Paper, https://arxiv.org/abs/2607.21909
Keywords: ai-agents,multi-agent,coordination,merge-conflicts,semantic-concurrency,continuous-integration,governance,code-generation
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: semantic
Requires-Dist: agent-lexicon<1.0,>=0.11.2; extra == "semantic"
Provides-Extra: signing
Requires-Dist: cryptography<48,>=42; extra == "signing"
Provides-Extra: dev
Requires-Dist: pytest<10,>=8; extra == "dev"
Requires-Dist: ruff==0.15.21; extra == "dev"
Requires-Dist: mypy<2.0,>=1.10; extra == "dev"
Requires-Dist: pre-commit<5.0,>=3.7; extra == "dev"
Requires-Dist: tomli<3.0,>=2.0.1; python_version < "3.11" and extra == "dev"
Dynamic: license-file

<div align="center">

# Claim Plane

**Deterministic execution control for concurrent coding agents**

Pre-write authority, semantic conflict detection, critical-path scheduling, isolated Git worktrees,
concurrent integration, and replayable verification — without requiring agents to negotiate with each other.

[![CI](https://github.com/SkeinRank/claim-plane/actions/workflows/ci.yml/badge.svg)](https://github.com/SkeinRank/claim-plane/actions/workflows/ci.yml)
[![PyPI](https://img.shields.io/pypi/v/claim-plane?label=pypi)](https://pypi.org/project/claim-plane/)
[![Python](https://img.shields.io/pypi/pyversions/claim-plane?label=python)](https://pypi.org/project/claim-plane/)
[![arXiv](https://img.shields.io/badge/arXiv-2607.21909-b31b1b)](https://arxiv.org/abs/2607.21909)
[![arXiv](https://img.shields.io/badge/arXiv-2608.00947-b31b1b)](https://arxiv.org/abs/2608.00947)
[![License](https://img.shields.io/badge/license-Apache--2.0-4c1)](LICENSE)

</div>

> **Technical Preview — 0.56.3.** APIs and evidence formats may change before 1.0.

---

## What problem does it solve?

Parallel coding agents are easy to launch and hard to coordinate. Two agents can produce changes
that are locally valid but incompatible when combined. A common answer is to let agents communicate
or place another model in the loop as a supervisor. That adds model calls, latency, and another
probabilistic decision-maker to the critical path.

Claim Plane separates **probabilistic planning** from **deterministic authority**.

Before mutation, each worker declares a `ChangeIntent`: files and, where Python structure is
available, symbols and regions it expects to touch. Claim Plane admits, orders, serializes, or denies
that work against the live repository state. Scope growth is re-admitted explicitly. After execution,
the actual diff is checked against the authority that was granted.

The coordination decision itself is local and model-free: it does not consume LLM tokens, and
identical authority inputs produce the same decision. Agents do not need an agent-to-agent
communication layer for admission.

---

## Results

Claim Plane has two public preprints. The confirmatory study used
**30 frozen CooperBench feature pairs × 3 coder seeds × 4 arms = 360 completed executions**.
Planner declarations were generated once and frozen across arms and seeds.

| Arm | Pair pass | Integration success | Executions serialized |
|---|---:|---:|---:|
| Unconstrained parallel | 23.3% | 65.6% | 0% |
| **Static admission** | **50.0%** | **96.7%** | 96.7% |
| Dynamic admission | 22.2% | — | 66.7% conflict / 13.3% clean |

Static admission improved pair pass by **+26.7 percentage points** with a paired task-cluster
bootstrap 95% CI of **9.6 to 60.0**. On conflict-labeled pairs, pair pass increased from
**6.7% to 60.0%**.

The important limitation is equally explicit: static admission recovered reliability largely by
serializing work. Dynamic admission was more selective but exposed scope-undercoverage failures.
The published study therefore establishes a reliability result, **not a wall-clock speedup claim**.
The current physical runner measures real overlap and wall time separately.

→ [Paper 1: Enforceable Change Intents and Dynamic Scope](https://arxiv.org/abs/2607.21909)  
→ [Paper 2: Reliability Gains and the Limits of Selective Concurrency](https://arxiv.org/abs/2608.00947)  
→ [Confirmatory reproduction](experiments/cooperbench/confirmatory_30x3/)  
→ [Public artifacts](https://huggingface.co/datasets/skeinrank/claim-plane-confirmatory-30x3)

---

## Engineering highlights

Claim Plane is not a swarm launcher. It is the control layer between planning, execution, integration,
and verification.

- **Transactional pre-write admission** — authority decisions are committed through SQLite with WAL,
  leases, and fail-closed conflict handling.
- **Same-file semantic concurrency** — independent Python symbols can be admitted concurrently instead
  of forcing unconditional file-level serialization.
- **Mutation-sensitive dependency reasoning** — an existing caller/callee edge is evidence, not an
  automatic serialization rule.
- **Continuous executor** — freed worker capacity is refilled immediately rather than waiting for a
  batch barrier.
- **Critical-path scheduling** — capacity-constrained runnable work is prioritized by downstream graph
  height with deterministic tie-breaking.
- **Concurrent single-writer integration** — integration remains serialized for repository safety while
  running concurrently with independent workers.
- **Isolated Git worktrees** — workers execute against separate repository states with targeted
  preflight checks and deterministic merge handling.
- **Actual-diff verification** — post-execution authority is re-derived from the staged result rather
  than trusting the worker's declared coordinates.
- **SCIP + AST code intelligence** — semantic resources, symbol identity, dependency evidence, and
  Python structural extraction feed the deterministic planner.
- **Recovery and evidence** — failed integration, stale state, acceptance mutation, and scope mismatch
  produce explicit findings rather than silent success.
- **Reproducible quality gates** — 700+ tests, Ruff, mypy, protocol checks, research-environment checks,
  and release-contract validation run in CI.

---

## Quick start

Claim Plane does not replace the coding agent. It controls authority around the session.

```bash
uv tool install claim-plane      # or: pipx install claim-plane
```

```bash
cd my-project
git switch -c agent/my-task

claim-plane init
claim-plane connect codex
claim-plane doctor
claim-plane codex --policy guarded
```

The agent still works through its normal interface. Claim Plane records the effective authority,
scope amendments, repository transitions, acceptance results, and final verification verdict.

→ [Five-minute walkthrough](docs/QUICKSTART.md) ·
[CLI reference](docs/CLI_REFERENCE.md) ·
[Troubleshooting](docs/TROUBLESHOOTING.md)

---

## How it works

```text
  Task
    │
    ▼
  ChangeIntent          files, symbols and regions declared before mutation
    │
    ▼
  Admission             deterministic authority decision
    │                   → parallel | ordered | serialized | denied
    ▼
  Scheduler             continuous runnable frontier + critical-path priority
    │
    ▼
  Execution             isolated Git worktrees
    │
    ├── Amendment       scope growth re-admitted against live state
    │
    ▼
  Integration           single-writer merge consumer, concurrent with workers
    │
    ▼
  Verification          actual staged diff re-checked against admitted authority
    │
    ▼
  Evidence              durable decision and repository-state record
```

### Design properties

**Fail closed.** Unknown overlap, unavailable code intelligence, ambiguous symbol ownership, and
failed restoration resolve conservatively rather than granting authority optimistically.

**Line shifts cannot forge authority.** Integration verification re-derives symbol ownership from
the actual post-image AST, so edits are not trusted merely because base-commit line coordinates moved.

**Semantic proofs survive to execution.** A validated same-file independence/commutativity decision
is propagated through shared admission instead of being collapsed back into file-level conflict.

**Dependency does not mean conflict.** Directed ordering is used where appropriate; unrelated or
commutative mutations can remain parallel.

**Planning metrics and runtime metrics are distinct.** Static `planned_*` concurrency values are kept
separate from measured worker overlap and `mean_active_workers`.

→ [Architecture](docs/ARCHITECTURE.md) ·
[Protocol](docs/PROTOCOL.md) ·
[Design rationale](docs/DESIGN_RATIONALE.md) ·
[Guarantees and trust boundaries](docs/GUARANTEES.md)

---

## Maturity

Claim Plane is an alpha coordination kernel with a deliberately explicit evidence boundary.

**Established in public, reproducible preprints**

- deterministic pre-write admission;
- conservative reliability gains on CooperBench;
- frozen planner declarations, seeds, hashes, and public reproduction artifacts.

**Implemented and tested, with physical evaluation still in progress**

- same-file symbol-level admission;
- dependency-aware mutation ordering;
- continuous worker execution;
- critical-path scheduling;
- concurrent single-writer integration;
- bounded scope amendment and pause/refresh/resume;
- physical overlap and wall-clock instrumentation;
- deterministic integration-time authority recheck.

**Not claimed yet**

- published wall-clock speedup from the physical runner;
- equal semantic depth across non-Python languages;
- multi-host authoritative storage;
- automatic task-graph generation from an unconstrained natural-language task.

---

## Limits and trust boundaries

- **Python-first semantics.** Other languages remain at file/declared-resource granularity unless an
  adapter supplies structured semantic resources.
- **Single-host authoritative storage.** Multi-host deployment needs a distributed registry, leases,
  and fencing beyond the current SQLite authority store.
- **Observation covers traced accesses only.** A bypassed access is outside the observed evidence.
- **Default tree isolation is not full host isolation.** Strict network and filesystem isolation
  requires a supported sandbox backend.
- **HMAC evidence is shared-secret authenticity**, not public-key identity or hardware attestation.
- **`runtime/` is a separate brokered research track.** Its fencing/attestation guarantees are not
  automatically active on the swarm path used by the concurrency experiments.
- **No lower total cost-to-clean-merge claim is made yet** for large real-world repositories.

---

## Repository map

```text
src/claim_plane/
  swarm/              admission, scheduling, concurrency, execution, merge, recovery
  core/               protocol models, registry, resource graph, authority primitives
  connectors/         agent enrollment and lifecycle adapters
  integration/        snapshots, verification, evidence and repair
  protocol/           versioned wire contracts and schemas
  code_intelligence/  SCIP IR, structural extraction and dependency graph
  runtime/            brokered execution boundary (separate research track)
  coordination/       pre-write admission and bounded context packs
  routing/ mcp/ git/  routing, MCP integration and Git boundaries

experiments/cooperbench/   paper reproductions, confirmatory and physical runners
benchmark/                 deterministic protocol and conformance harnesses
papers/                    citation metadata and reproduction links
docs/                      architecture, protocol, guarantees and operator guidance
schemas/                   public JSON Schemas
```

The core package has **zero mandatory runtime dependencies**. Optional extras provide semantic and
signing integrations. Python 3.10–3.13 is supported and the package ships `py.typed`.

```bash
git clone https://github.com/SkeinRank/claim-plane && cd claim-plane
pip install -e ".[dev]"

pytest -q
ruff check .
ruff format --check .
mypy src experiments/cooperbench
```

---

## Research

**Enforceable Change Intents and Dynamic Scope for Parallel Coding Agents**  
[arXiv:2607.21909](https://arxiv.org/abs/2607.21909) ·
[reproduction](experiments/cooperbench/paper_6pair/) ·
[BibTeX](papers/claim-plane-2026/citation.bib)

**Reliability Gains and the Limits of Selective Concurrency: A 30-Pair, Three-Seed Confirmatory Study**  
[arXiv:2608.00947](https://arxiv.org/abs/2608.00947) ·
[reproduction](experiments/cooperbench/confirmatory_30x3/) ·
[artifacts](https://huggingface.co/datasets/skeinrank/claim-plane-confirmatory-30x3) ·
[BibTeX](papers/claim-plane-confirmatory-2026/citation.bib)

## Citation

Software metadata: [`CITATION.cff`](CITATION.cff).

## License

Apache-2.0.
