← 返回
AI智能 中文

Failure Memory Log

Automatic failure pattern recording and recall system. Prevents repeating the same mistakes by logging errors with context, root cause, and resolution. Use w...
自动故障模式记录与召回系统。通过记录错误的上下文、根本原因和解决方案,防止重复同样的错误。使用...
voidlight00
AI智能 clawhub v1.0.0 1 版本 99876.2 Key: 无需
★ 2
Stars
📥 767
下载
💾 20
安装
1
版本
#latest

概述

Failure Memory

Record failures. Learn from them. Never repeat them.

Core Concept

Every failure has three parts:

  1. What happened (error message, symptom)
  2. Why it happened (root cause)
  3. How to fix/avoid it (resolution)

This skill stores them in a searchable markdown file and provides a recall mechanism before starting similar tasks.

File Structure

memory/
└── failures.md      # All failure records (append-only log)

Recording a Failure

When an error occurs during work, append to memory/failures.md:

## [YYYY-MM-DD HH:mm] <short title>

- **Category:** <build|deploy|config|api|permissions|data|logic|network|dependency>
- **Context:** <what you were trying to do>
- **Error:** `<exact error message or symptom>`
- **Root Cause:** <why it happened>
- **Resolution:** <what fixed it>
- **Prevention:** <how to avoid next time>
- **Tags:** <comma-separated keywords for search>

When to Record

Record AUTOMATICALLY when:

  • A shell command exits non-zero and you identify why
  • An API call fails and you find the cause
  • A config/setup step fails and you resolve it
  • You catch yourself repeating a previously-solved mistake
  • A sub-agent reports an error with resolution

Do NOT record:

  • Transient network timeouts (unless pattern emerges)
  • Intentional test failures
  • User-cancelled operations

Pre-Task Recall

Before starting any significant task, search failures for relevant history:

grep -i "<keyword>" memory/failures.md

Or use memory_search if vector search is available:

memory_search query="<task description> failure error"

If matches found, mention them briefly:

> ⚠️ Known pitfall: [title] — [prevention tip]

Failure Report

When asked for a failure report or review, generate a summary:

  1. Read memory/failures.md
  2. Group by category
  3. Identify repeat patterns (same root cause appearing multiple times)
  4. Suggest systemic fixes for patterns

Report Format

# Failure Report — YYYY-MM-DD

## Stats
- Total: N failures recorded
- Top category: <category> (N occurrences)
- Repeat offenders: N patterns seen 2+ times

## Repeat Patterns
### <pattern name>
- Seen: N times
- Root cause: <shared cause>
- Systemic fix: <recommendation>

## Recent Failures (last 7 days)
- [date] <title> — <resolution>

Initialization

Run scripts/init.sh to set up the failures file:

bash scripts/init.sh [memory_dir]

Default memory_dir: ./memory

Best Practices

  1. Be specific — "EACCES on /var/run/docker.sock" beats "permission error"
  2. Include the exact error — Future grep depends on it
  3. Tag generously — More tags = better recall
  4. Review monthly — Patterns reveal systemic issues
  5. Link to fixes — Reference commits, PRs, or config changes when possible

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-30 03:57 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-intelligence

Nano Banana Pro

steipete
使用 Nano Banana Pro (Gemini 3 Pro Image) 生成或编辑图像。支持文生图、图生图及 1K/2K/4K 分辨率,适用于图像创建、修改及编辑请求,使用 --input-image 指定输入图像。
★ 418 📥 115,280
ai-intelligence

ontology

oswalpalash
类型化知识图谱,用于结构化智能体记忆与可组合技能。支持创建/查询实体(人员、项目、任务、事件、文档)及关联...
★ 714 📥 243,982
ai-intelligence

Proactive Agent

halthelobster
将AI智能体从任务执行者升级为主动预判需求、持续优化的智能伙伴。集成WAL协议、工作缓冲区、自主定时任务及实战验证模式。Hal Stack核心组件 🦞
★ 837 📥 213,272