Repository navigation
feat(leads): generate the pitch fields from a plain description of the goal - #149
Merged
Merged
Conversation
…e goal The campaign form asks for three precisely-scoped inputs — who is writing, one small ask, and the checkable claims — and the grounding guard then refuses drafts that stray outside them. That is a lot to ask of someone who wants to describe what they are doing, and the failure it produces is silent: a live campaign had the same sentence pasted into both the intro and the ask, a facts list that omitted the URL the ask depended on, and five rejected drafts a tick for hours as a result. So the splitting is done here instead. Describe the goal in a sentence and the three fields are filled in. It restructures and does not author, which is the whole reason it can be trusted with this job. Drafts are checked against its output, so a fact invented here is not caught later — it is laundered into something a stranger is told is true. The prompt refuses new numbers, links, dates and credentials, and refuses to embellish a claim into a stronger one. Any URL the person wrote is forced into the facts afterwards rather than trusted to the model, because dropping one recreates precisely the failure this exists to prevent. The sender's own domain, when their goal mentions it, is read for how the site describes itself. That is the one extra fact available without guessing, and it is exactly what someone omits when describing their goal in a hurry. Also makes the two guard messages agree. One said a value was "not in the campaign's declared facts" while the other said the campaign "never mentions" it — and after the grounding set widened to include the intro and ask, the first was no longer true. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
vu1nz Security Review0 finding(s) in PR #? No security issues found. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The campaign form asks for three precisely-scoped inputs, and the grounding guard refuses drafts that stray outside them. That's a lot to ask of someone who just wants to describe what they're doing — and the failure is silent.
A live campaign had the same sentence pasted into both the intro and the ask, a facts list omitting the URL the ask depended on, and five rejected drafts a tick for hours as a result.
Describe the goal, get the fields
Verified on that exact campaign's text:
In: "Anthony owner of threatcrush.com we want to generate leads for people to download our free whitepaper at https://threatcrush.com/get-whitepaper"
Out:
Then, against the guard: a draft using the URL passes
[], and"We have 4200 customers"is still rejected.The first fact came from reading threatcrush.com's own site description — the one extra fact available without guessing, and exactly what someone omits describing a goal in a hurry.
It restructures; it does not author
This is why it can be trusted with the job. Drafts are checked against its output, so a fact invented here isn't caught later — it's laundered into something a stranger is told is true. The prompt refuses new numbers, links, dates and credentials, and refuses to embellish ("30 years as a software engineer" must not become "three decades of industry leadership").
Any URL the person wrote is forced into the facts in code afterwards, not trusted to the model — dropping one recreates exactly the failure this exists to prevent.
Also
The two guard messages disagreed — one said "not in the campaign's declared facts", the other "the campaign never mentions". After #148 widened the grounding set, the first was no longer true.
Checks
tsc --noEmitclean · 938/938 tests pass · build compiles🤖 Generated with Claude Code