mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-04-18 08:03:28 +08:00
docs(zh-CN): sync Chinese docs with latest upstream changes (#341)
* docs(zh-CN): sync Chinese docs with latest upstream changes * docs(zh-CN): update link --------- Co-authored-by: neo <neo.dowithless@gmail.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: instinct-import
|
||||
description: 从队友、技能创建者或其他来源导入本能
|
||||
description: 从文件或URL导入本能到项目/全局作用域
|
||||
command: true
|
||||
---
|
||||
|
||||
@@ -11,7 +11,7 @@ command: true
|
||||
使用插件根路径运行本能 CLI:
|
||||
|
||||
```bash
|
||||
python3 "${CLAUDE_PLUGIN_ROOT}/skills/continuous-learning-v2/scripts/instinct-cli.py" import <file-or-url> [--dry-run] [--force] [--min-confidence 0.7]
|
||||
python3 "${CLAUDE_PLUGIN_ROOT}/skills/continuous-learning-v2/scripts/instinct-cli.py" import <file-or-url> [--dry-run] [--force] [--min-confidence 0.7] [--scope project|global]
|
||||
```
|
||||
|
||||
或者,如果 `CLAUDE_PLUGIN_ROOT` 未设置(手动安装):
|
||||
@@ -20,19 +20,15 @@ python3 "${CLAUDE_PLUGIN_ROOT}/skills/continuous-learning-v2/scripts/instinct-cl
|
||||
python3 ~/.claude/skills/continuous-learning-v2/scripts/instinct-cli.py import <file-or-url>
|
||||
```
|
||||
|
||||
从以下来源导入本能:
|
||||
|
||||
* 队友的导出
|
||||
* 技能创建器(仓库分析)
|
||||
* 社区集合
|
||||
* 之前的机器备份
|
||||
从本地文件路径或 HTTP(S) URL 导入本能。
|
||||
|
||||
## 用法
|
||||
|
||||
```
|
||||
/instinct-import team-instincts.yaml
|
||||
/instinct-import https://github.com/org/repo/instincts.yaml
|
||||
/instinct-import --from-skill-creator acme/webapp
|
||||
/instinct-import team-instincts.yaml --dry-run
|
||||
/instinct-import team-instincts.yaml --scope global --force
|
||||
```
|
||||
|
||||
## 执行步骤
|
||||
@@ -41,7 +37,9 @@ python3 ~/.claude/skills/continuous-learning-v2/scripts/instinct-cli.py import <
|
||||
2. 解析并验证格式
|
||||
3. 检查与现有本能的重复项
|
||||
4. 合并或添加新本能
|
||||
5. 保存到 `~/.claude/homunculus/instincts/inherited/`
|
||||
5. 保存到继承的本能目录:
|
||||
* 项目范围:`~/.claude/homunculus/projects/<project-id>/instincts/inherited/`
|
||||
* 全局范围:`~/.claude/homunculus/instincts/inherited/`
|
||||
|
||||
## 导入过程
|
||||
|
||||
@@ -72,66 +70,35 @@ Already have similar instincts:
|
||||
Import: 0.9 confidence
|
||||
→ Update to import (higher confidence)
|
||||
|
||||
## Conflicting Instincts (1)
|
||||
These contradict local instincts:
|
||||
❌ use-classes-for-services
|
||||
Conflicts with: avoid-classes
|
||||
→ Skip (requires manual resolution)
|
||||
|
||||
---
|
||||
Import 8 new, update 1, skip 3?
|
||||
Import 8 new, update 1?
|
||||
```
|
||||
|
||||
## 合并策略
|
||||
## 合并行为
|
||||
|
||||
### 针对重复项
|
||||
当导入一个已存在 ID 的本能时:
|
||||
|
||||
当导入一个与现有本能匹配的本能时:
|
||||
|
||||
* **置信度高的胜出**:保留置信度更高的那个
|
||||
* **合并证据**:合并观察计数
|
||||
* **更新时间戳**:标记为最近已验证
|
||||
|
||||
### 针对冲突
|
||||
|
||||
当导入一个与现有本能相矛盾的本能时:
|
||||
|
||||
* **默认跳过**:不导入冲突的本能
|
||||
* **标记待审**:将两者都标记为需要注意
|
||||
* **手动解决**:由用户决定保留哪个
|
||||
* 置信度更高的导入会成为更新候选
|
||||
* 置信度相等或更低的导入将被跳过
|
||||
* 除非使用 `--force`,否则需要用户确认
|
||||
|
||||
## 来源追踪
|
||||
|
||||
导入的本能被标记为:
|
||||
|
||||
```yaml
|
||||
source: "inherited"
|
||||
source: inherited
|
||||
scope: project
|
||||
imported_from: "team-instincts.yaml"
|
||||
imported_at: "2025-01-22T10:30:00Z"
|
||||
original_source: "session-observation" # or "repo-analysis"
|
||||
project_id: "a1b2c3d4e5f6"
|
||||
project_name: "my-project"
|
||||
```
|
||||
|
||||
## 技能创建器集成
|
||||
|
||||
从技能创建器导入时:
|
||||
|
||||
```
|
||||
/instinct-import --from-skill-creator acme/webapp
|
||||
```
|
||||
|
||||
这会获取从仓库分析生成的本能:
|
||||
|
||||
* 来源:`repo-analysis`
|
||||
* 更高的初始置信度(0.7+)
|
||||
* 链接到源仓库
|
||||
|
||||
## 标志
|
||||
|
||||
* `--dry-run`:预览而不导入
|
||||
* `--force`:即使存在冲突也导入
|
||||
* `--merge-strategy <higher|local|import>`:如何处理重复项
|
||||
* `--from-skill-creator <owner/repo>`:从技能创建器分析导入
|
||||
* `--dry-run`:仅预览而不导入
|
||||
* `--force`:跳过确认提示
|
||||
* `--min-confidence <n>`:仅导入高于阈值的本能
|
||||
* `--scope <project|global>`:选择目标范围(默认:`project`)
|
||||
|
||||
## 输出
|
||||
|
||||
@@ -142,7 +109,7 @@ original_source: "session-observation" # or "repo-analysis"
|
||||
|
||||
Added: 8 instincts
|
||||
Updated: 1 instinct
|
||||
Skipped: 3 instincts (2 duplicates, 1 conflict)
|
||||
Skipped: 3 instincts (equal/higher confidence already exists)
|
||||
|
||||
New instincts saved to: ~/.claude/homunculus/instincts/inherited/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user