specflow-cc 1.18.3 → 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:revise
3
3
  description: Revise specification based on audit feedback
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
@@ -37,17 +38,27 @@ Run `/sf:init` first.
37
38
  ```
38
39
  Exit.
39
40
 
40
- ## Step 2: Get Active Specification
41
+ ## Step 2: Resolve Active Specification
41
42
 
42
- Read `.specflow/STATE.md` and extract Active Specification.
43
+ Call `node bin/sf-tools.cjs state resolve $ARGUMENTS` (pass the optional SPEC-XXX arg if provided; strip non-SPEC-ID args first).
43
44
 
44
- **If no active specification:**
45
- ```
46
- No active specification to revise.
45
+ Parse the JSON response:
46
+ - `{"action":"use","id":"SPEC-XXX"}` → proceed with SPEC-XXX
47
+ - `{"action":"error","code":"NO_ACTIVE_SPEC"}` display error and exit:
48
+ ```
49
+ No active specification to revise.
47
50
 
48
- Run `/sf:new "task description"` to create one.
49
- ```
50
- Exit.
51
+ Run `/sf:new "task description"` to create one.
52
+ ```
53
+ - `{"action":"error","code":"SPEC_NOT_ACTIVE","id":"SPEC-XXX"}` → display error and exit:
54
+ ```
55
+ SPEC-XXX is not in the Active Specifications table.
56
+ ```
57
+ - `{"action":"ask","options":[...]}` → use AskUserQuestion to show picker:
58
+ ```
59
+ Multiple active specifications. Which one to revise?
60
+ Options: {id — title (status)} for each entry
61
+ ```
51
62
 
52
63
  ## Step 3: Load Specification
53
64
 
@@ -508,8 +519,9 @@ After recording the Response, if any items were marked "Deferred":
508
519
  In spec frontmatter: `status: auditing`
509
520
 
510
521
  In STATE.md:
511
- - Status → "auditing"
512
- - Next Step "/sf:audit"
522
+ ```bash
523
+ node bin/sf-tools.cjs state add-active SPEC-XXX auditing /sf:audit
524
+ ```
513
525
 
514
526
  </fallback>
515
527
 
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: sf:run
3
3
  description: Execute the specification (implement the code)
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
@@ -39,17 +40,27 @@ Run `/sf:init` first.
39
40
  ```
40
41
  Exit.
41
42
 
42
- ## Step 2: Get Active Specification
43
+ ## Step 2: Resolve Active Specification
43
44
 
44
- Read `.specflow/STATE.md` and extract Active Specification.
45
+ Call `node bin/sf-tools.cjs state resolve $ARGUMENTS` (pass the optional SPEC-XXX arg if provided).
45
46
 
46
- **If no active specification:**
47
- ```
48
- No active specification to execute.
47
+ Parse the JSON response:
48
+ - `{"action":"use","id":"SPEC-XXX"}` → proceed with SPEC-XXX
49
+ - `{"action":"error","code":"NO_ACTIVE_SPEC"}` display error and exit:
50
+ ```
51
+ No active specification to execute.
49
52
 
50
- Run `/sf:new "task description"` to create one.
51
- ```
52
- Exit.
53
+ Run `/sf:new "task description"` to create one.
54
+ ```
55
+ - `{"action":"error","code":"SPEC_NOT_ACTIVE","id":"SPEC-XXX"}` → display error and exit:
56
+ ```
57
+ SPEC-XXX is not in the Active Specifications table.
58
+ ```
59
+ - `{"action":"ask","options":[...]}` → use AskUserQuestion to show picker:
60
+ ```
61
+ Multiple active specifications. Which one to run?
62
+ Options: {id — title (status)} for each entry
63
+ ```
53
64
 
54
65
  ## Step 3: Load Specification
55
66
 
@@ -182,9 +193,9 @@ Use model for `spec-executor` or `spec-executor-orchestrator` from selected prof
182
193
 
183
194
  ## Step 7: Update Status
184
195
 
185
- Update STATE.md:
186
- - Status "running"
187
- - Next Step → "(in progress)"
196
+ ```bash
197
+ node bin/sf-tools.cjs state add-active SPEC-XXX running "(in progress)"
198
+ ```
188
199
 
189
200
  Update spec frontmatter:
190
201
  - status → "running"
@@ -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
  ```
@@ -96,6 +96,12 @@ created: {YYYY-MM-DD}
96
96
 
97
97
  Do NOT create or modify TODO.md. Do NOT update any "Last updated" lines.
98
98
 
99
+ ## Step 6.5: Reindex
100
+
101
+ ```bash
102
+ node ~/.claude/specflow-cc/bin/sf-tools.cjs todo reindex
103
+ ```
104
+
99
105
  ## Step 7: Display Confirmation
100
106
 
101
107
  **IMPORTANT:** Output the following directly as formatted text, NOT wrapped in a markdown code block:
@@ -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.18.3",
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