deepflow 0.1.49 → 0.1.50

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
@@ -41,29 +41,39 @@ npx deepflow --uninstall
41
41
  # In your project
42
42
  claude
43
43
 
44
- # 1. Discuss what you want to build
45
- # 2. Generate spec when ready
44
+ # 1. Explore the problem space
45
+ /df:discover image-upload
46
+
47
+ # 2. Debate tradeoffs (optional)
48
+ /df:debate upload-strategy
49
+
50
+ # 3. Generate spec from conversation
46
51
  /df:spec image-upload
47
52
 
48
- # 3. Compare specs to code, generate tasks
53
+ # 4. Compare specs to code, generate tasks
49
54
  /df:plan
50
55
 
51
- # 4. Execute tasks with parallel agents
56
+ # 5. Execute tasks with parallel agents
52
57
  /df:execute
53
58
 
54
- # 5. Verify specs are satisfied
59
+ # 6. Verify specs are satisfied
55
60
  /df:verify
56
61
  ```
57
62
 
58
63
  ## The Flow
59
64
 
60
65
  ```
61
- CONVERSATION
62
- Describe what you want
63
- LLM asks gap questions
66
+ /df:discover <name>
67
+ Socratic questioning (motivation, scope, constraints...)
68
+ Captures decisions to .deepflow/decisions.md
69
+
70
+ /df:debate <topic> ← optional
71
+ │ 4 perspectives: User Advocate, Tech Skeptic,
72
+ │ Systems Thinker, LLM Efficiency
73
+ │ Creates specs/.debate-{topic}.md
64
74
 
65
75
  /df:spec <name>
66
- │ Creates specs/{name}.md
76
+ │ Creates specs/{name}.md from conversation
67
77
 
68
78
  /df:plan
69
79
  │ Checks past experiments (learn from failures)
@@ -130,10 +140,14 @@ Statusline shows context usage. At ≥50%:
130
140
 
131
141
  | Command | Purpose |
132
142
  |---------|---------|
143
+ | `/df:discover <name>` | Explore problem space with Socratic questioning |
144
+ | `/df:debate <topic>` | Multi-perspective analysis (4 agents) |
133
145
  | `/df:spec <name>` | Generate spec from conversation |
134
146
  | `/df:plan` | Compare specs to code, create tasks |
135
147
  | `/df:execute` | Run tasks with parallel agents |
136
148
  | `/df:verify` | Check specs satisfied |
149
+ | `/df:note` | Capture decisions from conversation |
150
+ | `/df:resume` | Session continuity briefing |
137
151
  | `/df:update` | Update deepflow to latest |
138
152
 
139
153
  ## File Structure
@@ -147,6 +161,7 @@ your-project/
147
161
  ├── PLAN.md # active tasks
148
162
  └── .deepflow/
149
163
  ├── config.yaml # project settings
164
+ ├── decisions.md # captured decisions (/df:note, /df:discover)
150
165
  ├── context.json # context % tracking
151
166
  ├── experiments/ # spike results (pass/fail)
152
167
  └── worktrees/ # isolated execution
