fix(scaffold-core): Stripe keyword no longer dominates SaaS intent#242
Closed
stackbilt-admin wants to merge 1 commit into
Closed
fix(scaffold-core): Stripe keyword no longer dominates SaaS intent#242stackbilt-admin wants to merge 1 commit into
stackbilt-admin wants to merge 1 commit into
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>
Member
Author
|
Closing — this PR patches keyword scoring in scaffold-core/src/classify/patterns.ts, which is the wrong abstraction layer. The root fix ships in tarotscript: Workers SaaS API card added to cloudflare-blessed-stacks.deck (b866ce6), SaaS Signal card added to intent-vocabulary.deck, and POST /classify now returns pattern_code + source_pattern so downstream consumers need no lookup tables. The next step is replacing scaffold-core's classify() with an adapter that calls env.TAROTSCRIPT.fetch('/classify') — at which point patterns.ts is retired entirely. No value in keeping this intermediate patch. |
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.
Problem
scaffold_classifywas misclassifying SaaS architectural intents as Stripe webhookhandlers whenever the word
billingappeared alongsidestripe.Reproduction:
Expected:
workers-saas· Got: stripe-webhook (Payment Signal score 2 vs SaaS 1)Root cause:
billingin the Payment Signal's scoring keyword list fired on "billing dashboard"— an architectural term, not a Stripe webhook signal.
Changes
patterns.tsscore(): removesbillingfrom the keyword list;billingnow onlycontributes +1 when at least one other payment-action keyword is already present.
billingfrom the payment-action exclusion list.dashboard,analytics,user managementto score keywords.Tests: 5 new regression cases. Version: 1.7.0 → 1.7.1. 775/775 tests passing.
Downstream
After merging + publishing, run
pnpm update @stackbilt/scaffold-corein thestackbilt-mcp-gatewayrepo to pick up the fix.Closes #424
🤖 Generated with Claude Code