mirror of
https://github.com/sweetwisdom/everything-claude-code-zh.git
synced 2026-03-22 14:40:14 +00:00
docs: 完成所有文档的中文翻译并应用到项目
This commit is contained in:
@@ -1,141 +1,141 @@
|
||||
---
|
||||
name: evolve
|
||||
description: Cluster related instincts into skills, commands, or agents
|
||||
description: 将相关本能(Instincts)聚类为技能、命令或智能体
|
||||
command: /evolve
|
||||
implementation: python3 ~/.claude/skills/continuous-learning-v2/scripts/instinct-cli.py evolve
|
||||
---
|
||||
|
||||
# Evolve Command
|
||||
# 演进(Evolve)命令
|
||||
|
||||
## Implementation
|
||||
## 实现
|
||||
|
||||
```bash
|
||||
python3 ~/.claude/skills/continuous-learning-v2/scripts/instinct-cli.py evolve [--generate]
|
||||
```
|
||||
|
||||
Analyzes instincts and clusters related ones into higher-level structures:
|
||||
- **Commands**: When instincts describe user-invoked actions
|
||||
- **Skills**: When instincts describe auto-triggered behaviors
|
||||
- **Agents**: When instincts describe complex, multi-step processes
|
||||
分析本能(Instincts)并将相关的本能聚类为更高级别的结构:
|
||||
- **命令(Commands)**:当本能描述的是用户调用的操作时
|
||||
- **技能(Skills)**:当本能描述的是自动触发的行为时
|
||||
- **智能体(Agents)**:当本能描述的是复杂的、多步骤的过程时
|
||||
|
||||
## Usage
|
||||
## 用法
|
||||
|
||||
```
|
||||
/evolve # Analyze all instincts and suggest evolutions
|
||||
/evolve --domain testing # Only evolve instincts in testing domain
|
||||
/evolve --dry-run # Show what would be created without creating
|
||||
/evolve --threshold 5 # Require 5+ related instincts to cluster
|
||||
/evolve # 分析所有本能并建议演进方案
|
||||
/evolve --domain testing # 仅演进测试领域(testing domain)中的本能
|
||||
/evolve --dry-run # 显示将要创建的内容而不实际执行
|
||||
/evolve --threshold 5 # 要求 5 个或更多相关本能才进行聚类
|
||||
```
|
||||
|
||||
## Evolution Rules
|
||||
## 演进规则
|
||||
|
||||
### → Command (User-Invoked)
|
||||
When instincts describe actions a user would explicitly request:
|
||||
- Multiple instincts about "when user asks to..."
|
||||
- Instincts with triggers like "when creating a new X"
|
||||
- Instincts that follow a repeatable sequence
|
||||
### → 命令(Command,用户调用)
|
||||
当本能描述用户会显式请求的操作时:
|
||||
- 多个关于“当用户要求...”的本能
|
||||
- 带有“在创建新的 X 时”等触发器的本能
|
||||
- 遵循可重复序列的本能
|
||||
|
||||
Example:
|
||||
- `new-table-step1`: "when adding a database table, create migration"
|
||||
- `new-table-step2`: "when adding a database table, update schema"
|
||||
- `new-table-step3`: "when adding a database table, regenerate types"
|
||||
示例:
|
||||
- `new-table-step1`:“在添加数据库表时,创建迁移文件”
|
||||
- `new-table-step2`:“在添加数据库表时,更新 schema”
|
||||
- `new-table-step3`:“在添加数据库表时,重新生成类型”
|
||||
|
||||
→ Creates: `/new-table` command
|
||||
→ 创建:`/new-table` 命令
|
||||
|
||||
### → Skill (Auto-Triggered)
|
||||
When instincts describe behaviors that should happen automatically:
|
||||
- Pattern-matching triggers
|
||||
- Error handling responses
|
||||
- Code style enforcement
|
||||
### → 技能(Skill,自动触发)
|
||||
当本能描述应该自动发生的行为时:
|
||||
- 模式匹配触发器
|
||||
- 错误处理响应
|
||||
- 代码风格强制执行
|
||||
|
||||
Example:
|
||||
- `prefer-functional`: "when writing functions, prefer functional style"
|
||||
- `use-immutable`: "when modifying state, use immutable patterns"
|
||||
- `avoid-classes`: "when designing modules, avoid class-based design"
|
||||
示例:
|
||||
- `prefer-functional`:“在编写函数时,优先使用函数式风格”
|
||||
- `use-immutable`:“在修改状态时,使用不可变模式”
|
||||
- `avoid-classes`:“在设计模块时,避免基于类的设计”
|
||||
|
||||
→ Creates: `functional-patterns` skill
|
||||
→ 创建:`functional-patterns` 技能
|
||||
|
||||
### → Agent (Needs Depth/Isolation)
|
||||
When instincts describe complex, multi-step processes that benefit from isolation:
|
||||
- Debugging workflows
|
||||
- Refactoring sequences
|
||||
- Research tasks
|
||||
### → 智能体(Agent,需要深度/隔离)
|
||||
当本能描述受益于隔离的复杂、多步骤过程时:
|
||||
- 调试工作流(Workflow)
|
||||
- 重构序列
|
||||
- 研究任务
|
||||
|
||||
Example:
|
||||
- `debug-step1`: "when debugging, first check logs"
|
||||
- `debug-step2`: "when debugging, isolate the failing component"
|
||||
- `debug-step3`: "when debugging, create minimal reproduction"
|
||||
- `debug-step4`: "when debugging, verify fix with test"
|
||||
示例:
|
||||
- `debug-step1`:“调试时,先检查日志”
|
||||
- `debug-step2`:“调试时,隔离故障组件”
|
||||
- `debug-step3`:“调试时,创建最小复现”
|
||||
- `debug-step4`:“调试时,通过测试验证修复”
|
||||
|
||||
→ Creates: `debugger` agent
|
||||
→ 创建:`debugger` 智能体
|
||||
|
||||
## What to Do
|
||||
## 执行步骤
|
||||
|
||||
1. Read all instincts from `~/.claude/homunculus/instincts/`
|
||||
2. Group instincts by:
|
||||
- Domain similarity
|
||||
- Trigger pattern overlap
|
||||
- Action sequence relationship
|
||||
3. For each cluster of 3+ related instincts:
|
||||
- Determine evolution type (command/skill/agent)
|
||||
- Generate the appropriate file
|
||||
- Save to `~/.claude/homunculus/evolved/{commands,skills,agents}/`
|
||||
4. Link evolved structure back to source instincts
|
||||
1. 从 `~/.claude/homunculus/instincts/` 读取所有本能
|
||||
2. 按以下维度对本能进行分组:
|
||||
- 领域相似性
|
||||
- 触发模式重叠
|
||||
- 动作序列关系
|
||||
3. 对于每个包含 3 个或更多相关本能的聚类:
|
||||
- 确定演进类型(命令/技能/智能体)
|
||||
- 生成相应的文件
|
||||
- 保存到 `~/.claude/homunculus/evolved/{commands,skills,agents}/`
|
||||
4. 将演进后的结构链接回源本能
|
||||
|
||||
## Output Format
|
||||
## 输出格式
|
||||
|
||||
```
|
||||
🧬 Evolve Analysis
|
||||
🧬 演进分析(Evolve Analysis)
|
||||
==================
|
||||
|
||||
Found 3 clusters ready for evolution:
|
||||
发现 3 个已准备好演进的聚类:
|
||||
|
||||
## Cluster 1: Database Migration Workflow
|
||||
Instincts: new-table-migration, update-schema, regenerate-types
|
||||
Type: Command
|
||||
Confidence: 85% (based on 12 observations)
|
||||
## 聚类 1: 数据库迁移工作流
|
||||
本能: new-table-migration, update-schema, regenerate-types
|
||||
类型: 命令 (Command)
|
||||
置信度: 85% (基于 12 次观察)
|
||||
|
||||
Would create: /new-table command
|
||||
Files:
|
||||
将创建: /new-table 命令
|
||||
文件:
|
||||
- ~/.claude/homunculus/evolved/commands/new-table.md
|
||||
|
||||
## Cluster 2: Functional Code Style
|
||||
Instincts: prefer-functional, use-immutable, avoid-classes, pure-functions
|
||||
Type: Skill
|
||||
Confidence: 78% (based on 8 observations)
|
||||
## 聚类 2: 函数式代码风格
|
||||
本能: prefer-functional, use-immutable, avoid-classes, pure-functions
|
||||
类型: 技能 (Skill)
|
||||
置信度: 78% (基于 8 次观察)
|
||||
|
||||
Would create: functional-patterns skill
|
||||
Files:
|
||||
将创建: functional-patterns 技能
|
||||
文件:
|
||||
- ~/.claude/homunculus/evolved/skills/functional-patterns.md
|
||||
|
||||
## Cluster 3: Debugging Process
|
||||
Instincts: debug-check-logs, debug-isolate, debug-reproduce, debug-verify
|
||||
Type: Agent
|
||||
Confidence: 72% (based on 6 observations)
|
||||
## 聚类 3: 调试过程
|
||||
本能: debug-check-logs, debug-isolate, debug-reproduce, debug-verify
|
||||
类型: 智能体 (Agent)
|
||||
置信度: 72% (基于 6 次观察)
|
||||
|
||||
Would create: debugger agent
|
||||
Files:
|
||||
将创建: debugger 智能体
|
||||
文件:
|
||||
- ~/.claude/homunculus/evolved/agents/debugger.md
|
||||
|
||||
---
|
||||
Run `/evolve --execute` to create these files.
|
||||
运行 `/evolve --execute` 来创建这些文件。
|
||||
```
|
||||
|
||||
## Flags
|
||||
## 标志(Flags)
|
||||
|
||||
- `--execute`: Actually create the evolved structures (default is preview)
|
||||
- `--dry-run`: Preview without creating
|
||||
- `--domain <name>`: Only evolve instincts in specified domain
|
||||
- `--threshold <n>`: Minimum instincts required to form cluster (default: 3)
|
||||
- `--type <command|skill|agent>`: Only create specified type
|
||||
- `--execute`:实际创建演进后的结构(默认为预览)
|
||||
- `--dry-run`:预览而不创建
|
||||
- `--domain <name>`:仅演进指定领域中的本能
|
||||
- `--threshold <n>`:形成聚类所需的最小本能数量(默认:3)
|
||||
- `--type <command|skill|agent>`:仅创建指定类型
|
||||
|
||||
## Generated File Format
|
||||
## 生成文件格式
|
||||
|
||||
### Command
|
||||
### 命令 (Command)
|
||||
```markdown
|
||||
---
|
||||
name: new-table
|
||||
description: Create a new database table with migration, schema update, and type generation
|
||||
description: 创建带有迁移、schema 更新和类型生成的数据库新表
|
||||
command: /new-table
|
||||
evolved_from:
|
||||
- new-table-migration
|
||||
@@ -143,36 +143,36 @@ evolved_from:
|
||||
- regenerate-types
|
||||
---
|
||||
|
||||
# New Table Command
|
||||
# New Table 命令
|
||||
|
||||
[Generated content based on clustered instincts]
|
||||
[基于聚类本能生成的具体内容]
|
||||
|
||||
## Steps
|
||||
## 步骤
|
||||
1. ...
|
||||
2. ...
|
||||
```
|
||||
|
||||
### Skill
|
||||
### 技能 (Skill)
|
||||
```markdown
|
||||
---
|
||||
name: functional-patterns
|
||||
description: Enforce functional programming patterns
|
||||
description: 强制执行函数式编程模式
|
||||
evolved_from:
|
||||
- prefer-functional
|
||||
- use-immutable
|
||||
- avoid-classes
|
||||
---
|
||||
|
||||
# Functional Patterns Skill
|
||||
# Functional Patterns 技能
|
||||
|
||||
[Generated content based on clustered instincts]
|
||||
[基于聚类本能生成的具体内容]
|
||||
```
|
||||
|
||||
### Agent
|
||||
### 智能体 (Agent)
|
||||
```markdown
|
||||
---
|
||||
name: debugger
|
||||
description: Systematic debugging agent
|
||||
description: 系统化调试智能体
|
||||
model: sonnet
|
||||
evolved_from:
|
||||
- debug-check-logs
|
||||
@@ -180,7 +180,7 @@ evolved_from:
|
||||
- debug-reproduce
|
||||
---
|
||||
|
||||
# Debugger Agent
|
||||
# Debugger 智能体
|
||||
|
||||
[Generated content based on clustered instincts]
|
||||
[基于聚类本能生成的具体内容]
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user