Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: '1.26.x'
Expand All @@ -36,6 +38,8 @@ jobs:
go test ./cmd/loopexec -run '^TestDocumentationContract' -count=1
go test ./tools/docs-continuity -count=1
go run ./tools/docs-continuity bundle "$RUNNER_TEMP/loopexec-documentation"
- name: Reject new machine-specific audit paths
run: go run ./tools/audit-privacy
- name: Format
run: test -z "$(gofmt -l cmd internal examples tools)"
- name: Vet
Expand Down
2 changes: 1 addition & 1 deletion .small/handoff.small.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
small_version: "1.0.0"
owner: agent
summary: 'SMALL audit blocker resolved: installed stable1.1.2, root/site CI configs and prose updated, exact retained QA proof unchanged. Task41 completed; task36 is the deployment continuation. Cache-free root/site strict pass and missing proof remains fail-closed; CLI/docs contract tests, canonical tests/build and refreshed desktop/mobile QA pass. Source-bound bundle sourcee0d04802 docscb4c8adb in build/deployment/small112-documentation and docs-checkout. Rebuild older platform packages before publication. Next commit paired PRs, verify hosted CI/protections, authorized deployment, official-origin docs readback and release; recipes remain after release. No remote publication or production action.'
summary: 'Prepared canonical documentation correction and enforced audit privacy: full Go tests, vet, privacy checks, strict SMALL and seven package checksums pass. Source bundle includes 22 canonical files; new tracking is portable and historical receipts remain unchanged. Hosted CI adoption, paired docs deployment, official-origin readback and v0.4.1 tag publication remain to finish. SMALL1.1.2 lacks a global pre-recording path guard; a separate upstream correction is needed. No new path-bearing captures, private caches or private handoffs are in this delivery.'
resume:
current_task_id: task-36
next_steps:
Expand Down
7 changes: 5 additions & 2 deletions .small/plan.small.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,10 @@ tasks:
status: completed
- id: task-36
title: Adopt canonical docs-site handshake and hosted release protections before publication
status: pending
status: blocked
- id: task-37
title: Prepare v0.4.1 release and source-bound docs deployment artifacts with verified CI handoff
status: pending
status: completed
- id: task-38
title: Add tested configurable software, game-development and audio-engineering recipes after deployment
status: blocked
Expand All @@ -127,3 +127,6 @@ tasks:
- id: task-41
title: Adopt stable SMALL1.1.2 for preserved QA command validation in local and CI tooling
status: completed
- id: task-42
title: Enforce portable audit privacy and preserve local-only validation history
status: completed
295 changes: 295 additions & 0 deletions .small/progress.small.yml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .small/workspace.small.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ small_version: "1.0.0"
owner: agent
kind: repo-root
created_at: "2026-01-20T23:56:04Z"
updated_at: "2026-10-09T14:21:09.527594Z"
updated_at: "2026-10-14T07:15:38.197771Z"
run:
replay_id: f6bbda15d790df6d023dea340edd1b85ccac89c82db362652a1b656981e82d96
10 changes: 10 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
# HARD RULES
Never directly edit .env files

## Canonical Audit Privacy

- New `.small` records and `.small-command-proofs` MUST use repository-relative
paths or logical aliases, never machine-specific absolute paths.
- Do not write host paths into commands, summaries, evidence, notes or handoffs.
Keep host mappings and private captures outside tracked canonical state.
- Preserve historical receipts and exact proof bytes; never scrub them in place.
- Run `go run ./tools/audit-privacy` before publication. Follow
`docs/audit-privacy.md`; SMALL v1.1.2 strict alone does not enforce this rule.

## Code and documentation continuity

- LoopExec is a general-purpose bounded agentic loop governor. Project-specific
Expand Down
31 changes: 26 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,19 @@

## Unreleased

- Added canonical audit privacy policy and a publication gate rejecting new
absolute host paths in SMALL metadata and command proofs. Historical receipts
remain unchanged; unpublished private captures are excluded from delivery.
Named-home references are rejected along with absolute paths.

- Corrected architecture to describe the shipped external-check runtime; marked
the historical SMALL task-list design as planned.
- Reconciled source/publication status, canonical Getting Started and conceptual
homepage prose; removed obsolete rollout claims and corrected historical releases.

Future recipes and workflow adapters will remain configurable, opt-in integrations.

## v0.4.1
## v0.4.1 — current source

