mirror of
https://github.com/baptisteArno/typebot.io.git
synced 2026-06-05 21:04:43 +08:00
32 lines
999 B
Bash
Executable File
32 lines
999 B
Bash
Executable File
#!/bin/bash
|
|
|
|
ITERATION=0
|
|
CURRENT_BRANCH=$(git branch --show-current)
|
|
|
|
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
echo "Mode: $MODE"
|
|
echo "Prompt: $PROMPT_FILE"
|
|
echo "Branch: $CURRENT_BRANCH"
|
|
[ $MAX_ITERATIONS -gt 0 ] && echo "Max: $MAX_ITERATIONS iterations"
|
|
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
|
|
# Verify prompt file exists
|
|
if [ ! -f "$PROMPT_FILE" ]; then
|
|
echo "Error: $PROMPT_FILE not found"
|
|
exit 1
|
|
fi
|
|
|
|
while true; do
|
|
result=$(claude -p "$(cat PROMPT.md)\
|
|
If the spec is complete, output <promise>COMPLETE</promise>.")
|
|
|
|
echo "$result"
|
|
|
|
if [[ "$result" == *"<promise>COMPLETE</promise>"* ]]; then
|
|
echo "PRD complete after $i iterations."
|
|
exit 0
|
|
fi
|
|
|
|
ITERATION=$((ITERATION + 1))
|
|
echo -e "\n\n======================== LOOP $ITERATION ========================\n"
|
|
done |