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.
@@ -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
- Read `.specflow/STATE.md` and get Active Specification.
45
-
46
- **If no active specification and no argument:**
47
- ```
48
- No specification specified and no active specification.
49
-
50
- Use `/sf:show SPEC-XXX` to view a specific spec
51
- or `/sf:list` to see all specifications.
52
- ```
53
- Exit.
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
 
@@ -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
- 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.
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
- - Set first child as Active Specification
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
 
@@ -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
- - Active Specification
39
- - Status
40
- - Next Step
41
- - Queue
42
- - Recent Decisions
43
- - Warnings
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 STATE.md shows "Active Specification: None" but specs exist in specs/:**
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 STATE.md shows no active spec.
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
  ```
@@ -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: Get Active Specification
37
-
38
- Read `.specflow/STATE.md` and extract Active Specification.
39
-
40
- **If no active specification:**
41
- ```
42
- No active specification to verify.
43
-
44
- Run `/sf:new "task description"` to create one.
45
- ```
46
- Exit.
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "specflow-cc",
3
- "version": "1.19.0",
3
+ "version": "1.20.0",
4
4
  "description": "Spec-driven development system for Claude Code — quality-first workflow with explicit audit cycles",
5
5
  "bin": {
6
6
  "specflow-cc": "bin/install.js"
@@ -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
- ## Current Position
5
+ ## Active Specifications
6
6
 
7
- - **Active Specification:** [none | SPEC-XXX]
8
- - **Status:** [idle | drafting | auditing | revision_requested | external_review | running | reviewing]
9
- - **Next Step:** [/sf:new | /sf:audit | /sf:revise | /sf:run | /sf:review | /sf:done]
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