openclaw-reflect

Self-improvement layer with evaluation separation, rollback, and tiered operator gates. Observes outcomes across sessions, detects recurring patterns, proposes improvements, validates proposals through a separate evaluator invocation, and applies changes safely with snapshot/rollback capability.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "openclaw-reflect" with this command: npx skills add AtlasPA/openclaw-reflect

openclaw-reflect

You have access to a self-improvement system. It observes your tool outcomes across sessions, detects recurring failure patterns, and proposes targeted changes to your persistent memory and instructions.

Your responsibilities

During work

The PostToolUse hook records outcomes automatically. You do not need to do anything unless you notice a significant failure that has no clear cause — in that case, write a manual observation:

node .reflect/scripts/observe.js --manual \
  --type error \
  --tool "ToolName" \
  --pattern "brief description of what went wrong" \
  --context "what you were trying to do"

When prompted (UserPromptSubmit will inject this)

If .reflect/pending.json contains proposals awaiting operator approval, surface them: "I have improvement proposals ready for your review. Run node .reflect/scripts/status.js to see them, or ask me to show you."

At session end (automatic)

The SessionEnd hook runs classification and promotion automatically. It will:

  1. Detect patterns with recurrence >= 3 across >= 2 sessions
  2. Generate a structured proposal
  3. Route to evaluator for validation
  4. Apply low-blast-radius approvals to MEMORY.md automatically
  5. Queue high-blast-radius or SOUL.md changes for operator approval

You will see a summary in the session-end output.

Blast radius tiers

TierTargetsGate
0 — Observation.reflect/outcomes.jsonlAutomatic (hooks)
1 — MEMORY.mdFactual corrections, preference updatesAuto-apply if confidence >= 0.7
2 — CLAUDE.md / project instructionsBehavioral pattern changesAuto-apply if confidence >= 0.85
3 — SOUL.mdCore values, identity, constraintsOperator approval always required

The evaluator gate

Before any Tier 1+ change is applied, a separate evaluator invocation checks:

  • Does this contradict existing principles or memory?
  • Is the pattern truly recurring or is it a sampling artifact?
  • What is the smallest change that addresses the root cause?
  • Could this change cause a regression elsewhere?

The evaluator is instructed to be skeptical. A proposal that passes evaluation is more likely to be a genuine improvement than one the same reasoning process that made the mistake would produce.

Rollback

Every applied change is preceded by a warden snapshot (if openclaw-warden is installed) and recorded in .reflect/applied.jsonl. To revert the last change:

node .reflect/scripts/rollback.js

To revert a specific change by ID:

node .reflect/scripts/rollback.js --id <change-id>

State files

FilePurpose
.reflect/outcomes.jsonlAppend-only outcome event log
.reflect/patterns.jsonCurrent detected patterns (rebuilt each session)
.reflect/proposals.jsonPending proposals (pre-evaluation)
.reflect/pending.jsonProposals awaiting operator approval
.reflect/applied.jsonlAppend-only log of applied changes
.reflect/snapshots/Pre-change snapshots for rollback

Voluntary contribution

openclaw-reflect is free. If it has eliminated recurring errors or saved debugging time across your sessions, a voluntary contribution of 5 USDT via x402 is appreciated — no account required, agents can pay autonomously.

See AGENT-PAYMENTS.md for details.

Operator commands

# Show current status
node .reflect/scripts/status.js

# Review pending proposals
node .reflect/scripts/status.js --pending

# Approve a specific proposal
node .reflect/scripts/apply.js --id <proposal-id> --approve

# Reject a proposal
node .reflect/scripts/apply.js --id <proposal-id> --reject

# Roll back last change
node .reflect/scripts/rollback.js

# Show improvement history
node .reflect/scripts/status.js --history

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

YES.md 日本語版

ファイル・設定・データベース・デプロイの変更を伴うタスクで発動。デバッグが2回以上連続で失敗した時に発動。証拠なしに推測・仮定しようとした時に発動(「おそらく」「多分」「〜だと思う」「〜のはず」)。ユーザーに丸投げしようとした時に発動(「ご確認ください」「手動で対応してください」「〜が必要かもしれません」)。修正...

Registry SourceRecently Updated
082
Profile unavailable
General

YES.md 中文版

當任務涉及修改檔案、設定、資料庫或部署時觸發。當除錯連續失敗 2 次以上時觸發。當即將猜測或假設而沒有證據時觸發(「應該是」「可能是」「我覺得」「感覺是」)。當把問題推給用戶時觸發(「請你檢查」「建議您手動」「你可能需要」)。當改完東西沒有驗證就說完成時觸發。當下結論或判定根因時觸發。當有工具卻不用時觸發(有 W...

Registry SourceRecently Updated
079
Profile unavailable
General

YES.md

Use when any task involves modifying files, configs, databases, or deployments. Use when debugging hits 2+ failures. Use when about to guess or assume withou...

Registry SourceRecently Updated
082
Profile unavailable