Skip to content

Commit 269dfbe

Browse files
marcusgollclaude
andcommitted
fix: implement /feature continue mode
- Added logic to find and resume most recently modified feature - Uses ls -td for cross-platform compatibility (Linux, macOS, Windows/Git Bash) - Extracts feature description from spec.md - Shows clear banner with feature info when resuming Fixes error: '❌ Provide a description or use /feature next' when running /feature continue 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 4455030 commit 269dfbe

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.spec-flow/scripts/bash/feature-workflow.sh

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,35 @@ case "$ARGUMENTS" in
6363
;;
6464
esac
6565

66+
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
67+
# CONTINUE LAST FEATURE (MODE=continue)
68+
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
69+
70+
if [ "$CONTINUE_MODE" = true ]; then
71+
# Find most recently modified feature directory (cross-platform)
72+
if [ ! -d "specs" ]; then
73+
echo "❌ No specs/ directory found"
74+
exit 1
75+
fi
76+
77+
LAST_FEATURE=$(ls -td specs/[0-9]*-* 2>/dev/null | head -1)
78+
79+
if [ -z "$LAST_FEATURE" ]; then
80+
echo "❌ No existing features found in specs/"
81+
exit 1
82+
fi
83+
84+
SLUG=$(basename "$LAST_FEATURE" | sed 's/^[0-9]*-//')
85+
FEATURE_DESCRIPTION=$(grep -m1 "^# " "$LAST_FEATURE/spec.md" 2>/dev/null | sed 's/^# //' || echo "$SLUG")
86+
87+
echo "📋 Continuing last feature: $SLUG"
88+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
89+
echo " Feature: $FEATURE_DESCRIPTION"
90+
echo " Directory: $LAST_FEATURE"
91+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
92+
echo ""
93+
fi
94+
6695
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
6796
# FETCH NEXT FEATURE (MODE=next)
6897
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

0 commit comments

Comments
 (0)