dream
Knowledge base maintenance — organize, deduplicate, cross-reference the datarim/ directory. Flags contradictions, archives stale content.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Knowledge base maintenance — organize, deduplicate, cross-reference the datarim/ directory. Flags contradictions, archives stale content.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Schema and migration semantics for /dr-doctor — thin one-liner contract, 6-pass migration, data-loss safety, conflict resolution. Loaded by self-heal.
Core Datarim rules. Load this entry first, then only the fragment needed for paths, storage, numbering, backlog, routing, or archive behavior.
Post-QA hardening — detects task type (code, docs, research, legal, content, infra) and applies the matching verification checklist before archiving.
Testing pyramid, frameworks, mocking. Load first; then the fragment for the active gate (live smoke, silent failure, bats, legacy triage).
Preserve Datarim task continuity while orchestrated Claude Code or Codex sessions compact or clear context at deterministic pressure thresholds.
Immutability contract for all pipeline stages: artefact freeze, V-AC parity, non-code parity, anti-tautological rule, and return-to-source transition.
| name | dream |
| description | Knowledge base maintenance — organize, deduplicate, cross-reference the datarim/ directory. Flags contradictions, archives stale content. |
| model | inherit |
| current_aal | 1 |
| target_aal | 2 |
"The tedious part of maintaining a knowledge base is not the reading or the thinking — it's the bookkeeping."
Dream handles the bookkeeping: cross-references, deduplication, organization, staleness checks, and structural consistency of the datarim/ directory. It runs periodically or on demand, keeping the knowledge base healthy as it grows.
New documents, notes, and artifacts land in the knowledge base through tasks. Over time, some end up misplaced, unnamed inconsistently, or disconnected from related content.
Ingest checks:
prd/, a reflection outside reflection/)documentation/archive/ without matching reflection in datarim/reflection/datarim-system.md)Actions:
datarim/reflection/ and documentation/archive/Periodic review of the entire knowledge base for structural problems.
Lint checks:
| Check | What it detects |
|---|---|
| Contradictions | Two documents making conflicting claims about the same topic |
| Stale content | Documents referencing completed/archived tasks as "in progress" |
| Orphan files | Documents with no inbound references from any other document |
| Missing pages | Concepts or entities referenced but never given their own document |
| Broken links | Internal references pointing to files that don't exist |
| Duplicate content | Two documents covering the same topic with >70% overlap |
| Empty directories | Subdirectories with no files |
| Oversized files | Documents over 500 lines that should be split |
| Inconsistent naming | Files not following the [type]-[task_id]-[name].md pattern |
| Cross-reference symmetry | If doc A links to doc B, does B link back to A? |
| Archive-reflection symmetry | Archive in documentation/archive/ exists without matching reflection in datarim/reflection/, or vice versa |
| Archive area mismatch | Archive file in wrong subdirectory per prefix→area mapping in datarim-system.md |
Output: A lint report listing all issues found, grouped by severity (critical → warning → info).
Deep maintenance that restructures the knowledge base for clarity and efficiency.
Consolidation actions:
| Action | Description |
|---|---|
| Merge duplicates | Combine two documents covering the same topic into one |
| Extract patterns | Find recurring themes across reflections and create a patterns page in documentation/ |
| Build index | Create or update datarim/index.md — a catalog of all documents (from both datarim/ and documentation/archive/) with one-line summaries |
| Update progress | Sync progress.md with actual state of tasks, backlog, and archives |
| Archive stale | Move completed/obsolete documents to archive/ with proper metadata |
| Cross-reference | Add bidirectional links between related documents (PRD ↔ task ↔ reflection ↔ archive) |
| Tag extraction | Identify common themes and add tags to document frontmatter |
When Dream processes documents, it ensures this frontmatter exists:
---
title: Document Title
task_id: TASK-0042
type: prd | task | reflection | creative | qa | archive | report
status: active | completed | archived | superseded
created: 2026-04-11
updated: 2026-04-11
tags: [tag1, tag2]
related: [path/to/related-doc.md]
---
Fields:
title — human-readable titletask_id — link to originating tasktype — document category (matches directory)status — lifecycle statecreated / updated — datestags — topic tags for cross-cutting concernsrelated — explicit links to related documentsNot all fields are required for all documents. Dream adds missing fields where it can infer the value.
Dream maintains datarim/index.md — a navigable catalog of the knowledge base:
# Knowledge Base Index
**Last updated:** 2026-04-11
**Total documents:** 42
## By Type
### PRDs (5)
-(prd/PRD-0001-auth-system.md) — Authentication system requirements
-(prd/PRD-0002-export-pipeline.md) — Data export pipeline
### Tasks (8)
-(tasks/TASK-0001-setup.md) — Project setup and configuration
...
### Reflections (6)
...
## By Tag
### authentication
-(prd/PRD-0001-auth-system.md)
-(tasks/TASK-0005-jwt-implementation.md)
- [reflection-TASK-0005](reflection/reflection-TASK-0005.md)
## Recent Activity
| Date | Action | Document |
|------|--------|----------|
| 2026-04-11 | Created | tasks/TASK-0042-dream-system.md |
| 2026-04-10 | Archived | archive/archive-TASK-0041.md |
Dream appends to datarim/history/activity-log.md:
# Activity Log
## [2026-04-11] dream | Full maintenance
- Lint: 3 issues found (1 orphan, 1 broken link, 1 stale reference)
- Fixed: renamed 2 files to match naming convention
- Consolidated: merged duplicate reflection notes
- Updated: index.md, progress.md
- Duration: ~2 minutes
## [2026-04-08] dream | Quick lint
- Lint: 0 issues found
- Knowledge base is healthy
When Dream finds two documents making conflicting claims:
[!contradiction] callout to both documents:
> [!contradiction]
> This document states X, but [other-doc.md](path) states Y.
> Added by Dream on 2026-04-11. Needs human resolution.
| Trigger | Operation | Depth |
|---|---|---|
/dr-dream (no args) | Full: ingest + lint + consolidate | Deep |
/dr-dream lint | Lint only | Quick |
/dr-dream index | Rebuild index only | Quick |
After /dr-archive | Auto-suggest if >5 unindexed docs | Suggestion only |
| After every 10 tasks | Auto-suggest full maintenance | Suggestion only |
datarim/ and documentation/archive/ contents only.