deepflow 0.1.47 → 0.1.49

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.47",
3
+ "version": "0.1.49",
4
4
  "description": "Stay in flow state - lightweight spec-driven task orchestration for Claude Code",
5
5
  "keywords": [
6
6
  "claude",
@@ -4,9 +4,9 @@
4
4
 
5
5
  You coordinate reasoner agents to debate a problem from multiple perspectives, then synthesize their arguments into a structured document.
6
6
 
7
- **NEVER:** Read source files, use Glob/Grep directly, run git, use TaskOutput, use `run_in_background`, use Explore agents
7
+ **NEVER:** use TaskOutput, use `run_in_background`, use Explore agents, use EnterPlanMode, use ExitPlanMode
8
8
 
9
- **ONLY:** Spawn reasoner agents (non-background), write debate file, respond conversationally
9
+ **ONLY:** Gather codebase context (Glob/Grep/Read), spawn reasoner agents (non-background), write debate file, respond conversationally
10
10
 
11
11
  ---
12
12
 
@@ -43,12 +43,29 @@ The summary should capture:
43
43
  - Constraints and boundaries
44
44
  - User's stated preferences and priorities
45
45
 
46
- ### 2. SPAWN PERSPECTIVES
46
+ ### 2. GATHER CODEBASE CONTEXT
47
+
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
60
+
61
+ This codebase summary is appended to the context passed to every perspective agent, so they argue from facts rather than assumptions.
62
+
63
+ ### 3. SPAWN PERSPECTIVES
47
64
 
48
65
  **Spawn ALL 4 perspective agents in ONE message (non-background, parallel):**
49
66
 
50
- Each agent receives the same context summary but a different role. Each must:
51
- - Argue from their perspective
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
52
69
  - Identify risks the other perspectives might miss
53
70
  - Propose concrete alternatives where they disagree with the likely approach
54
71
 
@@ -60,6 +77,9 @@ You are the USER ADVOCATE in a design debate.
60
77
  ## Context
61
78
  {summary}
62
79
 
80
+ ## Current Codebase
81
+ {codebase_summary}
82
+
63
83
  ## Your Role
64
84
  Argue from the perspective of the end user. Focus on:
65
85
  - Simplicity and ease of use
@@ -81,6 +101,9 @@ You are the TECH SKEPTIC in a design debate.
81
101
  ## Context
82
102
  {summary}
83
103
 
104
+ ## Current Codebase
105
+ {codebase_summary}
106
+
84
107
  ## Your Role
85
108
  Challenge technical assumptions and surface hidden complexity. Focus on:
86
109
  - What could go wrong technically
@@ -102,6 +125,9 @@ You are the SYSTEMS THINKER in a design debate.
102
125
  ## Context
103
126
  {summary}
104
127
 
128
+ ## Current Codebase
129
+ {codebase_summary}
130
+
105
131
  ## Your Role
106
132
  Analyze how this fits into the broader system. Focus on:
107
133
  - Integration with existing components
@@ -123,6 +149,9 @@ You are the LLM EFFICIENCY expert in a design debate.
123
149
  ## Context
124
150
  {summary}
125
151
 
152
+ ## Current Codebase
153
+ {codebase_summary}
154
+
126
155
  ## Your Role
127
156
  Evaluate from the perspective of LLM consumption and interaction. Focus on:
128
157
  - Token density: can the output be consumed efficiently by LLMs?
@@ -139,7 +168,7 @@ Keep response under 400 words.
139
168
  """)
140
169
  ```
141
170
 
142
- ### 3. SYNTHESIZE
171
+ ### 4. SYNTHESIZE
143
172
 
144
173
  After all 4 perspectives return, spawn 1 additional reasoner to synthesize:
145
174
 
@@ -176,7 +205,7 @@ Keep response under 500 words.
176
205
  """)
177
206
  ```
178
207
 
179
- ### 4. WRITE DEBATE FILE
208
+ ### 5. WRITE DEBATE FILE
180
209
 
181
210
  Create `specs/.debate-{name}.md`:
182
211
 
@@ -186,6 +215,9 @@ Create `specs/.debate-{name}.md`:
186
215
  ## Context
187
216
  [~200 word summary from step 1]
188
217
 
218
+ ## Codebase Context
219
+ [~300 word summary from step 2 — what exists, key patterns, limitations]
220
+
189
221
  ## Perspectives
190
222
 
191
223
  ### User Advocate
@@ -215,7 +247,7 @@ Create `specs/.debate-{name}.md`:
215
247
  [from synthesizer]
216
248
  ```
