deepflow 0.1.18 → 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.18",
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,20 +115,49 @@ 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. OUTPUT PLAN.md
118
+ ### 6. VALIDATE HYPOTHESES
119
+
120
+ Before finalizing the plan, identify and test risky assumptions:
121
+
122
+ **When to validate:**
123
+ - Unfamiliar APIs or libraries
124
+ - Architectural decisions with multiple approaches
125
+ - Integration with external systems
126
+ - Performance-critical paths
127
+
128
+ **How to validate:**
129
+ 1. Create minimal prototype (scratchpad, not committed)
130
+ 2. Test the specific assumption
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
134
+
135
+ **Examples:**
136
+ - "Does SessionStart hook run once per session?" → Test with simple log
137
+ - "Can we use streaming for large files?" → Prototype with sample data
138
+ - "Will this regex handle edge cases?" → Test against real samples
139
+
140
+ **Skip validation when:**
141
+ - Using well-known patterns
142
+ - Simple CRUD operations
143
+ - Clear documentation exists
144
+
145
+ ### 7. OUTPUT PLAN.md
90
146
 
91
- Append tasks grouped by `### doing-{spec-name}`. Include spec gaps if any.
147
+ Append tasks grouped by `### doing-{spec-name}`. Include spec gaps and validation findings.
92
148
 
93
- ### 6. RENAME SPECS
149
+ ### 8. RENAME SPECS
94
150
 
95
151
  `mv specs/feature.md specs/doing-feature.md`
96
152
 
97
- ### 7. REPORT
153
+ ### 9. REPORT
98
154
 
99
155
  `✓ Plan generated — {n} specs, {n} tasks. Run /df:execute`
100
156
 
101
157
  ## Rules
102
- - **Plan only** — Do NOT implement anything
158
+ - **Learn from history** — Check past experiments before proposing approaches
159
+ - **Plan only** — Do NOT implement anything (except quick validation prototypes)
160
+ - **Validate before commit** — Test risky assumptions with minimal experiments
103
161
  - **Confirm before assume** — Search code before marking "missing"
104
162
  - **One task = one logical unit** — Atomic, committable
105
163
  - Prefer existing utilities over new code
@@ -123,7 +181,9 @@ Append tasks grouped by `### doing-{spec-name}`. Include spec gaps if any.
123
181
  - Files: src/api/upload.ts
124
182
  - Blocked by: none
125
183
 
126
- - [ ] **T2**: Add S3 service
184
+ - [ ] **T2**: Add S3 service with streaming
127
185
  - Files: src/services/storage.ts
128
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)
129
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
  ```