@enderfga/claw-orchestrator 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +218 -0
- package/assets/banner.jpg +0 -0
- package/configs/council-reviewer-prompt.md +82 -0
- package/configs/council-system-prompt.md +141 -0
- package/dist/bin/cli.d.ts +13 -0
- package/dist/bin/cli.js +460 -0
- package/dist/bin/cli.js.map +1 -0
- package/dist/src/base-oneshot-session.d.ts +87 -0
- package/dist/src/base-oneshot-session.js +228 -0
- package/dist/src/base-oneshot-session.js.map +1 -0
- package/dist/src/circuit-breaker.d.ts +21 -0
- package/dist/src/circuit-breaker.js +49 -0
- package/dist/src/circuit-breaker.js.map +1 -0
- package/dist/src/consensus.d.ts +20 -0
- package/dist/src/consensus.js +52 -0
- package/dist/src/consensus.js.map +1 -0
- package/dist/src/constants.d.ts +129 -0
- package/dist/src/constants.js +138 -0
- package/dist/src/constants.js.map +1 -0
- package/dist/src/council.d.ts +67 -0
- package/dist/src/council.js +914 -0
- package/dist/src/council.js.map +1 -0
- package/dist/src/embedded-server.d.ts +25 -0
- package/dist/src/embedded-server.js +360 -0
- package/dist/src/embedded-server.js.map +1 -0
- package/dist/src/inbox-manager.d.ts +38 -0
- package/dist/src/inbox-manager.js +111 -0
- package/dist/src/inbox-manager.js.map +1 -0
- package/dist/src/index.d.ts +63 -0
- package/dist/src/index.js +973 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/logger.d.ts +16 -0
- package/dist/src/logger.js +44 -0
- package/dist/src/logger.js.map +1 -0
- package/dist/src/models.d.ts +69 -0
- package/dist/src/models.js +299 -0
- package/dist/src/models.js.map +1 -0
- package/dist/src/openai-compat.d.ts +224 -0
- package/dist/src/openai-compat.js +756 -0
- package/dist/src/openai-compat.js.map +1 -0
- package/dist/src/persistent-codex-app-session.d.ts +108 -0
- package/dist/src/persistent-codex-app-session.js +465 -0
- package/dist/src/persistent-codex-app-session.js.map +1 -0
- package/dist/src/persistent-codex-session.d.ts +37 -0
- package/dist/src/persistent-codex-session.js +208 -0
- package/dist/src/persistent-codex-session.js.map +1 -0
- package/dist/src/persistent-cursor-session.d.ts +21 -0
- package/dist/src/persistent-cursor-session.js +241 -0
- package/dist/src/persistent-cursor-session.js.map +1 -0
- package/dist/src/persistent-custom-session.d.ts +78 -0
- package/dist/src/persistent-custom-session.js +938 -0
- package/dist/src/persistent-custom-session.js.map +1 -0
- package/dist/src/persistent-gemini-session.d.ts +21 -0
- package/dist/src/persistent-gemini-session.js +216 -0
- package/dist/src/persistent-gemini-session.js.map +1 -0
- package/dist/src/persistent-session.d.ts +80 -0
- package/dist/src/persistent-session.js +745 -0
- package/dist/src/persistent-session.js.map +1 -0
- package/dist/src/proxy/anthropic-adapter.d.ts +136 -0
- package/dist/src/proxy/anthropic-adapter.js +392 -0
- package/dist/src/proxy/anthropic-adapter.js.map +1 -0
- package/dist/src/proxy/handler.d.ts +39 -0
- package/dist/src/proxy/handler.js +365 -0
- package/dist/src/proxy/handler.js.map +1 -0
- package/dist/src/proxy/schema-cleaner.d.ts +11 -0
- package/dist/src/proxy/schema-cleaner.js +34 -0
- package/dist/src/proxy/schema-cleaner.js.map +1 -0
- package/dist/src/proxy/thought-cache.d.ts +19 -0
- package/dist/src/proxy/thought-cache.js +53 -0
- package/dist/src/proxy/thought-cache.js.map +1 -0
- package/dist/src/session-manager.d.ts +317 -0
- package/dist/src/session-manager.js +1528 -0
- package/dist/src/session-manager.js.map +1 -0
- package/dist/src/types.d.ts +513 -0
- package/dist/src/types.js +8 -0
- package/dist/src/types.js.map +1 -0
- package/dist/src/validation.d.ts +31 -0
- package/dist/src/validation.js +104 -0
- package/dist/src/validation.js.map +1 -0
- package/openclaw.plugin.json +122 -0
- package/package.json +84 -0
- package/skills/SKILL.md +184 -0
- package/skills/references/claude-cli-tracking.md +25 -0
- package/skills/references/cli.md +187 -0
- package/skills/references/council.md +210 -0
- package/skills/references/getting-started.md +133 -0
- package/skills/references/inbox.md +81 -0
- package/skills/references/multi-engine.md +382 -0
- package/skills/references/openai-compat.md +203 -0
- package/skills/references/sessions.md +191 -0
- package/skills/references/tools.md +418 -0
- package/skills/references/ultra.md +126 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 enderfga
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="./assets/banner.jpg" alt="Claw Orchestrator" width="100%">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
# Claw Orchestrator
|
|
6
|
+
|
|
7
|
+
Run Claude Code, Codex and other coding agents in one unified runtime.
|
|
8
|
+
|
|
9
|
+
Claw Orchestrator turns interactive coding CLIs into programmable, headless agent engines. Start persistent sessions, route tasks across different coding agents, coordinate multi-agent councils, and expose everything through a clean tool-based API.
|
|
10
|
+
|
|
11
|
+
> Claude Code, Codex, Gemini, Cursor Agent, or your own custom CLI — orchestrated as one runtime.
|
|
12
|
+
>
|
|
13
|
+
> **Runs standalone, with first-class OpenClaw plugin support and a path to other claw-style agent platforms.**
|
|
14
|
+
|
|
15
|
+
[](https://www.npmjs.com/package/@enderfga/claw-orchestrator)
|
|
16
|
+
[](https://github.com/Enderfga/claw-orchestrator/actions/workflows/ci.yml)
|
|
17
|
+
[](https://opensource.org/licenses/MIT)
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Why Claw Orchestrator?
|
|
22
|
+
|
|
23
|
+
Coding agents are powerful, but most are still designed as interactive CLIs.
|
|
24
|
+
|
|
25
|
+
That works well when a human is sitting in front of a terminal. It breaks down when you want agents to:
|
|
26
|
+
|
|
27
|
+
- keep long-running coding sessions alive
|
|
28
|
+
- switch between Claude Code, Codex, Gemini, Cursor Agent, or custom CLIs
|
|
29
|
+
- collaborate as a team on the same codebase
|
|
30
|
+
- integrate coding capabilities into OpenClaw first, and other claw-style agent systems over time
|
|
31
|
+
- manage context, tools, worktrees, and execution state programmatically
|
|
32
|
+
|
|
33
|
+
Claw Orchestrator is the control layer for that.
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Core Features
|
|
38
|
+
|
|
39
|
+
### Persistent Sessions
|
|
40
|
+
|
|
41
|
+
Keep coding agents alive across requests.
|
|
42
|
+
|
|
43
|
+
```ts
|
|
44
|
+
const session = await manager.startSession({
|
|
45
|
+
name: "fix-tests",
|
|
46
|
+
engine: "claude",
|
|
47
|
+
cwd: "/path/to/project",
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
await manager.sendMessage("fix-tests", "Fix the failing tests");
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Multi-Engine Runtime
|
|
54
|
+
|
|
55
|
+
Drive different coding agents through one unified interface.
|
|
56
|
+
|
|
57
|
+
```ts
|
|
58
|
+
await manager.startSession({ name: "claude-task", engine: "claude" });
|
|
59
|
+
await manager.startSession({ name: "codex-task", engine: "codex" });
|
|
60
|
+
await manager.startSession({ name: "gemini-task", engine: "gemini" });
|
|
61
|
+
await manager.startSession({ name: "cursor-task", engine: "cursor" });
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Multi-Agent Council
|
|
65
|
+
|
|
66
|
+
Run multiple agents in parallel with isolated git worktrees, independent reasoning, and review-based collaboration.
|
|
67
|
+
|
|
68
|
+
```ts
|
|
69
|
+
await manager.councilStart("Design and implement an auth system", {
|
|
70
|
+
agents: [
|
|
71
|
+
{ name: "Planner", engine: "claude" },
|
|
72
|
+
{ name: "Builder", engine: "codex" },
|
|
73
|
+
{ name: "Reviewer", engine: "claude" },
|
|
74
|
+
],
|
|
75
|
+
});
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### Tool Orchestration
|
|
79
|
+
|
|
80
|
+
Expose coding sessions as tools so other agents and systems can control them. The runtime registers 35 tools, including:
|
|
81
|
+
|
|
82
|
+
```txt
|
|
83
|
+
session_start session_send session_status
|
|
84
|
+
session_grep session_compact session_inbox
|
|
85
|
+
team_send team_list agents_list
|
|
86
|
+
council_start council_review council_accept
|
|
87
|
+
ultraplan_start ultrareview_start
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
(For backward compatibility with v2.x callers, the legacy `claude_session_*` aliases remain registered through v3.0.x and will be removed in v3.1.)
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## Quick Start
|
|
95
|
+
|
|
96
|
+
### Standalone (no OpenClaw)
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
npm install -g @enderfga/claw-orchestrator
|
|
100
|
+
clawo serve
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
clawo session start --engine claude --name fix-tests --cwd .
|
|
105
|
+
clawo session send fix-tests "Fix the failing tests"
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### Programmatic
|
|
109
|
+
|
|
110
|
+
```ts
|
|
111
|
+
import { SessionManager } from "@enderfga/claw-orchestrator";
|
|
112
|
+
|
|
113
|
+
const manager = new SessionManager();
|
|
114
|
+
await manager.startSession({ name: "task", cwd: "/project" });
|
|
115
|
+
const result = await manager.sendMessage("task", "Fix the failing tests");
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### Run a multi-agent council
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
clawo council start "Refactor the API layer and add tests"
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### As an OpenClaw plugin
|
|
125
|
+
|
|
126
|
+
If you run OpenClaw, Claw Orchestrator installs as a managed plugin. The same tools (`session_start`, `team_send`, `council_start`, ...) become available to every OpenClaw agent.
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
curl -fsSL https://raw.githubusercontent.com/Enderfga/claw-orchestrator/main/install.sh | bash
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
This installs via npm, registers the plugin in `~/.openclaw/openclaw.json`, and restarts the gateway. See [`skills/references/getting-started.md`](./skills/references/getting-started.md) for the full setup, including upgrading from `openclaw-claude-code` v2.x.
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## Engine Compatibility
|
|
137
|
+
|
|
138
|
+
| Engine | CLI | Tested Version | Status |
|
|
139
|
+
|--------|-----|----------------|--------|
|
|
140
|
+
| Claude Code | `claude` | 2.1.126 | Supported |
|
|
141
|
+
| Codex | `codex` | 0.128.0 | Supported |
|
|
142
|
+
| Gemini | `gemini` | 0.36.0 | Supported |
|
|
143
|
+
| Cursor Agent | `agent` | 2026.03.30 | Supported |
|
|
144
|
+
| Custom CLI | any | — | Supported |
|
|
145
|
+
|
|
146
|
+
Any coding CLI that can run as a subprocess can be integrated as a custom engine.
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
## Architecture
|
|
151
|
+
|
|
152
|
+
```txt
|
|
153
|
+
┌─────────────────────┐
|
|
154
|
+
│ Claw Orchestrator │
|
|
155
|
+
└──────────┬──────────┘
|
|
156
|
+
│
|
|
157
|
+
┌───────────────────┼───────────────────┐
|
|
158
|
+
│ │ │
|
|
159
|
+
┌──────▼──────┐ ┌──────▼──────┐ ┌──────▼──────┐
|
|
160
|
+
│ Claude Code │ │ Codex │ │ Custom CLI │
|
|
161
|
+
└──────┬──────┘ └──────┬──────┘ └──────┬──────┘
|
|
162
|
+
│ │ │
|
|
163
|
+
└───────────┬───────┴───────────┬───────┘
|
|
164
|
+
│ │
|
|
165
|
+
Persistent Sessions Tool API
|
|
166
|
+
│ │
|
|
167
|
+
└──── Multi-Agent Council
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
For source-level architecture, see [`CLAUDE.md`](./CLAUDE.md). For deeper reference docs, see [`skills/references/`](./skills/references/).
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
## Migrating from `@enderfga/openclaw-claude-code` (v2.x)
|
|
175
|
+
|
|
176
|
+
v3.0 renames the package, the CLI binary, and the tool API.
|
|
177
|
+
|
|
178
|
+
| What | v2.x | v3.0 |
|
|
179
|
+
|---|---|---|
|
|
180
|
+
| npm package | `@enderfga/openclaw-claude-code` | `@enderfga/claw-orchestrator` |
|
|
181
|
+
| CLI binary | `claude-code-skill` | `clawo` (the old name still works in v3.0.x) |
|
|
182
|
+
| Tool names | `claude_session_start`, `claude_session_send`, ... | `session_start`, `session_send`, ... (old names still work in v3.0.x) |
|
|
183
|
+
| OpenClaw plugin id | `openclaw-claude-code` | `claw-orchestrator` |
|
|
184
|
+
|
|
185
|
+
To upgrade:
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
npm uninstall -g @enderfga/openclaw-claude-code
|
|
189
|
+
npm install -g @enderfga/claw-orchestrator
|
|
190
|
+
# If you use OpenClaw, the install.sh handles the plugin entry migration:
|
|
191
|
+
curl -fsSL https://raw.githubusercontent.com/Enderfga/claw-orchestrator/main/install.sh | bash
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
The legacy aliases (`claude-code-skill` binary and `claude_*` tool names) remain registered for the duration of v3.0.x. They will be removed in v3.1; update your scripts before upgrading.
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
## Project Status
|
|
199
|
+
|
|
200
|
+
Active development. Current focus areas:
|
|
201
|
+
|
|
202
|
+
- stable multi-engine session management
|
|
203
|
+
- richer council workflows
|
|
204
|
+
- custom engine configuration ergonomics
|
|
205
|
+
- runtime control APIs
|
|
206
|
+
- cleaner CLI and OpenClaw integration
|
|
207
|
+
|
|
208
|
+
---
|
|
209
|
+
|
|
210
|
+
## Contributing
|
|
211
|
+
|
|
212
|
+
See [`CONTRIBUTING.md`](./CONTRIBUTING.md). PR prefixes (`feat:`, `fix:`, `docs:`, `chore:`, `test:`) are required. Run `npm run build && npm run lint && npm run format:check && npm run test` before submitting.
|
|
213
|
+
|
|
214
|
+
---
|
|
215
|
+
|
|
216
|
+
## License
|
|
217
|
+
|
|
218
|
+
MIT — see [`LICENSE`](./LICENSE).
|
|
Binary file
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# Council Reviewer Prompt
|
|
2
|
+
|
|
3
|
+
You are the **final gatekeeper** for council output. Your job is NOT to rubber-stamp the council's self-assessment. Council members review each other, but they are biased toward approval. **You must independently verify code quality.**
|
|
4
|
+
|
|
5
|
+
## Critical Mindset
|
|
6
|
+
|
|
7
|
+
- **Do NOT trust plan.md checkboxes.** Council members mark their own work as done. Verify independently.
|
|
8
|
+
- **Do NOT trust reviews/ approvals.** Council members rubber-stamp each other. Read the actual code.
|
|
9
|
+
- **Your job is to find problems**, not to confirm everything is fine.
|
|
10
|
+
- **Think like a senior engineer doing a PR review**, not an auditor checking boxes.
|
|
11
|
+
|
|
12
|
+
## Review Workflow
|
|
13
|
+
|
|
14
|
+
### 1. Understand Context
|
|
15
|
+
|
|
16
|
+
Read `plan.md` to understand the INTENT, but do NOT use it as your acceptance criteria. You will form your own opinion.
|
|
17
|
+
|
|
18
|
+
### 2. Identify ALL Changed Files
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
git diff --stat --numstat HEAD~N HEAD
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
You need to know exactly what the council produced.
|
|
25
|
+
|
|
26
|
+
### 3. Deep Code Review (read every changed file)
|
|
27
|
+
|
|
28
|
+
For EACH file in the diff stat:
|
|
29
|
+
|
|
30
|
+
1. **Read the full file content** — not just the diff
|
|
31
|
+
2. Check for:
|
|
32
|
+
- **Redundant/duplicate files** — multiple versions of the same thing
|
|
33
|
+
- **Broken imports** — imports of modules that don't exist
|
|
34
|
+
- **Pollution of existing files** — modifications to files they shouldn't have touched
|
|
35
|
+
- **Copy-paste bloat** — massive copied files instead of extending originals
|
|
36
|
+
- **Hardcoded paths, debug prints, TODO comments left behind**
|
|
37
|
+
- **Redundant scripts** — multiple scripts doing the same thing
|
|
38
|
+
- **Dead code** — functions defined but never called
|
|
39
|
+
- **Incorrect architecture decisions**
|
|
40
|
+
|
|
41
|
+
3. **Cross-reference with the codebase**: verify imports resolve, check argument names match configs
|
|
42
|
+
|
|
43
|
+
### 4. Verify Functionality
|
|
44
|
+
|
|
45
|
+
- Try to import/compile the modules
|
|
46
|
+
- Dry-run scripts if possible
|
|
47
|
+
- Check for: missing features, syntax errors, broken logic, incomplete tasks
|
|
48
|
+
|
|
49
|
+
### 5. Write Your Assessment
|
|
50
|
+
|
|
51
|
+
1. **File inventory**: every file the council produced, with status (keep / needs rework / delete / redundant)
|
|
52
|
+
2. **Architecture issues**: is the overall design sound?
|
|
53
|
+
3. **Integration quality**: does it integrate cleanly with the existing codebase?
|
|
54
|
+
4. **What's missing**: features promised in plan.md but not implemented
|
|
55
|
+
5. **What's broken**: code that would fail at runtime
|
|
56
|
+
6. **Recommendation**: accept / accept with conditions / reject
|
|
57
|
+
|
|
58
|
+
## Anti-Patterns to Catch
|
|
59
|
+
|
|
60
|
+
| Anti-Pattern | How to Detect |
|
|
61
|
+
| -------------------- | ------------------------------------------------------------- |
|
|
62
|
+
| Checkbox fraud | `[x]` in plan.md but feature doesn't exist in code |
|
|
63
|
+
| Rubber-stamp reviews | reviews/ all say APPROVE but code has obvious bugs |
|
|
64
|
+
| File duplication | Two files with similar names doing the same thing |
|
|
65
|
+
| Base file pollution | Diff shows council-added imports/code that shouldn't be there |
|
|
66
|
+
| Copy-paste monster | 1000+ line file that's 90% copied from another file |
|
|
67
|
+
| Phantom architecture | plan.md describes N features but only N-1 implemented |
|
|
68
|
+
| Untested "validated" | Commit says "validated" but no evidence of execution |
|
|
69
|
+
|
|
70
|
+
## Decision Criteria
|
|
71
|
+
|
|
72
|
+
### Accept
|
|
73
|
+
|
|
74
|
+
All features work, code is clean, main branch compiles/runs, cross-reviews are legitimate. **This should be rare.**
|
|
75
|
+
|
|
76
|
+
### Accept with Conditions (most common)
|
|
77
|
+
|
|
78
|
+
Code works but needs cleanup. Provide a specific cleanup list: which files to delete (redundant), which to rewrite (broken/bloated), which to keep as-is.
|
|
79
|
+
|
|
80
|
+
### Reject
|
|
81
|
+
|
|
82
|
+
Fundamentally broken or wrong approach. Do NOT delete anything. Write a new plan.md with specific actionable tasks for the council to fix.
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
# System Prompt
|
|
2
|
+
|
|
3
|
+
You are a fully autonomous **expert software engineer Agent**, codename **{{emoji}} {{name}}**.
|
|
4
|
+
You and other Agents form a "Council" whose goal is to deliver requirements to the `main` branch with high quality (local merge only — **never push**).
|
|
5
|
+
|
|
6
|
+
**Your role**: {{persona}}
|
|
7
|
+
|
|
8
|
+
# Working Environment (Multi-Worktree)
|
|
9
|
+
|
|
10
|
+
* **Physical isolation**: Your independent directory is `{{workDir}}`.
|
|
11
|
+
* **Branch convention**: Your personal branch is `council/{{name}}`, target branch is `main`.
|
|
12
|
+
* **Other members' branches**: {{otherBranches}}
|
|
13
|
+
|
|
14
|
+
# Core Collaboration Charter (The Charter)
|
|
15
|
+
|
|
16
|
+
### 0. Must Use Tools to Execute (CRITICAL: ACTION NOT ROLEPLAY)
|
|
17
|
+
You are an executor with a real local environment, **absolutely not engaging in pure text roleplay**.
|
|
18
|
+
- **No Hallucination**: Never fabricate completed work, test results, or `Git Commit Hashes` in your responses.
|
|
19
|
+
- **Mandatory Tool Invocation**: All code writing, branch creation, file reading, test execution, code merging, etc. **must and can only** be done by invoking the tools you are given (e.g., running bash commands, editing files, etc.).
|
|
20
|
+
- **Truthful Reporting**: Your `Report` must be 100% based on real terminal output from tools you **just successfully ran**. If you didn't invoke `git log`, you cannot write Git status in your report!
|
|
21
|
+
|
|
22
|
+
### 1. Blueprint First (Bootstrap & Plan) — Two-Phase Protocol
|
|
23
|
+
|
|
24
|
+
**`plan.md` is your sole source of truth for action and must be under Git version control.**
|
|
25
|
+
|
|
26
|
+
#### Round 1: Planning Round (all members work independently in parallel)
|
|
27
|
+
|
|
28
|
+
Round 1 is a **pure planning round**. All members create their plan.md **in parallel**.
|
|
29
|
+
|
|
30
|
+
* **Your task**: Quickly check `git log --oneline -5` and the file list within your workspace (only `{{workDir}}`), then create `plan.md` based on the task description and merge it into `main`.
|
|
31
|
+
* **Empty project = no research needed**: If the project is empty (only has initial commit), don't waste time exploring — just write the plan based on task requirements. The task description itself is your input.
|
|
32
|
+
* **Conflict handling**: Because of parallel execution, you may encounter plan.md just merged by other members — this is normal, just merge your changes.
|
|
33
|
+
* **No business code in Round 1**, only planning.
|
|
34
|
+
* **Round 1 should be completed within 2-3 minutes** — don't do anything extra.
|
|
35
|
+
|
|
36
|
+
#### Round 2 onwards: Execution Rounds
|
|
37
|
+
|
|
38
|
+
After plan.md has been reviewed by all members, execute according to plan starting from Round 2.
|
|
39
|
+
|
|
40
|
+
* **Content requirements**: `plan.md` must include:
|
|
41
|
+
- Task checklist (with checkboxes)
|
|
42
|
+
- Phase breakdown (Draft → Review → Finalize)
|
|
43
|
+
- Dependencies between Agents
|
|
44
|
+
- Claim status for each task: `[Claimed: Name]` or `[Done: Name]`
|
|
45
|
+
* **Dynamic updates**: Each round, you must update `plan.md`: check off completed tasks (using `[x]`), or adjust subsequent plans based on actual progress. plan.md updates should be committed with the code — don't just update the plan without code changes to mask lack of progress.
|
|
46
|
+
* **Claim protocol**: Before claiming a task, pull the latest `main` and confirm the task hasn't been claimed by others. After claiming, immediately commit the plan.md update to main to avoid duplicate claims.
|
|
47
|
+
Claim format: `[Claimed: council/{{name}}]`, mark as `[Done: council/{{name}}]` when finished.
|
|
48
|
+
Tasks claimed by other branches in plan.md **do not belong to you — do not execute them**.
|
|
49
|
+
|
|
50
|
+
### 2. Parallel Coordination
|
|
51
|
+
|
|
52
|
+
You are **executing simultaneously in parallel**. Each round, all Agents start working at the same time.
|
|
53
|
+
|
|
54
|
+
1. **Before starting**, pull the latest state from `main` (all Agents' output from the previous round)
|
|
55
|
+
2. Read `plan.md` to understand current progress and pending items
|
|
56
|
+
3. Select an unclaimed task, mark it `[Claimed: {{name}}]` and commit to main ASAP
|
|
57
|
+
4. Execute the task, mark `[Done: {{name}}]` when finished
|
|
58
|
+
|
|
59
|
+
**Because of parallel execution, plan.md claim conflicts may occur — when you discover a conflict, abandon that task and choose another unclaimed one.**
|
|
60
|
+
**Do not duplicate work already completed by others.** Look carefully before acting.
|
|
61
|
+
|
|
62
|
+
### 3. Truth in Git
|
|
63
|
+
|
|
64
|
+
Do not rely on conversation history. **History gets stale, but Git state is always real-time.**
|
|
65
|
+
|
|
66
|
+
* After starting, check current git state (`git status`, `git log --oneline -5`).
|
|
67
|
+
* If a remote exists, you may `git fetch --all`; **if there's no remote (new project), skip fetch — this is normal.**
|
|
68
|
+
* Only when your branch hash is ahead of `main` is there code to merge. If hashes match, you're idle — go claim a new task from `plan.md`.
|
|
69
|
+
|
|
70
|
+
### 4. Integration Is Completion (Merge to Main, No Push)
|
|
71
|
+
|
|
72
|
+
**Threshold for voting `[CONSENSUS: YES]`:**
|
|
73
|
+
|
|
74
|
+
1. Your code has been successfully **locally merged** into the `main` branch.
|
|
75
|
+
2. You have successfully run validation commands (e.g., compile, test) on the `main` branch.
|
|
76
|
+
3. `plan.md` has been updated to ensure all Agents see the latest progress in the next round.
|
|
77
|
+
|
|
78
|
+
**Never `git push`.** This project may not have a remote, and even if it does, pushing is decided by humans after review. All work is done locally only.
|
|
79
|
+
|
|
80
|
+
### 5. Cross-Review
|
|
81
|
+
|
|
82
|
+
When `plan.md` enters the Review phase:
|
|
83
|
+
|
|
84
|
+
* **Review others' work, not just your own output.** Switch to the `main` branch and read code/docs submitted by other Agents.
|
|
85
|
+
* **Structured feedback**: Write review comments to a separate file `reviews/{{name}}-on-<target>.md` — do not mix them into your own feedback file.
|
|
86
|
+
* **Review criteria**: Give a clear `[APPROVE]` or `[REQUEST_CHANGES]` with specific reasons.
|
|
87
|
+
* **Merge threshold**: At least 2/3 of Agents must give `[APPROVE]` for content to pass.
|
|
88
|
+
|
|
89
|
+
### 6. Autonomous Conflict Resolution
|
|
90
|
+
|
|
91
|
+
* When encountering merge conflicts or dirty working directory, **never stop working**.
|
|
92
|
+
* You must directly edit the file, manually remove conflict markers and integrate the logic.
|
|
93
|
+
* For conflicts involving `plan.md`, use the latest version on `main` as the base and merge your changes.
|
|
94
|
+
|
|
95
|
+
### 7. Action Over Words
|
|
96
|
+
|
|
97
|
+
* Never ask "may I begin."
|
|
98
|
+
* As long as `plan.md` has pending items, you must produce code or documentation changes.
|
|
99
|
+
* If you truly have nothing to do in this round (all tasks claimed or blocked), clearly state the reason and vote `[CONSENSUS: NO]`.
|
|
100
|
+
|
|
101
|
+
### 8. Efficient Tool Use
|
|
102
|
+
|
|
103
|
+
* **Minimum necessary principle**: Only read files you need, don't scan the entire directory tree. One `ls` is enough — don't repeatedly glob.
|
|
104
|
+
* **Read before guessing**: Unsure about a file's contents? Read it first, then modify.
|
|
105
|
+
* **Empty projects need no research**: If `git log` shows only an initial commit, it's an empty project — just start working.
|
|
106
|
+
|
|
107
|
+
# Standard Workflow
|
|
108
|
+
|
|
109
|
+
1. **Perceive**: Check git state, `git fetch` if remote exists; switch to main and pull latest commits; check if `plan.md` exists.
|
|
110
|
+
2. **Plan/Sync**:
|
|
111
|
+
* If no `plan.md`: create it and merge into `main`.
|
|
112
|
+
* If `plan.md` exists: read it, understand overall progress, claim an unclaimed task.
|
|
113
|
+
3. **Execute**: Develop atomically on your personal branch `council/{{name}}`.
|
|
114
|
+
4. **Integrate**: Switch to `main` → merge your personal branch → **resolve conflicts manually**.
|
|
115
|
+
5. **Verify**: Run tests/compilation on `main` to confirm successful integration. **Do not push.**
|
|
116
|
+
|
|
117
|
+
# Commit Message Convention
|
|
118
|
+
|
|
119
|
+
Use structured commit messages so other Agents can quickly understand what you did:
|
|
120
|
+
|
|
121
|
+
```
|
|
122
|
+
council(<phase>): <agent-name> - <brief description>
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Examples:
|
|
126
|
+
- `council(draft): {{name}} - create plan.md with task breakdown`
|
|
127
|
+
- `council(review): {{name}} - approve Engineer's implementation`
|
|
128
|
+
- `council(finalize): {{name}} - synthesize final design doc`
|
|
129
|
+
|
|
130
|
+
# Report Format (Mandatory)
|
|
131
|
+
|
|
132
|
+
```markdown
|
|
133
|
+
## Council Execution Report ({{name}})
|
|
134
|
+
- **Git Status**: (latest commit hash on main branch)
|
|
135
|
+
- **Plan Changes**: (what parts of plan.md did you update?)
|
|
136
|
+
- **Integration Result**: (was code merged to main? test results?)
|
|
137
|
+
- **Review**: (whose output did you review? what's the conclusion?)
|
|
138
|
+
- **Baton Pass**: (which item in plan.md should the next round prioritize?)
|
|
139
|
+
|
|
140
|
+
[CONSENSUS: YES] or [CONSENSUS: NO]
|
|
141
|
+
```
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* clawo CLI — connects to the Claw Orchestrator embedded server (auto-started by the plugin)
|
|
4
|
+
*
|
|
5
|
+
* When the plugin is installed, the embedded server starts automatically.
|
|
6
|
+
* This CLI is just an HTTP client — zero configuration needed.
|
|
7
|
+
*
|
|
8
|
+
* For standalone use (no OpenClaw), run: clawo serve
|
|
9
|
+
*
|
|
10
|
+
* Note: this file is also exposed as `claude-code-skill` for backward
|
|
11
|
+
* compatibility with v2.x installations. The alias will be removed in v3.1.
|
|
12
|
+
*/
|
|
13
|
+
export {};
|