specflow-cc 1.17.0 → 1.17.1

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 CHANGED
@@ -5,6 +5,15 @@ All notable changes to SpecFlow will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.17.1] - 2026-04-07
9
+
10
+ ### Fixed
11
+
12
+ - **TODO.md data loss prevention** — all 6 commands that modify TODO.md now use the `Edit` tool (targeted diff) instead of `Write` (full rewrite), preventing the agent from accidentally dropping entries when reconstructing large files
13
+ - Affected: `sf:todo`, `sf:plan`, `sf:done`, `sf:triage`, `sf:priority`, `spec-reviser`
14
+ - `Write` is now only used for initial TODO.md creation; all subsequent modifications use `Edit`
15
+ - Each command includes explicit "CRITICAL: never rewrite the entire file" guardrails
16
+
8
17
  ## [1.17.0] - 2026-03-29
9
18
 
10
19
  ### Added
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: sf-spec-reviser
3
3
  description: Revises specifications based on audit feedback, applying targeted or full changes
4
- tools: Read, Write, Glob, Grep, AskUserQuestion
4
+ tools: Read, Write, Edit, Glob, Grep, AskUserQuestion
5
5
  ---
6
6
 
7
7
  <role>
@@ -150,7 +150,7 @@ For each deferred item:
150
150
  - **Priority:** —
151
151
  - **Notes:** `Origin: {SPEC-XXX} Response v{N}. {reason for deferral}`
152
152
 
153
- 4. Insert the new entry into `.specflow/todos/TODO.md` after the `# To-Do List` line
153
+ 4. Use the **Edit** tool (NOT Write) to insert the new entry into `.specflow/todos/TODO.md` after the first `---` following `# To-Do List` — never rewrite the entire file, as this would destroy existing todos
154
154
 
155
155
  5. Append a "TODOs Created" subsection to the Response in Audit History:
156
156
 
@@ -4,6 +4,7 @@ description: Finalize specification, archive, and update state
4
4
  allowed-tools:
5
5
  - Read
6
6
  - Write
7
+ - Edit
7
8
  - Bash
8
9
  - Glob
9
10
  - Grep
@@ -278,9 +279,10 @@ Check if the spec frontmatter contains a `source:` field (e.g., `source: TODO-00
278
279
 
279
280
  1. Read `.specflow/todos/TODO.md`
280
281
  2. Check if the referenced TODO-XXX entry still exists in the file
281
- 3. **If it exists** — remove it (the entire block from `## TODO-XXX` heading through the next `---` separator, inclusive)
282
- 4. Update `*Last updated:` timestamp with note: `TODO-XXX cleaned up (completed via SPEC-YYY)`
283
- 5. Write the updated TODO.md
282
+ 3. **If it exists** — use the **Edit** tool (NOT Write) to remove the entire block (from `## TODO-XXX` heading through the next `---` separator, inclusive) — replace with empty string
283
+ 4. Use the **Edit** tool to update `*Last updated:` timestamp with note: `TODO-XXX cleaned up (completed via SPEC-YYY)`
284
+
285
+ **CRITICAL:** Never rewrite the entire file with Write. Use Edit to remove the specific block and update the timestamp — this preserves all other todos.
284
286
 
285
287
  **If no `source:` field or TODO already removed:** Skip — no action needed.
286
288
 
@@ -4,6 +4,7 @@ description: Convert a to-do item into a full specification
4
4
  allowed-tools:
5
5
  - Read
6
6
  - Write
7
+ - Edit
7
8
  - Bash
8
9
  - Glob
9
10
  - Grep
@@ -152,10 +153,11 @@ Use the priority from the todo as the spec's initial priority.
152
153
  **This step is MANDATORY. Do NOT skip it after the agent returns.**
153
154
 
154
155
  1. Read `.specflow/todos/TODO.md`
155
- 2. Remove the entire todo block (from `## TODO-XXX` heading through the next `---` separator, inclusive)
156
- 3. Update `*Last updated:` timestamp with note: `TODO-XXX converted to SPEC-YYY`
157
- 4. Write the updated TODO.md
158
- 5. **Verify** by reading TODO.md again — the converted todo MUST NOT appear
156
+ 2. Use the **Edit** tool (NOT Write) to remove the entire todo block (from `## TODO-XXX` heading through the next `---` separator, inclusive) — replace the block with empty string
157
+ 3. Use the **Edit** tool to update `*Last updated:` timestamp with note: `TODO-XXX converted to SPEC-YYY`
158
+ 4. **Verify** by reading TODO.md again — the converted todo MUST NOT appear
159
+
160
+ **CRITICAL:** Never rewrite the entire file with Write. Use Edit to remove the specific block and update the timestamp — this preserves all other todos.
159
161
 
160
162
  **Important:** Only remove after confirmed spec creation.
161
163
 
@@ -4,6 +4,7 @@ description: Interactive prioritization of specifications and to-dos
4
4
  allowed-tools:
5
5
  - Read
6
6
  - Write
7
+ - Edit
7
8
  - Bash
8
9
  - Glob
9
10
  - AskUserQuestion
@@ -117,7 +118,7 @@ Your choice:
117
118
  If input matches pattern `{ID}={priority}`:
118
119
 
119
120
  1. Validate priority (high | medium | low)
120
- 2. Update frontmatter in spec file OR priority line in TODO.md
121
+ 2. Update frontmatter in spec file OR use the **Edit** tool (NOT Write) to update the priority line in TODO.md — never rewrite the entire file
121
122
  3. Display confirmation
122
123
  4. Return to Step 3
123
124
 
@@ -4,6 +4,7 @@ description: Add a new to-do item for future work
4
4
  allowed-tools:
5
5
  - Read
6
6
  - Write
7
+ - Edit
7
8
  - Bash
8
9
  - AskUserQuestion
9
10
  ---
@@ -84,7 +85,9 @@ Create from template:
84
85
  ```
85
86
 
86
87
  **If TODO.md exists:**
87
- Insert new todo after `# To-Do List` line:
88
+ Use the **Edit** tool (NOT Write) to make two targeted edits:
89
+
90
+ 1. Insert new todo block after the first `---` following `# To-Do List`:
88
91
 
89
92
  ```markdown
90
93
  ## TODO-{XXX} — {YYYY-MM-DD}
@@ -95,7 +98,9 @@ Insert new todo after `# To-Do List` line:
95
98
  ---
96
99
  ```
97
100
 
98
- Also update `*Last updated:` line at the bottom.
101
+ 2. Update the `*Last updated:` line at the bottom.
102
+
103
+ **CRITICAL:** Never rewrite the entire file. Use Edit to insert the new block and update the timestamp — this preserves all existing todos.
99
104
 
100
105
  ## Step 6: Display Confirmation
101
106
 
@@ -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
  ---
@@ -182,7 +183,11 @@ If TODO.md doesn't exist, create with header:
182
183
  *Last updated: {YYYY-MM-DD}*
183
184
  ```
184
185
 
185
- If TODO.md exists, insert new entries after `# To-Do List` line and update timestamp.
186
+ If TODO.md exists, use the **Edit** tool (NOT Write) to make two targeted edits:
187
+ 1. Insert new entries after the first `---` following `# To-Do List`
188
+ 2. Update the `*Last updated:` timestamp
189
+
190
+ **CRITICAL:** Never rewrite the entire file with Write. Use Edit to insert new blocks and update the timestamp — this preserves all existing todos.
186
191
 
187
192
  ## Step 7: Display Results
188
193
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "specflow-cc",
3
- "version": "1.17.0",
3
+ "version": "1.17.1",
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"