@laurentenhoor/devclaw 0.1.0 → 1.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.
Files changed (34) hide show
  1. package/README.md +68 -2
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +5 -1
  4. package/dist/index.js.map +1 -1
  5. package/dist/lib/onboarding.d.ts.map +1 -1
  6. package/dist/lib/onboarding.js +56 -7
  7. package/dist/lib/onboarding.js.map +1 -1
  8. package/dist/lib/setup/llm-model-selector.d.ts +19 -0
  9. package/dist/lib/setup/llm-model-selector.d.ts.map +1 -0
  10. package/dist/lib/setup/llm-model-selector.js +123 -0
  11. package/dist/lib/setup/llm-model-selector.js.map +1 -0
  12. package/dist/lib/setup/model-fetcher.d.ts +22 -0
  13. package/dist/lib/setup/model-fetcher.d.ts.map +1 -0
  14. package/dist/lib/setup/model-fetcher.js +59 -0
  15. package/dist/lib/setup/model-fetcher.js.map +1 -0
  16. package/dist/lib/setup/smart-model-selector.d.ts +38 -0
  17. package/dist/lib/setup/smart-model-selector.d.ts.map +1 -0
  18. package/dist/lib/setup/smart-model-selector.js +76 -0
  19. package/dist/lib/setup/smart-model-selector.js.map +1 -0
  20. package/dist/lib/templates.d.ts +1 -1
  21. package/dist/lib/templates.d.ts.map +1 -1
  22. package/dist/lib/templates.js +29 -1
  23. package/dist/lib/templates.js.map +1 -1
  24. package/dist/lib/tools/autoconfigure-models.d.ts +26 -0
  25. package/dist/lib/tools/autoconfigure-models.d.ts.map +1 -0
  26. package/dist/lib/tools/autoconfigure-models.js +110 -0
  27. package/dist/lib/tools/autoconfigure-models.js.map +1 -0
  28. package/dist/lib/tools/setup.d.ts.map +1 -1
  29. package/dist/lib/tools/setup.js +2 -1
  30. package/dist/lib/tools/setup.js.map +1 -1
  31. package/docs/ARCHITECTURE.md +5 -1
  32. package/docs/ONBOARDING.md +7 -3
  33. package/openclaw.plugin.json +55 -0
  34. package/package.json +6 -4
package/README.md CHANGED
@@ -6,7 +6,20 @@
6
6
 
7
7
  **Turn any group chat into a dev team that ships.**
8
8
 
