deepflow 0.1.40 → 0.1.41

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.40",
3
+ "version": "0.1.41",
4
4
  "description": "Stay in flow state - lightweight spec-driven task orchestration for Claude Code",
5
5
  "keywords": [
6
6
  "claude",
@@ -128,12 +128,35 @@ Learnings captured:
128
128
 
129
129
  After all verification passes:
130
130
 
131
- ### 1. MERGE TO MAIN
131
+ ### 1. DISCOVER WORKTREE
132
+
133
+ Find worktree info using two strategies (checkpoint → fallback to git):
132
134
 
133
135
  ```bash
134
- # Get worktree info from checkpoint
135
- WORKTREE_BRANCH=$(cat .deepflow/checkpoint.json | jq -r '.worktree_branch')
136
+ # Strategy 1: checkpoint.json (from interrupted executions)
137
+ if [ -f .deepflow/checkpoint.json ]; then
138
+ WORKTREE_BRANCH=$(cat .deepflow/checkpoint.json | jq -r '.worktree_branch')
139
+ WORKTREE_PATH=$(cat .deepflow/checkpoint.json | jq -r '.worktree_path')
140
+ fi
141
+
142
+ # Strategy 2: Infer from doing-* spec + git worktree list (no checkpoint needed)
143
+ if [ -z "${WORKTREE_BRANCH}" ]; then
144
+ SPEC_NAME=$(basename specs/doing-*.md .md | sed 's/doing-//')
145
+ WORKTREE_PATH=".deepflow/worktrees/${SPEC_NAME}"
146
+ # Get branch from git worktree list
147
+ WORKTREE_BRANCH=$(git worktree list --porcelain | grep -A2 "${WORKTREE_PATH}" | grep 'branch' | sed 's|branch refs/heads/||')
148
+ fi
149
+
150
+ # No worktree found — nothing to merge
151
+ if [ -z "${WORKTREE_BRANCH}" ]; then
152
+ echo "No worktree found — nothing to merge. Workflow may already be on main."
153
+ exit 0
154
+ fi
155
+ ```
156
+
157
+ ### 2. MERGE TO MAIN
136
158
 
159
+ ```bash
137
160
  # Switch to main and merge
138
161
  git checkout main
139
162
  git merge "${WORKTREE_BRANCH}" --no-ff -m "feat({spec}): merge verified changes"
@@ -144,20 +167,17 @@ git merge "${WORKTREE_BRANCH}" --no-ff -m "feat({spec}): merge verified changes"
144
167
  - Output: "Merge conflict detected. Resolve manually, then run /df:verify --merge-only"
145
168
  - Exit without cleanup
146
169
 
147
- ### 2. CLEANUP WORKTREE
170
+ ### 3. CLEANUP WORKTREE
148
171
 
149
172
  After successful merge:
150
173
 
151
174
  ```bash
152
- # Get worktree path from checkpoint
153
- WORKTREE_PATH=$(cat .deepflow/checkpoint.json | jq -r '.worktree_path')
154
-
155
175
  # Remove worktree and branch
156
176
  git worktree remove --force "${WORKTREE_PATH}"
157
177
  git branch -d "${WORKTREE_BRANCH}"
158
178
 
159
- # Remove checkpoint
160
- rm .deepflow/checkpoint.json
179
+ # Remove checkpoint if it exists
180
+ rm -f .deepflow/checkpoint.json
161
181
  ```
162
182
 
163
183
  **Output on success:**