Skip to content

Briefings: send each issue by itself when every check passes - #34

Merged
ankurmans merged 2 commits into
mainfrom
claude/briefings-autosend-ed8ba1
Nov 1, 2026
Merged

ankurmans merged 2 commits into
mainfrom
claude/briefings-autosend-ed8ba1

Conversation

@ankurmans

@ankurmans ankurmans commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner

Phase 3 of Briefings: reviewMode: send_if_checks_pass.

Opt in

Only a signed-in person, in the dashboard (new "Sending by itself" card on the briefing page), through set_briefing_auto_send: a dashboardOnly action like set_agent_approval (no REST route, MCP tool or docs entry; runAction refuses any other via), needs confirm: true, refused on the Free plan, daily cap 1 to 3 (default 1).
create_briefing and update_briefing refuse the mode for every key, full included. An API key or app that changes what a briefing writes from (brief, hosts, discovery, style guide, languages, counts, sections, min score, steps) turns it back to draft; name, schedule, test address, budget and status changes keep it. The elevation of those two actions in lib/action-scopes.js no longer reads reviewMode, since the input is refused.

When it sends

settleSend in lib/briefings-delivery.js, through send_campaign with via: "briefing" (plan limits, Free guards, getSendBlocker apply; no new send path). It sends only if: not thin, no unfinished step or missing translation (engine holdReason now treats a translation not done as partial), all code checks and the judge pass, the run is scheduled (not manual), the briefing is still active and in send mode, the account is not Free, under the daily cap, and check_campaign including the claim check has no blocker and no warning. While links/claims are still being read, delivery answers checking and the deliver stage asks again every 4 s for up to 10 min, then holds as checks.
Held runs are drafts with heldReason (review_mode, thin, checks, partial, agent_approval, new daily_cap) and the owner's note names the cause. With Newsletter.agentApproval on, the send becomes an approval request (app briefing:<id>, via: "briefing"); approving runs send_campaign once.
After a send the owner is emailed with a signed pause link (/briefing-pause/<token>, confirmation page, 14 days, public in proxy.js).

Also

Docs (/docs/briefings, /docs/briefings-bot), docs/BRIEFINGS-DESIGN.md (new Auto-send section, status), AGENTS.md, action manifest regenerated.

Tests

New tests/briefings-auto-send.test.mjs (sent path, every held reason, approval, cap, pause link), plus engine, action and docs tests. Lint clean; 730 passed / 0 failed over 734 related tests (briefing, agent, approval, parity, scopes, docs, perf, routing). Full suite left to CI. API Worker builds at 7.63 MB (budget 8.15), briefings Worker 0.41 MB.

Deploy

Not deployed. Order: API Worker (carries delivery), app, then briefings Worker. Any order is safe: an old engine sends drafts, an old delivery ignores the new fields.

Adds reviewMode send_if_checks_pass. Only the dashboard turns it on
(set_briefing_auto_send, dashboard only, with a confirmation, paid plans);
create_briefing and update_briefing refuse the mode, and an agent's change to
what a briefing writes from turns it off.

Delivery decides the send: it reads the briefing, plan, daily cap and
check_campaign (with the claim check) again, then sends through
send_campaign, or asks for approval when the newsletter asks before an agent
sends. Anything that fails leaves a draft with heldReason (new: daily_cap)
and the owner's note says why. After a send the owner gets a pause link.
…send-ed8ba1

# Conflicts:
#	docs/BRIEFINGS-DESIGN.md
@ankurmans
ankurmans merged commit 2de2fa8 into main Nov 1, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant