Harness-neutral phase-loop orchestration runtime and CLI
Project description
phase-loop-runtime
The harness-neutral phase-loop orchestration runtime and CLI. It drives the
roadmap → plan → execute workflow by dispatching each phase to whatever harness you
choose (Claude / Codex / Gemini / OpenCode); the runtime itself makes no model calls.
Part of the public agent-harness
monorepo (Apache-2.0).
Install
Most users should use the repo's installer (it also installs the workflow skills):
git clone https://github.com/ViperJuice/agent-harness
agent-harness/install-agent-harness.sh --harness claude
To install just this runtime package directly (e.g. as a pinned dependency):
# isolated tool install:
uv tool install "git+https://github.com/ViperJuice/agent-harness@v0.1.5#subdirectory=phase-loop-runtime"
# …or into the current environment:
pip install "git+https://github.com/ViperJuice/agent-harness@v0.1.5#subdirectory=phase-loop-runtime"
This exposes two console scripts — phase-loop and codex-phase-loop — both calling
phase_loop_runtime.cli:main. The canonical protocol document ships in the wheel as
package data and is also installed to share/phase-loop-runtime/protocol/protocol.md.
Roadmap validation
Lint a phase-plan roadmap spec (required headings, unique aliases, acyclic dependency DAG, IF-gate reconciliation, lane-count hints) via the always-installed runtime:
phase-loop validate-roadmap specs/phase-plans-v1.md
# module form — only when phase_loop_runtime is on the ACTIVE python's path (a pip
# install into your env); under `uv tool install` isolation use the console command:
python3 -m phase_loop_runtime.roadmap_lint specs/phase-plans-v1.md
Both wrap phase_loop_runtime.roadmap_lint (the single source of truth). Exit 0 =
clean; non-zero prints each issue on stderr.
Workflow skills bundle
The runtime also installs the harness-neutral workflow-skills bundle. The skill
sources live in the sibling phase-loop-skills/ directory,
with unprefixed base directories and optional _overrides/<harness>/ overlays.
phase-loop install --harness codex --source <path-to>/phase-loop-skills --symlink --dry-run
phase-loop install --harness codex --source <path-to>/phase-loop-skills --symlink --apply
Path resolution is provided by phase_loop_runtime.skill_paths, which keeps handoffs
repo-local, preserves harness-specific reflection roots, and documents the default
install roots for Claude, Codex, Gemini, and OpenCode.
Closeout ownership gate & operator break-glass
When a phase verifies green but the executor touched files outside the plan's declared
owned-files globs, the graduated closeout gate classifies the beyond-ownership
remainder (closeout_classifier.classify_unowned_path):
- SAFE classes (
docs,plans,handoffs,config_nonsource) auto-commit as a recordedsoftexception. - UNSAFE classes (
source,ci,secrets,lockfile) block withcloseout_scope_violation.
The operator escape is phase-loop run --phase <P> --closeout-allow-unowned "<reason>"
(also valid on resume/dry-run; reason required and non-empty; --phase required,
bounding the override to a single phase). It folds the source/ci/lockfile
remainder into the closeout commit as a recorded break_glass exception carrying the
reason. secrets are never break-glassable — a .env*/*.pem/secrets/** path
blocks regardless of the reason. See protocol.md → "Closeout Exceptions".
The closeout verdict is runner-authoritative: when the runner rejects a child's
closeout, the persisted terminal-summary.json reflects the runner's blocking verdict
(the child's self-reported complete/passed is not overlaid back), preventing a
stale "complete" summary from reconcile-skipping the work on the next run.
Conformance library (one library, two roles)
phase_loop_runtime.conformance is the named, stable, importable surface for the
deterministic .consiliency/ conformance evaluator. It is a re-export (not a
re-implementation) of the same function the actor already runs, so an external
CR-fence — in gp CI, a git-host pre-merge check, anywhere — can import and run
the identical check:
from phase_loop_runtime.conformance import scan_consiliency_gates
verdict = scan_consiliency_gates("/path/to/repo") # {"status": "passed" | "warn" | "blocked" | "skipped", "gates": {...}, ...}
The surface also exposes the pure cores (evaluate_git_discipline,
self_heal_partition, evaluate_governance_scope) for consumers that already
hold the injected facts.
Two roles, one library. This is meant to be mounted BOTH as the actor-side
self-check (a pre-PR sanity pass the author runs locally) AND as the
authoritative CR-fence (the real validator). The actor-side result is never
authoritative — the fence always re-runs the check itself. Because it is the
same function versioned with the same vendored consiliency_contract, the honest
actor sees exactly the verdict the fence will; a stale or dishonest actor result
simply does not matter.
Scope. This surface asserts the L0 shape + governance tier only. The cert-schema tier and authority/provenance verification are explicitly out of scope (delegated downstream / to gp).
consiliency-ingest --check-only
--check-only decouples "run the check" from "is this repo adopted". It is
strictly read-only (never shapes; ignores --adopt). It makes the exit code
verdict-significant so a pre-PR actor is never misled into reading a no-op — or a
failing verify — as a pass:
| Repo state | mode | exit |
|---|---|---|
adopted, verify clean (or warn) |
verify |
0 |
adopted, gate scan blocked |
verify |
1 |
un-adopted (no .consiliency/manifest) |
not-adopted |
3 |
| usage error | — | 2 |
The plain (non---check-only) path is unchanged — it keeps the silent green
skipped no-op on an un-adopted repo and its existing exit 0.
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 phase_loop_runtime-0.5.0.tar.gz.
File metadata
- Download URL: phase_loop_runtime-0.5.0.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd1672026fcc0689342ba7509f58aa054fff917446c65100cda37a809483b27b
|
|
| MD5 |
eb7e4b86694d635ef79583a974c7390e
|
|
| BLAKE2b-256 |
a8e1662efd02356d18cf87ae8669e0d1a6f3f62e6eacbb0649a843c29ea1c2f1
|
Provenance
The following attestation bundles were made for phase_loop_runtime-0.5.0.tar.gz:
Publisher:
publish-pypi.yml on ViperJuice/agent-harness
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
phase_loop_runtime-0.5.0.tar.gz -
Subject digest:
dd1672026fcc0689342ba7509f58aa054fff917446c65100cda37a809483b27b - Sigstore transparency entry: 2129115392
- Sigstore integration time:
-
Permalink:
ViperJuice/agent-harness@7f97ea97121f6afd670e489f5172cf64f167de73 -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/ViperJuice
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@7f97ea97121f6afd670e489f5172cf64f167de73 -
Trigger Event:
push
-
Statement type:
File details
Details for the file phase_loop_runtime-0.5.0-py3-none-any.whl.
File metadata
- Download URL: phase_loop_runtime-0.5.0-py3-none-any.whl
- Upload date:
- Size: 1.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b9a53300239137d9efa3be90f1eed0406b26ad3837f873383dabbfd1780037b6
|
|
| MD5 |
9658dfbc9d5d1cdceaea0d1418a7c77e
|
|
| BLAKE2b-256 |
12b7c9ccceafe4a1fb5db8c0d0e3acb0b8d1818a0042b40605277adf2cba91fa
|
Provenance
The following attestation bundles were made for phase_loop_runtime-0.5.0-py3-none-any.whl:
Publisher:
publish-pypi.yml on ViperJuice/agent-harness
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
phase_loop_runtime-0.5.0-py3-none-any.whl -
Subject digest:
b9a53300239137d9efa3be90f1eed0406b26ad3837f873383dabbfd1780037b6 - Sigstore transparency entry: 2129115538
- Sigstore integration time:
-
Permalink:
ViperJuice/agent-harness@7f97ea97121f6afd670e489f5172cf64f167de73 -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/ViperJuice
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@7f97ea97121f6afd670e489f5172cf64f167de73 -
Trigger Event:
push
-
Statement type: