{
  "$schema": "https://nohmitaina.com/schemas/procedure-workflow/3.0.json",
  "applicability": {
    "description": "Use this portable template to turn a bounded set of newsletter messages into a source-grounded private-audio episode in the user's configured language. It preserves access restrictions, explicit research sufficiency decisions, duplicate prevention, script and audio quality gates, and private-delivery boundaries while requiring each user to supply their own mailbox, source, schedule, editorial, TTS, budget, and output settings.",
    "tags": [
      "newsletter",
      "editorial-selection",
      "research",
      "private-audio",
      "portable-template",
      "private-delivery",
      "draft"
    ]
  },
  "boxes": [
    {
      "checklist": [
        "Run type and edition policy are explicit",
        "Capture interval is expressed in <your-timezone> with inclusive start and exclusive end",
        "Allowed senders, labels, and mailbox are configuration inputs rather than embedded personal data",
        "The connected mail identity exactly matches the configured mailbox account",
        "A different connected inbox is never used as an automatic substitute",
        "Edition schedule, topic policy, carry-forward policy, and deduplication horizon are explicitly configured",
        "Target story count and duration are goals rather than minimum-fill requirements",
        "Unresolved delivery times remain unresolved",
        "Every external read, paid call, file write, schedule, and publication action is separately authorized"
      ],
      "id": "set-run-envelope",
      "inputs": [
        "<your-email> mailbox_account reference",
        "<your-timezone> and <edition-schedule>",
        "<source-allowlist> and <label-policy>",
        "<target-language>, <topic-policy>, <target-story-count>",
        "<target-duration> and <max-duration>",
        "<program-title>, <intro-template>, <outro-or-house-message>",
        "<tts-provider>, <tts-model>, <tts-voice>, <audio-format>, <tts-api-key-env-name>",
        "<per-run-budget> and <private-output-path>",
        "approved agent, research, TTS, and private-delivery adapters"
      ],
      "instructions": "Before a run, replace every angle-bracket placeholder with the importing user's own approved setting. At minimum configure <your-email>, <your-timezone>, <edition-schedule>, <source-allowlist>, <label-policy>, <target-language>, <topic-policy>, <target-story-count>, <target-duration>, <max-duration>, <deduplication-horizon>, <program-title>, <intro-template>, <outro-or-house-message>, <tts-provider>, <tts-model>, <tts-voice>, <audio-format>, <tts-api-key-env-name>, <per-run-budget>, and <private-output-path>. Treat story count and target duration as goals, never minimum-fill requirements. Keep editorial classification and carry-forward rules at article level, diversify sources when configured, and count intro and outro toward duration. Do not embed secret values: <tts-api-key-env-name> names an environment variable whose value remains outside the Procedure and files. This template carries no subscription, mailbox, budget, provider, schedule, connector, or publication authorization from its author. Procedure existence is not authorization to read mail, spend money, subscribe, synthesize speech, schedule work, write files, or publish.",
      "kind": "step",
      "name": "Set the run envelope",
      "next": [
        {
          "presentation": {
            "line_color": "#7EE787"
          },
          "route": "orthogonal",
          "source_handle": "bottom",
          "target_handle": "top",
          "to": "runtime-authorization-gate"
        }
      ],
      "outputs": [
        {
          "format": [
            "Run type",
            "Configured-timezone interval [start, end)",
            "Allowed sources and labels",
            "Target language",
            "Target and maximum duration",
            "Approved adapters and authorization boundaries",
            "Unresolved settings"
          ],
          "name": "Run envelope"
        }
      ],
      "persona": "human",
      "presentation": {
        "border_color": "#7EE787",
        "fill_color": "#16251B",
        "text": {
          "bold": true,
          "color": "#EDFFF0",
          "font_size_px": 16,
          "horizontal": "center",
          "vertical": "middle"
        },
        "z_index": 10
      },
      "tools": [
        "Run configuration",
        "Timezone-aware interval calculator",
        "Authorization record"
      ]
    },
    {
      "checklist": [
        "The connected Gmail identity exactly matches <your-email>",
        "Mail scope is bounded to the configured sources and interval",
        "The ChatGPT app, dot, connected Gmail, dot cloud, and optional Mac Computer Use assumptions are confirmed, including Mac availability",
        "Agent and research tools are approved without an unapproved paid fallback",
        "Configured TTS provider, credential environment-variable name, and per-run cost boundary are approved before synthesis",
        "Delivery target and schedule are approved before any write or unattended run",
        "Public publishing remains outside this authorization"
      ],
      "id": "runtime-authorization-gate",
      "inputs": [
        "Run envelope",
        "Connected-account identity check",
        "Per-capability authorization record"
      ],
      "instructions": "Review the run envelope and the exact capabilities this run would use. This template assumes the ChatGPT app with dot, a Gmail account connected by the importing user, dot's cloud-side retrieval and browser operations, and, when needed, Computer Use on that user's connected Mac. Mac browser work requires the Mac to be powered on, connected, and authorized; do not assume portability to an agent without equivalent capabilities and permission. Proceed only when the connected Gmail identity exactly matches <your-email> and the importing user has separately approved the bounded mail read, agent work, research, TTS call, private file write, and any schedule required for this run. Configure the local speech adapter separately; it receives only a reviewed script, segments, and source metadata. Do not add unrequested local Gmail OAuth or silently move work to a metered API. Unresolved placeholders, a different inbox, missing credentials, unclear cost, unavailable Mac when required, or broader access must produce a recorded stop. This gate never authorizes public publishing; resulting audio defaults to the importing user's private personal use.",
      "kind": "decision",
      "name": "Runtime authorized?",
      "next": [
        {
          "presentation": {
            "label_position": 0.5,
            "line_color": "#7EE787"
          },
          "route": "orthogonal",
          "source_handle": "bottom",
          "target_handle": "top",
          "to": "ingest-bounded-mail",
          "when": "Authorized"
        },
        {
          "presentation": {
            "label_position": 0.52,
            "line_color": "#7EE787"
          },
          "route": "orthogonal",
          "source_handle": "left",
          "target_handle": "top",
          "to": "close-run",
          "when": "Stop: missing or mismatched"
        }
      ],
      "persona": "human",
      "presentation": {
        "border_color": "#7EE787",
        "fill_color": "#16251B",
        "text": {
          "bold": true,
          "color": "#EDFFF0",
          "font_size_px": 16,
          "horizontal": "center",
          "vertical": "middle"
        },
        "z_index": 11
      },
      "tools": [
        "Authorization checklist",
        "Connector identity inspector"
      ]
    },
    {
      "checklist": [
        "Every message matches <your-email>, <source-allowlist>/<label-policy>, and the configured capture interval",
        "The connector identity was rechecked against mailbox_account before reading",
        "Message and thread identifiers support replay-safe deduplication",
        "Retrieval failures and partial bodies are explicit",
        "No unrelated mailbox content is retained",
        "A late or missing expected edition is not replaced with a stale issue"
      ],
      "id": "ingest-bounded-mail",
      "inputs": [
        "Run envelope",
        "Authorized mail connector or export"
      ],
      "instructions": "In the ChatGPT app with dot, recheck that the connected Gmail identity exactly matches <your-email>, then query only that mailbox, <source-allowlist> or <label-policy>, and the run envelope's interval in <your-timezone>. Preserve message ID, thread ID, sender, received time, subject, body, links, and retrieval status. Do not broaden the search to unrelated mail or substitute a different connected inbox. If identity, access, authentication, or consent is missing, stop and record the exact blocker. Do not silently use an older edition when an expected issue is late or missing.",
      "kind": "step",
      "name": "Read only bounded mail",
      "next": [
        {
          "presentation": {
            "line_color": "#58A6FF"
          },
          "route": "orthogonal",
          "source_handle": "right",
          "target_handle": "left",
          "to": "split-classify-items"
        }
      ],
      "outputs": [
        {
          "format": [
            "Message and thread IDs",
            "Sender and subject",
            "Received timestamp in <your-timezone>",
            "Body and link retrieval status",
            "Eligibility and exclusion reason"
          ],
          "name": "Bounded message manifest"
        }
      ],
      "persona": "human",
      "presentation": {
        "border_color": "#58A6FF",
        "fill_color": "#111F33",
        "text": {
          "bold": true,
          "color": "#EAF5FF",
          "font_size_px": 16,
          "horizontal": "center",
          "vertical": "middle"
        },
        "z_index": 10
      },
      "tools": [
        "Authorized mail reader",
        "Message manifest"
      ]
    },
    {
      "checklist": [
        "Mixed article, advertisement, and housekeeping content is separated by topic",
        "Each article has the configured editorial label plus a primary class or explicit uncertainty",
        "Evidence spans support the classification",
        "Article sponsorship and the private program's own house message remain distinct",
        "No unapproved paid API fallback occurs"
      ],
      "id": "split-classify-items",
      "inputs": [
        "Bounded message manifest",
        "Approved classification adapter"
      ],
      "instructions": "Split each message into distinct topical items before classification so an article, a promotion, and housekeeping text in one email are not treated as one unit. Classify each item as article_candidate, promotion, or other and apply <topic-policy> at article level, with confidence and evidence spans. Follow the importing user's configured edition and carry-forward rules rather than discarding out-of-edition items silently. Keep source sponsorship as promotion. A configured <outro-or-house-message> is program_outro, not an article claim or sponsor. Do not silently fall back to a metered API.",
      "kind": "step",
      "name": "Split + classify items",
      "next": [
        {
          "presentation": {
            "line_color": "#F2C14E"
          },
          "route": "orthogonal",
          "source_handle": "bottom",
          "target_handle": "top",
          "to": "rank-dedupe-candidates"
        }
      ],
      "outputs": [
        {
          "format": [
            "Item ID and source message ID",
            "Topic boundary",
            "Class",
            "Confidence and evidence",
            "Article URL candidates",
            "Exception status"
          ],
          "name": "Item ledger"
        }
      ],
      "persona": "human",
      "presentation": {
        "border_color": "#F2C14E",
        "fill_color": "#2B2414",
        "text": {
          "bold": true,
          "color": "#FFF7DD",
          "font_size_px": 16,
          "horizontal": "center",
          "vertical": "middle"
        },
        "z_index": 10
      },
      "tools": [
        "Topic segmenter",
        "Classification rubric",
        "Approved agent runtime"
      ]
    },
    {
      "checklist": [
        "Only article candidates are ranked",
        "Novelty and interest are evaluated at item level, not publisher level",
        "Prior coverage is checked before selection",
        "A repeated topic proceeds only when material new information is stated",
        "The configured edition mix, story-count goal, duration goal, and source-diversity rule are applied without forced fill",
        "No-candidate is a valid outcome"
      ],
      "id": "rank-dedupe-candidates",
      "inputs": [
        "Item ledger",
        "Prior episode and topic ledger",
        "Run envelope"
      ],
      "instructions": "Rank only article candidates using novelty, intrinsic interest, relevance, explanatory potential, evidence quality, <topic-policy>, and source diversity. Compare item and topic fingerprints against prior runs across <deduplication-horizon>. Exclude a previously used topic unless a later item contains material new information and record that delta. Apply <edition-schedule>, <target-story-count>, <target-duration>, <max-duration>, and the importing user's source-diversity and carry-forward rules. Never force story count or duration when good material is insufficient, and avoid excessive dependence on one publisher.",
      "kind": "decision",
      "name": "Eligible new candidate?",
      "next": [
        {
          "presentation": {
            "label_position": 0.5,
            "line_color": "#C6A0FF"
          },
          "route": "orthogonal",
          "source_handle": "right",
          "target_handle": "left",
          "to": "source-access-gate",
          "when": "Candidate selected"
        },
        {
          "presentation": {
            "label_position": 0.5,
            "line_color": "#C6A0FF"
          },
          "route": "orthogonal",
          "source_handle": "left",
          "target_handle": "top",
          "to": "close-run",
          "when": "No eligible candidate"
        }
      ],
      "persona": "human",
      "presentation": {
        "border_color": "#C6A0FF",
        "fill_color": "#2A1D32",
        "text": {
          "bold": true,
          "color": "#FFF4FF",
          "font_size_px": 16,
          "horizontal": "center",
          "vertical": "middle"
        },
        "z_index": 11
      },
      "tools": [
        "Editorial scoring rubric",
        "Topic fingerprint and history store",
        "Duration budget"
      ]
    },
    {
      "checklist": [
        "Access status distinguishes full text, partial text, summary, and inaccessible",
        "dot cloud was tried first and Mac Computer Use was used only as the authorized fallback",
        "The route, portion read, constraints, and failure reason are recorded",
        "One failed retrieval route was not treated as proof that the source is private or paid",
        "An unavailable Mac or failure on both routes leads to hold or an eligible replacement",
        "Paywalls and access controls are not bypassed",
        "Teasers and snippets are not treated as the full article",
        "Subscription and external-sharing restrictions are respected",
        "Unavailable content is held or replaced only with a permitted, clearly labeled source"
      ],
      "id": "source-access-gate",
      "inputs": [
        "Selected candidate",
        "Source URL",
        "Permitted authenticated or public access"
      ],
      "instructions": "When access is permitted, first open and verify the selected original article through dot's cloud-side retrieval or browser operation. If that route cannot read it, use the browser through Computer Use on the connected user's Mac only when the Mac is powered on, connected, and authorized. Do not infer that a source is private, paid, or inaccessible from one failed retrieval route alone. If the Mac is unavailable or neither route can read the article, mark it unread and hold it, replace it with another eligible article, or use only an explicitly permitted alternative source while preserving the limitation. Record the route used, full/partial/summary/unread status, the portion actually read, constraints, and failure reason. Respect paywalls, robots controls, subscription terms, copyright, and external-sharing constraints; never bypass authorization or security controls. Never mark an item as fully read from an email teaser, search snippet, or inaccessible page.",
      "kind": "decision",
      "name": "Full source accessible?",
      "next": [
        {
          "presentation": {
            "label_position": 0.5,
            "line_color": "#7EE787"
          },
          "route": "orthogonal",
          "source_handle": "bottom",
          "target_handle": "top",
          "to": "sufficiency-gate",
          "when": "Usable source obtained"
        },
        {
          "presentation": {
            "label_position": 0.52,
            "line_color": "#7EE787"
          },
          "route": "orthogonal",
          "source_handle": "right",
          "target_handle": "right",
          "to": "close-run",
          "when": "Hold: unavailable or restricted"
        }
      ],
      "persona": "human",
      "presentation": {
        "border_color": "#7EE787",
        "fill_color": "#16251B",
        "text": {
          "bold": true,
          "color": "#EDFFF0",
          "font_size_px": 16,
          "horizontal": "center",
          "vertical": "middle"
        },
        "z_index": 12
      },
      "tools": [
        "dot cloud retrieval and browser operations",
        "Connected-user Mac browser through Computer Use",
        "Source archive",
        "Access-status recorder"
      ]
    },
    {
      "checklist": [
        "Central claim, context, evidence, uncertainty, and consequence are assessed",
        "The decision is based on item-level information, not publisher identity",
        "Material claims have a verification path",
        "Research questions are bounded to identified gaps",
        "Hold is available when evidence remains inadequate"
      ],
      "id": "sufficiency-gate",
      "inputs": [
        "Source packet",
        "Editorial purpose",
        "Duration budget"
      ],
      "instructions": "Judge whether each story can deliver 'what the source says, useful context or added information, and what follows from it' rather than a bare summary. When the original article already supplies enough claim, context, evidence, uncertainty, and significance, do not force extra research; record why it was unnecessary and the verification limit. Research only material gaps or genuinely useful connections. Verify added facts and distinguish them from interpretation, questions, and hypotheses. Hold when key claims cannot be checked or access limits would make the story misleading.",
      "kind": "decision",
      "name": "Enough evidence to script?",
      "next": [
        {
          "presentation": {
            "label_position": 0.52,
            "line_color": "#F2C14E"
          },
          "route": "orthogonal",
          "source_handle": "bottom_right_quarter",
          "target_handle": "top",
          "to": "draft-script",
          "when": "Source sufficient"
        },
        {
          "presentation": {
            "label_position": 0.48,
            "line_color": "#F2C14E"
          },
          "route": "orthogonal",
          "source_handle": "left",
          "target_handle": "right",
          "to": "investigate-gaps",
          "when": "Research needed"
        },
        {
          "presentation": {
            "label_position": 0.52,
            "line_color": "#F2C14E"
          },
          "route": "orthogonal",
          "source_handle": "right",
          "target_handle": "right",
          "to": "close-run",
          "when": "Hold"
        }
      ],
      "persona": "human",
      "presentation": {
        "border_color": "#F2C14E",
        "fill_color": "#2B2414",
        "text": {
          "bold": true,
          "color": "#FFF7DD",
          "font_size_px": 16,
          "horizontal": "center",
          "vertical": "middle"
        },
        "z_index": 13
      },
      "tools": [
        "Information-sufficiency rubric",
        "Claim and gap ledger"
      ]
    },
    {
      "checklist": [
        "Each search maps to a stated information gap",
        "Important claims prefer primary or authoritative evidence",
        "Source date, definition, and limitations are recorded",
        "Facts, quotations, derivations, and agent analysis are distinguished",
        "Conflicts and unresolved questions are preserved",
        "Stopping criteria prevent open-ended research"
      ],
      "id": "investigate-gaps",
      "inputs": [
        "Bounded research questions",
        "Source packet"
      ],
      "instructions": "Research only the bounded gaps, background, and useful connections identified by the sufficiency decision. Prefer primary and authoritative sources; preserve dates, definitions, conflicts, access limits, and uncertainty. Distinguish the original article, added sourced facts, quotations or paraphrases, derivations, and agent interpretation, questions, or hypotheses. For every story, record what was researched, why no extra research was needed when applicable, and what remains unverified. Stop when further work is unlikely to change the editorial decision.",
      "kind": "step",
      "name": "Research only the gaps",
      "next": [
        {
          "presentation": {
            "line_color": "#58A6FF"
          },
          "route": "orthogonal",
          "source_handle": "right",
          "target_handle": "left",
          "to": "sufficiency-gate"
        }
      ],
      "outputs": [
        {
          "format": [
            "Question",
            "Finding",
            "Evidence class",
            "Source and access date",
            "Conflict or limitation",
            "Effect on sufficiency"
          ],
          "name": "Research supplement"
        }
      ],
      "persona": "human",
      "presentation": {
        "border_color": "#58A6FF",
        "fill_color": "#111F33",
        "text": {
          "bold": true,
          "color": "#EAF5FF",
          "font_size_px": 16,
          "horizontal": "center",
          "vertical": "middle"
        },
        "z_index": 14
      },
      "tools": [
        "Web or document research",
        "Evidence ledger",
        "Primary-source archive"
      ]
    },
    {
      "checklist": [
        "The output language matches <target-language>",
        "Major selected topics are covered without claiming exhaustive coverage",
        "Source facts, attributed claims, quotations, and agent analysis are distinguishable",
        "The configured edition mix and <target-duration> are applied without forced fill and remain below <max-duration>",
        "Program intro and house-message outro are distinct from story text and source sponsorship",
        "Proper-noun and technical-term readings are annotated",
        "Show notes carry source links and notable omissions"
      ],
      "id": "draft-script",
      "inputs": [
        "Usable source packets",
        "Research supplements",
        "Ranked candidate slate",
        "Run envelope"
      ],
      "instructions": "Draft a natural <target-language> script for private personal listening. Build each story as source article, background or added information, then implications or questions; make its value beyond summary explicit. Verify added facts and distinguish them from interpretation and hypotheses. Apply <edition-schedule>, <topic-policy>, <target-story-count>, <target-duration>, and <max-duration> without forced fill. Use <program-title>, <intro-template>, and <outro-or-house-message> only after the importing user configures them. Keep program_intro and program_outro separate from story text and source sponsorship, and count them toward duration. An empty house message is valid; do not inherit branding or advertising from this template. Keep URLs in show notes.",
      "kind": "step",
      "name": "Draft the configured-language script",
      "next": [
        {
          "presentation": {
            "line_color": "#C6A0FF"
          },
          "route": "orthogonal",
          "source_handle": "right",
          "target_handle": "left",
          "to": "script-quality-gate"
        }
      ],
      "outputs": [
        {
          "format": [
            "Episode title and date",
            "<target-language> narration by segment",
            "Source and claim annotations",
            "Pronunciation notes",
            "Estimated duration",
            "Show notes and omitted-topic notes"
          ],
          "name": "Script package"
        }
      ],
      "persona": "human",
      "presentation": {
        "border_color": "#C6A0FF",
        "fill_color": "#2A1D32",
        "text": {
          "bold": true,
          "color": "#FFF4FF",
          "font_size_px": 16,
          "horizontal": "center",
          "vertical": "middle"
        },
        "z_index": 15
      },
      "tools": [
        "Approved agent runtime",
        "Script template",
        "Pronunciation lexicon",
        "Duration estimator"
      ]
    },
    {
      "checklist": [
        "Important claims are supported and correctly attributed",
        "Quotes and paraphrases remain faithful to the source",
        "Facts, sources, and agent interpretation remain distinguishable",
        "Proper nouns and technical terms have usable readings",
        "The narration is natural in <target-language> and satisfies <target-duration> plus <max-duration>",
        "Every story has a research/no-research rationale and verification-limit record",
        "Ready, revise, and hold remain distinct outcomes"
      ],
      "id": "script-quality-gate",
      "inputs": [
        "Script package",
        "Source packets and evidence ledger"
      ],
      "instructions": "Review the complete script against the claim ledger, sources, and per-story research record. Verify important facts, attribution, quote fidelity, dates, numbers, and the separation of source content, added facts, interpretation, and hypotheses. Confirm a research summary or a reason no extra research was needed plus verification limits for every story. Keep program intro/outro separate from article text and sponsorship and include them in duration. Read for natural <target-language>, pronunciation, edition fit, <target-duration>, and <max-duration>. Passing this gate does not authorize paid synthesis.",
      "kind": "decision",
      "name": "Script ready for speech?",
      "next": [
        {
          "presentation": {
            "label_position": 0.5,
            "line_color": "#F2C14E"
          },
          "route": "orthogonal",
          "source_handle": "bottom",
          "target_handle": "top",
          "to": "prepare-speech-segments",
          "when": "Ready"
        },
        {
          "presentation": {
            "label_position": 0.5,
            "line_color": "#F2C14E"
          },
          "route": "orthogonal",
          "source_handle": "left",
          "target_handle": "right",
          "to": "draft-script",
          "when": "Revise"
        },
        {
          "presentation": {
            "label_position": 0.52,
            "line_color": "#F2C14E"
          },
          "route": "orthogonal",
          "source_handle": "right",
          "target_handle": "right",
          "to": "close-run",
          "when": "Hold"
        }
      ],
      "persona": "human",
      "presentation": {
        "border_color": "#F2C14E",
        "fill_color": "#2B2414",
        "text": {
          "bold": true,
          "color": "#FFF7DD",
          "font_size_px": 16,
          "horizontal": "center",
          "vertical": "middle"
        },
        "z_index": 16
      },
      "tools": [
        "Fact and citation checker",
        "Configured-language read-aloud review",
        "Pronunciation checklist",
        "Duration estimator"
      ]
    },
    {
      "checklist": [
        "Provider, model, voice, credentials, cost boundary, and output format are approved",
        "No paid or authenticated call occurs from Procedure approval alone",
        "Segments preserve script order and pronunciation instructions",
        "Individual segments can be regenerated",
        "Expected output path contains no public destination",
        "Failure remains explicit and does not trigger an unapproved provider fallback"
      ],
      "id": "prepare-speech-segments",
      "inputs": [
        "Ready script package",
        "Approved TTS configuration",
        "Approved cost and credential record"
      ],
      "instructions": "Convert the approved script package into reviewed speech segments for the importing user's configured adapter. Use story segments with verified article sources, program_intro with no article sources, and program_outro with no article sources; all count toward duration. Require explicit values for <tts-provider>, <tts-model>, <tts-voice>, <audio-format>, <tts-api-key-env-name>, <per-run-budget>, <max-duration>, and <private-output-path>. Keep the API-key value only in the named process environment variable; never place it in this Procedure, an input file, logs, command arguments, or exported JSON, and never fall back to another key, account, project, or credential source. Run the adapter's dry-run or equivalent first and inspect current-rate cost estimate, duration, blockers, plan identity, and per-run limits. Do not execute while provider, rate, currency, credentials, output path, or this run's budget is unresolved. Every paid run requires its own explicit, non-recurring approval. Preserve attempt and call limits, no automatic retry, explicit segment retry, hash-based reuse, the configured <max-duration>, and staging before private delivery. Example only, not a default or authorization: Gemini 3.8 Flash TTS with Schedar, WAV, and GEMINI_API_KEY.",
      "kind": "step",
      "name": "Prepare speech segments",
      "next": [
        {
          "presentation": {
            "line_color": "#58A6FF"
          },
          "route": "orthogonal",
          "source_handle": "left",
          "target_handle": "right",
          "to": "audio-quality-gate"
        }
      ],
      "outputs": [
        {
          "format": [
            "Segment IDs and text hashes",
            "Approved TTS configuration reference",
            "Per-segment result",
            "Joined-audio result",
            "Failure and retry status"
          ],
          "name": "Speech build packet"
        }
      ],
      "persona": "human",
      "presentation": {
        "border_color": "#58A6FF",
        "fill_color": "#111F33",
        "text": {
          "bold": true,
          "color": "#EAF5FF",
          "font_size_px": 16,
          "horizontal": "center",
          "vertical": "middle"
        },
        "z_index": 17
      },
      "tools": [
        "Configured TTS adapter dry-run and explicit execute",
        "Configured provider/model/voice (example only: Gemini 3.8 Flash TTS / Schedar)",
        "Configured segment manifest and audio joiner"
      ]
    },
    {
      "checklist": [
        "All expected segments exist exactly once and in order",
        "The joined file opens and its duration stays within the hard cap",
        "Loudness, silence, clipping, and truncation are acceptable",
        "Names, dates, numbers, and technical terms are intelligible",
        "A spot sample matches the approved script",
        "Unknown or failed output is not treated as success"
      ],
      "id": "audio-quality-gate",
      "inputs": [
        "Speech build packet",
        "Ready script package",
        "Audio file"
      ],
      "instructions": "Inspect the local staging manifest: every expected segment must exist once and in program_intro, story, program_outro order; hashes must match; the configured <audio-format> must open; and measured duration must satisfy <max-duration>. Listen for loudness, silence, clipping, truncation, names, dates, numbers, and technical terms, then compare a spot sample with the approved script. Regenerate only a named segment after explicit cost approval; never auto-retry. Passing QA does not itself authorize delivery, sync-folder writes, or publication.",
      "kind": "decision",
      "name": "Audio safe to deliver?",
      "next": [
        {
          "presentation": {
            "label_position": 0.5,
            "line_color": "#7EE787"
          },
          "route": "orthogonal",
          "source_handle": "left",
          "target_handle": "right",
          "to": "deliver-private-file",
          "when": "Accept"
        },
        {
          "presentation": {
            "label_position": 0.5,
            "line_color": "#7EE787"
          },
          "route": "orthogonal",
          "source_handle": "right",
          "target_handle": "left",
          "to": "prepare-speech-segments",
          "when": "Regenerate segment"
        },
        {
          "presentation": {
            "label_position": 0.5,
            "line_color": "#7EE787"
          },
          "route": "orthogonal",
          "source_handle": "bottom",
          "target_handle": "top",
          "to": "close-run",
          "when": "Hold"
        }
      ],
      "persona": "human",
      "presentation": {
        "border_color": "#7EE787",
        "fill_color": "#16251B",
        "text": {
          "bold": true,
          "color": "#EDFFF0",
          "font_size_px": 16,
          "horizontal": "center",
          "vertical": "middle"
        },
        "z_index": 18
      },
      "tools": [
        "Audio inspector",
        "Segment manifest",
        "Listening checklist"
      ]
    },
    {
      "checklist": [
        "The destination path was explicitly approved",
        "The delivered file matches the accepted audio identity",
        "The file exists at <private-output-path> after the write",
        "Sync or cross-device availability is reported only after actual verification",
        "No public feed, external upload, or social post occurs",
        "Delivery completion does not depend on later feedback or X activity"
      ],
      "id": "deliver-private-file",
      "inputs": [
        "Accepted audio file",
        "Approved private delivery target",
        "Optional show notes"
      ],
      "instructions": "Keep generation in a configured local staging area. Only after the importing user approves <private-output-path> and accepts the audio and manifest may the configured delivery adapter copy the validated audio, reduced manifest, and optional show notes there. Never overwrite an existing target. Treat sync, cloud backup, and cross-device availability as unverified until tested by that user. Private personal use is the default. Do not publish a feed, upload publicly, send a message, or post socially without a separate explicit authorization. Record delivery separately from later feedback or publication ideas.",
      "kind": "step",
      "name": "Place the private file",
      "next": [
        {
          "presentation": {
            "line_color": "#C6A0FF"
          },
          "route": "orthogonal",
          "source_handle": "left",
          "target_handle": "right",
          "to": "close-run"
        }
      ],
      "outputs": [
        {
          "format": [
            "File name and identity",
            "Private destination reference",
            "Written at",
            "Local visibility",
            "Sync or cross-device verification status",
            "No-publication confirmation"
          ],
          "name": "Private delivery receipt"
        }
      ],
      "persona": "human",
      "presentation": {
        "border_color": "#C6A0FF",
        "fill_color": "#2A1D32",
        "text": {
          "bold": true,
          "color": "#FFF4FF",
          "font_size_px": 16,
          "horizontal": "center",
          "vertical": "middle"
        },
        "z_index": 19
      },
      "tools": [
        "Approved local file writer",
        "Sync-state verifier"
      ]
    },
    {
      "checklist": [
        "Actual outcomes are distinguished from planned steps",
        "Late, missing, inaccessible, insufficient, failed, and unknown states remain explicit",
        "No stale edition silently substitutes for a failed or missing run",
        "Topic fingerprints, configured carry-forwards, and meaningful follow-up deltas are recorded",
        "Per-story research, no-research rationale, and verification limits are recorded",
        "Delivery status is independent of feedback and external-post ideas",
        "Any future public-post draft and post remain optional and separately user-approved"
      ],
      "id": "close-run",
      "inputs": [
        "All run artifacts and exception records",
        "Private delivery receipt if delivered"
      ],
      "instructions": "Record actual outcomes without filling future checklist results. Include configured edition classification, selected and excluded topics, configured carry-forwards, duplicates, source-access and evidence holds, per-story added research and sources, reasons research was unnecessary, verification limits, separation of facts from interpretation or hypotheses, script and audio QA, delivery status, failures, unresolved placeholders, and the next safe action. Never substitute an older edition without a new decision. Feedback and any external-post draft remain separate work with independent user approval.",
      "kind": "step",
      "name": "Record outcome + exceptions",
      "outputs": [
        {
          "format": [
            "Run envelope and source interval",
            "Selected, excluded, duplicate, and held topics",
            "Research, script, speech, QA, and delivery outcomes",
            "Late, missing, failed, and unknown states",
            "Unresolved configuration",
            "Next safe action",
            "Optional feedback or separately approved public-post idea"
          ],
          "name": "Run record"
        }
      ],
      "persona": "human",
      "presentation": {
        "border_color": "#9BA7B4",
        "fill_color": "#1D232B",
        "text": {
          "bold": true,
          "color": "#F3F6F9",
          "font_size_px": 16,
          "horizontal": "center",
          "vertical": "middle"
        },
        "z_index": 20
      },
      "tools": [
        "Run ledger",
        "Topic history",
        "Feedback note"
      ]
    }
  ],
  "layout": {
    "decorations": [
      {
        "height": 560,
        "id": "stage-input",
        "presentation": {
          "border_color": "green",
          "fill_color": "none",
          "text": {
            "bold": true,
            "horizontal": "start",
            "size": "large",
            "vertical": "top"
          },
          "z_index": 0
        },
        "preset": "enclosure",
        "shape": "rectangle",
        "text": "1. Bound the private input",
        "width": 850,
        "x": 30,
        "y": 30
      },
      {
        "height": 440,
        "id": "stage-editorial",
        "presentation": {
          "border_color": "orange",
          "fill_color": "none",
          "text": {
            "bold": true,
            "horizontal": "start",
            "size": "large",
            "vertical": "top"
          },
          "z_index": 1
        },
        "preset": "enclosure",
        "shape": "rectangle",
        "text": "2. Select and verify",
        "width": 880,
        "x": 900,
        "y": 390
      },
      {
        "height": 590,
        "id": "stage-script",
        "presentation": {
          "border_color": "purple",
          "fill_color": "none",
          "text": {
            "bold": true,
            "horizontal": "start",
            "size": "large",
            "vertical": "top"
          },
          "z_index": 2
        },
        "preset": "enclosure",
        "shape": "rectangle",
        "text": "3. Script with evidence",
        "width": 900,
        "x": 320,
        "y": 770
      },
      {
        "height": 390,
        "id": "stage-audio",
        "presentation": {
          "border_color": "blue",
          "fill_color": "none",
          "text": {
            "bold": true,
            "horizontal": "start",
            "size": "large",
            "vertical": "top"
          },
          "z_index": 3
        },
        "preset": "enclosure",
        "shape": "rectangle",
        "text": "4. Build and inspect audio",
        "width": 590,
        "x": 900,
        "y": 1290
      },
      {
        "height": 420,
        "id": "stage-delivery",
        "presentation": {
          "border_color": "gray",
          "fill_color": "none",
          "text": {
            "bold": true,
            "horizontal": "start",
            "size": "large",
            "vertical": "top"
          },
          "z_index": 4
        },
        "preset": "enclosure",
        "shape": "rectangle",
        "text": "5. Private delivery or explicit hold",
        "width": 610,
        "x": 320,
        "y": 1550
      }
    ],
    "positions": {
      "audio-quality-gate": {
        "x": 930,
        "y": 1480
      },
      "close-run": {
        "x": 350,
        "y": 1740
      },
      "deliver-private-file": {
        "x": 640,
        "y": 1610
      },
      "draft-script": {
        "x": 640,
        "y": 1090
      },
      "ingest-bounded-mail": {
        "x": 640,
        "y": 330
      },
      "investigate-gaps": {
        "x": 350,
        "y": 960
      },
      "prepare-speech-segments": {
        "x": 1220,
        "y": 1350
      },
      "rank-dedupe-candidates": {
        "x": 1220,
        "y": 570
      },
      "runtime-authorization-gate": {
        "x": 350,
        "y": 210
      },
      "script-quality-gate": {
        "x": 930,
        "y": 1220
      },
      "set-run-envelope": {
        "x": 60,
        "y": 90
      },
      "source-access-gate": {
        "x": 930,
        "y": 700
      },
      "split-classify-items": {
        "x": 930,
        "y": 450
      },
      "sufficiency-gate": {
        "x": 640,
        "y": 830
      }
    }
  },
  "name": "Newsletter to Private Audio · Portable Template",
  "note": "Portable public template with no author mailbox, subscriptions, schedule, budget, provider authorization, output path, branding, or run history. Before use, replace all angle-bracket placeholders with the importing user's own settings. The runtime assumes the ChatGPT app with dot, user-connected Gmail, dot cloud retrieval/browser operations, and optional Computer Use on that user's powered-on, connected, authorized Mac. Check source articles through dot cloud first and use Mac Computer Use only as the fallback. One failed route is not proof that a source is private or paid; if neither route can read it, mark it unread and hold or replace it. Record route, portion read, constraints, and failure reason, and never bypass access or security controls. Story count and duration are goals, not forced minimums. Keep facts, added research, and agent interpretation distinct. Private personal use is the default. A TTS configuration such as Gemini 3.8 Flash TTS / Schedar / WAV / GEMINI_API_KEY is an example only, not a default or inherited approval. Never store secret values in this Procedure or exported files. Every mail read, paid call, file write, schedule, subscription, sync, and publication action requires the importing user's separate authorization.",
  "procedure_id": "newsletter-to-private-audio-draft",
  "rev": 6
}
