| name | horizon-digest |
| description | Generate a technical information digest from configured web sources using deterministic local scripts for fetching, filtering, validation, rendering, and optional JSON-configured webhook delivery, while the active agent performs scoring, topic deduplication, and enrichment from staged JSON artifacts. Use when asked to create a daily/weekly technical digest, rank fetched source items, produce scored_items/enriched_items artifacts, render a Chinese or English Markdown digest, or push the rendered digest through a configured webhook from RSS, Hacker News, GitHub, Reddit, or OSS Insight sources. |
Horizon Digest
Overview
Build a digest as a staged artifact workflow. Scripts do deterministic work: fetch, normalize, merge URLs, pack batches, validate JSON, filter, render Markdown, and optionally send the rendered digest to a webhook. The active agent performs the judgment steps by reading staged JSON and writing strict JSON artifacts.
Keep the workflow portable across coding agents. Do not assume one agent product, model API, connector, or host app.
Workflow
- Create a run directory, usually
work/horizon-digest/<YYYYMMDD-HHMMSS>/.
- Choose or create a config JSON. If the user does not provide one, use
references/source-config.md as the template.
- Fetch source items:
python <skill>/scripts/fetch_sources.py --config <config.json> --out <run>/raw_items.json --meta-out <run>/meta.json
- Merge exact URL duplicates:
python <skill>/scripts/merge_url_duplicates.py --items <run>/raw_items.json --out <run>/merged_items.json
- Pack scoring batches:
python <skill>/scripts/pack_scoring_batches.py --items <run>/merged_items.json --out-dir <run>/scoring-batches --batch-size 10
- Read
references/scoring-rubric.md and the generated scoring batches. Write one scores.json containing id, ai_score, ai_reason, ai_summary, and ai_tags for every item.
- Validate and merge scores:
python <skill>/scripts/validate_scored_items.py --items <run>/merged_items.json --scores <run>/scores.json --out <run>/scored_items.json
- Read
references/topic-dedup-rules.md, inspect scored_items.json, and write topic_duplicates.json only when duplicate groups exist.
- Apply topic deduplication:
python <skill>/scripts/apply_topic_dedup.py --items <run>/scored_items.json --duplicates <run>/topic_duplicates.json --out <run>/deduped_items.json
- Apply threshold, category quotas, and max item cap:
python <skill>/scripts/filter_items.py --config <config.json> --items <run>/deduped_items.json --out <run>/filtered_items.json
- Pack enrichment batches:
python <skill>/scripts/pack_enrichment_batches.py --items <run>/filtered_items.json --out-dir <run>/enrichment-batches --batch-size 5
- Read
references/enrichment-style.md and write enrichment.json for every filtered item.
- Validate and merge enrichment:
python <skill>/scripts/validate_enriched_items.py --items <run>/filtered_items.json --enrichment <run>/enrichment.json --out <run>/enriched_items.json --language zh
- Render Markdown:
python <skill>/scripts/render_summary.py --config <config.json> --items <run>/enriched_items.json --meta <run>/meta.json --out <run>/summary-zh.md --language zh
When --date is omitted, render and webhook scripts use the UTC+8 digest date. Pass --date YYYY-MM-DD only when the digest should be labeled with a specific date.
- If
webhook.enabled is true in the config, send the rendered summary through the configured webhook:
python <skill>/scripts/send_webhook.py --config <config.json> --summary <run>/summary-zh.md --items <run>/enriched_items.json --meta <run>/meta.json --out <run>/webhook_result.json --language zh
If the webhook URL is provided through webhook.url_env, run the command in an environment where that variable is already loaded. If the variable is only set by shell startup files, invoke the command through that shell so the variable is visible.
- Report artifact paths, counts, selected items, source warnings, and
webhook_result.json when webhook delivery was attempted.
Judgment Artifacts
Use strict JSON for agent-written files. Do not include Markdown fences in JSON artifacts.
scores.json: see references/schemas.md.
topic_duplicates.json: see references/topic-dedup-rules.md.
enrichment.json: see references/enrichment-style.md.
After writing each agent-generated JSON file, run the matching validator before continuing.
Resource Guide
references/source-config.md: config shape and a starter config.
references/schemas.md: item and artifact schemas.
references/scoring-rubric.md: importance scoring rules.
references/topic-dedup-rules.md: semantic duplicate grouping rules.
references/enrichment-style.md: bilingual enrichment fields and writing style.
references/summary-format.md: rendered Markdown structure.