ontology-clawra
Clawra的核心智能引擎 - 三层记忆架构本体论系统。真正参与推理的本体论引擎,而非什么都记的笔记系统。
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Clawra的核心智能引擎 - 三层记忆架构本体论系统。真正参与推理的本体论引擎,而非什么都记的笔记系统。
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
🧠 ontology-clawra v5.1 - Local Ontology Reasoning & Learning Engine **USE THIS SKILL WHENEVER** you need structured reasoning, knowledge graph management, logical inference, or learning from interactions. This is your go-to tool for: - Building and querying ontology knowledge graphs (concepts, entities, relationships) - Performing confidence-based reasoning with evidence tracking - Recording insights and patterns from completed tasks - Local memory search and knowledge retrieval **Key Use Cases:** - Before making complex decisions: "Let me use ontology-clawra to reason about this" - After completing tasks: "Record this learning to ontology-clawra" - Building domain expertise: "Create concepts for [domain] in ontology-clawra" - Analyzing patterns: "Query ontology-clawra for similar past cases" **Core Capabilities:** ✅ Local ontology storage in `~/.openclaw/skills/ontology-clawra/memory/` ✅ Confidence calculation (CONFIRMED/ASSUMED/SPECULATIVE) ✅ Learning from user confirmations ✅ Local memory search (no ne
Complete guide to using and extending Hermes Agent — CLI usage, setup, configuration, spawning additional agents, gateway platforms, skills, voice, tools, profiles, and a concise contributor reference. Load this skill when helping users configure Hermes, troubleshoot issues, spawn agent instances, or make code contributions.
Git push to HTTPS remote using token authentication — avoids SSH setup, works in CI/automated environments.
从 GitHub 历史中彻底清除敏感文件的完整流程 — 使用 git filter-repo + force push,适用于清理意外提交的个人文件、工作文件等
清理 GitHub 历史和 ClawHub 中意外泄露的个人/工作文件
Configure WhatsApp and Telegram messaging platforms on Hermes Agent
| name | ontology-clawra |
| description | Clawra的核心智能引擎 - 三层记忆架构本体论系统。真正参与推理的本体论引擎,而非什么都记的笔记系统。 |
| version | 4.0.0 |
| last_updated | 2026-04-09 |
| author | Clawra |
| tags | ["ontology","knowledge-graph","self-evolution","reasoning"] |
目标: 清晰地建模真实世界的对象、关系、逻辑与规则,过滤噪音,记住真正有价值的内容,帮助Clawra持续进化和学习真实世界的逻辑规则。
不同于"记笔记": 不是把什么都写入本体的笔记本系统,而是真正参与推理决策的结构化知识引擎。
┌─────────────────────────────────────────────────────────────┐
│ 热层 (graph.jsonl) - 结构化知识,参与推理 │
│ 准入标准: 4条满足1条即可 │
│ 1. 用户亲口确认的事实 │
│ 2. 踩坑得出的非显而易见规律 │
│ 3. 跨领域通用原则/真理 │
│ 4. 置信度为 CONFIRMED 或 ASSUMED(有来源) │
│ 容量: ≤50条,上限100条 │
├─────────────────────────────────────────────────────────────┤
│ 冷层 (memory/archive/) - 备用检索,不干扰推理 │
│ 存入: 文档可查信息、SPECULATIVE未验证条目、过期事实 │
├─────────────────────────────────────────────────────────────┤
│ 暖层 (memory/memory.md) - 长期上下文,永久记忆 │
│ 存入: 用户偏好、身份设定、长期目标 │
└─────────────────────────────────────────────────────────────┘
写入前必须自问:这条知识是否改变了"我对世界的建模"?
| 标准 | 说明 | 例子 |
|---|---|---|
| 用户亲口确认 | 用户明确说出的事实 | "我希望你更主动" |
| 非显而易见 | 踩坑得出的规律 | ccr配置里provider名必须匹配 |
| 跨领域通用 | 放之四海皆准的原则 | "做事前先确认前提" |
| 有来源的置信度 | CONFIRMED/ASSUMED | 有文档/有验证的推测 |
scripts/
├── memory_manager.py # 三层记忆管理器(核心)
├── ontology-clawra.py # 推理引擎(接入memory_manager)
├── auto_enhancer.py # ⚠️ 自动增强器(见下方说明)
├── network_fetch.py # ⚠️ 网络获取模块(见下方说明)
└── memory/
├── graph.jsonl # 热层
├── memory.md # 暖层
└── archive/ # 冷层
└── archived.jsonl
功能:发现优化点时自动升级版本并推送到远程。
具体操作:
SKILL.md、CHANGELOG.md、_meta.json 版本号git add . && git commit && git pushclawhub publish . --version X.Y.Z使用的凭证:
gh 缓存的 token)风险:会向 GitHub 推送内容并发布到 ClawHub。若不想自动发布,删除或禁用此文件。
功能:当本地无数据时,自动从网络获取相关信息。
数据源:搜索本地记忆文件,暂未配置外部 API 调用。
风险:若启用外部网络请求,可能向第三方服务发送查询内容。启用前请审查具体实现。
| 操作 | 使用的凭证 | 数据外泄风险 |
|---|---|---|
| 本地记忆读写 | 无外部凭证 | 仅本地文件 |
| Git push | 本地 Git 凭证 | 会推送 repo 内容到 GitHub |
| ClawHub publish | ClawHub 本地缓存 token | 会发布 skill 到 ClawHub |
| 网络请求 | 无(未配置) | 暂不适用 |
若不希望自动推送:删除 scripts/auto_enhancer.py,或撤销 GitHub 写权限(设置为 read-only deploy key)。
from memory_manager import query_hot, get_memory_context
# 查询相关条目
results = query_hot("用户目标")
print(results)
# 获取完整推理上下文
context = get_memory_context("当前问题")
from memory_manager import MemoryEntry, EntryType, Confidence, write_hot
entry = MemoryEntry(
id="my_rule_1",
type=EntryType.RULE,
name="上下文确认优先",
statement="回答问题前先确认用户问题背后的前提",
confidence=Confidence.CONFIRMED,
tags=["user_confirmed", "universal"]
)
write_hot(entry)
from memory_manager import archive_old, cleanup_speculative
# 超过容量时淘汰
archive_old(max_entries=50)
# 清理过期的SPECULATIVE条目
cleanup_speculative(age_days=7)
# 写入条目
python scripts/memory_manager.py write --type Rule --name "规则名" --statement "规则内容" --confidence CONFIRMED
# 查询热层
python scripts/memory_manager.py query "关键词"
# 查看统计
python scripts/memory_manager.py stats
# 获取推理上下文
python scripts/memory_manager.py context --query "当前问题"
主动触发(非被动等待cron):
| 标注 | 含义 | 写入规则 |
|---|---|---|
| 🟢 CONFIRMED | 用户确认/明确来源 | 直接写入热层 |
| 🟡 ASSUMED | 合理推测,有一定依据 | 直接写入热层 |
| 🔴 SPECULATIVE | 纯猜测,未经证实 | 7天未验证自动归档 |
持续目标: 建模真实世界的逻辑规则,帮助Clawra:
核心原则: 本体论不是终点,而是Clawra持续进化的驱动力。