mirror of
https://github.com/sweetwisdom/everything-claude-code-zh.git
synced 2026-03-22 06:20:10 +00:00
docs: 完成所有文档的中文翻译并应用到项目
This commit is contained in:
@@ -1,25 +1,25 @@
|
||||
---
|
||||
name: instinct-import
|
||||
description: Import instincts from teammates, Skill Creator, or other sources
|
||||
description: 从队友、技能生成器(Skill Creator)或其他来源导入直觉(Instincts)
|
||||
command: /instinct-import
|
||||
implementation: python3 ~/.claude/skills/continuous-learning-v2/scripts/instinct-cli.py import <file>
|
||||
---
|
||||
|
||||
# Instinct Import Command
|
||||
# 直觉导入命令(Instinct Import Command)
|
||||
|
||||
## Implementation
|
||||
## 实现
|
||||
|
||||
```bash
|
||||
python3 ~/.claude/skills/continuous-learning-v2/scripts/instinct-cli.py import <file-or-url> [--dry-run] [--force] [--min-confidence 0.7]
|
||||
```
|
||||
|
||||
Import instincts from:
|
||||
- Teammates' exports
|
||||
- Skill Creator (repo analysis)
|
||||
- Community collections
|
||||
- Previous machine backups
|
||||
从以下来源导入直觉(Instincts):
|
||||
- 队友导出的文件
|
||||
- 技能生成器(Skill Creator)(仓库分析)
|
||||
- 社区集合
|
||||
- 之前的机器备份
|
||||
|
||||
## Usage
|
||||
## 用法
|
||||
|
||||
```
|
||||
/instinct-import team-instincts.yaml
|
||||
@@ -27,109 +27,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
|
||||
### 处理重复项
|
||||
当导入的直觉与现有直觉匹配时:
|
||||
- **高置信度胜出**:保留置信度(Confidence)较高的一方
|
||||
- **合并证据**:累计观测项(Observation)计数
|
||||
- **更新时间戳**:标记为最近已验证
|
||||
|
||||
### 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:
|
||||
从技能生成器(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>`:从技能生成器(Skill Creator)分析结果导入
|
||||
- `--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 查看所有直觉。
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user