217
249
 
218
- ### 5. CONFIRM
250
+ ### 6. CONFIRM
219
251
 
220
252
  After writing the file, present a brief summary to the user:
221
253
 
@@ -233,6 +265,17 @@ Open decisions:
233
265
  Next: Run /df:spec {name} to formalize into a specification
234
266
  ```
235
267
 
268
+ ### 7. CAPTURE DECISIONS
269
+
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.
278
+
236
279
  ---
237
280
 
238
281
  ## Rules
@@ -240,9 +283,9 @@ Next: Run /df:spec {name} to formalize into a specification
240
283
  - **All 4 perspective agents MUST be spawned in ONE message** (parallel, non-background)
241
284
  - **NEVER use `run_in_background`** — causes late notifications that pollute output
242
285
  - **NEVER use TaskOutput** — returns full transcripts that explode context
243
- - **NEVER use Explore agents** — this command doesn't read code
244
- - **NEVER read source files directly** agents receive context via prompt only
245
- - Reasoner agents receive context through their prompt, not by reading files
286
+ - **NEVER use Explore agents** — the orchestrator gathers context directly
287
+ - **Codebase context is gathered by the orchestrator** (step 2) and passed to agents via prompt
288
+ - Reasoner agents receive context through their prompt, not by reading files themselves
246
289
  - The debate file goes in `specs/` so `/df:spec` can reference it
247
290
  - File name MUST be `.debate-{name}.md` (dot prefix = auxiliary file)
248
291
  - Keep each perspective under 400 words, synthesis under 500 words
@@ -252,13 +295,16 @@ Next: Run /df:spec {name} to formalize into a specification
252
295
  ```
253
296
  USER: /df:debate auth
254
297
 
255
- CLAUDE: Let me summarize what we've discussed and get multiple perspectives
256
- on the authentication design.
298
+ CLAUDE: Let me summarize what we've discussed and understand the current
299
+ codebase before getting multiple perspectives on the authentication design.
257
300
 
258
301
  [Summarizes: ~200 words about auth requirements from conversation]
259
302
 
260
- [Spawns 4 reasoner agents in parallel User Advocate, Tech Skeptic,
261
- Systems Thinker, LLM Efficiency]
303
+ [Globs/Greps/Reads relevant auth filesmiddleware, routes, config]
304
+
305
+ [Produces ~300 word codebase summary of what exists]
306
+
307
+ [Spawns 4 reasoner agents in parallel — each receives both summaries]
262
308
 
263
309
  [All 4 return their arguments]
264
310
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  You are a Socratic questioner. Your ONLY job is to ask questions that surface hidden requirements, assumptions, and constraints.
6
6
 
7
- **NEVER:** Read source files, use Glob/Grep, spawn agents, create files, run git, use TaskOutput, use Task tool
7
+ **NEVER:** Read source files, use Glob/Grep, spawn agents, create files (except `.deepflow/decisions.md`), run git, use TaskOutput, use Task tool, use EnterPlanMode, use ExitPlanMode
8
8
 
9
9
  **ONLY:** Ask questions using `AskUserQuestion` tool, respond conversationally
10
10
 
@@ -90,6 +90,22 @@ Example questions:
90
90
  - Keep your responses short between questions — don't lecture
91
91
  - Acknowledge answers briefly before asking the next question
92
92
 
93
+ ### 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
+
93
109
  ### When the User Wants to Move On
94
110
  When the user signals they want to advance (e.g., "I think that's enough", "let's move on", "ready for next step"):
95
111
 
@@ -4,9 +4,9 @@
4
4
 
5
5
  You are a coordinator. Spawn agents, wait for results, update PLAN.md. Never implement code yourself.
6
6
 
7
- **NEVER:** Read source files, edit code, run tests, run git commands (except status), use TaskOutput
7
+ **NEVER:** Read source files, edit code, run tests, run git commands (except status), use TaskOutput, use EnterPlanMode, use ExitPlanMode
8
8
 
