deepflow 0.1.37 → 0.1.39
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 +27 -53
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), use TaskOutput
|
|
7
|
+
**NEVER:** Read source files, edit code, run tests, run git commands (except status), use TaskOutput, use run_in_background
|
|
8
8
|
|
|
9
|
-
**ONLY:** Read PLAN.md, read specs/doing-*.md, spawn
|
|
9
|
+
**ONLY:** Read PLAN.md, read specs/doing-*.md, spawn agents (non-background), read `.deepflow/results/*.yaml` for outcomes, update PLAN.md
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
@@ -43,54 +43,28 @@ Statusline writes to `.deepflow/context.json`: `{"percentage": 45}`
|
|
|
43
43
|
|
|
44
44
|
## Agent Protocol
|
|
45
45
|
|
|
46
|
-
Each task = one
|
|
46
|
+
Each task = one agent. Spawn ALL wave tasks in ONE message as non-background parallel Task calls.
|
|
47
47
|
|
|
48
|
-
**
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
- Minimal context (just the final output)
|
|
52
|
-
- User can react/cancel if needed
|
|
48
|
+
**NEVER use `run_in_background`** — causes late "Agent completed" notifications after orchestrator finishes, polluting output and duplicating summaries.
|
|
49
|
+
|
|
50
|
+
**NEVER use TaskOutput** — returns full agent transcripts (100KB+) that explode context.
|
|
53
51
|
|
|
54
52
|
```python
|
|
55
|
-
# 1. Spawn agents in parallel (single message,
|
|
56
|
-
Task(subagent_type="general-purpose",
|
|
57
|
-
Task(subagent_type="general-purpose",
|
|
58
|
-
Task(subagent_type="general-purpose",
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
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)
|
|
53
|
+
# 1. Spawn agents in parallel (single message, NON-background)
|
|
54
|
+
Task(subagent_type="general-purpose", prompt="T1: ... Final message: one line only.")
|
|
55
|
+
Task(subagent_type="general-purpose", prompt="T2: ... Final message: one line only.")
|
|
56
|
+
Task(subagent_type="general-purpose", prompt="T3: ... Final message: one line only.")
|
|
57
|
+
# All run in parallel, block until ALL complete — no late notifications
|
|
58
|
+
|
|
59
|
+
# 2. Read structured results (minimal context)
|
|
82
60
|
Read("{worktree}/.deepflow/results/T1.yaml")
|
|
83
61
|
Read("{worktree}/.deepflow/results/T2.yaml")
|
|
84
62
|
Read("{worktree}/.deepflow/results/T3.yaml")
|
|
85
63
|
```
|
|
86
64
|
|
|
87
|
-
**
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
✓ T3
|
|
91
|
-
✓ T2
|
|
92
|
-
ALL COMPLETE
|
|
93
|
-
```
|
|
65
|
+
**Agent final message rule:** Agents MUST end with exactly one line:
|
|
66
|
+
`Done: {task_id} {status} ({commit_hash})`
|
|
67
|
+
Detailed results go in the YAML file, not the message.
|
|
94
68
|
|
|
95
69
|
Result file `.deepflow/results/{task_id}.yaml`:
|
|
96
70
|
```yaml
|
|
@@ -256,10 +230,11 @@ DO NOT spawn one task, wait, then spawn another. Instead, call Task tool multipl
|
|
|
256
230
|
Example: If T1, T2, T3 are ready, send ONE message containing THREE Task tool invocations:
|
|
257
231
|
|
|
258
232
|
```
|
|
259
|
-
// In a SINGLE assistant message, invoke Task THREE times:
|
|
260
|
-
Task(subagent_type="general-purpose", model="sonnet",
|
|
261
|
-
Task(subagent_type="general-purpose", model="sonnet",
|
|
262
|
-
Task(subagent_type="general-purpose", model="sonnet",
|
|
233
|
+
// In a SINGLE assistant message, invoke Task THREE times (NON-background):
|
|
234
|
+
Task(subagent_type="general-purpose", model="sonnet", prompt="T1: ...")
|
|
235
|
+
Task(subagent_type="general-purpose", model="sonnet", prompt="T2: ...")
|
|
236
|
+
Task(subagent_type="general-purpose", model="sonnet", prompt="T3: ...")
|
|
237
|
+
// All run in parallel, block until complete — no late notifications
|
|
263
238
|
```
|
|
264
239
|
|
|
265
240
|
**WRONG (sequential):** Send message with Task for T1 → wait → send message with Task for T2 → wait → ...
|
|
@@ -418,15 +393,14 @@ When all tasks done for a `doing-*` spec:
|
|
|
418
393
|
|
|
419
394
|
### 10. ITERATE
|
|
420
395
|
|
|
421
|
-
After spawning agents,
|
|
396
|
+
After spawning wave agents (non-background, parallel), they block until all complete. Then read results.
|
|
422
397
|
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
# 1. Wait with Bash monitor (streams progress to user)
|
|
427
|
-
Bash("timeout 300 bash -c '...' ") # See Agent Protocol for full script
|
|
398
|
+
**NEVER use TaskOutput** — it explodes context.
|
|
399
|
+
**NEVER use run_in_background** — causes late notifications and duplicate summaries.
|
|
428
400
|
|
|
429
|
-
|
|
401
|
+
```python
|
|
402
|
+
# After spawning T1, T2, T3 in parallel (non-background):
|
|
403
|
+
# They already completed — read structured results:
|
|
430
404
|
Read("{worktree}/.deepflow/results/T1.yaml")
|
|
431
405
|
Read("{worktree}/.deepflow/results/T2.yaml")
|
|
432
406
|
Read("{worktree}/.deepflow/results/T3.yaml")
|