package/bin/install.js CHANGED
@@ -146,7 +146,7 @@ async function main() {
146
146
  console.log(`${c.green}Installation complete!${c.reset}`);
147
147
  console.log('');
148
148
  console.log(`Installed to ${c.cyan}${CLAUDE_DIR}${c.reset}:`);
149
- console.log(' commands/df/ — /df:discover, /df:debate, /df:spec, /df:plan, /df:execute, /df:verify');
149
+ console.log(' commands/df/ — /df:discover, /df:debate, /df:spec, /df:plan, /df:execute, /df:verify, /df:note, /df:resume, /df:update');
150
150
  console.log(' skills/ — gap-discovery, atomic-commits, code-completeness');
151
151
  console.log(' agents/ — reasoner');
152
152
  if (level === 'global') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deepflow",
3
- "version": "0.1.49",
3
+ "version": "0.1.50",
4
4
  "description": "Stay in flow state - lightweight spec-driven task orchestration for Claude Code",
5
5
  "keywords": [
6
6
  "claude",
@@ -35,136 +35,83 @@ Generate a multi-perspective analysis of a problem before formalizing into a spe
35
35
 
36
36
  ### 1. SUMMARIZE
37
37
 
38
- Summarize the conversation context (from prior discover/conversation) in ~200 words. This summary will be passed to each perspective agent.
39
-
40
- The summary should capture:
41
- - The core problem being solved
42
- - Key requirements mentioned
43
- - Constraints and boundaries
44
- - User's stated preferences and priorities
38
+ Summarize conversation context in ~200 words: core problem, key requirements, constraints, user priorities. Passed to each perspective agent.
45
39
 
46
40
  ### 2. GATHER CODEBASE CONTEXT
47
41
 
48
- Before spawning perspectives, ground the debate in what actually exists. Use Glob, Grep, and Read to understand the current implementation relevant to the debate topic.
49
-
50
- **Steps:**
51
- 1. **Glob** for files related to the topic (e.g., `**/*{topic}*`, `src/**/*.{ts,js,py}`)
52
- 2. **Grep** for key terms, patterns, or interfaces mentioned in the conversation
53
- 3. **Read** the most relevant files (up to 5-6 files — focus on core logic, not boilerplate)
54
-
55
- **Produce a ~300 word codebase summary covering:**
56
- - What already exists (implemented features, patterns, architecture)
57
- - Key interfaces, types, or contracts in play
58
- - Current limitations or technical debt visible in the code
59
- - Dependencies and integration points
42
+ Ground the debate in what actually exists. Glob/Grep/Read relevant files (up to 5-6, focus on core logic).
60
43
 
61
- This codebase summary is appended to the context passed to every perspective agent, so they argue from facts rather than assumptions.
44
+ Produce a ~300 word codebase summary: what exists, key interfaces/contracts, current limitations, dependencies. Passed to every perspective agent so they argue from facts, not assumptions.
62
45
 
63
46
  ### 3. SPAWN PERSPECTIVES
64
47
 
65
48
  **Spawn ALL 4 perspective agents in ONE message (non-background, parallel):**
66
49
 
67
- Each agent receives the same context summary + codebase context but a different role. Each must:
68
- - Argue from their perspective, grounded in what the codebase actually does
69
- - Identify risks the other perspectives might miss
70
- - Propose concrete alternatives where they disagree with the likely approach
71
-
72
- ```python
73
- # All 4 in a single message — parallel, non-background:
74
- Task(subagent_type="reasoner", model="opus", prompt="""
75
- You are the USER ADVOCATE in a design debate.
50
+ Each agent receives the same preamble + codebase context but a different role lens.
76
51
 
52
+ **Shared preamble for all perspectives:**
53
+ ```
77
54
  ## Context
78
55
  {summary}
79
56
 
80
57
  ## Current Codebase
81
58
  {codebase_summary}
82
59
 
83
- ## Your Role
84
- Argue from the perspective of the end user. Focus on:
85
- - Simplicity and ease of use
86
- - Real user needs vs assumed needs
87
- - Friction points and cognitive load
88
- - Whether the solution matches how users actually think
89
-
90
60
  Provide:
91
61
  1. Your key arguments (3-5 points)
92
- 2. Risks you see from a user perspective
62
+ 2. Risks your perspective surfaces
93
63
  3. Concrete alternatives if you disagree with the current direction
94
64
 
95
65
  Keep response under 400 words.
96
- """)
66
+ ```
67
+
68
+ **Perspective-specific role lenses (append to preamble):**
69
+
70
+ ```python
71
+ # All 4 in a single message — parallel, non-background:
97
72
 
98
73
  Task(subagent_type="reasoner", model="opus", prompt="""
99
- You are the TECH SKEPTIC in a design debate.
74
+ {shared_preamble}
100
75
 
101
- ## Context
102
- {summary}
76
+ ## Your Role: USER ADVOCATE
77
+ Argue from the perspective of the end user. Focus on:
78
+ - Simplicity and ease of use
79
+ - Real user needs vs assumed needs
80
+ - Friction points and cognitive load
81
+ - Whether the solution matches how users actually think
82
+ """)
103
83
 
104
- ## Current Codebase
105
- {codebase_summary}
84
+ Task(subagent_type="reasoner", model="opus", prompt="""
85
+ {shared_preamble}
106
86
 
107
- ## Your Role
87
+ ## Your Role: TECH SKEPTIC
108
88
  Challenge technical assumptions and surface hidden complexity. Focus on:
109
89
  - What could go wrong technically
110
90
  - Hidden dependencies or coupling
111
91
  - Complexity that seems simple but isn't
112
92
  - Maintenance burden over time
113
-
114
- Provide:
115
- 1. Your key arguments (3-5 points)
116
- 2. Technical risks others might overlook
117
- 3. Simpler alternatives worth considering
118
-
119
- Keep response under 400 words.
120
93
  """)
121
94
 
122
95
  Task(subagent_type="reasoner", model="opus", prompt="""
123
- You are the SYSTEMS THINKER in a design debate.
124
-
125
- ## Context
126
- {summary}
127
-
128
- ## Current Codebase
129
- {codebase_summary}
96
+ {shared_preamble}
130
97
 
131
- ## Your Role
98
+ ## Your Role: SYSTEMS THINKER
132
99
  Analyze how this fits into the broader system. Focus on:
133
100
  - Integration with existing components
134
101
  - Scalability implications
135
102
  - Second-order effects and unintended consequences
136
103
  - Long-term evolution and extensibility
137
-
138
- Provide:
139
- 1. Your key arguments (3-5 points)
140
- 2. Systemic risks and ripple effects
141
- 3. Architectural alternatives worth considering
142
-
143
- Keep response under 400 words.
144
104
  """)
145
105
 
146
106
  Task(subagent_type="reasoner", model="opus", prompt="""
147
- You are the LLM EFFICIENCY expert in a design debate.
148
-
149
- ## Context
150
- {summary}
151
-
152
- ## Current Codebase
153
- {codebase_summary}
107
+ {shared_preamble}
154
108
 
155
- ## Your Role
109
+ ## Your Role: LLM EFFICIENCY
156
110
  Evaluate from the perspective of LLM consumption and interaction. Focus on:
157
111
  - Token density: can the output be consumed efficiently by LLMs?
158
112
  - Minimal scaffolding: avoid ceremony that adds tokens without information
159
113
  - Navigable structure: can an LLM quickly find what it needs?
160
114
  - Attention budget: does the design respect limited context windows?
161
-
162
- Provide:
163
- 1. Your key arguments (3-5 points)
164
- 2. Efficiency risks others might not consider
165
- 3. Alternatives that optimize for LLM consumption
166
-
167
- Keep response under 400 words.
168
115
  """)
169
116
  ```
170
117
 
@@ -207,83 +154,21 @@ Keep response under 500 words.
207
154
 
208
155
  ### 5. WRITE DEBATE FILE
209
156
 
210
- Create `specs/.debate-{name}.md`:
211
-
212
- ```markdown
213
- # Debate: {Name}
214
-
215
- ## Context
216
- [~200 word summary from step 1]
217
-
218
- ## Codebase Context
219
- [~300 word summary from step 2 — what exists, key patterns, limitations]
220
-
221
- ## Perspectives
222
-
223
- ### User Advocate
224
- [arguments from agent]
225
-
226
- ### Tech Skeptic
227
- [arguments from agent]
228
-
229
- ### Systems Thinker
230
- [arguments from agent]
231
-
232
- ### LLM Efficiency
233
- [arguments from agent]
234
-
235
- ## Synthesis
236
-
237
- ### Consensus
238
- [from synthesizer]
239
-
240
- ### Tensions
241
- [from synthesizer]
242
-
243
- ### Open Decisions
244
- [from synthesizer]
245
-
246
- ### Recommendation
247
- [from synthesizer]
248
- ```
157
+ Create `specs/.debate-{name}.md` with sections: Context · Codebase Context · Perspectives (User Advocate / Tech Skeptic / Systems Thinker / LLM Efficiency) · Synthesis (Consensus / Tensions / Open Decisions / Recommendation).
249
158
 
250
159
  ### 6. CONFIRM
251
160
 
252
- After writing the file, present a brief summary to the user:
253
-
254
- ```
255
- ✓ Created specs/.debate-{name}.md
256
-
257
- Key tensions:
258
- - [tension 1]
259
- - [tension 2]
260
-
261
- Open decisions:
262
- - [decision 1]
263
- - [decision 2]
264
-
265
- Next: Run /df:spec {name} to formalize into a specification
266
- ```
161
+ Present key tensions and open decisions, then: `Next: Run /df:spec {name} to formalize into a specification`
267
162
 
268
163
  ### 7. CAPTURE DECISIONS
269
164
 
270
- Extract up to 4 candidates from consensus/resolved tensions. Ask user via `AskUserQuestion(multiSelect=True)` with options like `{ label: "[APPROACH] {decision}", description: "{rationale}" }`.
271
-
272
- For confirmed decisions, append to `.deepflow/decisions.md` (create if absent) using format:
273
- ```
274
- ### {YYYY-MM-DD} — debate
275
- - [{TAG}] {decision text} — {rationale}
276
- ```
277
- Tags: [APPROACH] directional choices · [PROVISIONAL] tentative · [ASSUMPTION] unverified premises. If a new decision contradicts an existing one, note the conflict inline.
165
+ Follow the **default** variant from `templates/decision-capture.md`. Command name: `debate`.
278
166
 
279
167
  ---
280
168
 
281
169
  ## Rules
282
170
 
283
171
  - **All 4 perspective agents MUST be spawned in ONE message** (parallel, non-background)
284
- - **NEVER use `run_in_background`** — causes late notifications that pollute output
285
- - **NEVER use TaskOutput** — returns full transcripts that explode context
286
- - **NEVER use Explore agents** — the orchestrator gathers context directly
287
172
  - **Codebase context is gathered by the orchestrator** (step 2) and passed to agents via prompt
288
173
  - Reasoner agents receive context through their prompt, not by reading files themselves
289
174
  - The debate file goes in `specs/` so `/df:spec` can reference it
@@ -81,31 +81,12 @@ Example questions:
81
81
  - Mix structured questions (AskUserQuestion) with conversational follow-ups
82
82
  - Ask follow-up questions based on answers — don't just march through phases mechanically
83
83
  - Go deeper on surprising or unclear answers
84
-
85
84
  ### Behavioral Rules
86
- - **NEVER assume** — if something is ambiguous, ask
87
- - **NEVER suggest ending** — the user decides when they're done
88
- - **NEVER take action** — no code reading, no file creation, no agents
89
- - **NEVER skip phases** — but adapt depth based on the problem
90
85
  - Keep your responses short between questions — don't lecture
91
86
  - Acknowledge answers briefly before asking the next question
92
87
 
93
88
  ### Decision Capture
94
- When the user signals they are ready to move on, before presenting next-step options, extract up to 4 candidate decisions from the session (meaningful choices about approach, scope, or constraints). Present via `AskUserQuestion` with `multiSelect: true`, e.g.:
95
-
96
- ```json
97
- {"questions": [{"question": "Which decisions should be recorded?", "header": "Decisions", "multiSelect": true,
98
- "options": [{"label": "[APPROACH] Use event sourcing", "description": "Matches audit requirements"}]}]}
99
- ```
100
-
101
- For each confirmed decision, append to `.deepflow/decisions.md` (create if missing):
102
- ```
103
- ### {YYYY-MM-DD} — discover
104
- - [APPROACH] Decision text — rationale
105
- ```
106
-
107
- Tags: `[APPROACH]` firm choice · `[PROVISIONAL]` revisit later · `[ASSUMPTION]` unverified belief.
108
-
89
+ Follow the **default** variant from `templates/decision-capture.md`. Command name: `discover`.
109
90
  ### When the User Wants to Move On
110
91
  When the user signals they want to advance (e.g., "I think that's enough", "let's move on", "ready for next step"):
111
92