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,172 +1,172 @@
# Orchestrate Command
# 编排(Orchestrate)命令
Sequential agent workflow for complex tasks.
用于复杂任务的顺序智能体Agent工作流。
## Usage
## 用法
`/orchestrate [workflow-type] [task-description]`
## Workflow Types
## 工作流类型
### feature
Full feature implementation workflow:
完整功能实现工作流:
```
planner -> tdd-guide -> code-reviewer -> security-reviewer
```
### bugfix
Bug investigation and fix workflow:
Bug 调查与修复工作流:
```
explorer -> tdd-guide -> code-reviewer
```
### refactor
Safe refactoring workflow:
安全重构工作流:
```
architect -> code-reviewer -> tdd-guide
```
### security
Security-focused review:
侧重安全的评审:
```
security-reviewer -> code-reviewer -> architect
```
## Execution Pattern
## 执行模式
For each agent in the workflow:
对于工作流中的每个智能体Agent
1. **Invoke agent** with context from previous agent
2. **Collect output** as structured handoff document
3. **Pass to next agent** in chain
4. **Aggregate results** into final report
1. **调用智能体**:携带来自上一个智能体的上下文。
2. **收集输出**将其作为结构化的交接Handoff文档。
3. **传递**:交给链条中的下一个智能体。
4. **汇总结果**:生成最终报告。
## Handoff Document Format
## 交接(Handoff)文档格式
Between agents, create handoff document:
在智能体之间创建交接文档:
```markdown
## HANDOFF: [previous-agent] -> [next-agent]
### Context
[Summary of what was done]
[工作总结]
### Findings
[Key discoveries or decisions]
[关键发现或决策]
### Files Modified
[List of files touched]
[涉及的文件列表]
### Open Questions
[Unresolved items for next agent]
[留给下一个智能体的未解决事项]
### Recommendations
[Suggested next steps]
[建议的后续步骤]
```
## Example: Feature Workflow
## 示例:功能开发工作流(Feature Workflow
```
/orchestrate feature "Add user authentication"
/orchestrate feature "添加用户认证功能"
```
Executes:
执行流程:
1. **Planner Agent**
- Analyzes requirements
- Creates implementation plan
- Identifies dependencies
- Output: `HANDOFF: planner -> tdd-guide`
1. **规划智能体(Planner Agent**
- 分析需求
- 创建实现计划
- 识别依赖项
- 输出:`HANDOFF: planner -> tdd-guide`
2. **TDD Guide Agent**
- Reads planner handoff
- Writes tests first
- Implements to pass tests
- Output: `HANDOFF: tdd-guide -> code-reviewer`
2. **TDD 指导智能体TDD Guide Agent**
- 读取规划智能体Planner的交接文档
- 测试先行(先编写测试)
- 编写实现代码以通过测试
- 输出:`HANDOFF: tdd-guide -> code-reviewer`
3. **Code Reviewer Agent**
- Reviews implementation
- Checks for issues
- Suggests improvements
- Output: `HANDOFF: code-reviewer -> security-reviewer`
3. **代码评审智能体(Code Reviewer Agent**
- 评审实现代码
- 检查潜在问题
- 提出改进建议
- 输出:`HANDOFF: code-reviewer -> security-reviewer`
4. **Security Reviewer Agent**
- Security audit
- Vulnerability check
- Final approval
- Output: Final Report
4. **安全评审智能体(Security Reviewer Agent**
- 安全审计
- 漏洞检查
- 最终批准
- 输出:最终报告
## Final Report Format
## 最终报告格式
```
ORCHESTRATION REPORT
====================
Workflow: feature
Task: Add user authentication
Task: 添加用户认证功能
Agents: planner -> tdd-guide -> code-reviewer -> security-reviewer
SUMMARY
-------
[One paragraph summary]
[一段话总结]
AGENT OUTPUTS
-------------
Planner: [summary]
TDD Guide: [summary]
Code Reviewer: [summary]
Security Reviewer: [summary]
Planner: [摘要]
TDD Guide: [摘要]
Code Reviewer: [摘要]
Security Reviewer: [摘要]
FILES CHANGED
-------------
[List all files modified]
[列出所有修改的文件]
TEST RESULTS
------------
[Test pass/fail summary]
[测试通过/失败摘要]
SECURITY STATUS
---------------
[Security findings]
[安全发现项]
RECOMMENDATION
--------------
[SHIP / NEEDS WORK / BLOCKED]
```
## Parallel Execution
## 并行执行
For independent checks, run agents in parallel:
对于独立的检查项,可以并行运行智能体:
```markdown
### Parallel Phase
Run simultaneously:
- code-reviewer (quality)
- security-reviewer (security)
- architect (design)
同时运行:
- code-reviewer (质量评审)
- security-reviewer (安全评审)
- architect (设计评审)
### Merge Results
Combine outputs into single report
将所有输出汇总到单个报告中
```
## Arguments
## 参数
$ARGUMENTS:
- `feature <description>` - Full feature workflow
- `bugfix <description>` - Bug fix workflow
- `refactor <description>` - Refactoring workflow
- `security <description>` - Security review workflow
- `custom <agents> <description>` - Custom agent sequence
- `feature <description>` - 完整功能实现工作流
- `bugfix <description>` - Bug 修复工作流
- `refactor <description>` - 重构工作流
- `security <description>` - 安全评审工作流
- `custom <agents> <description>` - 自定义智能体序列
## Custom Workflow Example
## 自定义工作流示例
```
/orchestrate custom "architect,tdd-guide,code-reviewer" "Redesign caching layer"
/orchestrate custom "architect,tdd-guide,code-reviewer" "重构缓存层"
```
## Tips
## 技巧
1. **Start with planner** for complex features
2. **Always include code-reviewer** before merge
3. **Use security-reviewer** for auth/payment/PII
4. **Keep handoffs concise** - focus on what next agent needs
5. **Run verification** between agents if needed
1. **从规划开始**对于复杂功能优先使用规划智能体Planner
2. **始终包含代码评审**在合并前务必包含代码评审智能体Code Reviewer
3. **涉及敏感操作使用安全评审**在处理鉴权、支付或敏感信息PII请使用安全评审智能体Security Reviewer)。
4. **保持交接文档简洁**:专注于下一个智能体所需的信息。
5. **在环节间运行验证**如有必要在智能体交接间运行验证Verification