← 返回
未分类 中文

Autoresearch Loop

Run an explicit, bounded modify-verify-decide loop toward a measurable metric with approval gates, scoped edits, and rollback proof.
在可衡量指标下,运行明确的、受限的修改‑验证‑决定循环,包含审批门控、范围编辑和回滚证明。
leostehlik leostehlik 来源
未分类 clawhub v0.2.1 3 版本 100000 Key: 无需
★ 0
Stars
📥 393
下载
💾 0
安装
3
版本
#agents#automation#latest#openclaw#research

概述

Autoresearch Loop

Use this skill only when the user explicitly asks for an autoresearch or iterative improvement loop. It is for bounded, measurable optimisation in a version-controlled workspace. It must not start from casual improvement language, and it must not run unattended until the user has approved the goal, commands, scope, rollback strategy, run mode, and iteration cap.

The goal is measurable. Each iteration makes one atomic change, verifies it, and keeps or discards the result. The loop stops when the goal is met, the approved iteration cap is reached, the user stops it, or a blocker/safety gate is hit.

Core Loop

1. Confirm approved run contract
2. Read context + lessons file
3. Pick ONE hypothesis
4. Make ONE atomic change inside approved scope
5. Snapshot/commit before verification
6. Run approved VERIFY command
7. Run approved GUARD command
8. Decision: keep / discard / rework
9. Log the result
10. Health check and safety gate
11. Repeat only within approved cap

Read references/loop-protocol.md for the full loop spec.

Read references/pivot-protocol.md for the escalation ladder.

Read references/lessons-protocol.md for cross-run learning.

Before Starting

Confirm with the user and do not start until the contract is explicit:

  • Goal — one sentence describing what you want to achieve
  • Metric — what number is measured, direction, baseline, and target
  • Verify command — exact command used to measure the metric
  • Guard command — exact command that must keep passing
  • Scope — files/directories allowed to change, and files/directories that are forbidden
  • Rollback strategy — normal branch/worktree revert, or isolated disposable reset
  • Run mode — foreground by default; background/unattended only after explicit approval
  • Iteration cap — required for background/unattended runs; recommended for foreground runs
  • External research policy — web/search is off by default unless explicitly approved
  • Data boundary — do not expose private code, secrets, logs, or proprietary data to external sources

Show the run contract and ask for confirmation. One round minimum. Then start only after the user says go.

Verify vs Guard

  • Verify = "Did the target metric improve?" — measures progress
  • Guard = "Did anything else break?" — prevents regressions
  • Guard files are never modified
  • If verify passes but guard fails: rework up to 2 attempts, then discard

Decision Rules

ResultAction
----------------
Verify pass + Guard passKeep. Extract lesson.
Verify pass + Guard failRework within approved scope (max 2 attempts). If still failing, discard.
Verify failDiscard using approved rollback.
CrashStop unless the fix is clearly inside approved scope and non-destructive.
Syntax errorFix immediately only if caused by the current iteration and inside approved scope.

Escalation Ladder

See references/pivot-protocol.md for full details.

TriggerAction
-----------------
3 consecutive discardsREFINE — adjust within current strategy
5 consecutive discardsPIVOT — abandon strategy, try fundamentally different approach
2 PIVOTs without improvementAsk before external research unless pre-approved
3 PIVOTs without improvementSoft blocker — stop and report to human

A single successful keep resets all counters.

Long Run Hygiene

  • Every completed experiment must be recorded before the next one starts
  • Re-read original instructions every 10 iterations to prevent context drift
  • Log: one row per iteration (iteration, commit/snapshot, metric, delta, status, description)
  • For background runs, send progress at the approved cadence and stop at the cap

Lessons

Extract structured lessons after:

  • Every kept iteration (what worked and why)
  • Every PIVOT decision (what failed and why)
  • Run completion

Store in autoresearch-lessons.md in the working repo root unless the user chose another path. Do not commit this file unless the user explicitly asks. Consult it at the start of each run. Keep about 50 entries, summarising older ones with time decay.

Safety

  • Foreground mode is the default. Background/unattended mode requires explicit approval and an iteration cap.
  • Make changes only inside approved scope.
  • Commit, snapshot, or otherwise record only your own changes before verification.
  • Revert only changes made by the current loop.
  • Never reset unrelated user work.
  • Never modify guard files unless the user explicitly changes the scope contract.
  • Do not run destructive commands, deploy, publish, push, or touch production systems unless explicitly approved for this run.
  • Do not use web search or external sources unless the run contract allows it.
  • Do not paste private code, secrets, logs, customer data, or proprietary data into external services.
  • Stop and report if the metric cannot be measured mechanically.

版本历史

共 3 个版本

  • v0.2.1 当前
    2026-05-25 17:04 安全 安全
  • v0.2.0
    2026-05-23 23:29 安全 安全
  • v0.1.0
    2026-05-21 15:49 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

design-media

Visual Architecture

leostehlik
使用本地确定性SVG渲染器将结构化JSON渲染为简约架构图
★ 0 📥 583
ai-agent

self-improving agent

pskoett
记录自身发现以实现自我改进的技能
★ 4,167 📥 940,620
ai-agent

Agent Browser

rez0
用于 AI 代理的浏览器自动化 CLI。当用户需要与网站交互(包括浏览页面、填写表单、点击按钮、截图等)时使用。
★ 868 📥 347,746