dreamcontext 0.8.7 → 0.8.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/agents/dreamcontext-explore.md +7 -3
- package/agents/dreamcontext-initializer.md +9 -0
- package/agents/sleep-migration.md +18 -10
- package/agents/sleep-product.md +6 -6
- package/agents/sleep-state.md +3 -3
- package/agents/sleep-tasks.md +4 -3
- package/dist/agents/dreamcontext-explore.md +7 -3
- package/dist/agents/dreamcontext-initializer.md +9 -0
- package/dist/agents/sleep-migration.md +18 -10
- package/dist/agents/sleep-product.md +6 -6
- package/dist/agents/sleep-state.md +3 -3
- package/dist/agents/sleep-tasks.md +4 -3
- package/dist/index.js +1204 -1066
- package/dist/skill-packs/council/SKILL.md +3 -2
- package/dist/skill-packs/council/debate-protocol.md +1 -1
- package/dist/skill-packs/excalidraw/SKILL.md +38 -28
- package/package.json +1 -1
- package/skill/SKILL.md +204 -500
- package/skill/references/cli-reference.md +200 -0
- package/skill/references/improving-dreamcontext.md +39 -0
- package/skill/references/integrations.md +200 -0
- package/skill/references/knowledge-and-recall.md +151 -0
- package/skill/references/sleep.md +88 -0
- package/skill/references/tasks-and-features.md +170 -0
- package/skill-packs/council/SKILL.md +3 -2
- package/skill-packs/council/debate-protocol.md +1 -1
- package/skill-packs/excalidraw/SKILL.md +38 -28
|
@@ -57,7 +57,11 @@ always beats blind exploration.
|
|
|
57
57
|
**Cross-vault hits are normal and useful.** Results tagged `<vault>::<type>/<slug>` come
|
|
58
58
|
from connected readable peer projects — this is expected behavior, not noise. If the
|
|
59
59
|
answer likely lives in a specific peer, scope the search with `--vault <name>` to
|
|
60
|
-
search current + that one peer directly.
|
|
60
|
+
search current + that one peer directly. You may also go deeper on a peer: print its
|
|
61
|
+
context with `dreamcontext snapshot --vault <name>`, or `Read`/`Grep` its files
|
|
62
|
+
directly (a connected peer is a normal directory on disk). A connection is a standing
|
|
63
|
+
"may read" — use it instead of reporting "not found here" when a sibling project owns
|
|
64
|
+
the answer.
|
|
61
65
|
|
|
62
66
|
Recall is appropriate for Track A (Documented Knowledge) and for Track B when
|
|
63
67
|
the query is about a documented concept. It is NOT a substitute for Glob/Grep
|
|
@@ -70,7 +74,7 @@ Classify every query into one of two tracks:
|
|
|
70
74
|
|
|
71
75
|
**TRACK A -- Documented Knowledge** (architecture, design, schema, conventions, feature specs)
|
|
72
76
|
The briefing tells you which context file has the answer. Read that ONE file and return. Done.
|
|
73
|
-
Examples: "what's the data schema?" -> read all files under `
|
|
77
|
+
Examples: "what's the data schema?" -> read all files under `knowledge/data-structures/` (typically `default.md` for single-product projects, or one file per product for multi-product). At explore-time you don't know the product set yet, so list the directory and read what's there. "How does auth work?" -> match a feature/knowledge file from the briefing. Knowledge is indexed recursively, so the answer may live in a context subfolder (`knowledge/<context>/…`) — its slug is `<context>/<name>`.
|
|
74
78
|
|
|
75
79
|
**TRACK B -- Find Code** (locate files, functions, implementations, usages, patterns)
|
|
76
80
|
Use the briefing to form a hypothesis about WHERE in the codebase to look, then search with targeted Glob/Grep. Do NOT read context files first -- go straight to code.
|
|
@@ -126,7 +130,7 @@ No preamble. No emojis. Absolute paths only.
|
|
|
126
130
|
|
|
127
131
|
## Bash Restrictions
|
|
128
132
|
|
|
129
|
-
Use Bash ONLY for: `ls`, `git log`, `git diff`, `git show`, `git status`, `find`, `cat`, `head`, `tail`, `wc`, `pwd`, `dreamcontext memory recall`, `dreamcontext transcript distill`
|
|
133
|
+
Use Bash ONLY for: `ls`, `git log`, `git diff`, `git show`, `git status`, `find`, `cat`, `head`, `tail`, `wc`, `pwd`, `dreamcontext memory recall`, `dreamcontext snapshot`, `dreamcontext transcript distill`
|
|
130
134
|
NEVER use Bash for any command that modifies files or system state.
|
|
131
135
|
|
|
132
136
|
## Rules
|
|
@@ -141,6 +141,15 @@ Distill — don't dump. Summarize the doc's durable decisions/structure into the
|
|
|
141
141
|
knowledge file; link back to the source path in the body. Prefer a few
|
|
142
142
|
high-signal knowledge files over copying every markdown file verbatim.
|
|
143
143
|
|
|
144
|
+
**Single source of truth — knowledge ≠ features.** Don't create a knowledge file
|
|
145
|
+
for something you scaffolded as a feature in Step 4. Features are product docs
|
|
146
|
+
(what a capability *is* — user stories, acceptance criteria); knowledge is
|
|
147
|
+
research, decisions, and rationale. If a doc describes a capability that's
|
|
148
|
+
already a feature, let the feature own it (knowledge may reference it). Never
|
|
149
|
+
ship the same topic as both a feature and a knowledge file. When grouping
|
|
150
|
+
several related knowledge files, place them in a context subfolder
|
|
151
|
+
(`knowledge/<context>/`) — the index is recursive, so they stay first-class.
|
|
152
|
+
|
|
144
153
|
### Step 7: Populate the Core Files
|
|
145
154
|
|
|
146
155
|
Use the gathered intelligence to write rich, meaningful content.
|
|
@@ -43,20 +43,28 @@ skills:
|
|
|
43
43
|
|
|
44
44
|
### Placement judgment (behavioral) — diagrams migration
|
|
45
45
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
46
|
+
`apply-diagrams` is a **legacy structural migration**: it folds flat boards that
|
|
47
|
+
already live under `knowledge/diagrams/` into per-title subfolders and rewrites
|
|
48
|
+
inbound wikilinks. It is version-gated (0.7.2) and only runs when `migrations
|
|
49
|
+
pending` lists it — run it as instructed; do not invent new diagram moves here.
|
|
50
|
+
|
|
51
|
+
**Promoted layout (what sleep-product enforces over time):** a canonical board
|
|
52
|
+
belongs **inside the context folder it documents** (co-located with that
|
|
53
|
+
context's knowledge, e.g. `knowledge/<context>/<title>/<title>.excalidraw.md`),
|
|
54
|
+
NOT in a segregated top-level `knowledge/diagrams/` dump. You (sleep-migration)
|
|
55
|
+
do not do context-grouping — that's sleep-product's Organize pass. Your only
|
|
56
|
+
diagram job is the legacy `apply-diagrams` migration when it is pending.
|
|
57
|
+
|
|
58
|
+
Before running it, decide per board:
|
|
59
|
+
- **Canonical knowledge** (architecture, flows, roadmaps a future session should
|
|
60
|
+
recall) → keep/organize under `knowledge/` (legacy `knowledge/diagrams/` for
|
|
61
|
+
flat boards apply-diagrams handles). Indexed, recalled.
|
|
51
62
|
- **Temporary / scratch / working** (exploratory sketches, in-progress drafts)
|
|
52
|
-
→ `inbox/` or `workspace/` (dark by location — NOT indexed
|
|
53
|
-
|
|
63
|
+
→ `inbox/` or `workspace/` (dark by location — NOT indexed). Leave them; do
|
|
64
|
+
NOT pull them into `knowledge/`.
|
|
54
65
|
|
|
55
66
|
Decision rule: "Will a future session need to know this? → knowledge. Throwaway/working? → inbox/workspace."
|
|
56
67
|
|
|
57
|
-
Only organize canonical boards. Leave temp/scratch boards in place or move to
|
|
58
|
-
inbox/workspace — do NOT use `apply-diagrams` on them.
|
|
59
|
-
|
|
60
68
|
4. **Write the ledger ONLY on completion** via:
|
|
61
69
|
```bash
|
|
62
70
|
dreamcontext migrations record \
|
package/agents/sleep-product.md
CHANGED
|
@@ -166,13 +166,13 @@ If the relevant task has `product: X` in frontmatter, the PRD MAY be product-sco
|
|
|
166
166
|
|
|
167
167
|
Before curating content, keep the knowledge store's *structure* logical. `knowledge/**/*.md` is indexed recursively (`buildKnowledgeIndex` globs `**/*.md`), so subfolders are fully recall-safe — grouping a file never hides it.
|
|
168
168
|
|
|
169
|
-
**Diagrams →
|
|
169
|
+
**Diagrams → co-located in their context folder (promoted layout).** A canonical board belongs **inside the context folder it documents**, alongside that context's knowledge — `knowledge/<context>/<title>/<title>.excalidraw.md` (the board plus its dark-sibling `.board.cjs`/`.json` in its own `<title>/` wrapper). Diagrams are NOT a segregated top-level dump; they live with the context they illustrate. When you group a context (below) and that context has a board, move the board into the context folder too so the folder tells one story.
|
|
170
170
|
|
|
171
171
|
```bash
|
|
172
|
-
dreamcontext migrations apply-diagrams #
|
|
172
|
+
dreamcontext migrations apply-diagrams # legacy/structural: folds flat boards UNDER knowledge/diagrams/ into per-title subfolders + rewrites [[wikilinks]] atomically; idempotent, prints "nothing to organize" when clean
|
|
173
173
|
```
|
|
174
174
|
|
|
175
|
-
Placement judgment FIRST: only canonical boards (architecture,
|
|
175
|
+
`apply-diagrams` is the **legacy** mechanism for boards still under a top-level `knowledge/diagrams/` tree (it does flat→per-title, not context-grouping). Run it each cycle to keep legacy boards tidy; it's safe and idempotent. For NEW canonical boards, place them in their context folder directly. Placement judgment FIRST: only canonical boards (architecture, flows, roadmaps a future session should recall) go under `knowledge/`. Scratch/exploratory/in-progress boards belong in `inbox/` or `workspace/` (dark by location — not indexed) — leave those alone; do NOT pull them into knowledge. Never hand-edit board scene JSON or wikilinks — the command owns both.
|
|
176
176
|
|
|
177
177
|
**Knowledge → logical subfolders (grouping; moves are deep-only).** When ≥3 top-level `knowledge/*.md` files form a clear topical cluster a future session would browse together (mirroring the existing `data-structures/` and `products/` subfolders), group them under `knowledge/<group>/`. Moving files + rewriting links is a structural op — gate it exactly like merge-with-delete (B1.5):
|
|
178
178
|
- **light/standard:** do NOT move. **Flag the cluster in your report** (`group candidate: <group>/ ← a.md, b.md, c.md`) for the next deep cycle.
|
|
@@ -370,7 +370,7 @@ dreamcontext taxonomy resolve <tag>
|
|
|
370
370
|
|
|
371
371
|
### Organization
|
|
372
372
|
- Diagrams: ran `apply-diagrams` — folded knowledge/diagrams/federation.excalidraw.md (+federation.board.cjs) into diagrams/federation/ (canonical board, was flat). 0 ambiguous.
|
|
373
|
-
- Knowledge grouping: group candidate flagged for deep cycle — `decisions/` ← decision-mem0-vs-bm25-recall.md, decision-link-aware-vs-embedding-recall.md, decision-meta-marketing-skill-adoption.md (
|
|
373
|
+
- Knowledge grouping: group candidate flagged for deep cycle — `decisions/` ← decision-mem0-vs-bm25-recall.md, decision-link-aware-vs-embedding-recall.md, decision-meta-marketing-skill-adoption.md (3 sibling `decision-*` files browse together). Not moved (standard depth).
|
|
374
374
|
|
|
375
375
|
### Knowledge
|
|
376
376
|
- Created: knowledge/jwt-rotation-policy.md (tags: security, decisions; from sleep-state flag) — sharp boundary, new tag-able topic
|
|
@@ -394,10 +394,10 @@ Dropped-but-load-bearing self-check: <none | list any digest/auto-bookmark/resea
|
|
|
394
394
|
3. **Tick criteria only when verifiable.** Code shipped + tests pass, or user confirmed in session.
|
|
395
395
|
4. **Never set `released_version`.** That's the user's release call.
|
|
396
396
|
5. **Create PRDs for buildable concepts** that don't have one — they will be lost otherwise.
|
|
397
|
-
6. **
|
|
397
|
+
6. **Single source of truth — feature vs knowledge.** A topic lives in exactly ONE home. A **feature** PRD documents what a capability *is* (user stories, acceptance criteria); **knowledge** holds research/decisions/rationale; a short technical decision belongs in `2.memory.md` (sleep-state's domain). NEVER create a knowledge file for something that is a feature, never keep a knowledge copy of content that lives in a feature (or vice-versa), and never have both a feature and a knowledge doc covering the same topic — one is the home, the other may only *reference* it. When in doubt, the feature is the home for product capabilities.
|
|
398
398
|
7. **Knowledge file threshold**: ≥3 paragraphs of content, or material that will be re-read in future sessions.
|
|
399
399
|
8. **Fewest files, sharp boundaries (B2 rubric).** Default to extending an existing file. Fold soft distinctions in — same vertical/brand/topic family, a narrower slice, an increment. Create a new file only for a genuinely separate topic whose own tags sharpen discovery. Not super-files, not fragmentation.
|
|
400
|
-
8a. **Keep the store organized (B0).**
|
|
400
|
+
8a. **Keep the store organized (B0).** NEW boards belong in their context folder (`knowledge/<context>/<title>/`); `apply-diagrams` is reserved for folding legacy flat `knowledge/diagrams/` boards into per-title folders (idempotent, any depth). Group clustered top-level knowledge into logical subfolders only at `deep` depth (flag candidates at light/standard). Subfolders are recall-safe — the index globs `**/*.md`. Folder and tags must tell the same story.
|
|
401
401
|
9. **Use standard tags only (prefer taxonomy vocab).** New tags fragment discovery; always check `dreamcontext taxonomy vocab` before tagging. Add new vocabulary via `taxonomy add` or `taxonomy alias` — never hand-edit `core/taxonomy.json` directly.
|
|
402
402
|
10. **Process all flags from sleep-state** in your report — don't silently drop them.
|
|
403
403
|
11. **No-op cheaply** when signals don't actually warrant work.
|
package/agents/sleep-state.md
CHANGED
|
@@ -34,7 +34,7 @@ Identity is sacred — a fresh session must immediately understand who the agent
|
|
|
34
34
|
|---|---|
|
|
35
35
|
| `core/0-4.*`, `core/6.*` files (Edit, surgical) | task files (sleep-tasks owns) |
|
|
36
36
|
| `dreamcontext core changelog add` | knowledge files incl. `knowledge/data-structures/<product>.md` (sleep-product owns + writes; you only flag staleness) |
|
|
37
|
-
| `dreamcontext core releases {add,
|
|
37
|
+
| `dreamcontext core releases {add,active,list,show}` | feature PRDs (sleep-product owns) |
|
|
38
38
|
| `dreamcontext trigger add` (context-dependent reminders) | |
|
|
39
39
|
|
|
40
40
|
## Inputs
|
|
@@ -114,7 +114,7 @@ dreamcontext tasks list --status completed
|
|
|
114
114
|
|
|
115
115
|
If every task linked to the active planning version is `completed` (or only `in_review` remains and the user has been verifying), surface release readiness in your report.
|
|
116
116
|
|
|
117
|
-
**Never run `dreamcontext core releases
|
|
117
|
+
**Never run `dreamcontext core releases add --status released`** unless the user's hint explicitly asks for it. Releasing is the user's decision.
|
|
118
118
|
|
|
119
119
|
If no active planning version exists, create one before adding entries (otherwise entries float unattached):
|
|
120
120
|
|
|
@@ -250,7 +250,7 @@ You do **not** edit knowledge files. Produce flags for `sleep-product` to act on
|
|
|
250
250
|
- Entries added: 4
|
|
251
251
|
- feat(council) — "Add multi-persona debate system…"
|
|
252
252
|
- fix(snapshot) — "Cap pinned-preview at 730 lines…"
|
|
253
|
-
- refactor(
|
|
253
|
+
- refactor(sleep) — "Split monolithic sleep protocol into main-agent flow + specialists…"
|
|
254
254
|
- docs(readme) — "Update sleep section…"
|
|
255
255
|
- Active version: v0.3.0 (planning) — 2 of 4 tasks in_review, 1 in_progress, 1 todo. Not release-ready yet.
|
|
256
256
|
- Skipped: 3 commits in this range were sleep-state churn (`.sleep.json` updates) — not user-facing.
|
package/agents/sleep-tasks.md
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: sleep-tasks
|
|
3
3
|
description: >
|
|
4
|
-
Sleep-cycle specialist that owns task files. Dispatched by
|
|
5
|
-
parallel with other specialists. Reconciles task bodies to current truth,
|
|
6
|
-
creates new tasks for untracked work, attaches everything to the active
|
|
4
|
+
Sleep-cycle specialist that owns task files. Dispatched by the main agent during the
|
|
5
|
+
sleep flow, in parallel with other specialists. Reconciles task bodies to current truth,
|
|
6
|
+
bumps statuses, creates new tasks for untracked work, attaches everything to the active
|
|
7
|
+
planning version.
|
|
7
8
|
tools: Read, Write, Edit, Bash, Glob, Grep
|
|
8
9
|
model: sonnet
|
|
9
10
|
skills:
|
|
@@ -57,7 +57,11 @@ always beats blind exploration.
|
|
|
57
57
|
**Cross-vault hits are normal and useful.** Results tagged `<vault>::<type>/<slug>` come
|
|
58
58
|
from connected readable peer projects — this is expected behavior, not noise. If the
|
|
59
59
|
answer likely lives in a specific peer, scope the search with `--vault <name>` to
|
|
60
|
-
search current + that one peer directly.
|
|
60
|
+
search current + that one peer directly. You may also go deeper on a peer: print its
|
|
61
|
+
context with `dreamcontext snapshot --vault <name>`, or `Read`/`Grep` its files
|
|
62
|
+
directly (a connected peer is a normal directory on disk). A connection is a standing
|
|
63
|
+
"may read" — use it instead of reporting "not found here" when a sibling project owns
|
|
64
|
+
the answer.
|
|
61
65
|
|
|
62
66
|
Recall is appropriate for Track A (Documented Knowledge) and for Track B when
|
|
63
67
|
the query is about a documented concept. It is NOT a substitute for Glob/Grep
|
|
@@ -70,7 +74,7 @@ Classify every query into one of two tracks:
|
|
|
70
74
|
|
|
71
75
|
**TRACK A -- Documented Knowledge** (architecture, design, schema, conventions, feature specs)
|
|
72
76
|
The briefing tells you which context file has the answer. Read that ONE file and return. Done.
|
|
73
|
-
Examples: "what's the data schema?" -> read all files under `
|
|
77
|
+
Examples: "what's the data schema?" -> read all files under `knowledge/data-structures/` (typically `default.md` for single-product projects, or one file per product for multi-product). At explore-time you don't know the product set yet, so list the directory and read what's there. "How does auth work?" -> match a feature/knowledge file from the briefing. Knowledge is indexed recursively, so the answer may live in a context subfolder (`knowledge/<context>/…`) — its slug is `<context>/<name>`.
|
|
74
78
|
|
|
75
79
|
**TRACK B -- Find Code** (locate files, functions, implementations, usages, patterns)
|
|
76
80
|
Use the briefing to form a hypothesis about WHERE in the codebase to look, then search with targeted Glob/Grep. Do NOT read context files first -- go straight to code.
|
|
@@ -126,7 +130,7 @@ No preamble. No emojis. Absolute paths only.
|
|
|
126
130
|
|
|
127
131
|
## Bash Restrictions
|
|
128
132
|
|
|
129
|
-
Use Bash ONLY for: `ls`, `git log`, `git diff`, `git show`, `git status`, `find`, `cat`, `head`, `tail`, `wc`, `pwd`, `dreamcontext memory recall`, `dreamcontext transcript distill`
|
|
133
|
+
Use Bash ONLY for: `ls`, `git log`, `git diff`, `git show`, `git status`, `find`, `cat`, `head`, `tail`, `wc`, `pwd`, `dreamcontext memory recall`, `dreamcontext snapshot`, `dreamcontext transcript distill`
|
|
130
134
|
NEVER use Bash for any command that modifies files or system state.
|
|
131
135
|
|
|
132
136
|
## Rules
|
|
@@ -141,6 +141,15 @@ Distill — don't dump. Summarize the doc's durable decisions/structure into the
|
|
|
141
141
|
knowledge file; link back to the source path in the body. Prefer a few
|
|
142
142
|
high-signal knowledge files over copying every markdown file verbatim.
|
|
143
143
|
|
|
144
|
+
**Single source of truth — knowledge ≠ features.** Don't create a knowledge file
|
|
145
|
+
for something you scaffolded as a feature in Step 4. Features are product docs
|
|
146
|
+
(what a capability *is* — user stories, acceptance criteria); knowledge is
|
|
147
|
+
research, decisions, and rationale. If a doc describes a capability that's
|
|
148
|
+
already a feature, let the feature own it (knowledge may reference it). Never
|
|
149
|
+
ship the same topic as both a feature and a knowledge file. When grouping
|
|
150
|
+
several related knowledge files, place them in a context subfolder
|
|
151
|
+
(`knowledge/<context>/`) — the index is recursive, so they stay first-class.
|
|
152
|
+
|
|
144
153
|
### Step 7: Populate the Core Files
|
|
145
154
|
|
|
146
155
|
Use the gathered intelligence to write rich, meaningful content.
|
|
@@ -43,20 +43,28 @@ skills:
|
|
|
43
43
|
|
|
44
44
|
### Placement judgment (behavioral) — diagrams migration
|
|
45
45
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
46
|
+
`apply-diagrams` is a **legacy structural migration**: it folds flat boards that
|
|
47
|
+
already live under `knowledge/diagrams/` into per-title subfolders and rewrites
|
|
48
|
+
inbound wikilinks. It is version-gated (0.7.2) and only runs when `migrations
|
|
49
|
+
pending` lists it — run it as instructed; do not invent new diagram moves here.
|
|
50
|
+
|
|
51
|
+
**Promoted layout (what sleep-product enforces over time):** a canonical board
|
|
52
|
+
belongs **inside the context folder it documents** (co-located with that
|
|
53
|
+
context's knowledge, e.g. `knowledge/<context>/<title>/<title>.excalidraw.md`),
|
|
54
|
+
NOT in a segregated top-level `knowledge/diagrams/` dump. You (sleep-migration)
|
|
55
|
+
do not do context-grouping — that's sleep-product's Organize pass. Your only
|
|
56
|
+
diagram job is the legacy `apply-diagrams` migration when it is pending.
|
|
57
|
+
|
|
58
|
+
Before running it, decide per board:
|
|
59
|
+
- **Canonical knowledge** (architecture, flows, roadmaps a future session should
|
|
60
|
+
recall) → keep/organize under `knowledge/` (legacy `knowledge/diagrams/` for
|
|
61
|
+
flat boards apply-diagrams handles). Indexed, recalled.
|
|
51
62
|
- **Temporary / scratch / working** (exploratory sketches, in-progress drafts)
|
|
52
|
-
→ `inbox/` or `workspace/` (dark by location — NOT indexed
|
|
53
|
-
|
|
63
|
+
→ `inbox/` or `workspace/` (dark by location — NOT indexed). Leave them; do
|
|
64
|
+
NOT pull them into `knowledge/`.
|
|
54
65
|
|
|
55
66
|
Decision rule: "Will a future session need to know this? → knowledge. Throwaway/working? → inbox/workspace."
|
|
56
67
|
|
|
57
|
-
Only organize canonical boards. Leave temp/scratch boards in place or move to
|
|
58
|
-
inbox/workspace — do NOT use `apply-diagrams` on them.
|
|
59
|
-
|
|
60
68
|
4. **Write the ledger ONLY on completion** via:
|
|
61
69
|
```bash
|
|
62
70
|
dreamcontext migrations record \
|
|
@@ -166,13 +166,13 @@ If the relevant task has `product: X` in frontmatter, the PRD MAY be product-sco
|
|
|
166
166
|
|
|
167
167
|
Before curating content, keep the knowledge store's *structure* logical. `knowledge/**/*.md` is indexed recursively (`buildKnowledgeIndex` globs `**/*.md`), so subfolders are fully recall-safe — grouping a file never hides it.
|
|
168
168
|
|
|
169
|
-
**Diagrams →
|
|
169
|
+
**Diagrams → co-located in their context folder (promoted layout).** A canonical board belongs **inside the context folder it documents**, alongside that context's knowledge — `knowledge/<context>/<title>/<title>.excalidraw.md` (the board plus its dark-sibling `.board.cjs`/`.json` in its own `<title>/` wrapper). Diagrams are NOT a segregated top-level dump; they live with the context they illustrate. When you group a context (below) and that context has a board, move the board into the context folder too so the folder tells one story.
|
|
170
170
|
|
|
171
171
|
```bash
|
|
172
|
-
dreamcontext migrations apply-diagrams #
|
|
172
|
+
dreamcontext migrations apply-diagrams # legacy/structural: folds flat boards UNDER knowledge/diagrams/ into per-title subfolders + rewrites [[wikilinks]] atomically; idempotent, prints "nothing to organize" when clean
|
|
173
173
|
```
|
|
174
174
|
|
|
175
|
-
Placement judgment FIRST: only canonical boards (architecture,
|
|
175
|
+
`apply-diagrams` is the **legacy** mechanism for boards still under a top-level `knowledge/diagrams/` tree (it does flat→per-title, not context-grouping). Run it each cycle to keep legacy boards tidy; it's safe and idempotent. For NEW canonical boards, place them in their context folder directly. Placement judgment FIRST: only canonical boards (architecture, flows, roadmaps a future session should recall) go under `knowledge/`. Scratch/exploratory/in-progress boards belong in `inbox/` or `workspace/` (dark by location — not indexed) — leave those alone; do NOT pull them into knowledge. Never hand-edit board scene JSON or wikilinks — the command owns both.
|
|
176
176
|
|
|
177
177
|
**Knowledge → logical subfolders (grouping; moves are deep-only).** When ≥3 top-level `knowledge/*.md` files form a clear topical cluster a future session would browse together (mirroring the existing `data-structures/` and `products/` subfolders), group them under `knowledge/<group>/`. Moving files + rewriting links is a structural op — gate it exactly like merge-with-delete (B1.5):
|
|
178
178
|
- **light/standard:** do NOT move. **Flag the cluster in your report** (`group candidate: <group>/ ← a.md, b.md, c.md`) for the next deep cycle.
|
|
@@ -370,7 +370,7 @@ dreamcontext taxonomy resolve <tag>
|
|
|
370
370
|
|
|
371
371
|
### Organization
|
|
372
372
|
- Diagrams: ran `apply-diagrams` — folded knowledge/diagrams/federation.excalidraw.md (+federation.board.cjs) into diagrams/federation/ (canonical board, was flat). 0 ambiguous.
|
|
373
|
-
- Knowledge grouping: group candidate flagged for deep cycle — `decisions/` ← decision-mem0-vs-bm25-recall.md, decision-link-aware-vs-embedding-recall.md, decision-meta-marketing-skill-adoption.md (
|
|
373
|
+
- Knowledge grouping: group candidate flagged for deep cycle — `decisions/` ← decision-mem0-vs-bm25-recall.md, decision-link-aware-vs-embedding-recall.md, decision-meta-marketing-skill-adoption.md (3 sibling `decision-*` files browse together). Not moved (standard depth).
|
|
374
374
|
|
|
375
375
|
### Knowledge
|
|
376
376
|
- Created: knowledge/jwt-rotation-policy.md (tags: security, decisions; from sleep-state flag) — sharp boundary, new tag-able topic
|
|
@@ -394,10 +394,10 @@ Dropped-but-load-bearing self-check: <none | list any digest/auto-bookmark/resea
|
|
|
394
394
|
3. **Tick criteria only when verifiable.** Code shipped + tests pass, or user confirmed in session.
|
|
395
395
|
4. **Never set `released_version`.** That's the user's release call.
|
|
396
396
|
5. **Create PRDs for buildable concepts** that don't have one — they will be lost otherwise.
|
|
397
|
-
6. **
|
|
397
|
+
6. **Single source of truth — feature vs knowledge.** A topic lives in exactly ONE home. A **feature** PRD documents what a capability *is* (user stories, acceptance criteria); **knowledge** holds research/decisions/rationale; a short technical decision belongs in `2.memory.md` (sleep-state's domain). NEVER create a knowledge file for something that is a feature, never keep a knowledge copy of content that lives in a feature (or vice-versa), and never have both a feature and a knowledge doc covering the same topic — one is the home, the other may only *reference* it. When in doubt, the feature is the home for product capabilities.
|
|
398
398
|
7. **Knowledge file threshold**: ≥3 paragraphs of content, or material that will be re-read in future sessions.
|
|
399
399
|
8. **Fewest files, sharp boundaries (B2 rubric).** Default to extending an existing file. Fold soft distinctions in — same vertical/brand/topic family, a narrower slice, an increment. Create a new file only for a genuinely separate topic whose own tags sharpen discovery. Not super-files, not fragmentation.
|
|
400
|
-
8a. **Keep the store organized (B0).**
|
|
400
|
+
8a. **Keep the store organized (B0).** NEW boards belong in their context folder (`knowledge/<context>/<title>/`); `apply-diagrams` is reserved for folding legacy flat `knowledge/diagrams/` boards into per-title folders (idempotent, any depth). Group clustered top-level knowledge into logical subfolders only at `deep` depth (flag candidates at light/standard). Subfolders are recall-safe — the index globs `**/*.md`. Folder and tags must tell the same story.
|
|
401
401
|
9. **Use standard tags only (prefer taxonomy vocab).** New tags fragment discovery; always check `dreamcontext taxonomy vocab` before tagging. Add new vocabulary via `taxonomy add` or `taxonomy alias` — never hand-edit `core/taxonomy.json` directly.
|
|
402
402
|
10. **Process all flags from sleep-state** in your report — don't silently drop them.
|
|
403
403
|
11. **No-op cheaply** when signals don't actually warrant work.
|
|
@@ -34,7 +34,7 @@ Identity is sacred — a fresh session must immediately understand who the agent
|
|
|
34
34
|
|---|---|
|
|
35
35
|
| `core/0-4.*`, `core/6.*` files (Edit, surgical) | task files (sleep-tasks owns) |
|
|
36
36
|
| `dreamcontext core changelog add` | knowledge files incl. `knowledge/data-structures/<product>.md` (sleep-product owns + writes; you only flag staleness) |
|
|
37
|
-
| `dreamcontext core releases {add,
|
|
37
|
+
| `dreamcontext core releases {add,active,list,show}` | feature PRDs (sleep-product owns) |
|
|
38
38
|
| `dreamcontext trigger add` (context-dependent reminders) | |
|
|
39
39
|
|
|
40
40
|
## Inputs
|
|
@@ -114,7 +114,7 @@ dreamcontext tasks list --status completed
|
|
|
114
114
|
|
|
115
115
|
If every task linked to the active planning version is `completed` (or only `in_review` remains and the user has been verifying), surface release readiness in your report.
|
|
116
116
|
|
|
117
|
-
**Never run `dreamcontext core releases
|
|
117
|
+
**Never run `dreamcontext core releases add --status released`** unless the user's hint explicitly asks for it. Releasing is the user's decision.
|
|
118
118
|
|
|
119
119
|
If no active planning version exists, create one before adding entries (otherwise entries float unattached):
|
|
120
120
|
|
|
@@ -250,7 +250,7 @@ You do **not** edit knowledge files. Produce flags for `sleep-product` to act on
|
|
|
250
250
|
- Entries added: 4
|
|
251
251
|
- feat(council) — "Add multi-persona debate system…"
|
|
252
252
|
- fix(snapshot) — "Cap pinned-preview at 730 lines…"
|
|
253
|
-
- refactor(
|
|
253
|
+
- refactor(sleep) — "Split monolithic sleep protocol into main-agent flow + specialists…"
|
|
254
254
|
- docs(readme) — "Update sleep section…"
|
|
255
255
|
- Active version: v0.3.0 (planning) — 2 of 4 tasks in_review, 1 in_progress, 1 todo. Not release-ready yet.
|
|
256
256
|
- Skipped: 3 commits in this range were sleep-state churn (`.sleep.json` updates) — not user-facing.
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: sleep-tasks
|
|
3
3
|
description: >
|
|
4
|
-
Sleep-cycle specialist that owns task files. Dispatched by
|
|
5
|
-
parallel with other specialists. Reconciles task bodies to current truth,
|
|
6
|
-
creates new tasks for untracked work, attaches everything to the active
|
|
4
|
+
Sleep-cycle specialist that owns task files. Dispatched by the main agent during the
|
|
5
|
+
sleep flow, in parallel with other specialists. Reconciles task bodies to current truth,
|
|
6
|
+
bumps statuses, creates new tasks for untracked work, attaches everything to the active
|
|
7
|
+
planning version.
|
|
7
8
|
tools: Read, Write, Edit, Bash, Glob, Grep
|
|
8
9
|
model: sonnet
|
|
9
10
|
skills:
|