{
  "schema_version": "2.1.0",
  "slug": "ratchet",
  "record_version": "2026-11-25.1",
  "record_status": "draft",
  "content_sha256": "23053adf2a1f302d90fc16aa29d311e450077f4d54c42724b926211d73d9ac3e",
  "name": "Ratchet",
  "aliases": [
    "Self-Evolving Agents Ratchet",
    "Minimal Hygiene Recipe"
  ],
  "summary": "Procedural skill library with a size cap, constrained synthesis, contribution-based skill retirement (a floor of 100, counted as routed trials in paper v3 and as tasks since addition in current code), and persistence-gated automatic rollback across benchmark rounds.",
  "plain": {
    "what_it_is": {
      "text": "A capped library of skills that retires skills that do not help and can restore its best earlier skill set during benchmark testing.",
      "from": [
        "summary"
      ]
    },
    "what_it_changes": {
      "text": "It changes its saved skills.",
      "from": [
        "modifies",
        "improves_improver"
      ]
    },
    "has_it_been_tested": {
      "text": "Its creators tested it on benchmark tests and reported that it helped. We have not checked this against the source yet. This was measured in benchmark rounds, not in a live assistant over days. Koobo has not tested it yet.",
      "from": [
        "evidence_claims[].claim_type",
        "evidence_claims[].setting",
        "evidence_claims[].independence",
        "evidence_claims[].outcome",
        "evidence_claims[].provenance.check_status",
        "evidence_claims[].scope.variant_id",
        "plain_facts[claim_scope]",
        "plain_facts[claim_caveat]",
        "evidence_summary.has_koobo_completed_eval"
      ]
    },
    "can_you_undo_it": {
      "text": "It can restore its best earlier skill set during benchmark testing, but only after the score stays more than 0.10 below the best for 5 rounds in a row. This has not been shown for live use. We don't know yet whether the process for choosing a fallback has been tested. Restoring skills does not undo actions already taken.",
      "from": [
        "rollback.has_usable_rollback",
        "rollback.status",
        "rollback.restoration_scope",
        "rollback.automatic_trigger",
        "rollback.tested_fallback_policy",
        "plain_facts[restores]",
        "plain_facts[undo]"
      ]
    },
    "is_there_a_safety_check": {
      "text": "We don't know yet. Not shown in the sources.",
      "from": [
        "safety_gate.status",
        "plain_facts[safety]"
      ]
    },
    "how_hard_to_adopt": {
      "text": "High effort to use its code outside Amazon Bedrock or apply its rules to a low-traffic agent. The full version needs its own platform, but the idea can be copied into an existing agent. Its retirement rule has a minimum count of 100: routed trials in paper v3, or tasks since the skill was added in current code. That makes direct use impractical for low-traffic agents without redesign. License: Apache-2.0.",
      "from": [
        "adoption_effort_non_framework.level",
        "plain_facts[effort_scope]",
        "variants[].adoption_effort_level",
        "framework_dependency.requires_framework_migration",
        "plain_facts[adoption]",
        "license.spdx",
        "license.check_status",
        "variants[].license_spdx",
        "plain_facts[license]"
      ]
    }
  },
  "plain_facts": [
    {
      "topic": "restores",
      "ref": null,
      "text": "its best earlier skill set",
      "from": "rollback.mechanism"
    },
    {
      "topic": "effort_scope",
      "ref": null,
      "text": "use its code outside Amazon Bedrock or apply its rules to a low-traffic agent",
      "from": "adoption_effort_non_framework.implementation_scope"
    },
    {
      "topic": "adoption",
      "ref": null,
      "text": "Its retirement rule has a minimum count of 100: routed trials in paper v3, or tasks since the skill was added in current code. That makes direct use impractical for low-traffic agents without redesign.",
      "from": "adoption_effort_non_framework.notes"
    },
    {
      "topic": "undo",
      "ref": null,
      "text": "Restoring skills does not undo actions already taken.",
      "from": "rollback.side_effect_limit"
    },
    {
      "topic": "claim_caveat",
      "ref": "ratchet-author-bench-1",
      "text": "This was measured in benchmark rounds, not in a live assistant over days.",
      "from": "evidence_claims[ratchet-author-bench-1].scope.caveats"
    }
  ],
  "modifies": [
    "skills"
  ],
  "improves_improver": false,
  "learning_signal": {
    "types": [
      "execution_trace",
      "llm_judge",
      "usage_telemetry",
      "benchmark_metric"
    ],
    "description": "Task failures, LLM-judge or grading signals, and per-skill usage/contribution statistics."
  },
  "pre_use_evaluation": {
    "status": "no",
    "held_out_split": "unverified",
    "live_activation_gate": "no",
    "how": "Newly synthesized skills become active after synthesis (README per-round flow); there is no behavioral admission test before a new skill becomes active. Periodic benchmark-round evaluation and rollback measure the bank after the fact and are recorded under rollback, not as pre-use evaluation."
  },
  "rollback": {
    "status": "automatic",
    "has_usable_rollback": "yes",
    "restoration_scope": "benchmark_rounds",
    "automatic_trigger": {
      "score_margin": 0.1,
      "consecutive_rounds": 5
    },
    "tested_fallback_policy": "unverified",
    "mechanism": "Persistence-gated auto-rollback restores the best skill bank after evaluation performance stays more than 0.10 below the best for 5 consecutive rounds; the implementation then remeasures the restored bank. This is a benchmark-round mechanism, not a production calendar-day guarantee.",
    "side_effect_limit": "Skill-bank restoration reverts stored skills only and cannot reverse completed external side effects."
  },
  "post_deploy_measurement": {
    "status": "partial",
    "how": "Tracks per-skill usage and contribution across rounds. The retirement floor is 100, but its unit differs by version: routed trials in paper v3, all tasks since the skill was added in current lifecycle code. Live calendar-day production monitoring is not established."
  },
  "safety_gate": {
    "status": "unverified",
    "blocks_unsafe_despite_utility_gain": "unverified",
    "write_time_blocks_activation": "unverified",
    "reuse_time_blocks_activation": "unverified",
    "how": "Paper notes guarantees depend on grading-signal reliability and do not guarantee safe behavior in an arbitrary business. Separate behavioral safety gate is unverified."
  },
  "license": {
    "spdx": "Apache-2.0",
    "source_url": "https://raw.githubusercontent.com/amazon-science/Self-Evolving-Agents-Ratchet/main/LICENSE",
    "check_status": "checked",
    "checked_at": "2026-11-25",
    "checked_by": "Codex live check",
    "notes": "LICENSE contains the Apache License 2.0 text."
  },
  "repo_url": "https://github.com/amazon-science/Self-Evolving-Agents-Ratchet",
  "paper_url": "https://arxiv.org/html/2605.22148",
  "maturity": {
    "stage": "research_prototype",
    "last_observed_activity_date": null,
    "activity_criterion": "Research repository and paper v3 cited on 2026-11-24; exact commit and file lines unpinned."
  },
  "framework_dependency": {
    "level": "cloud_runtime_coupled",
    "requires_framework_migration": "optional_port",
    "required_runtime_or_sdk": "Released code is tied to Amazon Bedrock; bounded-library, evidence-log, and persistence-gated restore concepts can be reimplemented independently."
  },
  "adoption_effort_non_framework": {
    "level": "high",
    "judgment_owner": "koobo_editorial",
    "implementation_scope": "Direct code adoption outside Bedrock or porting hygiene rules to low-traffic agents.",
    "notes": "Bedrock coupling, reliable-metric assumptions, and the 100-observation retirement floor make direct use impractical for sparse-traffic custom agents without redesign."
  },
  "variants": [
    {
      "variant_id": "ratchet-bedrock-prototype",
      "label": "Ratchet reference implementation",
      "scope": "Amazon Bedrock research codebase with benchmark-round auto-rollback.",
      "license_spdx": "Apache-2.0",
      "license_check_status": "checked",
      "learning_signal_types": [
        "execution_trace",
        "llm_judge",
        "usage_telemetry",
        "benchmark_metric"
      ],
      "pre_use_evaluation_status": "no",
      "rollback_status": "automatic",
      "has_usable_rollback": "yes",
      "safety_gate_status": "unverified",
      "framework_dependency_level": "cloud_runtime_coupled",
      "requires_framework_migration": "optional_port",
      "adoption_effort_level": "high",
      "notes": "New skills become active after synthesis without an admission test. Rollback (0.10 margin, 5 rounds) is benchmark-round restoration. Retirement floor of 100 counts routed trials in paper v3 and tasks since addition in current code."
    }
  ],
  "known_failure_modes": [
    {
      "mode": "Sensitivity to unreliable LLM judges",
      "detail": "Skill retirement and rollback guarantees depend on grading-signal reliability; an unreliable judge breaks retirement decisions.",
      "provenance": {
        "source_url": "https://arxiv.org/html/2605.22148v3",
        "source_revision": "v3",
        "location": "Sections 3, 5, and 7",
        "accessed_date": "2026-11-24",
        "check_status": "pending",
        "source_note": "Paper title explicitly asks how reliable an LLM judge must be to retire a skill.",
        "checked_at": null,
        "checked_by": null
      }
    },
    {
      "mode": "High traffic floor for skill retirement",
      "detail": "The retirement floor of 100 (routed trials in paper v3; all tasks since the skill was added in current lifecycle code) is far beyond low-volume daily agents.",
      "provenance": {
        "source_url": "https://raw.githubusercontent.com/amazon-science/Self-Evolving-Agents-Ratchet/main/skillevo/curator/lifecycle.py",
        "source_revision": "main branch as served 2026-11-25 (commit SHA not recorded)",
        "location": "skillevo/curator/lifecycle.py (retirement floor)",
        "accessed_date": "2026-11-25",
        "check_status": "checked",
        "source_note": "Codex live check: the number 100 is supported, but paper v3 counts routed trials while current code counts all tasks since addition.",
        "checked_at": "2026-11-25",
        "checked_by": "Codex live check"
      }
    }
  ],
  "evidence_summary": {
    "settings_observed": [
      "benchmark"
    ],
    "independence_observed": [
      "author"
    ],
    "effectiveness_outcome": "positive",
    "safety_outcome": "unverified",
    "has_koobo_completed_eval": false,
    "summary_note": "Author benchmark results on hard MBPP+ subset; live production and independent safety results unverified."
  },
  "evidence_claims": [
    {
      "claim_id": "ratchet-author-bench-1",
      "claim_type": "effectiveness",
      "statement": "Author study (paper v3) evaluates bounded skill-library hygiene, contribution-based retirement with a 100 routed-trial floor, and persistence-gated auto-rollback (restoring the best bank after 5 consecutive rounds more than 0.10 below best) on a deliberately hard MBPP+ subset.",
      "setting": "benchmark",
      "independence": "author",
      "outcome": "positive",
      "scope": {
        "variant_id": "ratchet-bedrock-prototype",
        "model": "Fixed backbone (exact model ID not recorded in local notes)",
        "suite_or_environment": "Deliberately hard MBPP+ subset",
        "judge_or_metric": "Task grading signal / LLM judge reliability analysis",
        "sample_or_duration": "Multi-round benchmark runs",
        "caveats": "Round-based benchmark mechanism, not a live deployed business assistant with calendar-day monitoring."
      },
      "provenance": {
        "source_url": "https://arxiv.org/html/2605.22148v3",
        "source_revision": "v3",
        "location": "Sections 3, 5, and 7",
        "accessed_date": "2026-11-24",
        "check_status": "pending",
        "source_note": "Rollback rule in section 3 confirmed by Codex live check; the effectiveness result itself is pending re-check. Current code counts the retirement floor in tasks since addition, not routed trials.",
        "checked_at": null,
        "checked_by": null
      }
    }
  ],
  "control_evidence": [
    {
      "field": "pre_use_evaluation.status",
      "statement": "New skills become active after synthesis; periodic rollback is not a pre-activation behavioral admission test.",
      "provenance": {
        "source_url": "https://github.com/amazon-science/Self-Evolving-Agents-Ratchet#per-round-flow-what-run_skill_looppy-does-each-round",
        "source_revision": "main branch as served 2026-11-25 (commit SHA not recorded)",
        "location": "README section 'Per-round flow: what run_skill_loop.py does each round'",
        "accessed_date": "2026-11-25",
        "check_status": "checked",
        "source_note": "Codex live check.",
        "checked_at": "2026-11-25",
        "checked_by": "Codex live check"
      }
    },
    {
      "field": "rollback.status",
      "statement": "Paper v3 and the loop implementation agree: restore the best bank after more than 0.10 loss for five consecutive rounds, then remeasure it.",
      "provenance": {
        "source_url": "https://arxiv.org/html/2605.22148v3",
        "source_revision": "v3",
        "location": "Section 3; scripts/run_skill_loop.py",
        "accessed_date": "2026-11-25",
        "check_status": "checked",
        "source_note": "Codex live check. Benchmark-round restoration only.",
        "checked_at": "2026-11-25",
        "checked_by": "Codex live check"
      }
    },
    {
      "field": "post_deploy_measurement.status",
      "statement": "Retirement floor of 100: routed trials in paper v3, tasks since addition in current lifecycle code.",
      "provenance": {
        "source_url": "https://raw.githubusercontent.com/amazon-science/Self-Evolving-Agents-Ratchet/main/skillevo/curator/lifecycle.py",
        "source_revision": "main branch as served 2026-11-25 (commit SHA not recorded)",
        "location": "skillevo/curator/lifecycle.py (retirement floor)",
        "accessed_date": "2026-11-25",
        "check_status": "checked",
        "source_note": "Codex live check.",
        "checked_at": "2026-11-25",
        "checked_by": "Codex live check"
      }
    }
  ],
  "adoption_recipe": {
    "adoptable_directly": true,
    "authority_notice": "This record is factual engineering reference data. It grants no action authority, execution permission, or deployment approval to any reader or agent.",
    "upstream_controls": {
      "pre_use_eval": [],
      "rollback": [
        "Persistence-gated automatic restoration of the best skill bank after more than 0.10 loss for five consecutive benchmark rounds, followed by remeasurement of the restored bank (paper v3 section 3; scripts/run_skill_loop.py)."
      ],
      "safety_gate": [],
      "scope_note": "Upstream controls operate on benchmark rounds and assume a reliable task metric. Newly synthesized skills become active without a behavioral admission test, so the periodic rollback is not a pre-use check. Koobo required controls add pre-activation evaluation, non-compensatory safety gating, current-policy fallback validation, and live abstention."
    },
    "koobo_required_controls": {
      "edit_surface_bounds": [
        "The adopter's system caps the procedural skill bank size and stores skills as versioned non-executable text files.",
        "Grading logic, safety policies, and retirement thresholds remain outside learner write access."
      ],
      "pre_use_eval_requirements": [
        "The evaluation harness separates learning data, candidate selection data, and sealed final test data grouped by incident and day (following GEPA, arXiv:2507.19457).",
        "The pre-activation suite includes already-successful control cases and rule-reversal cases rather than failure cases alone (following EvoPathBench, arXiv:2609.24663, and Anthropic memory research).",
        "The release controller binds the evaluated artifact SHA-256 hash to the passing verdict so unverified runtime edits cannot activate."
      ],
      "rollback_requirements": [
        "The deployment harness retains immutable parent artifact snapshots with SHA-256 content hashes.",
        "Regression checks compare active and parent snapshots on matched fresh shadow probes rather than comparing today's score to yesterday's score.",
        "Before restoring a fallback snapshot, the harness tests that fallback against current policies and abstains or escalates to an operator if neither version passes.",
        "Operational runbooks separate artifact restoration from compensating actions because restoring text or skill files cannot undo sent messages, disclosed data, or committed external writes."
      ],
      "safety_gate_requirements": [
        "The release pipeline evaluates safety independently from task utility so utility gains cannot offset a disallowed action (grounded in Practice Makes Unsafe, arXiv:2608.12851).",
        "The safety gate inspects candidate artifacts both at write time and at retrieval or reuse time, blocking activation when checks fail.",
        "The safety test suite covers both untrusted-input poisoning (arXiv:2608.12851) and benign task-pressure degradation (SEABench, arXiv:2609.35596)."
      ],
      "telemetry_and_abstention_requirements": [
        "The deployment harness defaults to abstention (keeping the approved parent artifact) whenever evaluation evidence is inconclusive, missing, or fails a safety check.",
        "Activation authority resides in an external release controller outside learner write permissions.",
        "The runtime logs every artifact hash reaching a model call, every blocked write or retrieval attempt, and every abstention even when sandbox checks prevent external harm."
      ]
    },
    "synthetic_rejected_candidate_example": {
      "label": "synthetic_example",
      "proposed_change": "Synthesized skill that caches raw customer payment details in plain text across sessions to save tool calls.",
      "utility_result": "Improved round-level task completion score by reducing lookup timeouts.",
      "safety_gate_result": "Blocked at write time by the data-privacy invariant regardless of utility gain.",
      "outcome": "rejected"
    }
  },
  "experiment_refs": [],
  "sources": [
    {
      "title": "Ratchet repository README, per-round flow",
      "url": "https://github.com/amazon-science/Self-Evolving-Agents-Ratchet#per-round-flow-what-run_skill_looppy-does-each-round",
      "published_date": "unverified",
      "accessed_date": "2026-11-25",
      "revision": "main branch as served 2026-11-25 (commit SHA not recorded)",
      "location": "README section 'Per-round flow: what run_skill_loop.py does each round'",
      "type": "docs",
      "check_status": "checked",
      "checked_at": "2026-11-25",
      "checked_by": "Codex live check",
      "claims_supported": [
        "New skills become active after synthesis"
      ]
    },
    {
      "title": "Ratchet scripts/run_skill_loop.py",
      "url": "https://raw.githubusercontent.com/amazon-science/Self-Evolving-Agents-Ratchet/main/scripts/run_skill_loop.py",
      "published_date": "unverified",
      "accessed_date": "2026-11-25",
      "revision": "main branch as served 2026-11-25 (commit SHA not recorded)",
      "location": "scripts/run_skill_loop.py (persistence-gated restore)",
      "type": "code",
      "check_status": "checked",
      "checked_at": "2026-11-25",
      "checked_by": "Codex live check",
      "claims_supported": [
        "Restore best bank after more than 0.10 loss for five consecutive rounds",
        "Restored bank is remeasured"
      ]
    },
    {
      "title": "Ratchet skillevo/curator/lifecycle.py",
      "url": "https://raw.githubusercontent.com/amazon-science/Self-Evolving-Agents-Ratchet/main/skillevo/curator/lifecycle.py",
      "published_date": "unverified",
      "accessed_date": "2026-11-25",
      "revision": "main branch as served 2026-11-25 (commit SHA not recorded)",
      "location": "skillevo/curator/lifecycle.py (retirement floor)",
      "type": "code",
      "check_status": "checked",
      "checked_at": "2026-11-25",
      "checked_by": "Codex live check",
      "claims_supported": [
        "Retirement floor of 100 tasks since addition (current code)"
      ]
    },
    {
      "title": "Ratchet LICENSE",
      "url": "https://raw.githubusercontent.com/amazon-science/Self-Evolving-Agents-Ratchet/main/LICENSE",
      "published_date": "unverified",
      "accessed_date": "2026-11-25",
      "revision": "main branch as served 2026-11-25 (commit SHA not recorded)",
      "location": "Full license text",
      "type": "license",
      "check_status": "checked",
      "checked_at": "2026-11-25",
      "checked_by": "Codex live check",
      "claims_supported": [
        "Apache-2.0 license"
      ]
    },
    {
      "title": "Ratchet repository (amazon-science/Self-Evolving-Agents-Ratchet)",
      "url": "https://github.com/amazon-science/Self-Evolving-Agents-Ratchet",
      "published_date": "unverified",
      "accessed_date": "2026-11-24",
      "revision": "main (commit unpinned)",
      "location": "Repository root",
      "type": "repo",
      "check_status": "pending",
      "checked_at": null,
      "checked_by": null,
      "claims_supported": [
        "Bedrock coupling"
      ]
    },
    {
      "title": "Ratchet: How Reliable Must an LLM Judge Be to Retire a Skill? (arXiv:2605.22148, v3)",
      "url": "https://arxiv.org/html/2605.22148v3",
      "published_date": "2026",
      "accessed_date": "2026-11-24",
      "revision": "v3",
      "location": "Section 3 (rollback rule); sections 5 and 7 (results, judge reliability)",
      "type": "paper",
      "check_status": "pending",
      "checked_at": null,
      "checked_by": null,
      "claims_supported": [
        "Rollback rule (section 3)",
        "Hard MBPP+ subset study",
        "100 routed-trial retirement floor",
        "Judge reliability dependence"
      ]
    }
  ],
  "unverified_fields": [
    "rollback.tested_fallback_policy",
    "safety_gate.status",
    "safety_gate.blocks_unsafe_despite_utility_gain",
    "maturity.last_observed_activity_date",
    "pre_use_evaluation.held_out_split"
  ],
  "verification": {
    "status": "primary_source_check_pending",
    "drafted_at": "2026-11-25",
    "last_primary_check_at": null,
    "source_basis": "Drafted from 2026-11-24 local research notes. A Codex live check on 2026-11-25 confirmed or corrected specific fields; those carry check_status checked with checker and date. Everything else is pending.",
    "reviewer_notes": "Live-audit corrections from 2026-11-25 applied. Record remains a draft until every source is pinned and checked."
  },
  "citation": {
    "id": "koobo:agent-learning:ratchet@2026-11-25.1",
    "canonical_url": "https://koobo.co/agent-learning/methods/ratchet",
    "versioned_url": "https://koobo.co/agent-learning/methods/ratchet/v/2026-11-25.1.json",
    "plain_text": "Koobo Agent Learning Index, \"Ratchet\", record 2026-11-25.1 (draft, primary-source check pending), https://koobo.co/agent-learning/methods/ratchet/v/2026-11-25.1.json",
    "bibtex": "@misc{koobo_agent_learning_ratchet_2026,\n  title = {Ratchet (Koobo Agent Learning Index, draft record 2026-11-25.1)},\n  author = {{Koobo Research}},\n  year = {2026},\n  url = {https://koobo.co/agent-learning/methods/ratchet/v/2026-11-25.1.json},\n  note = {Draft record; primary-source check pending}\n}"
  }
}
