docs: 完成所有文档的中文翻译并应用到项目

This commit is contained in:
xuxiang
2026-01-28 00:12:54 +08:00
parent 0ced59a26b
commit e133f58e1c
76 changed files with 6808 additions and 6170 deletions

View File

@@ -1,23 +1,23 @@
---
name: continuous-learning
description: Automatically extract reusable patterns from Claude Code sessions and save them as learned skills for future use.
description: 自动从 Claude Code 会话Sessions)中提取可重用的模式,并将其保存为学习到的技能以供未来使用。
---
# Continuous Learning Skill
# 持续学习技能(Continuous Learning Skill
Automatically evaluates Claude Code sessions on end to extract reusable patterns that can be saved as learned skills.
在会话结束时自动评估 Claude Code 会话Sessions以提取可保存为学习技能Learned Skills的可重用模式。
## How It Works
## 工作原理
This skill runs as a **Stop hook** at the end of each session:
该技能作为 **停止钩子(Stop hook** 在每个会话结束时运行:
1. **Session Evaluation**: Checks if session has enough messages (default: 10+)
2. **Pattern Detection**: Identifies extractable patterns from the session
3. **Skill Extraction**: Saves useful patterns to `~/.claude/skills/learned/`
1. **会话评估(Session Evaluation**检查会话是否有足够的消息默认10 条以上)
2. **模式检测(Pattern Detection**:识别会话中可提取的模式
3. **技能提取(Skill Extraction**:将有用的模式保存到 `~/.claude/skills/learned/`
## Configuration
## 配置
Edit `config.json` to customize:
编辑 `config.json` 进行自定义:
```json
{
@@ -40,19 +40,19 @@ Edit `config.json` to customize:
}
```
## Pattern Types
## 模式类型
| Pattern | Description |
| 模式(Pattern | 描述(Description |
|---------|-------------|
| `error_resolution` | How specific errors were resolved |
| `user_corrections` | Patterns from user corrections |
| `workarounds` | Solutions to framework/library quirks |
| `debugging_techniques` | Effective debugging approaches |
| `project_specific` | Project-specific conventions |
| `error_resolution` | 特定错误的解决方式 |
| `user_corrections` | 来自用户修正的模式 |
| `workarounds` | 框架/库特有问题的变通方案 |
| `debugging_techniques` | 有效的调试方法 |
| `project_specific` | 项目特定的约定 |
## Hook Setup
## 钩子设置(Hook Setup
Add to your `~/.claude/settings.json`:
添加到你的 `~/.claude/settings.json`
```json
{
@@ -68,43 +68,43 @@ Add to your `~/.claude/settings.json`:
}
```
## Why Stop Hook?
## 为什么使用停止钩子(Stop Hook
- **Lightweight**: Runs once at session end
- **Non-blocking**: Doesn't add latency to every message
- **Complete context**: Has access to full session transcript
- **轻量级(Lightweight**:在会话结束时运行一次
- **非阻塞(Non-blocking**:不会给每条消息增加延迟
- **完整上下文(Complete context**:可以访问完整的会话记录
## Related
## 相关内容
- [The Longform Guide](https://x.com/affaanmustafa/status/2014040193557471352) - Section on continuous learning
- `/learn` command - Manual pattern extraction mid-session
- [长篇指南(The Longform Guide](https://x.com/affaanmustafa/status/2014040193557471352) - 关于持续学习的部分
- `/learn` 命令 - 在会话中手动提取模式
---
## Comparison Notes (Research: Jan 2025)
## 对比笔记研究2025年1月
### vs Homunculus (github.com/humanplane/homunculus)
Homunculus v2 takes a more sophisticated approach:
Homunculus v2 采用了更复杂的方法:
| Feature | Our Approach | Homunculus v2 |
| 特性(Feature | 我们的方法(Our Approach | Homunculus v2 |
|---------|--------------|---------------|
| Observation | Stop hook (end of session) | PreToolUse/PostToolUse hooks (100% reliable) |
| Analysis | Main context | Background agent (Haiku) |
| Granularity | Full skills | Atomic "instincts" |
| Confidence | None | 0.3-0.9 weighted |
| Evolution | Direct to skill | Instincts → cluster skill/command/agent |
| Sharing | None | Export/import instincts |
| 观测(Observation | 停止钩子(Stop hook,会话结束时) | PreToolUse/PostToolUse 钩子100% 可靠) |
| 分析(Analysis | 主上下文(Main context | 后台智能体(Background agentHaiku |
| 粒度(Granularity | 完整技能(Full skills | 原子化的“本能(instincts)” |
| 置信度(Confidence | | 0.3-0.9 加权 |
| 演进(Evolution | 直接转化为技能 | 本能(Instincts聚类(cluster技能/命令/智能体 |
| 共享(Sharing | 无 | 导出/导入本能 |
**Key insight from homunculus:**
> "v1 relied on skills to observe. Skills are probabilistic—they fire ~50-80% of the time. v2 uses hooks for observation (100% reliable) and instincts as the atomic unit of learned behavior."
**来自 homunculus 的关键洞察:**
> v1 依赖技能进行观测。技能是概率性的——它们的触发率约为 50-80%。v2 使用钩子进行观测100% 可靠并将本能instincts作为学习行为的原子单位。”
### Potential v2 Enhancements
### 潜在的 v2 增强功能
1. **Instinct-based learning** - Smaller, atomic behaviors with confidence scoring
2. **Background observer** - Haiku agent analyzing in parallel
3. **Confidence decay** - Instincts lose confidence if contradicted
4. **Domain tagging** - code-style, testing, git, debugging, etc.
5. **Evolution path** - Cluster related instincts into skills/commands
1. **基于本能的学习(Instinct-based learning** - 带有置信度评分的小型原子化行为
2. **后台观测器(Background observer** - 并行分析的 Haiku 智能体
3. **置信度衰减(Confidence decay** - 如果出现矛盾,本能将失去置信度
4. **领域标签(Domain tagging** - 代码风格(code-style)、测试(testing)、git、调试(debugging)等
5. **演进路径(Evolution path** - 将相关的本能聚类为技能/命令
See: `/Users/affoon/Documents/tasks/12-continuous-learning-v2.md` for full spec.
参见:`/Users/affoon/Documents/tasks/12-continuous-learning-v2.md` 以获取完整规范。