Use fast AI agents for bounded work while direct evidence protects the product promise from regression.
5
stars
0
commits
Sep 6, 2026
updated

Use fast AI agents for the grunt work. Use a lead agent and real checks to keep the project coherent, working, and under your control.
AI coding agents can produce a lot of code quickly. The harder problem begins after the first impressive demo: agents lose context, overlap each other's changes, trust confident summaries, reopen solved problems, and quietly break features that worked yesterday.
Krystal Loop Protocol (KLP) is a practical operating pattern for continuing to build with multiple AI agents without handing them control of the project.
| Common agent failure | KLP response |
|---|---|
| Two agents edit the same shared file. | Give each worker an explicit file and action boundary. |
| A worker says its own work is complete. | Separate factual handover from independent acceptance. |
| A critic reviews an outdated build. | Bind every verdict to an exact artifact revision. |
| A critic confidently reports a false problem. | Confirm or refute every finding with direct evidence. |
| Agents keep looping without improvement. | Stop on repeated findings, exhausted budgets, or a plateau. |
| Unit changes pass but break when combined. | Review integration as a new artifact. |
| A test or agent message is treated as permission to deploy. | Keep live actions behind an explicit human decision. |
Give this to the lead agent before a multi-agent build:
Work under Krystal Loop Protocol Core.
Before changing files, write a bounded task contract containing:
- its ID, revision, parent identity, and coordinator delegation;
- the exact outcome;
- allowed and protected paths;
- forbidden actions and live side effects;
- deterministic checks and required evidence;
- time, cost, and repair-round limits;
- conditions that require stopping for human review.
Split the task into independently judgeable work units. Workers must return
factual handovers tied to exact revisions and must not certify their own work.
Run deterministic checks before independent, read-only criticism. Confirm,
refute, or leave each critic finding unresolved using direct evidence. Treat
the integrated result as a new artifact. Normal repair rounds may proceed under
the recorded delegation; material changes and consequential actions stop at
the authority boundary.
KLP does not require a special model, database, vector store, or message bus. You can start with Git and Markdown files, then add durable coordination when the project needs it.
The included examples demonstrate one complete bounded path:
DeepSeek Flash worker
-> exact revision and deterministic checks
-> controller-redacted, sealed review packet
-> different-family read-only critic
-> evidence-backed finding dispositions
-> bounded repair or integration
Start with the DeepSeek Codex worker, then use the OpenAI-compatible critic harness. The worker launcher uses an isolated Codex profile and a reviewed assignment. The critic makes one request, validates its structured verdict locally, and cannot edit or authorize any action. The examples do not automatically connect worker output to critic input; the controller must inspect and redact the review packet first.
The fail-review-repair fixture proves a complete bounded lifecycle without provider egress or model spend:
output="$(mktemp -d)/klp-fixture"
python3 examples/fail-review-repair/run_fixture.py --out-dir "$output"
python3 -m json.tool "$output/final-receipt.json"
It creates a temporary Git project, records a deliberately incomplete worker revision, captures a failed check, runs the sealed critic harness against a loopback fake provider, confirms one real finding, refutes one false finding, applies one authorized repair, and re-checks the integrated artifact. A second test proves a zero-round repair budget stops instead of overrunning authority.
KLP is not an autonomous software factory, deployment platform, model router, or claim that tests prove a product has no defects. It is a portable way to bound multi-agent work, retain useful evidence, and make uncertainty visible.
KLP is inspired by public builder/critic systems such as the Gauntlet Loop. It does not claim to invent multi-agent coding, independent review, or automated testing. Its focus is what happens after the demo, when a real project must remain understandable and working across many changes.
KLP Core v0.2 is a provisional public profile. This repository includes a portable worker launcher, a sealed-packet critic harness, local fake-provider tests, example contracts, and a reproducible offline fail-review-repair fixture. The fixture proves protocol mechanics; it does not certify model quality, production safety, or a particular agent framework.
Krystal Loop Protocol uses split licensing:
Apache-2.0);CC-BY-4.0).See the licensing map for the file-level boundary.
Use fast AI agents for bounded work while direct evidence protects the product promise from regression.
5
stars
0
commits
Sep 6, 2026
updated

