deepflow 0.1.30 → 0.1.32

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/README.md CHANGED
@@ -24,6 +24,7 @@
24
24
  - **Stay in flow** — Minimize context switches, maximize deep work
25
25
  - **Conversational ideation** with proactive gap discovery
26
26
  - **Specs define intent**, tasks close reality gaps
27
+ - **Spike-first planning** — Validate risky hypotheses before full implementation
27
28
  - **Worktree isolation** — Main branch stays clean during execution
28
29
  - **Parallel execution** with context-aware checkpointing
29
30
  - **Atomic commits** for clean rollback
@@ -65,19 +66,20 @@ CONVERSATION
65
66
  │ Creates specs/{name}.md
66
67
 
67
68
  /df:plan
68
- Detects project context/patterns
69
- Analyzes specs vs codebase
70
- │ Creates PLAN.md with tasks
69
+ Checks past experiments (learn from failures)
70
+ Risky work? generates spike task first
71
+ │ Creates PLAN.md with prioritized tasks
71
72
  │ Renames: feature.md → doing-feature.md
72
73
 
73
74
  /df:execute
74
75
  │ Creates isolated worktree (main stays clean)
76
+ │ Spike tasks run first, verified before continuing
75
77
  │ Parallel agents, file conflicts serialize
76
78
  │ Context-aware (≥50% → checkpoint)
77
- │ Atomic commit per task
78
79
 
79
80
  /df:verify
80
81
  │ Checks requirements met
82
+ │ Merges worktree to main, cleans up
81
83
  │ Renames: doing-feature.md → done-feature.md
82
84
  ```
83
85
 
@@ -96,13 +98,26 @@ specs/
96
98
 
97
99
  **Ongoing:** Detects existing patterns, follows conventions, integrates with current code.
98
100
 
101
+ ## Spike-First Planning
102
+
103
+ For risky or uncertain work, `/df:plan` generates a **spike task** first:
104
+
105
+ ```
106
+ Spike: Validate streaming upload handles 10MB+ files
107
+ │ Run minimal experiment
108
+ │ Pass? → Unblock implementation tasks
109
+ │ Fail? → Record learning, generate new hypothesis
110
+ ```
111
+
112
+ Experiments are tracked in `.deepflow/experiments/`. Failed approaches won't be repeated.
113
+
99
114
  ## Worktree Isolation
100
115
 
101
116
  Execution happens in an isolated git worktree:
102
117
  - Main branch stays clean during execution
103
118
  - On failure, worktree preserved for debugging
104
119
  - Resume with `/df:execute --continue`
105
- - On success, changes merged back to main
120
+ - On success, `/df:verify` merges to main and cleans up
106
121
 
107
122
  ## Context-Aware Execution
108
123
 
@@ -129,12 +144,13 @@ your-project/
129
144
  │ ├── auth.md # new spec
130
145
  │ ├── doing-upload.md # in progress
131
146
  │ └── done-payments.md # completed
132
- ├── PLAN.md # active tasks only
147
+ ├── PLAN.md # active tasks
133
148
  └── .deepflow/
134
- ├── context.json # context % for execution
135
- ├── checkpoint.json # resume state
136
- └── worktrees/ # isolated execution (main stays clean)
137
- └── df/doing-upload/20260202-1430/
149
+ ├── config.yaml # project settings
150
+ ├── context.json # context % tracking
151
+ ├── experiments/ # spike results (pass/fail)
152
+ └── worktrees/ # isolated execution
153
+ └── upload/ # one worktree per spec
138
154
  ```
139
155
 
140
156
  ## Configuration
@@ -145,6 +161,14 @@ Create `.deepflow/config.yaml`:
145
161
  project:
146
162
  source_dir: src/
147
163
  specs_dir: specs/