9
- DevClaw is a plugin for [OpenClaw](https://openclaw.ai) that turns your orchestrator agent into a development manager. It hires developers, assigns tasks, reviews code, and keeps the pipeline moving — across as many projects as you have group chats. [Get started →](#getting-started)
9
+ DevClaw is a plugin for [OpenClaw](https://openclaw.ai) that turns your orchestrator agent into a development manager. It hires developers, assigns tasks, reviews code, and keeps the pipeline moving — across as many projects as you have group chats.
10
+
11
+ **Prerequisites:** [OpenClaw](https://openclaw.ai) must be installed and running.
12
+
13
+ ```bash
14
+ openclaw plugins install @laurentenhoor/devclaw
15
+ ```
16
+
17
+ Then start onboarding by chatting with your agent in any channel:
18
+ ```
19
+ "Hey, can you help me set up DevClaw?"
20
+ ```
21
+
22
+ [Read more on onboarding →](#getting-started)
10
23
 
11
24
  ---
12
25
 
@@ -320,6 +333,49 @@ Deployment steps, test commands, coding standards, acceptance criteria — all i
320
333
 
321
334
  ---
322
335
 
336
+ ## The orchestrator's role
337
+
338
+ The orchestrator is a **planner and dispatcher** — not a coder. This separation is intentional and enforced.
339
+
340
+ ### What the orchestrator does
341
+
342
+ - **Plans**: Analyzes requirements, breaks down work, decides priorities
343
+ - **Dispatches**: Creates issues, assigns developer levels, starts workers
344
+ - **Coordinates**: Monitors queue, handles status checks, answers questions
345
+ - **Reads**: Can inspect code to understand context (but never writes)
346
+
347
+ ### What goes through workers
348
+
349
+ All implementation work flows through the issue → worker pipeline:
350
+
351
+ | Action | Goes through worker? | Why |
352
+ |---|---|---|
353
+ | Writing or editing code | ✅ Yes | Audit trail, tier selection |
354
+ | Git operations (commits, branches, PRs) | ✅ Yes | Workers own their worktrees |
355
+ | Running tests | ✅ Yes | Part of the dev/QA workflow |
356
+ | Fixing bugs | ✅ Yes | Even quick fixes need tracking |
357
+ | Refactoring | ✅ Yes | Sonnet/Opus for complexity |
358
+ | Reading code to answer questions | ❌ No | Orchestrator can read |
359
+ | Creating issues | ❌ No | Orchestrator's job |
360
+ | Status checks | ❌ No | Orchestrator's job |
361
+ | Architecture discussions | ❌ No | Orchestrator's job |
362
+
363
+ ### Why this boundary exists
364
+
365
+ 1. **Audit trail** — Every code change links to an issue. You can trace any line of code back to a tracked task.
366
+
367
+ 2. **Right model for the job** — A typo fix uses Haiku (~$0.001). A migration uses Opus (~$0.20). Without tier selection, you're either overpaying or underperforming on every task.
368
+
369
+ 3. **Parallelization** — While workers code, the orchestrator stays free to handle new requests, answer questions, create more issues. No bottleneck.
370
+
371
+ 4. **QA pipeline** — Code goes through review before merging. Skip the worker pipeline, skip QA.
372
+
373
+ 5. **Session reuse** — Workers accumulate codebase context over multiple tasks. The orchestrator starting fresh every time wastes tokens.
374
+
375
+ The orchestrator saying "I'll just make this quick fix myself" is like a manager saying "I'll just write that feature instead of assigning it." Technically possible, but it breaks the system that makes everything else work.
376
+
377
+ ---
378
+
323
379
  ## Getting started
324
380
 
325
381
  ### Prerequisites
@@ -331,7 +387,17 @@ Deployment steps, test commands, coding standards, acceptance criteria — all i
331
387
  ### Install
332
388
 
333
389
  ```bash
334
- cp -r devclaw ~/.openclaw/extensions/
390
+ openclaw plugins install @laurentenhoor/devclaw
391
+ ```
392
+
393
+ Or for local development:
394
+ ```bash
395
+ openclaw plugins install -l ./devclaw
396
+ ```
397
+
398
+ Start onboarding:
399
+ ```bash
400
+ openclaw chat "Help me set up DevClaw"
335
401
  ```
336
402
 
337
403
  ### Set up through conversation
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAc7D,QAAA,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAwEI,iBAAiB;CAgChC,CAAC;AAEF,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAe7D,QAAA,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAwEI,iBAAiB;CAmChC,CAAC;AAEF,eAAe,MAAM,CAAC"}
package/dist/index.js CHANGED
@@ -8,6 +8,7 @@ import { createHealthTool } from "./lib/tools/health.js";
8
8
  import { createProjectRegisterTool } from "./lib/tools/project-register.js";
9
9
  import { createSetupTool } from "./lib/tools/setup.js";
10
10
  import { createOnboardTool } from "./lib/tools/onboard.js";
11
+ import { createAutoConfigureModelsTool } from "./lib/tools/autoconfigure-models.js";
11
12
  import { registerCli } from "./lib/cli.js";
12
13
  import { registerHeartbeatService } from "./lib/services/heartbeat.js";
13
14
  const plugin = {
@@ -94,13 +95,16 @@ const plugin = {
94
95
  });
95
96
  api.registerTool(createSetupTool(api), { names: ["setup"] });
96
97
  api.registerTool(createOnboardTool(api), { names: ["onboard"] });
98
+ api.registerTool(createAutoConfigureModelsTool(api), {
99
+ names: ["autoconfigure_models"],
100
+ });
97
101
  // CLI
98
102
  api.registerCli(({ program }) => registerCli(program, api), {
99
103
  commands: ["devclaw"],
100
104
  });
101
105
  // Services
102
106
  registerHeartbeatService(api);
103
- api.logger.info("DevClaw plugin registered (10 tools, 1 CLI command group, 1 service)");
107
+ api.logger.info("DevClaw plugin registered (11 tools, 1 CLI command group, 1 service)");
104
108
  },
105
109
  };
106
110
  export default plugin;
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAA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AAC,SAAS,CAAC;SACtB,CAAC,CAAC;QAEH,WAAW;QACX,wBAAwB,CAAC,GAAG,CAAC,CAAC;QAE9B,GAAG,CAAC,MAAM,CAAC,IAAI,CACb,sEAAsE,CACvE,CAAC;IACJ,CAAC;CACF,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"onboarding.d.ts","sourceRoot":"","sources":["../../lib/onboarding.ts"],"names":[],"mappings":"AAaA,wBAAgB,kBAAkB,CAChC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACrC,OAAO,CAGT;AAED,wBAAsB,iBAAiB,CACrC,YAAY,CAAC,EAAE,MAAM,GACpB,OAAO,CAAC,OAAO,CAAC,CAWlB;AAkBD,wBAAgB,oBAAoB,CAClC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACrC,MAAM,CAgBR;AAED,wBAAgB,uBAAuB,IAAI,MAAM,CAkEhD"}
1
+ {"version":3,"file":"onboarding.d.ts","sourceRoot":"","sources":["../../lib/onboarding.ts"],"names":[],"mappings":"AAaA,wBAAgB,kBAAkB,CAChC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACrC,OAAO,CAGT;AAED,wBAAsB,iBAAiB,CACrC,YAAY,CAAC,EAAE,MAAM,GACpB,OAAO,CAAC,OAAO,CAAC,CAWlB;AAwBD,wBAAgB,oBAAoB,CAClC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACrC,MAAM,CAgBR;AAED,wBAAgB,uBAAuB,IAAI,MAAM,CAmHhD"}
@@ -96,13 +96,29 @@ Ask: "Do you want to configure DevClaw for the current agent, or create a new de
96
96
  - If none selected, user can add bindings manually later via openclaw.json
97
97
 
98
98
  **Step 2: Model Configuration**
99
- Show the default level-to-model mapping and ask if they want to customize:
100
99
 
101
- | Role | Level | Default Model | Purpose |
102
- |------|-------|---------------|---------|
103
- ${modelTable}
100
+ 1. **Call \`autoconfigure_models\`** to automatically discover and assign models:
101
+ - Discovers all authenticated models in OpenClaw
102
+ - Uses AI to intelligently assign them to DevClaw roles
103
+ - Returns a ready-to-use model configuration
104
+
105
+ 2. **Handle the result**:
106
+ - If \`success: false\` and \`modelCount: 0\`:
107
+ - **BLOCK setup** - show the authentication instructions from the message
108
+ - **DO NOT proceed** - exit onboarding until user configures API keys
109
+ - If \`success: true\`:
110
+ - Present the model assignment table to the user
111
+ - Store the \`models\` object for Step 3
112
+
113
+ 3. **Optional: Prefer specific provider**
114
+ - If user wants only models from one provider (e.g., "only use Anthropic"):
115
+ - Call \`autoconfigure_models({ preferProvider: "anthropic" })\`
104
116
 
105
- If the defaults are fine, proceed. If customizing, ask which levels to change.
117
+ 4. **Confirm with user**
118
+ - Ask: "Does this look good, or would you like to customize any roles?"
119
+ - If approved → proceed to Step 3 with the \`models\` configuration
120
+ - If they want changes → ask which specific roles to modify
121
+ - If they want different provider → go back to step 3
106
122
 
107
123
  **Step 3: Run Setup**
108
124
  Call \`setup\` with the collected answers:
@@ -110,11 +126,44 @@ Call \`setup\` with the collected answers:
110
126
  - New agent: \`setup({ newAgentName: "<name>", channelBinding: "telegram"|"whatsapp"|null, migrateFrom: "<agentId>"|null, models: { ... } })\`
111
127
  - \`migrateFrom\`: Include if user wants to migrate an existing channel-wide binding
112
128
 
113
- **Step 4: Optional Project Registration**
114
- After setup, ask: "Would you like to register a project now?"
129
+ **Step 4: Telegram Group Setup (IMPORTANT)**
130
+ After setup completes, explain project isolation best practices:
131
+
132
+ 📱 **Telegram Group Guidance:**
133
+ DevClaw uses **one Telegram group per project** for isolation and clean backlogs.
134
+
135
+ **Recommended Setup:**
136
+ 1. **Create a new Telegram group** for each project
137
+ 2. **Add your bot** to the group
138
+ 3. **Use mentions** to interact: "@botname status", "@botname pick up #42"
139
+ 4. Each group gets its own queue, workers, and audit log
140
+
141
+ **Why separate groups?**
142
+ - Clean issue backlogs per project
143
+ - Isolated worker state (no cross-project confusion)
144
+ - Clear audit trails
145
+ - Team-specific access control
146
+
147
+ **Single-project mode:**
148
+ If you REALLY want all projects in one group (not recommended):
149
+ - You can register multiple projects to the same group ID
150
+ - ⚠️ WARNING: Shared queues, workers will see all issues
151
+ - Only use this for personal/solo projects
152
+
153
+ Ask: "Do you understand the group-per-project model, or do you want single-project mode?"
154
+ - Most users should proceed with the recommended approach
155
+ - Only force single-project if they insist
156
+
157
+ **Step 5: Project Registration**
158
+ Ask: "Would you like to register a project now?"
115
159
  If yes, collect: project name, repo path, Telegram group ID, group name, base branch.
116
160
  Then call \`project_register\`.
117
161
 
162
+ 💡 **Tip**: For the Telegram group ID:
163
+ - Add the bot to your group
164
+ - Send any message with the bot mentioned
165
+ - Bot can tell you the group ID
166
+
118
167
  ## Guidelines
119
168
  - Be conversational and friendly. Ask one question at a time.
120
169
  - Show defaults so the user can accept them quickly.
@@ -1 +1 @@
1
- {"version":3,"file":"onboarding.js","sourceRoot":"","sources":["../../lib/onboarding.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,8EAA8E;AAC9E,YAAY;AACZ,8EAA8E;AAE9E,MAAM,UAAU,kBAAkB,CAChC,YAAsC;IAEtC,MAAM,MAAM,GAAI,YAAoD,EAAE,MAAM,CAAC;IAC7E,OAAO,CAAC,CAAC,MAAM,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;AACpD,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,YAAqB;IAErB,IAAI,CAAC,YAAY;QAAE,OAAO,KAAK,CAAC;IAChC,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,MAAM,EAAE,CAAC,QAAQ,CAC/B,IAAI,CAAC,IAAI,C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,MAAM,EAAE,SAAS;KAClB,CAAC;IACF,KAAK,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE,CAAC;QAC5D,KAAK,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;YACpD,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,MAAM,KAAK,MAAM,KAAK,MAAM,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAC5E,CAAC;IACH,CAAC;IACD,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAEnC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiGR,CAAC;AACF,CAAC"}
@@ -0,0 +1,19 @@
1
+ export type ModelAssignment = {
2
+ dev: {
3
+ junior: string;
4
+ medior: string;
5
+ senior: string;
6
+ };
7
+ qa: {
8
+ reviewer: string;
9
+ tester: string;
10
+ };
11
+ };
12
+ /**
13
+ * Use an LLM to intelligently select and assign models to DevClaw roles.
14
+ */
15
+ export declare function selectModelsWithLLM(availableModels: Array<{
16
+ model: string;
17
+ provider: string;
18
+ }>, sessionKey?: string): Promise<ModelAssignment | null>;
19
+ //# sourceMappingURL=llm-model-selector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"llm-model-selector.d.ts","sourceRoot":"","sources":["../../../lib/setup/llm-model-selector.ts"],"names":[],"mappings":"AAUA,MAAM,MAAM,eAAe,GAAG;IAC5B,GAAG,EAAE;QACH,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,EAAE,EAAE;QACF,QAAQ,EAAE,MAAM,CAAC;QACjB,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;CACH,CAAC;AAEF;;GAEG;AACH,wBAAsB,mBAAmB,CACvC,eAAe,EAAE,KAAK,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC,EAC3D,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC,CAgIjC"}
@@ -0,0 +1,123 @@
1
+ /**
2
+ * llm-model-selector.ts — LLM-powered intelligent model selection.
3
+ *
4
+ * Uses an LLM to understand model capabilities and assign optimal models to DevClaw roles.
5
+ */
6
+ import { execSync } from "node:child_process";
7
+ import { writeFileSync, unlinkSync } from "node:fs";
8
+ import { join } from "node:path";
9
+ import { tmpdir } from "node:os";
10
+ /**
11
+ * Use an LLM to intelligently select and assign models to DevClaw roles.
12
+ */
13
+ export async function selectModelsWithLLM(availableModels, sessionKey) {
14
+ if (availableModels.length === 0) {
15
+ return null;
16
+ }
17
+ // If only one model, assign it to all roles
18
+ if (availableModels.length === 1) {
19
+ const model = availableModels[0].model;
20
+ return {
21
+ dev: { junior: model, medior: model, senior: model },
22
+ qa: { reviewer: model, tester: model },
23
+ };
24
+ }
25
+ // Create a prompt for the LLM
26
+ const modelList = availableModels.map((m) => m.model).join("\n");
27
+ const prompt = `You are an AI model expert. Analyze the following authenticated AI models and assign them to DevClaw development roles based on their capabilities.
28
+
29
+ Available models:
30
+ ${modelList}
31
+
32
+ Assign models to these roles based on capability:
33
+ - **senior** (most capable): Complex architecture, refactoring, critical decisions
34
+ - **medior** (balanced): Features, bug fixes, code review
35
+ - **junior** (fast/efficient): Simple fixes, testing, routine tasks
36
+ - **reviewer** (same as medior): Code review
37
+ - **tester** (same as junior): Testing
38
+
39
+ Rules:
40
+ 1. Prefer same provider for consistency
41
+ 2. Assign most capable model to senior
42
+ 3. Assign mid-tier model to medior/reviewer
43
+ 4. Assign fastest/cheapest model to junior/tester
44
+ 5. Consider model version numbers (higher = newer/better)
45
+ 6. Stable versions (no date) > snapshot versions (with date like 20250514)
46
+
47
+ Return ONLY a JSON object in this exact format (no markdown, no explanation):
48
+ {
49
+ "dev": {
50
+ "junior": "provider/model-name",
51
+ "medior": "provider/model-name",
52
+ "senior": "provider/model-name"
53
+ },
54
+ "qa": {
55
+ "reviewer": "provider/model-name",
56
+ "tester": "provider/model-name"
57
+ }
58
+ }`;
59
+ // Write prompt to temp file for safe passing to shell
60
+ const tmpFile = join(tmpdir(), `devclaw-model-select-${Date.now()}.txt`);
61
+ writeFileSync(tmpFile, prompt, "utf-8");
62
+ try {
63
+ // Call openclaw agent using current session context if available
64
+ const sessionFlag = sessionKey
65
+ ? `--session-id "${sessionKey}"`
66
+ : `--session-id devclaw-model-selection`;
67
+ const result = execSync(`openclaw agent --local ${sessionFlag} --message "$(cat ${tmpFile})" --json`, {
68
+ encoding: "utf-8",
69
+ timeout: 30000,
70
+ stdio: ["pipe", "pipe", "ignore"],
71
+ }).trim();
72
+ // Parse the response from openclaw agent --json
73
+ const lines = result.split("\n");
74
+ const jsonStartIndex = lines.findIndex((line) => line.trim().startsWith("{"));
75
+ if (jsonStartIndex === -1) {
76
+ throw new Error("No JSON found in LLM response");
77
+ }
78
+ const jsonString = lines.slice(jsonStartIndex).join("\n");
79
+ // openclaw agent --json returns: { payloads: [{ text: "```json\n{...}\n```" }], meta: {...} }
80
+ const response = JSON.parse(jsonString);
81
+ if (!response.payloads || !Array.isArray(response.payloads) || response.payloads.length === 0) {
82
+ throw new Error("Invalid openclaw agent response structure - missing payloads");
83
+ }
84
+ // Extract text from first payload
85
+ const textContent = response.payloads[0].text;
86
+ if (!textContent) {
87
+ throw new Error("Empty text content in openclaw agent payload");
88
+ }
89
+ // Strip markdown code blocks (```json and ```)
90
+ const cleanJson = textContent
91
+ .replace(/```json\n?/g, '')
92
+ .replace(/```\n?/g, '')
93
+ .trim();
94
+ // Parse the actual model assignment JSON
95
+ const assignment = JSON.parse(cleanJson);
96
+ // Log what we got for debugging
97
+ console.log("LLM returned:", JSON.stringify(assignment, null, 2));
98
+ // Validate the structure
99
+ if (!assignment.dev?.junior ||
100
+ !assignment.dev?.medior ||
101
+ !assignment.dev?.senior ||
102
+ !assignment.qa?.reviewer ||
103
+ !assignment.qa?.tester) {
104
+ console.error("Invalid assignment structure. Got:", assignment);
105
+ throw new Error(`Invalid assignment structure from LLM. Missing fields in: ${JSON.stringify(Object.keys(assignment))}`);
106
+ }
107
+ return assignment;
108
+ }
109
+ catch (err) {
110
+ console.error("LLM model selection failed:", err.message);
111
+ return null;
112
+ }
113
+ finally {
114
+ // Clean up temp file
115
+ try {
116
+ unlinkSync(tmpFile);
117
+ }
118
+ catch {
119
+ // Ignore cleanup errors
120
+ }
121
+ }
122
+ }
123
+ //# sourceMappingURL=llm-model-selector.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"llm-model-selector.js","sourceRoot":"","sources":["../../../lib/setup/llm-model-selector.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAcjC;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,eAA2D,EAC3D,UAAmB;IAEnB,IAAI,eAAe,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACjC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,4CAA4C;IAC5C,IAAI,eAAe,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACjC,MAAM,KAAK,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;QACvC,OAAO;YACL,GAAG,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAA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C,oCAAoC,EAAE,UAAU,CAAC,CAAC;YAChE,MAAM,IAAI,KAAK,CAAC,6DAA6D,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC;QAC1H,CAAC;QAED,OAAO,UAA6B,CAAC;IACvC,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,CAAC,KAAK,CAAC,6BAA6B,EAAG,GAAa,CAAC,OAAO,CAAC,CAAC;QACrE,OAAO,IAAI,CAAC;IACd,CAAC;YAAS,CAAC;QACT,qBAAqB;QACrB,IAAI,CAAC;YACH,UAAU,CAAC,OAAO,CAAC,CAAC;QACtB,CAAC;QAAC,MAAM,CAAC;YACP,wBAAwB;QAC1B,CAAC;IACH,CAAC;AACH,CAAC"}
@@ -0,0 +1,22 @@
1
+ export type OpenClawModelRow = {
2
+ key: string;
3
+ name?: string;
4
+ input: string;
5
+ contextWindow: number | null;
6
+ local: boolean;
7
+ available: boolean;
8
+ tags: string[];
9
+ missing?: boolean;
10
+ };
11
+ /**
12
+ * Fetch all models from OpenClaw without logging.
13
+ *
14
+ * @param allModels - If true, fetches all models (--all flag). If false, only authenticated models.
15
+ * @returns Array of model objects from OpenClaw's model registry
16
+ */
17
+ export declare function fetchModels(allModels?: boolean): OpenClawModelRow[];
18
+ /**
19
+ * Fetch only authenticated models (available: true).
20
+ */
21
+ export declare function fetchAuthenticatedModels(): OpenClawModelRow[];
22
+ //# sourceMappingURL=model-fetcher.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model-fetcher.d.ts","sourceRoot":"","sources":["../../../lib/setup/model-fetcher.ts"],"names":[],"mappings":"AAOA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,KAAK,EAAE,OAAO,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;IACnB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,SAAS,UAAO,GAAG,gBAAgB,EAAE,CAgDhE;AAED;;GAEG;AACH,wBAAgB,wBAAwB,IAAI,gBAAgB,EAAE,CAG7D"}
@@ -0,0 +1,59 @@
1
+ /**
2
+ * model-fetcher.ts — Shared helper for fetching OpenClaw models without logging.
3
+ *
4
+ * Uses execSync to bypass OpenClaw's command logging infrastructure.
5
+ */
6
+ import { execSync } from "node:child_process";
7
+ /**
8
+ * Fetch all models from OpenClaw without logging.
9
+ *
10
+ * @param allModels - If true, fetches all models (--all flag). If false, only authenticated models.
11
+ * @returns Array of model objects from OpenClaw's model registry
12
+ */
13
+ export function fetchModels(allModels = true) {
14
+ try {
15
+ const command = allModels
16
+ ? "openclaw models list --all --json"
17
+ : "openclaw models list --json";
18
+ // Use execSync directly to bypass OpenClaw's command logging
19
+ const output = execSync(command, {
20
+ encoding: "utf-8",
21
+ timeout: 10000,
22
+ cwd: process.cwd(),
23
+ // Suppress stderr to avoid any error messages
24
+ stdio: ["pipe", "pipe", "ignore"],
25
+ }).trim();
26
+ if (!output) {
27
+ throw new Error("Empty output from openclaw models list");
28
+ }
29
+ // Parse JSON (skip any log lines like "[plugins] ...")
30
+ const lines = output.split("\n");
31
+ // Find the first line that starts with { (the beginning of JSON)
32
+ const jsonStartIndex = lines.findIndex((line) => {
33
+ const trimmed = line.trim();
34
+ return trimmed.startsWith("{");
35
+ });
36
+ if (jsonStartIndex === -1) {
37
+ throw new Error(`No JSON object found in output. Got: ${output.substring(0, 200)}...`);
38
+ }
39
+ // Join all lines from the JSON start to the end
40
+ const jsonString = lines.slice(jsonStartIndex).join("\n");
41
+ const data = JSON.parse(jsonString);
42
+ const models = data.models;
43
+ if (!Array.isArray(models)) {
44
+ throw new Error(`Expected array of models, got: ${typeof models}`);
45
+ }
46
+ return models;
47
+ }
48
+ catch (err) {
49
+ throw new Error(`Failed to fetch models: ${err.message}`);
50
+ }
51
+ }
52
+ /**
53
+ * Fetch only authenticated models (available: true).
54
+ */
55
+ export function fetchAuthenticatedModels() {
56
+ // Use --all flag but suppress logging via stdio in fetchModels()
57
+ return fetchModels(true).filter((m) => m.available === true);
58
+ }
59
+ //# sourceMappingURL=model-fetcher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model-fetcher.js","sourceRoot":"","sources":["../../../lib/setup/model-fetcher.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAa9C;;;;;GAKG;AACH,MAAM,UAAU,WAAW,CAAC,SAAS,GAAG,IAAI;IAC1C,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,SAAS;YACvB,CAAC,CAAC,mCAAmC;YACrC,CAAC,CAAC,6BAA6B,CAAC;QAElC,6DAA6D;QAC7D,MAAM,MAAM,GAAG,QAAQ,CAAC,OAAO,EAAE;YAC/B,QAAQ,EAAE,OAAO;YACjB,OAAO,EAAE,KAAK;YACd,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE;YAClB,8CAA8C;YAC9C,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC;SAClC,CAAC,CAAC,IAAI,EAAE,CAAC;QAEV,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;QAC5D,CAAC;QAED,uDAAuD;QACvD,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAEjC,iEAAiE;QACjE,MAAM,cAAc,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,IAAY,EAAE,EAAE;YACtD,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;YAC5B,OAAO,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;QACjC,CAAC,CAAC,CAAC;QAEH,IAAI,cAAc,KAAK,CAAC,CAAC,EAAE,CAAC;YAC1B,MAAM,IAAI,KAAK,CACb,wCAAwC,MAAM,CAAC,SAAS,CAAC,CAAC,EAAE,GAAG,CAAC,KAAK,CACtE,CAAC;QACJ,CAAC;QAED,gDAAgD;QAChD,MAAM,UAAU,GAAG,KAAK,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAE1D,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;QACpC,MAAM,MAAM,GAAG,IAAI,CAAC,MAA4B,CAAC;QAEjD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;YAC3B,MAAM,IAAI,KAAK,CAAC,kCAAkC,OAAO,MAAM,EAAE,CAAC,CAAC;QACrE,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,2BAA4B,GAAa,CAAC,OAAO,EAAE,CAAC,CAAC;IACvE,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,wBAAwB;IACtC,iEAAiE;IACjE,OAAO,WAAW,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,KAAK,IAAI,CAAC,CAAC;AAC/D,CAAC"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * smart-model-selector.ts — LLM-powered model selection for DevClaw roles.
3
+ *
4
+ * Uses an LLM to intelligently analyze and assign models to DevClaw roles.
5
+ */
6
+ export type ModelAssignment = {
7
+ dev: {
8
+ junior: string;
9
+ medior: string;
10
+ senior: string;
11
+ };
12
+ qa: {
13
+ reviewer: string;
14
+ tester: string;
15
+ };
16
+ };
17
+ /**
18
+ * Intelligently assign available models to DevClaw roles using an LLM.
19
+ *
20
+ * Strategy:
21
+ * 1. If 0 models → return null (setup should be blocked)
22
+ * 2. If 1 model → assign it to all roles
23
+ * 3. If multiple models → use LLM to intelligently assign
24
+ */
25
+ export declare function assignModels(availableModels: Array<{
26
+ model: string;
27
+ provider: string;
28
+ authenticated: boolean;
29
+ }>, sessionKey?: string): Promise<ModelAssignment | null>;
30
+ /**
31
+ * Format model assignment as a readable table.
32
+ */
33
+ export declare function formatAssignment(assignment: ModelAssignment): string;
34
+ /**
35
+ * Generate setup instructions when no models are available.
36
+ */
37
+ export declare function generateSetupInstructions(): string;
38
+ //# sourceMappingURL=smart-model-selector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"smart-model-selector.d.ts","sourceRoot":"","sources":["../../../lib/setup/smart-model-selector.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,MAAM,eAAe,GAAG;IAC5B,GAAG,EAAE;QACH,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,EAAE,EAAE;QACF,QAAQ,EAAE,MAAM,CAAC;QACjB,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;CACH,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAsB,YAAY,CAChC,eAAe,EAAE,KAAK,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,OAAO,CAAA;CAAE,CAAC,EACnF,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC,CA0BjC;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,eAAe,GAAG,MAAM,CAWpE;AAED;;GAEG;AACH,wBAAgB,yBAAyB,IAAI,MAAM,CAqBlD"}
@@ -0,0 +1,76 @@
1
+ /**
2
+ * smart-model-selector.ts — LLM-powered model selection for DevClaw roles.
3
+ *
4
+ * Uses an LLM to intelligently analyze and assign models to DevClaw roles.
5
+ */
6
+ /**
7
+ * Intelligently assign available models to DevClaw roles using an LLM.
8
+ *
9
+ * Strategy:
10
+ * 1. If 0 models → return null (setup should be blocked)
11
+ * 2. If 1 model → assign it to all roles
12
+ * 3. If multiple models → use LLM to intelligently assign
13
+ */
14
+ export async function assignModels(availableModels, sessionKey) {
15
+ // Filter to only authenticated models
16
+ const authenticated = availableModels.filter((m) => m.authenticated);
17
+ if (authenticated.length === 0) {
18
+ return null; // No models available - setup should be blocked
19
+ }
20
+ // If only one model, use it for everything
21
+ if (authenticated.length === 1) {
22
+ const model = authenticated[0].model;
23
+ return {
24
+ dev: { junior: model, medior: model, senior: model },
25
+ qa: { reviewer: model, tester: model },
26
+ };
27
+ }
28
+ // Multiple models: use LLM-based selection
29
+ const { selectModelsWithLLM } = await import("./llm-model-selector.js");
30
+ const llmResult = await selectModelsWithLLM(authenticated, sessionKey);
31
+ if (!llmResult) {
32
+ throw new Error("LLM-based model selection failed. Please try again or configure models manually.");
33
+ }
34
+ return llmResult;
35
+ }
36
+ /**
37
+ * Format model assignment as a readable table.
38
+ */
39
+ export function formatAssignment(assignment) {
40
+ const lines = [
41
+ "| Role | Level | Model |",
42
+ "|------|----------|--------------------------|",
43
+ `| DEV | senior | ${assignment.dev.senior.padEnd(24)} |`,
44
+ `| DEV | medior | ${assignment.dev.medior.padEnd(24)} |`,
45
+ `| DEV | junior | ${assignment.dev.junior.padEnd(24)} |`,
46
+ `| QA | reviewer | ${assignment.qa.reviewer.padEnd(24)} |`,
47
+ `| QA | tester | ${assignment.qa.tester.padEnd(24)} |`,
48
+ ];
49
+ return lines.join("\n");
50
+ }
51
+ /**
52
+ * Generate setup instructions when no models are available.
53
+ */
54
+ export function generateSetupInstructions() {
55
+ return `❌ No authenticated models found. DevClaw needs at least one model to work.
56
+
57
+ To configure model authentication:
58
+
59
+ **For Anthropic Claude:**
60
+ export ANTHROPIC_API_KEY=your-api-key
61
+ # or: openclaw auth add --provider anthropic
62
+
63
+ **For OpenAI:**
64
+ export OPENAI_API_KEY=your-api-key
65
+ # or: openclaw auth add --provider openai
66
+
67
+ **For other providers:**
68
+ openclaw auth add --provider <provider>
69
+
70
+ **Verify authentication:**
71
+ openclaw models list
72
+ (Look for "Auth: yes" in the output)
73
+
74
+ Once you see authenticated models, re-run: onboard`;
75
+ }
76
+ //# sourceMappingURL=smart-model-selector.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"smart-model-selector.js","sourceRoot":"","sources":["../../../lib/setup/smart-model-selector.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAcH;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,eAAmF,EACnF,UAAmB;IAEnB,sCAAsC;IACtC,MAAM,aAAa,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC;IAErE,IAAI,aAAa,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC/B,OAAO,IAAI,CAAC,CAAC,gDAAgD;IAC/D,CAAC;IAED,2CAA2C;IAC3C,IAAI,aAAa,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC/B,MAAM,KAAK,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;QACrC,OAAO;YACL,GAAG,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE;YACpD,EAAE,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE;SACvC,CAAC;IACJ,CAAC;IAED,2CAA2C;IAC3C,MAAM,EAAE,mBAAmB,EAAE,GAAG,MAAM,MAAM,CAAC,yBAAyB,CAAC,CAAC;IACxE,MAAM,SAAS,GAAG,MAAM,mBAAmB,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC;IAEvE,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CAAC,kFAAkF,CAAC,CAAC;IACtG,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,UAA2B;IAC1D,MAAM,KAAK,GAAG;QACZ,gDAAgD;QAChD,gDAAgD;QAChD,uBAAuB,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI;QAC3D,uBAAuB,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI;QAC3D,uBAAuB,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI;QAC3D,uBAAuB,UAAU,CAAC,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI;QAC5D,uBAAuB,UAAU,CAAC,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI;KAC3D,CAAC;IACF,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,yBAAyB;IACvC,OAAO;;;;;;;;;;;;;;;;;;;mDAmB0C,CAAC;AACpD,CAAC"}
@@ -4,6 +4,6 @@
4
4
  */
5
5
  export declare const DEFAULT_DEV_INSTRUCTIONS = "# DEV Worker Instructions\n\n## Context You Receive\n\nWhen you start work, you're given:\n\n- **Issue:** number, title, body, URL, labels, state\n- **Comments:** full discussion thread on the issue\n- **Assignees:** who's assigned\n- **Timestamps:** created, updated dates\n- **Project:** repo path, base branch, project name\n\nRead the comments carefully \u2014 they often contain clarifications, decisions, or scope changes that aren't in the original issue body.\n\n## Your Job\n\n- Work in a git worktree (never switch branches in the main repo)\n- Run tests before completing\n- Create an MR/PR to the base branch and merge it\n- **IMPORTANT:** Do NOT use closing keywords in PR/MR descriptions (no \"Closes #X\", \"Fixes #X\", \"Resolves #X\"). Use \"As described in issue #X\" or \"Addresses issue #X\" instead. DevClaw manages issue state \u2014 auto-closing bypasses QA.\n- Clean up the worktree after merging\n- When done, call work_finish with role \"dev\", result \"done\", and a brief summary\n- If you discover unrelated bugs, call task_create to file them\n- Do NOT call work_start, status, health, or project_register\n";
6
6
  export declare const DEFAULT_QA_INSTRUCTIONS = "# QA Worker Instructions\n\n- Pull latest from the base branch\n- Run tests and linting\n- Verify the changes address the issue requirements\n- Check for regressions in related functionality\n- **Always** call task_comment with your review findings \u2014 even if everything looks good, leave a brief summary of what you checked\n- When done, call work_finish with role \"qa\" and one of:\n - result \"pass\" if everything looks good\n - result \"fail\" with specific issues if problems found\n - result \"refine\" if you need human input to decide\n- If you discover unrelated bugs, call task_create to file them\n- Do NOT call work_start, status, health, or project_register\n";
7
- export declare const AGENTS_MD_TEMPLATE = "# AGENTS.md - Development Orchestration (DevClaw)\n\n## If You Are a Sub-Agent (DEV/QA Worker)\n\nSkip the orchestrator section. Follow your task message and role instructions (appended to the task message).\n\n### Conventions\n\n- Conventional commits: `feat:`, `fix:`, `chore:`, `refactor:`, `test:`, `docs:`\n- Include issue number: `feat: add user authentication (#12)`\n- Branch naming: `feature/<id>-<slug>` or `fix/<id>-<slug>`\n- **DEV always works in a git worktree** (never switch branches in the main repo)\n- **DEV must merge to base branch** before announcing completion\n- **Do NOT use closing keywords in PR/MR descriptions** (no \"Closes #X\", \"Fixes #X\", \"Resolves #X\"). Use \"As described in issue #X\" or \"Addresses issue #X\". DevClaw manages issue state \u2014 auto-closing bypasses QA.\n- **QA tests on the deployed version** and inspects code on the base branch\n- **QA always calls task_comment** with review findings before completing\n- Always run tests before completing\n\n### Completing Your Task\n\nWhen you are done, **call `work_finish` yourself** \u2014 do not just announce in text.\n\n- **DEV done:** `work_finish({ role: \"dev\", result: \"done\", projectGroupId: \"<from task message>\", summary: \"<brief summary>\" })`\n- **QA pass:** `work_finish({ role: \"qa\", result: \"pass\", projectGroupId: \"<from task message>\", summary: \"<brief summary>\" })`\n- **QA fail:** `work_finish({ role: \"qa\", result: \"fail\", projectGroupId: \"<from task message>\", summary: \"<specific issues>\" })`\n- **QA refine:** `work_finish({ role: \"qa\", result: \"refine\", projectGroupId: \"<from task message>\", summary: \"<what needs human input>\" })`\n\nThe `projectGroupId` is included in your task message.\n\n### Filing Follow-Up Issues\n\nIf you discover unrelated bugs or needed improvements during your work, call `task_create` to file them:\n\n`task_create({ projectGroupId: \"<from task message>\", title: \"Bug: ...\", description: \"...\" })`\n\n### Tools You Should NOT Use\n\nThese are orchestrator-only tools. Do not call them:\n- `work_start`, `status`, `health`, `project_register`\n\n---\n\n## Orchestrator\n\nYou are a **development orchestrator**. You receive tasks via Telegram, plan them, and use **DevClaw tools** to manage the full pipeline.\n\n### DevClaw Tools\n\nAll orchestration goes through these tools. You do NOT manually manage sessions, labels, or projects.json.\n\n| Tool | What it does |\n|---|---|\n| `project_register` | One-time project setup: creates labels, scaffolds role files, adds to projects.json |\n| `task_create` | Create issues from chat (bugs, features, tasks) |\n| `task_update` | Update issue title, description, or labels |\n| `status` | Task queue and worker state per project (lightweight dashboard) |\n| `health` | Scan worker health: zombies, stale workers, orphaned state. Pass fix=true to auto-fix |\n| `work_start` | End-to-end: label transition, level assignment, session create/reuse, dispatch with role instructions |\n| `work_finish` | End-to-end: label transition, state update, issue close/reopen. Ticks scheduler after completion. |\n\n### Pipeline Flow\n\n```\nPlanning \u2192 To Do \u2192 Doing \u2192 To Test \u2192 Testing \u2192 Done\n \u2193\n To Improve \u2192 Doing (fix cycle)\n \u2193\n Refining (human decision)\n```\n\nIssue labels are the single source of truth for task state.\n\n### Developer Assignment\n\nEvaluate each task and pass the appropriate developer level to `work_start`:\n\n- **junior** \u2014 trivial: typos, single-file fix, quick change\n- **medior** \u2014 standard: features, bug fixes, multi-file changes\n- **senior** \u2014 complex: architecture, system-wide refactoring, 5+ services\n- **reviewer** \u2014 QA: code inspection, validation, test runs\n\n### Picking Up Work\n\n1. Use `status` to see what's available\n2. Priority: `To Improve` (fix failures) > `To Test` (QA) > `To Do` (new work)\n3. Evaluate complexity, choose developer level\n4. Call `work_start` with `issueId`, `role`, `projectGroupId`, `level`\n5. Post the `announcement` from the tool response to Telegram\n\n### When Work Completes\n\nWorkers call `work_finish` themselves \u2014 the label transition, state update, and audit log happen atomically. After completion, `work_finish` ticks the scheduler to fill free slots:\n\n- DEV \"done\" \u2192 issue moves to \"To Test\" \u2192 scheduler dispatches QA\n- QA \"fail\" \u2192 issue moves to \"To Improve\" \u2192 scheduler dispatches DEV\n- QA \"pass\" \u2192 Done, no further dispatch\n- QA \"refine\" / blocked \u2192 needs human input\n\nThe response includes `tickPickups` showing any tasks that were auto-dispatched. Post announcements from the tool response to Telegram.\n\n### Prompt Instructions\n\nWorkers receive role-specific instructions appended to their task message. These are loaded from `projects/roles/<project-name>/<role>.md` in the workspace, falling back to `projects/roles/default/<role>.md` if no project-specific file exists. `project_register` scaffolds these files automatically \u2014 edit them to customize worker behavior per project.\n\n### Heartbeats\n\n**Do nothing.** The heartbeat service runs automatically as an internal interval-based process \u2014 zero LLM tokens. It handles health checks (zombie detection, stale workers) and queue dispatch (filling free worker slots by priority) every 60 seconds by default. Configure via `plugins.entries.devclaw.config.work_heartbeat` in openclaw.json.\n\n### Safety\n\n- Don't push to main directly\n- Don't force-push\n- Don't close issues without QA pass\n- Ask before architectural decisions affecting multiple projects\n";
7
+ export declare const AGENTS_MD_TEMPLATE = "# AGENTS.md - Development Orchestration (DevClaw)\n\n## If You Are a Sub-Agent (DEV/QA Worker)\n\nSkip the orchestrator section. Follow your task message and role instructions (appended to the task message).\n\n### Conventions\n\n- Conventional commits: `feat:`, `fix:`, `chore:`, `refactor:`, `test:`, `docs:`\n- Include issue number: `feat: add user authentication (#12)`\n- Branch naming: `feature/<id>-<slug>` or `fix/<id>-<slug>`\n- **DEV always works in a git worktree** (never switch branches in the main repo)\n- **DEV must merge to base branch** before announcing completion\n- **Do NOT use closing keywords in PR/MR descriptions** (no \"Closes #X\", \"Fixes #X\", \"Resolves #X\"). Use \"As described in issue #X\" or \"Addresses issue #X\". DevClaw manages issue state \u2014 auto-closing bypasses QA.\n- **QA tests on the deployed version** and inspects code on the base branch\n- **QA always calls task_comment** with review findings before completing\n- Always run tests before completing\n\n### Completing Your Task\n\nWhen you are done, **call `work_finish` yourself** \u2014 do not just announce in text.\n\n- **DEV done:** `work_finish({ role: \"dev\", result: \"done\", projectGroupId: \"<from task message>\", summary: \"<brief summary>\" })`\n- **QA pass:** `work_finish({ role: \"qa\", result: \"pass\", projectGroupId: \"<from task message>\", summary: \"<brief summary>\" })`\n- **QA fail:** `work_finish({ role: \"qa\", result: \"fail\", projectGroupId: \"<from task message>\", summary: \"<specific issues>\" })`\n- **QA refine:** `work_finish({ role: \"qa\", result: \"refine\", projectGroupId: \"<from task message>\", summary: \"<what needs human input>\" })`\n\nThe `projectGroupId` is included in your task message.\n\n### Filing Follow-Up Issues\n\nIf you discover unrelated bugs or needed improvements during your work, call `task_create` to file them:\n\n`task_create({ projectGroupId: \"<from task message>\", title: \"Bug: ...\", description: \"...\" })`\n\n### Tools You Should NOT Use\n\nThese are orchestrator-only tools. Do not call them:\n- `work_start`, `status`, `health`, `project_register`\n\n---\n\n## Orchestrator\n\nYou are a **development orchestrator** \u2014 a planner and dispatcher, not a coder. You receive tasks via Telegram, plan them, and use **DevClaw tools** to manage the full pipeline.\n\n### \u26A0\uFE0F Critical: You Do NOT Write Code\n\n**Never write code yourself.** All implementation work MUST go through the issue \u2192 worker pipeline:\n\n1. Create an issue via `task_create`\n2. Dispatch a DEV worker via `work_start`\n3. Let the worker handle implementation, git, and PRs\n\n**Why this matters:**\n- **Audit trail** \u2014 Every code change is tracked to an issue\n- **Tier selection** \u2014 Junior/medior/senior models match task complexity\n- **Parallelization** \u2014 Workers run in parallel, you stay free to plan\n- **QA pipeline** \u2014 Code goes through review before closing\n\n**What you CAN do directly:**\n- Planning, analysis, architecture discussions\n- Requirements gathering, clarifying scope\n- Creating and updating issues\n- Status checks and queue management\n- Answering questions about the codebase (reading, not writing)\n\n**What MUST go through a worker:**\n- Any code changes (edits, new files, refactoring)\n- Git operations (commits, branches, PRs)\n- Running tests in the codebase\n- Debugging that requires code changes\n\n### DevClaw Tools\n\nAll orchestration goes through these tools. You do NOT manually manage sessions, labels, or projects.json.\n\n| Tool | What it does |\n|---|---|\n| `project_register` | One-time project setup: creates labels, scaffolds role files, adds to projects.json |\n| `task_create` | Create issues from chat (bugs, features, tasks) |\n| `task_update` | Update issue title, description, or labels |\n| `status` | Task queue and worker state per project (lightweight dashboard) |\n| `health` | Scan worker health: zombies, stale workers, orphaned state. Pass fix=true to auto-fix |\n| `work_start` | End-to-end: label transition, level assignment, session create/reuse, dispatch with role instructions |\n| `work_finish` | End-to-end: label transition, state update, issue close/reopen. Ticks scheduler after completion. |\n\n### Pipeline Flow\n\n```\nPlanning \u2192 To Do \u2192 Doing \u2192 To Test \u2192 Testing \u2192 Done\n \u2193\n To Improve \u2192 Doing (fix cycle)\n \u2193\n Refining (human decision)\n```\n\nIssue labels are the single source of truth for task state.\n\n### Developer Assignment\n\nEvaluate each task and pass the appropriate developer level to `work_start`:\n\n- **junior** \u2014 trivial: typos, single-file fix, quick change\n- **medior** \u2014 standard: features, bug fixes, multi-file changes\n- **senior** \u2014 complex: architecture, system-wide refactoring, 5+ services\n- **reviewer** \u2014 QA: code inspection, validation, test runs\n\n### Picking Up Work\n\n1. Use `status` to see what's available\n2. Priority: `To Improve` (fix failures) > `To Test` (QA) > `To Do` (new work)\n3. Evaluate complexity, choose developer level\n4. Call `work_start` with `issueId`, `role`, `projectGroupId`, `level`\n5. Post the `announcement` from the tool response to Telegram\n\n### When Work Completes\n\nWorkers call `work_finish` themselves \u2014 the label transition, state update, and audit log happen atomically. After completion, `work_finish` ticks the scheduler to fill free slots:\n\n- DEV \"done\" \u2192 issue moves to \"To Test\" \u2192 scheduler dispatches QA\n- QA \"fail\" \u2192 issue moves to \"To Improve\" \u2192 scheduler dispatches DEV\n- QA \"pass\" \u2192 Done, no further dispatch\n- QA \"refine\" / blocked \u2192 needs human input\n\nThe response includes `tickPickups` showing any tasks that were auto-dispatched. Post announcements from the tool response to Telegram.\n\n### Prompt Instructions\n\nWorkers receive role-specific instructions appended to their task message. These are loaded from `projects/roles/<project-name>/<role>.md` in the workspace, falling back to `projects/roles/default/<role>.md` if no project-specific file exists. `project_register` scaffolds these files automatically \u2014 edit them to customize worker behavior per project.\n\n### Heartbeats\n\n**Do nothing.** The heartbeat service runs automatically as an internal interval-based process \u2014 zero LLM tokens. It handles health checks (zombie detection, stale workers) and queue dispatch (filling free worker slots by priority) every 60 seconds by default. Configure via `plugins.entries.devclaw.config.work_heartbeat` in openclaw.json.\n\n### Safety\n\n- **Never write code yourself** \u2014 always dispatch a DEV worker\n- Don't push to main directly\n- Don't force-push\n- Don't close issues without QA pass\n- Ask before architectural decisions affecting multiple projects\n";
8
8
  export declare const HEARTBEAT_MD_TEMPLATE = "# HEARTBEAT.md\n\nDo nothing. An internal token-free heartbeat service handles health checks and queue dispatch automatically.\n";
9
9
  //# sourceMappingURL=templates.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../lib/templates.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,wBAAwB,snCAwBpC,CAAC;AAEF,eAAO,MAAM,uBAAuB,8qBAanC,CAAC;AAEF,eAAO,MAAM,kBAAkB,ypLAkH9B,CAAC;AAEF,eAAO,MAAM,qBAAqB,qIAGjC,CAAC"}
1
+ {"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../lib/templates.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,wBAAwB,snCAwBpC,CAAC;AAEF,eAAO,MAAM,uBAAuB,8qBAanC,CAAC;AAEF,eAAO,MAAM,kBAAkB,i0NA8I9B,CAAC;AAEF,eAAO,MAAM,qBAAqB,qIAGjC,CAAC"}
@@ -85,7 +85,34 @@ These are orchestrator-only tools. Do not call them:
85
85
 
86
86
  ## Orchestrator
87
87
 
88
- You are a **development orchestrator**. You receive tasks via Telegram, plan them, and use **DevClaw tools** to manage the full pipeline.
88
+ You are a **development orchestrator** — a planner and dispatcher, not a coder. You receive tasks via Telegram, plan them, and use **DevClaw tools** to manage the full pipeline.
89
+
90
+ ### ⚠️ Critical: You Do NOT Write Code
91
+
92
+ **Never write code yourself.** All implementation work MUST go through the issue → worker pipeline:
93
+
94
+ 1. Create an issue via \`task_create\`
95
+ 2. Dispatch a DEV worker via \`work_start\`
96
+ 3. Let the worker handle implementation, git, and PRs
97
+
98
+ **Why this matters:**
99
+ - **Audit trail** — Every code change is tracked to an issue
100
+ - **Tier selection** — Junior/medior/senior models match task complexity
101
+ - **Parallelization** — Workers run in parallel, you stay free to plan
102
+ - **QA pipeline** — Code goes through review before closing
103
+
104
+ **What you CAN do directly:**
105
+ - Planning, analysis, architecture discussions
106
+ - Requirements gathering, clarifying scope
107
+ - Creating and updating issues
108
+ - Status checks and queue management
109
+ - Answering questions about the codebase (reading, not writing)
110
+
111
+ **What MUST go through a worker:**
112
+ - Any code changes (edits, new files, refactoring)
113
+ - Git operations (commits, branches, PRs)
114
+ - Running tests in the codebase
115
+ - Debugging that requires code changes
89
116
 
90
117
  ### DevClaw Tools
91
118
 
@@ -151,6 +178,7 @@ Workers receive role-specific instructions appended to their task message. These
151
178
 
152
179
  ### Safety
153
180
 
181
+ - **Never write code yourself** — always dispatch a DEV worker
154
182
  - Don't push to main directly
155
183
  - Don't force-push
156
184
  - Don't close issues without QA pass
@@ -1 +1 @@
1
- {"version":3,"file":"templates.js","sourceRoot":"","sources":["../../lib/templates.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,CAAC,MAAM,wBAAwB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;CAwBvC,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAG;;;;;;;;;;;;;CAatC,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkHjC,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG;;;CAGpC,CAAC"}
1
+ {"version":3,"file":"templates.js","sourceRoot":"","sources":["../../lib/templates.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,CAAC,MAAM,wBAAwB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;CAwBvC,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAG;;;;;;;;;;;;;CAatC,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8IjC,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG;;;CAGpC,CAAC"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * autoconfigure-models.ts — Tool for automatically configuring model assignments.
3
+ *
4
+ * Queries available authenticated models and intelligently assigns them to DevClaw roles.
5
+ */
6
+ import type { OpenClawPluginApi } from "openclaw/plugin-sdk";
7
+ import type { ToolContext } from "../types.js";
8
+ /**
9
+ * Create the autoconfigure_models tool.
10
+ */
11
+ export declare function createAutoConfigureModelsTool(api: OpenClawPluginApi): (ctx: ToolContext) => {
12
+ name: string;
13
+ label: string;
14
+ description: string;
15
+ parameters: {
16
+ type: string;
17
+ properties: {
18
+ preferProvider: {
19
+ type: string;
20
+ description: string;
21
+ };
22
+ };
23
+ };
24
+ execute(_id: string, params: Record<string, unknown>): Promise<import("@mariozechner/pi-agent-core").AgentToolResult<unknown>>;
25
+ };
26
+ //# sourceMappingURL=autoconfigure-models.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"autoconfigure-models.d.ts","sourceRoot":"","sources":["../../../lib/tools/autoconfigure-models.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAiC/C;;GAEG;AACH,wBAAgB,6BAA6B,CAAC,GAAG,EAAE,iBAAiB,IAC1D,KAAK,WAAW;;;;;;;;;;;;;iBAeH,MAAM,UAAU,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;EA4E7D"}
@@ -0,0 +1,110 @@
1
+ import { jsonResult } from "openclaw/plugin-sdk";
2
+ import { assignModels, formatAssignment, generateSetupInstructions, } from "../setup/smart-model-selector.js";
3
+ import { fetchAuthenticatedModels } from "../setup/model-fetcher.js";
4
+ /**
5
+ * Get available authenticated models from OpenClaw.
6
+ */
7
+ async function getAuthenticatedModels(api) {
8
+ try {
9
+ const models = fetchAuthenticatedModels();
10
+ // Map to the format expected by assignModels()
11
+ return models.map((m) => {
12
+ // Extract provider from key (format: provider/model-name)
13
+ const provider = m.key.split("/")[0] || "unknown";
14
+ return {
15
+ model: m.key,
16
+ provider,
17
+ authenticated: true,
18
+ };
19
+ });
20
+ }
21
+ catch (err) {
22
+ throw new Error(`Failed to get authenticated models: ${err.message}`);
23
+ }
24
+ }
25
+ /**
26
+ * Create the autoconfigure_models tool.
27
+ */
28
+ export function createAutoConfigureModelsTool(api) {
29
+ return (ctx) => ({
30
+ name: "autoconfigure_models",
31
+ label: "Auto-Configure Models",
32
+ description: "Automatically discover authenticated models and intelligently assign them to DevClaw roles based on capability tiers",
33
+ parameters: {
34
+ type: "object",
35
+ properties: {
36
+ preferProvider: {
37
+ type: "string",
38
+ description: "Optional: Prefer models from this provider (e.g., 'anthropic', 'openai')",
39
+ },
40
+ },
41
+ },
42
+ async execute(_id, params) {
43
+ try {
44
+ // Get all authenticated models
45
+ let authenticatedModels = await getAuthenticatedModels(api);
46
+ // Filter by preferred provider if specified
47
+ const preferProvider = params?.preferProvider;
48
+ if (preferProvider) {
49
+ const filtered = authenticatedModels.filter((m) => m.provider.toLowerCase() === preferProvider.toLowerCase());
50
+ if (filtered.length === 0) {
51
+ return jsonResult({
52
+ success: false,
53
+ error: `No authenticated models found for provider: ${preferProvider}`,
54
+ message: `❌ No authenticated models found for provider "${preferProvider}".\n\nAvailable providers: ${[...new Set(authenticatedModels.map((m) => m.provider))].join(", ")}`,
55
+ });
56
+ }
57
+ authenticatedModels = filtered;
58
+ }
59
+ // Intelligently assign models using current session context
60
+ const assignment = await assignModels(authenticatedModels, ctx.sessionKey);
61
+ if (!assignment) {
62
+ // No models available
63
+ const instructions = generateSetupInstructions();
64
+ return jsonResult({
65
+ success: false,
66
+ modelCount: 0,
67
+ message: instructions,
68
+ });
69
+ }
70
+ // Format the assignment
71
+ const table = formatAssignment(assignment);
72
+ const modelCount = authenticatedModels.length;
73
+ let message = `✅ Auto-configured models based on ${modelCount} authenticated model${modelCount === 1 ? "" : "s"}:\n\n`;
74
+ message += table;
75
+ message += "\n\n";
76
+ if (modelCount === 1) {
77
+ message += "ℹ️ Only one authenticated model found — assigned to all roles.";
78
+ }
79
+ else {
80
+ message += "ℹ️ Models assigned by capability tier (Tier 1 → senior, Tier 2 → medior/reviewer, Tier 3 → junior/tester).";
81
+ }
82
+ if (preferProvider) {
83
+ message += `\n📌 Filtered to provider: ${preferProvider}`;
84
+ }
85
+ message += "\n\n**Next step:** Pass this configuration to `setup` tool:\n";
86
+ message += "```javascript\n";
87
+ message += "setup({ models: <this-configuration> })\n";
88
+ message += "```";
89
+ return jsonResult({
90
+ success: true,
91
+ modelCount,
92
+ assignment,
93
+ models: assignment,
94
+ provider: preferProvider || "auto",
95
+ message,
96
+ });
97
+ }
98
+ catch (err) {
99
+ const errorMsg = err.message;
100
+ api.logger.error(`Auto-configure models error: ${errorMsg}`);
101
+ return jsonResult({
102
+ success: false,
103
+ error: errorMsg,
104
+ message: `❌ Failed to auto-configure models: ${errorMsg}`,
105
+ });
106
+ }
107
+ },
108
+ });
109
+ }
110
+ //# sourceMappingURL=autoconfigure-models.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"autoconfigure-models.js","sourceRoot":"","sources":["../../../lib/tools/autoconfigure-models.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,yBAAyB,GAE1B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAErE;;GAEG;AACH,KAAK,UAAU,sBAAsB,CACnC,GAAsB;IAEtB,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,wBAAwB,EAAE,CAAC;QAE1C,+CAA+C;QAC/C,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;YACtB,0DAA0D;YAC1D,MAAM,QAAQ,GAAG,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,SAAS,CAAC;YAClD,OAAO;gBACL,KAAK,EAAE,CAAC,CAAC,GAAG;gBACZ,QAAQ;gBACR,aAAa,EAAE,IAAI;aACpB,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,uCAAwC,GAAa,CAAC,OAAO,EAAE,CAAC,CAAC;IACnF,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,6BAA6B,CAAC,GAAsB;IAClE,OAAO,CAAC,GAAgB,EAAE,EAAE,CAAC,CAAC;QAC5B,IAAI,EAAE,sBAAsB;QAC5B,KAAK,EAAE,uBAAuB;QAC9B,WAAW,EACT,sHAAsH;QACxH,UAAU,EAAE;YACV,IAA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;QACH,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../../lib/tools/setup.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAI/C,wBAAgB,eAAe,CAAC,GAAG,EAAE,iBAAiB,IAC5C,KAAK,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAoEH,MAAM,UAAU,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;EAkD7D"}
1
+ {"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../../lib/tools/setup.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAI/C,wBAAgB,eAAe,CAAC,GAAG,EAAE,iBAAiB,IAC5C,KAAK,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAoEH,MAAM,UAAU,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;EAmD7D"}
@@ -87,7 +87,8 @@ export function createSetupTool(api) {
87
87
  if (result.bindingMigrated) {
88
88
  lines.push(`✅ Binding migrated: ${result.bindingMigrated.channel} (${result.bindingMigrated.from} → ${result.agentId})`, "");
89
89
  }
90
- lines.push("Models:", ...DEV_LEVELS.map((t) => ` dev.${t}: ${result.models.dev[t]}`), ...QA_LEVELS.map((t) => ` qa.${t}: ${result.models.qa[t]}`), "", "Files:", ...result.filesWritten.map((f) => ` ${f}`));
90
+ lines.push("Models:", ...DEV_LEVELS.map((t) => ` dev.${t}: ${result.models.dev[t]}`), ...QA_LEVELS.map((t) => ` qa.${t}: ${result.models.qa[t]}`), "");
91
+ lines.push("Files:", ...result.filesWritten.map((f) => ` ${f}`));
91
92
  if (result.warnings.length > 0)
92
93
  lines.push("", "Warnings:", ...result.warnings.map((w) => ` ${w}`));
93
94
  lines.push("", "Next: register a project, then create issues and pick them up.");
@@ -1 +1 @@
1
- {"version":3,"file":"setup.js","sourceRoot":"","sources":["../../../lib/tools/setup.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,OAAO,EAAE,QAAQ,EAAkB,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAEpE,MAAM,UAAU,eAAe,CAAC,GAAsB;IACpD,OAAO,CAAC,GAAgB,EAAE,EAAE,CAAC,CAAC;QAC5B,IAAI,EAAE,OAAO;QACb,KAAK,EAAE,OAAO;QACd,WAAW,EAAE,2MAA2M;QACxN,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,YAAY,EAAE;oBACZ,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,0DAA0D;iBAC7D;gBACD,cAAc,EAAE;oBACd,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,CAAC,UAAU,EAAE,UAAU,CAAC;oBAC9B,WAAW,EAAE,qDAAqD;iBACnE;gBACD,WAAW,EAAE;oBACX,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,+EAA+E;iBAClF;gBACD,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,qCAAqC;oBAClD,UAAU,EAAE;wBACV,GAAG,EAAE;4BACH,IAAI,EAAE,QAAQ;4BACd,WAAW,EAAE,wBAAwB;4BACrC,UAAU,EAAE;gCACV,MAAM,EAAE;oCACN,IAAI,EAAE,QAAQ;oCACd,WAAW,EAAE,YAAY,cAAc,CAA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CAAC;QACL,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
@@ -589,11 +589,13 @@ graph LR
589
589
  Z[Zombie cleanup]
590
590
  end
591
591
 
592
- subgraph "Orchestrator handles"
592
+ subgraph "Orchestrator handles (planning only)"
593
593
  MSG[Telegram announcements]
594
594
  HB[Heartbeat scheduling]
595
595
  DEC[Task prioritization]
596
596
  M[Developer assignment<br/>junior/medior/senior]
597
+ READ[Code reading for context]
598
+ PLAN[Requirements & planning]
597
599
  end
598
600
 
599
601
  subgraph "Sub-agent sessions handle"
@@ -609,6 +611,8 @@ graph LR
609
611
  end
610
612
  ```
611
613
 
614
+ **Key boundary:** The orchestrator is a planner and dispatcher — it never writes code. All implementation work (code edits, git operations, tests) must go through sub-agent sessions via the `task_create` → `work_start` pipeline. This ensures audit trails, tier selection, and QA review for every code change.
615
+
612
616
  ## IssueProvider abstraction
613
617
 
614
618
  All issue tracker operations go through the `IssueProvider` interface, defined in `lib/providers/provider.ts`. This abstraction allows DevClaw to support multiple issue trackers without changing tool logic.
@@ -15,8 +15,12 @@ Step-by-step setup: install the plugin, configure an agent, register projects, a
15
15
  ## Step 1: Install the plugin
16
16
 
17
17
  ```bash
18
- # Copy to extensions directory (auto-discovered on next restart)
19
- cp -r devclaw ~/.openclaw/extensions/
18
+ openclaw plugins install @laurentenhoor/devclaw
19
+ ```
20
+
21
+ Or for local development:
22
+ ```bash
23
+ openclaw plugins install -l ./devclaw
20
24
  ```
21
25
 
22
26
  Verify:
@@ -232,7 +236,7 @@ Change which model powers each level in `openclaw.json` — see [Configuration](
232
236
 
233
237
  | Responsibility | Who | Details |
234
238
  |---|---|---|
235
- | Plugin installation | You (once) | `cp -r devclaw ~/.openclaw/extensions/` |
239
+ | Plugin installation | You (once) | `openclaw plugins install @laurentenhoor/devclaw` |
236
240
  | Agent + workspace setup | Plugin (`setup`) | Creates agent, configures models, writes workspace files |
237
241
  | Channel binding migration | Plugin (`setup` with `migrateFrom`) | Automatically moves channel-wide bindings between agents |
238
242
  | Label setup | Plugin (`project_register`) | 8 labels, created idempotently via IssueProvider |
@@ -0,0 +1,55 @@
1
+ {
2
+ "id": "devclaw",
3
+ "name": "DevClaw",
4
+ "description": "Multi-project dev/qa pipeline orchestration for OpenClaw. Developer tiers, atomic task management, session health, and audit logging.",
5
+ "configSchema": {
6
+ "type": "object",
7
+ "properties": {
8
+ "models": {
9
+ "type": "object",
10
+ "description": "Model mapping per role and tier",
11
+ "properties": {
12
+ "dev": {
13
+ "type": "object",
14
+ "description": "Developer tier models",
15
+ "properties": {
16
+ "junior": { "type": "string" },
17
+ "medior": { "type": "string" },
18
+ "senior": { "type": "string" }
19
+ }
20
+ },
21
+ "qa": {
22
+ "type": "object",
23
+ "description": "QA tier models",
24
+ "properties": {
25
+ "reviewer": { "type": "string" },
26
+ "tester": { "type": "string" }
27
+ }
28
+ }
29
+ }
30
+ },
31
+ "projectExecution": {
32
+ "type": "string",
33
+ "enum": ["parallel", "sequential"],
34
+ "description": "Project execution mode. Default: parallel."
35
+ },
36
+ "notifications": {
37
+ "type": "object",
38
+ "description": "Per-event-type notification toggles. All default to true — set to false to suppress.",
39
+ "properties": {
40
+ "workerStart": { "type": "boolean" },
41
+ "workerComplete": { "type": "boolean" }
42
+ }
43
+ },
44
+ "work_heartbeat": {
45
+ "type": "object",
46
+ "description": "Token-free interval-based heartbeat service.",
47
+ "properties": {
48
+ "enabled": { "type": "boolean" },
49
+ "intervalSeconds": { "type": "number" },
50
+ "maxPickupsPerTick": { "type": "number" }
51
+ }
52
+ }
53
+ }
54
+ }
55
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@laurentenhoor/devclaw",
3
- "version": "0.1.0",
3
+ "version": "1.0.0",
4
4
  "description": "Multi-project dev/qa pipeline orchestration for OpenClaw",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -27,7 +27,7 @@
27
27
  },
28
28
  "openclaw": {
29
29
  "extensions": [
30
- "./index.ts"
30
+ "./dist/index.js"
31
31
  ]
32
32
  },
33
33
  "main": "./dist/index.js",
@@ -35,7 +35,8 @@
35
35
  "files": [
36
36
  "dist/",
37
37
  "roles/",
38
- "docs/"
38
+ "docs/",
39
+ "openclaw.plugin.json"
39
40
  ],
40
41
  "publishConfig": {
41
42
  "access": "public"
@@ -50,6 +51,7 @@
50
51
  "openclaw": ">=2026.0.0"
51
52
  },
52
53
  "devDependencies": {
53
- "typescript": "^5.8"
54
+ "@types/node": "^25.2.3",
55
+ "typescript": "^5.9.3"
54
56
  }
55
57
  }