ck_loop
Create and govern bounded iterative loops with verifier path freezing, artifact classification, and multiple stop conditions. Supports create, record, status, stop, and promote modes.
Instructions
Create and govern a bounded iterative loop without executing worker code. The contract freezes verifier paths and hashes, separates mutable paths, classifies artifact longevity, and enforces metric, iteration, cost, duration, no-progress, blocked-finding, and lasting-code architecture stop conditions. Modes: create, record, status, stop, promote. Rejected iterations require an explicit audited rollback.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | ||
| reason | No | ||
| target | No | ||
| summary | No | ||
| task_id | Yes | ||
| direction | No | ||
| iteration | No | ||
| mechanism | No | ||
| review_id | No | ||
| call_graph | No | ||
| cost_cents | No | ||
| hypothesis | No | ||
| session_id | Yes | ||
| metric_name | No | ||
| review_risk | No | ||
| metric_value | No | ||
| project_root | No | ||
| changed_paths | No | ||
| mutable_paths | No | ||
| rollback_path | No | ||
| artifact_class | No | ||
| diagnosis_path | No | ||
| environment_id | No | ||
| max_cost_cents | No | ||
| max_iterations | No | ||
| verifier_paths | No | ||
| observed_effect | No | ||
| sandbox_adapter | No | ||
| verifier_passed | No | ||
| complexity_delta | No | ||
| invariant_effect | No | ||
| promotion_packet | No | Required when a lasting_code iteration reaches its target. Contains citable behavior, invariant, interface, deterministic command, rollback, and documentation evidence. | |
| semantic_changes | No | ||
| verifier_command | No | ||
| complexity_budget | No | ||
| no_progress_limit | No | ||
| invariant_evidence | No | ||
| local_defense_limit | No | ||
| documentation_impact | No | ||
| invariant_boundaries | No | ||
| max_duration_seconds | No | ||
| allowed_sandbox_adapters | No | ||
| allowed_semantic_changes | No | ||
| human_promotion_required | No | ||
| required_review_personas | No | ||
| maintenance_without_model | No | ||
| forbidden_semantic_changes | No | ||
| machine_independence_evidence | No | ||
| machine_independence_verified | No | ||
| require_ephemeral_environment | No | ||
| machine_independence_requirements | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | Yes | ||
| task_id | Yes | ||
| contract | Yes | ||
| decision | No | ||
| cost_cents | No | ||
| iterations | Yes | ||
| session_id | Yes | ||
| best_metric | No | ||
| contract_id | No | ||
| stop_reason | No | ||
| iteration_count | No |