Skip to content

refactor(personas): collapse 6→2 — revenue-operations + insights - #15

Merged
sebtsang merged 1 commit into
test/persona-e2e-harnessfrom
refactor/merge-revops-insights-personas
May 10, 2026
Merged

sebtsang merged 1 commit into
test/persona-e2e-harnessfrom
refactor/merge-revops-insights-personas

Conversation

@sebtsang

Copy link
Copy Markdown
Owner

Summary

Collapses 6 specialists into 2 composite synthesizers. 9 personas total now (down from 13). Each merged persona emits a single envelope covering all the sub-responsibilities its predecessors handled separately.

Was Is now
crm-logger + pipeline-reporter + slack-digest revenue-operations
feedback-tagger + theme-synthesizer + linear-filer insights

Dashboard's post-approval handler still does the actual external dispatch (HubSpot / Slack / Notion / Linear / GitHub). The merge is at the LLM layer — one prompt, one approval surface, one output schema per merged persona.

Built on top of PR #14 (test harness branch) so the harness regression check covers the new persona shape.

Output schemas

revenue-operations:

  • crmUpdates: Array<{ leadId, crmContactId, action, note? }> — per-lead CRM rows
  • summary: string — 3-5 sentence pipeline punchline
  • metrics: Record<string, number> — leadsProcessed, hot, warm, …
  • slack: { channel, messageTs, summaryBlocks[] } — digest payload

insights:

  • taggedFeedback: Array<{ feedbackId, themes[], sentiment }>
  • themes: Array<{ label, count, representativeQuote, suggestedAction }>
  • notionPageUrl — sentinel the dashboard rewrites at sync time
  • issuesToFile: Array<{ issueId, issueUrl, title, description?, labels[] }>

Test plan

  • pnpm typecheck clean
  • pnpm tsx scripts/_test-personas.ts — 9/9 pass in 182s
  • revenue-operations produces non-empty crmUpdates + slack from upstream sales fanout
  • insights produces 5 tagged rows / 4 themes / 2 file-issue rows from a 5-item feedback batch

Pass matrix

Persona Time Output
researcher 10.6s EnrichedLead from fetchBundle
qualifier 30.8s tier=cold fit=20 intent=25
strategist 9.9s cta=demo_video
writer 42.5s drafts subject+body
scheduler 4.6s meeting +5 days
brief-writer 36.5s 5 talking points + Notion sentinel
activation 8.3s email channel, ≤60-char subject
revenue-operations 21.3s crmUpdates=1, slack=#gtm, summary
insights 17.5s tagged=5, themes=4, issues=2

Touch points

🤖 Generated with Claude Code

Merges three RevOps specialists (crm-logger / pipeline-reporter /
slack-digest) into one `revenue-operations` synth that emits a
composite envelope: per-lead CRM updates + pipeline summary + Slack
digest. Same for the three Insight specialists (feedback-tagger /
theme-synthesizer / linear-filer) → one `insights` synth that emits
tagged feedback + themes + issues to file in one envelope.

Total persona count: 13 → 9 specialists. Each merged persona has one
prompt, one approval surface, and one output schema; the dashboard's
post-approval handler still does the actual external dispatch
(HubSpot / Slack / Notion / Linear / GitHub).

Touch points: PersonaId union (types.ts, schemas.ts), registry config
+ composite Zod schemas, scopes, persona-meta (labels/icons/order/
roles), revops + insight managers (now delegate to a single
specialist), conductor enum, workflows approval rules, mocks +
mock-driver, CLAUDE.md roster, test-persona route allowlist.

Test harness rewritten to invoke the two merged personas with realistic
synthetic input. 9/9 personas pass end-to-end in 182s, with insights
producing 5 tagged rows / 4 themes / 2 file-issue actions and
revenue-operations producing crmUpdates + slack envelope from
upstream sales fanout.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@sebtsang
sebtsang merged commit 5e1c3f4 into test/persona-e2e-harness May 10, 2026
sebtsang added a commit that referenced this pull request May 10, 2026
User rolled back the 13→9 collapse. Restores the original specialist
roster: crm-logger, pipeline-reporter, slack-digest (RevOps) and
feedback-tagger, theme-synthesizer, linear-filer (Insight). Their
Pattern B prompt rewrites (committed in 4beed79 / PR #14) remain
in place — only the consolidation is reverted.

This reverts merge commit 5e1c3f4 (PR #15).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
sebtsang added a commit that referenced this pull request May 10, 2026
* test(personas): e2e harness + pure-LLM rewrites for 9 personas

Adds scripts/_test-personas.ts harness that drives all 13 personas
end-to-end through a dev-only POST /api/test-persona endpoint. Inserts
a parent workflow_runs row for FK satisfaction, builds synthetic
previousOutputs chains per persona, reports timing + 1-line preview,
exits non-zero on any failure. 13/13 passing.

Rewrites these prompts as pure-LLM Pattern B synthesizers (post-approval
dispatch lives in the dashboard handler, not the LLM loop): activation,
brief-writer, crm-logger, feedback-tagger, linear-filer, pipeline-reporter,
scheduler, slack-digest, theme-synthesizer. Each emits structured JSON
matching its Zod schema with sentinel URLs/IDs the dashboard rewrites.

scopes.ts: empties Composio scopes for the 9 rewritten personas (they're
no longer tool-coupled). Strategist: removes "nurture" from CTA enum to
match CallToActionSchema (book_call | free_trial | demo_video).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* refactor(personas): collapse 6→2 — revenue-operations + insights

Merges three RevOps specialists (crm-logger / pipeline-reporter /
slack-digest) into one `revenue-operations` synth that emits a
composite envelope: per-lead CRM updates + pipeline summary + Slack
digest. Same for the three Insight specialists (feedback-tagger /
theme-synthesizer / linear-filer) → one `insights` synth that emits
tagged feedback + themes + issues to file in one envelope.

Total persona count: 13 → 9 specialists. Each merged persona has one
prompt, one approval surface, and one output schema; the dashboard's
post-approval handler still does the actual external dispatch
(HubSpot / Slack / Notion / Linear / GitHub).

Touch points: PersonaId union (types.ts, schemas.ts), registry config
+ composite Zod schemas, scopes, persona-meta (labels/icons/order/
roles), revops + insight managers (now delegate to a single
specialist), conductor enum, workflows approval rules, mocks +
mock-driver, CLAUDE.md roster, test-persona route allowlist.

Test harness rewritten to invoke the two merged personas with realistic
synthetic input. 9/9 personas pass end-to-end in 182s, with insights
producing 5 tagged rows / 4 themes / 2 file-issue actions and
revenue-operations producing crmUpdates + slack envelope from
upstream sales fanout.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* revert: roll back PR #15 consolidation — return to 13 personas

User rolled back the 13→9 collapse. Restores the original specialist
roster: crm-logger, pipeline-reporter, slack-digest (RevOps) and
feedback-tagger, theme-synthesizer, linear-filer (Insight). Their
Pattern B prompt rewrites (committed in 4beed79 / PR #14) remain
in place — only the consolidation is reverted.

This reverts merge commit 5e1c3f4 (PR #15).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.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.

1 participant