feat: infer a project persona from the hero when there's no audience context - #27
Merged
Conversation
…context When setup captured no audience/brand for the project, the tailored persona had nowhere to come from and the scan fell back to generic built-ins. Step 6a now has a fallback: if the desktop hero pitches a specific, nameable audience, infer one project persona from it, tagged as an unconfirmed hypothesis. It self-gates — a bare search box, app shell, or generic splash produces nothing, because pixels that aren't pitching an audience can't tell you who it's for. Verified against real heroes: sharp on Linear and Stripe, correctly silent on Airbnb's search box. Explicit audience text always wins; the fallback only fires when there was none.
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.
Small gated fallback for persona sourcing, decided on evidence rather than theory.
The gap
The tailored project persona comes from an audience/brand description captured at setup. When a project has none (no README audience, thin docs), the scan falls back to generic built-ins — even on a landing page whose hero is a clear pitch to a specific user.
The fallback
Step 6a now: if Step 5b produced no project persona and the desktop hero pitches a specific, nameable audience, infer one persona from the hero, tagged as an unconfirmed hypothesis (
inferred-visitor). It self-gates — a bare search box, app shell, or generic splash produces nothing, because a hero that isn't pitching an audience can't tell you who it's for.Priority order: explicit audience text (always wins) → hero inference (this) → built-ins. A guess from pixels never overrides a real audience description.
Why gated, not universal — the evidence
I captured real heroes and had the vision model infer a persona from each, cold:
So the real gate isn't brand-vs-product, it's "is the hero pitch-forward?" The model makes that call itself.
Testing
Full suite green (1121 tests, 0 fail). Fallback wiring guarded in
vision-personas.test.js(gated on missing context, pitch-forward hero, hypothesis tag, reads the desktop screenshot).