specflow-cc 1.19.0 → 1.20.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 +33 -0
- package/README.md +9 -1
- package/bin/lib/core.cjs +26 -0
- package/bin/lib/lock.cjs +213 -0
- package/bin/lib/migrate-state.cjs +242 -0
- package/bin/lib/resolve.cjs +171 -0
- package/bin/lib/state.cjs +350 -52
- package/bin/sf-tools.cjs +54 -6
- package/commands/sf/audit.md +24 -12
- package/commands/sf/autopilot.md +39 -21
- package/commands/sf/discuss.md +4 -3
- package/commands/sf/done.md +23 -12
- package/commands/sf/fix.md +22 -10
- package/commands/sf/health.md +17 -4
- package/commands/sf/help.md +6 -0
- package/commands/sf/pause.md +18 -11
- package/commands/sf/review.md +25 -10
- package/commands/sf/revise.md +22 -10
- package/commands/sf/run.md +22 -11
- package/commands/sf/show.md +17 -10
- package/commands/sf/split.md +24 -15
- package/commands/sf/status.md +19 -9
- package/commands/sf/verify.md +22 -11
- package/package.json +1 -1
- package/templates/state.md +6 -4
package/commands/sf/show.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: sf:show
|
|
3
3
|
description: Display full specification details
|
|
4
|
+
# SPEC-011: Accepts optional SPEC-XXX as first positional arg; resolves via state resolve when no arg
|
|
4
5
|
allowed-tools:
|
|
5
6
|
- Read
|
|
6
7
|
- Bash
|
|
@@ -41,16 +42,22 @@ Exit.
|
|
|
41
42
|
Use provided ID (e.g., SPEC-003).
|
|
42
43
|
|
|
43
44
|
**If no argument:**
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
45
|
+
Call `node bin/sf-tools.cjs state resolve` to get active spec.
|
|
46
|
+
|
|
47
|
+
Parse the JSON response:
|
|
48
|
+
- `{"action":"use","id":"SPEC-XXX"}` → use SPEC-XXX
|
|
49
|
+
- `{"action":"error","code":"NO_ACTIVE_SPEC"}` → display error and exit:
|
|
50
|
+
```
|
|
51
|
+
No specification specified and no active specification.
|
|
52
|
+
|
|
53
|
+
Use `/sf:show SPEC-XXX` to view a specific spec
|
|
54
|
+
or `/sf:list` to see all specifications.
|
|
55
|
+
```
|
|
56
|
+
- `{"action":"ask","options":[...]}` → use AskUserQuestion to show picker:
|
|
57
|
+
```
|
|
58
|
+
Multiple active specifications. Which one to show?
|
|
59
|
+
Options: {id — title (status)} for each entry
|
|
60
|
+
```
|
|
54
61
|
|
|
55
62
|
## Step 3: Find Specification File
|
|
56
63
|
|
package/commands/sf/split.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: sf:split
|
|
3
3
|
description: Split a large specification into smaller sub-specifications
|
|
4
|
+
# SPEC-011: Accepts optional SPEC-XXX as first positional arg; resolves via state resolve when no arg
|
|
4
5
|
allowed-tools:
|
|
5
6
|
- Read
|
|
6
7
|
- Write
|
|
@@ -57,18 +58,22 @@ Use `/sf:list` to see available specifications.
|
|
|
57
58
|
Exit.
|
|
58
59
|
|
|
59
60
|
**If no ID provided:**
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
```
|
|
66
|
-
No specification specified and no active specification.
|
|
67
|
-
|
|
68
|
-
Usage: `/sf:split SPEC-001`
|
|
69
|
-
|
|
70
|
-
```
|
|
71
|
-
|
|
61
|
+
Call `node bin/sf-tools.cjs state resolve` to get active spec.
|
|
62
|
+
|
|
63
|
+
Parse the JSON response:
|
|
64
|
+
- `{"action":"use","id":"SPEC-XXX"}` → use SPEC-XXX
|
|
65
|
+
- `{"action":"error","code":"NO_ACTIVE_SPEC"}` → display error and exit:
|
|
66
|
+
```
|
|
67
|
+
No specification specified and no active specification.
|
|
68
|
+
|
|
69
|
+
Usage: `/sf:split SPEC-001`
|
|
70
|
+
or: Set active spec with `/sf:show SPEC-001`
|
|
71
|
+
```
|
|
72
|
+
- `{"action":"ask","options":[...]}` → use AskUserQuestion to show picker:
|
|
73
|
+
```
|
|
74
|
+
Multiple active specifications. Which one to split?
|
|
75
|
+
Options: {id — title (status)} for each entry
|
|
76
|
+
```
|
|
72
77
|
|
|
73
78
|
## Step 3: Check Complexity
|
|
74
79
|
|
|
@@ -356,9 +361,13 @@ Add split reference to archived parent.
|
|
|
356
361
|
|
|
357
362
|
### Update STATE.md
|
|
358
363
|
|
|
359
|
-
- Remove parent from Queue
|
|
360
|
-
- Add children to Queue
|
|
361
|
-
-
|
|
364
|
+
- Remove parent from Queue (using Read+Write)
|
|
365
|
+
- Add children to Queue (using Read+Write)
|
|
366
|
+
- Register first child in Active Specifications table:
|
|
367
|
+
```bash
|
|
368
|
+
node bin/sf-tools.cjs state remove-active SPEC-PARENT
|
|
369
|
+
node bin/sf-tools.cjs state add-active SPEC-XXXa draft /sf:audit
|
|
370
|
+
```
|
|
362
371
|
|
|
363
372
|
</fallback>
|
|
364
373
|
|
package/commands/sf/status.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: sf:status
|
|
3
3
|
description: Show current SpecFlow state and recommended next step
|
|
4
|
+
# SPEC-011: Uses state list-active and state resolve for multi-spec awareness
|
|
4
5
|
allowed-tools:
|
|
5
6
|
- Read
|
|
6
7
|
- Bash
|
|
@@ -34,13 +35,22 @@ Exit.
|
|
|
34
35
|
|
|
35
36
|
## Step 2: Load State
|
|
36
37
|
|
|
37
|
-
Read `.specflow/STATE.md` and extract
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
-
|
|
42
|
-
|
|
43
|
-
|
|
38
|
+
Read `.specflow/STATE.md` and extract Queue, Recent Decisions, Warnings.
|
|
39
|
+
|
|
40
|
+
Get active specs:
|
|
41
|
+
```bash
|
|
42
|
+
node bin/sf-tools.cjs state list-active
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
For single-spec display, also call:
|
|
46
|
+
```bash
|
|
47
|
+
node bin/sf-tools.cjs state resolve
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Parse the resolve response:
|
|
51
|
+
- `{"action":"use","id":"SPEC-XXX"}` → show single active spec
|
|
52
|
+
- `{"action":"error","code":"NO_ACTIVE_SPEC"}` → show idle state
|
|
53
|
+
- `{"action":"ask","options":[...]}` → show all active specs in table format
|
|
44
54
|
|
|
45
55
|
## Step 3: Load Project Info
|
|
46
56
|
|
|
@@ -77,10 +87,10 @@ for f in .specflow/specs/SPEC-*.md; do
|
|
|
77
87
|
done
|
|
78
88
|
```
|
|
79
89
|
|
|
80
|
-
**If
|
|
90
|
+
**If the Active Specifications table is empty (no rows) but specs exist in specs/:**
|
|
81
91
|
Add warning:
|
|
82
92
|
```
|
|
83
|
-
STATE MISMATCH: Found {N} spec(s) in specs/ but
|
|
93
|
+
STATE MISMATCH: Found {N} spec(s) in specs/ but the Active Specifications table is empty.
|
|
84
94
|
Likely cause: STATE.md was not updated after spec creation.
|
|
85
95
|
Run: Read the spec file and manually update STATE.md, or delete orphan spec if duplicate.
|
|
86
96
|
```
|
package/commands/sf/verify.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: sf:verify
|
|
3
3
|
description: Interactive human verification of acceptance criteria
|
|
4
|
+
# SPEC-011: Accepts optional SPEC-XXX as first positional arg; resolves via state resolve
|
|
4
5
|
allowed-tools:
|
|
5
6
|
- Read
|
|
6
7
|
- Write
|
|
@@ -33,17 +34,27 @@ Run `/sf:init` first.
|
|
|
33
34
|
```
|
|
34
35
|
Exit.
|
|
35
36
|
|
|
36
|
-
## Step 2:
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
37
|
+
## Step 2: Resolve Active Specification
|
|
38
|
+
|
|
39
|
+
Call `node bin/sf-tools.cjs state resolve $ARGUMENTS` (pass the optional SPEC-XXX arg if provided).
|
|
40
|
+
|
|
41
|
+
Parse the JSON response:
|
|
42
|
+
- `{"action":"use","id":"SPEC-XXX"}` → proceed with SPEC-XXX
|
|
43
|
+
- `{"action":"error","code":"NO_ACTIVE_SPEC"}` → display error and exit:
|
|
44
|
+
```
|
|
45
|
+
No active specification to verify.
|
|
46
|
+
|
|
47
|
+
Run `/sf:new "task description"` to create one.
|
|
48
|
+
```
|
|
49
|
+
- `{"action":"error","code":"SPEC_NOT_ACTIVE","id":"SPEC-XXX"}` → display error and exit:
|
|
50
|
+
```
|
|
51
|
+
SPEC-XXX is not in the Active Specifications table.
|
|
52
|
+
```
|
|
53
|
+
- `{"action":"ask","options":[...]}` → use AskUserQuestion to show picker:
|
|
54
|
+
```
|
|
55
|
+
Multiple active specifications. Which one to verify?
|
|
56
|
+
Options: {id — title (status)} for each entry
|
|
57
|
+
```
|
|
47
58
|
|
|
48
59
|
## Step 3: Load Specification
|
|
49
60
|
|
package/package.json
CHANGED
package/templates/state.md
CHANGED
|
@@ -2,11 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
<!-- This file is kept compact (<100 lines). Old decisions are automatically rotated to DECISIONS_ARCHIVE.md. -->
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Active Specifications
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
<!-- Multi-spec registry. Zero rows = no active specs. One row = single-spec ergonomics (no prompt). -->
|
|
8
|
+
<!-- Multiple rows = resolver emits AskUserQuestion picker when no SPEC-ID argument provided. -->
|
|
9
|
+
|
|
10
|
+
| SPEC-ID | Status | Next Step |
|
|
11
|
+
|---------|--------|-----------|
|
|
10
12
|
|
|
11
13
|
## Queue
|
|
12
14
|
|