deepflow 0.1.19 → 0.1.20

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.19",
3
+ "version": "0.1.20",
4
4
  "description": "Stay in flow state - lightweight spec-driven task orchestration for Claude Code",
5
5
  "keywords": [
6
6
  "claude",
@@ -1,7 +1,7 @@
1
1
  # /df:plan — Generate Task Plan from Specs
2
2
 
3
3
  ## Purpose
4
- Compare specs against codebase, identify gaps, generate prioritized task list.
4
+ Compare specs against codebase AND past experiments, identify gaps, generate prioritized task list informed by historical learnings.
5
5
 
6
6
  ## Usage
7
7
  ```
@@ -42,7 +42,36 @@ Determine source_dir from config or default to src/
42
42
 
43
43
  If no new specs: report counts, suggest `/df:execute`.
44
44
 
45
- ### 2. DETECT PROJECT CONTEXT
45
+ ### 2. CHECK PAST EXPERIMENTS
46
+
47
+ Before proposing approaches, learn from history:
48
+
49
+ ```
50
+ 1. Extract domains from spec keywords (performance, auth, caching, api, etc.)
51
+ 2. Glob `.deepflow/experiments/{domain}--*`
52
+ 3. Read matching files (filenames are the index, minimal token cost)
53
+ 4. Note failed approaches to avoid
54
+ 5. Note successful patterns to reuse
55
+ ```
56
+
57
+ **If experiments found:**
58
+ - Failed: Exclude approach from plan, note why
59
+ - Success: Reference as pattern to follow
60
+
61
+ **File naming convention:**
62
+ ```
63
+ .deepflow/experiments/
64
+ {domain}--{approach}--{result}.md
65
+
66
+ Examples:
67
+ perf--redis-caching--failed.md
68
+ perf--connection-pooling--success.md
69
+ auth--jwt-refresh--success.md
70
+ ```
71
+
72
+ **No experiments?** Continue normally—this is expected for new projects.
73
+
74
+ ### 3. DETECT PROJECT CONTEXT
46
75
 
47
76
  For existing codebases, identify:
48
77
  - Code style/conventions
@@ -51,7 +80,7 @@ For existing codebases, identify:
51
80
 
52
81
  Include patterns in task descriptions for agents to follow.
53
82
 
54
- ### 3. ANALYZE CODEBASE
83
+ ### 4. ANALYZE CODEBASE
55
84
 
56
85
  **Spawn Explore agents** (haiku, read-only) with dynamic count:
57
86
 
@@ -68,7 +97,7 @@ Include patterns in task descriptions for agents to follow.
68
97
  - Stub functions, placeholder returns
69
98
  - Skipped tests, incomplete coverage
70
99
 
71
- ### 4. COMPARE & PRIORITIZE
100
+ ### 5. COMPARE & PRIORITIZE
72
101
 
73
102
  **Spawn `reasoner` agent** (Opus) for analysis:
74
103
 
@@ -86,7 +115,7 @@ Include patterns in task descriptions for agents to follow.
86
115
  2. Impact — core features before enhancements
87
116
  3. Risk — unknowns early
88
117
 
89
- ### 5. VALIDATE HYPOTHESES
118
+ ### 6. VALIDATE HYPOTHESES
90
119
 
91
120
  Before finalizing the plan, identify and test risky assumptions:
92
121
 
@@ -99,8 +128,9 @@ Before finalizing the plan, identify and test risky assumptions:
99
128
  **How to validate:**
100
129
  1. Create minimal prototype (scratchpad, not committed)
101
130
  2. Test the specific assumption
102
- 3. Document findings in task description
103
- 4. Adjust approach if hypothesis fails
131
+ 3. If fails: Write to `.deepflow/experiments/{domain}--{approach}--failed.md`
132
+ 4. Adjust approach based on findings
133
+ 5. Document learnings in task description
104
134
 
105
135
  **Examples:**
106
136
  - "Does SessionStart hook run once per session?" → Test with simple log
@@ -112,19 +142,20 @@ Before finalizing the plan, identify and test risky assumptions:
112
142
  - Simple CRUD operations
113
143
  - Clear documentation exists
114
144
 
115
- ### 6. OUTPUT PLAN.md
145
+ ### 7. OUTPUT PLAN.md
116
146
 
117
147
  Append tasks grouped by `### doing-{spec-name}`. Include spec gaps and validation findings.
118
148
 
119
- ### 7. RENAME SPECS
149
+ ### 8. RENAME SPECS
120
150
 
121
151
  `mv specs/feature.md specs/doing-feature.md`
122
152
 
123
- ### 8. REPORT
153
+ ### 9. REPORT
124
154
 
125
155
  `✓ Plan generated — {n} specs, {n} tasks. Run /df:execute`
126
156
 
127
157
  ## Rules
158
+ - **Learn from history** — Check past experiments before proposing approaches
128
159
  - **Plan only** — Do NOT implement anything (except quick validation prototypes)
129
160
  - **Validate before commit** — Test risky assumptions with minimal experiments
130
161
  - **Confirm before assume** — Search code before marking "missing"
@@ -150,7 +181,9 @@ Append tasks grouped by `### doing-{spec-name}`. Include spec gaps and validatio
150
181
  - Files: src/api/upload.ts
151
182
  - Blocked by: none
152
183
 
153
- - [ ] **T2**: Add S3 service
184
+ - [ ] **T2**: Add S3 service with streaming
154
185
  - Files: src/services/storage.ts
155
186
  - Blocked by: T1
187
+ - Note: Use streaming (see experiments/perf--chunked-upload--success.md)
188
+ - Avoid: Direct buffer upload failed for large files (experiments/perf--buffer-upload--failed.md)
156
189
  ```
@@ -46,6 +46,33 @@ Mark each: ✓ satisfied | ✗ missing | ⚠ partial
46
46
  Report per spec: requirements count, acceptance count, quality issues.
47
47
  If issues: suggest creating fix spec or reopening (`mv done-* doing-*`).
48
48
 
49
+ ### 4. CAPTURE LEARNINGS
50
+
51
+ After successful verification, document significant learnings:
52
+
53
+ **When to write experiment:**
54
+ - Non-trivial implementation approach was used
55
+ - Alternative approaches were considered/rejected during planning
56
+ - Performance optimizations were made
57
+ - Integration patterns were discovered
58
+
59
+ **Write to:** `.deepflow/experiments/{domain}--{approach}--success.md`
60
+
61
+ **Format:**
62
+ ```markdown
63
+ # {Approach} [SUCCESS]
64
+ Objective: {What was the goal}
65
+ Context: {Spec reference, why this was needed}
66
+ Approach: {What was implemented}
67
+ Why it worked: {Key insight}
68
+ Files: {Main files involved}
69
+ ```
70
+
71
+ **Skip when:**
72
+ - Simple CRUD, no learnings
73
+ - Standard patterns, well-documented
74
+ - User declines ("No significant learnings")
75
+
49
76
  ## Verification Levels
50
77
 
51
78
  | Level | Check | Method |
@@ -62,6 +89,7 @@ Default: L1-L3 (L4 optional, can be slow)
62
89
  - Flag partial implementations
63
90
  - Report TODO/FIXME as quality issues
64
91
  - Don't auto-fix — report findings for `/df:plan`
92
+ - Capture learnings — Write experiments for significant approaches
65
93
 
66
94
  ## Agent Usage
67
95
 
@@ -76,4 +104,8 @@ done-upload.md: 4/4 reqs ✓, 5/5 acceptance ✓, clean
76
104
  done-auth.md: 2/2 reqs ✓, 3/3 acceptance ✓, clean
77
105
 
78
106
  ✓ All specs verified
107
+
108
+ Learnings captured:
109
+ → experiments/perf--streaming-upload--success.md
110
+ → experiments/auth--jwt-refresh-rotation--success.md
79
111
  ```