Merge pull request 'feat/cli-delegate-subagent' (#11) from feat/cli-delegate-subagent into develop
Reviewed-on: #11 Reviewed-by: 系統管理員 <1+admin@noreply.localhost>
This commit was merged in pull request #11.
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "jsc-cli",
|
"name": "jsc-cli",
|
||||||
"version": "0.0.8",
|
"version": "0.1.0",
|
||||||
"description": "CLI 偵測、模型能力標籤與技能庫批次部署",
|
"description": "CLI 偵測、模型能力標籤、子代理派工與技能庫批次部署",
|
||||||
"skills": "./skills",
|
"skills": "./skills",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "JSC"
|
"name": "JSC"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "jsc-cli",
|
"name": "jsc-cli",
|
||||||
"version": "0.0.8",
|
"version": "0.1.0",
|
||||||
"description": "CLI 偵測、模型能力標籤與技能庫批次部署",
|
"description": "CLI 偵測、模型能力標籤、子代理派工與技能庫批次部署",
|
||||||
"skills": "./skills"
|
"skills": "./skills"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,6 +38,10 @@ Marketplace 統一為 `jsc`(https://gitea.jsc.idv.tw/plugins/meta.git),安
|
|||||||
|
|
||||||
用 `tools/list-models.sh` 讀出各已安裝 CLI 可使用的模型並加上能力標籤(`references/model-tags.md`),用 `tools/model-tags.sh sync` 把標籤表寫進 `$JSC_HOME/model-tags.tsv` 供 sdlc-gate 讀取,列出 SDLC 各階段的必要標籤(plan、analyze 需 `reasoning-max`;implement 需 `coding`;maintain 任意),並用 `tools/model-config.sh` 列出各階段的偏好模型鏈。`jsc-sdlc` 閘門一律以能力標籤判定,偏好鏈只用來建議切換目標。
|
用 `tools/list-models.sh` 讀出各已安裝 CLI 可使用的模型並加上能力標籤(`references/model-tags.md`),用 `tools/model-tags.sh sync` 把標籤表寫進 `$JSC_HOME/model-tags.tsv` 供 sdlc-gate 讀取,列出 SDLC 各階段的必要標籤(plan、analyze 需 `reasoning-max`;implement 需 `coding`;maintain 任意),並用 `tools/model-config.sh` 列出各階段的偏好模型鏈。`jsc-sdlc` 閘門一律以能力標籤判定,偏好鏈只用來建議切換目標。
|
||||||
|
|
||||||
|
### `delegate`
|
||||||
|
|
||||||
|
把單一明確任務交給另一個已安裝的 AI agent CLI 當作 subagent 執行。可指定目標 CLI,也可依任務需求用能力標籤篩選模型,或強制指定模型。每個目標分開派工,預設只讀,並回傳結構化結果供主 agent 驗證與彙整。此技能不負責模型盤點或 plugin 部署。
|
||||||
|
|
||||||
### `deploy`
|
### `deploy`
|
||||||
|
|
||||||
技能庫批次安裝、更新、解除安裝:偵測 CLI → **先比對各 plugin 的本機與已發佈版本並列表,只要有任一個落後就把「更新」設為推薦選項** → 決策樹選模式 → 每個 CLI 一個 sub agent 呼叫 `tools/deploy.sh` 執行原生 plugin 指令(統一 marketplace `jsc`,token `jsc-{domain}@jsc`)。domain 名單動態取自 `plugins/meta` 的 marketplace.json,不硬編碼。
|
技能庫批次安裝、更新、解除安裝:偵測 CLI → **先比對各 plugin 的本機與已發佈版本並列表,只要有任一個落後就把「更新」設為推薦選項** → 決策樹選模式 → 每個 CLI 一個 sub agent 呼叫 `tools/deploy.sh` 執行原生 plugin 指令(統一 marketplace `jsc`,token `jsc-{domain}@jsc`)。domain 名單動態取自 `plugins/meta` 的 marketplace.json,不硬編碼。
|
||||||
|
|||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "jsc-cli",
|
"name": "jsc-cli",
|
||||||
"version": "0.0.8",
|
"version": "0.1.0",
|
||||||
"description": "CLI 偵測、模型能力標籤與技能庫批次部署",
|
"description": "CLI 偵測、模型能力標籤、子代理派工與技能庫批次部署",
|
||||||
"skills": "./skills/"
|
"skills": "./skills/"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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.
|
||||||
Reference in New Issue
Block a user