dreaming
Knowledge consolidation cycle that analyzes collected articles and updates the wiki with significant findings while enforcing duplicate checks.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Knowledge consolidation cycle that analyzes collected articles and updates the wiki with significant findings while enforcing duplicate checks.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
| name | dreaming |
| description | Knowledge consolidation cycle that analyzes collected articles and updates the wiki with significant findings while enforcing duplicate checks. |
| category | research |
| version | 2.0.0 |
| author | Hermes Agent |
Automated consolidation process that analyzes recently collected articles and folds significant findings into the wiki knowledge base. Includes mandatory duplicate-check against adjacent scheduled jobs.
Based on the "context substrate" philosophy (Camp 2, per @witcheer 2026-04-16): memory isn't fact storage, it's structured context that compounds over time. Camp 2 tools solve compounding via read-context→work→write-back loops. This dreaming cycle follows Camp 2: wiki files are the source of truth, not hidden vector state.
Phase 1: Data Collection (pre-run script)
~/ai-topics/scripts/dreaming.pyPhase 2: Knowledge Consolidation (LLM processing)
Before processing, review what adjacent scheduled jobs have already completed:
Duplicate-check rules:
Score each theme/group using weighted signals WITHOUT newsjacking bias:
Promotion thresholds:
CRITICAL: This phase is for knowledge consolidation, not distribution selection. Do NOT apply newsjacking filtering here — capture everything that meets the threshold.
After flat synthesis, apply Newsjacking lens to select what to deliver/report:
Newsjacking Signal Scoring (0-5):
Delivery prioritization:
This two-stage approach ensures:
For each promoted theme:
updated date in frontmatterwiki/index.mdwiki/log.mdcd ~/ai-topics && git add wiki/ && git commit -m "dreaming: consolidation YYYY-MM-DD" && git pushname: Dreaming
schedule: "<configured cron schedule>"
script: dreaming.py
skill: dreaming
deliver: "discord:1233771389367095377:1491801814222504169"
After processing, deliver a summary like:
# Dreaming Report — YYYY-MM-DD
## Duplicate Check Summary
- Items skipped (already processed by other jobs): N
- Gaps filled: N
- Overlapping areas identified: [list]
## Consolidation Summary
- Articles processed: N
- Themes identified: N
- Pages created: N
- Pages updated: N
## New Wiki Pages
- [[concepts/new-page]]: Brief description
## Updated Pages
- [[entities/existing]]: What changed
After Phase A identifies themes meeting the promotion threshold (score ≥ 0.65), do NOT automatically create/update wiki pages. First perform a depth check:
~/wiki/raw/articles/) matching the theme's URLs or titles to see if content was already ingestedRationale: The dreaming checkpoint aggregates articles across 2+ day windows. By the time the dreaming cycle runs, the daily RSS pipeline or newsletter-ingest may have already processed many of these articles. The wiki's existing pages may already reflect the key insights.
When processing articles from newsletters (substack, beehiiv, etc.), apply these filters BEFORE scoring:
| Signal Type | Pattern | Action |
|---|---|---|
| Substack UI | play_audio=, post-comment, submitLike=, share=, redirect/app-store | Skip |
| Substack UI | utm_campaign=email-read-in-app, @username mentions | Skip |
| Redirect chains | substack.com/redirect/UUID | Try web_extract or skip if no body |
| Beehiiv tracking | link.mail.beehiiv.com/v1/c/... | Extract destination via web_extract |
| Duplicate URLs | Same raw_article_path appearing multiple times | Deduplicate — process once |
When articles reference recurring people/companies without dedicated entity pages:
search_files "name" path=~/wiki/entities target=filesBefore creating or updating any page, check ALL sources:
| Check | Method | What it catches |
|---|---|---|
| Filename | search_files "name" path=~/wiki/entities | Exact matches |
| Index entry | Read wiki/index.md slug_lookup | Catalogued under different name |
| Content grep | search_files "name" target=content path=~/wiki | Mentioned inside other pages |
| Recent sessions | session_search "name" | Processed in previous dreaming cycles |
Duplicate detection is MANDATORY — never re-process what other jobs handled
Don't create pages for everything — follow the scoring thresholds
Always check existing pages first — avoid duplicates
Cross-references are mandatory — isolated pages are useless
Commit in the same session — don't leave changes uncommitted
Report what changed — user needs to know what happened
Handle contradictions explicitly — don't silently overwrite
Keep pages scannable — split if over 200 lines
Update index.md and log.md — navigation backbone
Database Schema Constraints: blogwatcher-cli.db articles table uses published_date or discovered_date, is_read is integer 0/1, categories is JSON array
Script Execution: dreaming.py outputs JSON to stdout. If it times out, cron still fires but with missing context
Pre-run Script JSON Parse Failure: When the pre-run script outputs {"ok": false, "error": "failed to parse JSON response from dreaming-group output"}, the grouped themes are still available as a fallback at /opt/data/.hermes/cron/data/dreaming/grouped_themes_latest.json. Read this file directly to extract themes, articles, and run metadata. The checkpoint data is valid even when ok is false — it contains the same structure as a successful run. Do NOT stop processing; extract themes from the fallback file and proceed.
Stale Dreaming Themes: The dreaming checkpoint may be 2-3 days old by the time the cycle runs. Themes identified in the checkpoint may have been processed by the daily RSS pipeline, newsletter-ingest, or other adjacent jobs in the interim. Cross-reference raw article file dates (~/wiki/raw/articles/) and recent log.md entries to avoid re-processing. If a theme's key article was already fetched and corresponded to an existing wiki page with adequate coverage, skip the update.
Log.md Corruption via Patch: When using patch on log.md, the read_file output format (LINE|content) can cause accidental | prefix insertion. This happens because the patch old_string may include a pipe character from the read_file separator. Fix: Always verify log.md formatting after patching by re-reading the file. If ||- appears instead of - at the start of a bullet line, run a corrective patch. To prevent: when reading log.md, mentally subtract the LINE| prefix before constructing old_string values.
Comprehensive wiki health checking, maintenance, and remediation — duplicate detection, entity dedup/disambiguation, link auditing/fixing, page splitting, source-linking lint, wikilink remediation, tag taxonomy audit and normalization, pre-commit enforcement, language enforcement (JP→EN bulk translation, detection regex, cron-assisted migration), and decision-matrix-driven cleanup.
Comprehensive wiki maintenance: daily structural health checks (index reconciliation, log separator fixes, pipeline watchdog alerts), comparison page updates (adding items to multi-section comparison tables), and page relocation (moving/renaming pages while maintaining link integrity).
Pre-flight checklist and procedures for archiving, deleting, or migrating Hermes skills. Prevents accidental removal of cron-referenced skills. Covers the 3-layer skill structure and config.yaml management. Includes skill inventory management, promotion workflows, and archival conventions.
Karpathy's LLM Wiki: build/query interlinked markdown KB.
Deep analysis of blog authors' recent thoughts, philosophy, and positions. Goes beyond entity page creation to extract cited ideological positions, track thought evolution, and enable ongoing RSS monitoring for thought updates.
Query the blogwatcher-cli SQLite database for RSS scan results. Use pre-verified column names and query templates to avoid errors.