deepflow 0.1.29 → 0.1.31
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 +12 -2
- package/package.json +1 -1
- package/src/commands/df/execute.md +16 -22
- package/src/commands/df/verify.md +1 -1
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
|
+
- **Worktree isolation** — Main branch stays clean during execution
|
|
27
28
|
- **Parallel execution** with context-aware checkpointing
|
|
28
29
|
- **Atomic commits** for clean rollback
|
|
29
30
|
|
|
@@ -70,7 +71,7 @@ CONVERSATION
|
|
|
70
71
|
│ Renames: feature.md → doing-feature.md
|
|
71
72
|
▼
|
|
72
73
|
/df:execute
|
|
73
|
-
│
|
|
74
|
+
│ Creates isolated worktree (main stays clean)
|
|
74
75
|
│ Parallel agents, file conflicts serialize
|
|
75
76
|
│ Context-aware (≥50% → checkpoint)
|
|
76
77
|
│ Atomic commit per task
|
|
@@ -95,6 +96,14 @@ specs/
|
|
|
95
96
|
|
|
96
97
|
**Ongoing:** Detects existing patterns, follows conventions, integrates with current code.
|
|
97
98
|
|
|
99
|
+
## Worktree Isolation
|
|
100
|
+
|
|
101
|
+
Execution happens in an isolated git worktree:
|
|
102
|
+
- Main branch stays clean during execution
|
|
103
|
+
- On failure, worktree preserved for debugging
|
|
104
|
+
- Resume with `/df:execute --continue`
|
|
105
|
+
- On success, changes merged back to main
|
|
106
|
+
|
|
98
107
|
## Context-Aware Execution
|
|
99
108
|
|
|
100
109
|
Statusline shows context usage. At ≥50%:
|
|
@@ -124,7 +133,8 @@ your-project/
|
|
|
124
133
|
└── .deepflow/
|
|
125
134
|
├── context.json # context % for execution
|
|
126
135
|
├── checkpoint.json # resume state
|
|
127
|
-
└──
|
|
136
|
+
└── worktrees/ # isolated execution (main stays clean)
|
|
137
|
+
└── upload/ # one worktree per spec
|
|
128
138
|
```
|
|
129
139
|
|
|
130
140
|
## Configuration
|
package/package.json
CHANGED
|
@@ -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/
|
|
98
|
-
"worktree_branch": "df/
|
|
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
|
|
129
|
+
# Generate paths
|
|
130
130
|
SPEC_NAME=$(basename spec/doing-*.md .md | sed 's/doing-//')
|
|
131
|
-
|
|
132
|
-
|
|
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
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
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
|
-
**
|
|
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
|
-
|
|
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/
|
|
361
|
-
Branch: df/
|
|
356
|
+
Path: .deepflow/worktrees/upload
|
|
357
|
+
Branch: df/upload
|
|
362
358
|
|
|
363
359
|
To investigate:
|
|
364
|
-
cd .deepflow/worktrees/
|
|
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
|
|