deepflow 0.1.21 → 0.1.23

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.
@@ -12,7 +12,6 @@ const os = require('os');
12
12
  const PACKAGE_NAME = 'deepflow';
13
13
  const CACHE_DIR = path.join(os.homedir(), '.claude', 'cache');
14
14
  const CACHE_FILE = path.join(CACHE_DIR, 'df-update-check.json');
15
- const CHECK_INTERVAL = 24 * 60 * 60 * 1000; // 24 hours
16
15
 
17
16
  // If called directly, spawn background process and exit
18
17
  if (process.argv[2] !== '--background') {
@@ -32,15 +31,6 @@ async function checkForUpdate() {
32
31
  fs.mkdirSync(CACHE_DIR, { recursive: true });
33
32
  }
34
33
 
35
- // Check if we've checked recently
36
- if (fs.existsSync(CACHE_FILE)) {
37
- const cache = JSON.parse(fs.readFileSync(CACHE_FILE, 'utf8'));
38
- const age = Date.now() - (cache.timestamp || 0);
39
- if (age < CHECK_INTERVAL) {
40
- process.exit(0);
41
- }
42
- }
43
-
44
34
  // Get current version
45
35
  const currentVersion = getCurrentVersion();
46
36
  if (!currentVersion) {
@@ -92,8 +82,7 @@ function getLatestVersion() {
92
82
  const timeout = setTimeout(() => resolve(null), 10000);
93
83
 
94
84
  const child = spawn('npm', ['view', PACKAGE_NAME, 'version'], {
95
- stdio: ['ignore', 'pipe', 'ignore'],
96
- shell: true
85
+ stdio: ['ignore', 'pipe', 'ignore']
97
86
  });
98
87
 
99
88
  let output = '';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deepflow",
3
- "version": "0.1.21",
3
+ "version": "0.1.23",
4
4
  "description": "Stay in flow state - lightweight spec-driven task orchestration for Claude Code",
5
5
  "keywords": [
6
6
  "claude",
@@ -1,5 +1,15 @@
1
1
  # /df:execute — Execute Tasks from Plan
2
2
 
3
+ ## Orchestrator Role
4
+
5
+ You spawn agents and poll results. You never implement.
6
+
7
+ **NEVER:** Read source files, edit code, run tests, run git (except status), use `TaskOutput`
8
+
9
+ **ONLY:** Read `PLAN.md` + `specs/doing-*.md`, spawn background agents, poll `.deepflow/results/`, update PLAN.md
10
+
11
+ ---
12
+
3
13
  ## Purpose
4
14
  Implement tasks from PLAN.md with parallel agents, atomic commits, and context-efficient execution.
5
15
 
@@ -28,17 +38,21 @@ Statusline writes to `.deepflow/context.json`: `{"percentage": 45}`
28
38
 
29
39
  ## Agent Protocol
30
40
 
31
- Agents write results to `.deepflow/results/{task_id}.yaml`:
41
+ Every task = one background agent. Poll result files, never `TaskOutput`.
42
+
43
+ ```python
44
+ Task(subagent_type="general-purpose", run_in_background=True, prompt="T1: ...")
45
+ # Poll: Glob(".deepflow/results/T*.yaml")
46
+ ```
47
+
48
+ Result file `.deepflow/results/{task_id}.yaml`:
32
49
  ```yaml
33
50
  task: T3
34
- status: success
51
+ status: success|failed
35
52
  commit: abc1234
53
+ summary: "one line"
36
54
  ```
37
55
 
38
- **Spawn with:** `run_in_background: true`
39
- **Poll:** `Glob(".deepflow/results/T*.yaml")`
40
- **NEVER use TaskOutput** — returns full trace, wastes context.
41
-
42
56
  ## Checkpoint & Resume
43
57
 
44
58
  **File:** `.deepflow/checkpoint.json` — stores completed tasks, current wave.
@@ -72,19 +86,24 @@ Warn if `specs/*.md` (excluding doing-/done-) exist. Non-blocking.
72
86
 
73
87
  Ready = `[ ]` + all `blocked_by` complete + not in checkpoint.
74
88
 
75
- ### 5. CHECK CONTEXT & EXECUTE
89
+ ### 5. SPAWN AGENTS
76
90
 
77
- If context ≥50%: wait for agents, checkpoint, exit.
91
+ Context ≥50%: checkpoint and exit.
78
92
 
79
- All ready tasks run in parallel. File conflicts execute sequentially.
93
+ Spawn all ready tasks in ONE message (parallel). Same-file conflicts: sequential.
80
94
 
81
95
  On failure: spawn `reasoner`.
82
96
 
83
- ### 6. PER-TASK (agent)
97
+ ### 6. PER-TASK (agent prompt)
84
98
 
85
- 1. Read existing code patterns (if any)
86
- 2. Implement following existing style
87
- 3. Verify → commit → write result file
99
+ ```
100
+ {task_id}: {description from PLAN.md}
101
+ Files: {target files}
102
+ Spec: {spec_name}
103
+
104
+ Implement, test, commit as feat({spec}): {description}.
105
+ Write result to .deepflow/results/{task_id}.yaml
106
+ ```
88
107
 
89
108
  ### 7. COMPLETE SPECS
90
109
 
@@ -99,13 +118,11 @@ Repeat until: all done, all blocked, or checkpoint.
99
118
 
100
119
  ## Rules
101
120
 
102
- | Rule | Enforcement |
103
- |------|-------------|
104
- | 1 task = 1 commit | `atomic-commits` skill |
105
- | No broken commits | Verify before commit |
106
- | 1 writer per file | Sequential if conflict |
107
- | Minimal returns | 5 lines max from agents |
108
- | Internal verification | Agents fix issues, don't report |
121
+ | Rule | Detail |
122
+ |------|--------|
123
+ | 1 task = 1 agent = 1 commit | `atomic-commits` skill |
124
+ | 1 file = 1 writer | Sequential if conflict |
125
+ | Agents verify internally | Fix issues, don't report |
109
126
 
110
127
  ## Example
111
128