9
- **ONLY:** Read PLAN.md, read specs/doing-*.md, spawn background agents, read `.deepflow/results/*.yaml` on completion notifications, update PLAN.md
9
+ **ONLY:** Read PLAN.md, read specs/doing-*.md, spawn background agents, read `.deepflow/results/*.yaml` on completion notifications, update PLAN.md, write `.deepflow/decisions.md` in the main tree
10
10
 
11
11
  ---
12
12
 
@@ -524,6 +524,22 @@ After spawning wave agents, your turn ENDS. Completion notifications drive the l
524
524
 
525
525
  **Repeat** until: all done, all blocked, or context ≥50% (checkpoint).
526
526
 
527
+ ### 11. CAPTURE DECISIONS
528
+
529
+ After all tasks complete (or all blocked), extract up to 4 candidate decisions from the session (implementation patterns, deviations from plan, key assumptions made).
530
+
531
+ Present via AskUserQuestion with multiSelect: true. Labels: `[TAG] decision text`. Descriptions: rationale.
532
+
533
+ For each confirmed decision, append to **main tree** `.deepflow/decisions.md` (create if missing):
534
+ ```
535
+ ### {YYYY-MM-DD} — execute
536
+ - [APPROACH] Parallel agent spawn for independent tasks — confirmed no file conflicts
537
+ ```
538
+
539
+ Main tree path: use the repo root (parent of `.deepflow/worktrees/`), NOT the worktree.
540
+
541
+ Max 4 candidates per prompt. Tags: [APPROACH], [PROVISIONAL], [ASSUMPTION].
542
+
527
543
  ## Rules
528
544
 
529
545
  | Rule | Detail |
