fix(scaffold-core): prevent Stripe keyword from dominating SaaS intent#244
Merged
Merged
Conversation
…t (#424) Payment Signal's score() function excluded `billing` from its keyword list so "billing dashboard" no longer registers as a Stripe webhook handler. `billing` still counts as +1 when another payment-action keyword is also present (stripe/subscription/checkout/payment), preserving correct scoring for "stripe billing webhook" cases. Webhook Signal guard also narrowed to exclude `billing` from the payment-action blocklist so "billing webhook" (without Stripe) correctly falls through to the generic webhook pattern instead of dropping to API fallback. SaaS Signal gains `dashboard`, `analytics`, and `user management` as scoring keywords so architectural intent terms outweigh a single vendor name. Bumps to 1.7.1. 775/775 tests passing. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…Signal The public PATTERNS export's keywords field for Payment Signal was hand-copied from the score() function's keywordScore() call. This PR's score() change (billing/webhook now only bonus-score once a payment-action keyword already matched) left the keywords field listing billing/webhook as if they were still independent triggers -- misleading for anyone reading the public PatternDef.keywords metadata to understand what fires this pattern. Extracted PAYMENT_ACTION_KEYWORDS as the single source of truth, reused in the keywords field, the score() guard, and Webhook Signal's exclusion check (which duplicated the same literal array) -- eliminates the drift risk instead of just fixing the current instance of it. 775/775 tests passing. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
Summary
score()no longer treatsbillingalone as a Stripe signal — "billing dashboard" no longer misclassifies as a Stripe webhook handler.billingstill counts when paired with another payment-action keyword (stripe/subscription/checkout/payment).dashboard,analytics, anduser managementas scoring keywords so architectural intent outweighs a single vendor-name match.scaffold-coreto 1.7.1.Test plan
classify.test.tsfor the billing/Stripe disambiguation cases🤖 Generated with Claude Code