deepflow 0.1.32 → 0.1.34
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/package.json +1 -1
- package/src/commands/df/execute.md +29 -8
package/package.json
CHANGED
|
@@ -4,9 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
You are a coordinator. Spawn agents, wait for results, update PLAN.md. Never implement code yourself.
|
|
6
6
|
|
|
7
|
-
**NEVER:** Read source files, edit code, run tests, run git commands (except status)
|
|
7
|
+
**NEVER:** Read source files, edit code, run tests, run git commands (except status), process TaskOutput content
|
|
8
8
|
|
|
9
|
-
**ONLY:** Read PLAN.md, read specs/doing-*.md, spawn background agents, use TaskOutput to
|
|
9
|
+
**ONLY:** Read PLAN.md, read specs/doing-*.md, spawn background agents, use TaskOutput to wait (ignore its content), read `.deepflow/results/*.yaml` for outcomes, update PLAN.md
|
|
10
|
+
|
|
11
|
+
**CONTEXT CRITICAL:** TaskOutput returns FULL agent transcripts (100KB+). NEVER include this in context. Agents write results to `.deepflow/results/{task_id}.yaml`. Read those files instead.
|
|
10
12
|
|
|
11
13
|
---
|
|
12
14
|
|
|
@@ -43,16 +45,28 @@ Statusline writes to `.deepflow/context.json`: `{"percentage": 45}`
|
|
|
43
45
|
|
|
44
46
|
## Agent Protocol
|
|
45
47
|
|
|
46
|
-
Each task = one background agent.
|
|
48
|
+
Each task = one background agent. **TaskOutput blocks until agent completes.** Never poll, loop, or repeatedly check for results.
|
|
49
|
+
|
|
50
|
+
**CRITICAL: Context Management**
|
|
51
|
+
- TaskOutput returns the FULL agent transcript (all tool calls, messages, etc.)
|
|
52
|
+
- **DO NOT** process or include TaskOutput response in context — it will explode your token usage
|
|
53
|
+
- **ONLY** use TaskOutput to wait for completion (ignore its content)
|
|
54
|
+
- **ALWAYS** read the result file directly to get the actual outcome
|
|
47
55
|
|
|
48
56
|
```python
|
|
49
57
|
# Spawn agents in parallel (single message, multiple Task calls)
|
|
50
58
|
task_id_1 = Task(subagent_type="general-purpose", run_in_background=True, prompt="T1: ...")
|
|
51
59
|
task_id_2 = Task(subagent_type="general-purpose", run_in_background=True, prompt="T2: ...")
|
|
52
60
|
|
|
53
|
-
# Wait for
|
|
61
|
+
# Wait for completion (single message, multiple TaskOutput calls)
|
|
62
|
+
# TaskOutput BLOCKS — no polling needed
|
|
63
|
+
# IGNORE the response content — read result files instead
|
|
54
64
|
TaskOutput(task_id=task_id_1)
|
|
55
65
|
TaskOutput(task_id=task_id_2)
|
|
66
|
+
|
|
67
|
+
# Read actual results from files (minimal context usage)
|
|
68
|
+
Read("{worktree}/.deepflow/results/T1.yaml")
|
|
69
|
+
Read("{worktree}/.deepflow/results/T2.yaml")
|
|
56
70
|
```
|
|
57
71
|
|
|
58
72
|
Result file `.deepflow/results/{task_id}.yaml`:
|
|
@@ -381,13 +395,20 @@ When all tasks done for a `doing-*` spec:
|
|
|
381
395
|
|
|
382
396
|
### 10. ITERATE
|
|
383
397
|
|
|
384
|
-
After spawning agents,
|
|
398
|
+
After spawning agents, call TaskOutput for ALL running agents in a SINGLE message. **TaskOutput blocks—do NOT loop, poll, or check repeatedly.** One call per agent.
|
|
399
|
+
|
|
400
|
+
**CRITICAL:** TaskOutput returns FULL agent transcripts. **IGNORE the response content** — it will explode context. Read result files instead.
|
|
385
401
|
|
|
386
402
|
```python
|
|
387
403
|
# After spawning T1, T2, T3 in parallel, wait for all in parallel:
|
|
388
|
-
TaskOutput(task_id=t1_id) #
|
|
389
|
-
TaskOutput(task_id=t2_id)
|
|
390
|
-
TaskOutput(task_id=t3_id)
|
|
404
|
+
TaskOutput(task_id=t1_id) # BLOCKS until done — IGNORE response content
|
|
405
|
+
TaskOutput(task_id=t2_id) # BLOCKS until done — IGNORE response content
|
|
406
|
+
TaskOutput(task_id=t3_id) # BLOCKS until done — IGNORE response content
|
|
407
|
+
|
|
408
|
+
# Then read actual results (minimal context):
|
|
409
|
+
Read("{worktree}/.deepflow/results/T1.yaml")
|
|
410
|
+
Read("{worktree}/.deepflow/results/T2.yaml")
|
|
411
|
+
Read("{worktree}/.deepflow/results/T3.yaml")
|
|
391
412
|
```
|
|
392
413
|
|
|
393
414
|
Then check which tasks completed, update PLAN.md, identify newly unblocked tasks, spawn next wave.
|