deepflow 0.1.87 → 0.1.89
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/bin/install.js +73 -7
- package/hooks/df-dashboard-push.js +170 -0
- package/hooks/df-execution-history.js +120 -0
- package/hooks/df-invariant-check.js +126 -0
- package/hooks/df-spec-lint.js +78 -4
- package/hooks/df-statusline.js +77 -5
- package/hooks/df-tool-usage-spike.js +41 -0
- package/hooks/df-tool-usage.js +86 -0
- package/hooks/df-worktree-guard.js +101 -0
- package/package.json +1 -1
- package/src/commands/df/auto-cycle.md +75 -558
- package/src/commands/df/auto.md +9 -48
- package/src/commands/df/consolidate.md +14 -38
- package/src/commands/df/dashboard.md +35 -0
- package/src/commands/df/debate.md +27 -156
- package/src/commands/df/discover.md +35 -181
- package/src/commands/df/execute.md +283 -563
- package/src/commands/df/note.md +37 -176
- package/src/commands/df/plan.md +80 -210
- package/src/commands/df/report.md +29 -184
- package/src/commands/df/resume.md +18 -101
- package/src/commands/df/spec.md +49 -145
- package/src/commands/df/verify.md +59 -606
- package/src/skills/browse-fetch/SKILL.md +32 -257
- package/src/skills/browse-verify/SKILL.md +40 -174
- package/src/skills/code-completeness/SKILL.md +2 -9
- package/src/skills/gap-discovery/SKILL.md +19 -86
- package/templates/config-template.yaml +10 -0
- package/templates/spec-template.md +12 -1
|
@@ -6,18 +6,11 @@ allowed-tools: [AskUserQuestion, Read, Agent]
|
|
|
6
6
|
|
|
7
7
|
# /df:discover — Deep Problem Exploration
|
|
8
8
|
|
|
9
|
-
## Orchestrator Role
|
|
10
|
-
|
|
11
9
|
You are a Socratic questioner. Your ONLY job is to ask questions that surface hidden requirements, assumptions, and constraints.
|
|
12
10
|
|
|
13
11
|
**NEVER:** Read source files directly, use Glob/Grep directly, proactively spawn agents, create files (except `.deepflow/decisions.md`), run git, use TaskOutput, use Task tool, use EnterPlanMode, use ExitPlanMode
|
|
14
12
|
|
|
15
|
-
**ONLY:** Ask questions
|
|
16
|
-
|
|
17
|
-
---
|
|
18
|
-
|
|
19
|
-
## Purpose
|
|
20
|
-
Explore a problem space deeply before formalizing into specs. Surface motivations, constraints, scope boundaries, success criteria, and anti-goals through structured questioning.
|
|
13
|
+
**ONLY:** Ask questions via `AskUserQuestion`, respond conversationally, spawn context-fetch agents **only when the user explicitly requests it**.
|
|
21
14
|
|
|
22
15
|
## Usage
|
|
23
16
|
```
|
|
@@ -26,198 +19,59 @@ Explore a problem space deeply before formalizing into specs. Surface motivation
|
|
|
26
19
|
|
|
27
20
|
## Behavior
|
|
28
21
|
|
|
29
|
-
Work through
|
|
30
|
-
|
|
31
|
-
### Phase 1: MOTIVATION
|
|
32
|
-
Why does this need to exist? What problem does it solve? Who suffers without it?
|
|
33
|
-
|
|
34
|
-
Example questions:
|
|
35
|
-
- What triggered the need for this?
|
|
36
|
-
- Who will use this and what's their current workaround?
|
|
37
|
-
- What happens if we don't build this?
|
|
38
|
-
|
|
39
|
-
### Phase 2: CONTEXT
|
|
40
|
-
What already exists? What has been tried? What's the current state?
|
|
41
|
-
|
|
42
|
-
Example questions:
|
|
43
|
-
- Is there existing code or infrastructure that relates to this?
|
|
44
|
-
- Have you tried solving this before? What worked/didn't?
|
|
45
|
-
- Are there external systems or APIs involved?
|
|
46
|
-
|
|
47
|
-
### Phase 3: SCOPE
|
|
48
|
-
What's in? What's out? What's the minimum viable version?
|
|
49
|
-
|
|
50
|
-
Example questions:
|
|
51
|
-
- What's the smallest version that would be useful?
|
|
52
|
-
- What features feel essential vs nice-to-have?
|
|
53
|
-
- Are there parts you explicitly want to exclude?
|
|
54
|
-
|
|
55
|
-
### Phase 4: CONSTRAINTS
|
|
56
|
-
Technical limits, time pressure, resource boundaries?
|
|
22
|
+
Work through phases organically. Don't announce phases — let conversation flow naturally. Move on when a phase feels sufficiently explored.
|
|
57
23
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
24
|
+
| Phase | Purpose |
|
|
25
|
+
|-------|---------|
|
|
26
|
+
| 1. MOTIVATION | Why does this need to exist? What problem? Who suffers without it? |
|
|
27
|
+
| 2. CONTEXT | What exists? What's been tried? Current state? External systems? |
|
|
28
|
+
| 3. SCOPE | What's in/out? Minimum viable version? Essential vs nice-to-have? |
|
|
29
|
+
| 4. CONSTRAINTS | Performance requirements? Non-negotiable tech? Timeline pressure? |
|
|
30
|
+
| 5. SUCCESS | How to verify it works? What metrics? What makes you confident to ship? |
|
|
31
|
+
| 6. ANTI-GOALS | What to explicitly NOT build? Common over-engineering traps? Failed approaches elsewhere? |
|
|
62
32
|
|
|
63
|
-
|
|
64
|
-
How do we know it worked? What does "done" look like?
|
|
33
|
+
## Questioning Rules
|
|
65
34
|
|
|
66
|
-
|
|
67
|
-
-
|
|
68
|
-
-
|
|
69
|
-
-
|
|
35
|
+
- Use `AskUserQuestion` for structured questions with options. Max **4 questions per call** (tool limit). Headers **≤12 chars**.
|
|
36
|
+
- Mix structured questions with conversational follow-ups.
|
|
37
|
+
- Follow up on surprising/unclear answers — don't march through phases mechanically.
|
|
38
|
+
- **Never re-ask answered questions.** Review prior answers before composing each call. If a topic was settled, reference the prior answer and move forward.
|
|
39
|
+
- Keep responses short between questions — don't lecture. Acknowledge answers briefly.
|
|
70
40
|
|
|
71
|
-
|
|
72
|
-
What should we explicitly NOT do? What traps to avoid?
|
|
41
|
+
## On-Demand Context Fetching
|
|
73
42
|
|
|
74
|
-
|
|
75
|
-
- What's the most common way this kind of feature gets over-engineered?
|
|
76
|
-
- Are there approaches you've seen fail elsewhere?
|
|
77
|
-
- What should we explicitly avoid building?
|
|
78
|
-
|
|
79
|
-
---
|
|
80
|
-
|
|
81
|
-
## Rules
|
|
82
|
-
|
|
83
|
-
### Questioning Rules
|
|
84
|
-
- Use `AskUserQuestion` tool for structured questions with options
|
|
85
|
-
- Maximum **4 questions per `AskUserQuestion` call** (tool limit)
|
|
86
|
-
- Headers must be **≤12 characters**
|
|
87
|
-
- Mix structured questions (AskUserQuestion) with conversational follow-ups
|
|
88
|
-
- Ask follow-up questions based on answers — don't just march through phases mechanically
|
|
89
|
-
- Go deeper on surprising or unclear answers
|
|
90
|
-
### Behavioral Rules
|
|
91
|
-
- Keep your responses short between questions — don't lecture
|
|
92
|
-
- Acknowledge answers briefly before asking the next question
|
|
93
|
-
|
|
94
|
-
### On-Demand Context Fetching
|
|
95
|
-
|
|
96
|
-
When the user explicitly asks you to look at code or a URL (e.g., "olha no código", "vê esse link", "look at src/auth/", "check https://docs.example.com"), fetch context using a sub-agent.
|
|
97
|
-
|
|
98
|
-
**Trigger:** Intent-based detection — the user must explicitly request it. NEVER proactively fetch context.
|
|
43
|
+
**Trigger:** User explicitly asks to look at code or a URL (e.g., "look at src/auth/", "check this link"). NEVER proactively fetch.
|
|
99
44
|
|
|
100
45
|
**For codebase context:**
|
|
101
46
|
```
|
|
102
|
-
Agent(subagent_type="Explore", model="haiku", prompt=""
|
|
103
|
-
Read and summarize the following: {what the user asked to see}
|
|
104
|
-
|
|
105
|
-
Rules:
|
|
106
|
-
- Return ONLY factual observations: what files exist, what functions/types are defined, what patterns are used
|
|
107
|
-
- Do NOT suggest solutions, improvements, or architectural changes
|
|
108
|
-
- Do NOT give opinions on code quality
|
|
109
|
-
- Keep response under 4000 tokens
|
|
110
|
-
- Format: bullet points of facts
|
|
111
|
-
""")
|
|
47
|
+
Agent(subagent_type="Explore", model="haiku", prompt="Read and summarize: {target}. Rules: factual observations only (files, functions, types, patterns). No solutions/improvements/opinions. Under 4000 tokens. Bullet points.")
|
|
112
48
|
```
|
|
113
49
|
|
|
114
50
|
**For URL context:**
|
|
115
51
|
```
|
|
116
|
-
Agent(subagent_type="Explore", model="haiku", prompt=""
|
|
117
|
-
Use the browse-fetch skill to fetch this URL: {url}
|
|
118
|
-
|
|
119
|
-
Then summarize what the page contains.
|
|
120
|
-
|
|
121
|
-
Rules:
|
|
122
|
-
- Return ONLY factual observations: what the documentation says, what APIs are described, what patterns are shown
|
|
123
|
-
- Do NOT suggest how to use this in the project
|
|
124
|
-
- Do NOT give opinions or recommendations
|
|
125
|
-
- Keep response under 4000 tokens
|
|
126
|
-
- Format: bullet points of facts
|
|
127
|
-
""")
|
|
52
|
+
Agent(subagent_type="Explore", model="haiku", prompt="Use browse-fetch skill to fetch: {url}. Summarize contents. Rules: factual observations only. No recommendations. Under 4000 tokens. Bullet points.")
|
|
128
53
|
```
|
|
129
54
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
**Soft cap:** ~3 context fetches per discover session to protect context window.
|
|
55
|
+
After receiving context: share factual summary, then **resume Socratic questioning** incorporating new facts. Do NOT shift to suggesting solutions. Soft cap: ~3 context fetches per session.
|
|
133
56
|
|
|
134
|
-
|
|
135
|
-
When the user signals they want to advance (e.g., "I think that's enough", "let's move on", "ready for next step"):
|
|
57
|
+
## When the User Wants to Move On
|
|
136
58
|
|
|
137
|
-
|
|
138
|
-
Great, we've covered a lot of ground. To analyze this from multiple perspectives, run:
|
|
59
|
+
Assess spec layer reached:
|
|
139
60
|
|
|
140
|
-
|
|
61
|
+
| Layer | Criteria |
|
|
62
|
+
|-------|----------|
|
|
63
|
+
| L0 | Objective clear |
|
|
64
|
+
| L1 | Requirements enumerated |
|
|
65
|
+
| L2 | Testable ACs defined |
|
|
66
|
+
| L3 | Constraints + scope + tech context |
|
|
141
67
|
|
|
142
|
-
Or if you want to go straight to a spec:
|
|
143
|
-
|
|
144
|
-
/df:spec {name}
|
|
145
68
|
```
|
|
69
|
+
Great, we've covered enough for an L{N} spec ({label}).
|
|
146
70
|
|
|
147
|
-
|
|
71
|
+
/df:spec {name} — generate spec at current layer
|
|
72
|
+
/df:debate {name} — analyze from multiple perspectives first
|
|
148
73
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
CLAUDE: Let's explore the authentication problem space.
|
|
153
|
-
|
|
154
|
-
[Uses AskUserQuestion]
|
|
155
|
-
{
|
|
156
|
-
"questions": [
|
|
157
|
-
{
|
|
158
|
-
"question": "What's driving the need for auth right now?",
|
|
159
|
-
"header": "Motivation",
|
|
160
|
-
"multiSelect": false,
|
|
161
|
-
"options": [
|
|
162
|
-
{"label": "Security gap", "description": "Current system has no auth or weak auth"},
|
|
163
|
-
{"label": "New users", "description": "Opening up to users who need access control"},
|
|
164
|
-
{"label": "Compliance", "description": "Regulatory or policy requirement"}
|
|
165
|
-
]
|
|
166
|
-
},
|
|
167
|
-
{
|
|
168
|
-
"question": "Who are the primary users that will authenticate?",
|
|
169
|
-
"header": "Users",
|
|
170
|
-
"multiSelect": true,
|
|
171
|
-
"options": [
|
|
172
|
-
{"label": "End users", "description": "Public-facing users of the product"},
|
|
173
|
-
{"label": "Internal team", "description": "Your team or organization members"},
|
|
174
|
-
{"label": "API clients", "description": "Other services or integrations"}
|
|
175
|
-
]
|
|
176
|
-
}
|
|
177
|
-
]
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
USER: [Selects: Security gap, End users + API clients]
|
|
181
|
-
|
|
182
|
-
CLAUDE: So there's a real security gap and you need to cover both human users
|
|
183
|
-
and machine clients. That's two different auth flows to think about.
|
|
184
|
-
|
|
185
|
-
[Uses AskUserQuestion]
|
|
186
|
-
{
|
|
187
|
-
"questions": [
|
|
188
|
-
{
|
|
189
|
-
"question": "Do end users currently have any way to identify themselves?",
|
|
190
|
-
"header": "Current state",
|
|
191
|
-
"multiSelect": false,
|
|
192
|
-
"options": [
|
|
193
|
-
{"label": "Nothing", "description": "Completely open, no identification"},
|
|
194
|
-
{"label": "Basic auth", "description": "Simple username/password exists"},
|
|
195
|
-
{"label": "Third-party", "description": "Using external auth provider already"}
|
|
196
|
-
]
|
|
197
|
-
},
|
|
198
|
-
{
|
|
199
|
-
"question": "For API clients, what authentication exists today?",
|
|
200
|
-
"header": "API auth",
|
|
201
|
-
"multiSelect": false,
|
|
202
|
-
"options": [
|
|
203
|
-
{"label": "None", "description": "APIs are open"},
|
|
204
|
-
{"label": "API keys", "description": "Static keys in headers"},
|
|
205
|
-
{"label": "OAuth/JWT", "description": "Token-based auth already in place"}
|
|
206
|
-
]
|
|
207
|
-
}
|
|
208
|
-
]
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
[... continues through phases based on answers ...]
|
|
212
|
-
|
|
213
|
-
USER: I think we've covered everything, let's move on.
|
|
214
|
-
|
|
215
|
-
CLAUDE: Great, we've covered a lot of ground. To analyze this from multiple
|
|
216
|
-
perspectives, run:
|
|
217
|
-
|
|
218
|
-
/df:debate auth
|
|
219
|
-
|
|
220
|
-
Or if you want to go straight to a spec:
|
|
221
|
-
|
|
222
|
-
/df:spec auth
|
|
74
|
+
{If L0-L1:}
|
|
75
|
+
At L{N}, /df:plan will generate spikes to discover what's missing.
|
|
76
|
+
Deepen the spec later with /df:spec {name} after spikes run.
|
|
223
77
|
```
|