@questionbase/deskfree 0.3.0-alpha.21 → 0.3.0-alpha.22
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 +24 -3
- package/dist/index.d.ts +66 -28
- package/dist/index.js +466 -401
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/skills/deskfree/SKILL.md +225 -103
- package/skills/deskfree/references/tools.md +43 -40
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.22",
|
|
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
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
name: deskfree
|
|
3
3
|
description: >
|
|
4
4
|
DeskFree task management and human-AI collaboration workflows.
|
|
5
|
-
Use when: creating tasks, managing work items, updating
|
|
5
|
+
Use when: creating tasks, managing work items, updating files,
|
|
6
6
|
communicating with humans through DeskFree, checking workspace state,
|
|
7
7
|
handling task lifecycle (start → work → complete → review),
|
|
8
8
|
evaluating completed tasks, 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: 8.0.0
|
|
13
13
|
metadata: { 'openclaw': { 'emoji': '🏠' } }
|
|
14
14
|
---
|
|
15
15
|
|
|
@@ -42,7 +42,7 @@ suggest_tasks → [human approves] → bot → [start_task] → bot (is_working)
|
|
|
42
42
|
+ initiative updated (if task has initiative_id)
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
- `complete_task` outcome `done` = work complete
|
|
45
|
+
- `complete_task` outcome `done` = work complete (summary required)
|
|
46
46
|
- `complete_task` outcome `blocked` = need human input (send message FIRST explaining why)
|
|
47
47
|
- Both outcomes move to `human` — the human triages from there
|
|
48
48
|
- When human approves (`done`), a pending evaluation is created for ways-of-working update
|
|
@@ -50,42 +50,56 @@ suggest_tasks → [human approves] → bot → [start_task] → bot (is_working)
|
|
|
50
50
|
### The Work Loop
|
|
51
51
|
|
|
52
52
|
```
|
|
53
|
-
1. Check state → deskfree_state — see tasks, active initiatives, pending evaluations
|
|
54
|
-
2. Suggest tasks → deskfree_suggest_tasks — propose work + optional initiative suggestions
|
|
55
|
-
3. Claim a task → deskfree_start_task — read instructions + parent context
|
|
56
|
-
4. Do the work →
|
|
57
|
-
5. Suggest follow-ups → if work reveals more to do, suggest them (link to initiative)
|
|
58
|
-
6. Complete →
|
|
53
|
+
1. Check state → deskfree_state — see tasks, active initiatives, files, pending evaluations
|
|
54
|
+
2. Suggest tasks → deskfree_suggest_tasks — propose work + optional initiative + file suggestions
|
|
55
|
+
3. Claim a task → deskfree_start_task — read instructions + parent context + fileContext
|
|
56
|
+
4. Do the work → deskfree_update_file — build linked file incrementally
|
|
57
|
+
5. Suggest follow-ups → if work reveals more to do, suggest them via deskfree_suggest_tasks (link to initiative)
|
|
58
|
+
6. Complete → deskfree_complete_task — summary required for "done"
|
|
59
59
|
7. Evaluate → if approved tasks have pending WoW evaluation (update globalWoW + initiative)
|
|
60
60
|
```
|
|
61
61
|
|
|
62
62
|
### Three Rules That Break Everything If Ignored
|
|
63
63
|
|
|
64
64
|
1. **Always suggest first.** Use `deskfree_suggest_tasks` before starting ANY work. Tasks go through human approval. No exceptions.
|
|
65
|
-
2. **Always check state first.** Call `deskfree_state` before suggesting tasks. Prevents duplicates, shows active initiatives.
|
|
66
|
-
3. **Always complete tasks.** Never leave a task in `bot` (is_working=true). End with `
|
|
65
|
+
2. **Always check state first.** Call `deskfree_state` before suggesting tasks. Prevents duplicates, shows active initiatives and files.
|
|
66
|
+
3. **Always complete tasks.** Never leave a task in `bot` (is_working=true). End with `deskfree_complete_task` — outcome `done` or `blocked`.
|
|
67
67
|
|
|
68
68
|
### Writing Great Instructions
|
|
69
69
|
|
|
70
70
|
Write instructions as if briefing a contractor who has never seen the codebase. Include:
|
|
71
71
|
- **What to do** — specific, actionable steps
|
|
72
|
-
- **Why** — referencing parent findings or
|
|
72
|
+
- **Why** — referencing parent findings or file content when applicable
|
|
73
73
|
- **What "done" looks like** — clear acceptance criteria
|
|
74
74
|
- **Known constraints** — gotchas, dependencies, things to avoid
|
|
75
75
|
|
|
76
|
-
###
|
|
76
|
+
### File-Based Work Output
|
|
77
77
|
|
|
78
|
-
**
|
|
78
|
+
**Work that produces persistent documents should use files.** A file persists beyond the task — it becomes the lasting artifact of your work.
|
|
79
|
+
|
|
80
|
+
**When to use files:**
|
|
81
|
+
- Writing specs, runbooks, reports, documentation
|
|
82
|
+
- Any output a human will reference after the task closes
|
|
83
|
+
- Output that follow-up tasks will build on
|
|
84
|
+
|
|
85
|
+
**How to link files to tasks:**
|
|
86
|
+
- Use `newFile` in `deskfree_suggest_tasks` to pre-create a file when you know the task will produce one
|
|
87
|
+
- Use `fileId` to link an existing file to a new task
|
|
88
|
+
- When claiming a task with a linked file, its current content is in `fileContext` — read it before starting work
|
|
89
|
+
|
|
90
|
+
**Completing a task:**
|
|
91
|
+
- Provide a clear `summary` of what was accomplished (required for outcome `done`)
|
|
92
|
+
- If the task updated a file, mention the file name/ID in the summary
|
|
79
93
|
|
|
80
94
|
### Suggesting Follow-ups
|
|
81
95
|
|
|
82
96
|
When completing, always consider: does this work reveal follow-up tasks? If yes, suggest them. Your suggestions are strongest at this moment because you have full context.
|
|
83
97
|
|
|
84
|
-
|
|
98
|
+
Call `deskfree_suggest_tasks` before or after completing — pass `parentTaskId` to link follow-ups to the current task. Estimate token cost per suggestion — consider how many files to read, how much reasoning, how much output.
|
|
85
99
|
|
|
86
100
|
### Building the Chain
|
|
87
101
|
|
|
88
|
-
You're not just doing tasks — you're building a chain. The instructions you write become someone else's brief. The
|
|
102
|
+
You're not just doing tasks — you're building a chain. The instructions you write become someone else's brief. The files you produce become someone else's context. Write both with care.
|
|
89
103
|
|
|
90
104
|
### Auto-Threading
|
|
91
105
|
|
|
@@ -95,6 +109,67 @@ The task sidebar is your human's window into your work — every message appears
|
|
|
95
109
|
|
|
96
110
|
---
|
|
97
111
|
|
|
112
|
+
## Working with Files
|
|
113
|
+
|
|
114
|
+
Files are persistent documents owned by a bot that live across tasks.
|
|
115
|
+
|
|
116
|
+
```
|
|
117
|
+
deskfree_state() → shows files: [{fileId, name, description, version, updatedAt}, ...]
|
|
118
|
+
|
|
119
|
+
deskfree_start_task(taskId) → if task.fileId, returns fileContext: {
|
|
120
|
+
fileId, name, description, content, contentFormat, version
|
|
121
|
+
}
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### Creating Files
|
|
125
|
+
|
|
126
|
+
```javascript
|
|
127
|
+
// Option 1: Pre-create when suggesting a task
|
|
128
|
+
deskfree_suggest_tasks({
|
|
129
|
+
suggestions: [{
|
|
130
|
+
title: "Write API documentation",
|
|
131
|
+
instructions: "...",
|
|
132
|
+
newFile: {
|
|
133
|
+
name: "API Reference",
|
|
134
|
+
description: "Full API reference documentation for v2 endpoints"
|
|
135
|
+
}
|
|
136
|
+
}]
|
|
137
|
+
})
|
|
138
|
+
// → file is created and linked to the task
|
|
139
|
+
|
|
140
|
+
// Option 2: Create a file directly during work
|
|
141
|
+
deskfree_create_file({
|
|
142
|
+
name: "Deployment Runbook",
|
|
143
|
+
description: "Step-by-step deployment guide",
|
|
144
|
+
content: "# Deployment Runbook\n\n...",
|
|
145
|
+
contentFormat: "markdown"
|
|
146
|
+
})
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### Updating Files
|
|
150
|
+
|
|
151
|
+
```javascript
|
|
152
|
+
// Always send the full current content — each call replaces the previous version
|
|
153
|
+
deskfree_update_file({
|
|
154
|
+
fileId: "F_abc123",
|
|
155
|
+
content: "# Full document...",
|
|
156
|
+
contentFormat: "markdown" // or "html"
|
|
157
|
+
})
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
**Build incrementally** — update the file early and often. A half-complete file is infinitely better than none if you're interrupted.
|
|
161
|
+
|
|
162
|
+
### File Format Choice
|
|
163
|
+
|
|
164
|
+
| Format | Use when |
|
|
165
|
+
|---|---|
|
|
166
|
+
| `markdown` (default) | Text reports, specs, documentation, analysis, code snippets |
|
|
167
|
+
| `html` | Rich web content: dashboards, styled reports, interactive tables |
|
|
168
|
+
|
|
169
|
+
HTML files are rendered in a **sandboxed iframe**. Use `format="html"` when layout and styling matter for the human's review.
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
98
173
|
## Initiatives — Long-Lived Areas of Focus
|
|
99
174
|
|
|
100
175
|
Initiatives answer **"what are we working on and why"** while Ways of Working answers **"how do we work."**
|
|
@@ -105,6 +180,8 @@ Initiatives answer **"what are we working on and why"** while Ways of Working an
|
|
|
105
180
|
| **Initiative Content** | A versioned markdown doc — current state, approach, next priorities |
|
|
106
181
|
| **Task → Initiative link** | Set `initiativeId` on suggestions to link tasks to an initiative |
|
|
107
182
|
|
|
183
|
+
**Default initiative:** Every bot has a "General" initiative for uncategorized work. Tasks without an explicit `initiativeId` are automatically linked to it.
|
|
184
|
+
|
|
108
185
|
### When to Propose a New Initiative
|
|
109
186
|
|
|
110
187
|
```
|
|
@@ -113,7 +190,7 @@ On every suggest_tasks call, ask yourself:
|
|
|
113
190
|
"Does an active initiative exist that this work belongs to?"
|
|
114
191
|
→ Yes: set initiativeId on the relevant suggestions
|
|
115
192
|
→ No, but this is part of a bigger theme: add an initiativeSuggestion
|
|
116
|
-
→ No, and it's a one-off task: no initiative needed
|
|
193
|
+
→ No, and it's a one-off task: no initiative needed (defaults to General)
|
|
117
194
|
```
|
|
118
195
|
|
|
119
196
|
### Initiative Suggestion Flow
|
|
@@ -178,7 +255,7 @@ When a human approves a task, it enters `pendingEvaluations` in state.get. Evalu
|
|
|
178
255
|
1. deskfree_claim_evaluation(taskId)
|
|
179
256
|
→ returns: task + messages + waysOfWorking + initiative (if task has initiative_id)
|
|
180
257
|
|
|
181
|
-
2.
|
|
258
|
+
2. Review the task summary, messages, and any file output
|
|
182
259
|
|
|
183
260
|
3. Ask yourself:
|
|
184
261
|
"Did I learn something about HOW we work that applies everywhere?"
|
|
@@ -217,7 +294,7 @@ When a human approves a task, it enters `pendingEvaluations` in state.get. Evalu
|
|
|
217
294
|
Task "Audit auth endpoints" (linked to "Auth Hardening" initiative) is approved.
|
|
218
295
|
|
|
219
296
|
claim_evaluation → returns:
|
|
220
|
-
task (with
|
|
297
|
+
task (with summary: "Found 3 critical issues: session fixation, weak CSRF, no rate limiting")
|
|
221
298
|
waysOfWorking: "..."
|
|
222
299
|
initiative: { id: "init_abc", title: "Auth Hardening", content: "No audit done yet." }
|
|
223
300
|
|
|
@@ -248,21 +325,23 @@ submit_evaluation({
|
|
|
248
325
|
- [ ] Called `deskfree_state` — confirmed it returned data (not empty/error)
|
|
249
326
|
- [ ] Read `waysOfWorking` if present — apply established patterns
|
|
250
327
|
- [ ] Read `initiatives` if present — check for active initiatives this work belongs to
|
|
328
|
+
- [ ] Checked `files` list — know what persistent files already exist
|
|
251
329
|
- [ ] Checked for existing tasks that match intent — no duplicates
|
|
252
|
-
- [ ] Suggested a task via `deskfree_suggest_tasks` — with `initiativeId` if linking to existing initiative, or `initiativeSuggestions` if proposing new one
|
|
330
|
+
- [ ] Suggested a task via `deskfree_suggest_tasks` — with `initiativeId` if linking to existing initiative, or `initiativeSuggestions` if proposing new one, and `newFile` if task will produce a document
|
|
253
331
|
- [ ] Once approved: called `deskfree_start_task` — confirmed task moved to `bot` (is_working=true)
|
|
332
|
+
- [ ] If task has `fileContext` — read the existing file content before starting work
|
|
254
333
|
|
|
255
334
|
### Mid-Work
|
|
256
335
|
|
|
257
|
-
- [ ]
|
|
258
|
-
- [ ] `
|
|
336
|
+
- [ ] File updated immediately after starting task (not waiting until end)
|
|
337
|
+
- [ ] `deskfree_update_file` succeeded (no error response)
|
|
259
338
|
- [ ] If blocked: sent message explaining WHY before calling `complete_task` with `blocked`
|
|
260
339
|
|
|
261
340
|
### Pre-Completion
|
|
262
341
|
|
|
263
|
-
- [ ]
|
|
264
|
-
- [ ]
|
|
265
|
-
- [ ] Called `deskfree_complete_task` — confirmed task moved to `human`
|
|
342
|
+
- [ ] File content is non-empty and meaningful (if task produces a file)
|
|
343
|
+
- [ ] File is well-structured and stands alone as a document
|
|
344
|
+
- [ ] Called `deskfree_complete_task` with a clear `summary` — confirmed task moved to `human`
|
|
266
345
|
- [ ] If sub-agent: terminated after completion (one task per sub-agent)
|
|
267
346
|
|
|
268
347
|
### Heartbeat Evaluation Check
|
|
@@ -276,21 +355,24 @@ submit_evaluation({
|
|
|
276
355
|
### Orchestrator Flow (main session)
|
|
277
356
|
|
|
278
357
|
```
|
|
279
|
-
1. deskfree_state → assess workspace + read ways of working + check active initiatives
|
|
280
|
-
2. deskfree_suggest_tasks → suggest tasks (with estimatedTokens, initiativeId, initiativeSuggestions)
|
|
281
|
-
3. deskfree_start_task → claim approved task (returns full context + parent context)
|
|
282
|
-
4.
|
|
283
|
-
5.
|
|
358
|
+
1. deskfree_state → assess workspace + read ways of working + check active initiatives + check files
|
|
359
|
+
2. deskfree_suggest_tasks → suggest tasks (with estimatedTokens, initiativeId, initiativeSuggestions, newFile)
|
|
360
|
+
3. deskfree_start_task → claim approved task (returns full context + parent context + fileContext)
|
|
361
|
+
4. deskfree_update_file → build linked file incrementally as you work
|
|
362
|
+
5. deskfree_suggest_tasks → suggest follow-ups if work reveals more (parentTaskId to link)
|
|
363
|
+
6. deskfree_complete_task → complete with outcome done (+ summary) or blocked
|
|
284
364
|
```
|
|
285
365
|
|
|
286
366
|
### Sub-Agent Flow (recommended for tasks > 5 min)
|
|
287
367
|
|
|
288
368
|
```
|
|
289
369
|
Orchestrator: deskfree_suggest_tasks → (human approves) → deskfree_start_task → spawn sub-agent with full task context
|
|
290
|
-
Sub-agent:
|
|
370
|
+
Sub-agent: deskfree_update_file (incrementally) → deskfree_suggest_tasks (follow-ups if needed) → deskfree_complete_task (+ summary) → terminate
|
|
291
371
|
```
|
|
292
372
|
|
|
293
|
-
Sub-agents have **
|
|
373
|
+
Sub-agents have **7 tools:** `deskfree_update_file`, `deskfree_create_file`, `deskfree_complete_task`, `deskfree_send_message`, `deskfree_suggest_tasks`, `deskfree_claim_evaluation`, `deskfree_submit_evaluation`. Workers have workspace context for awareness — focus on your assigned task and use context to avoid duplicate suggestions.
|
|
374
|
+
|
|
375
|
+
**Worker pattern — after submitting evaluation:** reflect on what you learned and call `deskfree_suggest_tasks` for follow-up opportunities that emerged from the evaluation.
|
|
294
376
|
|
|
295
377
|
### When to Use Main vs Sub-Agent
|
|
296
378
|
|
|
@@ -303,6 +385,50 @@ Sub-agents have **4 tools:** `deskfree_update_deliverable`, `deskfree_complete_t
|
|
|
303
385
|
|
|
304
386
|
---
|
|
305
387
|
|
|
388
|
+
## Recurrence — Natural Language + scheduledFor
|
|
389
|
+
|
|
390
|
+
**Recurrence is handled through task instructions, NOT through special fields.** DeskFree uses a simple suggest → complete → suggest cycle for recurring work.
|
|
391
|
+
|
|
392
|
+
### How Recurrence Works
|
|
393
|
+
|
|
394
|
+
1. **Document the pattern** in task instructions using natural language:
|
|
395
|
+
- "This task recurs weekly on Mondays. When completing, suggest the next occurrence with scheduledFor set to next Monday."
|
|
396
|
+
- "Monthly report — recurs on the 1st of each month. Schedule next occurrence for first day of next month."
|
|
397
|
+
|
|
398
|
+
2. **Set the first occurrence** using `scheduledFor` in your suggestion:
|
|
399
|
+
```javascript
|
|
400
|
+
deskfree_suggest_tasks({
|
|
401
|
+
suggestions: [{
|
|
402
|
+
title: "Weekly team sync prep",
|
|
403
|
+
instructions: "Prepare agenda for Monday team meeting. This task recurs weekly on Mondays. When completing, suggest the next occurrence with scheduledFor set to next Monday at 9 AM.",
|
|
404
|
+
scheduledFor: "2026-03-03T14:00:00Z" // Next Monday 9 AM EST
|
|
405
|
+
}]
|
|
406
|
+
})
|
|
407
|
+
```
|
|
408
|
+
|
|
409
|
+
3. **Propagate on completion** — when you complete a recurring task, read the instructions and suggest the next occurrence:
|
|
410
|
+
```javascript
|
|
411
|
+
// After completing the task:
|
|
412
|
+
deskfree_suggest_tasks({
|
|
413
|
+
suggestions: [{
|
|
414
|
+
title: "Weekly team sync prep",
|
|
415
|
+
instructions: "Prepare agenda for Monday team meeting. This task recurs weekly on Mondays. When completing, suggest the next occurrence with scheduledFor set to next Monday at 9 AM.",
|
|
416
|
+
scheduledFor: "2026-03-10T14:00:00Z" // Following Monday
|
|
417
|
+
}],
|
|
418
|
+
parentTaskId: "current-task-id"
|
|
419
|
+
})
|
|
420
|
+
```
|
|
421
|
+
|
|
422
|
+
### Key Points
|
|
423
|
+
|
|
424
|
+
- **No special recurrence fields** — it's just natural language in instructions + `scheduledFor`
|
|
425
|
+
- **You are responsible** for reading the recurrence pattern and creating the next occurrence
|
|
426
|
+
- **Use scheduledFor** to control when the task becomes available
|
|
427
|
+
- **Include the recurrence instructions** verbatim in follow-up suggestions so the pattern continues
|
|
428
|
+
- **Be precise with dates** — calculate the next occurrence based on the documented pattern
|
|
429
|
+
|
|
430
|
+
---
|
|
431
|
+
|
|
306
432
|
## Messaging
|
|
307
433
|
|
|
308
434
|
**Normal replies:** Just respond — the channel handles routing automatically. No tool needed.
|
|
@@ -320,20 +446,21 @@ Sub-agents have **4 tools:** `deskfree_update_deliverable`, `deskfree_complete_t
|
|
|
320
446
|
|
|
321
447
|
### Heartbeat / Proactive Check
|
|
322
448
|
|
|
323
|
-
1. `deskfree_state` → get workspace snapshot + check `waysOfWorking` + `initiatives` + `pendingEvaluations`
|
|
449
|
+
1. `deskfree_state` → get workspace snapshot + check `waysOfWorking` + `initiatives` + `files` + `pendingEvaluations`
|
|
324
450
|
2. `pendingEvaluations`? → `deskfree_claim_evaluation` → `deskfree_submit_evaluation` (with globalWoW + initiative outputs)
|
|
325
451
|
3. `bot` tasks? → `deskfree_start_task` + spawn sub-agents
|
|
326
452
|
4. `bot` (is_working=true) with no active sub-agent? → Complete as blocked or resume
|
|
327
453
|
|
|
328
454
|
### Human Gives You Work
|
|
329
455
|
|
|
330
|
-
1. `deskfree_state` → check existing tasks + read ways of working + check active initiatives
|
|
456
|
+
1. `deskfree_state` → check existing tasks + read ways of working + check active initiatives + check files
|
|
331
457
|
2. Does this work belong to an active initiative? → set `initiativeId` on suggestions
|
|
332
458
|
OR is this starting a new area of focus? → add `initiativeSuggestions`
|
|
333
|
-
3.
|
|
334
|
-
4.
|
|
335
|
-
5.
|
|
336
|
-
6.
|
|
459
|
+
3. Will the task produce a persistent document? → add `newFile` to the suggestion
|
|
460
|
+
4. `deskfree_suggest_tasks` → suggest with clear title + instructions
|
|
461
|
+
5. [human approves] → `deskfree_start_task` → claim it + read fileContext if present
|
|
462
|
+
6. Work → `deskfree_update_file` incrementally
|
|
463
|
+
7. `deskfree_complete_task` → outcome `done` (with summary) or `blocked`
|
|
337
464
|
|
|
338
465
|
---
|
|
339
466
|
|
|
@@ -341,50 +468,41 @@ Sub-agents have **4 tools:** `deskfree_update_deliverable`, `deskfree_complete_t
|
|
|
341
468
|
|
|
342
469
|
> **Full parameter details:** See `references/tools.md`
|
|
343
470
|
|
|
344
|
-
### Orchestrator (
|
|
471
|
+
### Orchestrator (9 tools)
|
|
345
472
|
|
|
346
473
|
| Tool | What it does |
|
|
347
474
|
|---|---|
|
|
348
|
-
| `deskfree_state` | Full workspace snapshot — tasks, recently done, ways of working, active initiatives, pending evaluations |
|
|
349
|
-
| `deskfree_suggest_tasks` | Suggest tasks for human approval (with estimatedTokens, initiativeId, initiativeSuggestions) |
|
|
350
|
-
| `deskfree_start_task` | Claim task → `bot` (is_working=true), returns full context + parent context |
|
|
351
|
-
| `
|
|
352
|
-
| `
|
|
353
|
-
| `
|
|
354
|
-
| `deskfree_send_message` | Message in task thread |
|
|
475
|
+
| `deskfree_state` | Full workspace snapshot — tasks, recently done, ways of working, active initiatives, files, pending evaluations |
|
|
476
|
+
| `deskfree_suggest_tasks` | Suggest tasks for human approval (with estimatedTokens, initiativeId, initiativeSuggestions, newFile, fileId) |
|
|
477
|
+
| `deskfree_start_task` | Claim task → `bot` (is_working=true), returns full context + parent context + fileContext |
|
|
478
|
+
| `deskfree_update_file` | Update a linked file's content incrementally |
|
|
479
|
+
| `deskfree_create_file` | Create a new persistent file |
|
|
480
|
+
| `deskfree_complete_task` | Mark done (summary required) or blocked → `human` |
|
|
481
|
+
| `deskfree_send_message` | Message in task thread (content required) |
|
|
355
482
|
| `deskfree_claim_evaluation` | Claim a pending evaluation — returns task, messages, globalWoW, and initiative (if applicable) |
|
|
356
483
|
| `deskfree_submit_evaluation` | Submit evaluation with dual output: globalWoW + initiative (each independently updatable) |
|
|
357
484
|
|
|
358
|
-
### Worker (
|
|
359
|
-
|
|
360
|
-
`deskfree_update_deliverable`, `deskfree_complete_task`, `deskfree_send_message`, `deskfree_submit_evaluation`
|
|
361
|
-
|
|
362
|
-
---
|
|
363
|
-
|
|
364
|
-
## Deliverable Best Practices
|
|
485
|
+
### Worker (7 tools — sub-agents only)
|
|
365
486
|
|
|
366
|
-
|
|
487
|
+
`deskfree_update_file`, `deskfree_create_file`, `deskfree_complete_task`, `deskfree_send_message`, `deskfree_suggest_tasks`, `deskfree_claim_evaluation`, `deskfree_submit_evaluation`
|
|
367
488
|
|
|
368
|
-
|
|
489
|
+
Workers receive workspace context at spawn time — use it to understand what else is happening, avoid duplicate suggestions, and link follow-ups to existing initiatives.
|
|
369
490
|
|
|
370
|
-
|
|
371
|
-
|---|---|
|
|
372
|
-
| `markdown` (default) | Text reports, analysis, documentation, code — anything prose-based |
|
|
373
|
-
| `html` | Rich web content: dashboards, styled reports, interactive tables, data visualizations |
|
|
491
|
+
---
|
|
374
492
|
|
|
375
|
-
|
|
493
|
+
## File Best Practices
|
|
376
494
|
|
|
377
|
-
### Markdown
|
|
495
|
+
### Markdown files
|
|
378
496
|
|
|
379
497
|
Structure as **standalone markdown documents:**
|
|
380
498
|
|
|
381
499
|
```markdown
|
|
382
|
-
#
|
|
500
|
+
# Document Title
|
|
383
501
|
|
|
384
502
|
## Summary
|
|
385
|
-
Brief overview of what
|
|
503
|
+
Brief overview of what this document covers.
|
|
386
504
|
|
|
387
|
-
## Key Findings /
|
|
505
|
+
## Key Findings / Content
|
|
388
506
|
- Main points with supporting detail
|
|
389
507
|
|
|
390
508
|
## Details
|
|
@@ -394,7 +512,7 @@ Detailed analysis, implementation notes, etc.
|
|
|
394
512
|
- Follow-up actions, outstanding questions
|
|
395
513
|
```
|
|
396
514
|
|
|
397
|
-
### HTML
|
|
515
|
+
### HTML files
|
|
398
516
|
|
|
399
517
|
Pass a complete, self-contained HTML document (or fragment — a wrapper `<html>` is injected automatically):
|
|
400
518
|
|
|
@@ -406,7 +524,7 @@ Pass a complete, self-contained HTML document (or fragment — a wrapper `<html>
|
|
|
406
524
|
</table>
|
|
407
525
|
```
|
|
408
526
|
|
|
409
|
-
**Build incrementally** — start with outline immediately after `deskfree_start_task`, fill sections as you go, polish before completing. A half-complete
|
|
527
|
+
**Build incrementally** — start with outline immediately after `deskfree_start_task`, fill sections as you go, polish before completing. A half-complete file is infinitely better than none.
|
|
410
528
|
|
|
411
529
|
---
|
|
412
530
|
|
|
@@ -419,7 +537,8 @@ Pass a complete, self-contained HTML document (or fragment — a wrapper `<html>
|
|
|
419
537
|
| 404 on `deskfree_complete_task` | Task not `bot` (is_working=true) | Already completed or released. Check state. |
|
|
420
538
|
| 409 on `deskfree_start_task` | Race condition — another bot claimed it | Call `deskfree_state`, pick a different task. |
|
|
421
539
|
| 401 Unauthorized | Bot token invalid or expired | Check channel configuration. Do not retry. |
|
|
422
|
-
| `
|
|
540
|
+
| `deskfree_update_file` fails | File not found or network error | Verify fileId with `deskfree_state`. If file was deleted, create a new one. |
|
|
541
|
+
| 422 on `deskfree_complete_task` | Missing required `summary` for outcome `done` | Add a meaningful summary of what was accomplished. |
|
|
423
542
|
| `deskfree_claim_evaluation` returns null | Already claimed by another process | No action needed. Move to next pending evaluation. |
|
|
424
543
|
| Sub-agent spawn fails | Resource limits, config error | Complete task as `blocked` with explanation. Do not leave in `bot` (is_working=true). |
|
|
425
544
|
| WebSocket disconnected | Network issue | Plugin auto-reconnects with backoff. Messages fall back to HTTP polling. No action needed. |
|
|
@@ -428,7 +547,7 @@ Pass a complete, self-contained HTML document (or fragment — a wrapper `<html>
|
|
|
428
547
|
|
|
429
548
|
If anything goes wrong mid-task:
|
|
430
549
|
1. Send a message explaining what happened (`deskfree_send_message`)
|
|
431
|
-
2. Save whatever partial
|
|
550
|
+
2. Save whatever partial file content you have (`deskfree_update_file`)
|
|
432
551
|
3. Complete as `blocked` (`deskfree_complete_task` with outcome `blocked`)
|
|
433
552
|
4. **Never leave a task stranded in `bot` (is_working=true)**
|
|
434
553
|
|
|
@@ -437,10 +556,10 @@ If anything goes wrong mid-task:
|
|
|
437
556
|
| Scenario | Guidance |
|
|
438
557
|
|---|---|
|
|
439
558
|
| **Concurrent task access** | If multiple bots try to claim the same task, one will get 409 Conflict. The winner proceeds, losers should call `deskfree_state` and pick different tasks. |
|
|
440
|
-
| **Long-running operations** | For tasks >10 minutes, send periodic progress updates via `deskfree_send_message` so humans know you're still working. Update
|
|
441
|
-
| **Partial
|
|
442
|
-
| **Network timeouts during updates** | If `
|
|
443
|
-
| **Empty or corrupt
|
|
559
|
+
| **Long-running operations** | For tasks >10 minutes, send periodic progress updates via `deskfree_send_message` so humans know you're still working. Update file incrementally. |
|
|
560
|
+
| **Partial file recovery** | If interrupted mid-work, `deskfree_start_task` returns the current file content in `fileContext`. Resume from where you left off, don't start over. |
|
|
561
|
+
| **Network timeouts during updates** | If `deskfree_update_file` times out, retry once. If it fails again, complete as `blocked` with the timeout explanation. |
|
|
562
|
+
| **Empty or corrupt file content** | Always validate file content before calling `deskfree_update_file`. Minimum viable content is better than empty/corrupted content. |
|
|
444
563
|
| **Sub-agent coordination** | Only one sub-agent per task. If a sub-agent fails to start, the main session should resume the task directly. Don't spawn multiple sub-agents for the same task. |
|
|
445
564
|
| **Evaluation claim conflicts** | `deskfree_claim_evaluation` returns `null` if another process claimed it first. This is normal - move to the next pending evaluation or complete your heartbeat. |
|
|
446
565
|
| **Ways of working too large** | If ways of working content becomes very large (>50KB), consider archiving old sections. Focus updates on recent patterns and current best practices. |
|
|
@@ -457,12 +576,12 @@ If anything goes wrong mid-task:
|
|
|
457
576
|
- **Solution**: Pass explicit `taskId` to `deskfree_send_message`
|
|
458
577
|
- **Debug**: Check that `deskfree_start_task` was called and returned successfully
|
|
459
578
|
|
|
460
|
-
####
|
|
579
|
+
#### File Updates Failing
|
|
461
580
|
- **Common causes**:
|
|
462
|
-
-
|
|
463
|
-
-
|
|
581
|
+
- File ID is wrong or file was deleted → call `deskfree_state` to see current files
|
|
582
|
+
- File content is malformed (invalid markdown, control characters)
|
|
464
583
|
- Network timeout → retry once, then complete as blocked if persistent
|
|
465
|
-
- **Solution**: Validate
|
|
584
|
+
- **Solution**: Validate content before sending, handle network errors gracefully
|
|
466
585
|
|
|
467
586
|
#### Sub-agent Spawn Failures
|
|
468
587
|
- **Common causes**: Resource limits, configuration errors, invalid task context
|
|
@@ -483,44 +602,41 @@ If anything goes wrong mid-task:
|
|
|
483
602
|
|
|
484
603
|
## Common Workflow Patterns
|
|
485
604
|
|
|
486
|
-
### Pattern 1: Research & Analysis
|
|
605
|
+
### Pattern 1: Research & Analysis with File Output
|
|
487
606
|
|
|
488
607
|
```
|
|
489
608
|
Main Session:
|
|
490
|
-
1. deskfree_state() → check workspace
|
|
609
|
+
1. deskfree_state() → check workspace + files
|
|
491
610
|
2. deskfree_suggest_tasks([{
|
|
492
611
|
title: "Research competitor HumanLayer",
|
|
493
|
-
instructions: "Analyze their product, pricing, and positioning vs DeskFree"
|
|
612
|
+
instructions: "Analyze their product, pricing, and positioning vs DeskFree",
|
|
613
|
+
newFile: { name: "HumanLayer Analysis", description: "Competitor analysis report" }
|
|
494
614
|
}])
|
|
495
615
|
3. [human approves task]
|
|
496
|
-
4. deskfree_start_task(taskId) → get task context
|
|
497
|
-
|
|
616
|
+
4. deskfree_start_task(taskId) → get task context + fileContext (empty file pre-created)
|
|
617
|
+
5. spawn_subagent(research_prompt) → background research
|
|
498
618
|
|
|
499
619
|
Sub-agent:
|
|
500
|
-
1.
|
|
620
|
+
1. deskfree_update_file(fileId, "# HumanLayer Analysis\n\n## Summary\n...") → initial outline
|
|
501
621
|
2. [research work...]
|
|
502
|
-
3.
|
|
622
|
+
3. deskfree_update_file(fileId, "...") → interim findings
|
|
503
623
|
4. [more research...]
|
|
504
|
-
5.
|
|
505
|
-
6. deskfree_complete_task(taskId, "done")
|
|
624
|
+
5. deskfree_update_file(fileId, "...") → final report
|
|
625
|
+
6. deskfree_complete_task(taskId, "done", summary: "Analysis complete — 3 key differentiators identified, full report in file")
|
|
506
626
|
```
|
|
507
627
|
|
|
508
|
-
### Pattern 2: Quick Fix (Main Session)
|
|
628
|
+
### Pattern 2: Quick Fix (Main Session, No File)
|
|
509
629
|
|
|
510
630
|
```
|
|
511
631
|
1. deskfree_state() → check current state
|
|
512
632
|
2. deskfree_suggest_tasks([{
|
|
513
|
-
title: "Fix broken login endpoint",
|
|
633
|
+
title: "Fix broken login endpoint",
|
|
514
634
|
instructions: "Apply hotfix for 500 error in /auth/login"
|
|
515
635
|
}])
|
|
516
636
|
3. [human approves task]
|
|
517
637
|
4. deskfree_start_task(taskId) → claim the work
|
|
518
|
-
4. deskfree_update_deliverable() → "Investigating issue..."
|
|
519
638
|
5. [fix the code...]
|
|
520
|
-
6.
|
|
521
|
-
7. [verify fix...]
|
|
522
|
-
8. deskfree_update_deliverable() → "Fix verified and deployed"
|
|
523
|
-
9. deskfree_complete_task(taskId, "done")
|
|
639
|
+
6. deskfree_complete_task(taskId, "done", summary: "Fixed null pointer in auth middleware, deployed to staging")
|
|
524
640
|
```
|
|
525
641
|
|
|
526
642
|
### Pattern 3: Blocked Task with Human Input
|
|
@@ -529,7 +645,7 @@ Sub-agent:
|
|
|
529
645
|
1-5. [normal task startup...]
|
|
530
646
|
6. [encounter blocker - need API key]
|
|
531
647
|
7. deskfree_send_message("Need the new Stripe API key to complete this integration. Where can I find it?")
|
|
532
|
-
8.
|
|
648
|
+
8. deskfree_update_file(fileId, "...") → save partial progress if task has a file
|
|
533
649
|
9. deskfree_complete_task(taskId, "blocked") → hand off to human
|
|
534
650
|
```
|
|
535
651
|
|
|
@@ -538,13 +654,16 @@ Sub-agent:
|
|
|
538
654
|
```
|
|
539
655
|
Heartbeat check:
|
|
540
656
|
1. deskfree_state() → shows pendingEvaluations: [{taskId: "abc", ...}]
|
|
541
|
-
2. deskfree_claim_evaluation("abc") → get evaluation context
|
|
542
|
-
3. [analyze task, messages, current ways of working...]
|
|
657
|
+
2. deskfree_claim_evaluation("abc") → get evaluation context (task, messages, waysOfWorking, initiative?)
|
|
658
|
+
3. [analyze task summary, messages, current ways of working, initiative if present...]
|
|
543
659
|
4. deskfree_submit_evaluation({
|
|
544
660
|
taskId: "abc",
|
|
545
661
|
reasoning: "Found a new pattern for API error handling...",
|
|
546
|
-
|
|
547
|
-
|
|
662
|
+
globalWoW: {
|
|
663
|
+
hasChanges: true,
|
|
664
|
+
updatedContent: "# Ways of Working\n\n## API Integration\n[new section]..."
|
|
665
|
+
},
|
|
666
|
+
initiative: { hasChanges: false }
|
|
548
667
|
})
|
|
549
668
|
```
|
|
550
669
|
|
|
@@ -552,7 +671,7 @@ Heartbeat check:
|
|
|
552
671
|
|
|
553
672
|
**Good (short, scannable, action-oriented):**
|
|
554
673
|
- "Research competitor HumanLayer"
|
|
555
|
-
- "Deploy staging hotfix"
|
|
674
|
+
- "Deploy staging hotfix"
|
|
556
675
|
- "Write API docs for /users endpoint"
|
|
557
676
|
- "Debug memory leak in worker process"
|
|
558
677
|
- "Review Q3 performance metrics"
|
|
@@ -570,12 +689,13 @@ Heartbeat check:
|
|
|
570
689
|
|
|
571
690
|
| Practice | Rationale | Example |
|
|
572
691
|
|---|---|---|
|
|
573
|
-
| **Update
|
|
692
|
+
| **Update file early and often** | Shows progress, survives interruptions | Update outline immediately, add sections as you work |
|
|
574
693
|
| **Use descriptive commit-style titles** | Easy to scan, actionable | "Fix authentication timeout in Safari" |
|
|
575
694
|
| **Send progress messages for long tasks** | Humans know you're working | "25% complete - analyzed 3 of 12 competitor features" |
|
|
576
695
|
| **Complete blocked tasks with explanation** | Clear handoff to humans | Message: "Need AWS credentials", then complete as blocked |
|
|
577
|
-
| **Start with template
|
|
696
|
+
| **Start with template file structure** | Consistent structure, never empty | Use the markdown template every time |
|
|
578
697
|
| **Handle 404/409 gracefully** | Race conditions are normal | Check state and pick different task, don't retry same task |
|
|
698
|
+
| **Provide meaningful summary on done** | Humans see this first | "Wrote full API docs for /users endpoint — 12 methods documented" |
|
|
579
699
|
|
|
580
700
|
### ❌ Don't Do This
|
|
581
701
|
|
|
@@ -584,19 +704,21 @@ Heartbeat check:
|
|
|
584
704
|
| **Leave tasks in `bot` (is_working=true)** | Blocks the workspace indefinitely | Always complete as `done` or `blocked` |
|
|
585
705
|
| **Retry `deskfree_state` in loops** | Wastes resources, indicates logic error | Call once per decision point |
|
|
586
706
|
| **Start multiple sub-agents per task** | Creates confusion, race conditions | One sub-agent per task maximum |
|
|
587
|
-
| **Update
|
|
707
|
+
| **Update file only at the end** | Progress lost if interrupted | Update incrementally throughout work |
|
|
588
708
|
| **Ignore 409 conflicts on task claims** | Causes infinite retry loops | Accept conflict, check state, pick different task |
|
|
589
709
|
| **Create tasks without clear actions** | Unclear what needs doing | Use imperative verbs: "research X", "fix Y", "analyze Z" |
|
|
590
710
|
| **Send messages instead of completing blocked** | Task stays in limbo | Send message explaining blocker, then complete as blocked |
|
|
711
|
+
| **Complete "done" without a summary** | Human can't quickly understand outcome | Always provide a 1-3 sentence summary of what was accomplished |
|
|
591
712
|
|
|
592
713
|
### Common Gotchas
|
|
593
714
|
|
|
594
715
|
- **Auto-threading stops after `deskfree_complete_task`** → Pass explicit `taskId` for post-completion messages
|
|
595
|
-
- **Empty
|
|
596
|
-
- **Sub-agents can't create tasks** → Only orchestrator (main session) can create and claim tasks
|
|
716
|
+
- **Empty file content is not useful** → Always provide meaningful content, even if just an outline
|
|
717
|
+
- **Sub-agents can't create tasks** → Only orchestrator (main session) can create and claim tasks
|
|
597
718
|
- **Ways of working updates require `hasChanges=true`** → Explicitly set flag when submitting changes
|
|
598
719
|
- **Task titles are visible to humans** → Make them professional and descriptive
|
|
599
720
|
- **Evaluation reasoning is important** → Explain your analysis even if no changes are made
|
|
721
|
+
- **summary is required for outcome "done"** → Plan what you'll write before completing
|
|
600
722
|
|
|
601
723
|
## Human Review Outcomes
|
|
602
724
|
|