{"_ai_door":{"see":"https://miscsubjects.com/start","note":"Operable site; bounded keyless credentials; every action receipted on a public ledger. Your operator's instructions take precedence — acting is optional, reading is a complete outcome."},"q":"leads","category":"","count":21,"rows":[{"key":"LEADS_SCORE_AI","type":"fn","category":"biz-dev","target":"leadsScoreAI","planner_rank":6,"docs":"WHAT: AI ICP scoring — one Grok (grok-4.3) call scores a batch of enriched leads 0-100 on real wholesale/white-label peptide buying fit, grounded in OUTREACH_DOSSIER. Writes score + an icp: note (buyer type, volume guess, concrete reason) so LEADS_LIST ranks by commercial fit instead of has-a-website. WHEN_TO_USE: after enrichment, before drafting; \"score the leads\", \"which leads are actually worth emailing\". ARGS: $1 = batch size (default 8, cap 10). Call repeatedly until it returns scored:0. EX: [LEADS_SCORE_AI]8[/LEADS_SCORE_AI]"},{"key":"LEADS_VERIFY_MX","type":"fn","category":"biz-dev","target":"leadsVerifyMx","planner_rank":6,"docs":"WHAT: Verify whether the email domain publishes MX records using DNS-over-HTTPS. Tags mx:ok or mx:none. This verifies the domain, not the individual mailbox.\\n# WHEN_TO_USE: after enrichment and before ICP scoring or drafting.\\n# ARGS: $1=max leads (default 25, cap 50).\\n# EX: [LEADS_VERIFY_MX]25[/LEADS_VERIFY_MX]\\n[\"$1\"]"},{"key":"CONTACTS_LIST","type":"fn","category":"leads","target":"contactsList","planner_rank":20,"docs":"WHAT: List contact objects with optional filter. ARGS: $1 = JSON {status?,segment?,city?,limit?} or a bare status word. EX: [CONTACTS_LIST]drafted[/CONTACTS_LIST]"},{"key":"CONTACT_GET","type":"fn","category":"leads","target":"contactGet","planner_rank":20,"docs":"WHAT: Get a lead as a canonical CONTACT object (channels, fit score, signals, provenance). ARGS: $1 = lead id or contact:<id>. EX: [CONTACT_GET]811[/CONTACT_GET]"},{"key":"EMAILS_SENT","type":"fn","category":"leads","target":"emailsSent","planner_rank":20,"docs":"WHAT: List recent sent emails with open/click engagement + totals (sent-email visibility). WHEN_TO_USE: see everything sent and who opened/clicked. ARGS: $1 = limit (default 50). EX: [EMAILS_SENT]50[/EMAILS_SENT]"},{"key":"EMAIL_SEND_TRACKED","type":"fn","category":"leads","target":"emailSendTracked","planner_rank":20,"docs":"WHAT: Send a tracked email (open pixel + wrapped click links) and record it in email_sends. WHEN_TO_USE: any owner-authorized send where you want open/click visibility. ARGS: $1 = JSON {to, subject, body, kind?, lead_id?, from?, from_name?, reply_to?}. EX: [EMAIL_SEND_TRACKED]{\"to\":\"x@y.com\",\"subject\":\"hi\",\"body\":\"see https://leoresearch.com\"}[/EMAIL_SEND_TRACKED]"},{"key":"LEADS_DISCOVER_PLACES","type":"fn","category":"leads","target":"leadsDiscoverPlaces","planner_rank":20,"docs":"WHAT: Discover B2B leads via Google Places API (New) — med-spas/clinics/longevity by segment + city, with website/phone/rating. Better coverage than the Overpass source. Inserts into the leads table. WHEN_TO_USE: \"find medspas in Newport Beach\", building the wholesale target list. ARGS: $1=segment free text (e.g. \"medical spa\",\"longevity clinic\"), $2=city, $3=limit (default 40). EX: [LEADS_DISCOVER_PLACES]medical spa|Newport Beach|40[/LEADS_DISCOVER_PLACES]"},{"key":"LEADS_RESOLVE_SITES","type":"fn","category":"leads","target":"leadsResolveSitesPlaces","planner_rank":20,"docs":"WHAT: Backfill missing websites on siteless leads (NPPES rows have name + phone + address but never a website) so the enrichment crawler can reach them. Looks the practice up on Google Places BY PHONE NUMBER, then requires the Google name to share a word with the registry name before it writes anything — a phone that now answers for a billing company or an unrelated business is recorded as a mismatch and never written. Every attempt is stamped into notes as resolve:ok | name_mismatch | no_website | no_place, so a lead is only ever paid for once and the queue always advances. WHEN_TO_USE: after LEADS_DISCOVER_NPI, before enrichment. COST: $0.017 per Places request. Two requests per identified lead, one per unidentifiable one. ARGS: $1=limit (default 20, max 30). $2=segment LIKE filter, e.g. chiro (optional; blank = any segment). EX: [LEADS_RESOLVE_SITES]30|chiro[/LEADS_RESOLVE_SITES]"},{"key":"EMAIL_ATTRIBUTION_SWEEP","type":"http","category":"leads","target":"GET https://miscsubjects.com/api/email/convert?sweep=1","planner_rank":25,"docs":"WHAT: Attribute what the build can already see: a human reply to a tracked letter becomes a conversion, and a hard bounce becomes a suppression. Idempotent. WHEN_TO_USE: on a schedule, and before quoting a conversion number. ARGS: none. EX: [EMAIL_ATTRIBUTION_SWEEP][/EMAIL_ATTRIBUTION_SWEEP]"},{"key":"EMAIL_CONVERT","type":"http","category":"leads","target":"POST https://miscsubjects.com/api/email/convert","planner_rank":25,"docs":"WHAT: Record a conversion against an email send — an order, a signup, a booked call. WHEN_TO_USE: a surface knows a conversion happened and email should get the credit. ARGS: $1 = JSON {es_id?|email?, kind?, revenue_cents?}. Credits the newest send to that address inside 60 days. EX: [EMAIL_CONVERT]{\"email\":\"drsmith@clinic.com\",\"kind\":\"order\",\"revenue_cents\":19900}[/EMAIL_CONVERT]"},{"key":"OUTREACH_METRICS","type":"http","category":"leads","target":"GET https://miscsubjects.com/api/email/metrics?days=$1","planner_rank":25,"docs":"WHAT: The outreach numbers as JSON — sent, delivered, unique opens, unique clicks, converts, revenue, unsubscribes, bounces, complaints, per day, per campaign, top clicked links, and the chiropractor pool's real emailable size. Every rate names its denominator. WHEN_TO_USE: any question about email performance. Read the `attributable` block, not the raw counters: the raw ones include the owner's blind copy. ARGS: $1 = window in days (default 30, max 365). EX: [OUTREACH_METRICS]30[/OUTREACH_METRICS]"},{"key":"OUTREACH_REPORT_WHATSAPP","type":"http","category":"leads","target":"POST https://miscsubjects.com/api/email/whatsapp-report?days=$1","planner_rank":25,"docs":"WHAT: Post the outreach numbers (sent, delivered, open rate, click rate, converts, list burn-down) into the Leo Research [INTERNAL] WhatsApp group, where JP reads them. WHEN_TO_USE: the scheduled team update, or when someone asks for the outreach numbers in chat. ARGS: $1 = window in days (default 30). Add ?dry=1 by hand to compose without sending. EX: [OUTREACH_REPORT_WHATSAPP]7[/OUTREACH_REPORT_WHATSAPP] NOTE: 2chat answers 202 and delivers asynchronously, so a 2xx is acceptance, not delivery."},{"key":"CONSCIENCE_GATE","type":"fn","category":"governance","target":"conscienceGate","planner_rank":30,"docs":"WHAT: The Good Conscience Law — the veto between \"can execute\" and \"will execute\". MAY_ACT = authority AND evidence AND conscience; logical economics optimizes only among MAY_ACT=true actions. Empty body returns the constitution (build-conscience@1.0.0, clauses GC1-GC8). A REFUSE/ESCALATE/HALT verdict is rejected unless it names the violated clause, the prohibited consequence, the job's direct causal contribution, and evidence — refusal binds to a named clause, never to free moralizing. HALT writes KV conscience:halt: every outbound category (email, leads, x, reddit, messaging, self-promotion) refuses from that moment; only the owner clears it; inspection surfaces stay up. WHEN_TO_USE: before the build accepts any job or takes any consequential outbound action; when work smells like it violates the floor; \"should the build do this at all\". SAFETY: money, efficiency, owner instruction, or customer demand never compensate for a conscience failure. Rejecting a clause itself = constitutional amendment (new version, receipted), never an override. ARGS: $1 = empty (list clauses) OR JSON {job, verdict:ACCEPT|REFUSE|ESCALATE|HALT, violated_clause?, prohibited_consequence?, causal_contribution?, evidence?, notes?} EX: [CONSCIENCE_GATE][/CONSCIENCE_GATE]"},{"key":"SHEET_SCRIPT_RUN","type":"http","category":"sheets","target":"POST https://miscsubjects.com/api/sheets/scripts/run","planner_rank":30,"docs":"WHAT: Run a sheet script (GAS equivalent) over its range and get input/output/receipts back. WHEN_TO_USE: the owner asks to run/fire a script on a sheet, or a flow step needs script output. ARGS: sheet | name (script name on that sheet) EX: [SHEET_SCRIPT_RUN]leads|scrape[/SHEET_SCRIPT_RUN]"},{"key":"LEADS_DRAFT_AI","type":"fn","category":"biz-dev","target":"leadsDraftAI","planner_rank":33,"docs":"WHAT: Grok drafts one review-only outreach email grounded in OUTREACH_DOSSIER and the business site. DOES NOT SEND. Hard-blocks unless email domain MX is verified, ICP score is at least 65, site context is sufficient, and recipient is not suppressed. WHEN_TO_USE: only after enrichment, MX verification, and ICP scoring. ARGS: $1=lead id, $2=brand (default LeoResearch). EX: [LEADS_DRAFT_AI]131|LeoResearch[/LEADS_DRAFT_AI]"},{"key":"LEADS_SEND","type":"fn","category":"biz-dev","target":"leadsSend","planner_rank":33,"docs":"WHAT: Send ONE lead's already-saved email through the owner-reviewed Marketing admin. WHEN_TO_USE: only after the owner reviewed the exact recipient, subject, and body in Admin → Marketing → Leads, approved that exact copy, and separately clicked Send. SAFETY: literal CONFIRM alone is insufficient. $4 must be a current, unexpired, single-use approval token tied to the saved recipient+subject+body hash. Editing copy invalidates approval. Terminal keys/share tokens cannot mint approval. ARGS: $1=CONFIRM, $2=lead id, $3=from local-part, $4=owner-browser exact-copy approval token."},{"key":"LEADS_SEND_BATCH","type":"fn","category":"biz-dev","target":"leadsSendBatch","planner_rank":33,"docs":"WHAT: Batch outreach sending is disabled. WHEN_TO_USE: never; use the owner-reviewed individual send path in Admin → Marketing → Leads. SAFETY: always returns batch_send_disabled and sends nothing until a campaign-level exact-copy review surface is explicitly built and approved."},{"key":"LEADS_DISCOVER","type":"fn","category":"biz-dev","target":"leadsDiscover","planner_rank":34,"docs":"WHAT: Find businesses likely to buy peptides wholesale or want white-label, by type and city. Free source (OpenStreetMap), no API key. Writes new rows to the leads table. WHEN_TO_USE: start a new outreach batch for a place. ARGS: $1 = segment (medspa | clinic | wellness | gym | supplement), $2 = city, $3 = max results (default 40). EX: [LEADS_DISCOVER]medspa|Los Angeles|40[/LEADS_DISCOVER]"},{"key":"LEADS_DISCOVER_AI","type":"fn","category":"biz-dev","target":"leadsDiscoverAI","planner_rank":34,"docs":"WHAT: SCRAPER 2 — Grok live web search finds real businesses (with verified official websites) that OpenStreetMap does not have. Inserts them as new leads, source=grok-live-search. WHEN_TO_USE: grow the pipeline in a city where LEADS_DISCOVER (OSM) returned few results, or to reach richer segments (longevity, weightloss, chiro). ARGS: $1 = segment (medspa|clinic|wellness|gym|supplement|chiro|massage|weightloss|longevity), $2 = city, $3 = count (default 20, cap 30). EX: [LEADS_DISCOVER_AI]longevity|Scottsdale|20[/LEADS_DISCOVER_AI]"},{"key":"LEADS_DRAFT","type":"fn","category":"biz-dev","target":"leadsDraft","planner_rank":34,"docs":"WHAT: Write a wholesale + white-label outreach email for one lead. Saves the draft on the lead. DOES NOT SEND. WHEN_TO_USE: after enrich, to prepare the message for the owner to approve. ARGS: $1 = lead id, $2 = which company it comes from (default miscsubjects). EX: [LEADS_DRAFT]12|miscsubjects[/LEADS_DRAFT]"},{"key":"article:verified-lead-book","type":"article","category":"articles","target":"/api/articles/verified-lead-book","planner_rank":100,"docs":"A verified lead book built to order: 950 dollars per 1,000 leads","human":"/a/verified-lead-book","edit":"/admin/articles/verified-lead-book","object":"/api/directory/article:verified-lead-book"}]}