{
  "schemaVersion": "1.0",
  "item": {
    "slug": "acc-error-memory",
    "name": "ACC Error Memory",
    "source": "tencent",
    "type": "skill",
    "category": "AI 智能",
    "sourceUrl": "https://clawhub.ai/ImpKind/acc-error-memory",
    "canonicalUrl": "https://clawhub.ai/ImpKind/acc-error-memory",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/acc-error-memory",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=acc-error-memory",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "README.md",
      "SKILL.md",
      "install.sh",
      "scripts/analyze-day.sh",
      "scripts/calibrate-patterns.sh",
      "scripts/encode-pipeline.sh"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "slug": "acc-error-memory",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-28T23:38:57.936Z",
      "expiresAt": "2026-05-05T23:38:57.936Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=acc-error-memory",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=acc-error-memory",
        "contentDisposition": "attachment; filename=\"acc-error-memory-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "acc-error-memory"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/acc-error-memory"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/acc-error-memory",
    "agentPageUrl": "https://openagent3.xyz/skills/acc-error-memory/agent",
    "manifestUrl": "https://openagent3.xyz/skills/acc-error-memory/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/acc-error-memory/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Anterior Cingulate Memory ⚡",
        "body": "Conflict detection and error monitoring for AI agents. Part of the AI Brain series.\n\nThe anterior cingulate cortex (ACC) monitors for errors and conflicts. This skill gives your AI agent the ability to learn from mistakes — tracking error patterns over time and becoming more careful in contexts where it historically fails."
      },
      {
        "title": "The Problem",
        "body": "AI agents make mistakes:\n\nMisunderstand user intent\nGive wrong information\nUse the wrong tone\nMiss context from earlier in conversation\n\nWithout tracking, the same mistakes repeat. The ACC detects and logs these errors, building awareness that persists across sessions."
      },
      {
        "title": "The Solution",
        "body": "Track error patterns with:\n\nPattern detection — recurring error types get escalated\nSeverity levels — normal (1x), warning (2x), critical (3+)\nResolution tracking — patterns clear after 30+ days\nWatermark system — incremental processing, no re-analysis"
      },
      {
        "title": "ACC_MODELS (Model Agnostic)",
        "body": "The LLM screening and calibration scripts are model-agnostic. Set ACC_MODELS to use any CLI-accessible model:\n\n# Default (Anthropic Claude via CLI)\nexport ACC_MODELS=\"claude --model haiku -p,claude --model sonnet -p\"\n\n# Ollama (local)\nexport ACC_MODELS=\"ollama run llama3,ollama run mistral\"\n\n# OpenAI\nexport ACC_MODELS=\"openai chat -m gpt-4o-mini,openai chat -m gpt-4o\"\n\n# Single model (no fallback)\nexport ACC_MODELS=\"claude --model haiku -p\"\n\nFormat: Comma-separated CLI commands. Each command is invoked with the prompt appended as the final argument. Models are tried in order — if the first fails/times out (45s), the next is used as fallback.\n\nScripts that use ACC_MODELS:\n\nhaiku-screen.sh — LLM confirmation of regex-filtered error candidates\ncalibrate-patterns.sh — Pattern calibration via LLM classification"
      },
      {
        "title": "1. Install",
        "body": "cd ~/.openclaw/workspace/skills/anterior-cingulate-memory\n./install.sh --with-cron\n\nThis will:\n\nCreate memory/acc-state.json with empty patterns\nGenerate ACC_STATE.md for session context\nSet up cron for analysis 3x daily (4 AM, 12 PM, 8 PM)"
      },
      {
        "title": "2. Check current state",
        "body": "./scripts/load-state.sh\n# ⚡ ACC State Loaded:\n# Active patterns: 2\n# - tone_mismatch: 2x (warning)\n# - missed_context: 1x (normal)"
      },
      {
        "title": "3. Manual error logging",
        "body": "./scripts/log-error.sh \\\n  --pattern \"factual_error\" \\\n  --context \"Stated Python 3.9 was latest when it's 3.12\" \\\n  --mitigation \"Always web search for version numbers\""
      },
      {
        "title": "4. Check for resolved patterns",
        "body": "./scripts/resolve-check.sh\n# Checks patterns not seen in 30+ days"
      },
      {
        "title": "Scripts",
        "body": "ScriptPurposepreprocess-errors.shExtract user+assistant exchanges since watermarkencode-pipeline.shRun full preprocessing pipelinelog-error.shLog an error with pattern, context, mitigationload-state.shHuman-readable state for session contextresolve-check.shCheck for patterns ready to resolve (30+ days)update-watermark.shUpdate processing watermarksync-state.shGenerate ACC_STATE.md from acc-state.jsonlog-event.shLog events for brain analytics"
      },
      {
        "title": "1. Preprocessing Pipeline",
        "body": "The encode-pipeline.sh extracts exchanges from session transcripts:\n\n./scripts/encode-pipeline.sh --no-spawn\n# ⚡ ACC Encode Pipeline\n# Step 1: Extracting exchanges...\n# Found 47 exchanges to analyze\n\nOutput: pending-errors.json with user+assistant pairs:\n\n[\n  {\n    \"assistant_text\": \"The latest Python version is 3.9\",\n    \"user_text\": \"Actually it's 3.12 now\",\n    \"timestamp\": \"2026-02-11T10:00:00Z\"\n  }\n]"
      },
      {
        "title": "2. Error Analysis (via Cron Agent)",
        "body": "An LLM (configured via ACC_MODELS) analyzes each exchange for:\n\nDirect corrections (\"no\", \"wrong\", \"that's not right\")\nImplicit corrections (\"actually...\", \"I meant...\")\nFrustration signals (\"you're not understanding\")\nUser confusion caused by the agent"
      },
      {
        "title": "3. Pattern Tracking",
        "body": "Errors are logged with pattern names:\n\n./scripts/log-error.sh --pattern \"factual_error\" --context \"...\" --mitigation \"...\"\n\nPatterns escalate with repetition:\n\n1x → normal (noted)\n2x → warning (watch for this)\n3+ → critical (actively avoid!)"
      },
      {
        "title": "4. Resolution",
        "body": "Patterns not seen for 30+ days move to resolved:\n\n./scripts/resolve-check.sh\n# ✓ Resolved: version_numbers (32 days clear)"
      },
      {
        "title": "Cron Schedule",
        "body": "Default: 3x daily for faster feedback loop\n\n# Add to cron\nopenclaw cron add --name acc-analysis \\\n  --cron \"0 4,12,20 * * *\" \\\n  --session isolated \\\n  --agent-turn \"Run ACC analysis pipeline...\""
      },
      {
        "title": "State File Format",
        "body": "{\n  \"version\": \"2.0\",\n  \"lastUpdated\": \"2026-02-11T12:00:00Z\",\n  \"activePatterns\": {\n    \"factual_error\": {\n      \"count\": 3,\n      \"severity\": \"critical\",\n      \"firstSeen\": \"2026-02-01T10:00:00Z\",\n      \"lastSeen\": \"2026-02-10T15:00:00Z\",\n      \"context\": \"Stated outdated version numbers\",\n      \"mitigation\": \"Always verify versions with web search\"\n    }\n  },\n  \"resolved\": {\n    \"tone_mismatch\": {\n      \"count\": 2,\n      \"resolvedAt\": \"2026-02-11T04:00:00Z\",\n      \"daysClear\": 32\n    }\n  },\n  \"stats\": {\n    \"totalErrorsLogged\": 15\n  }\n}"
      },
      {
        "title": "Event Logging",
        "body": "Track ACC activity over time:\n\n./scripts/log-event.sh analysis errors_found=2 patterns_active=3 patterns_resolved=1\n\nEvents append to ~/.openclaw/workspace/memory/brain-events.jsonl:\n\n{\"ts\":\"2026-02-11T12:00:00Z\",\"type\":\"acc\",\"event\":\"analysis\",\"errors_found\":2,\"patterns_active\":3}"
      },
      {
        "title": "Add to session startup (AGENTS.md)",
        "body": "## Every Session\n1. Load hippocampus: `./scripts/load-core.sh`\n2. Load emotional state: `./scripts/load-emotion.sh`\n3. **Load error patterns:** `~/.openclaw/workspace/skills/anterior-cingulate-memory/scripts/load-state.sh`"
      },
      {
        "title": "Behavior Guidelines",
        "body": "When you see patterns in ACC state:\n\n🔴 Critical (3+) — actively verify before responding in this area\n⚠️ Warning (2x) — be extra careful\n✅ Resolved — lesson learned, don't repeat"
      },
      {
        "title": "Future: Amygdala Integration",
        "body": "Planned: Connect ACC to amygdala so errors affect emotional state:\n\nErrors → lower valence, higher alertness\nClean runs → maintain positive state\nPattern resolution → sense of accomplishment"
      },
      {
        "title": "AI Brain Series",
        "body": "PartFunctionStatushippocampusMemory formation, decay, reinforcement✅ Liveamygdala-memoryEmotional processing✅ Livevta-memoryReward and motivation✅ Liveanterior-cingulate-memoryConflict detection, error monitoring✅ Livebasal-ganglia-memoryHabit formation🚧 Developmentinsula-memoryInternal state awareness🚧 Development"
      },
      {
        "title": "Philosophy",
        "body": "The ACC in the human brain creates that \"something's off\" feeling — the pre-conscious awareness that you've made an error. This skill gives AI agents a similar capability: persistent awareness of mistake patterns that influences future behavior.\n\nMistakes aren't failures. They're data. The ACC turns that data into learning.\n\nBuilt with ⚡ by the OpenClaw community"
      }
    ],
    "body": "Anterior Cingulate Memory ⚡\n\nConflict detection and error monitoring for AI agents. Part of the AI Brain series.\n\nThe anterior cingulate cortex (ACC) monitors for errors and conflicts. This skill gives your AI agent the ability to learn from mistakes — tracking error patterns over time and becoming more careful in contexts where it historically fails.\n\nThe Problem\n\nAI agents make mistakes:\n\nMisunderstand user intent\nGive wrong information\nUse the wrong tone\nMiss context from earlier in conversation\n\nWithout tracking, the same mistakes repeat. The ACC detects and logs these errors, building awareness that persists across sessions.\n\nThe Solution\n\nTrack error patterns with:\n\nPattern detection — recurring error types get escalated\nSeverity levels — normal (1x), warning (2x), critical (3+)\nResolution tracking — patterns clear after 30+ days\nWatermark system — incremental processing, no re-analysis\nConfiguration\nACC_MODELS (Model Agnostic)\n\nThe LLM screening and calibration scripts are model-agnostic. Set ACC_MODELS to use any CLI-accessible model:\n\n# Default (Anthropic Claude via CLI)\nexport ACC_MODELS=\"claude --model haiku -p,claude --model sonnet -p\"\n\n# Ollama (local)\nexport ACC_MODELS=\"ollama run llama3,ollama run mistral\"\n\n# OpenAI\nexport ACC_MODELS=\"openai chat -m gpt-4o-mini,openai chat -m gpt-4o\"\n\n# Single model (no fallback)\nexport ACC_MODELS=\"claude --model haiku -p\"\n\n\nFormat: Comma-separated CLI commands. Each command is invoked with the prompt appended as the final argument. Models are tried in order — if the first fails/times out (45s), the next is used as fallback.\n\nScripts that use ACC_MODELS:\n\nhaiku-screen.sh — LLM confirmation of regex-filtered error candidates\ncalibrate-patterns.sh — Pattern calibration via LLM classification\nQuick Start\n1. Install\ncd ~/.openclaw/workspace/skills/anterior-cingulate-memory\n./install.sh --with-cron\n\n\nThis will:\n\nCreate memory/acc-state.json with empty patterns\nGenerate ACC_STATE.md for session context\nSet up cron for analysis 3x daily (4 AM, 12 PM, 8 PM)\n2. Check current state\n./scripts/load-state.sh\n# ⚡ ACC State Loaded:\n# Active patterns: 2\n# - tone_mismatch: 2x (warning)\n# - missed_context: 1x (normal)\n\n3. Manual error logging\n./scripts/log-error.sh \\\n  --pattern \"factual_error\" \\\n  --context \"Stated Python 3.9 was latest when it's 3.12\" \\\n  --mitigation \"Always web search for version numbers\"\n\n4. Check for resolved patterns\n./scripts/resolve-check.sh\n# Checks patterns not seen in 30+ days\n\nScripts\nScript\tPurpose\npreprocess-errors.sh\tExtract user+assistant exchanges since watermark\nencode-pipeline.sh\tRun full preprocessing pipeline\nlog-error.sh\tLog an error with pattern, context, mitigation\nload-state.sh\tHuman-readable state for session context\nresolve-check.sh\tCheck for patterns ready to resolve (30+ days)\nupdate-watermark.sh\tUpdate processing watermark\nsync-state.sh\tGenerate ACC_STATE.md from acc-state.json\nlog-event.sh\tLog events for brain analytics\nHow It Works\n1. Preprocessing Pipeline\n\nThe encode-pipeline.sh extracts exchanges from session transcripts:\n\n./scripts/encode-pipeline.sh --no-spawn\n# ⚡ ACC Encode Pipeline\n# Step 1: Extracting exchanges...\n# Found 47 exchanges to analyze\n\n\nOutput: pending-errors.json with user+assistant pairs:\n\n[\n  {\n    \"assistant_text\": \"The latest Python version is 3.9\",\n    \"user_text\": \"Actually it's 3.12 now\",\n    \"timestamp\": \"2026-02-11T10:00:00Z\"\n  }\n]\n\n2. Error Analysis (via Cron Agent)\n\nAn LLM (configured via ACC_MODELS) analyzes each exchange for:\n\nDirect corrections (\"no\", \"wrong\", \"that's not right\")\nImplicit corrections (\"actually...\", \"I meant...\")\nFrustration signals (\"you're not understanding\")\nUser confusion caused by the agent\n3. Pattern Tracking\n\nErrors are logged with pattern names:\n\n./scripts/log-error.sh --pattern \"factual_error\" --context \"...\" --mitigation \"...\"\n\n\nPatterns escalate with repetition:\n\n1x → normal (noted)\n2x → warning (watch for this)\n3+ → critical (actively avoid!)\n4. Resolution\n\nPatterns not seen for 30+ days move to resolved:\n\n./scripts/resolve-check.sh\n# ✓ Resolved: version_numbers (32 days clear)\n\nCron Schedule\n\nDefault: 3x daily for faster feedback loop\n\n# Add to cron\nopenclaw cron add --name acc-analysis \\\n  --cron \"0 4,12,20 * * *\" \\\n  --session isolated \\\n  --agent-turn \"Run ACC analysis pipeline...\"\n\nState File Format\n{\n  \"version\": \"2.0\",\n  \"lastUpdated\": \"2026-02-11T12:00:00Z\",\n  \"activePatterns\": {\n    \"factual_error\": {\n      \"count\": 3,\n      \"severity\": \"critical\",\n      \"firstSeen\": \"2026-02-01T10:00:00Z\",\n      \"lastSeen\": \"2026-02-10T15:00:00Z\",\n      \"context\": \"Stated outdated version numbers\",\n      \"mitigation\": \"Always verify versions with web search\"\n    }\n  },\n  \"resolved\": {\n    \"tone_mismatch\": {\n      \"count\": 2,\n      \"resolvedAt\": \"2026-02-11T04:00:00Z\",\n      \"daysClear\": 32\n    }\n  },\n  \"stats\": {\n    \"totalErrorsLogged\": 15\n  }\n}\n\nEvent Logging\n\nTrack ACC activity over time:\n\n./scripts/log-event.sh analysis errors_found=2 patterns_active=3 patterns_resolved=1\n\n\nEvents append to ~/.openclaw/workspace/memory/brain-events.jsonl:\n\n{\"ts\":\"2026-02-11T12:00:00Z\",\"type\":\"acc\",\"event\":\"analysis\",\"errors_found\":2,\"patterns_active\":3}\n\nIntegration with OpenClaw\nAdd to session startup (AGENTS.md)\n## Every Session\n1. Load hippocampus: `./scripts/load-core.sh`\n2. Load emotional state: `./scripts/load-emotion.sh`\n3. **Load error patterns:** `~/.openclaw/workspace/skills/anterior-cingulate-memory/scripts/load-state.sh`\n\nBehavior Guidelines\n\nWhen you see patterns in ACC state:\n\n🔴 Critical (3+) — actively verify before responding in this area\n⚠️ Warning (2x) — be extra careful\n✅ Resolved — lesson learned, don't repeat\nFuture: Amygdala Integration\n\nPlanned: Connect ACC to amygdala so errors affect emotional state:\n\nErrors → lower valence, higher alertness\nClean runs → maintain positive state\nPattern resolution → sense of accomplishment\nAI Brain Series\nPart\tFunction\tStatus\nhippocampus\tMemory formation, decay, reinforcement\t✅ Live\namygdala-memory\tEmotional processing\t✅ Live\nvta-memory\tReward and motivation\t✅ Live\nanterior-cingulate-memory\tConflict detection, error monitoring\t✅ Live\nbasal-ganglia-memory\tHabit formation\t🚧 Development\ninsula-memory\tInternal state awareness\t🚧 Development\nPhilosophy\n\nThe ACC in the human brain creates that \"something's off\" feeling — the pre-conscious awareness that you've made an error. This skill gives AI agents a similar capability: persistent awareness of mistake patterns that influences future behavior.\n\nMistakes aren't failures. They're data. The ACC turns that data into learning.\n\nBuilt with ⚡ by the OpenClaw community"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/ImpKind/acc-error-memory",
    "publisherUrl": "https://clawhub.ai/ImpKind/acc-error-memory",
    "owner": "ImpKind",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/acc-error-memory",
    "downloadUrl": "https://openagent3.xyz/downloads/acc-error-memory",
    "agentUrl": "https://openagent3.xyz/skills/acc-error-memory/agent",
    "manifestUrl": "https://openagent3.xyz/skills/acc-error-memory/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/acc-error-memory/agent.md"
  }
}