@@ -0,0 +1,206 @@
1
+ # /df:note — Capture Decisions from Free Conversations
2
+
3
+ ## Orchestrator Role
4
+
5
+ You scan prior conversation context for candidate decisions, present them for user confirmation, and persist confirmed decisions to `.deepflow/decisions.md`.
6
+
7
+ **NEVER:** Spawn agents, use Task tool, use Glob/Grep on source code, run git, use TaskOutput, use EnterPlanMode, use ExitPlanMode
8
+
9
+ **ONLY:** Read `.deepflow/decisions.md` (if it exists), present candidates via `AskUserQuestion`, append confirmed decisions to `.deepflow/decisions.md`
10
+
11
+ ---
12
+
13
+ ## Purpose
14
+
15
+ Capture decisions that emerged during free conversations outside of deepflow commands. Surfaces candidate decisions from the current conversation, lets the user confirm or discard each, and persists confirmed ones to the shared decisions log.
16
+
17
+ ## Usage
18
+
19
+ ```
20
+ /df:note
21
+ ```
22
+
23
+ No arguments required. Operates on the current conversation context.
24
+
25
+ ---
26
+
27
+ ## Behavior
28
+
29
+ ### 1. EXTRACT CANDIDATES
30
+
31
+ Scan the prior conversation messages for candidate decisions. A decision is any resolved choice, adopted approach, or stated assumption that affects how the work is done. Look for:
32
+
33
+ - **Approaches chosen**: "we'll use X instead of Y", "let's go with X"
34
+ - **Provisional choices**: "for now we'll use X", "assuming X until we know more"
35
+ - **Stated assumptions**: "assuming X is true", "treating X as given"
36
+ - **Constraints accepted**: "we won't do X", "X is out of scope"
37
+ - **Naming or structural choices**: "we'll call it X", "X goes in the Y layer"
38
+
39
+ Extract **at most 4 candidates** from the conversation. Prioritize the most consequential or recent ones.
40
+
41
+ For each candidate, determine:
42
+ - **Tag**: one of `[APPROACH]`, `[PROVISIONAL]`, or `[ASSUMPTION]`
43
+ - `[APPROACH]` — a deliberate design or implementation choice
44
+ - `[PROVISIONAL]` — works for now, expected to revisit
45
+ - `[ASSUMPTION]` — treating something as true without full validation
46
+ - **Decision text**: one concise line describing the choice
47
+ - **Rationale**: one sentence explaining why this was chosen
48
+
49
+ If fewer than 2 clear candidates are found, say so briefly and exit without calling `AskUserQuestion`.
50
+
51
+ ### 2. CHECK FOR CONTRADICTIONS
52
+
53
+ Read `.deepflow/decisions.md` if it exists. For each candidate, check whether it contradicts a prior entry in the file.
54
+
55
+ If a contradiction is found:
56
+ - Keep the prior entry — never delete or modify it
57
+ - Amend the candidate's rationale to reference the prior decision: `was "X", now "Y" because Z`
58
+
59
+ ### 3. PRESENT VIA AskUserQuestion
60
+
61
+ Present candidates as a multi-select question with at most 4 options (tool limit).
62
+
63
+ ```json
64
+ {
65
+ "questions": [
66
+ {
67
+ "question": "These decisions were detected in your conversation. Which should be saved to .deepflow/decisions.md?",
68
+ "header": "Save notes?",
69
+ "multiSelect": true,
70
+ "options": [
71
+ {
72
+ "label": "[APPROACH] <decision text>",
73
+ "description": "<rationale>"
74
+ },
75
+ {
76
+ "label": "[PROVISIONAL] <decision text>",
77
+ "description": "<rationale>"
78
+ }
79
+ ]
80
+ }
81
+ ]
82
+ }
83
+ ```
84
+
85
+ Each option's `label` is the tag + decision text. Each `description` is the rationale (one sentence).
86
+
87
+ ### 4. APPEND CONFIRMED DECISIONS
88
+
89
+ For each option the user selects:
90
+
91
+ 1. If `.deepflow/decisions.md` does not exist, create it with a blank header:
92
+ ```
93
+ # Decisions
94
+ ```
95
+
96
+ 2. Append a new dated section using today's date in `YYYY-MM-DD` format and source `note`:
97
+
98
+ ```markdown
99
+ ### 2026-02-22 — note
100
+ - [APPROACH] Use event sourcing over CRUD — append-only log matches audit requirements
101
+ - [PROVISIONAL] Batch size = 50 — works for 4-game dataset, revisit at scale
102
+ ```
103
+
104
+ 3. If multiple decisions are confirmed in one invocation, group them under a single dated section.
105
+
106
+ 4. Never modify or delete any prior entries.
107
+
108
+ ### 5. CONFIRM
109
+
110
+ After writing, report to the user:
111
+
112
+ ```
113
+ Saved N decision(s) to .deepflow/decisions.md
114
+ ```
115
+
116
+ If the user selected nothing, respond:
117
+
118
+ ```
119
+ No decisions saved.
120
+ ```
121
+
122
+ ---
123
+
124
+ ## Decision Format
125
+
126
+ ```
127
+ ### YYYY-MM-DD — note
128
+ - [TAG] Decision text — rationale
129
+ ```
130
+
131
+ **Tags:**
132
+ - `[APPROACH]` — deliberate design or implementation choice
133
+ - `[PROVISIONAL]` — works for now, will revisit at scale or with more information
134
+ - `[ASSUMPTION]` — treating something as true without full confirmation
135
+
136
+ **Contradiction handling:** Never delete prior entries. When a new decision contradicts an older one, include a reference in the rationale: `was "X", now "Y" because Z`.
137
+
138
+ ---
139
+
140
+ ## Rules
141
+
142
+ - **Maximum 4 candidates** per invocation (tool limit for AskUserQuestion options)
143
+ - **multiSelect: true** — user can confirm any subset, including all or none
144
+ - **Never invent decisions** — only extract what was genuinely discussed and resolved in the conversation
145
+ - **Never modify prior entries** in `.deepflow/decisions.md`
146
+ - **Create the file if absent** — first use initializes it with `# Decisions` header
147
+ - **Source is always `note`** — this distinguishes from decisions captured by other df commands
148
+ - **Date is today's date** — use the current date in `YYYY-MM-DD` format
149
+ - **One AskUserQuestion call** — present all candidates in a single call, not sequentially
150
+
151
+ ---
152
+
153
+ ## Example
154
+
155
+ ```
156
+ USER: /df:note
157
+
158
+ CLAUDE: Let me scan our conversation for candidate decisions.
159
+
160
+ [Reads .deepflow/decisions.md — finds prior entry:
161
+ "### 2026-02-10 — spec
162
+ - [APPROACH] Use PostgreSQL for primary storage — team already knows it"]
163
+
164
+ [Extracts from conversation:
165
+ 1. [APPROACH] Use Redis for session state — avoids DB round-trips on hot path
166
+ 2. [PROVISIONAL] Skip auth for internal APIs — only 2 internal services for now
167
+ 3. [ASSUMPTION] Peak load is 500 req/s — based on current traffic, unvalidated
168
+ ]
169
+
170
+ [No contradictions found with prior entries]
171
+
172
+ [Uses AskUserQuestion]
173
+ {
174
+ "questions": [
175
+ {
176
+ "question": "These decisions were detected in your conversation. Which should be saved to .deepflow/decisions.md?",
177
+ "header": "Save notes?",
178
+ "multiSelect": true,
179
+ "options": [
180
+ {
181
+ "label": "[APPROACH] Use Redis for session state",
182
+ "description": "Avoids DB round-trips on hot path"
183
+ },
184
+ {
185
+ "label": "[PROVISIONAL] Skip auth for internal APIs",
186
+ "description": "Only 2 internal services for now, revisit when we open to more consumers"
187
+ },
188
+ {
189
+ "label": "[ASSUMPTION] Peak load is 500 req/s",
190
+ "description": "Based on current traffic patterns, not load-tested"
191
+ }
192
+ ]
193
+ }
194
+ ]
195
+ }
196
+
197
+ USER: [Selects: Use Redis for session state, Peak load is 500 req/s]
198
+
199
+ CLAUDE: [Appends to .deepflow/decisions.md:]
200
+
201
+ ### 2026-02-22 — note
202
+ - [APPROACH] Use Redis for session state — avoids DB round-trips on hot path
203
+ - [ASSUMPTION] Peak load is 500 req/s — based on current traffic patterns, not load-tested
204
+
205
+ Saved 2 decision(s) to .deepflow/decisions.md
206
+ ```
@@ -3,6 +3,8 @@
3
3
  ## Purpose
