fix: explicit plan count check in offer_next step
Adds bash logic to count PLAN vs SUMMARY files before deciding whether to offer next plan or next phase. Fixes bug where GSD would skip remaining plans in a phase. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1225,7 +1225,26 @@ Use AskUserQuestion:
|
||||
</step>
|
||||
|
||||
<step name="offer_next">
|
||||
**If more plans in this phase:**
|
||||
**First, determine if more plans exist in this phase:**
|
||||
|
||||
```bash
|
||||
# Get current phase directory from the plan we just executed
|
||||
PHASE_DIR=$(dirname "$PLAN_PATH")
|
||||
|
||||
# Count PLAN files vs SUMMARY files
|
||||
PLAN_COUNT=$(ls "$PHASE_DIR"/*-PLAN.md 2>/dev/null | wc -l | tr -d ' ')
|
||||
SUMMARY_COUNT=$(ls "$PHASE_DIR"/*-SUMMARY.md 2>/dev/null | wc -l | tr -d ' ')
|
||||
|
||||
echo "Plans: $PLAN_COUNT, Summaries: $SUMMARY_COUNT"
|
||||
|
||||
if [[ $SUMMARY_COUNT -lt $PLAN_COUNT ]]; then
|
||||
echo "MORE_PLANS_EXIST"
|
||||
else
|
||||
echo "PHASE_COMPLETE"
|
||||
fi
|
||||
```
|
||||
|
||||
**If MORE_PLANS_EXIST (more plans in this phase):**
|
||||
|
||||
<if mode="yolo">
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user