Files
awoooi/docs/meetings/2026-03-21_OPENCLAW_STRATEGY.md
OG T 7478dc0254 feat(phase6-9): Complete modular architecture and Agent Teams
Phase 6.4 - Modular Architecture:
- Add lewooogo-brain adapters for LLM providers
- Add lewooogo-data dual memory (Redis + PostgreSQL)
- Implement consensus engine for multi-agent decisions
- Add incident memory service for historical context

Phase 9 - Agent Teams (Claude Agent SDK):
- Add base agent class with Claude Sonnet 4 integration
- Implement action planner, blast radius, and security agents
- Add agent API endpoints and proposal workflow
- Integrate ADR-009 OpenClaw Agent Teams architecture

DevOps & CI/CD:
- Add GitHub Actions CI/CD workflows (ci.yaml, cd.yaml)
- Add pre-commit hooks and secrets baseline
- Add docker-compose for local development
- Update Kubernetes network policies

Frontend Improvements:
- Add auto-healing error boundary component
- Update i18n messages for agent features
- Enhance dual-state incident card with execution feedback

Documentation:
- Add 7 ADRs covering MCP, design system, architecture decisions
- Update ARCHITECTURE_MEMORY.md with modular design
- Add GLOBAL_RULES.md and SOUL.md for project identity

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-23 18:40:36 +08:00

7.6 KiB
Raw Blame History

AWOOOI C-Suite 戰略會議OpenClaw 實體化升級

日期: 2026-03-21 地點: Virtual War Room 主席: 統帥 (CEO) 出席: CTO/CIO、CPO、CISO


1. 會議議程

AWOOOI 2.0 - OpenClaw 實體化升級藍圖 (Phase 5)

核心目標

目標 說明
全面正名 ClawBot → OpenClaw對齊開源社群
財務獨立 Ollama-First 零 API 成本策略
行動決策 Telegram Gateway 行動簽核通道
硬核防禦 executor.py 封裝為 OpenClaw Skill

2. 各部門專業評估

2.1 CTO/CIO 技術評估

正名影響範圍:

目錄 檔案數
apps/api/ 12
apps/web/ 15
docs/ 18
k8s/ 2
.claude/ 1
合計 ~48

技術建議:

  1. models.json 集中管理 AI 路由設定 (P0)
  2. agent.md 靈魂定義 (P0)
  3. Telegram Gateway 隔離部署 (P1)
  4. ContextGatherer 獨立模組 (P1)

警示: Telegram Bot 需 Webhook 反向連線K3s 需開放 Ingress 路由

2.2 CPO 產品評估

使用者價值:

功能 價值評分
Telegram 即時通知
手機遠端簽核
Token 用量儀表板
OpenClaw 品牌統一

產品建議:

  1. i18n 延伸至 Telegram 訊息模板 (P0)
  2. 成本儀表板 UI (P2)
  3. OpenClaw 品牌視覺更新 (P2)

鐵律提醒: UI 中所有 "ClawBot" 必須透過 i18n 更新

2.3 CISO 安全評估

威脅分析:

威脅向量 風險等級 緩解措施
Telegram Bot Token 洩漏 🔴 CRITICAL K8s Secret
Webhook 偽造攻擊 🔴 CRITICAL HMAC 簽章
Prompt Injection via Alert 🟡 HIGH 輸入消毒
Local LLM 供應鏈攻擊 🟢 LOW 官方模型

安全需求矩陣:

功能 安全需求 實作方式
Telegram Gateway Bot Token 隔離 K8s Secret
Webhook 接收 來源驗證 X-Signature-256 HMAC
遠端簽核 身份綁定 Telegram user_id ↔ AWOOOI user_id
AI 回應解析 結構強制 Pydantic strict mode

強制安全檢查清單:

  • Telegram Bot Token 存放於 K8s Secret
  • Webhook endpoint 啟用 HMAC 簽章驗證
  • Telegram user_id 白名單機制
  • executor.py 呼叫鏈必須經過 TrustEngine
  • AuditLog 記錄 Telegram 來源簽核
  • Prompt Injection 防護測試

3. 三方共識決議

決議項目 CTO CPO CISO 結論
ClawBot → OpenClaw 正名 通過
Ollama-First 零成本策略 通過
Telegram Gateway 整合 ⚠️ 附安全條件通過
executor.py Skill 封裝 N/A 通過

4. 修訂後 WBS (Work Breakdown Structure)