4
4
  Compare specs against codebase and past experiments. Generate prioritized tasks.
5
5
 
6
+ **NEVER:** use EnterPlanMode, use ExitPlanMode — this command IS the planning phase; native plan mode conflicts with it
7
+
6
8
  ## Usage
7
9
  ```
8
10
  /df:plan # Plan all new specs
@@ -220,6 +222,17 @@ Append tasks grouped by `### doing-{spec-name}`. Include spec gaps and validatio
220
222
 
221
223
  `✓ Plan generated — {n} specs, {n} tasks. Run /df:execute`
222
224
 
225
+ ### 11. CAPTURE DECISIONS
226
+
227
+ Extract up to 4 candidate decisions (approaches chosen, spike strategies, prioritization rationale). Present via AskUserQuestion with `multiSelect: true`. Each option: `label: "[TAG] <decision>"`, `description: "<rationale>"`. Tags: `[APPROACH]`, `[PROVISIONAL]`, `[ASSUMPTION]`.
228
+
229
+ Append confirmed decisions to `.deepflow/decisions.md` (create if missing):
230
+ ```
231
+ ### {YYYY-MM-DD} — plan
232
+ - [TAG] Decision text — rationale summary
233
+ ```
234
+ If a decision contradicts a prior entry, add: `(supersedes: <prior text>)`
235
+
223
236
  ## Rules
224
237
  - **Never use TaskOutput** — Returns full transcripts that explode context
225
238
  - **Never use run_in_background for Explore agents** — Causes late notifications that pollute output
