Daily Newsletter
Daily Newsletter is a local-first Daily Inbox operating pipeline. It fetches source material, normalizes it to one-item Markdown, lets AI perform event understanding/merge/selection/writing, finalizes Markdown/HTML/PNG artifacts, records source health, and optionally sends the complete digest to Feishu.
When To Use
Use this skill when the user asks to:
- run or verify the daily AI newsletter pipeline;
- debug missing, late, or degraded source items;
- inspect Feishu delivery or local sent artifacts;
- change reader-facing Daily Inbox output;
- review pipeline health, workflow graph, task graph, or regression invariants;
- package this repository as a public agent skill.
Do not use this skill for unrelated newsletter copywriting, generic RSS advice, or live content scraping outside this repository.
Inputs
- Repo root: the
daily-newsletter checkout.
- Source registry:
$PARKIO_HOME/_source management/sources.md.
- Runtime data:
$PARKIO_HOME/_inbox/{raw,unprocessed,processed}.
- Sent artifacts:
$PARKIO_HOME/001_daily newsletter/ai/.
- Secrets: env vars or
$PARKIO_HOME/_secrets/*.
- Optional auth/runtime tools: X auth env, YouTube cookies, content-toolkit, Chrome, MLX Whisper. WeWe RSS is retired and is not a production dependency.
Default $PARKIO_HOME is ~/park-io.
Workflow
- Read
README.md, AGENTS.md, and GOTCHAS.md before changing behavior.
- Check git state and preserve uncommitted user changes.
- For read-only diagnosis, start with generated artifacts and logs before rerunning production commands.
- For public verification, run:
python3 -m pytest -q
python3 scripts/task_graph_validate.py
python3 scripts/workflow_graph_validate.py
python3 scripts/workflow_graph_dry_run.py
python3 scripts/n8n_import_diff.py
- For a manual production run, use the staged path:
./fetch-all.sh
python3 stages/to_md/run.py
BATCH=$(python3 stages/coarse_filter/run.py | tail -1)
PARKIO_BATCH_ID=$BATCH python3 build-digest.py
PARKIO_BATCH_ID=$BATCH python3 stages/archive/run.py
PARKIO_BATCH_ID=$BATCH python3 finalize-local.py
python3 build-product-radar.py --date "$(date +%F)"
python3 build-daily-bundle.py --date "$(date +%F)"
python3 reader_quality.py --date "$(date +%F)"
python3 send-feishu-digest.py --date "$(date +%F)"
- After any reader-facing or routing change, rerun tests and at least the workflow graph validator.
Outputs
processed/<YY-MM-DD>/run-report.json
processed/receipts/feishu/*.json
sent/YY-MM-DD.{md,html,png}
sent/deep-YY-MM-DD.{md,html,png} when deep candidates exist
sent/product-radar-YY-MM-DD.{md,html,png}
sent/daily-YY-MM-DD.{md,html,png}
status.html and source-health JSON for operator visibility
Safety
- Never print or commit API keys, cookies, Feishu webhook secrets, Telegram tokens, or X auth values.
- Do not send Feishu or Telegram messages unless the user explicitly asks for delivery or the current task is a delivery verification.
- Do not hide source failures as "no updates"; use
channel-health.py, run-report.json, and status artifacts.
- Do not create fake successful newsletters when AI JSON or final Markdown structure fails.
- Do not move content judgment from AI prompts into deterministic script thresholds, except for coarse garbage filtering.
- Do not rewrite HTML or PNG separately from Markdown; Markdown is the single reader-facing source.
Regression Invariants
GOTCHAS.md is the source of truth. The most important invariants are:
- AI owns merge, score, classification, selection, and final writing.
- Structural AI output failures stop the run and write error artifacts.
- Deep reads must be traceable subsets of the brief universe.
- Product Radar is a separate product lane and is linked by the daily umbrella.
- Source Health stays in status/run-report/alerts, not inside the consumer digest body.
1---2name: daily-newsletter3description: Operate, verify, or improve a local-first Daily Inbox pipeline that turns source feeds, X, media, manual links, and saved items into Chinese Markdown/HTML/PNG artifacts plus Feishu delivery receipts. Use when a user asks to run, debug, review, package, or extend the daily-newsletter / Daily Inbox workflow.4---56# Daily Newsletter78Daily Newsletter is a local-first Daily Inbox operating pipeline. It fetches source material, normalizes it to one-item Markdown, lets AI perform event understanding/merge/selection/writing, finalizes Markdown/HTML/PNG artifacts, records source health, and optionally sends the complete digest to Feishu.910## When To Use1112Use this skill when the user asks to:1314- run or verify the daily AI newsletter pipeline;15- debug missing, late, or degraded source items;16- inspect Feishu delivery or local sent artifacts;17- change reader-facing Daily Inbox output;18- review pipeline health, workflow graph, task graph, or regression invariants;19- package this repository as a public agent skill.2021Do not use this skill for unrelated newsletter copywriting, generic RSS advice, or live content scraping outside this repository.2223## Inputs2425- Repo root: the `daily-newsletter` checkout.26- Source registry: `$PARKIO_HOME/_source management/sources.md`.27- Runtime data: `$PARKIO_HOME/_inbox/{raw,unprocessed,processed}`.28- Sent artifacts: `$PARKIO_HOME/001_daily newsletter/ai/`.29- Secrets: env vars or `$PARKIO_HOME/_secrets/*`.30- Optional auth/runtime tools: X auth env, YouTube cookies, content-toolkit, Chrome, MLX Whisper. WeWe RSS is retired and is not a production dependency.3132Default `$PARKIO_HOME` is `~/park-io`.3334## Workflow35361. Read `README.md`, `AGENTS.md`, and `GOTCHAS.md` before changing behavior.372. Check git state and preserve uncommitted user changes.383. For read-only diagnosis, start with generated artifacts and logs before rerunning production commands.394. For public verification, run:4041```bash42python3 -m pytest -q43python3 scripts/task_graph_validate.py44python3 scripts/workflow_graph_validate.py45python3 scripts/workflow_graph_dry_run.py46python3 scripts/n8n_import_diff.py47```48495. For a manual production run, use the staged path:5051```bash52./fetch-all.sh53python3 stages/to_md/run.py54BATCH=$(python3 stages/coarse_filter/run.py | tail -1)55PARKIO_BATCH_ID=$BATCH python3 build-digest.py56PARKIO_BATCH_ID=$BATCH python3 stages/archive/run.py57PARKIO_BATCH_ID=$BATCH python3 finalize-local.py58python3 build-product-radar.py --date "$(date +%F)"59python3 build-daily-bundle.py --date "$(date +%F)"60python3 reader_quality.py --date "$(date +%F)"61python3 send-feishu-digest.py --date "$(date +%F)"62```63646. After any reader-facing or routing change, rerun tests and at least the workflow graph validator.6566## Outputs6768- `processed/<YY-MM-DD>/run-report.json`69- `processed/receipts/feishu/*.json`70- `sent/YY-MM-DD.{md,html,png}`71- `sent/deep-YY-MM-DD.{md,html,png}` when deep candidates exist72- `sent/product-radar-YY-MM-DD.{md,html,png}`73- `sent/daily-YY-MM-DD.{md,html,png}`74- `status.html` and source-health JSON for operator visibility7576## Safety7778- Never print or commit API keys, cookies, Feishu webhook secrets, Telegram tokens, or X auth values.79- Do not send Feishu or Telegram messages unless the user explicitly asks for delivery or the current task is a delivery verification.80- Do not hide source failures as "no updates"; use `channel-health.py`, `run-report.json`, and status artifacts.81- Do not create fake successful newsletters when AI JSON or final Markdown structure fails.82- Do not move content judgment from AI prompts into deterministic script thresholds, except for coarse garbage filtering.83- Do not rewrite HTML or PNG separately from Markdown; Markdown is the single reader-facing source.8485## Regression Invariants8687`GOTCHAS.md` is the source of truth. The most important invariants are:8889- AI owns merge, score, classification, selection, and final writing.90- Structural AI output failures stop the run and write error artifacts.91- Deep reads must be traceable subsets of the brief universe.92- Product Radar is a separate product lane and is linked by the daily umbrella.93- Source Health stays in status/run-report/alerts, not inside the consumer digest body.