deepflow 0.1.33 → 0.1.35
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 +57 -17
package/package.json
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
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), use TaskOutput
|
|
8
8
|
|
|
9
|
-
**ONLY:** Read PLAN.md, read specs/doing-*.md, spawn background agents,
|
|
9
|
+
**ONLY:** Read PLAN.md, read specs/doing-*.md, spawn background agents, wait with Bash monitor, read `.deepflow/results/*.yaml` for outcomes, update PLAN.md
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
@@ -43,17 +43,53 @@ Statusline writes to `.deepflow/context.json`: `{"percentage": 45}`
|
|
|
43
43
|
|
|
44
44
|
## Agent Protocol
|
|
45
45
|
|
|
46
|
-
Each task = one background agent. **
|
|
46
|
+
Each task = one background agent. **NEVER use TaskOutput** — it returns full transcripts (100KB+) that explode context.
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
**Wait Strategy: Bash Monitor**
|
|
49
|
+
- One Bash call that monitors result files
|
|
50
|
+
- Shows progress via streaming (user sees in real-time)
|
|
51
|
+
- Minimal context (just the final output)
|
|
52
|
+
- User can react/cancel if needed
|
|
52
53
|
|
|
53
|
-
|
|
54
|
-
#
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
```python
|
|
55
|
+
# 1. Spawn agents in parallel (single message, multiple Task calls)
|
|
56
|
+
Task(subagent_type="general-purpose", run_in_background=True, prompt="T1: ...")
|
|
57
|
+
Task(subagent_type="general-purpose", run_in_background=True, prompt="T2: ...")
|
|
58
|
+
Task(subagent_type="general-purpose", run_in_background=True, prompt="T3: ...")
|
|
59
|
+
|
|
60
|
+
# 2. Wait with Bash monitor (ONE call, streams progress to user)
|
|
61
|
+
Bash("""
|
|
62
|
+
RESULTS_DIR="{worktree}/.deepflow/results"
|
|
63
|
+
EXPECTED=3
|
|
64
|
+
TIMEOUT=300
|
|
65
|
+
|
|
66
|
+
timeout $TIMEOUT bash -c '
|
|
67
|
+
seen=""
|
|
68
|
+
while [ $(ls "$0"/*.yaml 2>/dev/null | wc -l) -lt '$EXPECTED' ]; do
|
|
69
|
+
for f in "$0"/*.yaml 2>/dev/null; do
|
|
70
|
+
if [ -f "$f" ] && [[ ! "$seen" =~ "$f" ]]; then
|
|
71
|
+
echo "✓ $(basename "$f" .yaml)"
|
|
72
|
+
seen="$seen $f"
|
|
73
|
+
fi
|
|
74
|
+
done
|
|
75
|
+
sleep 5
|
|
76
|
+
done
|
|
77
|
+
echo "ALL COMPLETE"
|
|
78
|
+
' "$RESULTS_DIR" || echo "TIMEOUT: some tasks did not complete"
|
|
79
|
+
""")
|
|
80
|
+
|
|
81
|
+
# 3. Read actual results (minimal context)
|
|
82
|
+
Read("{worktree}/.deepflow/results/T1.yaml")
|
|
83
|
+
Read("{worktree}/.deepflow/results/T2.yaml")
|
|
84
|
+
Read("{worktree}/.deepflow/results/T3.yaml")
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
**User sees streaming:**
|
|
88
|
+
```
|
|
89
|
+
✓ T1
|
|
90
|
+
✓ T3
|
|
91
|
+
✓ T2
|
|
92
|
+
ALL COMPLETE
|
|
57
93
|
```
|
|
58
94
|
|
|
59
95
|
Result file `.deepflow/results/{task_id}.yaml`:
|
|
@@ -382,14 +418,18 @@ When all tasks done for a `doing-*` spec:
|
|
|
382
418
|
|
|
383
419
|
### 10. ITERATE
|
|
384
420
|
|
|
385
|
-
After spawning agents,
|
|
421
|
+
After spawning agents, use Bash monitor to wait. **NEVER use TaskOutput** — it explodes context.
|
|
386
422
|
|
|
387
423
|
```python
|
|
388
|
-
# After spawning T1, T2, T3 in parallel
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
424
|
+
# After spawning T1, T2, T3 in parallel:
|
|
425
|
+
|
|
426
|
+
# 1. Wait with Bash monitor (streams progress to user)
|
|
427
|
+
Bash("timeout 300 bash -c '...' ") # See Agent Protocol for full script
|
|
428
|
+
|
|
429
|
+
# 2. Read results
|
|
430
|
+
Read("{worktree}/.deepflow/results/T1.yaml")
|
|
431
|
+
Read("{worktree}/.deepflow/results/T2.yaml")
|
|
432
|
+
Read("{worktree}/.deepflow/results/T3.yaml")
|
|
393
433
|
```
|
|
394
434
|
|
|
395
435
|
Then check which tasks completed, update PLAN.md, identify newly unblocked tasks, spawn next wave.
|