Skip to content

Picrew/Daily-blog

Repository files navigation

Daily Blog (Karpathy 90)

Daily high-signal digest from 90 curated engineering blogs, with multilingual output support.

English | 简体中文


What This Project Does

Daily Blog fetches posts from the Karpathy 90 source pool, runs a two-stage AI curation pipeline, and generates:

  • content/digests/YYYY-MM-DD.md
  • content/digests/YYYY-MM-DD.json
  • content/digests/YYYY-MM-DD.report.json
  • content/digests/index.json

The web app reads JSON artifacts and renders digest/archive/source/tag pages.

Quick Start (TypeScript Backend)

pnpm install
cp .env.example .env
# fill real provider API keys in .env
pnpm --filter @daily-blog/runner digest --date today -zh

Python AI Backend Setup (pip + venv)

python3 -m venv .venv
source .venv/bin/activate
pip install -r packages/ai-worker-py/requirements.txt

Run with Python backend:

DAILY_BLOG_PYTHON_BIN=$(pwd)/.venv/bin/python \
pnpm --filter @daily-blog/runner digest --date today --ai-backend python

CLI Usage

Basic

pnpm --filter @daily-blog/runner digest --date today -zh
pnpm --filter @daily-blog/runner digest --date 2026-02-14
pnpm --filter @daily-blog/runner digest --from 2026-02-10 --to 2026-02-14

Language Output

pnpm --filter @daily-blog/runner digest --date 2026-02-16 -zh
pnpm --filter @daily-blog/runner digest --date 2026-02-16 -en
pnpm --filter @daily-blog/runner digest --date 2026-02-16 --lang ja

Language precedence:

  1. -zh maps to zh-CN
  2. -en maps to en
  3. --lang <tag> supports any BCP-47-like language tag (for example ja, fr, de)

Model Override (--model)

pnpm --filter @daily-blog/runner digest --date today --model deepseek-reasoner
pnpm --filter @daily-blog/runner digest --date 2026-02-14 --model deepseek-chat
pnpm --filter @daily-blog/runner digest --from 2026-02-10 --to 2026-02-14 --model kimi-k2.5

Backend Override (--ai-backend)

pnpm --filter @daily-blog/runner digest --date today --ai-backend ts
DAILY_BLOG_PYTHON_BIN=$(pwd)/.venv/bin/python \
pnpm --filter @daily-blog/runner digest --date today --ai-backend python --model deepseek-reasoner

Runtime Policy Options

pnpm --filter @daily-blog/runner digest --date today --policy config/run-policy.json --coverage-mode warn
pnpm --filter @daily-blog/runner digest --date today --fetch-retries 2 --max-window-hours 96
pnpm --filter @daily-blog/runner digest --date today --hours 48 --topN 12
pnpm --filter @daily-blog/runner digest --date today --dry-run

--dry-run validates the full pipeline but does not write md/json/report/index files.

Run Policy

config/run-policy.json controls quality and throughput:

  • candidate thresholds and auto-window expansion (48 -> 72 -> 96)
  • low-coverage behavior (warn or error)
  • fetch retries and cache TTL
  • quality eligibility and category mix constraints
  • AI execution profile (batch sizes, concurrency, provider limits)

Prompt Skill (File-first)

Prompt templates live in:

  • skills/prompt-editorial/references/scoring.zh.md
  • skills/prompt-editorial/references/scoring.en.md
  • skills/prompt-editorial/references/synthesis.zh.md
  • skills/prompt-editorial/references/synthesis.en.md
  • skills/prompt-editorial/references/highlights.zh.md
  • skills/prompt-editorial/references/highlights.en.md
  • skills/prompt-editorial/references/style-guard.zh.md
  • skills/prompt-editorial/references/style-guard.en.md
  • skills/prompt-editorial/references/banned-lexicon.zh.txt
  • skills/prompt-editorial/references/banned-lexicon.en.txt

Runtime strategy is file-first with built-in fallback. For a new language, add files with the same key pattern (for example synthesis.ja.md). Missing prompt files are recorded in report.json warnings.

Model and Env Configuration

Supported provider env prefixes:

  • OPENROUTER_*
  • SILICONFLOW_*
  • MOONSHOT_*
  • DEEPSEEK_*
  • MINIMAX_*

Default model pipeline is in config/model-pipeline.json.

Precedence:

  1. --model overrides scoringModel, summaryModel, and insightModel for that run.
  2. Without --model, values come from config/model-pipeline.json.
  3. fallbackModels are still used.

Testing and Verification

pnpm test
pnpm --filter @daily-blog/web build
DAILY_BLOG_PYTHON_BIN=$(pwd)/.venv/bin/python \
pnpm --filter @daily-blog/runner digest --date today --ai-backend python --model deepseek-reasoner

Troubleshooting

  • Python worker fails to start:
    • ensure .venv exists and packages/ai-worker-py/requirements.txt is installed
    • set DAILY_BLOG_PYTHON_BIN to the venv python path
  • Protocol timeout (python-worker-timeout):
    • increase ai.requestTimeoutMs in config/run-policy.json
    • reduce ai.synthesisConcurrency for slower models
  • Model/provider mismatch:
    • verify the required key (for example DEEPSEEK_API_KEY) exists in .env
  • High fallback ratio in report:
    • inspect runtimeMetrics.aiCalls.synthesisFallbackCount
    • lower synthesis batch size or switch to a more stable summary model

License

MIT

About

Daily Chinese tech digest from Karpathy’s 90 curated blogs, with AI ranking, link analysis, and a static web reader. | 基于 Karpathy 精选 90 个博客的中文每日技术摘要,包含 AI 排序、链接分析和静态阅读站。

Resources

Stars

Watchers

Forks

Packages