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 message sent to 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 — a Daneel step handler can run a campaign), 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 message with a goalType (revenue, conversions or signups), a status, a target audience, one channel, and one subject + body template. A campaign is a single send, not a sequence; a Daneel workflow can run one as a step (RunCampaignHandler), so multi-step flows are built in Daneel.
CampaignRun
One execution instance of a Campaign. Tracks status (pending, running, succeeded, failed, partial). Multiple runs per campaign are normal — a weekly newsletter, a retried send.
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 for a campaign. Today it is email only, dispatched through Speaker under marketing-scope consent.

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 / PATCH / DELETE/magnifico/v1/audiences/{id}Read, update or remove an Audience.
POST / GET/magnifico/v1/campaignsDefine or list Campaigns.
GET / PATCH / DELETE/magnifico/v1/campaigns/{id}Read, update or remove a Campaign.
POST/magnifico/v1/campaigns/{id}/runTrigger a CampaignRun against the current audience.
GET/magnifico/v1/campaigns/{id}/runsList a campaign's runs and their status.
GET/magnifico/v1/campaigns/{id}/conversionsConversion records attributed to a campaign.
POST / GET / PATCH / DELETE/magnifico/v1/promo-codes[/{id}]Manage promo codes.

How it fits with the rest

flowchart LR
  Op[Operator / AI agent] --> Mg(Magnifico)
  Mg -- audience predicate --> Te[Terminus]
  D[Daneel] -- run campaign step --> Mg
  Mg -- dispatch --> 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 can run a campaign as a step in 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.