From a17a9c317e5d903ae65f2d8255c2114d797c433f Mon Sep 17 00:00:00 2001 From: Alexey Grigorev Date: Tue, 24 Nov 2026 10:30:05 +0100 Subject: [PATCH] Point newsletter CLI guidance to Relay --- cli/README.md | 2 +- cli/skill/SKILL.md | 31 +++++++++++++++---------------- cli/src/commands/newsletter.mjs | 22 +++++++++------------- cli/test/work.test.mjs | 12 ++++++++++++ 4 files changed, 37 insertions(+), 30 deletions(-) diff --git a/cli/README.md b/cli/README.md index ecd121a7..a2d4f676 100644 --- a/cli/README.md +++ b/cli/README.md @@ -61,7 +61,7 @@ subcommands, flags, and examples. | `cards` | `list`, `show` (with Tasks), `create --template`, `update`, `stage`, `link`, `park` / `resume`, `template-update` | | `templates` | `list`, `show`, `create`, `update`, `reset`, `delete`, `sync` (see Template editing below) | | `kb` | knowledge base: `search`, `related `, `show`, `tree`, `ls`, `resolve`, `backlinks`, `history`, `write`, `publish` | -| `newsletter` | issues and their sponsor slots: `list`, `show`, `create`, `update`, `delete`, `dismiss-alert` | +| `newsletter` | Relay issue planning, sponsor slots and render evidence: `list`, `show`, `create`, `update`, `final-render` | | `podcast` | episodes: `list`, `show`, `create`, `update`, `create-card`, `delete` | | `speakers` | website speaker/author profiles: `list`, `show`, `create`, `update` | | `books` | Book of the Week entries: `list`, `show`, `create`, `update` | diff --git a/cli/skill/SKILL.md b/cli/skill/SKILL.md index d64e082b..d77b2a0e 100644 --- a/cli/skill/SKILL.md +++ b/cli/skill/SKILL.md @@ -78,7 +78,7 @@ dataops whoami # confirm identity and role before writ ## Required resources: only take Tasks you can do Many Tasks need an account or access you may not have: YouTube, Luma, Meetup, -Mailchimp, the DataTalks.Club mailbox, Slack, LinkedIn, the website repo, the +Relay, the DataTalks.Club mailbox, Slack, LinkedIn, the website repo, the bank. A Task lists them in `requires` (`dataops tasks show` prints it, `--json` has `requires`); `dataops resources list` gives every id. @@ -89,7 +89,7 @@ export DATAOPS_CAPABILITIES=youtube,google-docs,website # what you can log in dataops tasks list --mine # filtered by DATAOPS_CAPABILITIES dataops tasks list --can-do youtube,luma # or say it per command dataops tasks list --can-do all # ignore DATAOPS_CAPABILITIES -dataops tasks list --status todo --requires mailchimp # who needs Mailchimp access +dataops tasks list --status todo --requires youtube # Tasks that need YouTube access ``` A Task can depend on other Tasks of its Card (`dependsOn`; `dataops tasks show` @@ -278,20 +278,19 @@ only after the recording date is confirmed (`dataops podcast update --recording-date YYYY-MM-DD`); the episode brief is available before confirm. -For a newsletter issue's Markdown package (`issue.md`, `sources.md`, `brief.md`): -store it in DataOps on the newsletter issue — never commit it to Git: -`dataops newsletter markdown set --issue-file issue.md --sources-file sources.md --brief-file brief.md` -(or one file at a time with `dataops newsletter markdown set [issue|sources|brief] --file `). -It automatically populates the `"Newsletter Markdown"` link on the issue and its Card -and prints the shareable HTML preview link (`/newsletter-issues//preview?code=XXXX-XXXX-XXXX-XXXX`). -Use `dataops newsletter markdown show [issue|sources|brief]` to read it, -`dataops newsletter markdown preview ` to print the shareable link, and -`dataops newsletter markdown rotate-code ` to rotate the preview access code. -To put the sponsor copy into the Relay email, run `dataops newsletter relay-sync --slot primary|secondary` (add `--dry-run` first). It maps the slot's sponsor document (title, kicker, body, bullets, closing, image, CTA) into the Relay issue's sponsor block with one per-block write (under the ~8 KB CloudFront WAF body limit), updating the existing block rather than adding another. The Relay issue key comes from `final-render --relay-key`, or pass `--relay-key`. - -Issue content blocks (intro, spotlight, courses, events, recording, article, sponsor) are edited in DataOps: `dataops newsletter block list|show|add|edit|move|delete ...`, `block-types `, `blocks-sync [--dry-run]` (two-way, per block; conflicts refuse the whole sync), `revisions [--block ] [--diff]` (who changed what). Adds, moves and deletes reach Relay on the next `blocks-sync`. Sponsor blocks are special: the main one is pinned first (no move/delete, nothing above it), secondary ones can move but not be deleted, and both are read-only here: edit the sponsor doc, and every doc save syncs the block (`sponsor-sync --slot primary|secondary [--dry-run] [--force]` re-runs it). Refusals print the server message and exit non-zero. - -Use `dataops newsletter image upload ` to upload a newsletter image (PNG, JPEG, GIF, or WebP) to durable public hosting and print its public `https://` URL for `issue.md` and the HTML preview. +For current newsletter production, read the issue's Task and its live SOP. +For weekly assembly, open +`dataops kb show sop.newsletter.assemble-the-weekly-newsletter-in-dataops`. +Build and review the issue in Relay, then attach its rendered email with +`dataops newsletter final-render --relay-key --web-view-url `. +Record the source links and delivery evidence on the DataOps issue and Task. + +For sponsored slots, edit the slot's sponsor document and follow the live +SOP for sponsor block synchronization. Preview the mapping of that document +to the existing Relay block with +`dataops newsletter relay-sync --slot primary|secondary --dry-run`. +`dataops newsletter image upload ` returns a durable public +image URL for the sponsor document or Relay issue. For a podcast episode: `dataops podcast list --status booked` (or `--season N`), `dataops podcast create --guests "Name[:slug]" --title "..." --recording-date YYYY-MM-DD`, diff --git a/cli/src/commands/newsletter.mjs b/cli/src/commands/newsletter.mjs index 3d22c4ca..12eec378 100644 --- a/cli/src/commands/newsletter.mjs +++ b/cli/src/commands/newsletter.mjs @@ -14,6 +14,11 @@ export const summary = "Plan newsletter issues, their sponsor slots, and their C export const help = `dataops newsletter - newsletter issues (the web Planning > Newsletter view) +Build and review current issues in Relay. Read the owning Task and its live +SOP for the workflow. For weekly assembly, open + dataops kb show sop.newsletter.assemble-the-weekly-newsletter-in-dataops +DataOps tracks the issue, sponsor slots, source links and delivery evidence. + An issue is one email. A weekly issue has an issue number and two sponsor slots, primary and secondary; a stand-alone issue has one. A slot is booked when it names a sponsor and open otherwise. Booking a slot for a sponsor from @@ -63,14 +68,6 @@ Usage dataops newsletter doc diff [--rev N] dataops newsletter doc export dataops newsletter doc delete --yes - dataops newsletter markdown set [issue|sources|brief] --file - dataops newsletter markdown set [--issue-file ] [--sources-file ] [--brief-file ] - Store the Newsletter Markdown package (issue.md, sources.md, - brief.md) on the issue in DataOps, link the HTML preview on - the Card, and print the shareable preview link (?code=) - dataops newsletter markdown show [issue|sources|brief] - dataops newsletter markdown preview - dataops newsletter markdown rotate-code dataops newsletter final-render [--html-file ] [--web-view-url ] [--relay-key ] [--subject ] [--preview ] [--clear] Attach Relay's rendered email HTML or web-view URL to @@ -99,9 +96,8 @@ Usage [--open-rate PCT] [--click-rate PCT] [--linkedin-impressions N] [--linkedin-clicks N] [--linkedin-reactions N] [--linkedin-ctr PCT] [--linkedin-post URL|none] [--x-impressions N] [--x-clicks N] [--x-reactions N] [--x-ctr PCT] [--x-post URL|none] - [--pull-mailchimp [--campaign ID] [--primary-url URL] [--secondary-url URL] [--dry-run]] [--clear] - Show, set, or pull from Mailchimp the issue metrics and + Show or set the issue metrics and per-slot (primary / secondary) link + LinkedIn + X metrics. With no metric flags it shows the current values. dataops newsletter report [primary|secondary] [--contact NAME] [--send] @@ -121,7 +117,7 @@ Usage start. The header row is found below the tab's banner row. Creates missing issues (past ones get no Card); past issues take the sheet's date, number, document links, and - Mailchimp/LinkedIn/X stats; upcoming ones only get what + recorded delivery and social metrics. Upcoming issues get what they lack, differences are listed. Sponsor names and company links already in DataOps are never overwritten or cleared: sync fills what is missing and reports the rest. @@ -884,7 +880,7 @@ export const doc = domainDocCommand("newsletter"); const MARKDOWN_KINDS = ["issue", "sources", "brief"]; -export const newsletterMarkdownHelp = `dataops newsletter markdown - store and preview Newsletter Markdown packages in DataOps +export const newsletterMarkdownHelp = `dataops newsletter markdown - maintain historical newsletter packages Newsletter Markdown packages (issue.md, sources.md, brief.md) live directly on the newsletter issue in DataOps and are never committed to Git. @@ -1070,7 +1066,7 @@ export async function markdown(args, io) { return fn({ ...args, _: rest }, io); } -export const newsletterImageHelp = `dataops newsletter image - upload durable public images for Newsletter Markdown +export const newsletterImageHelp = `dataops newsletter image - upload durable public images for a newsletter issue Usage dataops newsletter image upload diff --git a/cli/test/work.test.mjs b/cli/test/work.test.mjs index 57362153..11090467 100644 --- a/cli/test/work.test.mjs +++ b/cli/test/work.test.mjs @@ -683,6 +683,18 @@ describe("agent guide", () => { assert.match(io.text(), /leave it for another agent/); }); + test("guides active newsletter production through Relay", async () => { + for (const argv of [["agent-guide"], ["newsletter", "--help"]]) { + const io = captureIo(); + assert.equal(await run(argv, io), 0); + const output = io.text(); + assert.match(output, /Build and review.*in Relay/); + assert.match(output, /dataops kb show sop\.newsletter\.assemble-the-weekly-newsletter-in-dataops/); + assert.match(output, /dataops newsletter final-render/); + assert.doesNotMatch(output, /mailchimp|newsletter markdown|(?:issue|sources|brief)\.md/i); + } + }); + test("the shipped guide puts the attached SOP first and uses creation-driven guest intake", async () => { const io = captureIo(); assert.equal(await run(["agent-guide"], io), 0);