技能协调者
- 作者仓库星标 435
- 作者仓库 nvim
- 领域
- 工程开发
- 作者声明的智能体
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 运行环境证据
- 未执行;当前没有隔离运行测试证据
- 作者 / 版本 / 许可证
- @benbrastmckie · 未声明许可证
- 上下文用量评级
- 低消耗
- 接入复杂程度
- 需简单配置
- 是否需要外部接口密钥
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 运行环境要求
- 未检出明确要求
- 检测到的文件与系统行为
-
- 只读
- 允许写入 / 修改
- 命令执行
- 网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
需要注意: 未声明工具权限范围;实际权限由运行环境决定。
# Orchestrator Skill
Central routing intelligence for the task management system.
## Context Loading
Load context on-demand when needed:
- `@.opencode/context/orchestration/orchestration-core.md` - Routing, delegation, session tracking
- `@.opencode/context/orchestration/state-management.md` - Task lookup and status validation
- `@.opencode/context/index.json` - Full context discovery index
## Trigger Conditions
This skill activates when:
- A slash command needs task-type-based routing
- Task context needs to be gathered before delegation
- Multi-step workflows require coordination
## Core Responsibilities
### 1. Task Lookup
Given a task number, retrieve full context:
```
1. Read specs/state.json
2. Find task by project_number
3. Extract: task_type, status, project_name, description, priority
4. Read TODO.md for additional context if needed
```
### 2. Task-Type-Based Routing
Route to appropriate skill based on task type:
| Task Type | Research Skill | Implementation Skill |
|-----------|---------------|---------------------|
| general | skill-researcher | skill-implementer |
| meta | skill-researcher | skill-implementer |
| markdown | skill-researcher | skill-implementer |
**Note**: Additional languages (latex, typst) are available via extensions in `.opencode/extensions/`.
### 3. Status Validation
Before routing, validate task status is not terminal:
```
if status in [completed, abandoned, expanded]:
ABORT "Task is in terminal state [$status]"
```
All operations (research, plan, implement, revise) are allowed from any non-terminal status.
### 4. Context Preparation
Prepare context package for delegated skill:
```json
{
"task_number": 259,
"task_name": "task_slug",
"task_type": "general",
"status": "planned",
"description": "Full task description",
"artifacts": {
"research": ["path/to/research.md"],
"plan": "path/to/plan.md"
},
"focus_prompt": "Optional user-provided focus"
}
```
## Execution Flow
```
1. Receive command context (task number, operation type)
2. Lookup task in state.json
3. Validate status for operation
4. Determine target skill by task_type
5. Prepare context package
6. Invoke target skill via Task tool
7. Receive and validate result
8. Return result to caller
```
## Return Format
```json
{
"status": "completed|partial|failed",
"routed_to": "skill-name",
"task_number": 259,
"result": {
"artifacts": [],
"summary": "..."
}
}
```
## Error Handling
- Task not found: Return clear error with suggestions
- Invalid status: Return error with current status and allowed operations
- Skill invocation failure: Return partial result with error details
---
## MUST NOT (Postflight Boundary)
After routing to a skill, this skill MUST NOT:
1. **Edit source files** - All work is done by routed skills/agents
2. **Run build/test commands** - Verification is done by routed skills/agents
3. **Update task status** - Status updates are done by routed skills
4. **Create artifacts** - Artifact creation is done by routed skills/agents
The orchestrator is a **routing-only** skill. It:
- Looks up task context
- Routes to appropriate skill based on task_type
- Passes through the routed skill's return
Reference: @.opencode/context/standards/postflight-tool-restrictions.md
章节与文件索引
按说明文件中的顺序排列。
上下文加载
触发条件
1. 任务查找
2. 基于任务类型的路由
3. 状态验证
文件/命令 -> @.opencode/context/orchestration/orchestration-core.md · @.opencode/context/orchestration/state-management.md · @.opencode/context/index.json · .opencode/extensions/
内容校验值 -> 466df34f0221
当前原文的自动摘译,尚未人工审校。
上下文加载
需要时按需加载上下文:
@.opencode/context/orchestration/orchestration-core.md- 路由、委派、会话跟踪@.opencode/context/orchestration/state-management.md- 任务查找和状态验证@.opencode/context/index.json- 完整上下文发现索引触发条件
该技能在以下情况下激活: 斜杠命令需要基于任务类型的路由 需要在委派之前收集任务上下文 多步骤工作流程需要协调
1. 任务查找
给定任务编号,检索完整上下文:
2. 基于任务类型的路由
根据任务类型获取适当技能的路径:任务类型·研究技能·实施技能一般·技能研究员·技能实施者元·技能研究员·技能实施者降价·技能研究员·技能实施者
3. 状态验证
在路由之前,验证任务状态不是最终状态:所有操作(研究、计划、实施、修改)都允许从任何非最终状态进行。