diff --git a/docs/plans/2026-04-07-openclaw-config-candidate-patch-notes.md b/docs/plans/2026-04-07-openclaw-config-candidate-patch-notes.md new file mode 100644 index 0000000..423b5b9 --- /dev/null +++ b/docs/plans/2026-04-07-openclaw-config-candidate-patch-notes.md @@ -0,0 +1,55 @@ +# 2026-04-07 OpenClaw Candidate Config Patch Notes + +這份 `2026-04-07-openclaw-config-candidate-patch.json` 是**候選版 `config.patch`**,不是可直接套用的授權指令。 + +## 1. 設計目標 +- 將 live config 從單一 `coder` agent 擴展為 6 個 agent +- 強制每個 agent 使用自己的獨立 workspace +- 打開 Eve 跨 agent 協調所需的 session 可見性 +- 打開 agent-to-agent allowlist,但不假裝只靠 config 就能完成制度約束 + +## 2. 依 live config 做的最小必要變更 +目前 live config 關鍵現況: +- `agents.list` 只有 `coder` +- `tools.sessions.visibility = "self"` +- `tools.agentToAgent.enabled = false` +- `agents.defaults.workspace = "/home/alice/.openclaw/workspace"` + +因此候選 patch 只改: +- `agents.defaults.workspace -> null` +- `agents.list -> 整組替換為 6-agent list` +- `tools.sessions.visibility -> "all"` +- `tools.agentToAgent.enabled -> true` +- `tools.agentToAgent.allow -> 6-agent allowlist` + +## 3. JSON Merge Patch 語義 +這份檔案是按 `config.patch` 的 merge patch 語義設計: + +### 3.1 刪除 key +- `"workspace": null` 代表刪除 `agents.defaults.workspace` +- 目的:避免殘留共享 default workspace,與「每個 agent 必須獨立 workspace」衝突 + +### 3.2 陣列會整組替換 +- `agents.list` 不是 append,而是**整個 list 被替換** +- 所以候選 patch 必須放完整的 6-agent list,而不是只補 5 個新 agent + +## 4. 這份 patch 故意還沒做的事 +以下制度暫不塞進 patch: +- 只有 Eve 能對總管回話 +- 子代理只能回 Eve +- reviewer 不可越權判定完成 +- 失聯 / 超時 / 重派的程序正義 + +原因:這些主要屬於 prompt / workflow 層,不應假裝只靠 config 就會自動成立。 + +## 5. 套用前仍需再確認的事項 +1. 各 workspace 目錄是否先建立 +2. 每個 agent 是否要先補 `identity` +3. 每個 agent 是否要先補 `skills` +4. 是否要加 per-agent `tools` 限制 +5. 是否要補 `subagents.allowAgents` 進一步收窄派工邊界 + +## 6. 建議下一步 +- 先建立各 agent workspace 骨架 +- 再補各 agent 的核心 prompt / workflow 檔 +- 最後才產生真正送進 `gateway config.patch` 的 payload diff --git a/docs/plans/2026-04-07-openclaw-config-candidate-patch.json b/docs/plans/2026-04-07-openclaw-config-candidate-patch.json new file mode 100644 index 0000000..06cfb82 --- /dev/null +++ b/docs/plans/2026-04-07-openclaw-config-candidate-patch.json @@ -0,0 +1,103 @@ +{ + "agents": { + "defaults": { + "workspace": null + }, + "list": [ + { + "id": "coder", + "name": "Eve", + "workspace": "/home/alice/.openclaw/workspace", + "model": { + "primary": "cowbay/gpt-5.4", + "fallbacks": [ + "ollama/minimax-m2.5:cloud", + "cowbay/minimax/minimax-m2.5:free", + "cowbay/kilo-auto/free" + ] + } + }, + { + "id": "prompt-optimizer", + "name": "Prompt Optimizer", + "workspace": "/home/alice/.openclaw/workspace-prompt-optimizer", + "model": { + "primary": "cowbay/gpt-5.4", + "fallbacks": [ + "ollama/minimax-m2.5:cloud", + "cowbay/minimax/minimax-m2.5:free", + "cowbay/kilo-auto/free" + ] + } + }, + { + "id": "reviewer", + "name": "Reviewer", + "workspace": "/home/alice/.openclaw/workspace-reviewer", + "model": { + "primary": "cowbay/gpt-5.4", + "fallbacks": [ + "ollama/minimax-m2.5:cloud", + "cowbay/minimax/minimax-m2.5:free", + "cowbay/kilo-auto/free" + ] + } + }, + { + "id": "research", + "name": "Research", + "workspace": "/home/alice/.openclaw/workspace-research", + "model": { + "primary": "cowbay/gpt-5.4", + "fallbacks": [ + "ollama/minimax-m2.5:cloud", + "cowbay/minimax/minimax-m2.5:free", + "cowbay/kilo-auto/free" + ] + } + }, + { + "id": "engineering", + "name": "Engineering", + "workspace": "/home/alice/.openclaw/workspace-engineering", + "model": { + "primary": "cowbay/gpt-5.4", + "fallbacks": [ + "ollama/minimax-m2.5:cloud", + "cowbay/minimax/minimax-m2.5:free", + "cowbay/kilo-auto/free" + ] + } + }, + { + "id": "ops", + "name": "Ops", + "workspace": "/home/alice/.openclaw/workspace-ops", + "model": { + "primary": "cowbay/gpt-5.4", + "fallbacks": [ + "ollama/minimax-m2.5:cloud", + "cowbay/minimax/minimax-m2.5:free", + "cowbay/kilo-auto/free" + ] + } + } + ] + }, + "tools": { + "sessions": { + "visibility": "all" + }, + "agentToAgent": { + "enabled": true, + "allow": [ + "coder", + "prompt-optimizer", + "reviewer", + "research", + "engineering", + "ops" + ] + } + } +} diff --git a/docs/plans/2026-04-07-openclaw-config-draft.md b/docs/plans/2026-04-07-openclaw-config-draft.md index 3d4b43b..62e0ce6 100644 --- a/docs/plans/2026-04-07-openclaw-config-draft.md +++ b/docs/plans/2026-04-07-openclaw-config-draft.md @@ -383,3 +383,26 @@ Schema 核對後,每個 `agents.list[]` entry: - 失聯 / 超時 / 重派的程序正義 這樣可避免把制度描述誤塞進 schema 不保證存在的欄位,之後真的套用 config 時也較不容易踩坑。 + + +## 13. 已產出的候選 patch 檔 + +本輪已另外落出兩份審查用文件: + +1. `docs/plans/2026-04-07-openclaw-config-candidate-patch.json` +2. `docs/plans/2026-04-07-openclaw-config-candidate-patch-notes.md` + +### 13.1 候選 patch 的策略 +- 以 live config 為基準做**最小必要變更** +- 使用 JSON Merge Patch 語義 +- 明確以 `agents.defaults.workspace: null` 刪除共享 default workspace +- 以完整 `agents.list` 替換現有單一 `coder` list + +### 13.2 為什麼這份是 candidate patch,不是直接套用版 +因為在真正送進 `gateway config.patch` 前,仍需先確認: +- 各工作區是否先建好 +- 是否加入 `identity` +- 是否加入 `skills` +- 是否加入 per-agent `tools` +- 是否另外用 prompt / workflow 檔補足制度邊界 +