@laurentenhoor/devclaw 0.1.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 +406 -0
- package/dist/index.d.ts +88 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +107 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/audit.d.ts +2 -0
- package/dist/lib/audit.d.ts.map +1 -0
- package/dist/lib/audit.js +42 -0
- package/dist/lib/audit.js.map +1 -0
- package/dist/lib/binding-manager.d.ts +35 -0
- package/dist/lib/binding-manager.d.ts.map +1 -0
- package/dist/lib/binding-manager.js +88 -0
- package/dist/lib/binding-manager.js.map +1 -0
- package/dist/lib/cli.d.ts +12 -0
- package/dist/lib/cli.d.ts.map +1 -0
- package/dist/lib/cli.js +69 -0
- package/dist/lib/cli.js.map +1 -0
- package/dist/lib/dispatch.d.ts +58 -0
- package/dist/lib/dispatch.d.ts.map +1 -0
- package/dist/lib/dispatch.js +163 -0
- package/dist/lib/dispatch.js.map +1 -0
- package/dist/lib/model-selector.d.ts +21 -0
- package/dist/lib/model-selector.d.ts.map +1 -0
- package/dist/lib/model-selector.js +74 -0
- package/dist/lib/model-selector.js.map +1 -0
- package/dist/lib/notify.d.ts +54 -0
- package/dist/lib/notify.d.ts.map +1 -0
- package/dist/lib/notify.js +143 -0
- package/dist/lib/notify.js.map +1 -0
- package/dist/lib/onboarding.d.ts +5 -0
- package/dist/lib/onboarding.d.ts.map +1 -0
- package/dist/lib/onboarding.js +124 -0
- package/dist/lib/onboarding.js.map +1 -0
- package/dist/lib/projects.d.ts +64 -0
- package/dist/lib/projects.d.ts.map +1 -0
- package/dist/lib/projects.js +127 -0
- package/dist/lib/projects.js.map +1 -0
- package/dist/lib/providers/github.d.ts +23 -0
- package/dist/lib/providers/github.d.ts.map +1 -0
- package/dist/lib/providers/github.js +130 -0
- package/dist/lib/providers/github.js.map +1 -0
- package/dist/lib/providers/gitlab.d.ts +23 -0
- package/dist/lib/providers/gitlab.d.ts.map +1 -0
- package/dist/lib/providers/gitlab.js +133 -0
- package/dist/lib/providers/gitlab.js.map +1 -0
- package/dist/lib/providers/index.d.ts +12 -0
- package/dist/lib/providers/index.d.ts.map +1 -0
- package/dist/lib/providers/index.js +25 -0
- package/dist/lib/providers/index.js.map +1 -0
- package/dist/lib/providers/provider.d.ts +35 -0
- package/dist/lib/providers/provider.d.ts.map +1 -0
- package/dist/lib/providers/provider.js +13 -0
- package/dist/lib/providers/provider.js.map +1 -0
- package/dist/lib/services/health.d.ts +38 -0
- package/dist/lib/services/health.d.ts.map +1 -0
- package/dist/lib/services/health.js +100 -0
- package/dist/lib/services/health.js.map +1 -0
- package/dist/lib/services/heartbeat.d.ts +38 -0
- package/dist/lib/services/heartbeat.d.ts.map +1 -0
- package/dist/lib/services/heartbeat.js +199 -0
- package/dist/lib/services/heartbeat.js.map +1 -0
- package/dist/lib/services/pipeline.d.ts +36 -0
- package/dist/lib/services/pipeline.d.ts.map +1 -0
- package/dist/lib/services/pipeline.js +90 -0
- package/dist/lib/services/pipeline.js.map +1 -0
- package/dist/lib/services/queue.d.ts +14 -0
- package/dist/lib/services/queue.d.ts.map +1 -0
- package/dist/lib/services/queue.js +31 -0
- package/dist/lib/services/queue.js.map +1 -0
- package/dist/lib/services/tick.d.ts +62 -0
- package/dist/lib/services/tick.d.ts.map +1 -0
- package/dist/lib/services/tick.js +160 -0
- package/dist/lib/services/tick.js.map +1 -0
- package/dist/lib/setup/agent.d.ts +14 -0
- package/dist/lib/setup/agent.d.ts.map +1 -0
- package/dist/lib/setup/agent.js +72 -0
- package/dist/lib/setup/agent.js.map +1 -0
- package/dist/lib/setup/config.d.ts +22 -0
- package/dist/lib/setup/config.d.ts.map +1 -0
- package/dist/lib/setup/config.js +67 -0
- package/dist/lib/setup/config.js.map +1 -0
- package/dist/lib/setup/index.d.ts +53 -0
- package/dist/lib/setup/index.d.ts.map +1 -0
- package/dist/lib/setup/index.js +68 -0
- package/dist/lib/setup/index.js.map +1 -0
- package/dist/lib/setup/workspace.d.ts +6 -0
- package/dist/lib/setup/workspace.d.ts.map +1 -0
- package/dist/lib/setup/workspace.js +69 -0
- package/dist/lib/setup/workspace.js.map +1 -0
- package/dist/lib/templates.d.ts +9 -0
- package/dist/lib/templates.d.ts.map +1 -0
- package/dist/lib/templates.js +163 -0
- package/dist/lib/templates.js.map +1 -0
- package/dist/lib/tiers.d.ts +55 -0
- package/dist/lib/tiers.d.ts.map +1 -0
- package/dist/lib/tiers.js +74 -0
- package/dist/lib/tiers.js.map +1 -0
- package/dist/lib/tool-helpers.d.ts +44 -0
- package/dist/lib/tool-helpers.d.ts.map +1 -0
- package/dist/lib/tool-helpers.js +65 -0
- package/dist/lib/tool-helpers.js.map +1 -0
- package/dist/lib/tools/health.d.ts +28 -0
- package/dist/lib/tools/health.d.ts.map +1 -0
- package/dist/lib/tools/health.js +61 -0
- package/dist/lib/tools/health.js.map +1 -0
- package/dist/lib/tools/onboard.d.ts +24 -0
- package/dist/lib/tools/onboard.d.ts.map +1 -0
- package/dist/lib/tools/onboard.js +27 -0
- package/dist/lib/tools/onboard.js.map +1 -0
- package/dist/lib/tools/project-register.d.ts +51 -0
- package/dist/lib/tools/project-register.d.ts.map +1 -0
- package/dist/lib/tools/project-register.js +172 -0
- package/dist/lib/tools/project-register.js.map +1 -0
- package/dist/lib/tools/queue-status.test.d.ts +2 -0
- package/dist/lib/tools/queue-status.test.d.ts.map +1 -0
- package/dist/lib/tools/queue-status.test.js +48 -0
- package/dist/lib/tools/queue-status.test.js.map +1 -0
- package/dist/lib/tools/setup.d.ts +76 -0
- package/dist/lib/tools/setup.d.ts.map +1 -0
- package/dist/lib/tools/setup.js +102 -0
- package/dist/lib/tools/setup.js.map +1 -0
- package/dist/lib/tools/status.d.ts +24 -0
- package/dist/lib/tools/status.d.ts.map +1 -0
- package/dist/lib/tools/status.js +53 -0
- package/dist/lib/tools/status.js.map +1 -0
- package/dist/lib/tools/task-comment.d.ts +40 -0
- package/dist/lib/tools/task-comment.d.ts.map +1 -0
- package/dist/lib/tools/task-comment.js +84 -0
- package/dist/lib/tools/task-comment.js.map +1 -0
- package/dist/lib/tools/task-create.d.ts +54 -0
- package/dist/lib/tools/task-create.d.ts.map +1 -0
- package/dist/lib/tools/task-create.js +77 -0
- package/dist/lib/tools/task-create.js.map +1 -0
- package/dist/lib/tools/task-update.d.ts +40 -0
- package/dist/lib/tools/task-update.d.ts.map +1 -0
- package/dist/lib/tools/task-update.js +79 -0
- package/dist/lib/tools/task-update.js.map +1 -0
- package/dist/lib/tools/task-update.test.d.ts +7 -0
- package/dist/lib/tools/task-update.test.d.ts.map +1 -0
- package/dist/lib/tools/task-update.test.js +55 -0
- package/dist/lib/tools/task-update.test.js.map +1 -0
- package/dist/lib/tools/work-finish.d.ts +43 -0
- package/dist/lib/tools/work-finish.d.ts.map +1 -0
- package/dist/lib/tools/work-finish.js +77 -0
- package/dist/lib/tools/work-finish.js.map +1 -0
- package/dist/lib/tools/work-start.d.ts +39 -0
- package/dist/lib/tools/work-start.d.ts.map +1 -0
- package/dist/lib/tools/work-start.js +129 -0
- package/dist/lib/tools/work-start.js.map +1 -0
- package/dist/lib/types.d.ts +17 -0
- package/dist/lib/types.d.ts.map +1 -0
- package/dist/lib/types.js +8 -0
- package/dist/lib/types.js.map +1 -0
- package/docs/ARCHITECTURE.md +662 -0
- package/docs/CONFIGURATION.md +336 -0
- package/docs/MANAGEMENT.md +120 -0
- package/docs/ONBOARDING.md +251 -0
- package/docs/QA_WORKFLOW.md +120 -0
- package/docs/ROADMAP.md +96 -0
- package/docs/TESTING.md +339 -0
- package/docs/TOOLS.md +361 -0
- package/package.json +55 -0
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
# DevClaw — Onboarding Guide
|
|
2
|
+
|
|
3
|
+
Step-by-step setup: install the plugin, configure an agent, register projects, and run your first task.
|
|
4
|
+
|
|
5
|
+
## Prerequisites
|
|
6
|
+
|
|
7
|
+
| Requirement | Why | How to check |
|
|
8
|
+
|---|---|---|
|
|
9
|
+
| [OpenClaw](https://openclaw.ai) installed | DevClaw is an OpenClaw plugin | `openclaw --version` |
|
|
10
|
+
| Node.js >= 20 | Runtime for plugin | `node --version` |
|
|
11
|
+
| [`gh`](https://cli.github.com) or [`glab`](https://gitlab.com/gitlab-org/cli) CLI | Issue tracker provider (auto-detected from git remote) | `gh --version` or `glab --version` |
|
|
12
|
+
| CLI authenticated | Plugin calls gh/glab for every label transition | `gh auth status` or `glab auth status` |
|
|
13
|
+
| A GitHub/GitLab repo with issues | The task backlog lives in the issue tracker | `gh issue list` or `glab issue list` from your repo |
|
|
14
|
+
|
|
15
|
+
## Step 1: Install the plugin
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
# Copy to extensions directory (auto-discovered on next restart)
|
|
19
|
+
cp -r devclaw ~/.openclaw/extensions/
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Verify:
|
|
23
|
+
```bash
|
|
24
|
+
openclaw plugins list
|
|
25
|
+
# Should show: DevClaw | devclaw | loaded
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Step 2: Run setup
|
|
29
|
+
|
|
30
|
+
There are three ways to set up DevClaw:
|
|
31
|
+
|
|
32
|
+
### Option A: Conversational onboarding (recommended)
|
|
33
|
+
|
|
34
|
+
Call the `onboard` tool from any agent that has the DevClaw plugin loaded. The agent walks you through configuration step by step — asking about:
|
|
35
|
+
- Agent selection (current or create new)
|
|
36
|
+
- Channel binding (telegram/whatsapp/none) — for new agents only
|
|
37
|
+
- Model levels (accept defaults or customize)
|
|
38
|
+
- Optional project registration
|
|
39
|
+
|
|
40
|
+
The tool returns instructions that guide the agent through the QA-style setup conversation.
|
|
41
|
+
|
|
42
|
+
### Option B: CLI wizard
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
openclaw devclaw setup
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
The setup wizard walks you through:
|
|
49
|
+
|
|
50
|
+
1. **Agent** — Create a new orchestrator agent or configure an existing one
|
|
51
|
+
2. **Developer team** — Choose which LLM model powers each developer level:
|
|
52
|
+
- **DEV junior** (fast, cheap tasks) — default: `anthropic/claude-haiku-4-5`
|
|
53
|
+
- **DEV medior** (standard tasks) — default: `anthropic/claude-sonnet-4-5`
|
|
54
|
+
- **DEV senior** (complex tasks) — default: `anthropic/claude-opus-4-5`
|
|
55
|
+
- **QA reviewer** (code review) — default: `anthropic/claude-sonnet-4-5`
|
|
56
|
+
- **QA tester** (manual testing) — default: `anthropic/claude-haiku-4-5`
|
|
57
|
+
3. **Workspace** — Writes AGENTS.md, HEARTBEAT.md, role templates, and initializes state
|
|
58
|
+
|
|
59
|
+
Non-interactive mode:
|
|
60
|
+
```bash
|
|
61
|
+
# Create new agent with default models
|
|
62
|
+
openclaw devclaw setup --new-agent "My Dev Orchestrator"
|
|
63
|
+
|
|
64
|
+
# Configure existing agent with custom models
|
|
65
|
+
openclaw devclaw setup --agent my-orchestrator \
|
|
66
|
+
--junior "anthropic/claude-haiku-4-5" \
|
|
67
|
+
--senior "anthropic/claude-opus-4-5"
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Option C: Tool call (agent-driven)
|
|
71
|
+
|
|
72
|
+
**Conversational onboarding via tool:**
|
|
73
|
+
```json
|
|
74
|
+
onboard({ "mode": "first-run" })
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
The tool returns step-by-step instructions that guide the agent through the setup conversation.
|
|
78
|
+
|
|
79
|
+
**Direct setup (skip conversation):**
|
|
80
|
+
```json
|
|
81
|
+
setup({
|
|
82
|
+
"newAgentName": "My Dev Orchestrator",
|
|
83
|
+
"channelBinding": "telegram",
|
|
84
|
+
"models": {
|
|
85
|
+
"dev": {
|
|
86
|
+
"junior": "anthropic/claude-haiku-4-5",
|
|
87
|
+
"senior": "anthropic/claude-opus-4-5"
|
|
88
|
+
},
|
|
89
|
+
"qa": {
|
|
90
|
+
"reviewer": "anthropic/claude-sonnet-4-5"
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
})
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Step 3: Channel binding (optional, for new agents)
|
|
97
|
+
|
|
98
|
+
If you created a new agent during conversational onboarding and selected a channel binding (telegram/whatsapp), the agent is automatically bound. **Skip to step 4.**
|
|
99
|
+
|
|
100
|
+
**Smart Migration**: If an existing agent already has a channel-wide binding (e.g., the old orchestrator receives all telegram messages), the onboarding agent will:
|
|
101
|
+
1. Detect the conflict
|
|
102
|
+
2. Ask if you want to migrate the binding from the old agent to the new one
|
|
103
|
+
3. If you confirm, the binding is automatically moved — no manual config edit needed
|
|
104
|
+
|
|
105
|
+
If you didn't bind a channel during setup:
|
|
106
|
+
|
|
107
|
+
**Option A: Manually edit `openclaw.json`**
|
|
108
|
+
|
|
109
|
+
```json
|
|
110
|
+
{
|
|
111
|
+
"bindings": [
|
|
112
|
+
{
|
|
113
|
+
"agentId": "my-orchestrator",
|
|
114
|
+
"match": {
|
|
115
|
+
"channel": "telegram"
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
]
|
|
119
|
+
}
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
For group-specific bindings:
|
|
123
|
+
```json
|
|
124
|
+
{
|
|
125
|
+
"agentId": "my-orchestrator",
|
|
126
|
+
"match": {
|
|
127
|
+
"channel": "telegram",
|
|
128
|
+
"peer": {
|
|
129
|
+
"kind": "group",
|
|
130
|
+
"id": "-1234567890"
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Restart OpenClaw after editing.
|
|
137
|
+
|
|
138
|
+
**Option B: Add bot to Telegram/WhatsApp group**
|
|
139
|
+
|
|
140
|
+
If using a channel-wide binding (no peer filter), the agent receives all messages from that channel. Add your orchestrator bot to the relevant Telegram group.
|
|
141
|
+
|
|
142
|
+
## Step 4: Register your project
|
|
143
|
+
|
|
144
|
+
Go to the Telegram/WhatsApp group for the project and tell the orchestrator agent:
|
|
145
|
+
|
|
146
|
+
> "Register project my-project at ~/git/my-project with base branch development"
|
|
147
|
+
|
|
148
|
+
The agent calls `project_register`, which atomically:
|
|
149
|
+
- Validates the repo and auto-detects GitHub/GitLab from remote
|
|
150
|
+
- Creates all 8 state labels (idempotent)
|
|
151
|
+
- Scaffolds role instruction files (`projects/roles/<project>/dev.md` and `qa.md`)
|
|
152
|
+
- Adds the project entry to `projects.json`
|
|
153
|
+
- Logs the registration event
|
|
154
|
+
|
|
155
|
+
**Initial state in `projects.json`:**
|
|
156
|
+
|
|
157
|
+
```json
|
|
158
|
+
{
|
|
159
|
+
"projects": {
|
|
160
|
+
"-1234567890": {
|
|
161
|
+
"name": "my-project",
|
|
162
|
+
"repo": "~/git/my-project",
|
|
163
|
+
"groupName": "Project: my-project",
|
|
164
|
+
"baseBranch": "development",
|
|
165
|
+
"deployBranch": "development",
|
|
166
|
+
"channel": "telegram",
|
|
167
|
+
"roleExecution": "parallel",
|
|
168
|
+
"dev": {
|
|
169
|
+
"active": false,
|
|
170
|
+
"issueId": null,
|
|
171
|
+
"startTime": null,
|
|
172
|
+
"level": null,
|
|
173
|
+
"sessions": { "junior": null, "medior": null, "senior": null }
|
|
174
|
+
},
|
|
175
|
+
"qa": {
|
|
176
|
+
"active": false,
|
|
177
|
+
"issueId": null,
|
|
178
|
+
"startTime": null,
|
|
179
|
+
"level": null,
|
|
180
|
+
"sessions": { "reviewer": null, "tester": null }
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
**Finding the Telegram group ID:** The group ID is the numeric ID of your Telegram supergroup (a negative number like `-1234567890`). When you call `project_register` from within the group, the ID is auto-detected from context.
|
|
188
|
+
|
|
189
|
+
## Step 5: Create your first issue
|
|
190
|
+
|
|
191
|
+
Issues can be created in multiple ways:
|
|
192
|
+
- **Via the agent** — Ask the orchestrator in the Telegram group: "Create an issue for adding a login page" (uses `task_create`)
|
|
193
|
+
- **Via workers** — DEV/QA workers can call `task_create` to file follow-up bugs they discover
|
|
194
|
+
- **Via CLI** — `cd ~/git/my-project && gh issue create --title "My first task" --label "To Do"` (or `glab issue create`)
|
|
195
|
+
- **Via web UI** — Create an issue and add the "To Do" label
|
|
196
|
+
|
|
197
|
+
Note: `task_create` defaults to the "Planning" label. Use "To Do" explicitly when the task is ready for immediate work.
|
|
198
|
+
|
|
199
|
+
## Step 6: Test the pipeline
|
|
200
|
+
|
|
201
|
+
Ask the agent in the Telegram group:
|
|
202
|
+
|
|
203
|
+
> "Check the queue status"
|
|
204
|
+
|
|
205
|
+
The agent should call `status` and report the "To Do" issue. Then:
|
|
206
|
+
|
|
207
|
+
> "Pick up issue #1 for DEV"
|
|
208
|
+
|
|
209
|
+
The agent calls `work_start`, which assigns a developer level, transitions the label to "Doing", creates or reuses a worker session, and dispatches the task — all in one call. The agent posts the announcement.
|
|
210
|
+
|
|
211
|
+
## Adding more projects
|
|
212
|
+
|
|
213
|
+
Tell the agent to register a new project (step 4) from within the new project's Telegram group. That's it — `project_register` handles labels and state setup.
|
|
214
|
+
|
|
215
|
+
Each project is fully isolated — separate queue, separate workers, separate state.
|
|
216
|
+
|
|
217
|
+
## Developer levels
|
|
218
|
+
|
|
219
|
+
DevClaw assigns tasks to developer levels instead of raw model names. This makes the system intuitive — you're assigning a "junior dev" to fix a typo, not configuring model parameters.
|
|
220
|
+
|
|
221
|
+
| Role | Level | Default model | When to assign |
|
|
222
|
+
|------|-------|---------------|----------------|
|
|
223
|
+
| DEV | **junior** | `anthropic/claude-haiku-4-5` | Typos, single-file fixes, CSS changes |
|
|
224
|
+
| DEV | **medior** | `anthropic/claude-sonnet-4-5` | Features, bug fixes, multi-file changes |
|
|
225
|
+
| DEV | **senior** | `anthropic/claude-opus-4-5` | Architecture, migrations, system-wide refactoring |
|
|
226
|
+
| QA | **reviewer** | `anthropic/claude-sonnet-4-5` | Code review, test validation |
|
|
227
|
+
| QA | **tester** | `anthropic/claude-haiku-4-5` | Manual testing, smoke tests |
|
|
228
|
+
|
|
229
|
+
Change which model powers each level in `openclaw.json` — see [Configuration](CONFIGURATION.md#model-tiers).
|
|
230
|
+
|
|
231
|
+
## What the plugin handles vs. what you handle
|
|
232
|
+
|
|
233
|
+
| Responsibility | Who | Details |
|
|
234
|
+
|---|---|---|
|
|
235
|
+
| Plugin installation | You (once) | `cp -r devclaw ~/.openclaw/extensions/` |
|
|
236
|
+
| Agent + workspace setup | Plugin (`setup`) | Creates agent, configures models, writes workspace files |
|
|
237
|
+
| Channel binding migration | Plugin (`setup` with `migrateFrom`) | Automatically moves channel-wide bindings between agents |
|
|
238
|
+
| Label setup | Plugin (`project_register`) | 8 labels, created idempotently via IssueProvider |
|
|
239
|
+
| Prompt file scaffolding | Plugin (`project_register`) | Creates `projects/roles/<project>/dev.md` and `qa.md` |
|
|
240
|
+
| Project registration | Plugin (`project_register`) | Entry in `projects.json` with empty worker state |
|
|
241
|
+
| Telegram group setup | You (once per project) | Add bot to group |
|
|
242
|
+
| Issue creation | Plugin (`task_create`) | Orchestrator or workers create issues from chat |
|
|
243
|
+
| Label transitions | Plugin | Atomic transitions via issue tracker CLI |
|
|
244
|
+
| Developer assignment | Plugin | LLM-selected level by orchestrator, keyword heuristic fallback |
|
|
245
|
+
| State management | Plugin | Atomic read/write to `projects.json` |
|
|
246
|
+
| Session management | Plugin | Creates, reuses, and dispatches to sessions via CLI. Agent never touches session tools. |
|
|
247
|
+
| Task completion | Plugin (`work_finish`) | Workers self-report. Scheduler dispatches next role. |
|
|
248
|
+
| Prompt instructions | Plugin (`work_start`) | Loaded from `projects/roles/<project>/<role>.md`, appended to task message |
|
|
249
|
+
| Audit logging | Plugin | Automatic NDJSON append per tool call |
|
|
250
|
+
| Zombie detection | Plugin | `health` checks active vs alive |
|
|
251
|
+
| Queue scanning | Plugin | `status` queries issue tracker per project |
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# DevClaw — QA Workflow
|
|
2
|
+
|
|
3
|
+
Quality Assurance in DevClaw follows a structured workflow that ensures every review is documented and traceable.
|
|
4
|
+
|
|
5
|
+
## Required Steps
|
|
6
|
+
|
|
7
|
+
### 1. Review the Code
|
|
8
|
+
|
|
9
|
+
- Pull latest from the base branch
|
|
10
|
+
- Run tests and linting
|
|
11
|
+
- Verify changes address issue requirements
|
|
12
|
+
- Check for regressions in related functionality
|
|
13
|
+
|
|
14
|
+
### 2. Document Your Review (REQUIRED)
|
|
15
|
+
|
|
16
|
+
Before completing your task, you MUST create a review comment using `task_comment`:
|
|
17
|
+
|
|
18
|
+
```javascript
|
|
19
|
+
task_comment({
|
|
20
|
+
projectGroupId: "<group-id>",
|
|
21
|
+
issueId: <issue-number>,
|
|
22
|
+
body: "## QA Review\n\n**Tested:**\n- [List what you tested]\n\n**Results:**\n- [Pass/fail details]\n\n**Environment:**\n- [Test environment details]",
|
|
23
|
+
authorRole: "qa"
|
|
24
|
+
})
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### 3. Complete the Task
|
|
28
|
+
|
|
29
|
+
After posting your comment, call `work_finish`:
|
|
30
|
+
|
|
31
|
+
```javascript
|
|
32
|
+
work_finish({
|
|
33
|
+
role: "qa",
|
|
34
|
+
projectGroupId: "<group-id>",
|
|
35
|
+
result: "pass", // or "fail", "refine", "blocked"
|
|
36
|
+
summary: "Brief summary of review outcome"
|
|
37
|
+
})
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## QA Results
|
|
41
|
+
|
|
42
|
+
| Result | Label transition | Meaning |
|
|
43
|
+
|---|---|---|
|
|
44
|
+
| `"pass"` | Testing → Done | Approved. Issue closed. |
|
|
45
|
+
| `"fail"` | Testing → To Improve | Issues found. Issue reopened, sent back to DEV. |
|
|
46
|
+
| `"refine"` | Testing → Refining | Needs human decision. Pipeline pauses. |
|
|
47
|
+
| `"blocked"` | Testing → To Test | Cannot complete (env issues, etc.). Returns to QA queue. |
|
|
48
|
+
|
|
49
|
+
## Why Comments Are Required
|
|
50
|
+
|
|
51
|
+
1. **Audit Trail** — Every review decision is documented in the issue tracker
|
|
52
|
+
2. **Knowledge Sharing** — Future reviewers understand what was tested
|
|
53
|
+
3. **Quality Metrics** — Enables tracking of test coverage
|
|
54
|
+
4. **Debugging** — When issues arise later, we know what was checked
|
|
55
|
+
5. **Compliance** — Some projects require documented QA evidence
|
|
56
|
+
|
|
57
|
+
## Comment Templates
|
|
58
|
+
|
|
59
|
+
### For Passing Reviews
|
|
60
|
+
|
|
61
|
+
```markdown
|
|
62
|
+
## QA Review
|
|
63
|
+
|
|
64
|
+
**Tested:**
|
|
65
|
+
- Feature A: [specific test cases]
|
|
66
|
+
- Feature B: [specific test cases]
|
|
67
|
+
- Edge cases: [list]
|
|
68
|
+
|
|
69
|
+
**Results:** All tests passed. No regressions found.
|
|
70
|
+
|
|
71
|
+
**Environment:**
|
|
72
|
+
- Browser/Platform: [details]
|
|
73
|
+
- Version: [details]
|
|
74
|
+
- Test data: [if relevant]
|
|
75
|
+
|
|
76
|
+
**Notes:** [Optional observations or recommendations]
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### For Failing Reviews
|
|
80
|
+
|
|
81
|
+
```markdown
|
|
82
|
+
## QA Review — Issues Found
|
|
83
|
+
|
|
84
|
+
**Tested:**
|
|
85
|
+
- [What you tested]
|
|
86
|
+
|
|
87
|
+
**Issues Found:**
|
|
88
|
+
1. [Issue description with steps to reproduce]
|
|
89
|
+
2. [Issue description with expected vs actual behavior]
|
|
90
|
+
|
|
91
|
+
**Environment:**
|
|
92
|
+
- [Test environment details]
|
|
93
|
+
|
|
94
|
+
**Severity:** [Critical/Major/Minor]
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## Enforcement
|
|
98
|
+
|
|
99
|
+
QA workers receive instructions via role templates to:
|
|
100
|
+
- Always call `task_comment` BEFORE `work_finish`
|
|
101
|
+
- Include specific details about what was tested
|
|
102
|
+
- Document results, environment, and any notes
|
|
103
|
+
|
|
104
|
+
Prompt templates affected:
|
|
105
|
+
- `projects/roles/<project>/qa.md`
|
|
106
|
+
- All project-specific QA templates should follow this pattern
|
|
107
|
+
|
|
108
|
+
## Best Practices
|
|
109
|
+
|
|
110
|
+
1. **Be Specific** — Don't just say "tested the feature" — list what you tested
|
|
111
|
+
2. **Include Environment** — Version numbers, browser, OS can matter
|
|
112
|
+
3. **Document Edge Cases** — If you tested special scenarios, note them
|
|
113
|
+
4. **Reference Requirements** — Link back to acceptance criteria from the issue
|
|
114
|
+
5. **Use Screenshots** — For UI issues, screenshots help (link in comment)
|
|
115
|
+
|
|
116
|
+
## Related
|
|
117
|
+
|
|
118
|
+
- Tool: [`task_comment`](TOOLS.md#task_comment) — Add comments to issues
|
|
119
|
+
- Tool: [`work_finish`](TOOLS.md#work_finish) — Complete QA tasks
|
|
120
|
+
- Config: [`projects/roles/<project>/qa.md`](CONFIGURATION.md#role-instruction-files) — QA role instructions
|
package/docs/ROADMAP.md
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# DevClaw — Roadmap
|
|
2
|
+
|
|
3
|
+
## Configurable Roles
|
|
4
|
+
|
|
5
|
+
Currently DevClaw has two hardcoded roles: **DEV** and **QA**. Each project gets one worker slot per role. The pipeline is fixed: DEV writes code, QA reviews it.
|
|
6
|
+
|
|
7
|
+
This works for the common case but breaks down when you want:
|
|
8
|
+
- A **design** role that creates mockups before DEV starts
|
|
9
|
+
- A **devops** role that handles deployment after QA passes
|
|
10
|
+
- A **PM** role that triages and prioritizes the backlog
|
|
11
|
+
- Multiple DEV workers in parallel (e.g. frontend + backend)
|
|
12
|
+
- A project with no QA step at all
|
|
13
|
+
|
|
14
|
+
### Planned: role configuration per project
|
|
15
|
+
|
|
16
|
+
Roles become a configurable list instead of a hardcoded pair. Each role defines:
|
|
17
|
+
- **Name** — e.g. `design`, `dev`, `qa`, `devops`
|
|
18
|
+
- **Levels** — which developer levels can be assigned (e.g. design only needs `medior`)
|
|
19
|
+
- **Pipeline position** — where it sits in the task lifecycle
|
|
20
|
+
- **Worker count** — how many concurrent workers (default: 1)
|
|
21
|
+
|
|
22
|
+
```json
|
|
23
|
+
{
|
|
24
|
+
"roles": {
|
|
25
|
+
"dev": { "levels": ["junior", "medior", "senior"], "workers": 1 },
|
|
26
|
+
"qa": { "levels": ["reviewer", "tester"], "workers": 1 },
|
|
27
|
+
"devops": { "levels": ["medior", "senior"], "workers": 1 }
|
|
28
|
+
},
|
|
29
|
+
"pipeline": ["dev", "qa", "devops"]
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
The pipeline definition replaces the hardcoded `Doing → To Test → Testing → Done` flow. Labels and transitions are generated from the pipeline config. The scheduler follows the pipeline order when filling free slots.
|
|
34
|
+
|
|
35
|
+
### Open questions
|
|
36
|
+
|
|
37
|
+
- How do custom labels map? Generate from role names, or let users define?
|
|
38
|
+
- Should roles have their own instruction files (`projects/roles/<project>/<role>.md`) — yes, this already works
|
|
39
|
+
- How to handle parallel roles (e.g. frontend + backend DEV in parallel before QA)?
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Channel-agnostic Groups
|
|
44
|
+
|
|
45
|
+
Currently DevClaw maps projects to **Telegram group IDs**. The `projectGroupId` is a Telegram-specific negative number. This means:
|
|
46
|
+
- WhatsApp groups can't be used as project channels (partially supported now via `channel` field)
|
|
47
|
+
- Discord, Slack, or other channels are excluded
|
|
48
|
+
- The naming (`groupId`, `groupName`) is Telegram-specific
|
|
49
|
+
|
|
50
|
+
### Planned: abstract channel binding
|
|
51
|
+
|
|
52
|
+
Replace Telegram-specific group IDs with a generic channel identifier that works across any OpenClaw channel.
|
|
53
|
+
|
|
54
|
+
```json
|
|
55
|
+
{
|
|
56
|
+
"projects": {
|
|
57
|
+
"whatsapp:120363140032870788@g.us": {
|
|
58
|
+
"name": "my-project",
|
|
59
|
+
"channel": "whatsapp",
|
|
60
|
+
"peer": "120363140032870788@g.us",
|
|
61
|
+
...
|
|
62
|
+
},
|
|
63
|
+
"telegram:-1234567890": {
|
|
64
|
+
"name": "other-project",
|
|
65
|
+
"channel": "telegram",
|
|
66
|
+
"peer": "-1234567890",
|
|
67
|
+
...
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Key changes:
|
|
74
|
+
- `projectGroupId` becomes a composite key: `<channel>:<peerId>`
|
|
75
|
+
- `project_register` accepts `channel` + `peerId` instead of `projectGroupId`
|
|
76
|
+
- Project lookup uses the composite key from the message context
|
|
77
|
+
- All tool params, state keys, and docs updated accordingly
|
|
78
|
+
- Backward compatible: existing Telegram-only keys migrated on read
|
|
79
|
+
|
|
80
|
+
This enables any OpenClaw channel (Telegram, WhatsApp, Discord, Slack, etc.) to host a project.
|
|
81
|
+
|
|
82
|
+
### Open questions
|
|
83
|
+
|
|
84
|
+
- Should one project be bindable to multiple channels? (e.g. Telegram for devs, WhatsApp for stakeholder updates)
|
|
85
|
+
- How does the orchestrator agent handle cross-channel context?
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## Other Ideas
|
|
90
|
+
|
|
91
|
+
- **Jira provider** — `IssueProvider` interface already abstracts GitHub/GitLab; Jira is the obvious next addition
|
|
92
|
+
- **Deployment integration** — `work_finish` QA pass could trigger a deploy step via webhook or CLI
|
|
93
|
+
- **Cost tracking** — log token usage per task/level, surface in `status`
|
|
94
|
+
- **Priority scoring** — automatic priority assignment based on labels, age, and dependencies
|
|
95
|
+
- **Session archival** — auto-archive idle sessions after configurable timeout (currently indefinite)
|
|
96
|
+
- **Progressive delegation** — track QA pass rates per level and auto-promote (see [Management Theory](MANAGEMENT.md))
|