GetGoldSilver — Platform Memory
> **This file is the persistent brain for getgoldsilver.com. Claude Code reads it at the start of every session. Keep it updated. When something important is decided, it goes in this file.**
---
0. THE THESIS (read this first, every session)
GetGoldSilver is not a price ticker. It is an **intelligence layer for a specific macro view**:
> We are in a regime change where the world is dumping US debt for gold. **DXY is the master variable.** The US-Israel-Iran war (from Feb 2026) is a **structural** driver, not a cyclical event. Real yields, central bank gold buying, de-dollarisation, and geopolitical fragmentation are the forces that matter.
Every AI agent, every news article, every signal, every score should be coherent with this framing. We distinguish **structural vs. cyclical** drivers constantly. When something contradicts the thesis (e.g., gold sells off on a dollar spike), we explain *why within the framework*, not abandon the framework.
**If a feature or piece of copy does not reinforce this intelligence layer, it does not belong on the platform.**
---
1. ABSOLUTE RULES (never violate)
1. Model = `claude-3-haiku-20240307` for ALL agents. Sonnet ONLY for AI Score synthesis thesis.
2. Prompt caching always on. `cache_control: ephemeral` on ALL system prompts.
3. **Never fake prices.** Show $0 / OFFLINE if all 6 sources fail.
4. **Never generate political or religious content** in news articles. Investment framing only. The war is a market event, not a political one in our coverage.
5. Direction probabilities capped 5 to 95 percent. Never show 100 percent.
6. AI Score capped at 100.
7. **Additive only.** Never delete existing working features.
8. **Always commit before pushing.** Uncommitted local work causes "Unexpected error" on Vercel. Learned the hard way, 4 times.
9. Every output (article, score, signal) must be coherent with the thesis in Section 0. If drift starts, stop and correct.
---
2. AUDIENCE & VOICE
Who this is for
Who this is NOT for
Voice
News engine specifics (from `lib/autonomous/newsEngine.ts`)
---
3. PLATFORM
- **Live:** getgoldsilver.com (Vercel)
- **Repo:** github.com/khurrambadar3125/getgoldsilver
- **Branch:** `claude/continue-build-ignore-errors-99Bpt`
- **Local path:** `~/Desktop/getgoldsilver`
- **Supabase project:** `lacemhfybgqomwpyvsbu` (dedicated, $10/mo)
- **Stack:** Next.js 16.2.4, React 19, TypeScript, Tailwind CSS, Framer Motion 12, Recharts, Lenis
---
4. ARCHITECTURE (38 routes, 17 APIs, 7 crons)
Core Systems
1. **6-Agent AI Score** (`lib/aiScore.ts`)
Technical, Macro, Geopolitical, Sentiment (INVERSE / contrarian), Risk/Reward → Haiku parallel. Synthesis → Sonnet. Score capped at 100. 12hr cache.
2. **5-Engine Predictions** (`lib/prediction/`)
35 vars from REAL Yahoo Finance 300-day history. Regime detector (6 regimes), pattern recognition (10 patterns), ensemble model (4 weighted models), accuracy tracker. Direction probability capped 5 to 95 percent.
3. **6 Autonomous Systems** (`lib/autonomous/`)
News Intelligence (6hr), Self-Healing Data Pipeline (15min), Threshold Calibrator (weekly), Anomaly Detector, Event Monitor (30min), Health Monitor (2hr). ALL use Haiku + prompt caching.
4. **10 Superpowers** (`lib/superpowers/`)
Signal Matching, Position Risk, Regime Intelligence, Institutional Flows, Microstructure, Correlations, Ladder Optimizer, Scenario Impact, Weekly Brief, KRM Live Feed.
5. **News Engine** (`lib/autonomous/newsEngine.ts`)
10 articles every 2 days, ~1500 words each, Gen Z tone, Haiku, investment-only.
6. **Calendar** (`/calendar`)
14 events seeded through July 2026. FOMC, CPI, NFP, BOJ with impact arrows.
Price Source Cascade (6 sources, in order)
All Pages
All APIs
Cron Schedule (cost-optimised)
---
5. COST STRUCTURE
- Claude API (Haiku + caching): ~$3-4/month
- Anthropic hard limit: $8/month at console.anthropic.com
- Supabase: $10/month (dedicated)
- Vercel: free tier
- Yahoo Finance / Google News RSS: free
- **Total: ~$13-14/month.** 500 daily users = $0 additional (pre-computed + cached).
This unit economics is a **competitive moat.** Protect it. Any proposed feature that meaningfully changes this number needs explicit approval before building.
---
6. DESIGN
Palette
Treatment
---
7. ENV VARS (6 total, all set on Vercel)
```
NEXT_PUBLIC_SUPABASE_URL = https://lacemhfybgqomwpyvsbu.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY = (publishable key from Supabase)
SUPABASE_SERVICE_ROLE_KEY = (secret key from Supabase)
ANTHROPIC_API_KEY = (from console.anthropic.com)
CRON_SECRET = <redacted>
RESEND_API_KEY = (existing Resend key)
```
**Never commit real values. Never suggest committing a `.env` file.**
---
8. DEPLOY
- Deploy via `git push`. Vercel auto-promotes to production (`autoAlias: true`).
- Build takes ~19 seconds.
- **CRITICAL:** Always commit local changes before pushing. Uncommitted work = old code deploys = build errors.
- Iron Dome security: 9 headers, rate limiting, CSP.
---
9. MONETIZATION
- **Free:** live prices, basic signals, news
- **Pro $19.99/mo:** AI Score, predictions, all superpowers
- **Institutional $99/mo:** API access, custom alerts, PDF reports
---
10. KNOWN ISSUES / DEFERRED
- Multilingual (20+ languages): not built yet
- Admin dashboard: not built
- Puppeteer weekly PDF: not integrated
- Historical price backfill to Supabase: not automated
- WhatsApp Business API alerts: not integrated
---
11. VERIFIED WORKING (2026-04-18)
- Prices: LIVE from Yahoo Finance (6-source cascade)
- Supabase: 22+ tables created, calendar events loaded
- AI Score: 6 agents with real spot prices in synthesis
- Predictions: Real 300-day Yahoo Finance history
- All pages: full and built (no more stubs)
- RSS feed + sitemap for Google News
- Build: clean, zero errors
- Deploy: getgoldsilver.com returning HTTP 200
---
12. HOW KHURRAM WORKS (important for every session)
- **Non-technical founder.** 30+ years C-Suite. Thinks in markets, audiences, product, not code architecture.
- **One action at a time** when deploying or debugging. Do NOT dump a 10-step plan.
- **Direct and honest.** If an idea is bad, say so. Do not agree to please. Flattery wastes his time.
- **Specific actionable output** over general advice. "Run `git status`" beats "you might want to check your git state."
- When something breaks, give the **exact command or file change.** No "you might consider."
- Context: based in Dubai, GitHub `khurrambadar3125`, runs Spotlight (physical company), building a portfolio of ~20 live AI platforms with 100+ in pipeline, entirely solo via Claude Code.
- Works across many projects in parallel. Respect his time. Be concise.
---
13. WHAT NOT TO DO
- Do NOT introduce Syne font. Stretching bugs, tried and rejected on other projects.
- Do NOT propose migrating frameworks. We are on Next.js, full stop.
- Do NOT introduce new npm packages without flagging them first.
- Do NOT change the color palette or typography without asking.
- Do NOT add cookie banners, GDPR modals, or compliance widgets without explicit request.
- Do NOT push directly to `main`. Use the working branch.
- Do NOT commit `.env` files or API keys.
- Do NOT add political or religious commentary to any content.
- Do NOT break the $13-14/month cost structure without explicit approval.
- Do NOT suggest rewriting working systems for "cleaner architecture." Additive only, per Rule 7.
---
14. CURRENT PRIORITIES
*Update weekly. Top of mind this week:*
1. [ ]
2. [ ]
3. [ ]
---
15. SESSION LOG
*At the end of every meaningful session, Claude Code should append a 3-line summary here with date. This is the paper trail for future sessions.*
- **2026-04-18:** CLAUDE.md created. Claude Code drafted operational layer from codebase (104 lines). Strategic layer (thesis, audience, voice, working style, scope rules) added via chat with Claude. Merged version committed. Platform verified working end-to-end.
---
*Last updated: 2026-04-18*