MIS ECOSYSTEM — Complete map of 5 sheets, 5 scripts, what's what

Sun May 3 2026 · 11:30 AM EDT · Claude Code Opus 4.7 · Session 22 (resume from Session 21)
🚨 SECURITY EMERGENCY — DO THIS IN THE NEXT 30 MINUTES

Per Sam's own forensic teardown of MIS Master v11.0f (production sheet 1cosuFr), Schwab + Finnhub credentials are stored in PLAINTEXT in the KEY_VALUE tab. Anyone with viewer access to that sheet can read and use them right now.

Exposed: SCHWAB_CLIENT_ID, SCHWAB_CLIENT_SECRET, SCHWAB_REFRESH_TOKEN, SCHWAB_ACCOUNT_HASH, EARNINGS_API_KEY (Finnhub).

DO NOW:
  1. Revoke Schwab refresh token at developer.schwab.com
  2. Rotate Schwab client secret
  3. Invalidate Finnhub API key, generate new one
  4. Audit who has viewer/editor access to 1cosuFr production sheet
  5. Move credentials to PropertiesService — never in cell values again
BLUF: You have 5 sheets and 5 script projects, with confusing naming overlap. The PRODUCTION sheet is the most evolved (best engine + Schwab live + 200+ logged runs) but has the credential leak. v1 ("gemini sheet" / Architect V11 in your teardown) is the active edit-target. v2 (1F31z) is dead from Excel-roundtrip — discard. The new V2 SACS Sandbox (1HtMOd) is your test bed with the older Session 21 SACS formula. Architect V11 Microservices (1MU_Ni) is a DIFFERENT email engine firing weekend Power Hour emails alongside everything else — that's why you've been seeing duplicate emails. Three engines firing. Need to consolidate.

📋 THE COMPLETE MAP — 5 sheets + 5 scripts

