fix: strip non-bullet preamble from planner output
Sonnet prepends narration before the actual bullets. Strip everything before the first '- ' line instead of rejecting the whole output.
This commit is contained in:
parent
af75c0eccf
commit
5c6293fdab
1 changed files with 6 additions and 3 deletions
|
|
@ -124,9 +124,12 @@ Your response must start with '- ' on the very first character. No summary, no m
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Validate output starts with bullet points (reject meta-commentary)
|
# Strip any non-bullet preamble (Sonnet sometimes narrates before the bullets)
|
||||||
if ! echo "$PHASE1_OUTPUT" | head -1 | grep -q '^- '; then
|
PHASE1_OUTPUT=$(echo "$PHASE1_OUTPUT" | sed -n '/^- /,$p')
|
||||||
log "ERROR: phase 1 output is not a bullet list — got: $(echo "$PHASE1_OUTPUT" | head -1)"
|
|
||||||
|
# Validate output has bullet points
|
||||||
|
if [ -z "$PHASE1_OUTPUT" ] || ! echo "$PHASE1_OUTPUT" | head -1 | grep -q '^- '; then
|
||||||
|
log "ERROR: phase 1 output contains no bullet list"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue