refactor: rename CLI command from oh to clawteam and update config files

This commit is contained in:
2026-04-03 17:05:09 +07:00
parent 129dea87c4
commit ef552df46e
8 changed files with 170 additions and 118 deletions
+81 -53
View File
@@ -32,17 +32,17 @@ Things like:
## ClawTeam Multi-Agent Orchestration
> **Important:** ClawTeam CLI command is `oh`. On our OpenClaw setup, ALWAYS explicitly specify `tmux openclaw` as backend+agent — `oh spawn` defaults to `claude` which we don't have.
> **Important:** ClawTeam CLI command is `clawteam`. ALWAYS specify `tmux openclaw` or `subprocess openclaw` as backend+agent — default `claude` is not available.
> Official repo: https://github.com/HKUDS/ClawTeam
### ⚠️ CRITICAL: Spawn Syntax
```
oh spawn tmux openclaw --team <team> --agent-name <name> --task "<task>"
clawteam spawn tmux openclaw --team <team> --agent-name <name> --task "<task>"
```
**NOT** `oh spawn --team ...` (defaults to `claude` → will fail)
**NOT** `oh spawn tmux claude` (we don't have claude CLI)
**NOT** `clawteam spawn --team ...` (defaults to `claude` → will fail)
**NOT** `clawteam spawn tmux claude` (we don't have claude CLI)
### Team Setup
@@ -52,114 +52,114 @@ export CLAWTEAM_AGENT_ID="leader-001"
export CLAWTEAM_AGENT_NAME="leader"
export CLAWTEAM_AGENT_TYPE="leader"
oh team spawn-team <team-name> -d "<description>" -n leader
clawteam team spawn-team <team-name> -d "<description>" -n leader
# View team status
oh status
oh board show <team-name>
oh board attach <team-name> # tiled tmux view
clawteam status
clawteam board show <team-name>
clawteam board attach <team-name> # tiled tmux view
```
### Task Management
```bash
# Create tasks (with owner, dependencies, priority)
oh task create <team> "<task description>" -o <owner>
oh task create <team> "<task>" -o <owner> --blocked-by <task-id>
oh task create <team> "Hotfix" -o <owner> --priority high
clawteam task create <team> "<task description>" -o <owner>
clawteam task create <team> "<task>" -o <owner> --blocked-by <task-id>
clawteam task create <team> "Hotfix" -o <owner> --priority high
# Update status
oh task update <team> <task-id> --status pending
oh task update <team> <task-id> --status in_progress
oh task update <team> <task-id> --status completed
oh task update <team> <task-id> --status blocked
clawteam task update <team> <task-id> --status pending
clawteam task update <team> <task-id> --status in_progress
clawteam task update <team> <task-id> --status completed
clawteam task update <team> <task-id> --status blocked
# List/filter tasks
oh task list <team> --status pending
oh task list <team> --owner <agent-name>
oh task list <team> --priority high
clawteam task list <team> --status pending
clawteam task list <team> --owner <agent-name>
clawteam task list <team> --priority high
# Wait for all sub-agents to finish
oh task wait <team>
oh task wait <team> --timeout 300 --poll-interval 10
clawteam task wait <team>
clawteam task wait <team> --timeout 300 --poll-interval 10
```
### Spawn Workers (OpenClaw Specific)
```bash
# ✅ CORRECT — always use tmux openclaw
oh spawn tmux openclaw --team <team> --agent-name <name> --task "<task>"
clawteam spawn tmux openclaw --team <team> --agent-name <name> --task "<task>"
# ✅ With non-default provider/model via profile
oh spawn tmux --profile <profile-name> --team <team> --agent-name <name> --task "<task>"
clawteam spawn tmux --profile <profile-name> --team <team> --agent-name <name> --task "<task>"
# ❌ WRONG — defaults to claude
oh spawn --team <team> --agent-name <name> --task "<task>"
oh spawn tmux claude --team <team> --agent-name <name> --task "<task>"
clawteam spawn --team <team> --agent-name <name> --task "<task>"
clawteam spawn tmux claude --team <team> --agent-name <name> --task "<task>"
```
### Communication (Inbox)
```bash
# Send message to agent
oh inbox send <team> <to-agent> "<message>"
clawteam inbox send <team> <to-agent> "<message>"
# Broadcast to all
oh inbox broadcast <team> "<message>"
clawteam inbox broadcast <team> "<message>"
# Receive (destructive — consumes message)
oh inbox receive <team> --agent <name>
clawteam inbox receive <team> --agent <name>
# Peek (non-destructive)
oh inbox peek <team> --agent <name>
clawteam inbox peek <team> --agent <name>
# Watch for new messages
oh inbox watch <team> --agent <name>
clawteam inbox watch <team> --agent <name>
```
### Profiles & Presets
```bash
# List built-in provider templates
oh preset list
oh preset show <provider-name>
clawteam preset list
clawteam preset show <provider-name>
# Generate reusable profile from preset
oh preset generate-profile <preset> <base-agent> --name <profile-name>
clawteam preset generate-profile <preset> <base-agent> --name <profile-name>
# Or use interactive TUI
oh profile wizard
clawteam profile wizard
# Test a profile before using in team
oh profile test <profile-name>
clawteam profile test <profile-name>
# Fix broken profile on fresh machine
oh profile doctor claude
clawteam profile doctor claude
```
### Git Context & Conflict Checks
```bash
oh context log <team>
oh context diff <team>
oh context files <team>
oh context conflicts <team>
oh context inject <team> --agent <name>
clawteam context log <team>
clawteam context diff <team>
clawteam context files <team>
clawteam context conflicts <team>
clawteam context inject <team> --agent <name>
```
### Workspace Management
```bash
oh workspace list <team>
oh workspace merge <team> <agent-name>
clawteam workspace list <team>
clawteam workspace merge <team> <agent-name>
```
### Snapshots & Recovery
```bash
oh team snapshot <team> --tag <tag-name>
oh team snapshots <team>
oh team restore <team> --snapshot <tag-name>
clawteam team snapshot <team> --tag <tag-name>
clawteam team snapshots <team>
clawteam team restore <team> --snapshot <tag-name>
```
### Worker Loop Protocol
@@ -168,28 +168,28 @@ Workers should NOT exit after completing their initial task. Expected loop:
```bash
# 1. Check tasks
oh task list <team> --owner <me>
clawteam task list <team> --owner <me>
# 2. Check inbox for new instructions
oh inbox receive <team> --agent <me>
clawteam inbox receive <team> --agent <me>
# 3. If idle, notify leader
oh lifecycle idle <team>
clawteam lifecycle idle <team>
```
### Cleanup
```bash
oh team cleanup <team> # kill workers, cleanup worktrees
oh lifecycle request-shutdown <team>
clawteam team cleanup <team> # kill workers, cleanup worktrees
clawteam lifecycle request-shutdown <team>
```
### JSON Output
```bash
oh --json team discover
oh --json board show <team>
oh --json task list <team> --status pending
clawteam --json team discover
clawteam --json board show <team>
clawteam --json task list <team> --status pending
```
Requires:
@@ -200,3 +200,31 @@ Requires:
- OpenClaw CLI available on PATH (`openclaw`)
- Git repo for worktree isolation
- Data directory: `~/.clawteam/`
### ✅ Confirmed Working Commands
```bash
# Create team
clawteam team spawn-team <team> -d "<description>" -n <leader>
# Create task (gets task ID back)
clawteam task create <team> "<task>" -o <owner>
# Output: OK Task created: <TASK_ID>
# Spawn worker with task description
clawteam spawn tmux openclaw --team <team> --agent-name <name> --agent-type coder \
--task "Do X. After done: clawteam task update <team> <TASK_ID> --status completed"
# Or with subprocess (faster, no tmux monitor)
clawteam spawn subprocess openclaw --team <team> --agent-name <name> --task "..."
# View board
clawteam board show <team>
# Mark task done
clawteam task update <team> <task-id> --status completed
### ⚠️ Flags That DON'T Exist on clawteam spawn
- `--model` (model is set by OpenClaw config, not clawteam)
- `--timeout` (no timeout flag on spawn)
- `-m` (conflicts with clawteam's own options)