164
+
165
+ parallelism:
166
+ execute:
167
+ max: 5 # max parallel agents
168
+
169
+ worktree:
170
+ cleanup_on_success: true
171
+ cleanup_on_fail: false # preserve for debugging
148
172
  ```
149
173
 
150
174
  ## Principles
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deepflow",
3
- "version": "0.1.30",
3
+ "version": "0.1.32",
4
4
  "description": "Stay in flow state - lightweight spec-driven task orchestration for Claude Code",
5
5
  "keywords": [
6
6
  "claude",
@@ -94,8 +94,8 @@ experiment_file: ".deepflow/experiments/upload--streaming--failed.md"
94
94
  {
95
95
  "completed_tasks": ["T1", "T2"],
96
96
  "current_wave": 2,
97
- "worktree_path": ".deepflow/worktrees/df/doing-upload/20260202-1430",
98
- "worktree_branch": "df/doing-upload/20260202-1430"
97
+ "worktree_path": ".deepflow/worktrees/upload",
98
+ "worktree_branch": "df/upload"
99
99
  }
100
100
  ```
101
101
 
@@ -126,26 +126,22 @@ Before spawning any agents, create an isolated worktree:
126
126
  # Check main is clean (ignore untracked)
127
127
  git diff --quiet HEAD || Error: "Main has uncommitted changes. Commit or stash first."
128
128
 
129
- # Generate worktree path
129
+ # Generate paths
130
130
  SPEC_NAME=$(basename spec/doing-*.md .md | sed 's/doing-//')
131
- TIMESTAMP=$(date +%Y%m%d-%H%M)
132
- BRANCH_NAME="df/${SPEC_NAME}/${TIMESTAMP}"
133
- WORKTREE_PATH=".deepflow/worktrees/${BRANCH_NAME}"
131
+ BRANCH_NAME="df/${SPEC_NAME}"
132
+ WORKTREE_PATH=".deepflow/worktrees/${SPEC_NAME}"
134
133
 
135
- # Create worktree
136
- git worktree add -b "${BRANCH_NAME}" "${WORKTREE_PATH}"
137
-
138
- # Store in checkpoint for resume
139
- checkpoint.worktree_path = WORKTREE_PATH
140
- checkpoint.worktree_branch = BRANCH_NAME
134
+ # Create worktree (or reuse existing)
135
+ if [ -d "${WORKTREE_PATH}" ]; then
136
+ echo "Reusing existing worktree"
137
+ else
138
+ git worktree add -b "${BRANCH_NAME}" "${WORKTREE_PATH}"
139
+ fi
141
140
  ```
142
141
 
143
- **Resume handling:**
144
- - If checkpoint has worktree_path → verify it exists, use it
145
- - If worktree missing → Error: "Worktree deleted. Use --fresh"
142
+ **Existing worktree:** Reuse it (same spec = same worktree).
146
143
 
147
- **Existing worktree handling:**
148
- - If worktree exists for same spec → Prompt: "Resume existing worktree? (y/n/delete)"
144
+ **--fresh flag:** Deletes existing worktree and creates new one.
149
145
 
150
146
  ### 2. LOAD PLAN
151
147
 
@@ -357,19 +353,17 @@ When a task fails and cannot be auto-fixed:
357
353
  ✗ Task T3 failed after retry
358
354
 
359
355
  Worktree preserved for debugging:
360
- Path: .deepflow/worktrees/df/doing-upload/20260202-1430
361
- Branch: df/doing-upload/20260202-1430
356
+ Path: .deepflow/worktrees/upload
357
+ Branch: df/upload
362
358
 
363
359
  To investigate:
364
- cd .deepflow/worktrees/df/doing-upload/20260202-1430
360
+ cd .deepflow/worktrees/upload
365
361
  # examine files, run tests, etc.
366
362
 
367
363
  To resume after fixing:
368
364
  /df:execute --continue
369
365
 
370
366
  To discard and start fresh:
371
- git worktree remove --force .deepflow/worktrees/df/doing-upload/20260202-1430
372
- git branch -D df/doing-upload/20260202-1430
373
367
  /df:execute --fresh
374
368
  ```
375
369
 
@@ -157,7 +157,7 @@ rm .deepflow/checkpoint.json
157
157
 
158
158
  **Output on success:**
159
159
  ```
160
- ✓ Merged df/doing-upload/20260202-1430 to main
160
+ ✓ Merged df/upload to main
161
161
  ✓ Cleaned up worktree and branch
162
162
  ✓ Spec complete: doing-upload → done-upload
163
163