{
  "schemaVersion": "1.0",
  "item": {
    "slug": "firm-hebbian-memory",
    "name": "Firm Hebbian Memory",
    "source": "tencent",
    "type": "skill",
    "category": "AI 智能",
    "sourceUrl": "https://clawhub.ai/romainsantoli-web/firm-hebbian-memory",
    "canonicalUrl": "https://clawhub.ai/romainsantoli-web/firm-hebbian-memory",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/firm-hebbian-memory",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=firm-hebbian-memory",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md"
    ],
    "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. 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. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/firm-hebbian-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/firm-hebbian-memory",
    "agentPageUrl": "https://openagent3.xyz/skills/firm-hebbian-memory/agent",
    "manifestUrl": "https://openagent3.xyz/skills/firm-hebbian-memory/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/firm-hebbian-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. 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. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "firm-hebbian-memory",
        "body": "⚠️ Contenu généré par IA — validation humaine requise avant déploiement en production."
      },
      {
        "title": "Purpose",
        "body": "Ce skill rend le Claude.md vivant et auto-évolutif via des mécanismes inspirés\nde la plasticité synaptique hebbienne. Les patterns de travail qui se répètent sont\nrenforcés, ceux qui deviennent obsolètes s'atrophient naturellement.\n\nInspiration neurobiologique :\n\nPlasticité hebbienne → renforcement des poids Layer 2 par co-activation\nMémoire hippocampique → stockage épisodique en base vectorielle (pgvector)\nConsolidation néocorticale → job d'analyse transformant les épisodes en schémas"
      },
      {
        "title": "Architecture — 4 couches Claude.md (CDC §3.3)",
        "body": "CoucheNomModificationLayer 1CORE (immuable)Humain uniquementLayer 2CONSOLIDATED PATTERNSAuto-mise à jour (poids hebbiens)Layer 3EPISODIC INDEXAuto-mise à jour (pointeurs sessions)Layer 4META INSTRUCTIONSLecture seule pour le système auto"
      },
      {
        "title": "Runtime (2 tools)",
        "body": "openclaw_hebbian_harvest        — ingest JSONL session logs → SQLite (PII stripped)\nopenclaw_hebbian_weight_update  — calcul/application des poids hebbiens (dry_run par défaut)"
      },
      {
        "title": "Audit (6 tools)",
        "body": "openclaw_hebbian_analyze           — analyse co-activation patterns (Jaccard)\nopenclaw_hebbian_status            — dashboard poids, atrophie, promotions\nopenclaw_hebbian_layer_validate    — validation structure 4 couches\nopenclaw_hebbian_pii_check         — audit config PII stripping\nopenclaw_hebbian_decay_config_check — validation paramètres hebbiens\nopenclaw_hebbian_drift_check       — détection drift sémantique vs baseline"
      },
      {
        "title": "Formule de mise à jour des poids (CDC §4.3)",
        "body": "nouveau_poids = ancien_poids + (learning_rate × activation) - (decay × (1 - activation))\n\n# Paramètres par défaut\nlearning_rate = 0.05    # Renforcement si activée\ndecay         = 0.02    # Atrophie si non-activée\npoids_min     = 0.0     # Floor — suppression si < 0.10\npoids_max     = 0.95    # Ceiling — promotion CORE si > 0.95"
      },
      {
        "title": "Seuils de consolidation",
        "body": "TransitionConditionÉpisodique → ÉmergentActivé 5 sessions consécutivesÉmergent → Fortpoids > 0.8 sur 20 sessionsFort → COREValidation humaine obligatoireAtrophie → Suppressionpoids < 0.10 pendant 4 semaines + PR humaine"
      },
      {
        "title": "Sécurité (CDC §5.2)",
        "body": "PII stripping obligatoire : regex sur emails, phones, IPs, API keys, SSN, JWT, AWS keys, chemins Unix home\nSecrets détectés : session rejetée + alerte immédiate\nAccès BDD : localhost/VPN uniquement\nRotation embeddings : policy de ré-embedding si fuite suspectée\nRéversibilité : chaque modification = 1 commit Git atomique\nPath whitelist : configurable via HEBBIAN_ALLOWED_DIRS (env) — protège containers/multi-user"
      },
      {
        "title": "Limitations connues (PII)",
        "body": "Le stripping regex couvre les catégories les plus courantes (10 patterns) mais ne\ndétecte pas les credentials embarqués dans des URLs de connexion (e.g.\npostgres://user:password@host/db) ni les variables d'environnement loguées dans\ndes stack traces (DB_URL=...). Un scanner de secrets dédié (e.g. trufflehog,\ndetect-secrets) est recommandé en complément pour les environnements à haute\nsensibilité."
      },
      {
        "title": "Anti-dérive (CDC §5.1)",
        "body": "Aucune règle ne peut atteindre poids = 1.0 automatiquement (max 0.95)\nDétecteur de drift : alerte si cosine similarity vs baseline < 0.7\n3 changements auto consécutifs → review forcée\nSnapshot mensuel archivé en Git tag"
      },
      {
        "title": "Pipeline global",
        "body": "[ Session Claude Code ]\n         ↓ fin de session\n[ openclaw_hebbian_harvest ] → extrait résumé + tags + règles (PII stripped)\n         ↓\n[ SQLite local ] → stockage épisodique structuré\n         ↓\n[ openclaw_hebbian_analyze ] → clustering Jaccard + co-activations\n         ↓\n[ openclaw_hebbian_weight_update ] → mise à jour Layer 2 (dry_run=True)\n         ↓\n[ Human Review ] → validation avant application (dry_run=False)"
      },
      {
        "title": "Hook post-session (MVP)",
        "body": "Sans hook automatique, l'ingestion reste manuelle — adoption = zéro.\nVoici le minimum pour boucler le pipeline dès le MVP."
      },
      {
        "title": "Option A — Script shell (le plus simple)",
        "body": "Créer ~/.openclaw/hooks/post-session.sh :\n\n#!/usr/bin/env bash\n# Hook post-session: ingest le dernier JSONL automatiquement\nset -euo pipefail\n\nSESSION_LOG=\"${1:-$(ls -t ~/.openclaw/sessions/*.jsonl 2>/dev/null | head -1)}\"\n[ -z \"$SESSION_LOG\" ] && exit 0\n\n# Appel MCP via curl (le serveur doit tourner sur :8012)\ncurl -s -X POST http://localhost:8012/mcp \\\n  -H \"Content-Type: application/json\" \\\n  -d \"{\n    \\\"method\\\": \\\"tools/call\\\",\n    \\\"params\\\": {\n      \\\"name\\\": \\\"openclaw_hebbian_harvest\\\",\n      \\\"arguments\\\": {\\\"session_jsonl_path\\\": \\\"$SESSION_LOG\\\"}\n    }\n  }\" | jq '.result.ingested // .error'"
      },
      {
        "title": "Option B — Entrée cron (automatisation passive)",
        "body": "# Toutes les 30 min, ingérer les nouveaux JSONL\n*/30 * * * * /bin/bash ~/.openclaw/hooks/post-session.sh >> ~/.openclaw/hebbian-harvest.log 2>&1"
      },
      {
        "title": "Option C — Intégration pi-coding-agent",
        "body": "Si le projet utilise pi-coding-agent, ajouter dans sa config :\n\n{\n  \"hooks\": {\n    \"post_session\": {\n      \"command\": \"~/.openclaw/hooks/post-session.sh\",\n      \"trigger\": \"on_session_end\"\n    }\n  }\n}\n\nNote : Le hook ne déclenche que le harvest (lecture). La mise à jour\ndes poids (weight_update) reste toujours manuelle avec dry_run=True par\ndéfaut — conformément à la règle absolue n°1 du CDC."
      },
      {
        "title": "Adaptation OpenClaw",
        "body": "Composant CDCAdaptation OpenClawHook post-sessionLecture fichiers .jsonl de pi-coding-agentClaude.md Layer 2Skills OpenClaw (.md ou .json)Claude.md Layer 4Extension pi-coding-agent dédiéeGitHub PR for reviewPR sur repo privé skillsSecrets strippingRenforcé — 9 patterns regex + détection runtime"
      },
      {
        "title": "Configuration requise",
        "body": "{\n  \"hebbian\": {\n    \"parameters\": {\n      \"learning_rate\": 0.05,\n      \"decay\": 0.02,\n      \"poids_min\": 0.0,\n      \"poids_max\": 0.95\n    },\n    \"thresholds\": {\n      \"episodic_to_emergent\": 5,\n      \"emergent_to_strong\": 0.8\n    },\n    \"pii_stripping\": {\n      \"enabled\": true,\n      \"patterns\": [\"email\", \"phone\", \"ip\", \"api_key\", \"ssn\"]\n    },\n    \"security\": {\n      \"secret_detection\": true,\n      \"access_restriction\": \"localhost\",\n      \"embedding_rotation\": \"on_breach\"\n    },\n    \"anti_drift\": {\n      \"max_consecutive_auto_changes\": 3\n    }\n  }\n}"
      },
      {
        "title": "Référence",
        "body": "CDC : cahier_des_charges_memoire_hebbienne.md v1.0.0\nModule : src/hebbian_memory.py\nModèles : 8 classes Pydantic dans src/models.py"
      },
      {
        "title": "💎 Support",
        "body": "Si ce skill vous est utile, vous pouvez soutenir le développement :\n\nDogecoin : DQBggqFNWsRNTPb6kkiwppnMo1Hm8edfWq"
      }
    ],
    "body": "firm-hebbian-memory\n\n⚠️ Contenu généré par IA — validation humaine requise avant déploiement en production.\n\nPurpose\n\nCe skill rend le Claude.md vivant et auto-évolutif via des mécanismes inspirés de la plasticité synaptique hebbienne. Les patterns de travail qui se répètent sont renforcés, ceux qui deviennent obsolètes s'atrophient naturellement.\n\nInspiration neurobiologique :\n\nPlasticité hebbienne → renforcement des poids Layer 2 par co-activation\nMémoire hippocampique → stockage épisodique en base vectorielle (pgvector)\nConsolidation néocorticale → job d'analyse transformant les épisodes en schémas\nArchitecture — 4 couches Claude.md (CDC §3.3)\nCouche\tNom\tModification\nLayer 1\tCORE (immuable)\tHumain uniquement\nLayer 2\tCONSOLIDATED PATTERNS\tAuto-mise à jour (poids hebbiens)\nLayer 3\tEPISODIC INDEX\tAuto-mise à jour (pointeurs sessions)\nLayer 4\tMETA INSTRUCTIONS\tLecture seule pour le système auto\nTools activés (8 tools)\nRuntime (2 tools)\nopenclaw_hebbian_harvest        — ingest JSONL session logs → SQLite (PII stripped)\nopenclaw_hebbian_weight_update  — calcul/application des poids hebbiens (dry_run par défaut)\n\nAudit (6 tools)\nopenclaw_hebbian_analyze           — analyse co-activation patterns (Jaccard)\nopenclaw_hebbian_status            — dashboard poids, atrophie, promotions\nopenclaw_hebbian_layer_validate    — validation structure 4 couches\nopenclaw_hebbian_pii_check         — audit config PII stripping\nopenclaw_hebbian_decay_config_check — validation paramètres hebbiens\nopenclaw_hebbian_drift_check       — détection drift sémantique vs baseline\n\nFormule de mise à jour des poids (CDC §4.3)\nnouveau_poids = ancien_poids + (learning_rate × activation) - (decay × (1 - activation))\n\n# Paramètres par défaut\nlearning_rate = 0.05    # Renforcement si activée\ndecay         = 0.02    # Atrophie si non-activée\npoids_min     = 0.0     # Floor — suppression si < 0.10\npoids_max     = 0.95    # Ceiling — promotion CORE si > 0.95\n\nSeuils de consolidation\nTransition\tCondition\nÉpisodique → Émergent\tActivé 5 sessions consécutives\nÉmergent → Fort\tpoids > 0.8 sur 20 sessions\nFort → CORE\tValidation humaine obligatoire\nAtrophie → Suppression\tpoids < 0.10 pendant 4 semaines + PR humaine\nSécurité (CDC §5.2)\nPII stripping obligatoire : regex sur emails, phones, IPs, API keys, SSN, JWT, AWS keys, chemins Unix home\nSecrets détectés : session rejetée + alerte immédiate\nAccès BDD : localhost/VPN uniquement\nRotation embeddings : policy de ré-embedding si fuite suspectée\nRéversibilité : chaque modification = 1 commit Git atomique\nPath whitelist : configurable via HEBBIAN_ALLOWED_DIRS (env) — protège containers/multi-user\nLimitations connues (PII)\n\nLe stripping regex couvre les catégories les plus courantes (10 patterns) mais ne détecte pas les credentials embarqués dans des URLs de connexion (e.g. postgres://user:password@host/db) ni les variables d'environnement loguées dans des stack traces (DB_URL=...). Un scanner de secrets dédié (e.g. trufflehog, detect-secrets) est recommandé en complément pour les environnements à haute sensibilité.\n\nAnti-dérive (CDC §5.1)\nAucune règle ne peut atteindre poids = 1.0 automatiquement (max 0.95)\nDétecteur de drift : alerte si cosine similarity vs baseline < 0.7\n3 changements auto consécutifs → review forcée\nSnapshot mensuel archivé en Git tag\nPipeline global\n[ Session Claude Code ]\n         ↓ fin de session\n[ openclaw_hebbian_harvest ] → extrait résumé + tags + règles (PII stripped)\n         ↓\n[ SQLite local ] → stockage épisodique structuré\n         ↓\n[ openclaw_hebbian_analyze ] → clustering Jaccard + co-activations\n         ↓\n[ openclaw_hebbian_weight_update ] → mise à jour Layer 2 (dry_run=True)\n         ↓\n[ Human Review ] → validation avant application (dry_run=False)\n\nHook post-session (MVP)\n\nSans hook automatique, l'ingestion reste manuelle — adoption = zéro. Voici le minimum pour boucler le pipeline dès le MVP.\n\nOption A — Script shell (le plus simple)\n\nCréer ~/.openclaw/hooks/post-session.sh :\n\n#!/usr/bin/env bash\n# Hook post-session: ingest le dernier JSONL automatiquement\nset -euo pipefail\n\nSESSION_LOG=\"${1:-$(ls -t ~/.openclaw/sessions/*.jsonl 2>/dev/null | head -1)}\"\n[ -z \"$SESSION_LOG\" ] && exit 0\n\n# Appel MCP via curl (le serveur doit tourner sur :8012)\ncurl -s -X POST http://localhost:8012/mcp \\\n  -H \"Content-Type: application/json\" \\\n  -d \"{\n    \\\"method\\\": \\\"tools/call\\\",\n    \\\"params\\\": {\n      \\\"name\\\": \\\"openclaw_hebbian_harvest\\\",\n      \\\"arguments\\\": {\\\"session_jsonl_path\\\": \\\"$SESSION_LOG\\\"}\n    }\n  }\" | jq '.result.ingested // .error'\n\nOption B — Entrée cron (automatisation passive)\n# Toutes les 30 min, ingérer les nouveaux JSONL\n*/30 * * * * /bin/bash ~/.openclaw/hooks/post-session.sh >> ~/.openclaw/hebbian-harvest.log 2>&1\n\nOption C — Intégration pi-coding-agent\n\nSi le projet utilise pi-coding-agent, ajouter dans sa config :\n\n{\n  \"hooks\": {\n    \"post_session\": {\n      \"command\": \"~/.openclaw/hooks/post-session.sh\",\n      \"trigger\": \"on_session_end\"\n    }\n  }\n}\n\n\nNote : Le hook ne déclenche que le harvest (lecture). La mise à jour des poids (weight_update) reste toujours manuelle avec dry_run=True par défaut — conformément à la règle absolue n°1 du CDC.\n\nAdaptation OpenClaw\nComposant CDC\tAdaptation OpenClaw\nHook post-session\tLecture fichiers .jsonl de pi-coding-agent\nClaude.md Layer 2\tSkills OpenClaw (.md ou .json)\nClaude.md Layer 4\tExtension pi-coding-agent dédiée\nGitHub PR for review\tPR sur repo privé skills\nSecrets stripping\tRenforcé — 9 patterns regex + détection runtime\nConfiguration requise\n{\n  \"hebbian\": {\n    \"parameters\": {\n      \"learning_rate\": 0.05,\n      \"decay\": 0.02,\n      \"poids_min\": 0.0,\n      \"poids_max\": 0.95\n    },\n    \"thresholds\": {\n      \"episodic_to_emergent\": 5,\n      \"emergent_to_strong\": 0.8\n    },\n    \"pii_stripping\": {\n      \"enabled\": true,\n      \"patterns\": [\"email\", \"phone\", \"ip\", \"api_key\", \"ssn\"]\n    },\n    \"security\": {\n      \"secret_detection\": true,\n      \"access_restriction\": \"localhost\",\n      \"embedding_rotation\": \"on_breach\"\n    },\n    \"anti_drift\": {\n      \"max_consecutive_auto_changes\": 3\n    }\n  }\n}\n\nRéférence\nCDC : cahier_des_charges_memoire_hebbienne.md v1.0.0\nModule : src/hebbian_memory.py\nModèles : 8 classes Pydantic dans src/models.py\n💎 Support\n\nSi ce skill vous est utile, vous pouvez soutenir le développement :\n\nDogecoin : DQBggqFNWsRNTPb6kkiwppnMo1Hm8edfWq"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/romainsantoli-web/firm-hebbian-memory",
    "publisherUrl": "https://clawhub.ai/romainsantoli-web/firm-hebbian-memory",
    "owner": "romainsantoli-web",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/firm-hebbian-memory",
    "downloadUrl": "https://openagent3.xyz/downloads/firm-hebbian-memory",
    "agentUrl": "https://openagent3.xyz/skills/firm-hebbian-memory/agent",
    "manifestUrl": "https://openagent3.xyz/skills/firm-hebbian-memory/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/firm-hebbian-memory/agent.md"
  }
}