feat(cli): 新增 delegate 子代理技能

This commit is contained in:
2026-08-25 16:56:22 +08:00
parent 7df56159e1
commit 17329a94d3
5 changed files with 47 additions and 6 deletions
+37
View File
@@ -0,0 +1,37 @@
---
name: delegate
description: Delegate a single bounded task to another installed AI agent CLI as a subagent, with an explicit target CLI, required capability tags, or a forced model. Use when another CLI should do the work and return structured results; not for model inventory, plugin deployment, or tasks that must stay in the current agent.
---
# delegate — hand a task to another CLI
Use this skill when the work should move to another installed AI agent CLI instead of staying in the current agent.
## Steps
1. Split the request into one bounded goal. One goal means one subagent.
2. Detect the installed AI agent CLIs. Use only a target CLI that is actually present.
3. Choose the execution model.
- If the user names a CLI, keep only that CLI.
- If the user gives capability tags, keep only models that satisfy all tags.
- If the user forces a model, use that exact model and fail if it does not satisfy the tags.
4. Build the subagent prompt.
- Include the goal, the acceptance criteria, the target CLI, the model choice, and the minimum needed context.
- Include `/jsc-shared:spec-output`.
- State the write scope clearly. If no write scope is granted, say the subagent is read-only.
5. Spawn one subagent for the goal. Do not mix unrelated goals in the same subagent.
6. Verify the result before you report it.
- Check the exit status.
- Check that the return value is structured.
- Check that the result covers the acceptance criteria.
- Check that any writes stayed inside the allowed scope.
7. Report the verified result.
- State the CLI, the model, the capability tags, and the outcome.
- Separate success, failure, and anything that still needs user input.
## Do not use this skill
- Do not use it for model inventory.
- Do not use it for plugin deployment.
- Do not use it for tasks that must stay inside the current agent.
- Do not use it when the task is not bounded enough to hand off cleanly.