GGS Merge Build — Paste Into Claude Code
> Three features. No more. Existing GGS stays untouched.
> Date: April 19, 2026
---
FEATURE 1 — Daily AI Briefing (the hero)
Build a daily gold briefing generated by Claude Haiku, published at 06:00 UTC.
Database
```sql
CREATE TABLE IF NOT EXISTS briefings (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
publish_date DATE UNIQUE NOT NULL,
headline TEXT NOT NULL,
opening_price_usd NUMERIC NOT NULL,
change_24h NUMERIC,
change_7d NUMERIC,
change_30d NUMERIC,
what_happened TEXT,
why_it_matters TEXT,
what_to_watch TEXT,
action_cta TEXT,
partner_link TEXT,
is_published BOOLEAN DEFAULT false,
generated_at TIMESTAMPTZ DEFAULT NOW(),
published_at TIMESTAMPTZ
);
CREATE INDEX idx_briefings_date ON briefings(publish_date DESC);
ALTER TABLE briefings ENABLE ROW LEVEL SECURITY;
CREATE POLICY "Published briefings readable by all" ON briefings
FOR SELECT USING (is_published = true);
-- No write policy = service role only
```
**RLS test before any data goes in:** open an anonymous Supabase client, query briefings — should return only published rows.
Cron — runs 05:30 UTC daily
1. Pull spot price (gold, silver) and 24h/7d/30d changes from existing data source
2. Pull DXY, US10Y, US 10Y real yield from FRED API
3. Pull top 10 overnight news headlines (filter out political content — see prompt)
4. Pull last 30 days of central bank flows from existing or scraped WGC data
5. Send all of this as JSON to Claude Haiku with the prompt below
6. Store result in `briefings`, set `is_published = true` at 06:00 UTC
Claude Haiku prompt
```
You are the Chief Gold Analyst at GGS (getgoldsilver.com). Every day at 06:00 UTC you publish a briefing for a global audience anchored in Dubai, with strong readership in GCC, Pakistan, India, Turkey, Indonesia, Egypt, and Nigeria.
VOICE: Intelligent, calm, market-focused. You write like an experienced gold analyst talking to a smart friend over morning coffee. Clear. Direct. No hype. No jargon without explanation.
PRODUCE EXACTLY THESE 6 SECTIONS:
1. HEADLINE — one sentence under 15 words. The single most important thing about gold today, framed in market terms only.
2. THE NUMBER — opening spot USD/oz, 24h %, 7-day %, 30-day %, one sentence of context.
3. WHAT HAPPENED — 3 to 4 bullets on overnight market moves and key data releases.
4. WHY IT MATTERS — 150 to 250 words. Synthesize DXY + real yields + oil + central bank activity into a coherent market narrative. Tell a story. Ground every claim in a specific data point.
5. WHAT TO WATCH — 2 to 3 bullets on upcoming economic data releases and central bank events in the next 24 to 48 hours.
6. ACTION — one sentence of market-level guidance ending with an affiliate CTA appropriate to the reader's region.
ABSOLUTE RULES — NO EXCEPTIONS:
- Never name political leaders (presidents, prime ministers, ministers, ambassadors).
- Never name countries that are in active conflict in a way that implies a political position.
- Never describe military, diplomatic, or political events in narrative form.
- Never use the words "war," "strikes," "attacks," "regime," "invasion," "ceasefire," or any framing that takes a side.
- Translate ALL geopolitical drivers into pure market language: oil price, dollar strength, real yields, risk premium, central bank behavior.
- Acceptable framing: "geopolitical risk premium," "regional tensions," "energy supply concerns," "diplomatic developments."
- Never recommend buying or selling at specific prices. Stay on the guidance side.
- Never frame gold buying in religious terms — never as obligated, recommended, or rewarded by faith.
- Always cite the source of a data claim (DXY level, 10Y yield, WGC data, specific central bank).
- No emojis. No exclamation marks.
- The reader could be Saudi, Emirati, Iranian, Israeli, Pakistani, Indian, Egyptian, Turkish, or American. Every sentence must be readable by all of them without offense.
- If in doubt about political sensitivity, say less. A shorter briefing is better than a risky one.
INPUT (provided as JSON each morning):
- Spot prices: gold and silver in USD
- 24h, 7d, 30d % changes
- DXY current and 24h change
- US10Y nominal and real yields
- Brent crude price and 24h change
- Central bank flows last 30 days (country, tonnes, source)
- Top 10 overnight news headlines (you will filter for market relevance only)
- Upcoming economic calendar next 48 hours
OUTPUT: Markdown, 6 sections in the order above. Nothing else.
```
Free vs Premium gating
- **Free users** see: Headline + section 1 (The Number) + first paragraph of section 4 (Why it matters), then a paywall that says "Unlock full briefing — $9.99/mo"
- **Premium users** see: full briefing inline + email delivery via Resend at user's local 06:00
Page route
- `/briefing` — today's briefing
- `/briefing/[date]` — historical archive (Premium only beyond 7 days)
- Email template: same content, branded GGS header, unsubscribe footer
---
FEATURE 2 — Local Currencies
Add 8 currencies to existing price components. No new components, no new pages — just extend what's there.
Currencies to add
USD (existing), AED, SAR, PKR, INR, EUR (existing), GBP (existing), TRY, CNY, EGP, IDR, NGN
Implementation
1. Sign up for ExchangeRate-API (free tier: 1500 requests/month is plenty)
2. Cron every 6 hours: fetch USD-base rates for all currencies, cache in Redis or a `fx_rates` table
3. Extend existing price display logic to multiply by FX rate when user selects a non-USD currency
4. Add currency selector to existing UI (dropdown or pills)
5. Default user currency from country detection on first visit (use Vercel geo headers — no third-party geo-IP needed)
6. Save preference to user profile if logged in
Profile column (additive)
```sql
ALTER TABLE profiles ADD COLUMN IF NOT EXISTS preferred_currency TEXT DEFAULT 'USD';
```
---
FEATURE 3 — Local Weight Units
Add 4 South Asian weight units to existing weight selector.
Units to add
- **Ounce (oz)** — 31.1035g (existing)
- **Gram (g)** (existing)
- **Kilogram (kg)** (existing)
- **Tola** — 11.6638g (Pakistan, India)
- **Bhori / Vori** — 11.6638g (Bangladesh — same as tola, different name)
- **Bori** — 96g (Karachi market convention, ~10 tola minus rounding)
- **Masha** — 0.972g (Pakistan/India sub-unit)
Implementation
1. Add unit constants to existing weight conversion utility
2. Extend weight selector UI with new options
3. Save preference to user profile
4. When user selects "tola" their default region likely is PK/IN — auto-suggest PKR or INR for currency too
Profile column (additive)
```sql
ALTER TABLE profiles ADD COLUMN IF NOT EXISTS preferred_weight_unit TEXT DEFAULT 'oz';
```
---
BUILD ORDER
Sprint 1 (Week 1) — Briefing engine
Sprint 2 (Week 2) — Currencies + weights
---
SECURITY CHECKLIST (run before each sprint ships)
- [ ] No new secrets in commits
- [ ] `briefings` table has RLS enabled
- [ ] RLS tested with anonymous client — only published rows visible
- [ ] Anthropic API key in env vars only, never in client code
- [ ] Anthropic spend cap set at $100/day
- [ ] Rate limit on `/briefing` endpoint: 60 req/min per IP
- [ ] Stripe subscription state revalidated server-side before unlocking premium content
- [ ] Service role key server-only
---
WHAT NOT TO BUILD
- No Zakat / Nisab / Faraid calculator (religious liability — permanent ban)
- No regional premium tracker / regional snapshot (data sourcing too unreliable for Phase 1)
- No central bank standalone dashboard (data feeds the briefing only)
- No cultural demand calendar (deferred)
- No tokenized gold integration (Phase 1.5)
- No HNW tier (Phase 2)
- No new auth, payments, or database from scratch (use existing)
- No political content of any kind (see briefing prompt absolute rules)
---
END OF EVERY CLAUDE CODE SESSION
Run this exact prompt:
> Update CLAUDE.md with what was built this session, what broke, what's next. Append to the session log. Then commit and push.
Ten seconds. Non-negotiable.
---
**End. Three features. Ship Sprint 1 in 7 days. Ship Sprint 2 in 7 days. Then evaluate.**