Skip to content

leadership-report: split PQL/PEL into OSS / API / Studio buckets and add Enterprise Dashboard link#60

Merged
Assaf Hay Eden (AssafHayEden) merged 1 commit into
aheden/tldr-ban-active-orgs-ratiofrom
dbeer/20260507-leadership-report-leads-regroup-and-dashboards
May 7, 2026
Merged

leadership-report: split PQL/PEL into OSS / API / Studio buckets and add Enterprise Dashboard link#60
Assaf Hay Eden (AssafHayEden) merged 1 commit into
aheden/tldr-ban-active-orgs-ratiofrom
dbeer/20260507-leadership-report-leads-regroup-and-dashboards

Conversation

@DanielB945
Copy link
Copy Markdown
Collaborator

Summary

Restructures the leadership weekly Slack post so each lead is counted exactly once across the three sections, and surfaces the Hex Enterprise Dashboard as a deep-link from the Studio Enterprise section.

Bucketing rule (locked):

Section PQLs PELs
Open Source (none — no PQL flow) OSS bucket only (no product flag)
API API + Both buckets (sum) API + Both buckets (sum)
Studio Enterprise Studio bucket only Studio bucket only

Sample reconciliation on the week of Apr 27 → May 3, 2026:

  • OSS PEL = 388 + API PEL (API+Both) = 51 + Studio PEL = 294733 total = lead-level table count (matches).

What changed

  • queries/weekly_report_combined.sql — new marketing_pels_by_product CTE on marketing.final_sf_lead_opportunity (lead-level, deduped via qualify) classifies PELs as API / Studio / Both / OSS via ltx_api / ltx_studio flags. Surfaced as J_studio_summary.wow_trends.pels_by_product. Dry-run cost: 545 MB (was 537 MB).
  • n8n/render_body.js — drives bucketing off pqls_by_product and pels_by_product via two new helpers (findByProduct, sumByProduct). Block G (G_pql_pel) is still emitted by the SQL but no longer rendered so all three sections share one source of truth. Adds a STUDIO_DASHBOARDS constant containing the Enterprise Dashboard URL — the line is omitted when the array is empty.
  • references/report-template.md — refreshed sample output, added the bucketing rules table, documented the STUDIO_DASHBOARDS knob.
  • SKILL.md — updated section descriptions, added two new knobs (Lead bucketing, Studio dashboards), added new source table, added drill-through link, bumped scan budget.
  • n8n/tldr_system_prompt.md — extends the PEL-skip rule to all three PEL lines (OSS especially noisy from product-flag tagging gaps), so the LLM never headlines PEL swings. Reference TL;DR untouched (it doesn't reference lead counts).

Verified rendered output

```
Open Source
• LTX 2 family: 699,156 downloads (↓59.7% WoW)
• LTX 2.3 official repo: 402,147 downloads (↓7.4%) · +39 likes (↓22%)
• Community feedback categories: not available this week
• Leads: 388 PELs (↑7660%)

API
• Total revenue: $55,565 (↑7.4% WoW)
Resellers: $40,094 (↑21.3%) · Contracts: $10,679 (↓7.9%) · Self-serve: $4,792 (↓32.4%)
• Top request type: Image-to-Video (131K requests, 67.8% of volume)
• Self-serve: 3,389 new signups (↓11.8%) · new paying users ↓24.4% · visitors ↓9.6%
• Leads: 44 PQLs (↓35.3%) · 51 PELs (↓3.8%)

Studio Enterprise
• Active orgs: 15/18 (Bosch, Indegene, Meta inactive) · Newell signed as new contract
• Total tokens: 7.97M (↑4.5% WoW)

Pilots (10 active)

• Leads: 13 PQLs (↓43.5%) · 294 PELs (↓4.5%)
• Dashboards: <https://app.hex.tech/…/Enterprise-Dashboard-…|Enterprise Dashboard>
```

Test plan

  • bq --dry_run on the n8n SQL (passes, 545 MB)
  • Full BigQuery run returns all 10 sections with pels_by_product populated (4 buckets: API / Studio / Both / OSS)
  • Local Node harness runs parse_sections.jsrender_body.js against real BigQuery output and produces the expected Slack body
  • PEL totals reconcile to lead-level table count (388 + 51 + 294 = 733)
  • Manual Monday run via n8n once merged

Notes for the reviewer

  • Stacked on tldr prompt: ban active-orgs ratio in weekly report TL;DR #58 (aheden/tldr-ban-active-orgs-ratio). Once that merges, GitHub will auto-retarget this PR to main.
  • Block G (G_pql_pel) is intentionally still emitted by the SQL but no longer rendered — see the comment in render_body.js. Easy to remove in a follow-up if we want a smaller SQL surface.
  • The OSS PEL number for this sample week (388, +7660% WoW) is real but suspect: 306 of those landed on a single day (2026-04-29) all with leadsource = 'Inbound - PQL' and no product flag set. Likely a tagging gap or bulk import worth flagging to marketing separately. The TL;DR prompt already treats all PEL moves as noise so it won't be headlined.

Made with Cursor

…add Enterprise Dashboard link

Restructures the weekly leadership Slack post so each lead is counted exactly
once across the three sections, and surfaces the Hex Enterprise Dashboard as
a deep-link from the Studio Enterprise section.

Bucketing rule (locked):
  OSS    = OSS PEL only (no PQL flow)
  API    = (API + Both) PQL and (API + Both) PEL
  Studio = Studio-only PQL and Studio-only PEL

SQL: new marketing_pels_by_product CTE on marketing.final_sf_lead_opportunity
  (lead-level, deduped) classifies PELs as API / Studio / Both / OSS via the
  ltx_api / ltx_studio flags. Surfaced as J_studio_summary.wow_trends.pels_by_product.
  Dry-run cost: 545 MB (was 537 MB).

render_body.js: drives the new bucketing off pqls_by_product and pels_by_product.
  The legacy Block G (G_pql_pel) is still emitted by the SQL but no longer
  rendered so all three sections share one source of truth. Adds a
  STUDIO_DASHBOARDS array with the Hex Enterprise Dashboard URL; the line is
  omitted when the array is empty.

tldr_system_prompt.md: extends the PEL-skip rule to all three PEL lines and
  calls out the OSS PEL bucket as especially noisy (sensitive to product-flag
  tagging gaps), so the LLM does not headline OSS PEL swings.

Verified end-to-end: PEL totals reconcile (388 OSS + 51 API+Both + 294 Studio
= 733, matches the lead-level table).

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants