Skip to content

LeoYeAI/agent-master-skills / skills/anima-aios

anima-aios

Verified

An AI Agent cognitive growth system built on the native OpenClaw architecture. It provides agents with persistent memory management, visual intimacy progression, a 5-dimensional cognitive profile, gamified daily quests, team leaderboards, and a 5-layer memory architecture with Knowledge Palace, Pyramid thinking, and Ebbinghaus decay function. 基于 OpenClaw 原生架构的 AI Agent 认知成长体系,为 Agent 提供五层记忆架构、知识宫殿、金字塔知识组织、记忆衰减函数、LLM 智能处理、永久化记忆管理、可视化亲密度成长、五维认知画像、游戏化每日任务和团队排行榜。

FileKindSize
CHANGELOG.mdmarkdown2.4 KB
CONTRIBUTING.mdmarkdown3.3 KB
PLAN_v6.2.3.mdmarkdown5.3 KB
README.mdmarkdown5.1 KB
README_CN.mdmarkdown7.2 KB
RELEASE_v6.2.1.mdmarkdown3.5 KB
RELEASE_v6.2.2.mdmarkdown5.0 KB
RELEASE_v6.2.3.mdmarkdown4.0 KB
SECURITY.mdmarkdown2.6 KB
SECURITY_RESPONSE.mdmarkdown5.9 KB
SKILL.mdskill md23.5 KB
__init__.pyscript71 B
_meta.jsonconfig453 B
anima_doctor.pyscript26.4 KB
anima_tools.pyscript37.2 KB
config/__init__.pyscript0 B
config/agents/template.jsonconfig683 B
config/anima_config.template.jsonconfig1.5 KB
config/config_loader.pyscript9.3 KB
config/organization_config.jsonconfig1.2 KB
config/path_config.pyscript7.2 KB
core/__init__.pyscript1.5 KB
core/agent_resolver.pyscript5.1 KB
core/cognitive_profile.pyscript13.5 KB
core/daily_quest.pyscript13.9 KB
core/decay_function.pyscript6.8 KB
core/dimension_calculator.pyscript23.0 KB
core/distill_engine.pyscript18.8 KB
core/exp_tracker.pyscript15.0 KB
core/fact_store.pyscript9.5 KB
core/level_system.pyscript9.1 KB
core/memory_sync.pyscript6.1 KB
core/memory_watcher.pyscript14.9 KB
core/native_importer.pyscript31.0 KB
core/normalization_engine.pyscript11.7 KB
core/palace_classifier.pyscript12.2 KB
core/palace_index.pyscript10.7 KB
core/profile_card.pyscript9.6 KB
core/pyramid_engine.pyscript10.3 KB
core/session_scanner.pyscript12.7 KB
core/team_scanner.pyscript9.7 KB
docs/ARCHITECTURE_PRINCIPLES.mdmarkdown2.8 KB
docs/EXAMPLES.mdmarkdown2.1 KB
docs/USAGE.mdmarkdown2.8 KB
docs/session-jsonl-schema.mdmarkdown1.8 KB
health/__init__.pyscript16.9 KB
post-install.shscript2.2 KB
scripts/refresh-quests.shscript511 B
scripts/show-progress.shscript450 B
scripts/sync-memory.shscript1.4 KB
tests/__init__.pyscript627 B
tests/test_daily_quest.pyscript9.0 KB
tests/test_exp_tracker.pyscript8.6 KB
tests/test_integration_v6.pyscript8.9 KB
tests/test_normalization.pyscript8.2 KB

docs/ARCHITECTURE_PRINCIPLES.md

View on GitHub
# Anima-AIOS 架构原则

**版本:** v6.0.0
**更新日期:** 2026-03-24
**制定者:** 立文、清禾

---

## 🎯 核心设计哲学

### 铁律

**架构只能演进,不能退化。** —— 立文

每次版本迭代前必须对照原始架构检查:五层在不在、宫殿在不在、金字塔在不在、衰减在不在。少了任何一个,不许发版。

---

## 🏗️ 架构总览

### 单一代码目录

v6 起统一为 `anima-aios/` 单一目录,不再区分 core/skill 双层。

```
anima-aios/
├── core/           # 所有核心模块(业务逻辑 + 数据处理)
├── health/         # 健康系统
├── anima_tools.py  # 对外工具接口(Skill 层)
├── anima_doctor.py # Doctor 诊断入口
├── tests/          # 测试
├── scripts/        # 运维脚本
├── config/         # 配置
└── docs/           # 文档
```

### 五层记忆模型

```
L1 工作记忆   ← OpenClaw 原生 memory/(自动监听)
L2 情景记忆   ← facts/episodic/(LLM 质量评估)
L3 语义记忆   ← facts/semantic/(LLM 去重提炼)
L4 知识宫殿   ← palace/ + pyramid/(LLM 分类 + 金字塔提炼)
L5 元认知层   ← 画像 + EXP + 衰减 + 健康
```

---

## 📐 设计原则

### 1. 零侵入原则
- 不修改 OpenClaw 源码
- 通过 watchdog 文件监听与 OpenClaw 打通
- Agent 日常工作完全无感知

### 2. LLM 优先,规则兜底
- 质量评估、去重、分类优先调用 LLM
- LLM 不可用时自动降级为关键词/规则匹配
- 不因 LLM 故障导致系统不可用

### 3. 路径不硬编码
- 所有路径通过 config 或环境变量配置
- 默认值兼容现有数据(/home/画像)
- 支持 ANIMA_FACTS_BASE、ANIMA_AGENT_NAME 等环境变量

### 4. 向后兼容
- v5 的 EXP / facts / 画像数据零修改
- v6 新增目录(palace/ pyramid/ health/ decay/)不影响 v5 数据
- 每个 v6 模块可通过 config 单独禁用

### 5. 保守模式优先
- 自动提炼(auto_distill)默认关闭
- 宫殿分类采用延迟防抖,不实时分类
- 新功能先观察再放开

---

## 🔒 发版检查清单

发版前必须全部通过:

- [ ] L1 — OpenClaw memory_write 自动触发 Anima 同步
- [ ] L2 — facts/episodic/ 自动归档
- [ ] L3 — 提炼引擎能从 L2 提取知识
- [ ] L4 宫殿 — palace_index 创建/检索正常
- [ ] L4 金字塔 — 四层可写可查
- [ ] L5 衰减 — 衰减计算正确
- [ ] L5 健康 — 5 个模块全部运行
- [ ] LLM 处理 — 质量评估/去重/分类正常
- [ ] 宫殿分类调度 — 延迟防抖正常
- [ ] v5 兼容 — EXP/画像/任务/排行正常
- [ ] 回滚可用 — 禁用 v6 模块后 v5 不受影响
- [ ] SKILL.md — 只写已实现功能
- [ ] 集成测试 — 全部通过

---

_先诚实,再迭代。代码要配得上宣传。—— 清禾_
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall