Skip to content

fix(llm): reject prompt echoes in generated commits - #17

Merged
JonathanWorks merged 3 commits into
mainfrom
fix/squash-message-sanity
Sep 12, 2026
Merged

JonathanWorks merged 3 commits into
mainfrom
fix/squash-message-sanity

Conversation

@JonathanWorks

Copy link
Copy Markdown

Add validation to detect when the LLM returns its task instructions instead of a commit message. Reject output that repeats task sentences (verbatim or with instruction verbs swapped), contains template markup, or begins with a commit-message instruction. Update documentation links and add typos allow-list entry.

…rw-0mr7ot)

Measured 2026-09-11: 'claude -p --model=haiku' with an empty system prompt answered a
2,093-line squash prompt with 'Create a commit message for the combined effect of these
commits.' and wt merge put that on main (pwm-os 0172b1f8) as the subject. The output is
now rejected when it repeats a <task> sentence from the prompt (verbatim or with the
instruction verb swapped), carries template markup, or opens with an instruction to
write a commit message. The error names the first line and the repro command.
@JonathanWorks
JonathanWorks merged commit 2b71580 into main Sep 12, 2026
@JonathanWorks
JonathanWorks deleted the fix/squash-message-sanity branch September 12, 2026 02:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant