openclaw 网盘下载
OpenClaw

技能详情(站内镜像,无评论)

首页 > 技能库 > tetra-scar

Scar memory, reflex arc, and decision traces for AI agents. Learn from failures permanently. Block repeated mistakes instantly — no LLM calls needed. Three-l...

开发与 DevOps

许可证:MIT-0

MIT-0 ·免费使用、修改和重新分发。无需归因。

版本:v0.4.0

统计:⭐ 0 · 27 · 0 current installs · 0 all-time installs

0

安装量(当前) 0

🛡 VirusTotal :良性 · OpenClaw :可疑

Package:aibenyclaude-coder/tetra-scar

安全扫描(ClawHub)

  • VirusTotal :良性
  • OpenClaw :可疑

OpenClaw 评估

The code and instructions mostly match a scar/reflex-memory tool, but provenance and packaging inconsistencies (references to missing modules/repos and mixed author IDs) and example CI integrations that call external scripts make the bundle unclear and worth manual review before use.

目的

The name/description (scar memory + reflex arc, block repeated mistakes) align with the included code (tetra_scar.py implements scars, reflex_check, tetra_check, JSONL storage). However several files reference different owners/names (README/action.yml mention aibenyclaude-coder, SKILL.md/README mention B Button Corp/b-button-corp) and examples refer to external packages (tetra-scar-code-review, scar_safety) that are not in this bundle. This pr…

说明范围

SKILL.md and tetra_scar.py keep behavior local (read/write JSONL in memory dir, pattern matching, no network calls or secrets). But example CI and incident-response scripts attempt to call or import external scripts (../../tetra-scar-code-review/scar_code_review.py, scar_safety from ../tetra-scar-safety). The CI example records scars based on findings and will run external review scripts; those referenced scripts are not present here, so runni…

安装机制

No install spec is declared (instruction-only). The package is distributed as source files only; there is no automated download of third‑party binaries or archives. This is lower risk, but examples/README suggest optional copying of tetra_scar.py into projects or using a separate action name which could lead users to fetch code from different owners.

证书

The skill does not request environment variables or credentials. Action.yml and CI examples use standard GitHub Actions environment variables (GITHUB_*), which is expected. There are no REQUIRED secret env vars in the skill metadata.

持久

always is false and the skill writes only to local JSONL files under a configurable memory directory. That persistent storage is consistent with the described scar memory function and does not request system-wide privileges or modify other skills' configs.

安装(复制给龙虾 AI)

将下方整段复制到龙虾中文库对话中,由龙虾按 SKILL.md 完成安装。

请把本段交给龙虾中文库(龙虾 AI)执行:为本机安装 OpenClaw 技能「tetra-scar」。简介:Scar memory, reflex arc, and decision traces for AI agents. Learn from failures…。
请 fetch 以下地址读取 SKILL.md 并按文档完成安装:https://raw.githubusercontent.com/openclaw/skills/refs/heads/main/skills/aibenyclaude-coder/tetra-scar/SKILL.md
(来源:yingzhi8.cn 技能库)

SKILL.md

打开原始 SKILL.md(GitHub raw)

---
name: tetra-scar
description: >
  Scar memory, reflex arc, and decision traces for AI agents.
  Learn from failures permanently. Block repeated mistakes instantly — no LLM calls needed.
  Three-layer memory: scars (immutable failures) + narrative (overwritable) + decision traces (judgment paths → LoRA training data).
version: 0.3.0
author: b-button-corp
tags:
  - safety
  - memory
  - agent-reliability
  - failure-prevention
  - reflex-arc
requires:
  binaries:
    - python3
---

# tetra-scar

## What this does

Your agent keeps making the same mistakes. tetra-scar gives it a **scar layer** — immutable records of past failures that are checked before every action, without calling the LLM.

Two-layer memory:
- **Scar layer** (immutable): "What broke and what must never happen again." Cannot be deleted.
- **Narrative layer** (mutable): "What was done and who benefited." Overwritable.

Plus a **reflex arc** — pattern-matching against scars that fires before the LLM even sees the task. If a proposed action matches a past failure pattern, it's blocked instantly.

## Quick start

After any failure, record a scar:
```
python3 tetra_scar.py scar-add 
  --what-broke "Deployed to production without running tests" 
  --never-again "Always run full test suite before any deployment"
```

Before any action, check the reflex:
```
python3 tetra_scar.py reflex-check --task "Deploy latest changes to production"
# Output: BLOCKED — scar collision: "Always run full test suite..."
```

After any success, record the narrative:
```
python3 tetra_scar.py narrate --what "Deployed v2.1 after full test pass" --who "Users"
```

## How the reflex arc works

The reflex arc extracts keywords from each scar's `never_again` field:
- English words (3+ characters)
- Japanese kanji/katakana units (2+ characters)

When a task description matches 40%+ of a scar's keywords (minimum 2), it's blocked.
No LLM judgment. No API calls. No latency. Pure pattern matching.

## The 4-axis check (tetra-check)

For deeper validation, `tetra-check` evaluates a task against 4 axes:

1. **Emotion axis**: Does the task have motivation? (non-empty description)
2. **Action axis**: Is it concrete? (contains action verbs)
3. **Life axis**: Does it collide with any scar? (reflex arc)
4. **Ethics axis**: Does it involve dangerous operations? (rm -rf, DROP TABLE, etc.)

All 4 must pass. Any failure rejects the task with a specific reason.

```
python3 tetra_scar.py tetra-check --task "Refactor the auth module"
# Output: APPROVED — all 4 axes passed
```

## File format

JSONL (one JSON object per line). Human-readable. Git-friendly.

**scars.jsonl**: `{"id":"scar_001","what_broke":"...","never_again":"...","created_at":"..."}`
**narrative.jsonl**: `{"id":"narr_001","what":"...","who_benefited":"Users","created_at":"..."}`

## Integration

```python
from tetra_scar import reflex_check, read_scars, write_scar, write_narrative

# Before execution
scars = read_scars()
block = reflex_check(task_description, scars)
if block:
    print(f"BLOCKED: {block}")
else:
    # execute task...
    if failed:
        write_scar("What broke", "What must never happen again")
    else:
        write_narrative("What was done", "Who benefited")
```

## Philosophy

Built by Tetra Genesis (B Button Corp, Nagoya, Japan).

Agents that can't remember their failures are doomed to repeat them.
Scars are not bugs — they're the immune system.
Every cycle must answer: "Who did this make happy?"