chore: sync with upstream e7cb442 + update zh translations

This commit is contained in:
xuxiang
2026-02-02 18:57:56 +08:00
parent 6f87d43c19
commit d7cafbe582
66 changed files with 9395 additions and 1465 deletions

View File

@@ -1,32 +1,32 @@
---
name: instinct-import
description: Import instincts from teammates, Skill Creator, or other sources
description: 从团队成员、技能创建者Skill Creator或其他来源导入直觉Instincts
command: true
---
# Instinct Import Command
# 直觉导入命令(Instinct Import Command
## Implementation
## 实现
Run the instinct CLI using the plugin root path:
使用插件根路径运行直觉 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]
```
Or if `CLAUDE_PLUGIN_ROOT` is not set (manual installation):
如果未设置 `CLAUDE_PLUGIN_ROOT`(手动安装):
```bash
python3 ~/.claude/skills/continuous-learning-v2/scripts/instinct-cli.py import <file-or-url>
```
Import instincts from:
- Teammates' exports
- Skill Creator (repo analysis)
- Community collections
- Previous machine backups
可以从以下来源导入直觉:
- 团队成员的导出文件
- 技能创建者(Skill Creator)(仓库分析)
- 社区集合
- 以前的机器备份
## Usage
## 用法
```
/instinct-import team-instincts.yaml
@@ -34,109 +34,109 @@ Import instincts from:
/instinct-import --from-skill-creator acme/webapp
```
## What to Do
## 核心流程
1. Fetch the instinct file (local path or URL)
2. Parse and validate the format
3. Check for duplicates with existing instincts
4. Merge or add new instincts
5. Save to `~/.claude/homunculus/instincts/inherited/`
1. 获取直觉文件(本地路径或 URL
2. 解析并验证格式
3. 检查与现有直觉是否重复
4. 合并或添加新直觉
5. 保存至 `~/.claude/homunculus/instincts/inherited/`
## Import Process
## 导入过程示例
```
📥 Importing instincts from: team-instincts.yaml
📥 正在从以下路径导入直觉:team-instincts.yaml
================================================
Found 12 instincts to import.
发现 12 条待导入的直觉。
Analyzing conflicts...
正在分析冲突...
## New Instincts (8)
These will be added:
✓ use-zod-validation (confidence: 0.7)
✓ prefer-named-exports (confidence: 0.65)
✓ test-async-functions (confidence: 0.8)
## 新直觉 (8)
以下内容将被添加:
✓ use-zod-validation (置信度: 0.7)
✓ prefer-named-exports (置信度: 0.65)
✓ test-async-functions (置信度: 0.8)
...
## Duplicate Instincts (3)
Already have similar instincts:
## 重复直觉 (3)
已存在类似的直觉:
⚠️ prefer-functional-style
Local: 0.8 confidence, 12 observations
Import: 0.7 confidence
Keep local (higher confidence)
本地: 0.8 置信度, 12 次观察
导入: 0.7 置信度
保留本地版本(置信度更高)
⚠️ test-first-workflow
Local: 0.75 confidence
Import: 0.9 confidence
Update to import (higher confidence)
本地: 0.75 置信度
导入: 0.9 置信度
更新为导入版本(置信度更高)
## Conflicting Instincts (1)
These contradict local instincts:
## 冲突直觉 (1)
这些直觉与本地直觉冲突:
❌ use-classes-for-services
Conflicts with: avoid-classes
Skip (requires manual resolution)
冲突项:avoid-classes
跳过(需要手动解决)
---
Import 8 new, update 1, skip 3?
导入 8 条新直觉,更新 1 条,跳过 3 条?
```
## Merge Strategies
## 合并策略(Merge Strategies
### For Duplicates
When importing an instinct that matches an existing one:
- **Higher confidence wins**: Keep the one with higher confidence
- **Merge evidence**: Combine observation counts
- **Update timestamp**: Mark as recently validated
### 处理重复项
当导入的直觉与现有直觉匹配时:
- **高置信度优先**:保留置信度较高的版本
- **合并证据**:合并观察计数(observation counts
- **更新时间戳**:标记为最近已验证
### For Conflicts
When importing an instinct that contradicts an existing one:
- **Skip by default**: Don't import conflicting instincts
- **Flag for review**: Mark both as needing attention
- **Manual resolution**: User decides which to keep
### 处理冲突
当导入的直觉与现有直觉相矛盾时:
- **默认跳过**:不导入冲突的直觉
- **标记待评审**:将两者都标记为需要关注
- **手动解决**:由用户决定保留哪一个
## Source Tracking
## 来源追踪
Imported instincts are marked with:
导入的直觉会带有以下标记:
```yaml
source: "inherited"
imported_from: "team-instincts.yaml"
imported_at: "2025-01-22T10:30:00Z"
original_source: "session-observation" # or "repo-analysis"
original_source: "session-observation" # "repo-analysis"
```
## Skill Creator Integration
## 技能创建者(Skill Creator)集成
When importing from Skill Creator:
从技能创建者导入时:
```
/instinct-import --from-skill-creator acme/webapp
```
This fetches instincts generated from repo analysis:
- Source: `repo-analysis`
- Higher initial confidence (0.7+)
- Linked to source repository
这将获取通过仓库分析生成的直觉:
- 来源:`repo-analysis`
- 初始置信度较高 (0.7+)
- 链接到源仓库
## Flags
## 参数选项(Flags
- `--dry-run`: Preview without importing
- `--force`: Import even if conflicts exist
- `--merge-strategy <higher|local|import>`: How to handle duplicates
- `--from-skill-creator <owner/repo>`: Import from Skill Creator analysis
- `--min-confidence <n>`: Only import instincts above threshold
- `--dry-run`:预览而不执行导入
- `--force`:即使存在冲突也执行导入
- `--merge-strategy <higher|local|import>`:如何处理重复项
- `--from-skill-creator <owner/repo>`:从技能创建者分析中导入
- `--min-confidence <n>`:仅导入高于阈值的直觉
## Output
## 输出
After import:
导入完成后:
```
Import complete!
导入完成!
Added: 8 instincts
Updated: 1 instinct
Skipped: 3 instincts (2 duplicates, 1 conflict)
添加8 条直觉
更新1 条直觉
跳过3 条直觉 (2 条重复1 条冲突)
New instincts saved to: ~/.claude/homunculus/instincts/inherited/
新直觉已保存至:~/.claude/homunculus/instincts/inherited/
Run /instinct-status to see all instincts.
运行 /instinct-status 以查看所有直觉。
```