specflow-cc 1.17.0 → 1.18.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 +29 -0
- package/agents/spec-creator.md +2 -0
- package/agents/spec-reviser.md +28 -11
- package/bin/lib/todo.cjs +238 -0
- package/bin/sf-tools.cjs +21 -0
- package/commands/sf/done.md +17 -6
- package/commands/sf/health.md +11 -3
- package/commands/sf/init.md +2 -2
- package/commands/sf/metrics.md +15 -6
- package/commands/sf/migrate-todos.md +252 -0
- package/commands/sf/plan.md +37 -24
- package/commands/sf/priority.md +14 -8
- package/commands/sf/revise.md +27 -7
- package/commands/sf/status.md +2 -2
- package/commands/sf/todo.md +31 -32
- package/commands/sf/todos.md +68 -56
- package/commands/sf/triage.md +31 -26
- package/package.json +1 -1
- package/templates/todo-file.md +18 -0
- package/templates/todo-index.md +13 -0
- package/templates/todo.md +0 -15
package/commands/sf/todos.md
CHANGED
|
@@ -3,17 +3,22 @@ name: sf:todos
|
|
|
3
3
|
description: List all to-do items sorted by priority
|
|
4
4
|
allowed-tools:
|
|
5
5
|
- Read
|
|
6
|
+
- Write
|
|
6
7
|
- Bash
|
|
7
8
|
---
|
|
8
9
|
|
|
9
10
|
<purpose>
|
|
10
|
-
Display all to-do items from the backlog, sorted by priority.
|
|
11
|
+
Display all to-do items from the backlog, sorted by priority. Reads individual TODO-XXX.md files (or legacy TODO.md for backward compatibility). Writes an auto-generated INDEX.md after display. Provides quick access to convert items to specifications.
|
|
11
12
|
</purpose>
|
|
12
13
|
|
|
13
14
|
<context>
|
|
14
|
-
@.specflow/todos/
|
|
15
|
+
@.specflow/todos/
|
|
15
16
|
</context>
|
|
16
17
|
|
|
18
|
+
<arguments>
|
|
19
|
+
- `[--all]` — Include TODOs with `status: eliminated` in the output (shown as visually distinct).
|
|
20
|
+
</arguments>
|
|
21
|
+
|
|
17
22
|
<workflow>
|
|
18
23
|
|
|
19
24
|
## Step 1: Verify Initialization
|
|
@@ -30,13 +35,30 @@ Run `/sf:init` to start.
|
|
|
30
35
|
```
|
|
31
36
|
Exit.
|
|
32
37
|
|
|
33
|
-
## Step 2:
|
|
38
|
+
## Step 2: List TODOs via CLI Tool
|
|
39
|
+
|
|
40
|
+
Call the CLI tool, which handles format detection automatically:
|
|
34
41
|
|
|
42
|
+
**If `--all` flag was passed:**
|
|
35
43
|
```bash
|
|
36
|
-
|
|
44
|
+
node bin/sf-tools.cjs todo list --all
|
|
37
45
|
```
|
|
38
46
|
|
|
39
|
-
**
|
|
47
|
+
**Otherwise:**
|
|
48
|
+
```bash
|
|
49
|
+
node bin/sf-tools.cjs todo list
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
The tool returns a JSON array of `{ id, title, priority, status, complexity, created }` objects, sorted by priority (high > medium > low > unset), then by created date (oldest first).
|
|
53
|
+
|
|
54
|
+
Format detection is handled by `cmdTodoList` in `bin/lib/todo.cjs`:
|
|
55
|
+
1. If `TODO-*.md` files exist in `.specflow/todos/` — uses per-file format
|
|
56
|
+
2. If no per-file TODOs but `TODO.md` exists — uses legacy format
|
|
57
|
+
3. If neither — returns empty list
|
|
58
|
+
|
|
59
|
+
## Step 3: Handle Empty Result
|
|
60
|
+
|
|
61
|
+
**If the list is empty:**
|
|
40
62
|
```
|
|
41
63
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
42
64
|
TO-DO LIST
|
|
@@ -47,41 +69,16 @@ No to-do items found.
|
|
|
47
69
|
Add your first idea:
|
|
48
70
|
`/sf:todo "your idea here"`
|
|
49
71
|
```
|
|
50
|
-
Exit.
|
|
51
|
-
|
|
52
|
-
## Step 3: Parse TODO.md
|
|
72
|
+
Exit (skip INDEX.md regeneration).
|
|
53
73
|
|
|
54
|
-
|
|
55
|
-
- ID (TODO-XXX)
|
|
56
|
-
- Date (from header)
|
|
57
|
-
- Description
|
|
58
|
-
- Priority (high | medium | low | —)
|
|
59
|
-
- Notes (optional)
|
|
60
|
-
|
|
61
|
-
Look for pattern:
|
|
62
|
-
```
|
|
63
|
-
## TODO-XXX — YYYY-MM-DD
|
|
64
|
-
**Description:** ...
|
|
65
|
-
**Priority:** ...
|
|
66
|
-
**Notes:** ...
|
|
67
|
-
```
|
|
74
|
+
## Step 4: Count Statistics
|
|
68
75
|
|
|
69
|
-
|
|
76
|
+
From the list:
|
|
77
|
+
- Total count
|
|
78
|
+
- Count by priority (high, medium, low, unset/—)
|
|
79
|
+
- If `--all`: note how many are `status: eliminated`
|
|
70
80
|
|
|
71
|
-
|
|
72
|
-
1. high
|
|
73
|
-
2. medium
|
|
74
|
-
3. low
|
|
75
|
-
4. — (unset)
|
|
76
|
-
|
|
77
|
-
Within same priority, sort by date (oldest first).
|
|
78
|
-
|
|
79
|
-
## Step 5: Count Statistics
|
|
80
|
-
|
|
81
|
-
- Total todos
|
|
82
|
-
- By priority (high, medium, low, unset)
|
|
83
|
-
|
|
84
|
-
## Step 6: Display List
|
|
81
|
+
## Step 5: Display List
|
|
85
82
|
|
|
86
83
|
**IMPORTANT:** Output the following directly as formatted text, NOT wrapped in a markdown code block:
|
|
87
84
|
|
|
@@ -90,14 +87,16 @@ Within same priority, sort by date (oldest first).
|
|
|
90
87
|
TO-DO LIST
|
|
91
88
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
92
89
|
|
|
93
|
-
| # | ID |
|
|
94
|
-
|
|
95
|
-
| 1 | TODO-001 | Add caching for API | high | 2024-01-10 |
|
|
96
|
-
| 2 | TODO-003 | Refactor AuthService | medium | 2024-01-12 |
|
|
97
|
-
| 3 | TODO-002 | Update documentation | low | 2024-01-11 |
|
|
98
|
-
| 4 | TODO-004 | Research WebSocket | — | 2024-01-13 |
|
|
90
|
+
| # | ID | Title | Priority | Status | Created |
|
|
91
|
+
|----|----------|--------------------------|----------|---------|------------|
|
|
92
|
+
| 1 | TODO-001 | Add caching for API | high | open | 2024-01-10 |
|
|
93
|
+
| 2 | TODO-003 | Refactor AuthService | medium | open | 2024-01-12 |
|
|
94
|
+
| 3 | TODO-002 | Update documentation | low | open | 2024-01-11 |
|
|
95
|
+
| 4 | TODO-004 | Research WebSocket | — | open | 2024-01-13 |
|
|
96
|
+
{If --all: show eliminated items with [eliminated] marker in Status column}
|
|
99
97
|
|
|
100
98
|
**Total:** {N} items ({high} high, {medium} medium, {low} low, {unset} unset)
|
|
99
|
+
{If --all and eliminated exist: (+ {M} eliminated shown)}
|
|
101
100
|
|
|
102
101
|
---
|
|
103
102
|
|
|
@@ -108,28 +107,41 @@ Within same priority, sort by date (oldest first).
|
|
|
108
107
|
- `/sf:todo "new idea"` — add new item
|
|
109
108
|
```
|
|
110
109
|
|
|
111
|
-
## Step
|
|
110
|
+
## Step 6: Regenerate INDEX.md
|
|
112
111
|
|
|
113
|
-
|
|
112
|
+
After displaying the list, write `.specflow/todos/INDEX.md` using the Write tool.
|
|
114
113
|
|
|
115
|
-
|
|
116
|
-
---
|
|
114
|
+
Use the format from `templates/todo-index.md`:
|
|
117
115
|
|
|
118
|
-
|
|
116
|
+
```markdown
|
|
117
|
+
# To-Do Index
|
|
119
118
|
|
|
120
|
-
|
|
121
|
-
|
|
119
|
+
> Auto-generated from individual TODO files. Do not edit manually.
|
|
120
|
+
> Regenerate with `/sf:todos`.
|
|
121
|
+
|
|
122
|
+
| # | ID | Title | Priority | Status | Created |
|
|
123
|
+
|---|-----|-------|----------|--------|---------|
|
|
124
|
+
{rows from sorted list — one row per TODO}
|
|
125
|
+
|
|
126
|
+
**Total:** {N} items ({high} high, {medium} medium, {low} low, {unset} unset)
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
*Last regenerated: {YYYY-MM-DD HH:MM}*
|
|
122
130
|
```
|
|
123
131
|
|
|
132
|
+
**Important:** INDEX.md is a display cache only. Never edit it manually — it is regenerated here each time `/sf:todos` runs.
|
|
133
|
+
|
|
124
134
|
</workflow>
|
|
125
135
|
|
|
126
136
|
<success_criteria>
|
|
127
137
|
- [ ] Initialization verified
|
|
128
|
-
- [ ]
|
|
129
|
-
- [ ]
|
|
130
|
-
- [ ] Sorted by priority then date
|
|
131
|
-
- [ ] Numbered list displayed
|
|
132
|
-
- [ ]
|
|
138
|
+
- [ ] TODOs listed via `node bin/sf-tools.cjs todo list` (format-agnostic)
|
|
139
|
+
- [ ] Empty state handled with helpful message
|
|
140
|
+
- [ ] Sorted by priority then date (oldest first within same priority)
|
|
141
|
+
- [ ] Numbered list displayed with Status column
|
|
142
|
+
- [ ] `--all` flag shows eliminated items visually distinct
|
|
143
|
+
- [ ] Statistics shown (total, by priority)
|
|
133
144
|
- [ ] Clear actions provided
|
|
134
|
-
- [ ]
|
|
145
|
+
- [ ] INDEX.md written to `.specflow/todos/INDEX.md` after display
|
|
146
|
+
- [ ] INDEX.md contains "Do not edit manually" notice
|
|
135
147
|
</success_criteria>
|
package/commands/sf/triage.md
CHANGED
|
@@ -4,6 +4,7 @@ description: Convert scan findings into actionable TODO items
|
|
|
4
4
|
allowed-tools:
|
|
5
5
|
- Read
|
|
6
6
|
- Write
|
|
7
|
+
- Edit
|
|
7
8
|
- Bash
|
|
8
9
|
- AskUserQuestion
|
|
9
10
|
---
|
|
@@ -14,7 +15,7 @@ Review findings from the last codebase scan and selectively convert them to TODO
|
|
|
14
15
|
|
|
15
16
|
<context>
|
|
16
17
|
@.specflow/SCAN.md
|
|
17
|
-
@.specflow/todos/
|
|
18
|
+
@.specflow/todos/
|
|
18
19
|
</context>
|
|
19
20
|
|
|
20
21
|
<arguments>
|
|
@@ -145,44 +146,47 @@ For each selected finding:
|
|
|
145
146
|
### 6.1 Generate TODO ID
|
|
146
147
|
|
|
147
148
|
```bash
|
|
148
|
-
|
|
149
|
+
node bin/sf-tools.cjs todo next-id --raw
|
|
149
150
|
```
|
|
150
151
|
|
|
151
|
-
|
|
152
|
+
This handles both per-file format and legacy TODO.md automatically (uses Node.js fs/regex — not grep -oP).
|
|
152
153
|
|
|
153
|
-
|
|
154
|
-
## TODO-{XXX} — {YYYY-MM-DD}
|
|
155
|
-
**Description:** {category}: {title}
|
|
156
|
-
**Priority:** {high|medium|low}
|
|
157
|
-
**Notes:**
|
|
158
|
-
- Source: SCAN.md ({scan date})
|
|
159
|
-
- Files: {files}
|
|
160
|
-
- Problem: {problem}
|
|
161
|
-
- Suggested fix: {fix}
|
|
162
|
-
|
|
163
|
-
---
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
### 6.3 Append to TODO.md
|
|
154
|
+
### 6.2 Create TODO File
|
|
167
155
|
|
|
168
156
|
Ensure `.specflow/todos/` directory exists:
|
|
169
157
|
```bash
|
|
170
158
|
mkdir -p .specflow/todos
|
|
171
159
|
```
|
|
172
160
|
|
|
173
|
-
|
|
174
|
-
```markdown
|
|
175
|
-
# To-Do List
|
|
161
|
+
Create `.specflow/todos/TODO-{XXX}.md` using the Write tool:
|
|
176
162
|
|
|
163
|
+
```markdown
|
|
164
|
+
---
|
|
165
|
+
id: TODO-{XXX}
|
|
166
|
+
title: "{category}: {title}"
|
|
167
|
+
priority: {high|medium|low}
|
|
168
|
+
complexity: —
|
|
169
|
+
status: open
|
|
170
|
+
effort: —
|
|
171
|
+
depends_on: —
|
|
172
|
+
created: {YYYY-MM-DD}
|
|
177
173
|
---
|
|
178
174
|
|
|
179
|
-
|
|
175
|
+
## Description
|
|
180
176
|
|
|
181
|
-
|
|
182
|
-
|
|
177
|
+
{category}: {title}
|
|
178
|
+
|
|
179
|
+
{problem description}
|
|
180
|
+
|
|
181
|
+
## Notes
|
|
182
|
+
|
|
183
|
+
- Source: SCAN.md ({scan date})
|
|
184
|
+
- Files: {files affected}
|
|
185
|
+
- Problem: {problem}
|
|
186
|
+
- Suggested fix: {fix}
|
|
183
187
|
```
|
|
184
188
|
|
|
185
|
-
|
|
189
|
+
Do NOT append to TODO.md. Do NOT update any "Last updated" lines. Each finding gets its own separate TODO-XXX.md file.
|
|
186
190
|
|
|
187
191
|
## Step 7: Display Results
|
|
188
192
|
|
|
@@ -247,8 +251,9 @@ Run /sf:triage again to review findings.
|
|
|
247
251
|
- [ ] Findings extracted with priority levels
|
|
248
252
|
- [ ] User shown summary of findings
|
|
249
253
|
- [ ] Interactive selection completed (or --all used)
|
|
250
|
-
- [ ] TODO
|
|
254
|
+
- [ ] Individual TODO-XXX.md files created (one per finding)
|
|
255
|
+
- [ ] Each file has valid YAML frontmatter (id, title, priority, status, created)
|
|
251
256
|
- [ ] Priority preserved from scan
|
|
252
|
-
- [ ] Source reference included in notes
|
|
257
|
+
- [ ] Source reference included in notes (scan date, files, problem)
|
|
253
258
|
- [ ] Clear summary of created TODOs
|
|
254
259
|
</success_criteria>
|
package/package.json
CHANGED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# To-Do Index
|
|
2
|
+
|
|
3
|
+
> Auto-generated from individual TODO files. Do not edit manually.
|
|
4
|
+
> Regenerate with `/sf:todos`.
|
|
5
|
+
|
|
6
|
+
| # | ID | Title | Priority | Status | Created |
|
|
7
|
+
|---|-----|-------|----------|--------|---------|
|
|
8
|
+
{rows sorted by priority then date}
|
|
9
|
+
|
|
10
|
+
**Total:** {N} items ({high} high, {medium} medium, {low} low, {unset} unset)
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
*Last regenerated: {YYYY-MM-DD HH:MM}*
|
package/templates/todo.md
DELETED