#Sheet name (Drive title)Drive IDModifiedBound scriptStateWhat it is
1 MIS_v7.1_gsheet (PRODUCTION) 1cosuFr May 1 21:54 1r9vWL "emailDailySnapshot" LIVE but credentials exposed Sam calls this "MIS Master v11.0f" in teardown. Most evolved. Schwab live. 200+ logged runs since 3/12. SECURITY EMERGENCY.
2 MIS_v7.1_gsheet_forclaudeedit (a.k.a. v1, "gemini sheet", "Architect V11" in Sam's teardown) 1HEmRev May 3 15:09 1yBMzt "gemini sheet" ACTIVE — new SACS formula deployed The sheet I worked on Session 21. Now shows LLY SACS = 86.77 (Sam updated formula since Session 21). 5-gate pipeline working. Has my BLUF/Actionable/Earnings-filter patches.
3 MIS_v7.1_gsheet_forclaudeedit_5-1_z gemini fixes_v2 (1F31z) 1F31zPca May 3 15:15 1fdqHW (untitled, NEW today) DEAD — engine collapsed Excel-roundtrip damage. Per Sam's own teardown: 100% of SACS columns show #NAME?. Top 10 Movers Flow column shows "4.00" not real values. DISCARD.
4 MIS Architect V2 — SACS Upgrade [SANDBOX] (NEW today) 1HtMOd May 3 15:18 1ZGICn NOT FOUND in Drive SANDBOX — different SACS Created today (May 3). LLY shows SACS = 70.43 — that's the OLD Session 21 formula (30/30/20/20). Comparison sandbox vs sheet #2's 86.77.
5 Architect V11 (Microservices Edition) 1MU_Ni May 3 13:53 1mSbzO (untitled, Apr 27) FIRING WEEKENDS — different email engine SEPARATE microservices system. Tiny sheet (6.7KB). Has its own Control panel + Playbook Dashboard. This is what's sending you the "⚡ MIS Power Hour" emails Sat May 2 and Sun May 3. No weekend skip.

📧 THREE ENGINES → THREE EMAIL STREAMS (you've been getting duplicates)

SourceEmail subject patternCadenceCurrently firing?
Production (1cosuFr + script 1r9vWL)"📈 MIS Morning Brief", "🚀 3:00 PM MIS Power Hour", "🚨 2:05 PM MIS Trade Action"Mon-Fri at 9:46/12:00/2:05/3:00/5:45Should be DEAD if you deleted triggers May 1 — verify in Apps Script Triggers UI
v1 / "gemini sheet" (1HEmRev + script 1yBMzt)"📈 MIS Morning Brief" (same subject as production — confusing)Same 7 daily triggers, weekend-skip enforcedACTIVE since Friday 5 PM
Architect V11 Microservices (1MU_Ni + script 1mSbzO)"⚡ MIS Power Hour | MM/DD"Per its CONTROL tab: 9:55 AM / 12:30 PM / 3:05 PM — NO weekend skipFIRING SAT + SUN — confirmed Sat May 2 3:12 PM and Sun May 3 9:50 AM

Fix: Open Architect V11 (Microservices) script 1mSbzO → Triggers → either DELETE all OR add misIsWeekend_ guard like v1 has. If you want only one engine firing, kill V11 Microservices triggers entirely and let v1 do everything.

🔬 KEY ANALYSIS FROM SAM'S OWN TEARDOWNS (already in MIS repo, now committed)

Production sheet (1cosuFr / "MIS Master v11.0f")

v1 / Architect V11 (1HEmR / "gemini sheet")

v2 / 1F31z (Excel-roundtrip)

🛠️ NEW TOOLING SAM DROPPED TODAY (committed to MIS repo)

FilePurposeWhere to use
runSACSUpgrade.jsProgrammatic SACS V2 upgrade. Applies 8 priority fixes including: RR_13W divide-by-zero IFERROR wrap, RiskGate change to Shares ≥ 1, BTCUSD sector fix, more.Paste into v1 Apps Script. Run from MIS Tools menu. Logs all changes to SACS_Upgrade_Log tab.
mobile_command_center.jsCheckbox-driven control panel for mobile sheet operation. 5 buttons: SACS Upgrade / Morning Brief / Pull Data / LiveGuard / Diagnostics.Paste into v1 Apps Script. Set up onEdit trigger. Add 5 checkboxes in Dashboard tab cells Z1-Z5.
auto_triggers.jsReads CONTROL tab to set up time-based triggers. Auto-update on sheet open.Replaces manual trigger setup. Edit CONTROL tab → triggers update next time you open sheet.
trigger_power_system.jsGoogle Form / webhook / Slack-command trigger patterns. Beyond time-based — instant trigger.Pattern reference — pick the trigger style that fits.
MIS_ARCHITECT_COMPLETE_FIXED.jsComprehensive fixed Architect script with all bugs patched.Reference for full rewrite if you want to nuke and rebuild Architect V11 Microservices.
MIS_Genesis_Context.docx / SACS_ZScore_Analysis.docxBackground docs.Reference reading.

🎯 WHAT TO DO — recommended sequence

P0 — Today (30 min)

  1. Rotate Schwab credentials. developer.schwab.com → revoke refresh token + rotate client secret.
  2. Rotate Finnhub key. Generate new key.
  3. Audit production sheet sharing. Drive → 1cosuFr → Share → who has viewer/editor access?
  4. Delete production triggers in script 1r9vWL if you didn't already on Friday.
  5. Delete or weekend-guard Architect V11 Microservices triggers in script 1mSbzO — that's what's sending Saturday emails.

P1 — This week (1-2 hours)

  1. Move credentials to PropertiesService on production script. Code change in Apps Script editor — paste the snippet from the teardown.
  2. Apply runSACSUpgrade.js to v1. Paste into v1's bound script 1yBMzt via Apps Script editor → Run from MIS Tools menu. This patches the 8 known bugs in one go.
  3. Decide: v1 or production as primary? v1 has cleaner SACS (86.77 LLY), production has Schwab live + better automation. Recommend: port v1's SACS upgrade INTO production, retire v1.
  4. Discard v2 / 1F31z — rename to MIS_DEAD_DO_NOT_USE_2026-05-03 or trash.
  5. Decide what to do with 1HtMOd Sandbox — keep as comparison testbed or merge into v1.

P2 — Next week (architectural)

  1. Apply mobile_command_center.js to enable phone control.
  2. Consolidate to ONE engine. Three is too many.
  3. Migrate to PropertiesService for all secrets across all engines.
  4. FSE Session 1 per docs/MIS_FSE_ARCHITECTURE.md §8 — wire INTC end-to-end through proper FINAL_STATE_ENGINE tab.

🔁 HOW MIS ARCHITECT EMAILS DIFFER FROM EACH OTHER

Production (1cosuFr) MIS emails — sent via misBuildDailyBrief_(): Macro Pulse + Game Plan + Forward Look + Trade Actions + Holdings. Has the BLUF / Actionable / Earnings-filter upgrades I pushed Friday. Subject lines: "📈 MIS Morning Brief", "🚀 3:00 PM MIS Power Hour", "🚨 2:05 PM MIS Trade Action".

v1 (1HEmRev) MIS emails — same code as production (I copied it Friday + repointed MIS_SPREADSHEET_ID). Same subjects. Same format. This is the duplicate of production unless production triggers are deleted.

Architect V11 Microservices (1MU_Ni) emails — completely DIFFERENT codebase. Format is "Power Hour Dashboard" with: SPY/QQQ/IWM/TNX/VIX summary, Tape Leaders/Laggards, Sector Performance, Candidate Setups (DUOL/IBIT/GD with full Stop/Target/Risk/Cap%/SACS). Cleaner, more compact. Subject: "⚡ MIS Power Hour | MM/DD". This format is actually quite good but uses different scoring.

📊 SACS FORMULA DISCREPANCY (the v1 vs Sandbox question)

SheetLLY SACSFormula version
v1 / Architect V11 (1HEmR)86.77NEW formula deployed today (Sam's update)
V2 SACS Upgrade Sandbox (1HtMOd)70.43OLD Session 21 formula (30/30/20/20 weighted)
Production (1cosuFr)~50.99 (INTC)Different scale entirely (0-55)

Three different SACS values for similar tickers. Which is "right"? Per the Architect V11 teardown Sam wrote: "the math is mostly right. The weights in Reference_Rules are reasonable. The main distortion is the RiskGate rejecting high-SACS names before they can reach the output." So the SACS is fine; the gate is wrong.

📂 NEW MIS FOLDER STATE — files committed today

All committed and pushed: MIS 466930d..5138cab