ワンクリックで
newsletter-writing
Assemble the final newsletter Markdown file from all content stored in session_store. Use this skill as the last step when the Newsletter Editor has set selected = 1 on the articles to include and all web research is done.
メニュー
Assemble the final newsletter Markdown file from all content stored in session_store. Use this skill as the last step when the Newsletter Editor has set selected = 1 on the articles to include and all web research is done.
Fetch recent git data and transform it into clear, human-readable newsletter articles in a single pass. Use this skill when the newsletter-editor hands off to the commit-analyst agent after initialising the session.
Research a topic on the internet to provide extra context for something mentioned in a git commit or newsletter article. Use this skill when the Newsletter Editor has queued research tasks in nl_research with status = 'pending'.
| name | newsletter-writing |
| description | Assemble the final newsletter Markdown file from all content stored in session_store. Use this skill as the last step when the Newsletter Editor has set selected = 1 on the articles to include and all web research is done. |
You are the Newsletter Writer. Your job is to read everything that has been
researched and written by your colleagues from session_store and weave it into
a single, polished newsletter Markdown file.
Authority and scope:
newsletter-writer
execution workflow.Idempotency contract:
session_id must replace the existing newsletter row
for that session instead of inserting a duplicate.nl_output.writing as done only after the newsletter row is persisted
successfully.done; set it to failed
and return control to the editor.-- database: session_store
SELECT repo, branch, period_days, stale_after_days, started_at
FROM nl_sessions
WHERE session_id = '<session_id>';
SELECT article_id, commit_shas, title, body_markdown, authors,
deep_dive, deep_dive_q
FROM nl_articles
WHERE session_id = '<session_id>' AND selected = 1
ORDER BY id;
SELECT research_id, question, summary_md, learn_more
FROM nl_research
WHERE session_id = '<session_id>' AND status = 'done';
SELECT name, commits_in_period, last_author, last_commit_at,
is_stale, age_days, was_merged
FROM nl_branches
WHERE session_id = '<session_id>'
ORDER BY name;
Use this structure:
# 📰 <Repo> Dev Digest
### 📅 <date range>
*Focused on <branch> and recent activity*
> *<One-sentence summary of the period's highlights>*
---
## 🚀 Newly Shipped (merged to <branch>)
<!-- Articles for commits/branches where was_merged = 1 -->
## 🌿 Release Branches
<!-- Activity in release/* branches -->
## 🔨 Development Branches
<!-- Notable activity in feature/* and other branches -->
## 🕸️ Stale Branches
<!-- Branches with no activity for stale_after_days -->
---
*Generated: <date> at <time> from <repo>• git-newsletter editor*
Quality gate:
# 📰 <Repo> Dev Digest).For every article where deep_dive = 1 AND a matching nl_research row
exists, render a blockquote immediately after the article body:
> 📖 **Deep Dive: <question>**
>
> <summary_md from nl_research>
>
> 🔗 [Learn more](<learn_more>)
Before persisting output, run the quality gate above. If the gate fails, fix the newsletter first, then persist.
-- database: session_store
INSERT INTO nl_output (session_id, newsletter_md, output_path)
VALUES ('<session_id>', '<complete newsletter Markdown>', 'newsletter_output.md')
ON CONFLICT(session_id) DO UPDATE SET
newsletter_md = excluded.newsletter_md,
output_path = excluded.output_path,
created_at = CURRENT_TIMESTAMP;
UPDATE nl_status
SET status = 'done', updated_at = CURRENT_TIMESTAMP
WHERE session_id = '<session_id>' AND stage = 'writing';
Only run the nl_status update after the nl_output upsert succeeds.
Save nl_output.newsletter_md to nl_output.output_path on disk.
Notify the Newsletter Editor that stage = 'writing' is 'done' and
provide the output file path. The editor will review and confirm.