See [release notes](docs/releases/v0.4.1.md). Publication status is authoritative
on [GitHub Releases](https://github.com/justyn-clark/loopexec/releases).
Expand All @@ -17,7 +27,7 @@ on [GitHub Releases](https://github.com/justyn-clark/loopexec/releases).
- Hardened code/docs continuity: canonical prose and changelog co-change CI gate,
generated CLI/JSON contract tests, source-bound allowlisted documentation in
every platform archive, and fail-closed deployed-docs checks before publication.
The separate docs site must adopt the build handshake before the next release.
The docs site consumes the allowlisted bundle; release publication requires exact official-origin readback.
- Added a non-publishing Release workflow rehearsal and a main-line ancestry gate
before deployed-docs verification or tag publication.
- Clarified general-purpose acceptance policy: original run contracts, candidate
Expand All @@ -31,7 +41,8 @@ on [GitHub Releases](https://github.com/justyn-clark/loopexec/releases).
presence from verified attestation. The legacy JSON `attested` field still
describes file presence; use `attestation_status` and explicit verification.
- Added an evidence-capture guide for creative verification and a release/status
roadmap. These changes are local until a subsequent release is published.
roadmap. These changes are merged in source. The Releases page establishes whether
matching binary packages have been published.

## v0.4.0

Expand All @@ -52,5 +63,15 @@ proofs, and binary release packages. Existing convergence exit code 10 is unchan

## v0.2.0

Previous published release. Later core command and deterministic demo work is
included in v0.3.0; this changelog does not retroactively attribute it to v0.2.0.
Published June 27, 2026 (UTC). Introduced the real bounded loop, computed halts,
typed receipts, determinism probing, regression/integrity guards, replay,
attestation, context slicing and isolation orchestration. The deterministic
demo and unattended workflow extensions arrived in v0.3.0. See
[the historical release](https://github.com/justyn-clark/loopexec/releases/tag/v0.2.0).

## v0.1.0

Published February 22, 2026. Established the standalone execution harness,
single-object JSON contract, stable exit classes, contract tests and
format/vet/test CI. See
[the historical release](https://github.com/justyn-clark/loopexec/releases/tag/v0.1.0).
43 changes: 29 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,29 @@
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
[![Go version](https://img.shields.io/badge/go-1.26.0-00ADD8?logo=go&logoColor=white)](https://go.dev)

`loopexec` is a deterministic runtime for loop engineering: it drives bounded, stateless, auditable execution loops that progress through an external check and stop on a computed reason, never on an agent's say-so. It is the runtime companion to SMALL Protocol: SMALL describes state, constraints, plans, progress, and handoff; loopexec drives one bounded loop against that state and reports machine-readable outcomes.
## Overview

LoopExec is a deterministic runtime for bounded agentic execution loops. Work progresses through an external check and stops on a computed reason — never because an agent says it is done.

Supply a work command and an external check. LoopExec bounds execution, detects regression, no progress and oscillation, applies integrity guards, and records replayable receipts. Opt-in workflows add usage evidence, scoped model-call budgets and candidate restoration. Isolation orchestration composes with operator-provided container, egress and credential hooks.

The runtime governs execution; adapters supply models, checks and infrastructure. Synthetic creative examples prove runtime mechanics, not production model quality. Observed spending cannot enforce a provider-side cap, a signature file requires explicit verification, and retaining a candidate does not establish owner acceptance.

[Getting Started](docs/getting-started.md) begins with an offline deterministic proof.
SMALL describes plans, constraints, progress and handoff; LoopExec drives one bounded loop. SMALL is optional for consumers.

The normative contract is `SPEC.md`. The current source implements bounded execution, determinism probing, integrity and regression guards, offline-verifiable receipts, and opt-in unattended workflows. See `SPEC.md` section 11 for the implemented scope and remaining sub-parts.

## Current status

Source identity: **v0.4.1**. This patch adds evidence-complete reports and enforced
Source identity: **v0.4.1**. Documentation describes current source; the public
binary version is established by GitHub Releases, not this source badge. This patch adds evidence-complete reports and enforced
code/docs release continuity. See [v0.4.1 notes](docs/releases/v0.4.1.md); the
[Releases page](https://github.com/justyn-clark/loopexec/releases) establishes
publication status. Workflow thresholds remain supplied by each integration.

## Implemented capabilities

Implemented through v0.4.0:

- Real bounded `run` loop: iterates `--exec` then `--check` until the check passes (`success_condition_met`), a bound trips (`max_iterations_reached`), or work fails (`execution_failure`); "no check, no loop"; computed halt reasons mapped to a stable exit-code class; typed JSONL receipts (`.loopexec/run-<id>.jsonl`) and atomic durable state.
Expand All @@ -36,37 +48,40 @@ Implemented through v0.4.0:
- `isolate` - two-zone orchestration: detached-clone sandbox + per-run minted/revoked credential + rendered/launched exec/agent zones.
- Global `--json` output, explicit exit-code contract, contract and unit tests, GitHub Actions CI (`gofmt`, `go vet`, `go test ./...`).

Not implemented yet (named sub-parts; see `SPEC.md` section 11):
## Integration boundaries and planned sub-parts

See `SPEC.md` section 11:

- The operator-provided infra `isolate` composes with: the container engine, the auditing egress proxy, and the provider key API (`--runtime` / `--egress-proxy` / `--mint-cmd` + `--revoke-cmd`).
- Provider-specific live usage wrappers; the deeper metric-integrity layers (assertion-count / coverage-floor); `probe-check` adversarial perturbation + the in-loop sequential monitor.
- The `import_closure` / `dep_graph` context-relevance tiers; github/slack escalation channels; the kill-the-PID watchdog actuator.
- Full SMALL-driven `task_list` loop execution and `small` CLI integration; container, Nix, or remote substrates and multi-worker orchestration.
- Full SMALL-driven `task_list` loop execution; container, Nix, or remote substrates and multi-worker orchestration.

## Install

```bash
go install github.com/justyn-clark/loopexec/cmd/loopexec@latest
```

Requires Go 1.26 or newer. For a pinned v0.4.1 install, use `@v0.4.1` once that
release is published. Until then, v0.4.0 remains the prior published stable release.
Requires Go 1.26 or newer. The command resolves the latest public stable release. Source identity and
publication are distinct: use a pinned tag only when it is listed as public on GitHub Releases.
Prebuilt archives and SHA256 checksums are linked from
[GitHub Releases](https://github.com/justyn-clark/loopexec/releases).

`loopexec --version` prints the installed version; `loopexec version --json` emits its machine-readable identity. See the [release notes](docs/releases/v0.4.1.md) for compatibility and platform limits.

SMALL is optional for LoopExec consumers. This repository uses the tracked `.small/` files for its own development audit; CI requires a canonical progress update with source or documentation changes and validates the tracked state. The [SMALL integration guide](docs/small-integration.md) covers SMALL CLI v1.1.0 with legacy v1 artifacts and opt-in collaborative v2 sessions; LoopExec remains the loop governor.
SMALL is optional for LoopExec consumers. This repository uses the tracked `.small/` files for its own development audit; CI requires a canonical progress update with source or documentation changes and validates the tracked state. The [SMALL integration guide](docs/small-integration.md) covers SMALL CLI v1.1.2 with legacy v1 artifacts and opt-in collaborative v2 sessions; LoopExec remains the loop governor.

## 60-second proof

Run the built-in deterministic demo with no API key, model, or network dependency:
Run the built-in deterministic demo with no model, API key, Python runner, or network access:

```bash
loopexec demo
```

The command creates a red local fixture, sends it through the real bounded loop, repairs it, observes the external check turn green, writes a typed JSONL receipt, and verifies the recorded check fingerprint through the same verifier used by `loopexec replay`. It proves LoopExec's execution-integrity contract; it does not run an agent.
The command creates a red local fixture, sends it through the real bounded loop, repairs it, observes the external check turn green, writes a typed JSONL receipt, and verifies the recorded check fingerprint through the same verifier used by `loopexec replay`. It proves the execution/check/receipt/replay contract, not agent intelligence.
For your own work command and check, follow [Getting Started](docs/getting-started.md).

The receipt path in the output identifies the retained temporary workdir. To keep the proof at a known path, pass a fresh directory with `--workdir <dir>`; `demo` refuses to overwrite an existing `.loopexec` directory or `status.txt` fixture.

Expand Down Expand Up @@ -94,7 +109,7 @@ Code/tooling changes also require canonical documentation and changelog updates.
The generated [CLI and JSON contract](docs/cli-reference.generated.md) is checked
against the runtime. Every release packages source-bound docs and publication
requires matching deployed content. See [continuity policy](docs/documentation-continuity.md)
for enforcement and the pending website rollout boundary.
for enforced source-bound release gates and the operator/account boundary.

## CLI

Expand All @@ -115,7 +130,7 @@ See [acceptance and evidence](docs/acceptance-policy.md) for general-purpose
objective, retention, convergence and owner-decision boundaries. The
[creative verification guide](docs/creative-verification.md) is an optional example.
The [status and roadmap](docs/status-and-roadmap.md) distinguishes published
capabilities, local improvements, and remaining work.
capabilities, source changes, and remaining work.

### Global flag

Expand All @@ -136,7 +151,7 @@ Example JSON response (a converged run):
```json
{
"tool": "loopexec",
"version": "0.4.0",
"version": "0.4.1",
"status": "halted",
"run_id": "local",
"iteration": 3,
Expand Down Expand Up @@ -172,7 +187,7 @@ The `halt_reason` string is the stable contract; the exit code is its coarse cla
```text
SPEC.md canonical, normative contract (source of truth)
cmd/loopexec/ loopexec CLI
docs/architecture.md planned loop architecture
docs/architecture.md implemented runtime architecture
docs/cli.md current loopexec command contract
docs/integrations.md integration guidance for the implemented CLI
docs/loop-contract.md task_list mode profile of SPEC.md
Expand All @@ -189,7 +204,7 @@ Read the docs in this order:
0. `SPEC.md` - the canonical, normative contract (source of truth for the binary and the docs site)
1. `docs/cli.md` - what the current CLI actually does
2. `docs/integrations.md` - how to integrate with the current implementation
3. `docs/architecture.md` - target architecture and planned boundaries
3. `docs/architecture.md` - implemented architecture and integration boundaries
4. `docs/loop-contract.md` - the `task_list` mode profile

## Links
Expand Down
15 changes: 14 additions & 1 deletion SPEC.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,9 @@ A live-LLM trajectory is not reproducible; only the **verdict** is. Marketing co

## 11. Capability status (normative source for the docs matrix)

This matrix describes current source. Publication status comes from GitHub Releases;
new v0.4.1 report behavior requires a matching public binary.

Each capability is **Shipped** (in `cmd/loopexec` with tests), **In progress** (on a feature branch), or **Planned** (specified here, not yet built). The docs site MUST render this distinction and MUST NOT present Planned capability as Shipped.

| Capability | Status |
Expand All @@ -179,6 +182,7 @@ Each capability is **Shipped** (in `cmd/loopexec` with tests), **In progress** (
| Receipt pinning: model-identity tuple + sampling + context manifest (sha256) + cost + check fingerprint (section 8) | Shipped (legacy flags record metadata; workflow usage hooks support exact in-loop strict/observed/unmetered accounting) |
| `replay`: verify a receipt offline by re-running the check and matching the fingerprint (section 8) | Shipped |
| `attest`: HMAC-sign a receipt and `--verify` it (section 8) | Shipped |
| `report`: read-only event/failure/missing-evidence reporting | Shipped (v0.4.1 source; signature presence is unverified, candidate retention is not acceptance) |
| `reexecute`: live re-run of the recorded config N times, halt-reason distribution (section 8) | Shipped |
| `escalate` / `watch` / `ack` + comprehension gate (section 9) | Shipped (file/stdout channels, heartbeat + staleness detection, comprehension `--comprehension-every`; github/slack channels + kill-the-PID actuator Planned) |
| `build-context`: budgeted relevant-file slice with workdir-confined, symlink-safe file resolution (section 4) | Shipped (stacktrace + last-diff + untracked relevance; import_closure / dep_graph tiers Planned) |
Expand All @@ -190,7 +194,16 @@ Each capability is **Shipped** (in `cmd/loopexec` with tests), **In progress** (

This table is the contract between the binary and the site. When a capability moves status, update it here first; the binary tests and the docs matrix both reference this section.

Every row above now has a Shipped core. The remaining work is named, inline sub-parts (the operator-provided infra hooks, provider-specific metering wrappers, the deeper metric-integrity layers, the `import_closure`/`dep_graph` context tiers, github/slack escalation channels, the kill-the-PID watchdog actuator) -- not whole capabilities.
Every row above has a Shipped core. The remaining work is named, inline sub-parts (the operator-provided infra hooks, provider-specific metering wrappers, the deeper metric-integrity layers, the `import_closure`/`dep_graph` context tiers, github/slack escalation channels, the kill-the-PID watchdog actuator) -- not whole capabilities.

Additional integration and topology status:

| Capability | Status |
| --- | --- |
| SMALL CLI validation and v1/v2 compatibility proofs | Shipped (repository/adapter integration; SMALL remains an optional external CLI) |
| Full SMALL-driven `task_list` topology | Planned |
| Provider-specific live usage wrappers | Planned (adapters must supply provider enforcement for strict monetary caps) |
| Container/Nix/remote substrates and multi-worker orchestration | Planned (existing isolation hooks compose with operator infrastructure) |

## 12. Unattended workflow extension

Expand Down
Loading
Loading