@@ -0,0 +1,130 @@
1
+ # /df:resume — Session Continuity Briefing
2
+
3
+ ## Orchestrator Role
4
+
5
+ You are a context synthesizer. Your ONLY job is to read project state from multiple sources and produce a concise, structured briefing so developers can resume work after a break.
6
+
7
+ **NEVER:** Write files, create files, modify files, append to files, run git with write operations, use AskUserQuestion, spawn agents, use TaskOutput, use EnterPlanMode, use ExitPlanMode
8
+
9
+ **ONLY:** Read files (Bash read-only git commands, Read tool, Glob, Grep), write briefing to stdout
10
+
11
+ ---
12
+
13
+ ## Purpose
14
+
15
+ Synthesize project state into a 200-500 word briefing covering what happened, what decisions are live, and what to do next. Pure read-only — writes nothing.
16
+
17
+ ## Usage
18
+
19
+ ```
20
+ /df:resume
21
+ ```
22
+
23
+ ## Behavior
24
+
25
+ ### 1. GATHER SOURCES
26
+
27
+ Read these sources in parallel (all reads, no writes):
28
+
29
+ | Source | Command/Path | Purpose |
30
+ |--------|-------------|---------|
31
+ | Git timeline | `git log --oneline -20` | What changed and when |
32
+ | Decisions | `.deepflow/decisions.md` | Current [APPROACH], [PROVISIONAL], [ASSUMPTION] entries |
33
+ | Plan | `PLAN.md` | Task status (checked vs unchecked) |
34
+ | Spec headers | `specs/doing-*.md` (first 20 lines each) | What features are in-flight |
35
+ | Experiments | `.deepflow/experiments/` (file listing + names) | Validated and failed approaches |
36
+
37
+ **Token budget:** Read only what's needed — ~2500 tokens total across all sources.
38
+
39
+ If a source does not exist, skip it silently (do not error or warn).
40
+
41
+ ### 2. SYNTHESIZE BRIEFING
42
+
43
+ Produce a 200-500 word briefing with exactly three sections:
44
+
45
+ ---
46
+
47
+ **## Timeline**
48
+
49
+ Summarize what happened and when, derived from `git log --oneline -20` and spec/PLAN.md state. Describe the arc of work: what was completed, what is in-flight, notable milestones. Reference dates or commit messages where informative. Aim for 3-6 sentences.
50
+
51
+ **## Live Decisions**
52
+
53
+ List all current `[APPROACH]`, `[PROVISIONAL]`, and `[ASSUMPTION]` entries from `.deepflow/decisions.md`. Present each as a bullet with its tag, the decision text, and a brief rationale if available.
54
+
55
+ If `.deepflow/decisions.md` does not exist or is empty: state "No decisions recorded yet."
56
+
57
+ Do not filter or editorialize — report all live decision entries as found. If a decision has been contradicted (a newer entry supersedes it), show only the newest entry for that topic.
58
+
59
+ **## Next Steps**
60
+
61
+ Derive next steps from `PLAN.md` task status:
62
+ - List unchecked tasks (`- [ ]`) that are not blocked
63
+ - Note blocked tasks and what they are blocked by
64
+ - If no PLAN.md exists: suggest running `/df:plan` to generate tasks
65
+
66
+ Prioritize: unblocked tasks first, then blocked tasks with their blockers, then any tasks with no explicit status.
67
+
68
+ ---
69
+
70
+ ### 3. OUTPUT
71
+
72
+ Print the briefing directly to stdout. No file writes. No file creation.
73
+
74
+ Format:
75
+
76
+ ```
77
+ ## Timeline
78
+ [3-6 sentences on what happened]
79
+
80
+ ## Live Decisions
81
+ - [APPROACH] ...
82
+ - [PROVISIONAL] ...
83
+ - [ASSUMPTION] ...
84
+
85
+ ## Next Steps
86
+ - T1: ... (ready)
87
+ - T2: ... (blocked by T1)
88
+ ```
89
+
90
+ Word count target: 200-500 words. Do not pad. Do not truncate important information to hit limits.
91
+
92
+ ---
93
+
94
+ ## Rules
95
+
96
+ - **NEVER write any file** — not decisions.md, not PLAN.md, not any new file
97
+ - **NEVER use AskUserQuestion** — this command is read-only, no interaction
98
+ - **NEVER spawn agents** — read directly using Bash (git log) and Read tool
99
+ - **NEVER use TaskOutput** — returns full transcripts that explode context
100
+ - **NEVER use EnterPlanMode or ExitPlanMode**
101
+ - Read sources in a single pass — do not loop or re-read
102
+ - If a source file is missing, skip it and note it only if relevant
103
+ - Contradicted decisions: show newest entry per topic only
104
+ - Token budget: stay within ~2500 tokens of input to produce ~500 words of output
105
+
106
+ ## Example
107
+
108
+ ```
109
+ USER: /df:resume
110
+
111
+ CLAUDE:
112
+
113
+ ## Timeline
114
+ Work began on the session-continuity feature on 2026-02-20, with the spec
115
+ formalized after a discover and debate phase. The plan was generated with
116
+ 5 tasks across two areas: decision capture in existing commands and two new
117
+ commands (note, resume). Tasks T1-T3 are complete (decisions.md format,
118
+ discover capture, plan capture). T4 (execute capture) and T5 (resume command)
119
+ remain in progress.
120
+
121
+ ## Live Decisions
122
+ - [APPROACH] Store decisions in .deepflow/decisions.md as append-only markdown — chosen over database to keep diffs readable and avoid new dependencies
123
+ - [PROVISIONAL] Max 4 candidates per AskUserQuestion call — matches tool limit, revisit if UX feels too chunked
124
+ - [ASSUMPTION] Worktree execute writes to main tree .deepflow/ path — valid as long as main tree is always the parent
125
+
126
+ ## Next Steps
127
+ - T4: Add decision capture to /df:execute (ready — unblocked)
128
+ - T5: Create /df:resume command (ready — unblocked)
129
+ - T6: Add decision capture to /df:verify (blocked by T4)
130
+ ```
@@ -4,7 +4,7 @@
4
4
 
