specflow-cc 1.0.0
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/CHANGELOG.md +73 -0
- package/LICENSE +21 -0
- package/README.md +246 -0
- package/agents/impl-reviewer.md +271 -0
- package/agents/spec-auditor.md +196 -0
- package/agents/spec-creator.md +155 -0
- package/agents/spec-executor.md +235 -0
- package/agents/spec-reviser.md +184 -0
- package/agents/spec-splitter.md +197 -0
- package/bin/install.js +398 -0
- package/commands/sf/audit.md +210 -0
- package/commands/sf/deps.md +234 -0
- package/commands/sf/done.md +271 -0
- package/commands/sf/fix.md +272 -0
- package/commands/sf/help.md +263 -0
- package/commands/sf/history.md +268 -0
- package/commands/sf/init.md +217 -0
- package/commands/sf/list.md +127 -0
- package/commands/sf/metrics.md +319 -0
- package/commands/sf/new.md +171 -0
- package/commands/sf/next.md +182 -0
- package/commands/sf/pause.md +211 -0
- package/commands/sf/plan.md +210 -0
- package/commands/sf/priority.md +198 -0
- package/commands/sf/resume.md +248 -0
- package/commands/sf/review.md +258 -0
- package/commands/sf/revise.md +232 -0
- package/commands/sf/run.md +265 -0
- package/commands/sf/show.md +203 -0
- package/commands/sf/split.md +341 -0
- package/commands/sf/status.md +170 -0
- package/commands/sf/todo.md +130 -0
- package/commands/sf/todos.md +133 -0
- package/hooks/statusline.js +69 -0
- package/package.json +37 -0
- package/templates/audit.md +61 -0
- package/templates/project.md +39 -0
- package/templates/spec.md +59 -0
- package/templates/state.md +32 -0
- package/templates/todo.md +15 -0
|
@@ -0,0 +1,341 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sf:split
|
|
3
|
+
description: Split a large specification into smaller sub-specifications
|
|
4
|
+
allowed-tools:
|
|
5
|
+
- Read
|
|
6
|
+
- Write
|
|
7
|
+
- Bash
|
|
8
|
+
- Glob
|
|
9
|
+
- Grep
|
|
10
|
+
- Task
|
|
11
|
+
- AskUserQuestion
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
<purpose>
|
|
15
|
+
Analyze a specification's complexity and split it into smaller, manageable sub-specifications with proper dependency chains. Large specifications (>150k tokens estimated) should be decomposed before implementation.
|
|
16
|
+
</purpose>
|
|
17
|
+
|
|
18
|
+
<context>
|
|
19
|
+
@.specflow/STATE.md
|
|
20
|
+
@.specflow/specs/SPEC-*.md
|
|
21
|
+
@~/.claude/specflow-cc/agents/spec-splitter.md
|
|
22
|
+
</context>
|
|
23
|
+
|
|
24
|
+
<arguments>
|
|
25
|
+
- `[ID]` — Specification ID to split (e.g., SPEC-001). Optional — defaults to active specification.
|
|
26
|
+
</arguments>
|
|
27
|
+
|
|
28
|
+
<workflow>
|
|
29
|
+
|
|
30
|
+
## Step 1: Verify Initialization
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
[ -d .specflow ] && echo "OK" || echo "NOT_INITIALIZED"
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
**If NOT_INITIALIZED:**
|
|
37
|
+
```
|
|
38
|
+
SpecFlow not initialized.
|
|
39
|
+
|
|
40
|
+
Run `/sf init` first.
|
|
41
|
+
```
|
|
42
|
+
Exit.
|
|
43
|
+
|
|
44
|
+
## Step 2: Determine Target Specification
|
|
45
|
+
|
|
46
|
+
**If ID provided:**
|
|
47
|
+
```bash
|
|
48
|
+
[ -f ".specflow/specs/{ID}.md" ] && echo "FOUND" || echo "NOT_FOUND"
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
**If NOT_FOUND:**
|
|
52
|
+
```
|
|
53
|
+
Specification {ID} not found.
|
|
54
|
+
|
|
55
|
+
Use `/sf list` to see available specifications.
|
|
56
|
+
```
|
|
57
|
+
Exit.
|
|
58
|
+
|
|
59
|
+
**If no ID provided:**
|
|
60
|
+
Read active specification from `.specflow/STATE.md`:
|
|
61
|
+
- Parse "Active Specification" field
|
|
62
|
+
- Use that ID
|
|
63
|
+
|
|
64
|
+
**If no active specification:**
|
|
65
|
+
```
|
|
66
|
+
No specification specified and no active specification.
|
|
67
|
+
|
|
68
|
+
Usage: `/sf split SPEC-001`
|
|
69
|
+
or: Set active spec with `/sf show SPEC-001`
|
|
70
|
+
```
|
|
71
|
+
Exit.
|
|
72
|
+
|
|
73
|
+
## Step 3: Check Complexity
|
|
74
|
+
|
|
75
|
+
Read the specification and assess complexity:
|
|
76
|
+
- Count sections and requirements
|
|
77
|
+
- Estimate based on scope described
|
|
78
|
+
- Check frontmatter `complexity` field
|
|
79
|
+
|
|
80
|
+
**If complexity is small:**
|
|
81
|
+
```
|
|
82
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
83
|
+
SPLIT NOT NEEDED
|
|
84
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
85
|
+
|
|
86
|
+
**Specification:** {ID}
|
|
87
|
+
**Complexity:** small (~{estimate}k tokens)
|
|
88
|
+
|
|
89
|
+
This specification is small enough to implement directly.
|
|
90
|
+
|
|
91
|
+
**Next Step:** `/sf audit {ID}` — audit before implementation
|
|
92
|
+
```
|
|
93
|
+
Exit.
|
|
94
|
+
|
|
95
|
+
**If complexity is medium:**
|
|
96
|
+
```
|
|
97
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
98
|
+
SPLIT OPTIONAL
|
|
99
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
100
|
+
|
|
101
|
+
**Specification:** {ID}
|
|
102
|
+
**Complexity:** medium (~{estimate}k tokens)
|
|
103
|
+
|
|
104
|
+
This specification can be implemented as-is or split for easier management.
|
|
105
|
+
|
|
106
|
+
Continue with split analysis? [y/N]
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
**If user declines:** Exit.
|
|
110
|
+
|
|
111
|
+
## Step 4: Spawn Spec Splitter Agent
|
|
112
|
+
|
|
113
|
+
Launch the spec-splitter subagent:
|
|
114
|
+
|
|
115
|
+
```
|
|
116
|
+
Task(prompt="
|
|
117
|
+
<specification>
|
|
118
|
+
@.specflow/specs/{ID}.md
|
|
119
|
+
</specification>
|
|
120
|
+
|
|
121
|
+
<project_context>
|
|
122
|
+
@.specflow/PROJECT.md
|
|
123
|
+
</project_context>
|
|
124
|
+
|
|
125
|
+
<current_state>
|
|
126
|
+
@.specflow/STATE.md
|
|
127
|
+
</current_state>
|
|
128
|
+
|
|
129
|
+
Analyze this specification and propose a split into smaller sub-specifications.
|
|
130
|
+
Follow the spec-splitter agent instructions.
|
|
131
|
+
", subagent_type="sf-spec-splitter", description="Split specification")
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## Step 5: Present Proposal
|
|
135
|
+
|
|
136
|
+
Display agent's split proposal:
|
|
137
|
+
|
|
138
|
+
```
|
|
139
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
140
|
+
SPLIT ANALYSIS: {ID}
|
|
141
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
142
|
+
|
|
143
|
+
**Current:** {ID} — {title}
|
|
144
|
+
**Complexity:** {complexity} (~{estimate}k tokens)
|
|
145
|
+
**Status:** {status}
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## Analysis
|
|
150
|
+
|
|
151
|
+
{Agent's analysis of structure and boundaries}
|
|
152
|
+
|
|
153
|
+
## Proposed Split
|
|
154
|
+
|
|
155
|
+
| ID | Title | Est. Size | Dependencies |
|
|
156
|
+
|-----------|--------------------------|-----------|--------------|
|
|
157
|
+
| {ID}a | {title} | small | — |
|
|
158
|
+
| {ID}b | {title} | medium | {ID}a |
|
|
159
|
+
| {ID}c | {title} | small | {ID}b |
|
|
160
|
+
|
|
161
|
+
## Dependency Graph
|
|
162
|
+
|
|
163
|
+
```
|
|
164
|
+
{ID}a ({short description})
|
|
165
|
+
↓
|
|
166
|
+
{ID}b ({short description})
|
|
167
|
+
↓
|
|
168
|
+
{ID}c ({short description})
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
**Options:**
|
|
174
|
+
1. Accept split as proposed
|
|
175
|
+
2. Modify split (describe changes)
|
|
176
|
+
3. Cancel (keep as single spec)
|
|
177
|
+
|
|
178
|
+
Your choice [1]:
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
## Step 6: Handle User Choice
|
|
182
|
+
|
|
183
|
+
**If 1 (Accept):**
|
|
184
|
+
- Agent creates child specifications
|
|
185
|
+
- Agent archives parent
|
|
186
|
+
- Agent updates STATE.md
|
|
187
|
+
- Continue to Step 7
|
|
188
|
+
|
|
189
|
+
**If 2 (Modify):**
|
|
190
|
+
- Use AskUserQuestion to get modifications
|
|
191
|
+
- Re-run agent with modifications
|
|
192
|
+
- Return to Step 5
|
|
193
|
+
|
|
194
|
+
**If 3 (Cancel):**
|
|
195
|
+
```
|
|
196
|
+
Split cancelled.
|
|
197
|
+
|
|
198
|
+
Specification {ID} unchanged.
|
|
199
|
+
```
|
|
200
|
+
Exit.
|
|
201
|
+
|
|
202
|
+
## Step 7: Display Result
|
|
203
|
+
|
|
204
|
+
```
|
|
205
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
206
|
+
SPLIT COMPLETE
|
|
207
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
208
|
+
|
|
209
|
+
**Parent:** {ID} (archived)
|
|
210
|
+
**Children:** {N} specifications created
|
|
211
|
+
|
|
212
|
+
### Created Specifications
|
|
213
|
+
|
|
214
|
+
| ID | Title | Size | Depends On |
|
|
215
|
+
|-----------|--------------------------|--------|--------------|
|
|
216
|
+
| {ID}a | {title} | small | — |
|
|
217
|
+
| {ID}b | {title} | medium | {ID}a |
|
|
218
|
+
| {ID}c | {title} | small | {ID}b |
|
|
219
|
+
|
|
220
|
+
### Dependency Graph
|
|
221
|
+
|
|
222
|
+
```
|
|
223
|
+
{ID}a
|
|
224
|
+
↓
|
|
225
|
+
{ID}b
|
|
226
|
+
↓
|
|
227
|
+
{ID}c
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
### Files
|
|
231
|
+
|
|
232
|
+
**Created:**
|
|
233
|
+
- .specflow/specs/{ID}a.md
|
|
234
|
+
- .specflow/specs/{ID}b.md
|
|
235
|
+
- .specflow/specs/{ID}c.md
|
|
236
|
+
|
|
237
|
+
**Archived:**
|
|
238
|
+
- .specflow/archive/{ID}.md
|
|
239
|
+
|
|
240
|
+
---
|
|
241
|
+
|
|
242
|
+
## Next Step
|
|
243
|
+
|
|
244
|
+
`/sf audit {ID}a` — start with first sub-specification (no dependencies)
|
|
245
|
+
|
|
246
|
+
**Tip:** Use `/sf deps` to see the full dependency graph.
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
</workflow>
|
|
250
|
+
|
|
251
|
+
<fallback>
|
|
252
|
+
|
|
253
|
+
**If agent spawning fails**, execute inline:
|
|
254
|
+
|
|
255
|
+
## Inline Split Analysis
|
|
256
|
+
|
|
257
|
+
### Read Specification
|
|
258
|
+
|
|
259
|
+
```bash
|
|
260
|
+
cat .specflow/specs/{ID}.md
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
### Identify Boundaries
|
|
264
|
+
|
|
265
|
+
Based on specification content, identify:
|
|
266
|
+
1. Data/model layer tasks
|
|
267
|
+
2. Logic/service layer tasks
|
|
268
|
+
3. Integration/API layer tasks
|
|
269
|
+
4. UI/presentation layer tasks
|
|
270
|
+
|
|
271
|
+
### Generate Sub-Spec IDs
|
|
272
|
+
|
|
273
|
+
Parent: SPEC-001 → Children: SPEC-001a, SPEC-001b, SPEC-001c, etc.
|
|
274
|
+
|
|
275
|
+
### Create Child Specifications
|
|
276
|
+
|
|
277
|
+
For each child, create `.specflow/specs/{ID}{letter}.md`:
|
|
278
|
+
|
|
279
|
+
```markdown
|
|
280
|
+
---
|
|
281
|
+
id: {ID}{letter}
|
|
282
|
+
parent: {ID}
|
|
283
|
+
type: {inherited from parent}
|
|
284
|
+
status: draft
|
|
285
|
+
priority: {inherited from parent}
|
|
286
|
+
complexity: {estimated}
|
|
287
|
+
depends_on: [{previous child or empty}]
|
|
288
|
+
created: {today}
|
|
289
|
+
---
|
|
290
|
+
|
|
291
|
+
# {Scoped Title}
|
|
292
|
+
|
|
293
|
+
> Part {N} of {total} from {ID} ({parent title})
|
|
294
|
+
|
|
295
|
+
## Context
|
|
296
|
+
{Extracted from parent, scoped to this part}
|
|
297
|
+
|
|
298
|
+
## Task
|
|
299
|
+
{Scoped to this sub-spec only}
|
|
300
|
+
|
|
301
|
+
## Requirements
|
|
302
|
+
{Relevant subset from parent}
|
|
303
|
+
|
|
304
|
+
## Acceptance Criteria
|
|
305
|
+
{Relevant criteria from parent}
|
|
306
|
+
|
|
307
|
+
## Constraints
|
|
308
|
+
{Inherited from parent}
|
|
309
|
+
|
|
310
|
+
## Assumptions
|
|
311
|
+
{Inherited from parent}
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
### Archive Parent
|
|
315
|
+
|
|
316
|
+
```bash
|
|
317
|
+
mkdir -p .specflow/archive
|
|
318
|
+
mv .specflow/specs/{ID}.md .specflow/archive/
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
Add split reference to archived parent.
|
|
322
|
+
|
|
323
|
+
### Update STATE.md
|
|
324
|
+
|
|
325
|
+
- Remove parent from Queue
|
|
326
|
+
- Add children to Queue
|
|
327
|
+
- Set first child as Active Specification
|
|
328
|
+
|
|
329
|
+
</fallback>
|
|
330
|
+
|
|
331
|
+
<success_criteria>
|
|
332
|
+
- [ ] Initialization verified
|
|
333
|
+
- [ ] Target specification identified
|
|
334
|
+
- [ ] Complexity assessed
|
|
335
|
+
- [ ] Split proposal generated with dependencies
|
|
336
|
+
- [ ] User approved (or cancelled)
|
|
337
|
+
- [ ] Child specifications created with proper frontmatter
|
|
338
|
+
- [ ] Parent archived with split reference
|
|
339
|
+
- [ ] STATE.md updated
|
|
340
|
+
- [ ] Clear next step provided
|
|
341
|
+
</success_criteria>
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sf:status
|
|
3
|
+
description: Show current SpecFlow state and recommended next step
|
|
4
|
+
allowed-tools:
|
|
5
|
+
- Read
|
|
6
|
+
- Bash
|
|
7
|
+
- Glob
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
<purpose>
|
|
11
|
+
Display the current SpecFlow state including active specification, queue, and recommended next action. Provides situational awareness for continuing work.
|
|
12
|
+
</purpose>
|
|
13
|
+
|
|
14
|
+
<context>
|
|
15
|
+
@.specflow/STATE.md
|
|
16
|
+
@.specflow/PROJECT.md
|
|
17
|
+
</context>
|
|
18
|
+
|
|
19
|
+
<workflow>
|
|
20
|
+
|
|
21
|
+
## Step 1: Verify Initialization
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
[ -d .specflow ] && echo "OK" || echo "NOT_INITIALIZED"
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
**If NOT_INITIALIZED:**
|
|
28
|
+
```
|
|
29
|
+
SpecFlow not initialized.
|
|
30
|
+
|
|
31
|
+
Run `/sf init` to start.
|
|
32
|
+
```
|
|
33
|
+
Exit.
|
|
34
|
+
|
|
35
|
+
## Step 2: Load State
|
|
36
|
+
|
|
37
|
+
Read `.specflow/STATE.md` and extract:
|
|
38
|
+
- Active Specification
|
|
39
|
+
- Status
|
|
40
|
+
- Next Step
|
|
41
|
+
- Queue
|
|
42
|
+
- Recent Decisions
|
|
43
|
+
- Warnings
|
|
44
|
+
|
|
45
|
+
## Step 3: Load Project Info
|
|
46
|
+
|
|
47
|
+
Read `.specflow/PROJECT.md` and extract:
|
|
48
|
+
- Project name
|
|
49
|
+
- Tech stack summary
|
|
50
|
+
|
|
51
|
+
## Step 4: Count Statistics
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
# Total specs
|
|
55
|
+
TOTAL=$(ls .specflow/specs/SPEC-*.md 2>/dev/null | wc -l)
|
|
56
|
+
|
|
57
|
+
# Completed specs
|
|
58
|
+
DONE=$(ls .specflow/archive/SPEC-*.md 2>/dev/null | wc -l)
|
|
59
|
+
|
|
60
|
+
# Pending todos
|
|
61
|
+
TODOS=$(ls .specflow/todos/*.md 2>/dev/null | wc -l)
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Step 5: Determine Next Action
|
|
65
|
+
|
|
66
|
+
Based on current status:
|
|
67
|
+
|
|
68
|
+
| Status | Next Action |
|
|
69
|
+
|--------|-------------|
|
|
70
|
+
| idle | `/sf new "task"` — create specification |
|
|
71
|
+
| drafting | `/sf audit` — audit specification |
|
|
72
|
+
| revision_requested | `/sf revise` — fix issues |
|
|
73
|
+
| audited | `/sf run` — implement |
|
|
74
|
+
| running | Continue implementation or `/sf review` |
|
|
75
|
+
| reviewing | `/sf fix` or `/sf done` |
|
|
76
|
+
|
|
77
|
+
## Step 6: Display Status
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
81
|
+
SPECFLOW STATUS
|
|
82
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
83
|
+
|
|
84
|
+
**Project:** [name]
|
|
85
|
+
**Progress:** [████████░░] {done}/{total} specs complete
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## Current Position
|
|
90
|
+
|
|
91
|
+
**Active:** {SPEC-XXX: Title | none}
|
|
92
|
+
**Status:** {status}
|
|
93
|
+
|
|
94
|
+
{If active spec exists:}
|
|
95
|
+
**Type:** {feature | refactor | bugfix}
|
|
96
|
+
**Complexity:** {small | medium | large}
|
|
97
|
+
**Priority:** {high | medium | low}
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## Queue
|
|
102
|
+
|
|
103
|
+
| # | ID | Title | Priority | Status |
|
|
104
|
+
|---|----|-------|----------|--------|
|
|
105
|
+
{Queue from STATE.md}
|
|
106
|
+
|
|
107
|
+
{If queue empty:}
|
|
108
|
+
No specifications in queue.
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
{If recent decisions exist:}
|
|
113
|
+
## Recent Decisions
|
|
114
|
+
|
|
115
|
+
| Spec | Decision |
|
|
116
|
+
|------|----------|
|
|
117
|
+
{Last 3-5 decisions}
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
{If warnings exist:}
|
|
122
|
+
## Warnings
|
|
123
|
+
|
|
124
|
+
{List warnings}
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## Next Step
|
|
129
|
+
|
|
130
|
+
`{recommended command}` — {description}
|
|
131
|
+
|
|
132
|
+
{Additional context-specific suggestions}
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
## Step 7: Context-Specific Suggestions
|
|
136
|
+
|
|
137
|
+
Based on state, provide additional guidance:
|
|
138
|
+
|
|
139
|
+
**If idle for long time:**
|
|
140
|
+
```
|
|
141
|
+
**Tip:** Have ideas? Use `/sf todo "idea"` to capture for later.
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
**If spec is large:**
|
|
145
|
+
```
|
|
146
|
+
**Tip:** Consider `/sf split SPEC-XXX` to break into smaller specs.
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
**If multiple specs in queue:**
|
|
150
|
+
```
|
|
151
|
+
**Tip:** Use `/sf next` to work on highest priority item.
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
**If warnings present:**
|
|
155
|
+
```
|
|
156
|
+
**Note:** {N} warnings recorded. Review before continuing.
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
</workflow>
|
|
160
|
+
|
|
161
|
+
<success_criteria>
|
|
162
|
+
- [ ] Initialization verified
|
|
163
|
+
- [ ] STATE.md loaded
|
|
164
|
+
- [ ] PROJECT.md info extracted
|
|
165
|
+
- [ ] Statistics calculated
|
|
166
|
+
- [ ] Current position displayed
|
|
167
|
+
- [ ] Queue shown
|
|
168
|
+
- [ ] Recommended next step clear
|
|
169
|
+
- [ ] Context-specific tips provided
|
|
170
|
+
</success_criteria>
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sf:todo
|
|
3
|
+
description: Add a new to-do item for future work
|
|
4
|
+
allowed-tools:
|
|
5
|
+
- Read
|
|
6
|
+
- Write
|
|
7
|
+
- Bash
|
|
8
|
+
- AskUserQuestion
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
<purpose>
|
|
12
|
+
Add a new to-do item to the backlog. To-dos are ideas or tasks that don't need immediate specification but should be captured for later. They can later be converted to specifications with `/sf plan`.
|
|
13
|
+
</purpose>
|
|
14
|
+
|
|
15
|
+
<context>
|
|
16
|
+
@.specflow/todos/TODO.md
|
|
17
|
+
</context>
|
|
18
|
+
|
|
19
|
+
<arguments>
|
|
20
|
+
- `[text]` — Optional. Description of the to-do item. If omitted, will prompt interactively.
|
|
21
|
+
</arguments>
|
|
22
|
+
|
|
23
|
+
<workflow>
|
|
24
|
+
|
|
25
|
+
## Step 1: Verify Initialization
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
[ -d .specflow ] && echo "OK" || echo "NOT_INITIALIZED"
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
**If NOT_INITIALIZED:**
|
|
32
|
+
```
|
|
33
|
+
SpecFlow not initialized.
|
|
34
|
+
|
|
35
|
+
Run `/sf init` to start.
|
|
36
|
+
```
|
|
37
|
+
Exit.
|
|
38
|
+
|
|
39
|
+
## Step 2: Ensure Todos Directory Exists
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
mkdir -p .specflow/todos
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Step 3: Get Description
|
|
46
|
+
|
|
47
|
+
**If argument provided:**
|
|
48
|
+
Use provided text as description.
|
|
49
|
+
|
|
50
|
+
**If no argument:**
|
|
51
|
+
Use AskUserQuestion:
|
|
52
|
+
- header: "Todo"
|
|
53
|
+
- question: "What idea or task do you want to capture?"
|
|
54
|
+
- options: (freeform text input)
|
|
55
|
+
|
|
56
|
+
## Step 4: Generate TODO ID
|
|
57
|
+
|
|
58
|
+
Check existing TODO.md for highest ID:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
grep -oP 'TODO-\K\d+' .specflow/todos/TODO.md 2>/dev/null | sort -n | tail -1
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
If no existing todos, start with 001.
|
|
65
|
+
Next ID = last + 1, zero-padded to 3 digits.
|
|
66
|
+
|
|
67
|
+
## Step 5: Create or Update TODO.md
|
|
68
|
+
|
|
69
|
+
**If TODO.md doesn't exist:**
|
|
70
|
+
Create from template:
|
|
71
|
+
|
|
72
|
+
```markdown
|
|
73
|
+
# To-Do List
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## TODO-{XXX} — {YYYY-MM-DD}
|
|
78
|
+
**Description:** {description}
|
|
79
|
+
**Priority:** —
|
|
80
|
+
**Notes:** —
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
*Last updated: {YYYY-MM-DD}*
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
**If TODO.md exists:**
|
|
87
|
+
Insert new todo after `# To-Do List` line:
|
|
88
|
+
|
|
89
|
+
```markdown
|
|
90
|
+
## TODO-{XXX} — {YYYY-MM-DD}
|
|
91
|
+
**Description:** {description}
|
|
92
|
+
**Priority:** —
|
|
93
|
+
**Notes:** —
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Also update `*Last updated:` line at the bottom.
|
|
99
|
+
|
|
100
|
+
## Step 6: Display Confirmation
|
|
101
|
+
|
|
102
|
+
```
|
|
103
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
104
|
+
TODO CREATED
|
|
105
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
106
|
+
|
|
107
|
+
**ID:** TODO-{XXX}
|
|
108
|
+
**Description:** {description}
|
|
109
|
+
**Priority:** — (not set)
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
**Actions:**
|
|
114
|
+
- `/sf todos` — view all to-do items
|
|
115
|
+
- `/sf plan TODO-{XXX}` — convert to specification
|
|
116
|
+
- `/sf priority` — set priorities
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
</workflow>
|
|
120
|
+
|
|
121
|
+
<success_criteria>
|
|
122
|
+
- [ ] Initialization verified
|
|
123
|
+
- [ ] Todos directory exists
|
|
124
|
+
- [ ] Description obtained (from arg or prompt)
|
|
125
|
+
- [ ] Unique TODO-XXX ID generated
|
|
126
|
+
- [ ] TODO.md created or updated
|
|
127
|
+
- [ ] New todo added at top of list
|
|
128
|
+
- [ ] Last updated timestamp refreshed
|
|
129
|
+
- [ ] Clear confirmation and next actions shown
|
|
130
|
+
</success_criteria>
|