specflow-cc 1.7.2 → 1.8.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/README.md +1 -0
- package/agents/spec-executor-worker.md +7 -0
- package/agents/spec-executor.md +7 -0
- package/commands/sf/help.md +1 -0
- package/commands/sf/scan.md +2 -1
- package/commands/sf/triage.md +252 -0
- package/package.json +1 -1
- package/templates/spec.md +1 -0
package/README.md
CHANGED
|
@@ -356,6 +356,7 @@ before showing interactive options.
|
|
|
356
356
|
| `/sf:discuss "question?"` | Single question |
|
|
357
357
|
| `/sf:discuss --pre "topic"` | Pre-spec discussion with feature-type questions |
|
|
358
358
|
| `/sf:scan` | Analyze codebase for issues |
|
|
359
|
+
| `/sf:triage` | Convert scan findings to TODOs |
|
|
359
360
|
|
|
360
361
|
**Pre-spec discussion** identifies gray areas before creating a spec:
|
|
361
362
|
|
|
@@ -56,6 +56,13 @@ One commit per logical unit:
|
|
|
56
56
|
- Clean, readable code
|
|
57
57
|
- Handle edge cases mentioned in requirements
|
|
58
58
|
|
|
59
|
+
## Code Comments Convention
|
|
60
|
+
|
|
61
|
+
When writing or modifying code:
|
|
62
|
+
- Do NOT add phase/spec/bug references in code comments (e.g., `// Phase 8.02`, `// BUG-06`, `// SPEC-011`)
|
|
63
|
+
- Such references belong in commit messages, not in code
|
|
64
|
+
- Instead, write WHY-comments explaining the reason for the code
|
|
65
|
+
|
|
59
66
|
</philosophy>
|
|
60
67
|
|
|
61
68
|
<process>
|
package/agents/spec-executor.md
CHANGED
|
@@ -63,6 +63,13 @@ One commit per logical unit:
|
|
|
63
63
|
- Clean, readable code
|
|
64
64
|
- Handle edge cases mentioned in spec
|
|
65
65
|
|
|
66
|
+
## Code Comments Convention
|
|
67
|
+
|
|
68
|
+
When writing or modifying code:
|
|
69
|
+
- Do NOT add phase/spec/bug references in code comments (e.g., `// Phase 8.02`, `// BUG-06`, `// SPEC-011`)
|
|
70
|
+
- Such references belong in commit messages, not in code
|
|
71
|
+
- Instead, write WHY-comments explaining the reason for the code
|
|
72
|
+
|
|
66
73
|
</philosophy>
|
|
67
74
|
|
|
68
75
|
<process>
|
package/commands/sf/help.md
CHANGED
|
@@ -275,6 +275,7 @@ Workflow: Spec → Audit → Revise → Run → Review → Fix → Done
|
|
|
275
275
|
| /sf:research | Research topic for spec context |
|
|
276
276
|
| /sf:discuss | Clarify requirements interactively |
|
|
277
277
|
| /sf:scan | Deep codebase analysis |
|
|
278
|
+
| /sf:triage | Convert scan findings to TODOs |
|
|
278
279
|
|
|
279
280
|
## Utilities
|
|
280
281
|
|
package/commands/sf/scan.md
CHANGED
|
@@ -130,8 +130,9 @@ Top Priority Issues:
|
|
|
130
130
|
📁 Full report: .specflow/SCAN.md
|
|
131
131
|
|
|
132
132
|
Next steps:
|
|
133
|
+
• /sf:triage — Review findings and create TODOs
|
|
133
134
|
• /sf:new "Fix: {top concern}" — Create spec for top issue
|
|
134
|
-
• /sf:todo {concern} — Add to backlog
|
|
135
|
+
• /sf:todo {concern} — Add single item to backlog
|
|
135
136
|
```
|
|
136
137
|
|
|
137
138
|
</workflow>
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sf:triage
|
|
3
|
+
description: Convert scan findings into actionable TODO items
|
|
4
|
+
allowed-tools:
|
|
5
|
+
- Read
|
|
6
|
+
- Write
|
|
7
|
+
- Bash
|
|
8
|
+
- AskUserQuestion
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
<purpose>
|
|
12
|
+
Review findings from the last codebase scan and selectively convert them to TODO items. This bridges the gap between scanning and planning — you see what was found and decide what to act on.
|
|
13
|
+
</purpose>
|
|
14
|
+
|
|
15
|
+
<context>
|
|
16
|
+
@.specflow/SCAN.md
|
|
17
|
+
@.specflow/todos/TODO.md
|
|
18
|
+
</context>
|
|
19
|
+
|
|
20
|
+
<arguments>
|
|
21
|
+
- `[--all]` — Convert all findings without prompting (batch mode)
|
|
22
|
+
- `[--priority=high|medium|low]` — Only show findings of specified priority
|
|
23
|
+
</arguments>
|
|
24
|
+
|
|
25
|
+
<workflow>
|
|
26
|
+
|
|
27
|
+
## Step 1: Verify Prerequisites
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
[ -d .specflow ] && echo "INITIALIZED" || echo "NOT_INITIALIZED"
|
|
31
|
+
[ -f .specflow/SCAN.md ] && echo "SCAN_EXISTS" || echo "NO_SCAN"
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
**If NOT_INITIALIZED:**
|
|
35
|
+
```
|
|
36
|
+
⚠️ Project not initialized
|
|
37
|
+
|
|
38
|
+
Run /sf:init first.
|
|
39
|
+
```
|
|
40
|
+
STOP.
|
|
41
|
+
|
|
42
|
+
**If NO_SCAN:**
|
|
43
|
+
```
|
|
44
|
+
⚠️ No scan results found
|
|
45
|
+
|
|
46
|
+
Run /sf:scan first to analyze the codebase.
|
|
47
|
+
```
|
|
48
|
+
STOP.
|
|
49
|
+
|
|
50
|
+
## Step 2: Parse SCAN.md
|
|
51
|
+
|
|
52
|
+
Read `.specflow/SCAN.md` and extract findings:
|
|
53
|
+
|
|
54
|
+
**Structure to parse:**
|
|
55
|
+
- `## Tech Debt` → `### High Priority`, `### Medium Priority`, `### Low Priority`
|
|
56
|
+
- `## Code Quality Issues`
|
|
57
|
+
- `## Security Considerations`
|
|
58
|
+
- `## Test Coverage Gaps`
|
|
59
|
+
- `## Suggested Specifications`
|
|
60
|
+
|
|
61
|
+
For each finding, extract:
|
|
62
|
+
- Title (from `**[Title]**`)
|
|
63
|
+
- Files affected
|
|
64
|
+
- Problem description
|
|
65
|
+
- Priority/Severity
|
|
66
|
+
- Suggested fix
|
|
67
|
+
|
|
68
|
+
## Step 3: Build Findings List
|
|
69
|
+
|
|
70
|
+
Create structured list:
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
findings = [
|
|
74
|
+
{
|
|
75
|
+
id: 1,
|
|
76
|
+
category: "Tech Debt",
|
|
77
|
+
priority: "high",
|
|
78
|
+
title: "...",
|
|
79
|
+
files: ["..."],
|
|
80
|
+
problem: "...",
|
|
81
|
+
fix: "..."
|
|
82
|
+
},
|
|
83
|
+
...
|
|
84
|
+
]
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
**If --priority flag provided:**
|
|
88
|
+
Filter to only matching priority.
|
|
89
|
+
|
|
90
|
+
## Step 4: Display Summary
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
94
|
+
SCAN TRIAGE
|
|
95
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
96
|
+
|
|
97
|
+
Scan date: {date from SCAN.md}
|
|
98
|
+
|
|
99
|
+
Found {N} actionable items:
|
|
100
|
+
🔴 High: {count}
|
|
101
|
+
🟡 Medium: {count}
|
|
102
|
+
🟢 Low: {count}
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Step 5: Interactive Selection (unless --all)
|
|
108
|
+
|
|
109
|
+
**If --all flag:**
|
|
110
|
+
Skip to Step 6, converting all findings.
|
|
111
|
+
|
|
112
|
+
**Otherwise:**
|
|
113
|
+
For each priority level (high first, then medium, then low):
|
|
114
|
+
|
|
115
|
+
```
|
|
116
|
+
🔴 HIGH PRIORITY ({count} items)
|
|
117
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
118
|
+
|
|
119
|
+
1. {title}
|
|
120
|
+
Files: {files}
|
|
121
|
+
Problem: {problem}
|
|
122
|
+
|
|
123
|
+
2. {title}
|
|
124
|
+
Files: {files}
|
|
125
|
+
Problem: {problem}
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Use AskUserQuestion:
|
|
131
|
+
- header: "High Priority"
|
|
132
|
+
- question: "Which items do you want to add to TODO list?"
|
|
133
|
+
- multiSelect: true
|
|
134
|
+
- options:
|
|
135
|
+
- "1. {title}" (for each item)
|
|
136
|
+
- "All high priority"
|
|
137
|
+
- "Skip high priority"
|
|
138
|
+
|
|
139
|
+
Repeat for medium and low priority.
|
|
140
|
+
|
|
141
|
+
## Step 6: Create TODO Items
|
|
142
|
+
|
|
143
|
+
For each selected finding:
|
|
144
|
+
|
|
145
|
+
### 6.1 Generate TODO ID
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
grep -oP 'TODO-\K\d+' .specflow/todos/TODO.md 2>/dev/null | sort -n | tail -1
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### 6.2 Format TODO Entry
|
|
152
|
+
|
|
153
|
+
```markdown
|
|
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
|
|
167
|
+
|
|
168
|
+
Ensure `.specflow/todos/` directory exists:
|
|
169
|
+
```bash
|
|
170
|
+
mkdir -p .specflow/todos
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
If TODO.md doesn't exist, create with header:
|
|
174
|
+
```markdown
|
|
175
|
+
# To-Do List
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
{new todo entries}
|
|
180
|
+
|
|
181
|
+
---
|
|
182
|
+
*Last updated: {YYYY-MM-DD}*
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
If TODO.md exists, insert new entries after `# To-Do List` line and update timestamp.
|
|
186
|
+
|
|
187
|
+
## Step 7: Display Results
|
|
188
|
+
|
|
189
|
+
```
|
|
190
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
191
|
+
TRIAGE COMPLETE
|
|
192
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
193
|
+
|
|
194
|
+
Created {N} TODO items:
|
|
195
|
+
|
|
196
|
+
TODO-{XXX}: {title}
|
|
197
|
+
TODO-{XXX}: {title}
|
|
198
|
+
TODO-{XXX}: {title}
|
|
199
|
+
|
|
200
|
+
Skipped: {M} items
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
**Actions:**
|
|
205
|
+
- `/sf:todos` — view all to-do items
|
|
206
|
+
- `/sf:priority` — prioritize backlog
|
|
207
|
+
- `/sf:plan TODO-XXX` — convert to specification
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
</workflow>
|
|
211
|
+
|
|
212
|
+
<output_format>
|
|
213
|
+
|
|
214
|
+
**Success:**
|
|
215
|
+
```
|
|
216
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
217
|
+
TRIAGE COMPLETE
|
|
218
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
219
|
+
|
|
220
|
+
Created {N} TODO items from scan findings.
|
|
221
|
+
|
|
222
|
+
[List of created TODOs]
|
|
223
|
+
|
|
224
|
+
Next: /sf:priority or /sf:plan TODO-XXX
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
**No findings:**
|
|
228
|
+
```
|
|
229
|
+
✅ No actionable findings in SCAN.md
|
|
230
|
+
|
|
231
|
+
The scan found no issues to triage. Codebase is healthy!
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
**All skipped:**
|
|
235
|
+
```
|
|
236
|
+
ℹ️ Triage complete — no items selected
|
|
237
|
+
|
|
238
|
+
Run /sf:triage again to review findings.
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
</output_format>
|
|
242
|
+
|
|
243
|
+
<success_criteria>
|
|
244
|
+
- [ ] SCAN.md exists and is parsed
|
|
245
|
+
- [ ] Findings extracted with priority levels
|
|
246
|
+
- [ ] User shown summary of findings
|
|
247
|
+
- [ ] Interactive selection completed (or --all used)
|
|
248
|
+
- [ ] TODO items created with full context
|
|
249
|
+
- [ ] Priority preserved from scan
|
|
250
|
+
- [ ] Source reference included in notes
|
|
251
|
+
- [ ] Clear summary of created TODOs
|
|
252
|
+
</success_criteria>
|
package/package.json
CHANGED