@@ -625,19 +625,6 @@ def _is_typosquat(pkg_name: str, popular: set[str], max_distance: int = 2) -> st
625625 re .IGNORECASE ,
626626)
627627
628- # Trailing discourse words that modify the utterance rather than name trigger
629- # content. When the captured phrase is a broad single word followed only by
630- # these deictics ("says hello there"), the skill names the broad word and the
631- # rest is trailing prose, so TR1 still fires; a content word after the broad
632- # word ("code review", "the zone") names a multiword phrase and stays TR1
633- # negative, matching the legacy trigger grammar.
634- _DESCRIPTION_TRAILING_DISCOURSE_WORDS : set [str ] = {
635- "there" ,
636- "here" ,
637- "now" ,
638- "then" ,
639- }
640-
641628# Bare universal-scope statements: the whole clause is a catch-all scope
642629# ("all messages"), which the legacy trigger grammar also flags as TR3.
643630_DESCRIPTION_BARE_SCOPE_RE = re .compile (
@@ -2256,17 +2243,11 @@ def _analyze_triggers(
22562243 phrase = phrase_match .group ("phrase" )
22572244 phrase_lower = phrase .lower ()
22582245 phrase_words = phrase_lower .split ()
2259- # A broad word followed only by trailing discourse words names
2260- # the broad word ("says hello there"); anything else multiword
2261- # names a phrase and is not an overly broad single-word trigger.
2262- broad_head_with_prose_tail = (
2263- len (phrase_words ) > 1
2264- and phrase_words [0 ] in _OVERLY_BROAD_SINGLE_WORDS
2265- and all (word in _DESCRIPTION_TRAILING_DISCOURSE_WORDS for word in phrase_words [1 :])
2266- )
2267- if (
2268- len (phrase_words ) == 1 and phrase_lower in _OVERLY_BROAD_SINGLE_WORDS
2269- ) or broad_head_with_prose_tail :
2246+ # A multiword phrase names the complete bounded wording, even
2247+ # when its final word could also be read as discourse prose. In
2248+ # particular, "go there" and "work now" are valid phrases and
2249+ # must not be reduced to the broad heads "go" and "work".
2250+ if len (phrase_words ) == 1 and phrase_lower in _OVERLY_BROAD_SINGLE_WORDS :
22702251 broad_word = phrase_words [0 ]
22712252 findings .append (
22722253 Finding (
0 commit comments