agent-experience-evolver
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "agent-experience-evolver" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-d20fdce4ceb929c9407fba77abc0688df2025950adbde81727a54cf2dfaf1f62. Verify the upstream source and version against https://skillhub.cn/skills/user_9e6539c8/agent-experience-evolver before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
skillhub.cn
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Convert real-world experiences into AI action rules that are scenario-tested, human-approved, and roll-backable.
Introduction source: third_party · user_9e6539c8 · 1.0.0 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: AI经验进化器
slug: agent-experience-evolver
version: 1.0.0
displayName: "AI经验进化器"
description: "把 AI 或团队在真实工作中的错误、用户纠正、成功经验、知识缺口和功能需求记录到本地 SQLite 经验库,自动聚类复发模式并生成候选行动规则。候选规则必须通过正反场景测试和人工审批后才进入行动手册,支持审计、解决、导出、健康检查和一键回滚。适用于:AI自我改进、智能体成长、经验复盘、错误复发治理、用户纠正记忆、最佳实践沉淀、规则审批、Agent长期记忆。"
summary: "把真实经验转成经过场景测试、人工审批且可回滚的AI行动规则。"AI经验进化器
目标
把零散的错误、纠正和成功经验变成可验证、可审批、可回滚的行动规则,同时避免智能体未经允许修改系统提示词、全局记忆或项目指令。
它维护一个本地 SQLite 经验库,提供完整生命周期:
记录事件 -> 聚类复发模式 -> 生成候选规则 -> 正反场景测试
-> 人工批准 -> 行动手册 -> 审计 / 解决 / 回滚
何时使用
- 命令、工具、API 或工作流出现了非显而易见的失败。
- 用户纠正了错误事实、输出格式、偏好或执行方式。
- 某个问题重复出现,值得形成稳定检查规则。
- 发现了可复用的成功路径、验证命令或安全边界。
- 用户要求“总结经验”“别再犯同样错误”“让 Agent 成长”“建立长期经验库”。
- 重要任务开始前,需要查看已经批准的行动规则。
以下情况不要记录:
- 偶发且没有复用价值的普通输出。
- 未经用户授权的完整会话、源码、客户资料或敏感日志。
- API Key、Token、密码、验证码、私钥等秘密信息。
- 尚未验证的猜测。可以记录为事件,但不得直接批准为规则。
安全原则
- 默认只写入用户指定的本地经验库目录。
- 自动脱敏常见 Token、API Key、密码、手机号和邮箱。
- 候选规则永远是
draft,不会自动进入行动手册。 - 批准前必须有正反场景测试,且达到配置阈值。
review approve必须提供明确的审核人和审核说明。- 已批准规则不会被后续自动分析覆盖。
- 回滚只把规则标为
retired,保留完整审计记录。 - 不自动修改
AGENTS.md、CLAUDE.md、MEMORY.md、系统提示词或其他技能。
初始化
在项目根目录或用户指定位置创建独立经验库:
python3 scripts/experience_evolver.py \
--workspace .experience-evolver \
init --name "我的项目经验库"
生成结构:
.experience-evolver/
├── evolution.db # SQLite 主数据库,启用 WAL
├── config.json # 复发、测试和聚类阈值
├── PLAYBOOK.md # 仅包含已测试且已批准的规则
├── reports/ # 分析、候选和测试报告
└── exports/ # 可移交的 JSON / CSV 导出
如果经验库已经存在,init 是安全的幂等操作,不会清空原数据。
核心工作流
1. 记录经验事件
python3 scripts/experience_evolver.py --workspace .experience-evolver record \
--type correction \
--severity high \
--area publishing \
--summary "SkillHub市场展示名必须使用中文" \
--details "用户明确纠正了英文展示名" \
--action "发布前检查displayName为中文,技术slug保留kebab-case" \
--evidence "用户直接纠正" \
--tags "skillhub,chinese-name" \
--pattern-key publishing.chinese-name
type 支持:
error:命令、工具或集成失败。correction:用户纠正事实、偏好或执行方式。success:可重复的成功路径。insight:新发现的规则、约束或知识缺口。feature:尚不存在但反复需要的能力。
同一模式重复发生时优先使用稳定的 --pattern-key。未提供时,脚本会用领域、类型和文本相似度自动归并。
2. 批量导入
python3 scripts/experience_evolver.py --workspace .experience-evolver import \
--file assets/sample-events.jsonl \
--strict
支持 JSONL、JSON 和 CSV。字段格式见 场景与数据格式。
3. 分析复发模式
python3 scripts/experience_evolver.py --workspace .experience-evolver analyze
分析报告会综合:复发次数、最高严重度、未解决数量、证据数量和规则候选资格。分数只用于排序,不代表结论已正确。
4. 生成候选规则
python3 scripts/experience_evolver.py --workspace .experience-evolver propose
默认至少复发 2 次或严重度为 critical 才能进入候选。输出仍为 draft。
5. 准备正反场景
每条候选规则至少准备:
- 一个应该触发的正例。
- 一个措辞不同但仍应触发的正例。
- 一个相近但不应触发的反例。
场景使用规则 ID 明确期望,默认严格匹配:多触发或漏触发都算失败。
python3 scripts/experience_evolver.py --workspace .experience-evolver test \
--scenarios scenarios.json \
--status draft
详细格式和示例见 场景与数据格式。
6. 人工审批
python3 scripts/experience_evolver.py --workspace .experience-evolver review \
--rule-id RULE-20260710-001 \
--decision approve \
--reviewer "项目负责人" \
--note "4个正反场景全部通过,规则边界清晰"
批准操作会检查:
- 规则当前必须为
draft。 - 规则最后修改后必须重新测试。
- 测试场景数量达到阈值。
- 规则自身通过率达到阈值。
通过后才会写入 PLAYBOOK.md。
7. 回滚错误规则
python3 scripts/experience_evolver.py --workspace .experience-evolver rollback \
--rule-id RULE-20260710-001 \
--reviewer "项目负责人" \
--reason "反例发现规则触发范围过宽"
规则会变为 retired,从行动手册移除,但测试和审批历史保留。
其他命令
# 查看事件、规则和最近测试状态
python3 scripts/experience_evolver.py --workspace .experience-evolver status --json
# 查看规则生命周期
python3 scripts/experience_evolver.py --workspace .experience-evolver rules --status all
# 解决一条事件
python3 scripts/experience_evolver.py --workspace .experience-evolver resolve \
--event-id EVT-20260710-001 --resolution "已补充预检并验证"
# 解决某个模式下所有开放事件
python3 scripts/experience_evolver.py --workspace .experience-evolver resolve \
--pattern-key publishing.dry-run --resolution "已纳入发布检查流程"
# 导出事件、规则、测试和审计记录
python3 scripts/experience_evolver.py --workspace .experience-evolver export
# 检查数据库、密钥残留、配置和行动手册同步
python3 scripts/experience_evolver.py --workspace .experience-evolver doctor
# 调整门槛
python3 scripts/experience_evolver.py --workspace .experience-evolver config \
--min-recurrence 3 \
--min-test-pass-rate 0.9 \
--min-test-scenarios 4
三个典型例子
工具使用错误
Before:看到 JavaScript 项目就直接运行 npm install。
After:记录多次 pnpm 项目误用 npm 的事件,形成规则“先检查锁文件和 workspace 配置,再选择包管理器”,用 pnpm、npm、无锁文件三个场景验证后批准。
用户格式纠正
Before:每次发布市场技能都可能使用英文展示名。
After:把用户纠正归入稳定模式,形成规则“SkillHub 展示名用中文,slug 保持英文 kebab-case”,并准备 SkillHub 与普通代码包两个正反场景。
成功流程沉淀
Before:发布前只看脚本是否能运行。
After:记录“功能测试、报告抽查、dry-run、限速发布、回读回执”的成功链路,达到复发门槛后形成可审批规则。
执行顺序
重要任务开始前:
- 读取目标经验库的
PLAYBOOK.md。 - 只应用与当前任务明确相关的已批准规则。
- 规则冲突时停止并请求用户裁决,不自行选择更激进的规则。
重要任务结束后:
- 判断是否出现值得复用的错误、纠正、成功路径或知识缺口。
- 只记录经过脱敏的最小必要信息。
- 复发模式运行
analyze和propose。 - 候选规则经过测试和人工审批后再进入行动手册。
完整生命周期见 规则生命周期。
质量标准
- 不把“记录过一次”误当成稳定规则。
- 不把相关性分数写成确定因果关系。
- 每条已批准规则都有正例、反例和人工审核记录。
- 行动规则必须可执行,避免“以后注意”“提高质量”之类空话。
- 规则应写清触发条件、动作、原因和边界。
- 任何自动报告都应保留 JSON/CSV,便于复查和迁移。
doctor必须通过数据库完整性、密钥残留和行动手册同步检查。
验证
在发布或升级该技能前,至少完成:
- 初始化幂等测试。
- 单条记录和三种批量格式测试。
- 相似模式归并与显式
pattern_key测试。 - 未测试规则不得批准的阻断测试。
- 正反场景匹配测试。
- 审批后行动手册生成测试。
- 回滚后行动手册移除测试。
- Token 和密码自动脱敏测试。
- SQLite
integrity_check与导出可读性测试。
Current listing version
1.0.0
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 解决 AI 自我改进、经验复盘、错误复发治理等高频刚需场景
- 提供完整生命周期管理:记录->聚类->生成->测试->审批->回滚
Highlights
- 触发词精准完整,覆盖多种变体,边界清晰
- '何时使用'章节详细列出了适用和不适用场景
Areas to improve
-
引用文件缺失 Reported severity: Major
SKILL.md 引用了 references/scenario-format.md 和 references/workflow.md 两个外部文件,但未在传入内容中提供
Recommendation: 请补充被引用的外部文件内容,或确保这些文件在实际部署时可用
Highlights
- 文档结构清晰,包含完整的工作流和示例
- frontmatter 完整,步骤划分明确
Highlights
- 工具来源明确,参数描述清晰
- 覆盖了主要异常处理,不可逆操作有确认机制
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
-
Install or fetch external dependencies
Use official sources and pin versions. Check install scripts in an isolated environment. This document check does not cover code downloaded later.
Mentioned in main document · lines 208 -
Accounts, secrets or authorization
Use a dedicated least-privilege account. Keep secrets out of public content and command logs; verify the receiving service and tenant.
Mentioned in main document · lines 36, 42, 194, 249
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.