Agent-based task orchestration skill. Performs structured work through the Plan→Work→Review cycle. The bridge tracks agent status in real time and sends notifications to the channel.
Quick Start
1. Routing Test
bash ~/.openclaw/skills/harness/scripts/route-task.sh "태스크 설명"
2. Spawn a Single Agent
Read the agent prompt and sessions_spawnpass to:
| Agent | Role | Permissions | Recommended Model |
|---|---|---|---|
| planner | Planning (read-only) | read-only | glm-5-turbo |
| worker | Code implementation | read+write+exec | gpt-5.4-codex |
| reviewer | 4-perspective review (read-only) | read-only | glm-5-turbo |
| debugger | Systematic debugging | read+exec | glm-5-turbo |
| bridge | Status tracking + channel notifications | read+write | glm-5-turbo |
3. Full Cycle (bridge auto-activates)
Run the entire Plan→Work→Review flow (v2: includes gap loop):
- Bridge auto-activates → status tracking begins (P1: works without a screen)
- Planner spawn → task decomposition → phase transition notifications
- Worker spawn → implementation → completion/failure notifications
- Reviewer spawn → review + gap detection
- APPROVE → COMPLETE
- GAP_DETECTED → gap fix feedback → re-run Worker (max 1 time) → re-review
- Gap again on the second pass → escalation (ask the user)
4. Bridge Control
# 상태 확인
bash ~/.openclaw/skills/harness/scripts/bridge.sh status
# 새 사이클 초기화
bash ~/.openclaw/skills/harness/scripts/bridge.sh reset "my-cycle" full
# 단계 전환 (자동 호출됨)
bash ~/.openclaw/skills/harness/scripts/bridge.sh phase WORKING
Bridge
Core Principles
| Principle | Description |
|---|---|
| P1: Works without a screen | Grasp the full status via channel notifications without watching the terminal |
| P2: Failures are notified immediately | Successes are batched, failures are notified individually within 20 seconds |
| P3: Bridge failure isolation | Even if the bridge dies, the pipeline runs normally, latency ≤5s |
| P4: Auto-detection | Auto-detect channel/model/session, add 0 configuration |
Auto-detected Items (no configuration needed)
The bridge auto-detects the following from the OpenClaw runtime context:
| Information | Detection Method | Manual Configuration |
|---|---|---|
| Channel | Current message context | ❌ Not needed |
| Channel ID | inbound_meta.chat_id | ❌ Not needed |
| Model | session_status | ❌ Not needed |
| Gateway URL | Internal communication (message tool) | ❌ Not needed |
| Session key | Current session context | ❌ Not needed |
Notification type
# 단계 전환 (D3)
🔄 [harness] → Work 단계 시작 (Plan 완료, 45초)
# 성공 배치 (X3, X4)
✅ [harness] 2/3 완료 (67%)
├── worker-1: API 구현 (gpt-5.4-codex, 120s)
├── worker-2: 테스트 작성 (glm-5-turbo, 45s)
└── 예상 잔여: ~60초
# 실패 즉시 (D2)
❌ [harness] worker-3 실패
├── 태스크: DB 마이그레이션
├── 에러: connection refused (마지막 5줄)
└── 상태: 2/3 완료 — 나머지 진행 중
# 브릿지 장애 (D5)
⚠️ [harness] 브릿지 알림 전송 실패 (3회 재시도 후)
├── 원인: 채널 연결 불가
└── 파이프라인은 정상 동작 중
# 갭 감지 (우로보로스 루프)
⚡ [harness] worker-2 갭 감지 (scope_creep)
├── 원인: TODO 앱에 알림 시스템 자의 추가
├── 수정 방향: 알림 기능 제거, 단순 CRUD로 축소
├── 루프: 0/1
└── 상태: 1/3
# 갭 수정 시작
🔄 [harness] worker-2 갭 수정 시작 (루프 1/1)
Bridge script API
BRIDGE=~/.openclaw/skills/harness/scripts/bridge.sh
# 사이클 관리
$BRIDGE reset <cycle_id> [mode] # 새 사이클 시작
$BRIDGE status # 현재 상태 출력
# 단계 전환
$BRIDGE phase <phase> # IDLE/PLANNING/WORKING/REVIEWING/COMPLETE
# 에이전트 추적
$BRIDGE agent-start <id> [model] # 에이전트 시작 등록
$BRIDGE complete <id> [요약] # 성공 완료 (배치 대상)
$BRIDGE fail <id> <에러> [로그] # 실패 (즉시 알림)
$BRIDGE batch # 성공 배치 알림 전송
# 장애 관리
$BRIDGE bridge-error <에러> # 브릿지 장애 기록 (3회→에스컬레이션)
Model Routing
Complexity × Category 2D matrix:
| Category | LOW (0-4) | MEDIUM (5-9) | HIGH (10+) |
|---|---|---|---|
| General coding | glm-5-turbo | gpt-5.4-codex | gpt-5.4-codex |
| Architecture | gpt-5.4-codex | gpt-5.4-codex | gpt-5.4-codex |
| Korean NLP | glm-5-turbo | glm-5 | glm-5 |
| Debugging | glm-5-turbo | gpt-5.4-codex | gpt-5.4-codex |
| Security | gpt-5.4-codex | gpt-5.4-codex | gpt-5.4-codex |
| Content | glm-5-turbo | glm-5 | glm-5 |
Korean-language ratio > 70% → GLM family automatically prioritized
B1/B2: No model restrictions — GLM, GPT, and Claude all use the same bridge functionality.
How to spawn an agent
Read the agent definition file and sessions_spawn call:
sessions_spawn(
label: "harness-planner",
model: "zai/glm-5-turbo",
mode: "run",
task: "태스크 설명 + 에이전트 지침 포함"
)
Different models can be specified per agent (this is the key point).
File structure
~/.openclaw/skills/harness/
├── SKILL.md # 이 파일
├── agents/ # 에이전트 정의
│ ├── planner.md
│ ├── worker.md
│ ├── reviewer.md
│ ├── debugger.md
│ └── bridge.md # 브릿지 에이전트 (v2.0)
├── scripts/ # 실행 스크립트
│ ├── route-task.sh # 모델 라우팅
│ ├── orchestrate.sh # 오케스트레이터
│ ├── spawn-agent.sh # 에이전트 생성 헬퍼
│ ├── bridge.sh # 브릿지 상태 추적 + 알림 (v2.0)
│ ├── install.sh
│ ├── catalog-gen.sh
│ └── doctor.sh # 진단 (브릿지 검증 포함)
├── state/ # 런타임 상태 (gitignore)
│ └── bridge-state.json # 브릿지 상태
├── routing/ # 라우팅 설정
│ ├── models.yaml
│ ├── routing-rules.yaml
│ └── budget-profiles.yaml
├── orchestration/ # 오케스트레이션 설정
│ ├── pipelines.yaml
│ └── message-protocol.md
└── examples/
Evaluation rubric
The bridge functionality is evaluated with a 95% passing threshold rubric:
- Evaluation philosophy:
harness-bridge-eval/EVALUATION_PHILOSOPHY.md - Execution rubric:
harness-bridge-eval/EVALUATION_RUBRIC.md - 20 evaluation items (D1-D5, S1-S5+S2b+S4b, X1-X4, B1-B4)