Commit 172b285
committed
fix: auto-correct prefix conflicts in create-new-feature.sh
When --number is passed with a prefix that already exists in the specs/
directory (e.g., an AI agent passes --number 1 but specs/001-* already
exists), the script now auto-corrects to the next globally available
number instead of silently creating a duplicate.
This prevents duplicate spec directory prefixes that cause errors in
downstream tooling (e.g., check-prerequisites.sh emitting
"ERROR: Multiple spec directories found with prefix '001'").
The --number flag becomes a validated suggestion: if it conflicts,
the script recalculates from the true global maximum across all spec
directories and git branches, then warns on stderr:
1 parent 7562664 commit 172b285
1 file changed
Lines changed: 24 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
258 | 282 | | |
259 | 283 | | |
260 | 284 | | |
| |||
0 commit comments