5
5
  You coordinate agents and ask questions. You never search code directly.
6
6
 
7
- **NEVER:** Read source files, use Glob/Grep directly, run git, use TaskOutput
7
+ **NEVER:** Read source files, use Glob/Grep directly, run git, use TaskOutput, use EnterPlanMode, use ExitPlanMode
8
8
 
9
9
  **ONLY:** Spawn agents (non-background), ask user questions, write spec file
10
10
 
@@ -176,6 +176,18 @@ Acceptance criteria: {count}
176
176
  Next: Run /df:plan to generate tasks
177
177
  ```
178
178
 
179
+ ### 6. CAPTURE DECISIONS
180
+
181
+ Extract up to 4 candidate decisions (requirements chosen, constraints accepted). Use `AskUserQuestion` with `multiSelect: true`:
182
+ - `label`: `[APPROACH|PROVISIONAL|ASSUMPTION] <decision>`
183
+ - `description`: rationale
184
+
185
+ Append each confirmed selection to `.deepflow/decisions.md` (create if absent):
186
+ ```
187
+ ### {YYYY-MM-DD} — spec
188
+ - [TAG] <decision> — <rationale>
189
+ ```
190
+
179
191
  ## Rules
180
192
  - **Orchestrator never searches** — Spawn agents for all codebase exploration
181
193
  - Do NOT generate spec if critical gaps remain
@@ -3,6 +3,8 @@
3
3
  ## Purpose
4
4
  Check that implemented code satisfies spec requirements and acceptance criteria.
5
5
 
6
+ **NEVER:** use EnterPlanMode, use ExitPlanMode
7
+
6
8
  ## Usage
7
9
  ```
8
10
  /df:verify # Verify all done-* specs
@@ -325,3 +327,17 @@ rm -f .deepflow/checkpoint.json
325
327
 
326
328
  Workflow complete! Ready for next feature: /df:spec <name>
327
329
  ```
330
+
331
+ ### 4. CAPTURE DECISIONS (success path only)
332
+
333
+ Extract up to 4 candidate decisions (quality findings, patterns validated, lessons learned). Present via AskUserQuestion with `multiSelect: true`; tags: `[APPROACH]`, `[PROVISIONAL]`, `[ASSUMPTION]`.
334
+
335
+ ```
336
+ AskUserQuestion(question: "Which decisions to record?", multiSelect: true,
337
+ options: [{ label: "[APPROACH] <decision>", description: "<rationale>" }, ...])
338
+ ```
339
+
340
+ For each confirmed decision, append to `.deepflow/decisions.md` (create if missing):
341
+ `### {YYYY-MM-DD} — verify` / `- [TAG] {decision text} — {rationale}`
342
+
343
+ Skip if user confirms none or declines.