feat(brand): capture gate for supplied site/brand URLs#16
Merged
Conversation
When a brand/site URL is provided but no brand was captured, recommend() now emits a loud warnings[] entry instead of silently shipping the house palette as brand:None. The engine stays offline (never fetches URLs); rendered-DOM capture is the caller's job and is now a documented hard gate. Rationale for not adding an engine URL-fetcher: raw HTML of a JS-rendered site is an empty shell, so it would fail silently exactly where it matters. - Brief.brand_url + Recommendation.warnings; guard at end of recommend() - recommend CLI gains --brand-url - discovery-protocol + brand-extraction docs: capture-before-recommend gate; fix the "read URLs via WebFetch" trap (empty shell on SPAs) - PROMPT_HEADER (16 agents): brand-capture step + warnings check - 3 regression tests; full suite 326 green; CLI verified live Note: brand-anchor override + forbidden exclusion were already shipped and tested (test_brand_wiring, test_recommender "dogfood fix" cases); the real gap was upstream capture, addressed here. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
d4bf03b to
11924e8
Compare
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.
Code-enforced capture gate for a supplied brand/site URL.
When a brand/site URL is provided but no brand was captured,
recommend()now returns a loudwarnings[]entry instead of silently shipping the house palette asbrand: None. The engine stays offline (it never fetches URLs); rendered-DOM capture is the caller's job and is now a documented hard gate.Brief.brand_url+Recommendation.warnings+ guard inrecommend()recommend --brand-urlNote: overlaps
discovery-protocol.mdwith the repo-prune PR. Merge that one first; this rebases cleanly (different sections).Generated with Claude Code