agentsclimarketplace

Lythoskill dreaming

Skill lythos-labs/lythoskill/skills/lythoskill-dreaming

夜有所梦 — project memory consolidation. Daily (scribe) captures raw experience, weekly extracts patterns and anomalies, dreaming consolidates the accumulated memory into SSOT. External review via ZK subagent (the same de facto standard pattern used by Hermes Curator's forked-agent review), with cross-model validation via arena for critical docs.From its SKILL.md

Install
npx -y skills add lythos-labs/lythoskill --skill lythoskill-dreaming

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • 3 stars3 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
  • runs commandsInstructs the agent to run 7 commands, including `ls weekly/ | sort` and 6 more.

SKILL.md

6.8 KB, ~1.7k tokens by cl100k_base, as published. Nobody here has run it

Dreaming — 夜有所梦

日有所思(daily + weekly),夜有所梦(dreaming → SSOT)。 Scan → Consolidate → ZK Validate. Extract the "currently true" from scattered docs.

The Project's Memory System

Project documentation works like human memory:

LayerToolWhat it does
日有所思 — 经历scribe dailyRaw session capture: what was done, what was decided, what went wrong
日有所思 — 复盘scribe weeklyCross-session pattern extraction: core threads, anomalies, docs now stale
夜有所梦 — 巩固dreamingMemory consolidation: extract "currently true" from accumulated docs → SSOT

Daily 不是流水账,weekly 不是 daily 的汇总。Daily 是 session 级 raw experience,weekly 是跨 session 的模式识别(core_thread、anomaly、docs_now_stale)——本质上是在反腐:发现漂移、标记腐烂、追踪 gap 收敛。Dreaming 是在积累了足够的 daily + weekly 之后,把分散在 wiki/ADR/daily 中尚未腐烂的有效信息提取为 SSOT——就像睡眠中大脑把短期记忆巩固为长期记忆。

第一原理

这个模式是我们从 document rot 出发,从自己的 weekly 实践中自然长出来的。Weekly 已经在做反腐——跨 session 检测 anomalies、标记 docs_now_stale、追踪 gap 收敛。Dreaming 是 weekly 的自然延伸:weekly 发现了什么在腐烂,dreaming 把还没腐烂的提取出来固化。

听说过 Hermes Curator 的 dreaming 机制,觉得我们在做的事类似,发起了田野调查——果然,独立交叉对到同一个答案。然后正确迁移到了项目文档管理场景。田野调研见 references/hermes-dreaming-field-notes.md

核心洞察:维护应该是独立周期,不嵌入每次任务。

Three-Phase Flow

Phase 1: Scan — Start from weekly, not from raw

Primary index: the weekly chain. Weeklies (W17-W22) are pre-built importance-ranked summaries. Each weekly already contains:

  • core_thread — the 1-2 most important clusters per week
  • docs_now_stale — ADRs/wiki that became outdated each week
  • decisions_accepted — which ADRs landed when
  • Anomalies surfaced — CLI renames, missing ADRs, build-then-reject cycles

Start from weekly, not from raw scan:

ls weekly/ | sort                          # Read all weeklies
cat weekly/*.md | grep "docs_now_stale"    # Extract stale-doc index across all weeks
cat weekly/*.md | grep "decisions_accepted" # Build ADR timeline from weekly

Why this is better: 81 ADRs + 54 wiki + 25 dailies ≈ impossible to scan cold. The weekly chain is 6 files that tell you what mattered and what's outdated. Weekly is dreaming's pre-built index — like Obsidian's map of content.

Fallback (only when weeklies are missing or incomplete):

bun packages/lythoskill-project-cortex/src/cli.ts probe
ls -lt cortex/adr/02-accepted/ | head -20
git log --since="30 days ago" --oneline -- cortex/wiki/ cortex/adr/

Agent reads weekly chain → identifies:

  • Already stale: flagged in docs_now_stale across any weekly
  • Superseded: ADR mentioned in a later weekly's decisions_accepted that contradicts an earlier one
  • Duplicate: same insight appearing in multiple wiki entries
  • Orphaned: references to tasks/epics that no longer exist

Phase 2: Consolidate

Write to cortex/wiki/04-ssot/. One file per major topic area. Each SSOT file is:

  • Short (< 500 lines) — a fresh agent can read it in one pass
  • Self-contained — links to source ADRs/wiki for detail, but doesn't require reading them
  • Current — reflects what's TRUE NOW, not what was true at some point in history
  • Dated — frontmatter last_consolidated: 2026-05-28 so reader knows freshness

Example SSOT topics:

  • architecture.md — current system architecture (not design history)
  • conventions.md — active code/doc conventions (not deprecated ones)
  • key-decisions.md — ADRs that still hold (superseded ones noted but not replayed)
  • pitfalls.md — recurring failure modes and their fixes

Phase 3: ZK Validate

After writing SSOT, spawn a zero-knowledge subagent:

ZK subagent prompt:
  "You have NO prior context about this project. Read these SSOT files:
   - cortex/wiki/04-ssot/architecture.md
   - cortex/wiki/04-ssot/conventions.md
   Self-report: what do you understand? What is unclear? What seems contradictory?"

Agent evaluates the ZK subagent's self-report:
  - Misunderstood sections → SSOT needs revision (writing assumed context that doesn't exist)
  - "Where is X?" questions → SSOT is missing a topic
  - Contradictions flagged → SSOT inherited stale info from source docs

For critical SSOT documents, escalate to cross-model validation:

arena single --player kimi --brief "Read cortex/wiki/04-ssot/architecture.md and self-report your understanding"

If kimi also understands → document is broadly usable, not Claude-specific.

Relationship with Other Tools

ToolRole in Dreaming
cortex probeInput: detects stale tasks, epic drift, empty shells
deck validateInput: checks if referenced skill paths still exist
curator scanInput: cold pool freshness — are our skill references valid?
arena singleZK validation L2: cross-model readability check
scribe dailyRecords dreaming session output

When NOT to Dream

  • Mid-task, mid-refactor — dreaming is a between-sessions activity
  • When the working tree is dirty — commit first
  • When there's an active emergency epic — firefighting takes priority

Dreaming Output Contract

Every SSOT file must have:

---
last_consolidated: 2026-05-28
sources: ["cortex/adr/02-accepted/ADR-xxx.md", "cortex/wiki/01-patterns/xxx.md"]
zk_validated: true
zk_issues: 0
---

Supporting References

When you need to…Read
Read the Hermes Curator field notesreferences/hermes-dreaming-field-notes.md
See the ZK validation pattern in actionAGENTS.md § ZK Validation Pattern

What ships with it: 1 file

2.6 KB alongside SKILL.md

Gives 0 of the 12 instructions most context ai engineering skills give in ~1.7k tokens

Counted across 1,328 of the 2,349 authors here whose files we hold, read 2026-09-06

  • Dispatch a fresh subagent for each taskin 76 of 1328, across 59 files
  • Perform spec compliance review before code quality reviewin 44 of 1328, across 34 files
  • Dispatch a final code reviewer after all tasksin 38 of 1328, across 26 files
  • Answer subagent questions before allowing implementationin 36 of 1328, across 26 files
  • Use the least powerful model capable of the taskin 33 of 1328, across 26 files
  • Create a TodoWrite list for all tasksin 32 of 1328, across 22 files
  • Perform a task review after each implementationin 31 of 1328, across 24 files
  • Extract all tasks and context from the planin 29 of 1328, across 20 files
  • Provide full task text to subagentsin 28 of 1328, across 20 files
  • Use git worktrees for isolated workspacesin 25 of 1328, across 20 files
  • Specify the model explicitly when dispatching a subagentin 23 of 1328, across 18 files
  • Execute all tasks from the plan without stoppingin 21 of 1328, across 16 files

Said here and by no other author read

  • start from the weekly chain
  • identify stale superseded duplicate and orphaned documentation
  • write consolidated information to the ssot directory
  • keep ssot files under five hundred lines
  • include last consolidated date in frontmatter
  • spawn a zero knowledge subagent for validation

Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.