Use fast AI agents for the grunt work. Use a lead agent and real checks to keep the project coherent, working, and under your control.
AI coding agents can produce a lot of code quickly. The harder problem begins after the first impressive demo: agents lose context, overlap each other's changes, trust confident summaries, reopen solved problems, and quietly break features that worked yesterday.
Krystal Loop Protocol (KLP) is a practical operating pattern for continuing to build with multiple AI agents without handing them control of the project.
| Common agent failure | KLP response |
|---|---|
| Two agents edit the same shared file. | Give each worker an explicit file and action boundary. |
| A worker says its own work is complete. | Separate factual handover from independent acceptance. |
| A critic reviews an outdated build. | Bind every verdict to an exact artifact revision. |
| A critic confidently reports a false problem. | Confirm or refute every finding with direct evidence. |
| Agents keep looping without improvement. | Stop on repeated findings, exhausted budgets, or a plateau. |
| Unit changes pass but break when combined. | Review integration as a new artifact. |
| A test or agent message is treated as permission to deploy. | Keep live actions behind an explicit human decision. |
Give this to the lead agent before a multi-agent build:
Work under Krystal Loop Protocol Core.
Before changing files, write a bounded task contract containing:
- its ID, revision, parent identity, and coordinator delegation;
- the exact outcome;
- allowed and protected paths;
- forbidden actions and live side effects;
- deterministic checks and required evidence;
- time, cost, and repair-round limits;
- conditions that require stopping for human review.
Split the task into independently judgeable work units. Workers must return
factual handovers tied to exact revisions and must not certify their own work.
Run deterministic checks before independent, read-only criticism. Confirm,
refute, or leave each critic finding unresolved using direct evidence. Treat
the integrated result as a new artifact. Normal repair rounds may proceed under
the recorded delegation; material changes and consequential actions stop at
the authority boundary.
KLP does not require a special model, database, vector store, or message bus. You can start with Git and Markdown files, then add durable coordination when the project needs it.
The included examples demonstrate one complete bounded path:
DeepSeek Flash worker
-> exact revision and deterministic checks
-> controller-redacted, sealed review packet
-> different-family read-only critic
-> evidence-backed finding dispositions
-> bounded repair or integration
Start with the DeepSeek Codex worker, then use the OpenAI-compatible critic harness. The worker launcher uses an isolated Codex profile and a reviewed assignment. The critic makes one request, validates its structured verdict locally, and cannot edit or authorize any action. The examples do not automatically connect worker output to critic input; the controller must inspect and redact the review packet first.
The fail-review-repair fixture proves a complete bounded lifecycle without provider egress or model spend:
output="$(mktemp -d)/klp-fixture"
python3 examples/fail-review-repair/run_fixture.py --out-dir "$output"
python3 -m json.tool "$output/final-receipt.json"
It creates a temporary Git project, records a deliberately incomplete worker revision, captures a failed check, runs the sealed critic harness against a loopback fake provider, confirms one real finding, refutes one false finding, applies one authorized repair, and re-checks the integrated artifact. A second test proves a zero-round repair budget stops instead of overrunning authority.
KLP is not an autonomous software factory, deployment platform, model router, or claim that tests prove a product has no defects. It is a portable way to bound multi-agent work, retain useful evidence, and make uncertainty visible.
KLP is inspired by public builder/critic systems such as the Gauntlet Loop. It does not claim to invent multi-agent coding, independent review, or automated testing. Its focus is what happens after the demo, when a real project must remain understandable and working across many changes.
KLP Core v0.2 is a provisional public profile. This repository includes a portable worker launcher, a sealed-packet critic harness, local fake-provider tests, example contracts, and a reproducible offline fail-review-repair fixture. The fixture proves protocol mechanics; it does not certify model quality, production safety, or a particular agent framework.
Krystal Loop Protocol uses split licensing:
Apache-2.0);CC-BY-4.0).See the licensing map for the file-level boundary.