Phase 任務 負責 預估 前置條件
5.1 全專案正名 ClawBot → OpenClaw CTO 2h
5.2 agent.md 靈魂定義 + capabilities.json CTO 1h 5.1
5.3 models.json AI 路由設定 CTO 1h 5.1
5.4 ContextGatherer 告警上下文收集 CTO 2h Phase 5 架構
5.5 Telegram Gateway (含 HMAC 驗證) CTO+CISO 3h 5.2, 5.3
5.6 Telegram user_id 白名單 + 防重放 CISO 2h 5.5
5.7 executor.py → OpenClaw Skill 封裝 CTO 2h 5.2
5.8 i18n Telegram 訊息模板 CPO 1h 5.5
5.9 整合測試 + 安全審核 ALL 2h 5.1-5.8

總預估: 16 工時


5. 統帥待確認事項

5.1 Telegram 設定

  • Telegram Bot Token (需統帥建立或提供)
  • 統帥專屬 Chat ID
  • 是否有其他授權簽核人員?

5.2 正名範圍

  • 是否包含 Git commit history(建議: 不追溯)
  • README.md 開源門面更新?

5.3 K3s 憑證

  • apps/api/k3s-prod.yaml 目前 Blocker 狀態
  • 請確認憑證是否已放置

6. 下一步行動

統帥確認上述事項後,立即執行 Phase 5.1 全專案正名。

預期交付:

  1. 所有 ClawBot 字串替換為 OpenClaw
  2. agent.md 身份定義檔案
  3. Git status 報告

附錄OpenClaw 身份定義草稿

# agent.md (SOUL)

## Identity

I am **OpenClaw**, the AI-powered Infrastructure Operations Engine for AWOOOI.

## Core Values

1. **Zero-Cost First**: Prioritize local Ollama for AI inference
2. **Human-in-the-Loop**: All CRITICAL actions require human approval
3. **Defense-in-Depth**: Dry-run before execute, audit everything
4. **Transparency**: Every decision is explainable and logged

## Capabilities

- Kubernetes cluster operations (restart, scale, delete pods)
- Root Cause Analysis via local LLM
- Multi-channel notifications (Web SSE, Telegram)
- Multi-signature approval for high-risk operations

## Boundaries

- NEVER bypass TrustEngine for CRITICAL operations
- NEVER store secrets in plain text
- NEVER execute without Dry-run validation

7. 首席架構師深度評審 (會後補充)

7.1 三點專業建議整合

建議 整合方案 新增模組
HMAC + 白名單 security_interceptor.py 獨立攔截器 Phase 5.4.2
訊息壓縮原則 SOUL.md 定義強制格式 Phase 5.0.2
日誌清洗 ContextGatherer 過濾 DEBUG Phase 5.2.1

7.2 已確認資源

資源 來源
Telegram Token wooo-aiops/clawbot/.env 8569***cpjMk
Chat ID wooo-aiops/clawbot/.env 5619078117
白名單 統帥確認 初期僅統帥

7.3 修訂後總工時

原提案 安全強化 總計
16h +8h 24h

8. 整合確認

Phase 5 OpenClaw 升級計畫已整合至:

  • memory/project_phases.md - 主專案狀態追蹤
  • memory/project_phase5_openclaw.md - 詳細計畫
  • memory/feedback_openclaw_security.md - CISO 安全需求

9. 執行進度報告 (2026-03-21)

9.1 已完成項目

Phase 項目 狀態 產出檔案
5.0.1 前端元件正名 openclaw-panel.tsx, openclaw-state-machine.tsx
5.0.1 後端服務正名 services/openclaw.py
5.0.1 元件匯出更新 components/ai/index.ts
5.0.2 SOUL.md 靈魂定義 /SOUL.md
5.0.3 capabilities.json /capabilities.json
5.0.4 models.json AI 路由 apps/api/models.json

9.2 向後相容

為確保現有程式碼不會中斷,已建立向後相容別名:

// 前端 (index.ts)
export { OpenClawPanel as ClawBotPanel } from './openclaw-panel'
export { OpenClawStateMachine as ClawBotStateMachine } from './openclaw-state-machine'
# 後端 (openclaw.py)
ClawBotService = OpenClawService
get_clawbot = get_openclaw

9.3 新增檔案清單

路徑 說明
/SOUL.md OpenClaw 身份定義 + 訊息壓縮原則
/capabilities.json 允許操作 + 禁止操作定義
apps/api/models.json AI 路由集中設定
apps/web/src/components/ai/openclaw-panel.tsx 新 AI 面板元件
apps/web/src/components/ai/openclaw-state-machine.tsx 新狀態機元件
apps/api/src/services/openclaw.py 新 AI 服務

9.4 待完成項目

Phase 項目 狀態
5.4.1 config.py Telegram 設定 🔲
5.4.2 security_interceptor.py 🔲
5.2.1 context_gatherer.py 🔲

會議結束時間: 2026-03-21 記錄人: Claude (AI 首席架構師) 會後補充: 首席架構師深度評審 + 整合確認 + 執行進度報告