deepflow 0.1.23 → 0.1.24
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 +1 -1
- package/src/commands/df/spec.md +66 -34
package/package.json
CHANGED
package/src/commands/df/spec.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# /df:spec — Generate Spec from Conversation
|
|
2
2
|
|
|
3
|
+
## Orchestrator Role
|
|
4
|
+
|
|
5
|
+
You coordinate agents and ask questions. You never search code directly.
|
|
6
|
+
|
|
7
|
+
**NEVER:** Read source files, use Glob/Grep directly, run git
|
|
8
|
+
|
|
9
|
+
**ONLY:** Spawn agents, poll results, ask user questions, write spec file
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
3
13
|
## Purpose
|
|
4
14
|
Transform conversation context into a structured specification file.
|
|
5
15
|
|
|
@@ -8,13 +18,29 @@ Transform conversation context into a structured specification file.
|
|
|
8
18
|
/df:spec <name>
|
|
9
19
|
```
|
|
10
20
|
|
|
11
|
-
## Skills
|
|
12
|
-
|
|
21
|
+
## Skills & Agents
|
|
22
|
+
- Skill: `gap-discovery` — Proactive requirement gap identification
|
|
23
|
+
- Agent: `Explore` (haiku) — Codebase context gathering
|
|
24
|
+
- Agent: `reasoner` (Opus) — Synthesize findings into requirements
|
|
13
25
|
|
|
14
26
|
## Behavior
|
|
15
27
|
|
|
16
|
-
### 1.
|
|
17
|
-
|
|
28
|
+
### 1. GATHER CODEBASE CONTEXT
|
|
29
|
+
|
|
30
|
+
**Spawn Explore agents** (haiku, read-only, parallel) to find:
|
|
31
|
+
- Related existing implementations
|
|
32
|
+
- Code patterns and conventions
|
|
33
|
+
- Integration points relevant to the feature
|
|
34
|
+
- Existing TODOs or placeholders in related areas
|
|
35
|
+
|
|
36
|
+
| Codebase Size | Agents |
|
|
37
|
+
|---------------|--------|
|
|
38
|
+
| <20 files | 2-3 |
|
|
39
|
+
| 20-100 | 5-8 |
|
|
40
|
+
| 100+ | 10-15 |
|
|
41
|
+
|
|
42
|
+
### 2. GAP CHECK
|
|
43
|
+
Use the `gap-discovery` skill to analyze conversation + agent findings.
|
|
18
44
|
|
|
19
45
|
**Required clarity:**
|
|
20
46
|
- [ ] Core objective clear
|
|
@@ -42,9 +68,17 @@ Before generating, use the `gap-discovery` skill to analyze conversation.
|
|
|
42
68
|
|
|
43
69
|
Max 4 questions per tool call. Wait for answers before proceeding.
|
|
44
70
|
|
|
45
|
-
###
|
|
71
|
+
### 3. SYNTHESIZE FINDINGS
|
|
72
|
+
|
|
73
|
+
**Spawn `reasoner` agent** (Opus) to:
|
|
74
|
+
- Analyze codebase context from Explore agents
|
|
75
|
+
- Identify constraints from existing architecture
|
|
76
|
+
- Suggest requirements based on patterns found
|
|
77
|
+
- Flag potential conflicts with existing code
|
|
78
|
+
|
|
79
|
+
### 4. GENERATE SPEC
|
|
46
80
|
|
|
47
|
-
Once gaps covered, create `specs/{name}.md`:
|
|
81
|
+
Once gaps covered and context gathered, create `specs/{name}.md`:
|
|
48
82
|
|
|
49
83
|
```markdown
|
|
50
84
|
# {Name}
|
|
@@ -70,10 +104,10 @@ Once gaps covered, create `specs/{name}.md`:
|
|
|
70
104
|
- [ ] [Testable criterion 3]
|
|
71
105
|
|
|
72
106
|
## Technical Notes
|
|
73
|
-
[
|
|
107
|
+
[Implementation hints from codebase analysis — patterns, integration points, constraints discovered by agents]
|
|
74
108
|
```
|
|
75
109
|
|
|
76
|
-
###
|
|
110
|
+
### 5. CONFIRM
|
|
77
111
|
|
|
78
112
|
After writing:
|
|
79
113
|
```
|
|
@@ -86,17 +120,33 @@ Next: Run /df:plan to generate tasks
|
|
|
86
120
|
```
|
|
87
121
|
|
|
88
122
|
## Rules
|
|
123
|
+
- **Orchestrator never searches** — Spawn agents for all codebase exploration
|
|
89
124
|
- Do NOT generate spec if critical gaps remain
|
|
90
|
-
- Ask maximum
|
|
125
|
+
- Ask maximum 4 questions per tool call (not overwhelming)
|
|
91
126
|
- Requirements must be testable
|
|
92
127
|
- Acceptance criteria must be verifiable
|
|
128
|
+
- Include agent-discovered context in Technical Notes
|
|
93
129
|
- Keep specs concise (<100 lines)
|
|
94
130
|
|
|
131
|
+
## Agent Scaling
|
|
132
|
+
|
|
133
|
+
| Agent | Base | Purpose |
|
|
134
|
+
|-------|------|---------|
|
|
135
|
+
| Explore (haiku) | 3-5 | Find related code, patterns |
|
|
136
|
+
| Reasoner (Opus) | 1 | Synthesize into requirements |
|
|
137
|
+
|
|
95
138
|
## Example
|
|
96
139
|
|
|
97
140
|
```
|
|
98
141
|
USER: I want to add image upload
|
|
99
142
|
|
|
143
|
+
CLAUDE: [Spawns 3 Explore agents in parallel]
|
|
144
|
+
- "Find existing file handling patterns"
|
|
145
|
+
- "Find API endpoint conventions"
|
|
146
|
+
- "Find storage service implementations"
|
|
147
|
+
|
|
148
|
+
[Agents return: Express multer middleware, REST conventions, no cloud storage yet]
|
|
149
|
+
|
|
100
150
|
CLAUDE: [Uses AskUserQuestion tool]
|
|
101
151
|
{
|
|
102
152
|
"questions": [
|
|
@@ -106,18 +156,7 @@ CLAUDE: [Uses AskUserQuestion tool]
|
|
|
106
156
|
"multiSelect": true,
|
|
107
157
|
"options": [
|
|
108
158
|
{"label": "JPG/PNG only", "description": "Standard formats"},
|
|
109
|
-
{"label": "Include WebP", "description": "Modern compression"}
|
|
110
|
-
{"label": "Include GIF", "description": "Animated images"}
|
|
111
|
-
]
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
"question": "What's the maximum upload size?",
|
|
115
|
-
"header": "Size limit",
|
|
116
|
-
"multiSelect": false,
|
|
117
|
-
"options": [
|
|
118
|
-
{"label": "5 MB", "description": "Fast uploads"},
|
|
119
|
-
{"label": "10 MB (Recommended)", "description": "Balanced"},
|
|
120
|
-
{"label": "25 MB", "description": "High-res photos"}
|
|
159
|
+
{"label": "Include WebP", "description": "Modern compression"}
|
|
121
160
|
]
|
|
122
161
|
},
|
|
123
162
|
{
|
|
@@ -126,29 +165,22 @@ CLAUDE: [Uses AskUserQuestion tool]
|
|
|
126
165
|
"multiSelect": false,
|
|
127
166
|
"options": [
|
|
128
167
|
{"label": "S3 (Recommended)", "description": "Scalable cloud storage"},
|
|
129
|
-
{"label": "Local filesystem", "description": "Simple,
|
|
130
|
-
{"label": "Cloudflare R2", "description": "S3-compatible, no egress fees"}
|
|
131
|
-
]
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
"question": "Who can upload files?",
|
|
135
|
-
"header": "Auth",
|
|
136
|
-
"multiSelect": false,
|
|
137
|
-
"options": [
|
|
138
|
-
{"label": "Logged-in users", "description": "Require authentication"},
|
|
139
|
-
{"label": "Public", "description": "Anyone can upload"},
|
|
140
|
-
{"label": "Role-based", "description": "Specific roles only"}
|
|
168
|
+
{"label": "Local filesystem", "description": "Simple, matches current setup"}
|
|
141
169
|
]
|
|
142
170
|
}
|
|
143
171
|
]
|
|
144
172
|
}
|
|
145
173
|
|
|
146
|
-
USER: [Selects: JPG/PNG + WebP,
|
|
174
|
+
USER: [Selects: JPG/PNG + WebP, S3]
|
|
175
|
+
|
|
176
|
+
CLAUDE: [Spawns reasoner agent]
|
|
177
|
+
- Synthesize: multer + S3 + existing API patterns
|
|
147
178
|
|
|
148
179
|
CLAUDE: ✓ Created specs/image-upload.md
|
|
149
180
|
|
|
150
181
|
Requirements: 4
|
|
151
182
|
Acceptance criteria: 5
|
|
183
|
+
Technical notes: Express/multer pattern, REST conventions from existing API
|
|
152
184
|
|
|
153
185
|
Next: Run /df:plan to generate tasks
|
|
154
186
|
```
|