Skip to content

The weekly edition: the Friday run, the package and the Saturday card (draft, for Krish) - #980

Merged
github-actions[bot] merged 11 commits into
mainfrom
edition/weekly-edition
Nov 26, 2026
Merged

github-actions[bot] merged 11 commits into
mainfrom
edition/weekly-edition

Conversation

@krishanraja

@krishanraja krishanraja commented Nov 25, 2026 •

Copy link
Copy Markdown
Owner

The content-engine half of the weekly edition (growth-makeyourmindup docs/plans/2026-11-25-weekly-edition/, DESIGN.md and IMPLEMENTATION.md, approved by Krish on 25 Nov 2026 with every recommendation): items C3 to C8. One email a week, "makeyourmindup weekly", every Saturday at 08:00 New York, sent only on his press. Nothing in it sends, schedules, publishes or posts, and it dispatched no workflow; only his press sends.

C1 (the publish kit's web-only step) and C2 (the vendored subscribe route) are not in this pull request: scripts/post-pack/publish_kit.py, docs/AMPLIFICATION.md and vendor/ are untouched.

What changed

  • C3 config/weekly-edition.json. Every setting as a row: the name, Saturday 08:00 America/New_York, the two Friday firings, the news window (seven days to Friday 12:00 New York), the section order and heads, the word budgets (opener 2 to 4 sentences and 60 words, piece summaries 50 to 80, news items 1 or 2 sentences, 700 to 1,000 in all), six to ten news items with four to send, the good-news group (at most three), the topic heads read from config/beat.json focus_sectors by key (never copied, so a sector that joins the beat is a head at once), the link tags of growth's edition route exactly as the contract gives them, the copy rules, the library folder, the board press and the template (in the v5 Library, wired into render with the v5 Substack branding). Held to its shape by tests/edition_test.py, which also checks the tags against the vendored route once C2 brings the edition block.
  • C4 scripts/edition/edition.py. gather (the week's live series pieces from the board's view and each piece's record, Saturday's good-news stories, and the news candidates from the beat-filtered pool through GET /api/week/options include=sources, each placed under a topic head, in the window, off the avoid list as the headline gate reads it; --fixture reads the same three answers from files), link (the four tags for a place), check (the contract's shape and section order, word budgets, every news item's source_url, quote and checked_at, every own link's four tags with the right utm_content place, no em dash or en dash used as a dash, no exclamation mark, British spelling, never naming Krish, mind/make or CTRL, the copy lint and the publication's kill list from vendor/makeyourmindup/kill-list/; a package's bytes must be canonical), render (a plain, accessible preview: real text, lang="en-GB", headings, alt text, escaped, an appendix of what each item was checked against that is marked as not in the email; render(template=...) and the empty TEMPLATES registry are the hook for the v5 Library template, which is wired in with the v5 Substack branding, so nothing of it is copied or invented, and a template name is refused) and package (canonical bytes as the contract says, sha256, the preview, and the library layout with send.py's pack file). The library's path rule gained the edition label (config/library-paths.cases.json edition_label, scripts/post-pack/library.py, apps/control-plane/api/library/_library.ts), because the contract's folder, <date> Sat edition - makeyourmindup weekly, was refused as path_post_folder_invalid. Fixture week: the week of 9 Nov 2026, written by hand (tests/fixtures/edition/week-2026-11-09/): the three real pieces summarised in our own words from this repository's records; every news item, source and quote is invented on example.org.
  • C5 .github/workflows/weekly-edition.yml, scripts/weekly_edition.py, .agents/skills/weekly-edition/SKILL.md. Cron Friday 17:17 and 23:47 UTC, Run workflow (week, force) and repository_dispatch type weekly-edition. The guard reads the week's view and does nothing once Saturday carries the week's edition, unless forced; it exits 1 when it cannot read the board and 2 on a typed week that is not a Monday. Claude Code runs on CLAUDE_CODE_OAUTH_TOKEN through anthropics/claude-code-action, fenced like the good-news run: named scripts only (edition.py, engine.py GET, the copy lint, the kill list, board_session.py for reports), writes only under docs/plans/, no read of /proc, persist-credentials: false, contents: read, no secrets beyond the two the Claude workflows already use, nothing of the edition printed. The skill: gather, choose by the five qualifying rules of DESIGN.md section 3, open and read each primary source (an item whose source cannot be found or does not say what the item says is dropped, never softened; fewer than four items, or no live piece, holds the edition and the Saturday card says why), write in the publication's voice, check, render, package. After Claude stops, the workflow's own step takes only the draft, checks it again for that Saturday, draws its preview again, and files the two files into the guard's folder with send.py --as. The run writes records only: it builds, publishes or bumps no board (so tests/no-claude-routines.test.ts still holds the Sunday ideas run as the one scheduled board job), and the Saturday card shows the edition at its next read. It proposes; only his press sends.
  • C6 the Saturday card (contract 1.35.0, additive). apps/control-plane/api/board/_edition.ts reads the week's package from the library as the manifest is read (newest ready copy, bytes checked against the recorded sha256, every check passed) and puts it on Saturday's edition: subject, contents, pieces, news counts and sources, sha256, the draft and preview as same-site paths, and one press, Approve for send (picks/sat-edition, kind approve_send, bound to edition_sha256), in the states waiting, approved and changed. The press leads Saturday's actions, and the week model draws one Saturday item, kind edition, type post, with the press as its decision and the preview and draft as links. PUT picks/sat-edition bound to another sha256 is refused 409 edition_changed; a week with no edition or another Saturday 409 edition_not_found; only his login presses it. GET /api/board/<Monday>/edition[/draft|/preview] serves the item, the exact bytes (with X-Content-SHA256) and the preview to his login, the engine key or Growth's key (rewrites in apps/control-plane/vercel.json). view.schema.json and VIEW_CONTRACT_VERSION moved to 1.35.0 (check:view-contract: additive), and both fixtures were written again (UPDATE_VIEW_FIXTURE=1); the contract test's full week now carries an edition.
  • C7 docs. docs/CADENCE.md: the clock gains the Friday edition run, growth's Friday Substack draft, his press by Saturday 07:30 and the Saturday 08:00 send, and the Friday run joins the jobs that write records only. docs/GROWTH-HANDOFF.md: "The weekly edition package", the handoff to growth's Substack step (the shape, where it is, how to read it, the press and the 409, the links). docs/PUBLISH_BOARDS.md: the 1.35.0 entry and "The weekly edition on Saturday". NOW.md is not edited.
  • C8 now-notes/2026-11-25-weekly-edition.md (Status, Next, North Star check (2026-11-25): holds.). Also scripts/check_skill_core.py gives the new skill its byte cap.

C6: a new item kind, and why the off-day manifest could not carry it

The first choice was the off-day item and its Approve for publish bound to a manifest. It cannot carry the edition without breaking one of its own rules:

  1. That press is picks/<day>-publish, one document a day (OFFDAY_PUBLISH_ID), and Saturday's own post may need sat-publish; the edition would overwrite or be overwritten by it.
  2. It binds a piece: checkPublishBind reads the piece's content_ideas row and its making record's pack folder, and parseDraft takes only Growth's content-engine-piece-manifest/1 file list. The edition is no piece (making one would put a stand-in piece through the ideas gate, the archive and the North Star counts), and its package is the text growth's Substack step builds from.
  3. An off-day item reaches its day only through his Approve on its option (the ideas gate), so the edition would need two presses; it has one.

So the edition is its own item, built on the manifest's pattern: the same library read, the sha256 bind, the three states, the 409, his login only.

Tests run (on Windows, this machine)

  • python -m pytest -q tests/edition_test.py: 27 passed.
  • npx vitest run tests/control-plane/board-edition.test.ts: 11 passed (the package made by edition.py read by the board with the same sha256, the press states, the body contract, the 409s, the routes and the rewrites).
  • npx vitest run tests/control-plane (the whole folder): 2,550 passed, 2 failed on time only: engine-auth.test.ts "each one refuses a request that carries no credentials" times out at 5 s here and passes with --testTimeout=60000 (16 of 16), and make-route.test.ts passed when run on its own (it timed out only inside the full run).
  • npx vitest run tests/no-claude-routines.test.ts tests/control-plane/library-path.test.ts tests/control-plane/board-view-contract.test.ts tests/control-plane/board-week-model.test.ts tests/control-plane/board-manifest.test.ts: passed.
  • npm run typecheck:control-plane, npx tsx scripts/check-view-contract.ts (1.35.0, additive), npm run check:now-notes, python scripts/validate-skills.py, python scripts/check_skill_core.py, check-no-secrets, check_local_paths.py, capabilities.py --check, build.py --self-test (252) and send.py --self-test (39): passed. npm run verify:quick: npm run verify:quick: both typechecks and the related vitest run (46 targets, 90 files) passed; it then stopped at tests/idea_checks_test.py (test_the_real_kill_list_runs), a Windows-only encoding failure in code this pull request does not touch (the kill list is fed cp1252 without PYTHONUTF8). With PYTHONUTF8=1 that test and the remaining Python tests pass, and every remaining guard passes by hand except check:repo-map, which only warns on a pull request (main regenerates docs/REPO_MAP.md after the merge).
  • CI on this pull request runs the quick checks on Linux.

Left for a follow-up

  • C1 and C2 (their own pull requests; C1 waits on V1, C2 on growth's G1).
  • Growth reporting the edition scheduled and sent back to the board (the card's Scheduled and Sent steps).
  • A board press that starts the Friday run by hand (_run.ts job weekly-edition); Run workflow works today.
  • Control Centre: its pinned copy of the view contract (control-center tests/fixtures/board-view/) is behind 1.35.0; it draws the new field and kind generically until copied. The card and its press need no change there by reading its code (ItemCard draws any post item's kind label, line, https links and next press); his one list (api/_waiting.ts) does not carry the press yet (CC2).
  • The v5 Library's newsletter-weekly-edition template is not wired into render yet. The Library is on main and Krish locked its look on 25 Nov; wiring the template in is part of the v5 Substack branding, which lands before anything sends. The preview is structure only until then.
  • The dry run (decision 10) is a hand run of the workflow for the week of 2026-11-09 after the merge; nothing was dispatched here.

26 Nov: the news comes from the hub's daily editions

  • On 26 Nov Krish approved makeyourmindup.ai as a daily news hub. The coordinating session asked that the edition read a week of the hub's rows and run no gathering of its own.
  • New read route: GET /api/board/<Monday>/edition/news. It reads hub_snapshots from the Friday before the week to its Friday, and answers 503 hub_unavailable if the table can't be read.
  • Gather: reads that route instead of /api/week/options. It keeps items inside the news window, still applies the beat's avoid list, and lists each story once.
  • Heads: the hub's subsectors, read from config/hub-sources.json. A config row, leave_out, starts empty and can drop one. An edition carries at most two items a subsector.
  • Checks: each item is still checked against its own primary source.
  • Merge order: the hub pipeline merged on 26 Nov (Daily creative-industry hub for makeyourmindup.ai #982, 24638499), and this branch now sits on it: a merge commit keeps the earlier commits, and its tree is the edition's commits replayed on main. The six subsectors match the fixture's copy, and the test holding the copy to config/hub-sources.json runs and passes. The hub writes each story's date as a UTC day, so a week takes the stories dated Saturday to Friday. hub_snapshots holds its first row after 06:00 UTC on 27 Nov.
  • Sport is in: Krish approved the hub with its Sport room, so topic_heads.leave_out stays [] and every subsector the hub has is a head.
  • Plan docs: The weekly edition takes its news from the hub's daily editions growth-makeyourmindup#147.

26 Nov: brought up to date and ready

  • Merged main in. The only conflict was docs/REPO_MAP.md: main's copy, then regenerated with scripts/gen-repo-map.mjs.
  • config/weekly-edition.json template now points at the Library on main (docs/ve/cards/library/, newsletter-weekly-edition) and says wiring it into render is the next step, done with the v5 Substack branding. approved stays false and TEMPLATES stays empty, so render still draws structure only.
  • Two to four topics: the Library's template has four topic places and PRODUCTION-PLAYBOOK says two to four, so news.topics_min 2 and news.topics_max 4 are rows and edition.py check enforces them next to per_topic_max, the good-news group counting as one. The fixture week now runs four topics (Music and Gaming take the hub's second candidates; 705 words) and a test holds the bounds.
  • With at most two items a subsector, three good-news items and four topics, an edition holds at most nine items, under the ten the item cap allows.

🤖 Generated with Claude Code

…e Saturday card

The content-engine half of the weekly edition (growth-makeyourmindup
docs/plans/2026-11-25-weekly-edition/, approved by Krish on 25 Nov 2026),
items C3 to C8. Nothing here sends, schedules, publishes or posts.

- C3 config/weekly-edition.json: every setting as a row; topic heads read
  from config/beat.json by key; the link tags of growth's edition route.
- C4 scripts/edition/edition.py: gather, link, check, render (structure only;
  the v5 template is not approved and is not wired in), package (canonical
  bytes, sha256, library path). The library path rule takes the edition label.
- C5 .github/workflows/weekly-edition.yml (Friday 17:17 and 23:47 UTC),
  scripts/weekly_edition.py (the guard), .agents/skills/weekly-edition.
  Claude Code on CLAUDE_CODE_OAUTH_TOKEN, fenced like the good-news run;
  it writes records only and builds or bumps no board.
- C6 the Saturday card, view contract 1.35.0 (additive): the edition as its
  own item with one press, Approve for send (picks/sat-edition), bound to the
  draft's sha256; another sha256 is refused, 409 edition_changed. The off-day
  manifest's Approve for publish could not carry it: one press a day, bound
  to a piece's record and Growth's file manifest, reached only through a
  second press on an option.
- C7 docs/CADENCE.md, docs/GROWTH-HANDOFF.md, docs/PUBLISH_BOARDS.md.
- C8 now-notes/2026-11-25-weekly-edition.md.

Ruling (Krish, 2026-11-25): one email a week, "makeyourmindup weekly", every Saturday at 08:00 New York, sent only on his Approve for send.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
content-engine Ready Ready Preview Nov 26, 2026 3:09pm UTC

Request Review

Friday's piece usually goes live about 12:30 New York (17:30 UTC), so a
run that fired on time at 17:17 UTC would have drafted the edition without
it, and the guard would then have stopped the later run. The early run
moves to 20:17 UTC, and in that run only the skill holds without packaging
while a piece picked for the week is not live yet, so the 23:47 UTC run
drafts the edition with it. A run by hand, the later run, or a week with
no picked piece waiting goes on with what is live.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
krishanraja and others added 4 commits November 26, 2026 06:50
…its news

On 26 Nov Krish approved makeyourmindup.ai as a daily creative-industry news
hub ("just keep it focused on the subsectors"). The coordinating session
asked, through the story-engine session, that the weekly edition read a week
of the hub's rows and run no gathering of its own.

- GET /api/board/<Monday>/edition/news (_edition.ts readHubWeek), on the
  board's edition branch: hub_snapshots from the Friday before the week to
  its Friday, each item cut to what the edition reads, a bad row said as
  missing, 503 hub_unavailable when the table cannot be read. Read only.
- scripts/edition/edition.py gather reads it instead of /api/week/options:
  inside the news window, off the beat's avoid list, the same story once
  (its highest coverage and every day it ran), ordered by subsector, then
  coverage. Each item is still checked against its own primary source.
- config/weekly-edition.json: the topic heads are the hub's subsectors,
  read from config/hub-sources.json by key (topic_heads.leave_out, empty,
  can drop one); at most two items a subsector (news.per_topic_max), which
  check enforces; news.from_hub names the route and the rule.
- The skill (both copies), docs/PUBLISH_BOARDS.md, docs/CADENCE.md, the
  closeout note and docs/REPO_MAP.md say so.

config/hub-sources.json and hub_snapshots come with the hub pipeline
(hub/daily-pipeline), so this merges after it: until then the tests read the
fixture's copy of the six subsectors, and the test holding that copy to the
real file is skipped. The package contract (content-engine-edition/1) is
unchanged. Nothing sends, schedules or publishes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e Saturday card

The content-engine half of the weekly edition (growth-makeyourmindup
docs/plans/2026-11-25-weekly-edition/, approved by Krish on 25 Nov 2026),
items C3 to C8. Nothing here sends, schedules, publishes or posts.

- C3 config/weekly-edition.json: every setting as a row; topic heads read
  from config/beat.json by key; the link tags of growth's edition route.
- C4 scripts/edition/edition.py: gather, link, check, render (structure only;
  the v5 template is not approved and is not wired in), package (canonical
  bytes, sha256, library path). The library path rule takes the edition label.
- C5 .github/workflows/weekly-edition.yml (Friday 17:17 and 23:47 UTC),
  scripts/weekly_edition.py (the guard), .agents/skills/weekly-edition.
  Claude Code on CLAUDE_CODE_OAUTH_TOKEN, fenced like the good-news run;
  it writes records only and builds or bumps no board.
- C6 the Saturday card, view contract 1.35.0 (additive): the edition as its
  own item with one press, Approve for send (picks/sat-edition), bound to the
  draft's sha256; another sha256 is refused, 409 edition_changed. The off-day
  manifest's Approve for publish could not carry it: one press a day, bound
  to a piece's record and Growth's file manifest, reached only through a
  second press on an option.
- C7 docs/CADENCE.md, docs/GROWTH-HANDOFF.md, docs/PUBLISH_BOARDS.md.
- C8 now-notes/2026-11-25-weekly-edition.md.

Ruling (Krish, 2026-11-25): one email a week, "makeyourmindup weekly", every Saturday at 08:00 New York, sent only on his Approve for send.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Friday's piece usually goes live about 12:30 New York (17:30 UTC), so a
run that fired on time at 17:17 UTC would have drafted the edition without
it, and the guard would then have stopped the later run. The early run
moves to 20:17 UTC, and in that run only the skill holds without packaging
while a piece picked for the week is not live yet, so the 23:47 UTC run
drafts the edition with it. A run by hand, the later run, or a week with
no picked piece waiting goes on with what is live.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…its news

On 26 Nov Krish approved makeyourmindup.ai as a daily creative-industry news
hub ("just keep it focused on the subsectors"). The coordinating session
asked, through the story-engine session, that the weekly edition read a week
of the hub's rows and run no gathering of its own.

- GET /api/board/<Monday>/edition/news (_edition.ts readHubWeek), on the
  board's edition branch: hub_snapshots from the Friday before the week to
  its Friday, each item cut to what the edition reads, a bad row said as
  missing, 503 hub_unavailable when the table cannot be read. Read only.
- scripts/edition/edition.py gather reads it instead of /api/week/options:
  inside the news window, off the beat's avoid list, the same story once
  (its highest coverage and every day it ran), ordered by subsector, then
  coverage. Each item is still checked against its own primary source.
- config/weekly-edition.json: the topic heads are the hub's subsectors,
  read from config/hub-sources.json by key (topic_heads.leave_out, empty,
  can drop one); at most two items a subsector (news.per_topic_max), which
  check enforces; news.from_hub names the route and the rule.
- The skill (both copies), docs/PUBLISH_BOARDS.md, docs/CADENCE.md, the
  closeout note and docs/REPO_MAP.md say so.

config/hub-sources.json and hub_snapshots come with the hub pipeline
(hub/daily-pipeline), so this merges after it: until then the tests read the
fixture's copy of the six subsectors, and the test holding that copy to the
real file is skipped. The package contract (content-engine-edition/1) is
unchanged. Nothing sends, schedules or publishes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
krishanraja and others added 2 commits November 26, 2026 07:10
The hub pipeline merged (#982, 2463849): its subsectors are the six the
fixture copies, and the test holding the copy to config/hub-sources.json
now runs and passes. The hub writes each story's date as its day
(YYYY-MM-DD, UTC; lib/hub/snapshot.ts z.iso.date()), which the news window
reads as that day's start, so a week takes the stories dated Saturday to
Friday and each day falls in exactly one week. The fixture now carries days,
as the hub does, and config/weekly-edition.json says so. docs/REPO_MAP.md
regenerated on top of main, the hub's routes included. The closeout note
says the hub merged and this is on top of it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The branch is brought onto main after the hub merged (2463849), keeping the
pull request's earlier commits: this tree is the edition's three commits
replayed on main, plus the fix that reads the hub's story dates as days.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Krish, 26 Nov 2026: "substack weekly should be sent to ALL subscribers".
The handoff contract names the audience (Substack's Everyone; a new post
on this publication starts as paid subscribers only), and the skill says so
in one line, inside its byte cap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
krishanraja and others added 2 commits November 26, 2026 14:53
…erated)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… the locked Library

The locked v5 Library's newsletter-weekly-edition has four topic places (topic_0 to topic_3) and
PRODUCTION-PLAYBOOK says two to four topics, so config/weekly-edition.json now carries
news.topics_min 2 and topics_max 4 and edition.py check enforces them next to per_topic_max, the
good-news group counting as one. The fixture week now runs four topics (Music and Gaming take the
hub's second candidates) and a test holds the bounds.

The template row now points at the Library on main and says the template is wired into render as
part of the v5 Substack branding, before anything sends. Render stays structure only and TEMPLATES
stays empty. The skill, GROWTH-HANDOFF and the closeout note say the same.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@krishanraja
krishanraja marked this pull request as ready for review November 26, 2026 15:08
@github-actions
github-actions Bot merged commit def4af2 into main Nov 26, 2026
9 checks passed

This branch was successfully deployed

1 active deployment
Preview — fdcf3751 Deployed Nov 26, 2026 by vercel[bot]
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