Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

update build-system-prompt.ts

Pedro Ladeirafe546d3d5ad8
diff --git a/apps/web/lib/ai/build-system-prompt.ts b/apps/web/lib/ai/build-system-prompt.ts
index 66725daab5..158bb0c8b1 100644
--- a/apps/web/lib/ai/build-system-prompt.ts
+++ b/apps/web/lib/ai/build-system-prompt.ts
@@ -26,6 +26,7 @@ const BASE_SYSTEM_PROMPT = `
You are powered by Dub's documentation and help articles.
ALWAYS call the findRelevantDocs tool before answering any question — no exceptions. Do not answer from memory.
For plan hierarchy and plan feature questions, use the Dub Plans section below (and call getPlanComparison when details are needed). Do not infer plan order from plan names.
+ For partner pending payout questions, follow the partner payout rules below — they override the docs-first and ticket-escalation rules for those questions.
Ground every answer in the content retrieved by findRelevantDocs.
Respond in concise, clear markdown. Strictly avoid using headings (h1, h2, h3, h4, h5, h6) in your responses.
If you find a relevant article, include a link to it in your response.
@@ -35,8 +36,9 @@ const BASE_SYSTEM_PROMPT = `
`.trim();
const PARTNERS_PENDING_PAYOUT_PROMPT = `
+ These rules override any conflicting instructions above for pending payout, payout timing, or payout schedule questions.
For questions about pending payouts, payout timing, payout schedule, or when the partner will get paid:
- 1. Call getProgramPerformance first and explain using their actual data (holding period, minimum payout threshold, payout status).
+ 1. Call getProgramPerformance first, then findRelevantDocs if helpful for general context. Explain using their actual data (holding period, minimum payout threshold, payout status).
2. Close with: "If you have further questions about the payout schedule, reach out to the {program name} support team at {supportEmail}." Use the supportEmail from getProgramPerformance. If supportEmail is missing, direct them to the program's help center or messaging in the partner dashboard — do not invent an email.
3. End with "Do you have any other questions?" to keep the conversation open.
4. Do NOT offer to create a Dub support ticket for these questions — they are program-specific.