-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
296 lines (261 loc) · 14 KB
/
Copy pathindex.html
File metadata and controls
296 lines (261 loc) · 14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>SmokinTerritory — Command Cheat Sheet</title>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: #0a0a0a; color: #e0e0e0; padding: 20px; max-width: 1000px; margin: 0 auto; }
h1 { font-size: 1.6rem; margin-bottom: 4px; color: #fff; }
.subtitle { color: #888; font-size: 0.85rem; margin-bottom: 16px; }
.live-dot { display: inline-block; width: 8px; height: 8px; background: #22c55e; border-radius: 50%; margin-right: 6px; animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
/* Tabs */
.tabs { display: flex; gap: 0; margin-bottom: 20px; border-bottom: 1px solid #333; }
.tab { padding: 10px 20px; cursor: pointer; color: #888; font-weight: 600; font-size: 0.85rem; border-bottom: 2px solid transparent; transition: all 0.15s; }
.tab:hover { color: #ccc; }
.tab.active { color: #f97316; border-bottom-color: #f97316; }
.tab-content { display: none; }
.tab-content.active { display: block; }
/* Commands tab */
.category { margin-bottom: 24px; }
.category-header { font-weight: 700; color: #f97316; margin-bottom: 8px; padding-bottom: 4px; border-bottom: 1px solid #333; text-transform: uppercase; letter-spacing: 0.5px; font-size: 0.8rem; }
.cmd-row { display: flex; justify-content: space-between; padding: 8px 12px; border-radius: 6px; margin-bottom: 4px; transition: background 0.15s; }
.cmd-row:hover { background: #1a1a2e; }
.cmd-title { font-weight: 600; color: #fff; min-width: 180px; flex-shrink: 0; }
.cmd-phrases { color: #a78bfa; font-family: 'SF Mono', 'Fira Code', monospace; font-size: 0.82rem; }
.cmd-desc { color: #888; font-size: 0.78rem; margin-top: 2px; }
.search-box { width: 100%; padding: 10px 14px; background: #1a1a1a; border: 1px solid #333; border-radius: 8px; color: #fff; font-size: 0.95rem; margin-bottom: 20px; outline: none; }
.search-box:focus { border-color: #f97316; }
.search-box::placeholder { color: #666; }
.loading { text-align: center; padding: 40px; color: #666; }
.count { color: #666; font-size: 0.75rem; margin-bottom: 16px; }
.type-badge { display: inline-block; padding: 1px 6px; border-radius: 3px; font-size: 0.65rem; font-weight: 600; margin-left: 8px; text-transform: uppercase; }
.type-skill { background: #1e3a5f; color: #60a5fa; }
.type-dashboard { background: #1a3d2e; color: #4ade80; }
.type-script { background: #3d2e1a; color: #fbbf24; }
.type-function { background: #3d1a3d; color: #e879f9; }
.type-config { background: #2a2a2a; color: #999; }
.type-memo { background: #2a2a1a; color: #da4; }
.type-spreadsheet { background: #1a2a3a; color: #7dd3fc; }
.type-proposal { background: #2a1a3a; color: #c084fc; }
.type-report { background: #1a3a2a; color: #86efac; }
.type-battlecard { background: #3a1a1a; color: #fca5a5; }
/* Recovery tab */
.recovery-section { margin-bottom: 28px; }
.recovery-section h3 { color: #f97316; margin-bottom: 8px; font-size: 0.95rem; }
.recovery-section p { color: #aaa; font-size: 0.85rem; line-height: 1.5; margin-bottom: 8px; }
.recovery-code { background: #1a1a1a; border: 1px solid #333; border-radius: 8px; padding: 12px 16px; font-family: 'SF Mono', 'Fira Code', monospace; font-size: 0.8rem; color: #4ade80; overflow-x: auto; margin-bottom: 8px; position: relative; white-space: pre; line-height: 1.6; }
.copy-btn { position: absolute; top: 8px; right: 8px; background: #333; border: none; color: #aaa; padding: 4px 10px; border-radius: 4px; cursor: pointer; font-size: 0.7rem; }
.copy-btn:hover { background: #555; color: #fff; }
.recovery-table { width: 100%; border-collapse: collapse; margin-bottom: 12px; }
.recovery-table th { text-align: left; color: #f97316; font-size: 0.75rem; text-transform: uppercase; padding: 6px 12px; border-bottom: 1px solid #333; }
.recovery-table td { padding: 6px 12px; font-size: 0.82rem; border-bottom: 1px solid #1a1a1a; }
.recovery-table td:first-child { color: #fff; font-weight: 600; }
.recovery-table td:nth-child(2) { color: #aaa; }
.recovery-table td:nth-child(3) { color: #4ade80; font-family: monospace; font-size: 0.75rem; }
.warning { background: #2a1a0a; border: 1px solid #f97316; border-radius: 8px; padding: 12px 16px; margin-bottom: 16px; }
.warning-title { color: #f97316; font-weight: 700; font-size: 0.85rem; margin-bottom: 4px; }
.warning p { color: #ccc; font-size: 0.82rem; margin: 0; }
.updated { color: #555; font-size: 0.7rem; text-align: right; margin-top: 20px; }
</style>
</head>
<body>
<h1><span class="live-dot"></span>SmokinTerritory</h1>
<p class="subtitle">Live from Supabase — auto-updates as new commands are added</p>
<div class="tabs">
<div class="tab active" data-tab="commands">Command Cheat Sheet</div>
<div class="tab" data-tab="recovery">Disaster Recovery</div>
</div>
<!-- COMMANDS TAB -->
<div class="tab-content active" id="tab-commands">
<input type="text" class="search-box" placeholder="Search commands... (e.g. proposal, research, WARN)" id="search">
<div class="count" id="count"></div>
<div id="content"><div class="loading">Loading from Supabase...</div></div>
</div>
<!-- RECOVERY TAB -->
<div class="tab-content" id="tab-recovery">
<div class="warning">
<div class="warning-title">⚠️ If you're reading this, something went wrong.</div>
<p>Follow these steps in order. Everything is recoverable — your data lives in Supabase and GitHub, not on any single machine.</p>
</div>
<div class="recovery-section">
<h3>Step 1 — What lives where</h3>
<table class="recovery-table">
<tr><th>Asset</th><th>Location</th><th>Access</th></tr>
<tr><td>Territory data (865 accounts, scoring, signals)</td><td>Supabase</td><td>cnplogkxbjecdeeritdl</td></tr>
<tr><td>Claude config (CLAUDE.md, memory, skills, settings)</td><td>GitHub (private)</td><td>m9751/claude-config</td></tr>
<tr><td>Territory dashboard + heatmap</td><td>Vercel + GitHub</td><td>m9751/smokin-territory</td></tr>
<tr><td>This cheat sheet</td><td>GitHub Pages</td><td>m9751/st-cheatsheet</td></tr>
<tr><td>Deliverables registry</td><td>Supabase</td><td>public.deliverables</td></tr>
<tr><td>Account artifacts</td><td>Supabase</td><td>public.account_artifacts</td></tr>
<tr><td>WARN pipeline</td><td>GitHub</td><td>m9751/warn-pipeline</td></tr>
<tr><td>SAM UEI resolver</td><td>GitHub</td><td>m9751/sam-uei-resolver</td></tr>
</table>
</div>
<div class="recovery-section">
<h3>Step 2 — Restore Claude config to a new machine</h3>
<p>This restores all memory files, skills, settings, and CLAUDE.md.</p>
<div class="recovery-code">
# Install Claude Code (if not already installed)
npm install -g @anthropic-ai/claude-code
# Clone the config backup
gh repo clone m9751/claude-config ~/claude-config-restore
# Copy into Claude's config directories
mkdir -p ~/.claude/projects/-Users-$(whoami)/memory
mkdir -p ~/.claude/skills
cp ~/claude-config-restore/CLAUDE.md ~/.claude/projects/-Users-$(whoami)/
cp -R ~/claude-config-restore/memory/* ~/.claude/projects/-Users-$(whoami)/memory/
cp -R ~/claude-config-restore/skills/* ~/.claude/skills/
cp ~/claude-config-restore/settings.json ~/.claude/settings.json
# Verify
ls ~/.claude/projects/-Users-$(whoami)/CLAUDE.md
ls ~/.claude/projects/-Users-$(whoami)/memory/
ls ~/.claude/skills/
</div>
</div>
<div class="recovery-section">
<h3>Step 3 — Reconnect MCP servers</h3>
<p>Claude Code MCP connections are stored in <code>~/.claude/settings.json</code> (restored above). Verify these are active:</p>
<table class="recovery-table">
<tr><th>MCP Server</th><th>Purpose</th><th>Verify with</th></tr>
<tr><td>Supabase</td><td>Database (primary)</td><td>"run a count on accounts"</td></tr>
<tr><td>ZoomInfo</td><td>Contact enrichment</td><td>"search contacts at Jefferson Health"</td></tr>
<tr><td>NPI</td><td>Provider validation</td><td>"npi lookup 1234567890"</td></tr>
<tr><td>CMS/Medicare</td><td>Coverage data</td><td>"search national coverage"</td></tr>
<tr><td>Vercel</td><td>Dashboard deploy</td><td>"list deployments"</td></tr>
</table>
</div>
<div class="recovery-section">
<h3>Step 4 — Verify data integrity</h3>
<p>Open Claude Code and say:</p>
<div class="recovery-code">"integrity run"</div>
<p>This triggers the db-integrity skill which checks table counts, orphan records, scoring gaps, and RLS policies. If it reports issues, Claude will fix them.</p>
</div>
<div class="recovery-section">
<h3>Step 5 — Restore Regular Claude (claude.ai)</h3>
<p>The system instructions are backed up at <code>m9751/claude-config/claude_ai_system_instructions.txt</code>. To restore:</p>
<div class="recovery-code">
1. Open https://claude.ai
2. Go to Settings > Profile > Custom Instructions
3. Paste the contents of claude_ai_system_instructions.txt
4. Save
</div>
</div>
<div class="recovery-section">
<h3>Step 6 — If GitHub access is lost</h3>
<p>All territory data, scoring, signals, deliverables, and artifacts live in Supabase — not GitHub. GitHub holds config and deploy pipelines. If GitHub is gone:</p>
<div class="recovery-code">
# Supabase is the source of truth for data
# Access directly at: https://supabase.com/dashboard/project/cnplogkxbjecdeeritdl
# Rebuild config manually:
# 1. Open Claude Code
# 2. Say: "I lost my config. Query the deliverables table and rebuild CLAUDE.md from the schema"
# 3. Claude can reconstruct CLAUDE.md by querying Supabase metadata
# Rebuild this cheat sheet:
# 1. Say: "rebuild the command cheat sheet from deliverables table"
# 2. Claude will generate the HTML and redeploy
</div>
</div>
<div class="recovery-section">
<h3>Step 7 — If Supabase access is lost</h3>
<p>This is the worst case. Supabase holds all 865 accounts, scoring data, and signal history.</p>
<div class="recovery-code">
# Supabase has automatic daily backups (Pro plan)
# Contact Supabase support to restore from backup
# Project ID: cnplogkxbjecdeeritdl
# Region: us-west-2
# If project is unrecoverable:
# 1. Create new Supabase project
# 2. Apply migrations from m9751/smokin-territory (if GitHub is intact)
# 3. Reload data from Salesforce export + CMS downloads
# 4. Re-run scoring: SELECT public.run_scoring_v4_1();
# 5. Update all config files with new project ID and anon key
</div>
</div>
<div class="recovery-section">
<h3>Recovery command for Claude Code</h3>
<p>If you're in a fresh Claude Code session and need to bootstrap everything, say:</p>
<div class="recovery-code" style="color: #a78bfa; font-size: 0.9rem;">
"full recovery — restore config from m9751/claude-config and verify all connections"
</div>
</div>
</div>
<div class="updated" id="updated"></div>
<script>
const SUPABASE_URL = 'https://cnplogkxbjecdeeritdl.supabase.co';
const SUPABASE_KEY = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImNucGxvZ2t4YmplY2RlZXJpdGRsIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzIzMjAzMTUsImV4cCI6MjA4Nzg5NjMxNX0.WJ6edMljHiY-fku9G2OWm83y5wHWI5yZHvxtpYMCuWU';
const CATEGORY_ORDER = ['signals', 'outbound', 'research', 'proposals', 'scoring', 'pipeline', 'find', 'schedule', 'infra', 'general'];
const CATEGORY_LABELS = {
signals: '📡 Signals & Briefings',
outbound: '📧 Outbound & Campaigns',
research: '🔍 Research & Prep',
proposals: '📄 Proposals & Assets',
scoring: '📊 Scoring & Territory',
pipeline: '🔧 Pipelines & Tools',
find: '🗂️ Find Things',
schedule: '⏰ Schedule & Automate',
infra: '⚙️ Infrastructure',
general: '📦 General'
};
let allData = [];
// Tab switching
document.querySelectorAll('.tab').forEach(tab => {
tab.addEventListener('click', () => {
document.querySelectorAll('.tab').forEach(t => t.classList.remove('active'));
document.querySelectorAll('.tab-content').forEach(c => c.classList.remove('active'));
tab.classList.add('active');
document.getElementById('tab-' + tab.dataset.tab).classList.add('active');
});
});
async function load() {
const res = await fetch(
`${SUPABASE_URL}/rest/v1/deliverables_public?select=title,type,trigger_phrase,category,description,url,location&order=category,title`,
{ headers: { 'apikey': SUPABASE_KEY, 'Authorization': `Bearer ${SUPABASE_KEY}` } }
);
allData = await res.json();
render(allData);
document.getElementById('updated').textContent = `Last loaded: ${new Date().toLocaleString()}`;
}
function render(data) {
const grouped = {};
data.forEach(d => {
const cat = d.category || 'general';
if (!grouped[cat]) grouped[cat] = [];
grouped[cat].push(d);
});
let html = '';
CATEGORY_ORDER.forEach(cat => {
if (!grouped[cat] || grouped[cat].length === 0) return;
html += `<div class="category"><div class="category-header">${CATEGORY_LABELS[cat] || cat}</div>`;
grouped[cat].forEach(d => {
const phrases = d.trigger_phrase.split(',').map(p => `"${p.trim()}"`).join(' · ');
const badge = `<span class="type-badge type-${d.type}">${d.type}</span>`;
const link = d.url ? ` → <a href="${d.url}" style="color:#60a5fa" target="_blank">${d.url}</a>` : '';
html += `<div class="cmd-row">
<div>
<div class="cmd-title">${d.title}${badge}</div>
<div class="cmd-desc">${d.description || ''}${link}</div>
</div>
<div class="cmd-phrases">${phrases}</div>
</div>`;
});
html += '</div>';
});
document.getElementById('content').innerHTML = html;
document.getElementById('count').textContent = `${data.length} commands loaded`;
}
document.getElementById('search').addEventListener('input', e => {
const q = e.target.value.toLowerCase();
if (!q) { render(allData); return; }
const filtered = allData.filter(d =>
(d.title + ' ' + d.trigger_phrase + ' ' + d.description + ' ' + d.category).toLowerCase().includes(q)
);
render(filtered);
document.getElementById('count').textContent = `${filtered.length} of ${allData.length} commands`;
});
load();
</script>
</body>
</html>