{
  "schemaVersion": 1,
  "project": "just-every/mango",
  "release": "0.3.0",
  "provenance": {
    "kind": "publisher-release",
    "repository": "https://github.com/just-every/run-mango",
    "revision": "5fc0b9f9652e74113d3d3aa85196dcfd61e673e8",
    "tree": "da499610d08a14fe53b2e1d329173cbe7d915eb5",
    "publication": "local-release",
    "tag": "v0.3.0",
    "gates": {
      "verify": {
        "status": "PASS",
        "provider": "github",
        "repository": "just-every/run-mango",
        "commit": "5fc0b9f9652e74113d3d3aa85196dcfd61e673e8",
        "workflowId": 382943187,
        "workflowFile": ".github/workflows/verify.yml",
        "workflowName": "Verify",
        "runId": 39205847783,
        "runUrl": "https://github.com/just-every/run-mango/actions/runs/39205847783",
        "event": "push",
        "branch": "main",
        "conclusion": "success",
        "install": {
          "status": "PASS",
          "exitCode": 0,
          "tests": 0,
          "passed": 0,
          "failed": 0,
          "skipped": 0,
          "flaky": 0
        },
        "build": {
          "status": "PASS",
          "exitCode": 0,
          "tests": 0,
          "passed": 0,
          "failed": 0,
          "skipped": 0,
          "flaky": 0
        }
      },
      "publishCheck": {
        "status": "PASS",
        "findings": 0,
        "reportSha256": "b744a786fd34bcab1f0239f5eb81400be7e1ccea954607a50de68987a541772c"
      }
    },
    "note": "Local tag and export; no push, deployment or visibility change."
  },
  "listing": {
    "id": "mango",
    "name": "Mango",
    "licence": "MIT",
    "repository": "https://github.com/just-every/run-mango",
    "category": "marketing",
    "categoryLabel": "marketing",
    "version": "0.3.0",
    "oneLiner": "Grow your audience and send newsletters with reviewed content and delivery reporting.",
    "summary": "Grow your audience and send newsletters with reviewed content and delivery reporting.",
    "maturity": "newsletter-release-candidate",
    "replaces": [
      "Mailchimp",
      "Klaviyo"
    ],
    "clauses": [
      {
        "id": "HOME-001",
        "title": "Lobby and public landing",
        "text": "An installed Mango answers its sessionless root (`/`) with Base's shared Lobby (`src/base/lobby.ts`, edition identity in `src/identity.ts`): Mango's mark and name, one line about this newsletter, and one action, “Finish setup” (`/setup`) until the owner has saved the sender identity at first-run setup and “Sign in” (`/signin`) after; `GET /setup/state` answers exactly `{\"state\":\"unclaimed\"}` or `{\"state\":\"claimed\"}` from the same reading (owner decision, 12 October 2026). The landing below is the run site's homepage (`run-mango.com`, built by `rer build --site` from `src/site/pages.tsx`), where the primary action reads “Run Mango” and opens the Run page (`/run`) and no link reaches sign-in; everything else about it is unchanged. The landing is a static page for Mango's default newsletter profile, drawn in one hand-illustrated style. Its header carries Mango's mark and name with links to How it works, Docs (`/docs`) and, on an installed Mango's docs pages, the page's only link named “Sign in” (`/signin`). Its hero headline is the page's only top-level heading; directly under the lead, one line reads “100% free, open source alternative to Mailchimp and Klaviyo” with the two product names in bold and the wording unchanged (the same sentence, as plain text, ends the page's meta description, and `seed.json` `replaces` names both products), naming what Mango replaces without comparing against it; the hero offers “Start your newsletter” (`/docs/install`) and “Read the docs” (`/docs`). Sections then cover how a letter leaves Mango (collect, write, approve, schedule, deliver), consent, approval of the exact letter, scheduling, delivery reports and ownership, followed by a closing call to action; the footer repeats the section links, Docs and (on an installed Mango) operator sign-in and shows the configured deployment owner's name and one-line description. It may show the static credit `Powered by Mango · runeditrun.com` only when the owner enables it in configuration. It describes only capabilities the newsletter profile ships and contains no vendor pricing, testimonials, customer logos, ratings, metrics, cross-store claims, third-party brand logos or telemetry; sample addresses, names, counts and dates inside its drawings are pictures, never records. It reads no operator, contact or campaign record and no session, sets no cookies, is written once by the site build, serves every font, style, icon and image from the site's own origin (its drawings are inline), keeps its own fixed light palette in a dark-themed browser, and stays fully readable without scripts and with reduced motion."
      },
      {
        "id": "DOCS-001",
        "title": "Public documentation",
        "text": "The public paths `/docs` and `/docs/<slug>` serve Mango's first-party operator documentation: the Markdown files that `docs/site.json` lists as published, in the sections and order it gives, which is the only navigation, with the first page as the docs home at `/docs` (and `/docs/`). The Markdown is rendered to HTML at build time: a Vite plugin renders each page to static HTML when Vite loads it, in a build and in development, and never in the Worker or the browser. The emitted Worker and client bundles contain no Markdown or syntax-highlighting code, and each page is its own lazily loaded chunk that the Worker renders per request. A page has its title as its one top-level heading, a section sidebar listing the pages in manifest order with the current one marked, an on-this-page list of its sections, previous and next links, and a \"Contents\" disclosure for narrow screens, inside the public landing's shared header (with Docs marked as the current section) and footer, in the landing's palette, faces and paper drawings. Every Markdown file at the repository root, under `docs/` and as a top-level `<directory>/README.md` is either published or listed in the manifest as not published with a reason, and an unlisted file, a broken link or anchor, a link to a page the site does not publish, raw HTML, an image outside `docs/media/` or an absolute build-machine path fails verification or the build. The pages link to no source repository and offer no edit link. Published pages describe the default newsletter profile and contain no maintainer-only material. The documentation reads no workspace record, session or database row, sets no cookie, runs no analytics or tracking and loads only same-origin resources. An unknown, miscased or nested slug, and `/docs/index`, answer `404` with a short not-found page in the same shared header and footer that links back to `/docs` and `/`; a request for another host is answered as it is for every other path."
      },
      {
        "id": "OPER-001",
        "title": "Operators and the default role",
        "text": "Until an owner assigns roles (OPER-004), every operator holds the Admin role and can see and act on every proposal, campaign, flow, contact, and setting. First-run `/setup` requires a native session and valid business sender identity before app documents open, on both server and client navigation. Saving through the existing sender settings authority completes setup; valid existing environment identity also counts. This navigation gate does not deny authenticated configuration APIs or claim provider readiness."
      },
      {
        "id": "OPER-002",
        "title": "Management",
        "text": "Operators are invited and removed in settings. An invitation requires fresh email proof from the signed-in operator; a session without that proof cannot grant another operator access. Settings can request a confirmation link bound to the current session so the operator can confirm and retry the invitation. Confirmation GET and HEAD remain read-only; affirmative POST supplies the proof. The operator configured at setup can be removed only by themselves. *Policy: `operator.management.v1`; default: any operator may invite with fresh email proof or remove.*"
      },
      {
        "id": "OPER-003",
        "title": "Removal does not rewrite history",
        "text": "Removing an operator revokes their sessions and leaves every proposal, approval, revision, and audit entry attributed to them intact."
      },
      {
        "id": "STORE-001",
        "title": "Store and event connections",
        "text": "One or more connections (Shopify, WooCommerce, BigCommerce, Stripe, Square, Stall and the events API: INT-001 to INT-007), each made by the owner from Settings with no developer step (for Shopify, INT-015), import customers, products, variants, inventory, orders, refunds, carts, checkouts, subscriptions and browsing events through `commerce.store.v1`, retaining each source record's identifier, connection and occurrence time. Each connection declares the source types it supplies (STORE-006); a contact seen through two connections is one contact (CONT-001) with both sources' records."
      },
      {
        "id": "STORE-002",
        "title": "Source identity",
        "text": "A commerce webhook or scheduled sync carrying a source identifier already stored updates that source record; it never creates a second customer, order, cart, refund, or browsing event."
      },
      {
        "id": "STORE-003",
        "title": "Freshness",
        "text": "The Decision Desk shows, per source type, the completion time of the last successful sync and the error of any sync that has failed since it."
      },
      {
        "id": "STORE-004",
        "title": "Source failure",
        "text": "If the configured commerce adapter is unavailable, ingestion and proposal generation record a failed operation carrying the adapter's error; saved drafts and already recorded delivery outcomes remain readable and no campaign is sent as a side effect."
      },
      {
        "id": "STORE-005",
        "title": "Stale sources block approval",
        "text": "A source type is stale when its last successful sync completed more than 24 hours ago or a sync has failed since it. A proposal or campaign whose inclusion or exclusion rule reads a stale source type is labeled stale and cannot be approved until that source type syncs successfully."
      },
      {
        "id": "STORE-006",
        "title": "Declared adapter capability",
        "text": "The commerce connection declares which source types it supplies. An audience rule, exclusion, or proposal that requires a source type the connection does not supply is shown as unavailable and cannot be approved; it never resolves to an empty or partial audience."
      },
      {
        "id": "STORE-007",
        "title": "Ingestion latency",
        "text": "A source record from an accepted commerce webhook is readable in the operator app within 60 seconds of the webhook being acknowledged."
      },
      {
        "id": "CONT-001",
        "title": "Contact identity",
        "text": "Email addresses are compared case-insensitively after trimming, phone numbers are stored in E.164 form, and one canonical email address or phone number identifies at most one contact."
      },
      {
        "id": "CONT-002",
        "title": "Channel status",
        "text": "Each contact has an independent state per channel: *pending* (consent captured, confirmation outstanding), *subscribed*, *non-subscribed* (no consent evidence recorded), *unsubscribed* (opted out), or *suppressed* (blocked by CONT-006 or CONT-013). Only *subscribed* is eligible for a marketing send. Store activity or consent on one channel never changes the other channel's state."
      },
      {
        "id": "CONT-003",
        "title": "Consent evidence",
        "text": "Every subscription stores the channel, brand or legal sender, SMS sender or program where applicable, message subject or category, disclosed frequency, destination jurisdiction, capture method and source, occurrence time, consent text and version, and confirmation evidence. Consent applies only to that recorded scope and current recipient; a capture or import without the evidence creates a non-subscribed contact, except where the contact arrives subscribed from an incumbent or a connected store with the incumbent-held evidence CONT-024 defines, and a phone number reported as reassigned or no longer belonging to that recipient becomes non-subscribed until fresh evidence is captured."
      },
      {
        "id": "CONT-004",
        "title": "Opt-out precedence",
        "text": "An email unsubscribe, one-click unsubscribe, or SMS opt-out sets that channel to unsubscribed before the request is acknowledged, and excludes it from every draft, scheduled campaign, and queued recipient-step. Later imports, syncs, store events, merges, or operator edits never reverse it. During a parallel run (MOVE-013), opt-outs and suppressions the incumbent reports apply the same way, and Mango's are written back to the incumbent."
      },
      {
        "id": "CONT-005",
        "title": "Resubscription",
        "text": "A previously unsubscribed channel becomes subscribed only from new affirmative consent evidence recorded after the opt-out and confirmed per CONT-009. A suppressed channel also requires the suppression cause to be resolved. An operator edit alone cannot resubscribe either state. A person resubscribes themselves through a public form under CONT-027. During a parallel run (MOVE-013), a confirmed resubscribe is written back to the incumbent as subscribed where its API allows; otherwise it is listed in the cutover report (MOVE-006)."
      },
      {
        "id": "CONT-006",
        "title": "Email suppression",
        "text": "A hard bounce, spam complaint, or provider suppression suppresses that email address before the next hand-off to any campaign. Soft bounces are recorded and visible, and suppress the address according to the bounce policy; a later provider-confirmed delivery resets its consecutive-soft-bounce count. These facts arrive through the signed delivery webhook Mango creates when the sending provider is connected (DELIV-008); an installation whose webhook step has not passed cannot approve, so no address keeps being mailed after a bounce Mango could not see. *Policy: `contact.soft-bounce.v1`; default: suppress after three consecutive soft bounces.* - **2026-10-08 local authority clarification (CONT-004/006, OPER-001):** Refreshing local session/setup credentials while retaining D1 preserves the effective contact hash authority, including suppression and surviving opt-out records without contact rows. New local installations record a versioned independent contact salt in `.dev.vars`; missing, empty, unknown-version or unversioned authority fails closed. Explicit conversion of a verified legacy session-key installation retains its original effective session authority before rotating authentication credentials. An upgrade must never select a previously unused secret merely because it exists."
      },
      {
        "id": "CONT-007",
        "title": "SMS compliance replies",
        "text": "A signed inbound SMS webhook consumes the adapter's canonical result for that sender, program, and destination jurisdiction. STOP, STOPALL, END, QUIT, CANCEL, UNSUBSCRIBE, OPTOUT, and REVOKE always opt out; HELP and INFO request help; START and UNSTOP begin the fresh-consent flow required by CONT-005 and never subscribe by themselves. Mango records each reply once and applies an opt-out before acknowledging the webhook. It returns the configured compliance response only when the provider has not already sent the required reply."
      },
      {
        "id": "CONT-008",
        "title": "Contact history",
        "text": "A contact page shows source activity, consent changes, suppressions, campaign eligibility decisions, channel deliveries, and operator actions in time order. *Acceptance:* the native Worker/D1 contact-history journey shows those categories together at their original occurrence times, including confirmation, approved eligibility, dispatch exclusions, channel hand-offs and provider outcomes. At 1440 and 390 pixels, older events remain reachable, unrelated contacts and private payloads remain absent, and each event retains its source."
      },
      {
        "id": "CONT-009",
        "title": "Confirmation",
        "text": "Where the opt-in policy requires confirmation for a channel, a contact captured with consent on it enters *pending* and receives one confirmation message on that channel; following its opaque per-contact confirmation link sets the channel to *subscribed* and stores the confirming request's time. A pending channel receives no marketing send, and a confirmation link stops working 30 days after it is issued. Where the policy does not require confirmation, the captured consent evidence of CONT-003 sets the channel to *subscribed* directly. An operator chooses single or double opt-in per form and per source under CONT-025. *Policy: `contact.opt-in.v1`; default: confirmation is required on both channels for Mango's own forms, popups, landing pages and API captures; CONT-025 states each source's default.*"
      },
      {
        "id": "CONT-010",
        "title": "Import",
        "text": "An operator imports contacts from a CSV whose rows carry an email address or phone number and, optionally, the consent evidence CONT-003 requires. Each row is validated independently; a row matching an existing canonical identifier updates that contact rather than creating a second; re-running the same file changes nothing further. The import reports created, updated, and rejected row counts with a reason per rejected row, and never sets a channel to subscribed for a contact CONT-004 has unsubscribed. A file the owner names as an export from another platform can carry that platform's subscribed status as incumbent-held evidence (CONT-024) under the owner's once-per-source attestation; a file with no named source stays under CONT-003's per-row rule. One review holds up to the import-row floor SCALE-001 sets."
      },
      {
        "id": "CONT-011",
        "title": "Merge",
        "text": "An operator can merge two contacts. The surviving contact keeps the union of source activity, consent records, campaign history, and suppressions, and takes the most restrictive state per channel: suppressed beats unsubscribed, which beats non-subscribed, which beats pending, which beats subscribed. A merge cannot resubscribe a channel."
      },
      {
        "id": "CONT-012",
        "title": "Dormancy without deletion",
        "text": "A contact with no recorded click, order, or consent change inside the dormancy window is labeled dormant and excluded by the audience policy (AUD-003, AUD-008). Each of these counts at the time it originally happened, including clicks, orders and consent changes a move-in imports with the time the incumbent recorded (MOVE-001 to MOVE-005, MOVE-009); opens never count. A contact whose move-in carried no engagement history for them is labeled `no-history`, not dormant, and their dormancy window starts when that move-in completed, so a migrated list is never excluded as dormant for lack of history Mango was never given. A dormant contact whose only imported activity inside the window is opens is labeled `open-only` within dormant, because Apple Mail Privacy Protection and image proxies make those opens unreliable (RESULT-002). Mango never deletes, unsubscribes, or suppresses a contact for inactivity; BASE-DATA-002 stands, and clearing a dormant list is an operator action."
      },
      {
        "id": "CONT-013",
        "title": "Erasure and surviving opt-out",
        "text": "Deleting a contact removes their profile, source activity, consent evidence, message content, and delivery detail within five minutes, confirms completion, and anonymizes their actor identity in retained audit entries as BASE-DATA-003 requires. For each known unsubscribed or suppressed channel identity, including opted-out aliases, it retains an opt-out record with a one-way destination hash keyed with the installation secret, the channel, reason, and time. It also retains the `audience_portable_hashes` mapping from that local hash to the unsalted SHA-256 of `mango-audience-export-v1:` followed by the destination. Contacts CSV exports carry restrictions under this portable hash even after erasure, and complete local archives carry the retained mapping. These values contain no readable address but are not anonymous: a holder of a mapping or export can compare hashes of guessed addresses or an address dictionary without the installation secret, and the stable portable hash allows matching across installations and exports. Treat the retained mappings and exports as sensitive personal data. A later import, sync, or capture matching the local or portable identity preserves the restriction; erasure opt-outs make that channel unsubscribed. The person's own confirmed resubscribe through a public form is the one way back, and only for an unsubscribe or erasure reason, never a suppression (CONT-027). **Supersedes BASE-DATA-003 only for this opt-out dependency, including its retained portable mapping and exported hashes**; all of that baseline clause's other guarantees and all other personal-data entities remain unchanged. For subscribed identities with no surviving restriction, erasure removes all mapping aliases and retains no address-derived row tombstone. Restore uses source-wide epoch floors: any archive older than known local or supplied current matching authority is refused in full, including unaffected older archives. Nonempty legacy row journals are refused before staging. Upgrade 0044 retires legacy journals and transfers after advancing every known source floor; offline copies without current authority cannot reveal later erasure."
      },
      {
        "id": "PROP-001",
        "title": "Decision Desk",
        "text": "The Decision Desk lists proposals in the *proposed* state ordered by the proposal policy, highest-ranked first. *Policy: `proposal.selection.v1`; default: rank by expected revenue where this deployment has enough of its own attribution history (RESULT-003) to estimate it, then by the earliest send-by instant; proposals with neither rank last.*"
      },
      {
        "id": "PROP-002",
        "title": "Evidence",
        "text": "A proposal names its triggering source events, lookback window, inclusion rule, exclusion rule, source-data as-of time, send-by instant, proposed channels and step instants, and the method behind every forecast or confidence label."
      },
      {
        "id": "PROP-003",
        "title": "Counts",
        "text": "A proposal distinguishes candidates, excluded contacts, eligible contacts, and per-channel recipient-steps. No count is labeled recipients until exclusions have been applied."
      },
      {
        "id": "PROP-004",
        "title": "Content",
        "text": "A proposal contains an editable campaign name, email subject and body, SMS body when SMS is proposed, sender identity, destination links, and a preview for every selected channel."
      },
      {
        "id": "PROP-005",
        "title": "Owner control",
        "text": "A generated proposal is a draft and cannot schedule or send anything until an operator explicitly approves a particular saved revision."
      },
      {
        "id": "PROP-006",
        "title": "Grounded generation",
        "text": "AI-generated audience explanations, timing claims, and forecasts use only this deployment's imported store data and configured knowledge, supplied to `ai.provider.v1`. A generation containing a claim not derivable from that evidence is rejected and the proposal is marked failed per PROP-007; no generic marketing copy is substituted."
      },
      {
        "id": "PROP-007",
        "title": "Generation failure",
        "text": "If the configured AI adapter returns invalid output or does not complete within 60 seconds, the proposal is marked failed carrying the provider error, no semantic fallback is created, and existing proposals and campaigns are unaffected."
      },
      {
        "id": "PROP-008",
        "title": "Forecast provenance",
        "text": "Every revenue, recovery-rate, or confidence figure names the deployment's own campaigns and store events it was computed from and the number of them. Mango never presents a benchmark drawn from other stores, and where its own history is too thin to compute a figure it says so instead of showing a range."
      },
      {
        "id": "PROP-009",
        "title": "Proposal states",
        "text": "A proposal is *proposed*, *approved* (an operator approved a revision and a campaign exists), *dismissed* (an operator rejected it, with the reason recorded), *expired* (its send-by instant passed), or *failed* (PROP-007). Only a proposed proposal can be approved or dismissed, and every transition records its actor and time."
      },
      {
        "id": "AUD-001",
        "title": "Review snapshot",
        "text": "Campaign review shows the audience rule and as-of time, candidate count, each exclusion reason with its count, eligible contact count, and the recipient-step count per channel."
      },
      {
        "id": "AUD-002",
        "title": "Consent and suppression",
        "text": "Contacts whose state on a channel is pending, non-subscribed, unsubscribed, or suppressed are excluded from that channel regardless of segment membership or an operator-authored inclusion rule."
      },
      {
        "id": "AUD-003",
        "title": "Commerce and dormancy exclusions",
        "text": "Contacts excluded by the audience policy are listed in review with their reason and count. *Policy: `audience.exclusions.v1`; default: exclude a contact from a product campaign for seven days after purchasing that product, while a refund or return of it is unresolved, and while the contact is dormant under a twelve-month dormancy window (CONT-012).* AUD-008 states which inactivity rule governs a send, what counts for migrated contacts and how an operator turns the dormancy exclusion off for one campaign."
      },
      {
        "id": "AUD-004",
        "title": "Frequency protection",
        "text": "A contact inside the channel's frequency window is excluded from that step and recorded with the reason `frequency-window`, never silently deferred to a later time. *Policy: `audience.frequency.v1`; default: 24 hours since the contact's last marketing email and 72 hours since their last marketing SMS.* AUD-009 states how these windows combine with FLOW-014 caps and how an operator overrides them for one campaign, with the override recorded."
      },
      {
        "id": "AUD-005",
        "title": "Dispatch recheck",
        "text": "Eligibility is recalculated when a step's dispatch begins and again immediately before each provider hand-off, so a purchase, refund, opt-out, bounce, complaint, consent change, merge, or frequency-window change after approval prevents that delivery and is recorded as the exclusion reason. Every source type used by the audience must still satisfy STORE-005; if refresh fails or the source becomes stale, the affected channel pauses before any further hand-off and resumes only after a successful refresh."
      },
      {
        "id": "AUD-006",
        "title": "Multi-step exit",
        "text": "Each later step re-applies its audience and exclusion rules; a contact who converts or becomes ineligible after an earlier step receives no later step. *Status:* done. The two-step journey (`tests/go-live/multistep.journeys.ts`) exercises saved inclusion rules, custom exclusions and current consent after the first send, records each skip reason, and keeps newly matching contacts outside the frozen approved audience."
      },
      {
        "id": "AUD-007",
        "title": "Frozen candidate set",
        "text": "Approval freezes the candidate set resolved at that instant. A contact who first matches the inclusion rule after approval is never added to the approved campaign, and each contact yields at most one recipient-step per channel per step even when they match the rule more than once. Exclusions still apply at dispatch (AUD-005)."
      },
      {
        "id": "CAMP-001",
        "title": "States",
        "text": "A campaign is *draft* (editable, nothing scheduled), *scheduled* (an approved revision with a future step instant), *dispatching* (a step has begun handing off), *paused* (dispatch stopped by SEND-009), *completed* (SEND-007), *canceled* (CAMP-009), or *failed* (its first step could not begin before its deadline because a required adapter or sender registration was unavailable). Every transition records its actor or the feature that acted, and its time; an invalid transition is rejected."
      },
      {
        "id": "CAMP-002",
        "title": "Draft editing",
        "text": "Operators can edit and persist the campaign name, selected channels, audience rule, message content, sender identity, links, and schedule while a campaign is a draft. An email body saves whenever its sent size is within BUILD-012's limit; a larger one is refused with its measured size and the limit named, never truncated."
      },
      {
        "id": "CAMP-003",
        "title": "Revision preview",
        "text": "Desktop, mobile, and plain-text previews render from the saved revision that will be approved, including resolved personalization examples and the compliance footer or SMS opt-out text that will be sent."
      },
      {
        "id": "CAMP-004",
        "title": "Approval checks",
        "text": "Approval atomically validates the audience, consent, source freshness (STORE-005, including incumbent sync freshness during a parallel run, MOVE-013), sender registration, email authentication, sending reputation (MSG-011), compliance content, personalization, links (MSG-006, MSG-013 to MSG-015), schedule, and adapter configuration. A sender adapter must provide effective deduplication and provider reconciliation as required by SEND-001 and SEND-008. Any failure leaves the campaign a draft and names every blocking check."
      },
      {
        "id": "CAMP-005",
        "title": "Idempotent approval",
        "text": "Repeated approval requests carrying the same campaign and revision identifier produce one scheduled campaign and one set of steps and recipient-steps, whatever the number of requests."
      },
      {
        "id": "CAMP-006",
        "title": "Schedule",
        "text": "Each step stores an IANA time zone and the resolved UTC instant. A local time that does not exist or is ambiguous under daylight saving is rejected until the operator chooses an unambiguous instant. *Policy: `campaign.send-time.v1`; default: resolve every step against the store time zone and the operator-selected local time.*"
      },
      {
        "id": "CAMP-007",
        "title": "Scheduled edits",
        "text": "Editing a scheduled campaign creates a new draft revision and leaves the approved revision active until the replacement passes approval. Replacement approval atomically makes the new revision the campaign's only active schedule and cancels every pending recipient-step of the prior revision. Once any step has begun dispatching, edits can only create a new campaign; the original campaign and its later steps remain active until the operator explicitly cancels them."
      },
      {
        "id": "CAMP-008",
        "title": "Test send",
        "text": "A test sends only to the configured operator test addresses or phone numbers, or to the typed addresses CAMP-019 admits, is visibly marked as a test in its content and in campaign history, and changes no contact activity, reporting, attribution, or frequency protection."
      },
      {
        "id": "CAMP-009",
        "title": "Cancellation",
        "text": "Canceling a scheduled, dispatching, or paused campaign stops every step and every recipient-step confirmed not handed to a provider within 30 seconds, records provider-confirmed hand-offs separately, and leaves an in-flight request in `handoff-unknown` until SEND-008 reconciles it. It never claims to recall a delivered message. Campaign detail shows the time remaining until the next step dispatches."
      },
      {
        "id": "CAMP-010",
        "title": "Step deadline",
        "text": "Each step carries a send-by instant, defaulting to the end of that step's scheduled local day. Recipient-steps not handed to a provider by then are skipped and recorded as `deadline-passed`; a step whose deadline passes before dispatch begins does not send."
      },
      {
        "id": "CAMP-011",
        "title": "Dispatch punctuality",
        "text": "Dispatch of a scheduled step begins within 60 seconds of its resolved UTC instant, and each step's instant dispatches exactly once even if the scheduler runs twice."
      },
      {
        "id": "CAMP-012",
        "title": "Campaign images",
        "text": "A signed-in operator can upload a JPEG, PNG, GIF or WebP image within the byte and pixel limits in `seed.json`. Its type is read from the file's own header, never from the name or type the client declares, and the file must be complete; anything else is refused and nothing is stored. Each image is stored once under its SHA-256 and is never changed or deleted, so the bytes behind an approved revision cannot change, except that contact erasure (CONT-013) removes the bytes of an image holding an erased contact's identifier; such an image then answers 410 and blocks approval. It is served without a session at `/media/<sha256>` on this deployment with its exact content type, `X-Content-Type-Options: nosniff`, an immutable public cache and no cookie, answers 404 for an unknown name, and is rate-limited per image at the limit in `seed.json`, not per client address, returning 429 without affecting other images. Serving an image records nothing about who requested it. Every image is exported as its original file (DATA-001)."
      },
      {
        "id": "DESIGN-001",
        "title": "Optional design module",
        "text": "The design module is disabled while both `DESIGN_PROVIDER_API_KEY` and `DESIGN_PROVIDER_ORIGIN` are absent; supplying either requires both, and startup fails naming what is missing. The origin must be an HTTPS origin with no path; only a copy running on a computer may name a loopback `http:` origin. A disabled module constructs no adapter, shows no design-generation control, contacts no design service, and its routes refuse to start a run with `design_unavailable` naming the inputs. An enabled module contacts the design service only with the owner's own key and only because an operator started a design run or chose one of its candidates."
      },
      {
        "id": "DESIGN-002",
        "title": "Draft-only design generation",
        "text": "From a draft's email editor an operator can ask the design service for two to four designs from a brief that starts as the draft's name, subject, preheader, sender name and current text and that the operator may edit. An estimate of the spend on the owner's design-service account is shown before each paid step: drawing the candidates and preparing the chosen layout. The run belongs to the draft and continues in the background: candidates appear as they land and the run is shown again after a reload. The operator chooses one with **Use this design** beside its image; Mango fetches its layout and then opens the design import path (DESIGN-004), where the browser builds the email; it opens by itself only as the continuation of that choice while the operator has done nothing else in the page, and otherwise the run shows a notice whose action opens it, so nothing opens over, or takes focus from, an operator who is working: photos hosted as campaign images, the HTTPS button destination the operator enters, the managed footer, and every design line not in the brief highlighted. The result is an unsaved edit of the email body that replaces existing content only after confirmation. The run and its candidates stay on offer until the draft is saved with the design or the operator discards them, so discarding the edit, reloading, a failed layout step or starting another run never loses a design that was paid for, and using the same prepared design again buys nothing. After a failed layout step the run says which step failed and whether the design service's allowance or wallet is the cause, and offers to try the layout again (a new paid layout) or choose a different design; a new run leaves earlier runs' designs reachable under the latest run. While the design service holds a run back, the editor says why and when Mango asks again, until the service answers. A run never saves, approves, schedules or sends; the body reaches the editor already in the canonical form saving stores (CAMP-003 policy), and the operator's Save stores it through the ordinary draft save path, where it passes every approval check like any other draft. A run that fails or outlives its deadline is shown as failed with Mango's own reason and changes nothing in the draft; Mango never substitutes content of its own for a design the service did not deliver."
      },
      {
        "id": "DESIGN-003",
        "title": "Design data and records",
        "text": "A run sends the design service only Mango's fixed description of an email layout with the operator's brief, every `{{…}}` token removed, and then only the chosen candidate image: never a contact, audience, personalization value or token. Every paid request carries an idempotency key derived from the run, so a retried or replayed request never buys again. Each run records its brief, the service's run and layout identifiers, each candidate's outcome, SHA-256 and size, the chosen candidate, the operator, its times and a safe failure code, and is never deleted; the candidate images and the layout are stored in R2 as authoring evidence and exported with everything else (DATA-001). Each paid request records a cost fact (RESULT-004)."
      },
      {
        "id": "DESIGN-004",
        "title": "Design import",
        "text": "An operator editing a draft can import a design made with their own 12ui CLI: a LayerDoc version 2 file and the PNG candidate it was converted from. Mango compiles it in the operator's browser into the same email grammar every authored body uses (MSG-009, MSG-012): the photos become campaign images hosted by this deployment (CAMP-012), the design's button links to an HTTPS destination the operator enters, and its footer becomes the managed unsubscribe link and saved postal address. Layers Mango does not import are listed by their LayerDoc text, and every line of the design that does not appear in the operator's brief is highlighted for review. An unsupported version, a non-HTTPS button destination or a design the grammar cannot hold is refused visibly with the body unchanged; nothing outside the grammar is ever saved. Import only produces an unsaved edit of a draft's email body: it never saves, approves, schedules or sends, and the result passes every approval check and exact-revision approval like any other draft. Import itself makes no request to 12ui; generating designs inside Mango is DESIGN-001 to DESIGN-003."
      },
      {
        "id": "MSG-001",
        "title": "Sender identity",
        "text": "Every email uses the configured business display name, From address, reply-to address, and physical postal address; every SMS uses a sender registered for the recipient's country."
      },
      {
        "id": "MSG-002",
        "title": "Email authentication",
        "text": "A marketing email cannot be scheduled unless the mail adapter reports SPF, DKIM, and DMARC passing for the sending domain and the visible From domain aligns with an authenticated domain."
      },
      {
        "id": "MSG-003",
        "title": "Email unsubscribe",
        "text": "Every marketing email carries a visible unsubscribe link and an opaque per-recipient HTTPS `List-Unsubscribe` URL with `List-Unsubscribe-Post: List-Unsubscribe=One-Click`; DKIM covers both headers. The one-click URL accepts a context-free HTTPS POST body of `List-Unsubscribe=One-Click`, does not redirect, and applies CONT-004 before returning success. The visible link opens a page that applies CONT-004 on a single confirming action and never on page load, so a mailbox scanner or link prefetcher cannot unsubscribe anyone. Both paths are idempotent under repeats, need no session or cookie, and reveal no contact other than their own."
      },
      {
        "id": "MSG-004",
        "title": "SMS permission",
        "text": "An SMS is eligible only when its phone number is subscribed for the recorded consent scope and the SMS adapter confirms an approved sender for that recipient's country. For every permitted sender and jurisdiction, the adapter must be able to receive and enforce the standard opt-out and help keywords in CONT-007; otherwise SMS is blocked for that recipient."
      },
      {
        "id": "MSG-005",
        "title": "SMS opt-out",
        "text": "Every marketing SMS carries the configured program identity and `Reply STOP to unsubscribe`, or the jurisdiction's required equivalent, and the configured frequency disclosure where required. An opaque unsubscribe URL may be additional but never replaces reply-based opt-out. Review shows the exact compliance text and resulting segment count."
      },
      {
        "id": "MSG-006",
        "title": "Links",
        "text": "Scheduling is blocked when a destination link is malformed; uses a scheme other than HTTPS or the contact schemes MSG-013 admits (`http:`, `javascript:`, `data:`, `file:` and every other scheme block); or resolves, on the link itself or on any redirect it follows, to a host outside the allowed link hosts MSG-014 sets out. Image sources must be HTTPS on an allowed host. Review names every blocked link with the scheme or host that blocks it, and offers MSG-015's allow action for each blocked host. Approval (CAMP-004), flow activation (FLOW-008), the link inspector and tracking (RESULT-005) apply this one rule."
      },
      {
        "id": "MSG-007",
        "title": "Content checks",
        "text": "Review names blocking and advisory content findings per channel. An operator can acknowledge an advisory finding; the consent, sender registration, opt-out, authentication, link, personalization, and reputation checks are blocking and cannot be overridden."
      },
      {
        "id": "MSG-008",
        "title": "Personalization",
        "text": "Every personalization token carries a fallback value. A bare token is refused by the authoring checks and blocks approval and scheduling even when every current eligible contact resolves it, because the audience can change before send. When a contact has no value for a valid token, its saved fallback is rendered and the count of eligible contacts using a fallback is shown in review."
      },
      {
        "id": "MSG-009",
        "title": "Email body",
        "text": "Every marketing email is sent as multipart/alternative with an HTML part and a plain-text part carrying the same offer, links, and unsubscribe link, plus the preheader text set on the revision. Operator-authored HTML is saved as the WHATWG HTML parser reads it and transmitted exactly as saved within the allowed tag, attribute, and inline-style set and within the size limit BUILD-012 derives from delivery, which admits no script, form, stylesheet, class, or CSS function. The single exception is the responsive block BUILD-010 generates from builder settings: no author writes it, saving regenerates it, and the checker judges the email with and without it. One checker, reading the stored body with that parser, decides approval, test send, and delivery; the preview renders the HTML sanitized per BASE-INPUT-002 from the same parse and keeps its styles only when that checker passes, and the plain-text part is derived from the same parse."
      },
      {
        "id": "MSG-010",
        "title": "Unsubscribe availability",
        "text": "The unsubscribe path answers within 2 seconds and is rate-limited per unsubscribe token at the limit in `seed.json`, not per client IP address. The token is the rate-limit key declared for this public path under BASE-ACCESS-003, so mailbox-provider requests for unrelated recipients cannot consume one another's allowance; an exceeded token allowance returns 429 without affecting other tokens."
      },
      {
        "id": "MSG-011",
        "title": "Sending reputation",
        "text": "Once a sending domain has at least 1,000 marketing deliveries in the reporting window, scheduling a marketing email from it is blocked while provider-reported complaints divided by delivered marketing emails are at or above 0.3%, or hard bounces divided by attempted marketing hand-offs are at or above 5% (RESULT-006). A provider's stricter block applies at any volume. The block names each numerator, denominator, reporting window, and provider rule, cannot be acknowledged away, recomputes when late facts arrive, and clears only when every applicable threshold is below its limit."
      },
      {
        "id": "MSG-012",
        "title": "Hidden or deceptive presentation",
        "text": "Authored presentation cannot hide or disguise content. Approval, test send, and delivery judge the tree mail clients build from the stored body. Only table cells and the email's outer wrapper paint a background, no element changes its display, and nothing in the grammar can carry text out of the table cell that holds it, so every text run is drawn on the background of its nearest table cell that paints one, or outside any on the wrapper or the white page; they are blocked, with the reason named, when text sits below 3:1 contrast against that background (text on the wrapper also against the white page, since a block does not hold what overflows it) in standards or quirks rendering, when a style hides, clips, fades, shrinks below 10px, moves, overlays, or reverses text, when presentation stands where the grammar does not admit it (a background outside a table cell or the outer wrapper, any display, a width or height that could make a box smaller than its text, a border on an inline element, a rounded painted corner over the text it holds, right-to-left text outside a cell, overlapping styled cells), when styled markup is not written the way HTML parsers build it, or when markup is written in a way mail clients read differently from how it looks. The unsubscribe link and postal address fall under the same rule."
      },
      {
        "id": "SEND-001",
        "title": "Provider hand-off",
        "text": "Email uses `mail.sender.v1` and SMS uses `sms.sender.v1`. Every recipient-step carries a provider-effective idempotency key derived from the campaign, revision, step, and contact. Mango stores the provider message identifier before treating it as handed off. A timeout or lost response becomes `handoff-unknown` and is reconciled by provider lookup before any retry; an adapter whose deduplication retention cannot cover the campaign deadline and reconciliation window cannot pass CAMP-004. A retried job, redelivered queue message, or resumed dispatch therefore never produces a second provider message."
      },
      {
        "id": "SEND-002",
        "title": "Quiet hours",
        "text": "SMS is handed off only inside the recipient-local legal and provider-required windows. The recipient time zone is resolved from recorded location evidence with its source and freshness, never substituted with the store time zone; an unknown or stale zone blocks hand-off; the US area-code evidence SMS-003 defines counts as recorded location evidence. Legal and provider windows are mandatory minima that a policy cannot weaken. *Policy: `sms.quiet-hours.v1`; default: defer until the next allowed instant at or before the step's send-by instant (CAMP-010), otherwise skip and record `quiet-hours-deadline`.*"
      },
      {
        "id": "SEND-003",
        "title": "Throttling and progress",
        "text": "Dispatch paces hand-offs to the provider and carrier rate limits in `seed.json`. Campaign status shows the estimated completion instant and updates the handed-off, delivered, skipped, and failed counts within 30 seconds of each change."
      },
      {
        "id": "SEND-004",
        "title": "Transport failure",
        "text": "A transient provider or network failure on a recipient-step is retried up to 5 times over 1 hour with increasing delay, except that `handoff-unknown` is reconciled rather than retried. A permanent rejection or exhausted retry budget marks that recipient-step failed with the provider's error and campaign detail shows it; a hard rejection, complaint, or provider suppression also updates CONT-006 atomically before another hand-off."
      },
      {
        "id": "SEND-005",
        "title": "Provider-event identity",
        "text": "Every signed provider webhook is stored once as an immutable fact using the strongest identity that adapter declares: provider event identifier where supplied, otherwise provider message identifier, event kind, provider event time or version, and a stable payload digest. Replaying or reordering delivery, bounce, complaint, suppression, and SMS reply facts produces the same derived delivery disposition and contact state, and an older fact never downgrades a later provider disposition."
      },
      {
        "id": "SEND-006",
        "title": "Delivery truth",
        "text": "A recipient-step has a transport disposition of queued, handoff-unknown, handed-off, accepted, delivered, bounced, skipped, or failed, plus independent complaint and suppression facts. *Delivered* is recorded only from a provider fact asserting delivery; provider acceptance is never reported as delivery. A later complaint remains visible without erasing the earlier delivery fact, and a skipped disposition carries its reason."
      },
      {
        "id": "SEND-007",
        "title": "Partial completion",
        "text": "A campaign becomes completed only once every recipient-step has a terminal transport disposition; `handoff-unknown` is not terminal. Its summary keeps delivered, skipped, failed, bounced, complained, and suppressed totals separate and never sums them into a single success figure. Later complaint or suppression facts update the completed campaign's summary and the contact ledger."
      },
      {
        "id": "SEND-008",
        "title": "Resumable dispatch and reconciliation",
        "text": "Dispatch survives worker eviction, redeployment, and restart: it resumes from recipient-steps without a terminal transport disposition, sends nothing twice (SEND-001), and needs no operator action. At the reconciliation interval in `seed.json`, it queries the provider for handoff-unknown and other unresolved messages and imports missed provider facts. After the provider's declared lookup window expires, an unresolved message becomes failed with `outcome-unconfirmed`; it is never counted as delivered or retried blindly. A campaign never remains dispatching with no work or reconciliation in progress."
      },
      {
        "id": "SEND-009",
        "title": "Provider outage",
        "text": "When hand-offs to a provider fail transiently for 5 continuous minutes, or the adapter reports the provider unavailable, the affected campaign channel moves to paused and no recipient hand-offs are attempted on it. The adapter runs a bounded health probe or non-recipient canary at the reconciliation interval in `seed.json`; a successful probe resumes dispatch automatically, subject to CAMP-010 and AUD-005. The pause and provider error are shown on campaign detail, and each operator is emailed once as soon as the mail provider is available."
      },
      {
        "id": "RESULT-001",
        "title": "Campaign history",
        "text": "Operators can list campaigns by state and channel, open the approved revision, and inspect its audience snapshot, delivery timeline, cancellation, and per-channel outcome totals."
      },
      {
        "id": "RESULT-002",
        "title": "Engagement",
        "text": "Clicks and store conversions are shown as observed events. Open tracking is off by default; when an operator enables it, opens are labeled privacy-sensitive estimates and never support a confidence, deliverability, or attribution figure."
      },
      {
        "id": "RESULT-003",
        "title": "Attribution",
        "text": "Revenue attributed to a campaign names the qualifying store event and attribution window, is reported separately from any forecast, and is assigned at most once per order. *Policy: `campaign.attribution.v1`; default: the most recent non-automated tracked click in the seven days before purchase wins; a cancellation or refund subtracts the corresponding attributed amount.*"
      },
      {
        "id": "RESULT-004",
        "title": "Cost",
        "text": "Each AI call and provider hand-off records the external provider, model or channel, billable units, and reported cost; totals are visible by campaign and by day."
      },
      {
        "id": "RESULT-005",
        "title": "Link tracking",
        "text": "A tracked link is rewritten to an opaque per-recipient-step redirect on this deployment that records the request and forwards to the original URL. The redirect sets no cookie, loads nothing, and carries no address, name or contact ID in the destination URL; the only thing it adds is CONT-018's opaque, expiring click token, and only to a connected store's storefront host. Known mailbox security scanners and bot requests are retained as automated events but excluded from engagement and attribution. An operator can disable tracking per campaign, which sends the original URLs and records no clicks. Contact links (`mailto:`, `tel:`, `sms:`; MSG-013) are never rewritten and record no click."
      },
      {
        "id": "RESULT-006",
        "title": "Deliverability reporting",
        "text": "Per sending domain and SMS sender, Mango shows the delivered, bounced, complained, and failed counts and the resulting hard-bounce and spam-complaint rates over the reporting window in `seed.json`, and the rates MSG-011 is currently evaluating."
      },
      {
        "id": "DATA-001",
        "title": "Export contents",
        "text": "The export contains every contact, source record, consent record, suppression and surviving opt-out record (CONT-013), proposal, campaign, revision, audience decision, message, recipient-step outcome, attribution event, setting, and audit entry as JSON, and every uploaded campaign asset as its original file."
      },
      {
        "id": "MGMT-001",
        "title": "Signed first-owner admission",
        "text": "A claim is bound to the trusted management issuer, installation, configured app origin and owner email, expires promptly, and can initialize an installation only once. GET and HEAD never initialize it. Admission uses ordinary Base operator-auth and its native owner session. An existing installation cannot claim another first owner."
      },
      {
        "id": "MGMT-002",
        "title": "Native owner editor",
        "text": "Only an active native owner receives a short-lived editor grant. The frame loads from the exact configured management origin and trusts messages only from that frame and origin. Anonymous visitors receive no widget. Logout, authorization loss and grant expiry remove it. Compiled visual edits apply after the real route leaf has hydrated. Mango product authority follows OPER-004's six roles (Owner, Admin, Manager, Author, Analyst and Support), separately from Base's unchanged owner/admin/member roles. The last product Owner is always protected, and product authority on restore belongs to the destination installation. CSV export remains Owner/Admin only."
      }
    ],
    "clauseCount": 87,
    "nonGoals": [
      "Multiple stores or workspaces",
      "A general CRM",
      "Signup-form, landing-page, and website builders",
      "Social and advertising campaigns",
      "Store transactional messaging (order, shipping, and account notifications)",
      "Autonomous sends",
      "Visual journey automation",
      "A/B and multivariate testing",
      "Predictive send-time models",
      "Multi-touch attribution",
      "Purchased-list prospecting",
      "Native mobile apps"
    ],
    "externals": [
      {
        "name": "commerce-store",
        "reason": "Mango needs the buyer's real customers, products, carts, browsing signals, orders, refunds, and inventory to identify and recheck opportunities.",
        "required": false,
        "data": [
          "Webhook acknowledgements sent back to the store confirming receipt of an event",
          "Explicit adapter requests for source records (customers, products, orders, refunds, carts, browsing events)"
        ],
        "adapters": [
          "commerce.store.v1"
        ]
      },
      {
        "name": "ai-provider",
        "reason": "A language model turns structured evidence into reviewable campaign content and explanations; Cloudflare primitives do not provide that model capability.",
        "required": false,
        "data": [
          "The proposal evidence required for the requested generation",
          "The configured business context required for the requested generation"
        ],
        "adapters": [
          "ai.provider.v1"
        ]
      },
      {
        "name": "design-provider",
        "reason": "An image-generation design service (12ui, reached with the owner's own API key) turns an operator's brief into candidate email designs and a structured layout; Cloudflare primitives do not generate designs. It is contacted only when an operator asks for designs or chooses one, never otherwise. Privacy: No contact, audience, personalisation value or token is sent. 12ui's sub-processors are OpenAI, fal.ai, Google and Cloudflare, and 12ui may keep briefs and images in its internal evaluation corpus until the account owner asks for deletion. 12ui's generated artifacts expire after 7 days, so Mango stores the candidates and layout it uses in its own R2 bucket.",
        "required": false,
        "data": [
          "The operator's design brief, prefilled from the draft's name, subject, preheader, sender name and current text and edited by the operator, with every {{...}} personalisation or managed token removed, inside Mango's fixed description of an email layout",
          "The chosen candidate image, sent back for layout conversion",
          "The owner's design-service API key, as bearer authentication"
        ],
        "adapters": [
          "design.provider.v1"
        ]
      },
      {
        "name": "mail-sender",
        "reason": "Internet email delivery, domain authentication, bounce handling, and complaint feedback require a delivery provider with established sending infrastructure. Managed hosting explicitly selects RER for transactional sign-in and subscription confirmations; Free and Assisted hosting retain their own-provider connections.",
        "required": true,
        "data": [
          "Approved email content",
          "Sender metadata for direct providers; the RER relay chooses its own sending identity.",
          "Each eligible recipient's email address",
          "Operator email addresses that receive magic links, test sends, and dispatch-paused notices",
          "Diagnostic sender-verification message and configured receipt mailbox; provider message IDs and sender-domain names for delivery reconciliation and authentication queries",
          "With MAIL_PROVIDER=rer, only one recipient address, subject, text and optional HTML go to the RER-assigned HTTPS MAIL_RELAY_URL, authenticated by the server-only MAIL_API_KEY. Active Managed access and a valid credential are required."
        ],
        "adapters": [
          "mail.sender.v1"
        ]
      },
      {
        "name": "sms-sender",
        "reason": "Registered sending numbers, carrier routing, country approval, compliance keywords, and delivery receipts require a telecommunications provider.",
        "required": false,
        "data": [
          "Approved SMS content",
          "Programme metadata",
          "Each eligible recipient's phone number"
        ],
        "adapters": [
          "sms.sender.v1"
        ]
      },
      {
        "name": "link-dns-resolver",
        "reason": "A public DNS-over-HTTPS resolver verifies that each approved external link, image and redirect target resolves outside private networks before dispatch. Images this deployment stores itself at /media/ are verified in its own storage and never resolved or fetched.",
        "required": true,
        "data": [
          "Approved link host names only"
        ],
        "adapters": [
          "platform.link-inspector.v1"
        ]
      },
      {
        "name": "signup-turnstile",
        "reason": "Optional abuse prevention on hosted and embedded signup. Only a trusted pointer or keyboard interaction with the form loads the browser challenge. The server verifies the token before accepting consent.",
        "required": false,
        "data": [
          "After interaction, browser requests https://challenges.cloudflare.com/turnstile/v0/api.js and its challenge frames, disclosing the public site key, visitor IP and browser challenge signals to Cloudflare.",
          "Server POST to https://challenges.cloudflare.com/turnstile/v0/siteverify sends the challenge token, visitor IP and TURNSTILE_SECRET_KEY; acceptance requires newsletter-signup action and the configured public hostname. No email address or consent evidence is sent to Cloudflare."
        ],
        "adapters": [
          "platform.signup-challenge.v1"
        ]
      },
      {
        "name": "sender-dns-resolver",
        "reason": "Cloudflare DNS-over-HTTPS verifies sender domain authentication records before dispatch.",
        "required": true,
        "data": [
          "Sender domain and DKIM/SPF/DMARC record names queried at https://cloudflare-dns.com/dns-query; no recipients or message bodies."
        ],
        "adapters": [
          "platform.sender-verification.v1"
        ]
      },
      {
        "name": "approved-content-destinations",
        "reason": "Dispatch preflight checks explicitly approved external links and images, including each allowed redirect, for reachability after DNS safety checks.",
        "required": true,
        "data": [
          "Full approved destination URLs including paths and query parameters sent as HEAD requests to configured allowed hosts. No operator cookie or provider credential is attached. Deployment-hosted /media/ images use local storage instead."
        ],
        "adapters": [
          "platform.link-inspector.v1"
        ]
      },
      {
        "name": "owner-editor",
        "reason": "An authenticated owner can open the configured Run Edit Run editor and explicitly share page context for requested visual edits.",
        "required": false,
        "data": [
          "The configured management origin receives installation identifier and application origin in the editor iframe URL after the owner opens it.",
          "The origin-checked protocol sends page path, editor visibility and edit results. Only while context sharing is enabled, it additionally sends page title, bounded visible DOM text and selected element metadata (excluding input values and private-marked elements)."
        ],
        "adapters": [
          "base.editor.v1"
        ]
      },
      {
        "name": "sender-receipt-receiver",
        "reason": "An installer-selected authenticated receipt service supplies original diagnostic email and trusted authentication observations before marketing sending is enabled. The optional paired MAILBOX_RECEIPT_URL and MAILBOX_RECEIPT_RECIPIENT inputs select its HTTPS origin, secret URL token and diagnostic mailbox; redirects and off-origin responses are refused.",
        "required": false,
        "data": [
          "Authenticated GET requests carry the server-only receipt URL token, diagnostic recipient address, challenge nonce and sent-at timestamp to find the diagnostic email.",
          "The matching receipt ID is sent to the same origin to retrieve original diagnostic message bytes; no audience contacts or campaign content are sent by this lookup."
        ],
        "adapters": [
          "sender-verification.receiver.v1"
        ]
      }
    ],
    "extensionPoints": [
      "operator.management.v1",
      "contact.opt-in.v1",
      "contact.soft-bounce.v1",
      "proposal.selection.v1",
      "audience.exclusions.v1",
      "audience.frequency.v1",
      "campaign.send-time.v1",
      "sms.quiet-hours.v1",
      "campaign.attribution.v1",
      "store.event-recorded.v1",
      "contact.consent-recorded.v1",
      "contact.channel-suppressed.v1",
      "contact.merged.v1",
      "proposal.created.v1",
      "proposal.failed.v1",
      "campaign.scheduled.v1",
      "campaign.dispatch-paused.v1",
      "campaign.cancelled.v1",
      "campaign.completed.v1",
      "delivery.outcome-recorded.v1",
      "app.navigation.after.v1",
      "decision-desk.header.after.v1",
      "proposal.evidence.after.v1",
      "proposal.actions.before.v1",
      "campaign.review.summary.after.v1",
      "campaign.review.audience.after.v1",
      "campaign.review.safety.after.v1",
      "campaign.detail.tabs.after.v1",
      "contact.detail.tabs.after.v1",
      "settings.sections.after.v1",
      "commerce.store.v1",
      "ai.provider.v1",
      "design.provider.v1",
      "mail.sender.v1",
      "sms.sender.v1",
      "platform.link-inspector.v1",
      "routes.v1",
      "pages.v1",
      "navigation.v1",
      "settings.sections.v1",
      "jobs.v1",
      "cron.v1",
      "queue.consumers.v1"
    ],
    "shots": [],
    "landing": null,
    "hasReadme": true,
    "hasBaseline": true,
    "manifestFile": "seed.json",
    "scope": "One self-hosted newsletter and its role-controlled operators. Mail is required; commerce, SMS, AI and email design are optional. Wider commerce and multichannel contract clauses remain release obligations.",
    "spine": {
      "id": "marketing",
      "record": "campaign over an audience"
    },
    "operatingCost": {
      "assumptions": "One store, 10000 contacts, 4 campaigns per month, 20000 email and 5000 SMS recipient-steps, and 500 AI generations. Queue messages are at most 64 KB and dispatch stays below 3334 recipient-steps per UTC day. Every campaign image fetched from an inbox is one Worker request and one D1 row write for its per-image rate counter; at 4 images per email, 20000 email recipient-steps add up to 80000 of each per month, concentrated on send days, and they count toward the same daily Free quotas as everything else. Each design run with the optional design module is one Worker request to start it, about 5 to 15 Queue messages while it polls (three operations each), one R2 write per candidate image and one for the layout, and a few D1 rows; 12ui itself bills the owner's own account at about $0.03 per candidate and $0.05 per layout at its 12 October 2026 list prices, free within its daily allowance of 20 images and 50 layouts.",
      "cloudflareMonthlyUsd": "$0 on the current Workers Free plan while the deployment stays inside every Free quota: at most 100000 dynamic Worker requests per UTC day with 10 ms CPU per invocation; 10000 Queue operations per UTC day (write, read, and delete are each one operation per 64 KB); D1 at 5 million rows read per UTC day, 100000 rows written per UTC day, and 5 GB total storage; and SQLite Durable Objects at 100000 requests and 13000 GB-s per UTC day. Workers Paid starts at $5/month and is required for the declared 100000-contact campaign: its 100000 recipient-step writes plus step and schedule mutations exceed D1 Free's 100000 rows-written-per-UTC-day limit.",
      "externalMonthlyUsd": "Not yet estimated because the reference commerce, email, SMS, and AI adapters have not been selected; required before first release.",
      "totalMonthlyUsd": "Incomplete until reference adapters and unit prices are selected.",
      "status": "cloudflare-free-plan-assumptions-researched-2026-08-31; external-adapters-unselected"
    },
    "limits": {
      "status": "estimated-until-load-tested",
      "maxContacts": 100000,
      "maxStoredCommerceEvents": 5000000,
      "maxContactImportRows": 50000,
      "maxCampaignSteps": 10,
      "maxEligibleContactsPerCampaign": 100000,
      "maxCampaignAssetBytes": 10485760,
      "allowedCampaignAssetContentTypes": [
        "image/jpeg",
        "image/png",
        "image/gif",
        "image/webp"
      ],
      "maxCampaignAssetPixelsPerSide": 4096,
      "maxEmailHtmlBytes": 102400,
      "maxSmsSegmentsPerRecipientStep": 3,
      "emailHandoffsPerMinute": 3000,
      "smsHandoffsPerMinute": 600,
      "deliverabilityReportingWindowDays": 30,
      "operatorRequestsPerMinute": 300,
      "publicRequestsPerMinutePerIp": 60,
      "unsubscribeRequestsPerMinutePerToken": 10,
      "mediaRequestsPerMinutePerAsset": 6000,
      "providerWebhooksPerMinute": 5000,
      "providerReconciliationIntervalMinutes": 15,
      "unresolvedProviderOutcomeHours": 1,
      "maxTestSendsPerDay": 100
    },
    "accessibility": {
      "level": "WCAG 2.2 AA",
      "status": "target-not-yet-verified"
    }
  },
  "artifacts": [
    {
      "path": "documents/seed.json",
      "target": "agents/seeds/mango/seed.json",
      "sha256": "c7e25dd4f5d5122768f1f7ccfaeabb9cb8d530f63df0240a0a062019a47527f2"
    },
    {
      "path": "documents/CONTRACT.md",
      "target": "agents/seeds/mango/CONTRACT.md",
      "sha256": "4cc6965a76651e6d42f70aeff87d4fecde1a283424b1e1593bfc0cd01105442c"
    },
    {
      "path": "documents/AGENTS.md",
      "target": "agents/seeds/mango/AGENTS.md",
      "sha256": "70c850675abbc19f37928854b855f77e5cf847bd457a205ce13b2eddd18ad4da"
    },
    {
      "path": "documents/LICENSE",
      "target": "agents/seeds/mango/LICENSE",
      "sha256": "2f5076ef027045b9e0e72df8aa61ca8551e54b1877d531656d6e7985b2c32324"
    },
    {
      "path": "documents/RELEASE.json",
      "target": "agents/seeds/mango/RELEASE.json",
      "sha256": "7f96385e6c2c2ea91422703b9cbb59e339fad810b6676c6c94efb3a78a8ce427"
    },
    {
      "path": "documents/README.md",
      "target": "agents/seeds/mango/README.md",
      "sha256": "8d74fdc2e9d312bff9dd2480ca2867ccda5ca5e074e584f997cd6c73e8fa3484"
    },
    {
      "path": "documents/BASELINE.md",
      "target": "agents/seeds/mango/BASELINE.md",
      "sha256": "fd937425932d01516ae3c9df672eb8273a6c30b90df453d02f3df1715010a206"
    },
    {
      "path": "documents/OPERATIONS.md",
      "target": "agents/seeds/mango/OPERATIONS.md",
      "sha256": "8a2e90627f5f2e734dda77f0265182c624c602edfcbf8589512f2b487832bad2"
    },
    {
      "path": "documents/ACCEPTANCE.md",
      "target": "agents/seeds/mango/ACCEPTANCE.md",
      "sha256": "b4aa3c459f1636e573560edaf21c6805a02bdbd17f1237c789b0b9bbd619e837"
    }
  ]
}
