@questionbase/deskfree 0.3.0-alpha.23 → 0.3.0-alpha.24
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/README.md +3 -6
- package/dist/index.d.ts +9 -55
- package/dist/index.js +83 -68
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/skills/deskfree/SKILL.md +110 -358
- package/skills/deskfree/references/tools.md +71 -82
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@questionbase/deskfree",
|
|
3
|
-
"version": "0.3.0-alpha.
|
|
3
|
+
"version": "0.3.0-alpha.24",
|
|
4
4
|
"description": "OpenClaw channel plugin for DeskFree — turns DeskFree into a messaging platform for OpenClaw AI agents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
package/skills/deskfree/SKILL.md
CHANGED
|
@@ -4,12 +4,12 @@ description: >
|
|
|
4
4
|
DeskFree task management and human-AI collaboration workflows.
|
|
5
5
|
Use when: creating tasks, managing work items, updating files,
|
|
6
6
|
communicating with humans through DeskFree, checking workspace state,
|
|
7
|
-
handling task lifecycle (
|
|
8
|
-
|
|
7
|
+
handling task lifecycle (pending → active → review → done),
|
|
8
|
+
updating ways of working, managing initiatives.
|
|
9
9
|
Do NOT use for: general project management advice without DeskFree tools,
|
|
10
10
|
OpenClaw configuration or gateway setup, non-DeskFree platforms (Jira, Asana, etc.),
|
|
11
11
|
direct file/code operations (use standard tools for those, create DeskFree tasks for tracking).
|
|
12
|
-
version:
|
|
12
|
+
version: 10.0.0
|
|
13
13
|
metadata: { 'openclaw': { 'emoji': '🏠' } }
|
|
14
14
|
---
|
|
15
15
|
|
|
@@ -17,73 +17,70 @@ metadata: { 'openclaw': { 'emoji': '🏠' } }
|
|
|
17
17
|
|
|
18
18
|
## ⚠️ Critical — Read First
|
|
19
19
|
|
|
20
|
-
###
|
|
20
|
+
### Status Model (memorize this)
|
|
21
21
|
|
|
22
22
|
```
|
|
23
|
-
|
|
24
|
-
deskfree_propose ───────────────────────────────────────────────────────────────┐
|
|
25
|
-
+ initiative → [human approves initiative in modal] → active │
|
|
26
|
-
[human rejects] → nothing created │
|
|
27
|
-
│
|
|
28
|
-
deskfree_propose → [human approves in modal] → bot → [start_task] → bot (is_working)
|
|
29
|
-
↑ │ │
|
|
30
|
-
| human approves/declines │ │
|
|
31
|
-
└──────────────────────────────────────────┘ │
|
|
32
|
-
│ │
|
|
33
|
-
[complete_task] │
|
|
34
|
-
↓ │
|
|
35
|
-
human │
|
|
36
|
-
│ │
|
|
37
|
-
[approve] │
|
|
38
|
-
↓ │
|
|
39
|
-
done ──→ [evaluate] ──┘
|
|
40
|
-
↓
|
|
41
|
-
globalWoW updated (always)
|
|
42
|
-
+ initiative updated (if task has initiative_id)
|
|
23
|
+
pending → active → review → done
|
|
43
24
|
```
|
|
44
25
|
|
|
45
|
-
-
|
|
46
|
-
-
|
|
47
|
-
-
|
|
48
|
-
-
|
|
49
|
-
- Both outcomes move to `human` — the human triages from there
|
|
26
|
+
- **pending** — Approved, waiting for bot to claim
|
|
27
|
+
- **active** — Bot claimed, runner working
|
|
28
|
+
- **review** — Bot submitted deliverable, waiting for human feedback
|
|
29
|
+
- **done** — Completed
|
|
50
30
|
|
|
51
31
|
### The Work Loop
|
|
52
32
|
|
|
53
33
|
```
|
|
54
|
-
1. Check state → deskfree_state — see tasks,
|
|
55
|
-
2. Propose plan → deskfree_propose — propose work for human approval
|
|
56
|
-
3. Claim a task → deskfree_start_task — read instructions +
|
|
34
|
+
1. Check state → deskfree_state — see tasks, initiatives, files, ways of working
|
|
35
|
+
2. Propose plan → deskfree_propose — propose work for human approval
|
|
36
|
+
3. Claim a task → deskfree_start_task — read instructions + context + fileContext
|
|
57
37
|
4. Do the work → deskfree_update_file — build linked file incrementally
|
|
58
|
-
5.
|
|
59
|
-
6. Complete → deskfree_complete_task — summary required for "done"
|
|
60
|
-
7. Evaluate → if approved tasks have pending WoW evaluation (update globalWoW + initiative)
|
|
38
|
+
5. Complete → deskfree_complete_task — with outcome + summary + learnings
|
|
61
39
|
```
|
|
62
40
|
|
|
63
|
-
### Three Rules
|
|
41
|
+
### Three Rules
|
|
64
42
|
|
|
65
|
-
1. **Always propose first.** Use `deskfree_propose` before starting ANY work. Nothing is created until human approves.
|
|
66
|
-
2. **Always check state first.** Call `deskfree_state` before proposing. Prevents duplicates
|
|
67
|
-
3. **Always complete tasks.** Never leave a task in `
|
|
43
|
+
1. **Always propose first.** Use `deskfree_propose` before starting ANY work. Nothing is created until human approves.
|
|
44
|
+
2. **Always check state first.** Call `deskfree_state` before proposing. Prevents duplicates.
|
|
45
|
+
3. **Always complete tasks.** Never leave a task in `active`. End with `deskfree_complete_task`.
|
|
68
46
|
|
|
69
47
|
---
|
|
70
48
|
|
|
71
|
-
##
|
|
49
|
+
## Tools
|
|
72
50
|
|
|
73
|
-
|
|
51
|
+
### Orchestrator (5 tools — main session)
|
|
74
52
|
|
|
75
|
-
|
|
53
|
+
| Tool | What it does |
|
|
54
|
+
|---|---|
|
|
55
|
+
| `deskfree_state` | Full workspace snapshot — tasks, done tasks, ways of working, initiatives, files |
|
|
56
|
+
| `deskfree_propose` | Propose a plan for human approval — tasks, initiatives, file links |
|
|
57
|
+
| `deskfree_send_message` | Message in task thread |
|
|
58
|
+
| `deskfree_reopen_task` | Reopen a done/review task back to pending |
|
|
59
|
+
| `deskfree_update_knowledge` | Update global ways of working or initiative content |
|
|
60
|
+
|
|
61
|
+
### Worker (5 tools — sub-agents)
|
|
76
62
|
|
|
77
|
-
|
|
78
|
-
|
|
63
|
+
| Tool | What it does |
|
|
64
|
+
|---|---|
|
|
65
|
+
| `deskfree_start_task` | Claim a pending task → active. Returns full context |
|
|
66
|
+
| `deskfree_update_file` | Update a linked file's content |
|
|
67
|
+
| `deskfree_complete_task` | Complete task with outcome, summary, and learnings |
|
|
68
|
+
| `deskfree_send_message` | Message in task thread |
|
|
69
|
+
| `deskfree_propose` | Propose follow-up tasks (workers have deepest context) |
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## Proposing Plans
|
|
74
|
+
|
|
75
|
+
Proposals are stored as message metadata — **no tasks, files, or initiatives are created until the human approves**.
|
|
79
76
|
|
|
80
77
|
### One Initiative Per Proposal
|
|
81
78
|
|
|
82
|
-
Each `deskfree_propose` call handles
|
|
79
|
+
Each `deskfree_propose` call handles one initiative (existing or new) or no initiative. Separate calls for separate initiatives.
|
|
83
80
|
|
|
84
|
-
###
|
|
81
|
+
### Substeps
|
|
85
82
|
|
|
86
|
-
Substeps are
|
|
83
|
+
Substeps are human-reviewable checklist items. The human can toggle each on/off before approving:
|
|
87
84
|
|
|
88
85
|
```javascript
|
|
89
86
|
deskfree_propose({
|
|
@@ -93,392 +90,147 @@ deskfree_propose({
|
|
|
93
90
|
substeps: [
|
|
94
91
|
"Review session management",
|
|
95
92
|
"Check CSRF protection",
|
|
96
|
-
"Verify rate limiting"
|
|
97
|
-
"Test token expiration handling"
|
|
93
|
+
"Verify rate limiting"
|
|
98
94
|
]
|
|
99
95
|
}]
|
|
100
96
|
})
|
|
101
97
|
```
|
|
102
98
|
|
|
103
|
-
|
|
104
|
-
```
|
|
105
|
-
☑ Task: Audit auth endpoints
|
|
106
|
-
☑ Review session management
|
|
107
|
-
☑ Check CSRF protection
|
|
108
|
-
☐ Verify rate limiting ← human unchecked this
|
|
109
|
-
☑ Test token expiration handling
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
Only checked substeps become part of the approved task.
|
|
113
|
-
|
|
114
|
-
### File Linking (Existing vs New)
|
|
99
|
+
### File Linking
|
|
115
100
|
|
|
116
101
|
```javascript
|
|
117
|
-
// Link
|
|
102
|
+
// Link existing file — bot receives content when claiming
|
|
118
103
|
deskfree_propose({
|
|
119
104
|
tasks: [{
|
|
120
105
|
title: "Update API docs",
|
|
121
|
-
instructions: "...",
|
|
122
106
|
file: { existingId: "FILE_abc123" }
|
|
123
107
|
}]
|
|
124
108
|
})
|
|
125
109
|
|
|
126
|
-
// Create
|
|
110
|
+
// Create new file on approval
|
|
127
111
|
deskfree_propose({
|
|
128
112
|
tasks: [{
|
|
129
113
|
title: "Write deployment runbook",
|
|
130
|
-
|
|
131
|
-
file: { name: "Deployment Runbook", description: "Step-by-step deployment guide" }
|
|
114
|
+
file: { name: "Deployment Runbook", description: "Step-by-step guide" }
|
|
132
115
|
}]
|
|
133
116
|
})
|
|
134
117
|
```
|
|
135
118
|
|
|
136
|
-
|
|
119
|
+
---
|
|
137
120
|
|
|
138
|
-
|
|
121
|
+
## Completing Tasks
|
|
139
122
|
|
|
140
|
-
**Research with file output:**
|
|
141
123
|
```javascript
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
title: "Analyze HumanLayer positioning",
|
|
148
|
-
instructions: "Research HumanLayer's product, pricing, and market position vs DeskFree...",
|
|
149
|
-
substeps: ["Review public docs and pricing", "Analyze feature comparison", "Draft positioning summary"],
|
|
150
|
-
file: { name: "HumanLayer Analysis", description: "Competitive analysis report" },
|
|
151
|
-
estimatedTokens: 20000
|
|
152
|
-
},
|
|
153
|
-
{
|
|
154
|
-
title: "Analyze CrewAI positioning",
|
|
155
|
-
instructions: "Research CrewAI's product and market position...",
|
|
156
|
-
substeps: ["Review public docs", "Analyze use cases", "Compare approach"],
|
|
157
|
-
file: { name: "CrewAI Analysis", description: "Competitive analysis report" },
|
|
158
|
-
estimatedTokens: 15000
|
|
159
|
-
}
|
|
160
|
-
]
|
|
124
|
+
deskfree_complete_task({
|
|
125
|
+
taskId: "T_abc123",
|
|
126
|
+
outcome: "review", // "review" | "done" | "blocked" | "cancelled"
|
|
127
|
+
summary: "Implemented auth hardening across all endpoints",
|
|
128
|
+
learnings: "Found that rate limiting needs to be per-IP, not per-session"
|
|
161
129
|
})
|
|
162
130
|
```
|
|
163
131
|
|
|
164
|
-
**
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
context: "Found during audit — session fixation vulnerability in /auth/login",
|
|
169
|
-
tasks: [{
|
|
170
|
-
title: "Fix session fixation in auth endpoint",
|
|
171
|
-
instructions: "Regenerate session ID after successful authentication...",
|
|
172
|
-
substeps: ["Add session regeneration", "Add regression test", "Verify in staging"],
|
|
173
|
-
estimatedTokens: 10000
|
|
174
|
-
}]
|
|
175
|
-
})
|
|
176
|
-
```
|
|
132
|
+
- **review** — Submit for human feedback. Human responds in thread, bot reads and decides.
|
|
133
|
+
- **done** — Work complete (summary required). Learnings integrated into WoW.
|
|
134
|
+
- **blocked** — Need human input. Send a message explaining WHY first.
|
|
135
|
+
- **cancelled** — Task no longer needed.
|
|
177
136
|
|
|
178
|
-
**
|
|
179
|
-
```javascript
|
|
180
|
-
deskfree_propose({
|
|
181
|
-
context: "Setting up weekly metrics report",
|
|
182
|
-
tasks: [{
|
|
183
|
-
title: "Weekly metrics report",
|
|
184
|
-
instructions: "Generate weekly performance metrics. This recurs weekly on Mondays. When completing, propose the next occurrence.",
|
|
185
|
-
substeps: ["Pull metrics from dashboard", "Generate summary", "Flag anomalies"],
|
|
186
|
-
file: { name: "Weekly Metrics", description: "Recurring weekly metrics report" },
|
|
187
|
-
scheduledFor: "2026-03-02T14:00:00Z"
|
|
188
|
-
}]
|
|
189
|
-
})
|
|
190
|
-
```
|
|
137
|
+
**Learnings** are only applied to ways of working when a task reaches `done`, not during `review` (human might reject).
|
|
191
138
|
|
|
192
139
|
---
|
|
193
140
|
|
|
194
|
-
##
|
|
141
|
+
## Conversational Review
|
|
195
142
|
|
|
196
|
-
|
|
197
|
-
- **What to do** — specific, actionable steps
|
|
198
|
-
- **Why** — referencing parent findings or file content when applicable
|
|
199
|
-
- **What "done" looks like** — clear acceptance criteria
|
|
200
|
-
- **Known constraints** — gotchas, dependencies, things to avoid
|
|
143
|
+
There are no approve/decline buttons. The flow is:
|
|
201
144
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
```
|
|
209
|
-
deskfree_state() → shows files: [{fileId, name, description, version, updatedAt}, ...]
|
|
210
|
-
|
|
211
|
-
deskfree_start_task(taskId) → if task.fileId, returns fileContext: {
|
|
212
|
-
fileId, name, description, content, contentFormat, version
|
|
213
|
-
}
|
|
214
|
-
```
|
|
215
|
-
|
|
216
|
-
### Creating Files
|
|
217
|
-
|
|
218
|
-
```javascript
|
|
219
|
-
// Option 1: Pre-create when proposing a task (created on approval)
|
|
220
|
-
deskfree_propose({
|
|
221
|
-
tasks: [{
|
|
222
|
-
title: "Write API documentation",
|
|
223
|
-
instructions: "...",
|
|
224
|
-
file: { name: "API Reference", description: "Full API reference documentation" }
|
|
225
|
-
}]
|
|
226
|
-
})
|
|
227
|
-
|
|
228
|
-
// Option 2: Create a file directly during work
|
|
229
|
-
deskfree_create_file({
|
|
230
|
-
name: "Deployment Runbook",
|
|
231
|
-
description: "Step-by-step deployment guide",
|
|
232
|
-
content: "# Deployment Runbook\n\n...",
|
|
233
|
-
contentFormat: "markdown"
|
|
234
|
-
})
|
|
235
|
-
```
|
|
236
|
-
|
|
237
|
-
### Updating Files
|
|
238
|
-
|
|
239
|
-
```javascript
|
|
240
|
-
// Always send the full current content — each call replaces the previous version
|
|
241
|
-
deskfree_update_file({
|
|
242
|
-
fileId: "F_abc123",
|
|
243
|
-
content: "# Full document...",
|
|
244
|
-
contentFormat: "markdown" // or "html"
|
|
245
|
-
})
|
|
246
|
-
```
|
|
247
|
-
|
|
248
|
-
**Build incrementally** — update the file early and often. A half-complete file is infinitely better than none if you're interrupted.
|
|
249
|
-
|
|
250
|
-
### File Format Choice
|
|
251
|
-
|
|
252
|
-
| Format | Use when |
|
|
253
|
-
|---|---|
|
|
254
|
-
| `markdown` (default) | Text reports, specs, documentation, analysis, code snippets |
|
|
255
|
-
| `html` | Rich web content: dashboards, styled reports, interactive tables |
|
|
145
|
+
1. Bot completes task with outcome `review`
|
|
146
|
+
2. Human responds in the task thread with feedback
|
|
147
|
+
3. Bot reads feedback and either:
|
|
148
|
+
- Continues working (task stays active)
|
|
149
|
+
- Completes with outcome `done`
|
|
150
|
+
- Reopens if major rework needed
|
|
256
151
|
|
|
257
152
|
---
|
|
258
153
|
|
|
259
|
-
##
|
|
154
|
+
## Ways of Working
|
|
260
155
|
|
|
261
|
-
|
|
156
|
+
A single versioned markdown document per bot. Updated via `deskfree_update_knowledge` (orchestrator only — single writer avoids version conflicts).
|
|
262
157
|
|
|
263
|
-
|
|
158
|
+
Workers pass `learnings` in `complete_task`. When a task reaches `done`, the orchestrator integrates learnings into WoW via `update_knowledge`.
|
|
264
159
|
|
|
265
|
-
|
|
266
|
-
On every deskfree_propose call, ask yourself:
|
|
160
|
+
---
|
|
267
161
|
|
|
268
|
-
|
|
269
|
-
→ Yes: pass the initiative ID as a string
|
|
270
|
-
→ No, but this is part of a bigger theme: pass { title, content } to create new
|
|
271
|
-
→ No, and it's a one-off task: omit initiative (defaults to General)
|
|
272
|
-
```
|
|
162
|
+
## Initiatives
|
|
273
163
|
|
|
274
|
-
|
|
164
|
+
Long-lived areas of focus. Proposed via `deskfree_propose`:
|
|
275
165
|
|
|
276
166
|
```javascript
|
|
277
|
-
// Link to existing
|
|
167
|
+
// Link to existing
|
|
278
168
|
deskfree_propose({
|
|
279
169
|
initiative: "INI_abc123",
|
|
280
|
-
tasks: [
|
|
170
|
+
tasks: [...]
|
|
281
171
|
})
|
|
282
172
|
|
|
283
|
-
// Create new
|
|
173
|
+
// Create new
|
|
284
174
|
deskfree_propose({
|
|
285
|
-
initiative: {
|
|
286
|
-
|
|
287
|
-
content: "# Auth Hardening\n\n## Current State\nNeed to improve auth security.\n\n## Next Priorities\n1. Audit all endpoints\n2. Address findings"
|
|
288
|
-
},
|
|
289
|
-
context: "Starting security improvement initiative based on recent audit findings.",
|
|
290
|
-
tasks: [
|
|
291
|
-
{ title: "Audit auth endpoints", instructions: "...", estimatedTokens: 20000 },
|
|
292
|
-
{ title: "Add rate limiting", instructions: "...", estimatedTokens: 15000 }
|
|
293
|
-
]
|
|
175
|
+
initiative: { title: "Auth Hardening", content: "# Auth Hardening\n\n..." },
|
|
176
|
+
tasks: [...]
|
|
294
177
|
})
|
|
295
178
|
```
|
|
296
179
|
|
|
297
180
|
---
|
|
298
181
|
|
|
299
|
-
##
|
|
300
|
-
|
|
301
|
-
Ways of Working is a **single versioned markdown document** per bot that evolves as you complete tasks.
|
|
302
|
-
|
|
303
|
-
### Evaluation Flow — Dual Output
|
|
304
|
-
|
|
305
|
-
When a human approves a task, it enters `pendingEvaluations`. Evaluation has **two independent outputs**:
|
|
306
|
-
|
|
307
|
-
```
|
|
308
|
-
1. deskfree_claim_evaluation(taskId)
|
|
309
|
-
→ returns: task + messages + waysOfWorking + initiative (if task has initiative_id)
|
|
310
|
-
|
|
311
|
-
2. Review the task summary, messages, and any file output
|
|
312
|
-
|
|
313
|
-
3. Ask yourself:
|
|
314
|
-
"Did I learn something about HOW we work that applies everywhere?"
|
|
315
|
-
→ Yes: update globalWoW
|
|
316
|
-
"Did I learn something about WHERE this initiative stands?"
|
|
317
|
-
→ Yes: update initiative content
|
|
318
|
-
|
|
319
|
-
4. deskfree_submit_evaluation({ taskId, reasoning, globalWoW, initiative })
|
|
320
|
-
```
|
|
321
|
-
|
|
322
|
-
---
|
|
323
|
-
|
|
324
|
-
## Validation Gates
|
|
325
|
-
|
|
326
|
-
### Pre-Flight (before ANY work)
|
|
327
|
-
|
|
328
|
-
- [ ] Called `deskfree_state` — confirmed it returned data
|
|
329
|
-
- [ ] Read `waysOfWorking` if present — apply established patterns
|
|
330
|
-
- [ ] Read `initiatives` if present — check for active initiatives
|
|
331
|
-
- [ ] Checked `files` list — know what persistent files already exist
|
|
332
|
-
- [ ] Checked for existing tasks that match intent — no duplicates
|
|
333
|
-
- [ ] Proposed via `deskfree_propose` — with initiative, substeps, file links as appropriate
|
|
334
|
-
- [ ] Once approved: called `deskfree_start_task` — confirmed task moved to `bot` (is_working=true)
|
|
335
|
-
- [ ] If task has `fileContext` — read the existing file content before starting work
|
|
336
|
-
|
|
337
|
-
### Mid-Work
|
|
338
|
-
|
|
339
|
-
- [ ] File updated immediately after starting task (not waiting until end)
|
|
340
|
-
- [ ] If blocked: sent message explaining WHY before calling `complete_task` with `blocked`
|
|
341
|
-
|
|
342
|
-
### Pre-Completion
|
|
343
|
-
|
|
344
|
-
- [ ] File content is non-empty and meaningful (if task produces a file)
|
|
345
|
-
- [ ] Called `deskfree_complete_task` with a clear `summary`
|
|
346
|
-
- [ ] If sub-agent: terminated after completion (one task per sub-agent)
|
|
182
|
+
## Working with Files
|
|
347
183
|
|
|
348
|
-
|
|
184
|
+
Files are persistent documents owned by a bot.
|
|
349
185
|
|
|
350
|
-
-
|
|
186
|
+
- **Creating:** Via `deskfree_propose` with `file: { name, description }` (created on approval)
|
|
187
|
+
- **Updating:** `deskfree_update_file` — always send full content (replaces previous version)
|
|
188
|
+
- **Formats:** `markdown` (default) or `html` (for rich web content)
|
|
189
|
+
- **Build incrementally** — update early and often. Partial > nothing.
|
|
351
190
|
|
|
352
191
|
---
|
|
353
192
|
|
|
354
|
-
##
|
|
355
|
-
|
|
356
|
-
### Orchestrator Flow (main session)
|
|
357
|
-
|
|
358
|
-
```
|
|
359
|
-
1. deskfree_state → assess workspace
|
|
360
|
-
2. deskfree_propose → propose plan (one initiative per call)
|
|
361
|
-
3. deskfree_start_task → claim approved task
|
|
362
|
-
4. deskfree_update_file → build linked file incrementally
|
|
363
|
-
5. deskfree_propose → propose follow-ups if needed
|
|
364
|
-
6. deskfree_complete_task → complete with outcome done or blocked
|
|
365
|
-
```
|
|
366
|
-
|
|
367
|
-
### Sub-Agent Flow
|
|
193
|
+
## Sub-Agent Pattern
|
|
368
194
|
|
|
369
195
|
```
|
|
370
|
-
Orchestrator: deskfree_propose → (human approves) →
|
|
371
|
-
Sub-agent:
|
|
196
|
+
Orchestrator: deskfree_state → deskfree_propose → (human approves) → spawn sub-agent
|
|
197
|
+
Sub-agent: deskfree_start_task → deskfree_update_file → deskfree_complete_task → terminate
|
|
372
198
|
```
|
|
373
199
|
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
## Recurrence — Natural Language + scheduledFor
|
|
379
|
-
|
|
380
|
-
Recurrence is handled through task instructions + `scheduledFor`. Document the pattern in instructions, set the first occurrence, propagate on completion by proposing the next occurrence.
|
|
381
|
-
|
|
382
|
-
---
|
|
383
|
-
|
|
384
|
-
## Messaging
|
|
385
|
-
|
|
386
|
-
**Normal replies:** Just respond — the channel handles routing automatically.
|
|
387
|
-
|
|
388
|
-
**Use `deskfree_send_message` only for:**
|
|
389
|
-
- Progress updates during task execution
|
|
390
|
-
- Questions needing human input mid-task
|
|
391
|
-
- Status reports for long-running tasks
|
|
200
|
+
- One task per sub-agent
|
|
201
|
+
- Sub-agent calls `deskfree_start_task` (enables cost attribution via runnerId)
|
|
202
|
+
- Orchestrator never claims tasks directly
|
|
392
203
|
|
|
393
204
|
---
|
|
394
205
|
|
|
395
206
|
## Decision Tree
|
|
396
207
|
|
|
397
|
-
### Heartbeat
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
3. `bot` tasks? → `deskfree_start_task` + spawn sub-agents
|
|
402
|
-
4. `bot` (is_working=true) with no active sub-agent? → Complete as blocked or resume
|
|
208
|
+
### Heartbeat
|
|
209
|
+
1. `deskfree_state` → get snapshot
|
|
210
|
+
2. `pending` tasks? → spawn sub-agents to claim them
|
|
211
|
+
3. `active` tasks with no active sub-agent? → complete as blocked or resume
|
|
403
212
|
|
|
404
213
|
### Human Gives You Work
|
|
405
|
-
|
|
406
214
|
1. `deskfree_state` → check existing tasks + initiatives + files
|
|
407
|
-
2.
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
5. Work → `deskfree_update_file` incrementally
|
|
412
|
-
6. `deskfree_complete_task` → outcome `done` (with summary) or `blocked`
|
|
413
|
-
|
|
414
|
-
---
|
|
415
|
-
|
|
416
|
-
## Tools Reference
|
|
417
|
-
|
|
418
|
-
### Orchestrator (9 tools)
|
|
419
|
-
|
|
420
|
-
| Tool | What it does |
|
|
421
|
-
|---|---|
|
|
422
|
-
| `deskfree_state` | Full workspace snapshot — tasks, done tasks, ways of working, initiatives, files, pending evaluations |
|
|
423
|
-
| `deskfree_propose` | Propose a plan for human approval — one initiative per call, with substeps and file links |
|
|
424
|
-
| `deskfree_start_task` | Claim task → `bot` (is_working=true), returns full context + fileContext |
|
|
425
|
-
| `deskfree_update_file` | Update a linked file's content incrementally |
|
|
426
|
-
| `deskfree_create_file` | Create a new persistent file |
|
|
427
|
-
| `deskfree_complete_task` | Mark done (summary required) or blocked → `human` |
|
|
428
|
-
| `deskfree_send_message` | Message in task thread |
|
|
429
|
-
| `deskfree_claim_evaluation` | Claim a pending evaluation |
|
|
430
|
-
| `deskfree_submit_evaluation` | Submit evaluation with globalWoW + initiative outputs |
|
|
431
|
-
|
|
432
|
-
### Worker (7 tools — sub-agents only)
|
|
433
|
-
|
|
434
|
-
`deskfree_update_file`, `deskfree_create_file`, `deskfree_complete_task`, `deskfree_send_message`, `deskfree_propose`, `deskfree_claim_evaluation`, `deskfree_submit_evaluation`
|
|
215
|
+
2. `deskfree_propose` → with context, substeps, file links, initiative
|
|
216
|
+
3. Human approves → spawn sub-agent → `deskfree_start_task`
|
|
217
|
+
4. Work → `deskfree_update_file` incrementally
|
|
218
|
+
5. `deskfree_complete_task`
|
|
435
219
|
|
|
436
220
|
---
|
|
437
221
|
|
|
438
222
|
## Error Handling
|
|
439
223
|
|
|
440
|
-
| Error |
|
|
441
|
-
|
|
442
|
-
| `
|
|
443
|
-
|
|
|
444
|
-
|
|
|
445
|
-
| 401 Unauthorized | Bot token invalid | Check channel configuration. Do not retry. |
|
|
224
|
+
| Error | Action |
|
|
225
|
+
|---|---|
|
|
226
|
+
| 404 on `start_task` | Task not pending or doesn't exist. Call `deskfree_state`, try another. |
|
|
227
|
+
| 409 on `start_task` | Already claimed. Call `deskfree_state`, pick a different task. |
|
|
228
|
+
| Empty `deskfree_state` | No tasks exist. Propose if appropriate. **Don't retry in a loop.** |
|
|
446
229
|
|
|
447
|
-
### Recovery
|
|
230
|
+
### Recovery
|
|
448
231
|
|
|
449
232
|
If anything goes wrong mid-task:
|
|
450
|
-
1.
|
|
451
|
-
2.
|
|
452
|
-
3.
|
|
453
|
-
4. **Never leave a task stranded in `
|
|
454
|
-
|
|
455
|
-
---
|
|
456
|
-
|
|
457
|
-
## Task Title Examples
|
|
458
|
-
|
|
459
|
-
**Good:** "Research competitor HumanLayer", "Fix auth timeout in Safari", "Write API docs for /users"
|
|
460
|
-
|
|
461
|
-
**Bad:** "Do some research on a competitor", "There's a bug that needs fixing"
|
|
462
|
-
|
|
463
|
-
---
|
|
464
|
-
|
|
465
|
-
## Best Practices
|
|
466
|
-
|
|
467
|
-
### ✅ Do This
|
|
468
|
-
- Update files early and often — shows progress, survives interruptions
|
|
469
|
-
- Use descriptive commit-style titles
|
|
470
|
-
- Send progress messages for long tasks
|
|
471
|
-
- Provide meaningful summary on done
|
|
472
|
-
- Include substeps for multi-step tasks — gives human granular control
|
|
473
|
-
|
|
474
|
-
### ❌ Don't Do This
|
|
475
|
-
- Leave tasks in `bot` (is_working=true)
|
|
476
|
-
- Retry `deskfree_state` in loops
|
|
477
|
-
- Start multiple sub-agents per task
|
|
478
|
-
- Update file only at the end
|
|
479
|
-
- Skip the context field in proposals — explain your reasoning
|
|
480
|
-
|
|
481
|
-
## Human Review Outcomes
|
|
482
|
-
|
|
483
|
-
- **Approve** → task moves to `done`. Creates pending evaluation for ways-of-working update.
|
|
484
|
-
- **Decline / request changes** → task returns to `bot` with feedback. Restart it.
|
|
233
|
+
1. `deskfree_send_message` — explain what happened
|
|
234
|
+
2. `deskfree_update_file` — save partial content
|
|
235
|
+
3. `deskfree_complete_task` with outcome `blocked`
|
|
236
|
+
4. **Never leave a task stranded in `active`**
|