Primitive spec

Magnifico

The marketing primitive. Magnifico defines audiences, runs campaigns through them, and tracks attribution and conversion — on top of Speaker dispatch, Terminus consent, and Daneel workflow steps. Marketing belongs in its own primitive, not buried in feature code.

Status: Phase 1. Entities (Audience, Campaign, CampaignRun, CampaignAttribution, Conversion), services (AudienceEvaluator, CampaignRunner, MarketingTenantSeed), Daneel step handlers, and the audience + campaign HTTP controllers ship. Channel coverage expands as Speaker drivers do.

What it owns

Magnifico owns the "marketing campaign" abstraction. An Audience is a queryable set of Terminus people; a Campaign is a goal-typed flow of steps targeting an audience; a CampaignRun is one execution; attribution and conversion records tie outbound messages back to the business events they drove.

Magnifico does not own dispatch (that is Speaker, including the consent gate), workflow execution (that is Daneel — Magnifico steps are Daneel step handlers), or audience identity (that is Terminus). It composes them.

Concepts

Audience
A queryable set of Terminus people defined by a predicate (tier membership, recent activity, tag, segment, …). The AudienceEvaluator resolves the membership at run time; audiences can be materialised or computed-on-demand.
Campaign
A named flow with a goalType (acquisition, retention, reactivation, transactional …), a status, a target audience, and an ordered series of steps. Each step is a Daneel step handler (send via Speaker, wait, branch on a condition, …) so the same workflow substrate runs both operational and marketing flows.
CampaignRun
One execution instance of a Campaign. Tracks status (queued, running, completed, failed) and per-recipient delivery progress. Multiple runs per campaign are normal — weekly newsletters, drip sequences, retried sends.
CampaignAttribution
The link from an outbound Magnifico message to the recipient and the campaign it came from. A click, an open, a follow-through — everything that flows back gets stamped with the campaign that triggered it.
Conversion
A record of a business event attributed to a campaign. "Booking confirmed within 7 days of campaign X reaching this Person." Conversion definitions live in the campaign goal; the matcher resolves them against the audit outbox.
MagnificoChannel
The delivery channel selector for a step — email, sms, push, webhook. Resolves to a Speaker dispatch with the message class derived from the campaign's goalType, so consent is correctly scoped (marketing vs transactional).

API surface

Endpoints are versioned under /magnifico/v1/. The audience + campaign surfaces ship; conversion-definition CRUD and rich reporting come in subsequent slices.

Magnifico endpoints in the Foundation API reference OpenAPI 3.1 schema for Magnifico with request/response shapes, parameters, and a try-it client.

Quick reference

MethodPathPurpose
POST / GET/magnifico/v1/audiencesDefine or list Audiences.
GET/magnifico/v1/audiences/{id}/membersResolve current audience membership via the evaluator.
POST / GET/magnifico/v1/campaignsDefine or list Campaigns.
POST/magnifico/v1/campaigns/{id}/runsTrigger a CampaignRun against the current audience snapshot.
GET/magnifico/v1/runs/{id}Inspect a run's status and per-recipient delivery progress.
GET/magnifico/v1/attributions?personId=&campaignId=Query attribution events for a recipient or campaign.
GET/magnifico/v1/conversions?campaignId=&from=&to=Conversion records attributed to a campaign in a window.

How it fits with the rest

flowchart LR
  Op[Operator / AI agent] --> Mg(Magnifico)
  Mg -- audience predicate --> Te[Terminus]
  Mg -- steps via --> D[Daneel]
  D -- dispatch step --> Sp[Speaker]
  Sp -- consent gate --> Te
  Sp --> Recip[Recipient]
  Recip -- conversion event --> OB[(Audit outbox)]
  OB --> Mg
            

Terminus resolves audience membership and gates consent on every send. Daneel runs the campaign steps via the same DAG engine that drives operational workflows. Speaker dispatches the actual outbound, with marketing-scope consent enforced. Conversion matching reads from the same audit outbox Pelorat reports off and Palver streams from — one source of truth, many consumers.