deepflow 0.1.33 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deepflow",
3
- "version": "0.1.33",
3
+ "version": "0.1.34",
4
4
  "description": "Stay in flow state - lightweight spec-driven task orchestration for Claude Code",
5
5
  "keywords": [
6
6
  "claude",
@@ -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 get results, update PLAN.md
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,17 +45,28 @@ Statusline writes to `.deepflow/context.json`: `{"percentage": 45}`
43
45
 
44
46
  ## Agent Protocol
45
47
 
46
- Each task = one background agent. **TaskOutput blocks until agent completes and returns result directly.** Never poll, loop, or repeatedly check for results.
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 all results (single message, multiple TaskOutput calls)
54
- # TaskOutput BLOCKS — no polling needed, result returned when agent finishes
61
+ # Wait for completion (single message, multiple TaskOutput calls)
62
+ # TaskOutput BLOCKS — no polling needed
63
+ # IGNORE the response content — read result files instead
55
64
  TaskOutput(task_id=task_id_1)
56
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")
57
70
  ```
58
71
 
59
72
  Result file `.deepflow/results/{task_id}.yaml`:
@@ -382,14 +395,20 @@ When all tasks done for a `doing-*` spec:
382
395
 
383
396
  ### 10. ITERATE
384
397
 
385
- 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, results returned when complete.
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.
386
401
 
387
402
  ```python
388
403
  # After spawning T1, T2, T3 in parallel, wait for all in parallel:
389
- TaskOutput(task_id=t1_id) # BLOCKS until T1 done
390
- TaskOutput(task_id=t2_id) # BLOCKS until T2 done
391
- TaskOutput(task_id=t3_id) # BLOCKS until T3 done
392
- # All three in ONE message = parallel wait, zero polling
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")
393
412
  ```
394
413
 
395
414
  Then check which tasks completed, update PLAN.md, identify newly unblocked tasks, spawn next wave.