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
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# Sleep / Consolidation — full flow
|
|
2
|
+
|
|
3
|
+
Sleep (RemSleep) is how working-session changes get folded back into the durable brain. It mirrors how the brain consolidates memory during sleep. **The main agent runs the orchestration directly** — sub-agents cannot reliably fan out to other sub-agents.
|
|
4
|
+
|
|
5
|
+
## When to sleep
|
|
6
|
+
|
|
7
|
+
Sleep debt accumulates automatically via hooks (per Write/Edit tool use). Hooks inject directives — honor them.
|
|
8
|
+
|
|
9
|
+
| Debt | Level | Per-change score | Required behavior |
|
|
10
|
+
|------|-------|------------------|-------------------|
|
|
11
|
+
| 0–3 | Alert | 1–3 changes → +1 | No action |
|
|
12
|
+
| 4–6 | Drowsy | 4–8 changes → +2 | After completing a task: **inform user + offer** consolidation |
|
|
13
|
+
| 7–9 | Sleepy | 9+ changes → +3 | At session start: **inform user + recommend** consolidation before new work |
|
|
14
|
+
| 10+ | Must sleep | — | **Consolidate immediately**, before or right after the current task |
|
|
15
|
+
|
|
16
|
+
Also triggers an advisory: a **★★★ bookmark** exists (regardless of debt), or **3+ sessions** since last sleep.
|
|
17
|
+
|
|
18
|
+
Injected directives (SessionStart + every user message via UserPromptSubmit when debt ≥4):
|
|
19
|
+
- Debt ≥10 → "CONSOLIDATION REQUIRED"
|
|
20
|
+
- Debt ≥7 → "CONSOLIDATION RECOMMENDED"
|
|
21
|
+
- Debt ≥4 → offer after the current task
|
|
22
|
+
|
|
23
|
+
**MANDATORY post-task check:** after any task/major implementation, if debt ≥4 tell the user: *"Sleep debt is [N]. I can consolidate now to preserve this work. Want me to run it?"* Never silently finish.
|
|
24
|
+
**Auto-sleep (act without asking):** task completed with debt ≥7; major implementation finished with debt ≥4.
|
|
25
|
+
**Ask first:** debt 4–6 after a task; accumulated small changes; user wrapping up.
|
|
26
|
+
|
|
27
|
+
For non-file-change work (architecture discussion, a decision with no edits): `dreamcontext sleep add <score> "<reason>"`.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## The flow (run from the main agent context)
|
|
32
|
+
|
|
33
|
+
1. **Tell the user** you're consolidating.
|
|
34
|
+
2. **`dreamcontext sleep start`** — pins the epoch timestamp (safe clearing). Add `--deep` only when you intend to authorize destructive knowledge ops (merges/deletes); a normal sleep is non-destructive.
|
|
35
|
+
3. **Build the brief inline** (cheap CLI, no transcript content):
|
|
36
|
+
- `cat _dream_context/state/.sleep.json` — session IDs, task slugs, `last_assistant_message`, `knowledge_access`
|
|
37
|
+
- `git status --short` and `git log --oneline --since=$(jq -r '.sleep_started_at // .last_sleep' _dream_context/state/.sleep.json)`
|
|
38
|
+
- `dreamcontext core releases active` — the planning version (create one with `dreamcontext core releases add --ver vX.Y.Z --status planning --summary "<theme>" --yes` if missing)
|
|
39
|
+
4. **Dispatch specialists in parallel** — one message, multiple Agent tool calls. Each owns a non-overlapping file domain (no stomping):
|
|
40
|
+
- **Always fire:** `sleep-tasks`, `sleep-state`.
|
|
41
|
+
- **Conditionally fire `sleep-product`** if ANY of:
|
|
42
|
+
- `last_assistant_message` mentions research/analysis/decision
|
|
43
|
+
- a `knowledge_access` entry is 30+ days untouched
|
|
44
|
+
- a research bookmark exists
|
|
45
|
+
- a task slug matches an existing feature PRD filename
|
|
46
|
+
- `git status` shows changes under `_dream_context/core/features/`
|
|
47
|
+
- a session advanced ≥1 acceptance criterion, OR introduced a feature concept with ≥2 criteria, OR the user named something "a feature" / "we should add X", OR a task has `feature:` frontmatter pointing to a non-existent PRD
|
|
48
|
+
- the user hint mentions knowledge or a feature
|
|
49
|
+
- When unsure, **over-fire** `sleep-product` — it no-ops cheaply.
|
|
50
|
+
- **Conditionally fire `sleep-migration`** only when `dreamcontext migrations pending` produces output. Contract: structure-only (paths/frontmatter/fences), no body prose changes; writes the ledger via `dreamcontext migrations record` on completion.
|
|
51
|
+
- **Do NOT fire `sleep-federation`.** Copy-based federation is disabled; peers are read live at recall time, not synced at sleep. The specialist is retained but inert.
|
|
52
|
+
- Pass each specialist a small text brief: epoch, session IDs, active task slugs, planning version, the signals relevant to it, optional user hint. Do **not** paste transcript content — specialists call `dreamcontext transcript distill <id>` themselves.
|
|
53
|
+
5. **Wait for all reports** (each returns a short structured report).
|
|
54
|
+
6. **`dreamcontext reflect`** — each candidate is a term seen across multiple sessions not yet in soul/user/memory/knowledge. Promote into `2.memory.md` or a knowledge file ONLY if genuinely load-bearing; most are noise — discard. Never auto-promote.
|
|
55
|
+
7. **Marketing pass** if `_dream_context/marketing/` exists: `dreamcontext mk rem-sleep`.
|
|
56
|
+
8. **Council promote check:** `dreamcontext council list --unpromoted` — promote if the user engaged positively.
|
|
57
|
+
9. **`dreamcontext sleep done "<one-paragraph summary stitched from specialist reports>"`** — clears pre-epoch state, resets debt, writes a history entry. (If the ClickUp backend is active and any task pushes failed, this auto-retries once, then errors loudly with the failed slugs.)
|
|
58
|
+
10. **Report** the consolidated summary to the user.
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Specialist ownership (non-overlapping domains)
|
|
63
|
+
|
|
64
|
+
| Specialist | Owns | Notes |
|
|
65
|
+
|---|---|---|
|
|
66
|
+
| `sleep-tasks` | Task files (`state/*.md`) | Reconciles task bodies to truth, bumps statuses, creates tasks for untracked work, attaches to the planning version. |
|
|
67
|
+
| `sleep-state` | Core identity (soul, user, memory, core 3–6), CHANGELOG, RELEASES | Records patterns/decisions/preferences, writes a changelog entry per meaningful change since the epoch, surfaces release readiness, enforces anti-bloat ceilings, flags stale knowledge for `sleep-product`. |
|
|
68
|
+
| `sleep-product` | Knowledge files + feature PRDs | Creates/reconciles `knowledge/*.md` and `core/features/*.md`, processes staleness flags, maintains the knowledge index + taxonomy. |
|
|
69
|
+
| `sleep-migration` | Structure only | Moves/renames folders, normalizes frontmatter, wraps fences. Never alters body prose. |
|
|
70
|
+
|
|
71
|
+
**Consolidation discipline (remind specialists in the brief):** prefer *updating/extending* an existing entity over creating a new one. `sleep-tasks` folds a smaller slice into the task that already covers it (broaden its title + insert sub-items) rather than forking a duplicate. `sleep-product` keeps similar verticals/topics in the fewest knowledge files, splitting only on a sharp topical boundary. Duplicate tasks and fragmented near-duplicate knowledge are the top failure modes — but genuinely separate concerns still get their own task/file.
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## Epoch safety
|
|
76
|
+
|
|
77
|
+
`sleep start` pins a timestamp epoch. `sleep done` only clears sessions/changes/bookmarks from *before* the epoch — parallel sessions that finish during consolidation are preserved for the next cycle. This is why you always `sleep start` before dispatching and `sleep done` after, never in the reverse order.
|
|
78
|
+
|
|
79
|
+
## Commands
|
|
80
|
+
```bash
|
|
81
|
+
dreamcontext sleep status # debt level + history
|
|
82
|
+
dreamcontext sleep start [--deep] # begin epoch
|
|
83
|
+
dreamcontext sleep done "<summary>" # finish, reset debt
|
|
84
|
+
dreamcontext sleep add <score> "<why>" # manual debt for non-file work
|
|
85
|
+
dreamcontext sleep debt # debt number (programmatic)
|
|
86
|
+
dreamcontext sleep history [-n N] # consolidation history
|
|
87
|
+
dreamcontext reflect [--write] # cross-session term candidates
|
|
88
|
+
```
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
# Tasks & Features — full protocol
|
|
2
|
+
|
|
3
|
+
## Tasks are your working documents
|
|
4
|
+
|
|
5
|
+
All context, decisions, user stories, acceptance criteria, constraints, technical details, notes, and progress live in the **task body**. Features are retrospective product docs updated only during sleep — never put in-progress context in a feature.
|
|
6
|
+
|
|
7
|
+
The auto-loaded snapshot already lists every non-completed task with status, priority, and last-updated date. Answer "what am I working on?" / "which tasks are active?" directly from it — no tool calls. Only read the full file when you need the body (the **Changelog** section is where the previous session left off).
|
|
8
|
+
|
|
9
|
+
### Lifecycle
|
|
10
|
+
```
|
|
11
|
+
todo → in_progress → in_review → completed
|
|
12
|
+
```
|
|
13
|
+
The sleep agent picks the status that matches reality: `completed` for work that's demonstrably done, low-risk, already validated; `in_review` only when a human genuinely must verify (a behavior change, a design decision, a risky/critical-path change). It does not reflexively park everything in `in_review`, and it closes finished work — so tasks neither rot in `todo` nor rot half-closed in `in_review`.
|
|
14
|
+
|
|
15
|
+
### Create
|
|
16
|
+
```bash
|
|
17
|
+
dreamcontext tasks create <name> \
|
|
18
|
+
--description "..." --priority medium --why "What this accomplishes" \
|
|
19
|
+
[--version v0.9.0] [--person "Ada"] [--due 2026-07-01] [--tags backend,api]
|
|
20
|
+
```
|
|
21
|
+
Defaults: `priority=medium`, `status=todo`. A task created without `--version` auto-attaches to the **active planning version** (see Versioning).
|
|
22
|
+
|
|
23
|
+
### Enrich (insert into any section during active work)
|
|
24
|
+
```bash
|
|
25
|
+
dreamcontext tasks insert <name> user_stories "As a user, I want X so that Y"
|
|
26
|
+
dreamcontext tasks insert <name> acceptance_criteria "API returns 200 with paginated results"
|
|
27
|
+
dreamcontext tasks insert <name> constraints "Use native fetch, no axios"
|
|
28
|
+
dreamcontext tasks insert <name> technical_details "Key file: src/api/tasks.ts (Express router)"
|
|
29
|
+
dreamcontext tasks insert <name> notes "Edge case: empty results return [] not null"
|
|
30
|
+
dreamcontext tasks insert <name> changelog "Implemented pagination for /api/tasks"
|
|
31
|
+
```
|
|
32
|
+
Sections: `why`, `user_stories`, `acceptance_criteria`, `constraints`, `technical_details`, `notes`, `changelog`.
|
|
33
|
+
|
|
34
|
+
### Lifecycle commands
|
|
35
|
+
```bash
|
|
36
|
+
dreamcontext tasks log <name> "what was done" # changelog entry — MANDATORY each session
|
|
37
|
+
dreamcontext tasks status <name> in_review "reason" # bump status (logs automatically)
|
|
38
|
+
dreamcontext tasks complete <name> "summary" # mark complete
|
|
39
|
+
dreamcontext tasks delete <name> --yes # delete (propagates to remote on sync)
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Filtering & discovery
|
|
43
|
+
```bash
|
|
44
|
+
dreamcontext tasks list --version S5 # one milestone
|
|
45
|
+
dreamcontext tasks list --tag memoryos --tag backend --status todo # --tag repeatable, AND
|
|
46
|
+
dreamcontext tasks list --any-tag lina --any-tag studio # --any-tag repeatable, OR
|
|
47
|
+
dreamcontext tasks list --priority critical
|
|
48
|
+
dreamcontext tasks list --feature recall-engine # match related_feature
|
|
49
|
+
dreamcontext tasks list --group-by version --all # sectioned + counts
|
|
50
|
+
dreamcontext tasks list --tag lina --json # scriptable (use this, not awk/grep)
|
|
51
|
+
dreamcontext tasks tags # distinct tags with counts
|
|
52
|
+
```
|
|
53
|
+
Filters compose (AND across flags), case-insensitive; version/priority/feature match exactly.
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## RICE prioritization
|
|
58
|
+
|
|
59
|
+
Optional, additive to priority/urgency; powers the dashboard Scatter view and RICE sort.
|
|
60
|
+
```bash
|
|
61
|
+
dreamcontext tasks create <name> --reach 5 --impact 3 --confidence 75 --effort 2
|
|
62
|
+
dreamcontext tasks rice <name> # print current values
|
|
63
|
+
dreamcontext tasks rice <name> --effort 4 # update one field, recompute
|
|
64
|
+
dreamcontext tasks rice <name> --clear # remove all RICE values
|
|
65
|
+
```
|
|
66
|
+
- `--reach` integer 1–10 · `--impact` integer 1–5 · `--confidence` one of 25/50/75/100 (%) · `--effort` person-weeks (>0, ≤52, 0.5 steps).
|
|
67
|
+
- Score = `(reach × impact × confidence/100) / effort`, computed server-side, stored in frontmatter.
|
|
68
|
+
|
|
69
|
+
## Due dates & urgency
|
|
70
|
+
```bash
|
|
71
|
+
dreamcontext tasks due <name> 2026-07-01 # set
|
|
72
|
+
dreamcontext tasks due <name> clear # clear
|
|
73
|
+
```
|
|
74
|
+
`urgency` (critical/high/medium/low) is the second Eisenhower axis (priority × urgency) for the dashboard matrix.
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## People & assignees (multi-person)
|
|
79
|
+
|
|
80
|
+
Single-person projects ignore all of this. For teams:
|
|
81
|
+
```bash
|
|
82
|
+
dreamcontext config people "Ada" "Mehmet" # set the roster (syncs ## People in 1.user.md)
|
|
83
|
+
dreamcontext tasks create <name> --person "Ada" # records a person:ada tag
|
|
84
|
+
dreamcontext tasks tag <name> person:mehmet # add another assignee
|
|
85
|
+
dreamcontext tasks tag <name> person:ada --remove # unassign
|
|
86
|
+
```
|
|
87
|
+
- `person:<slug>` tags are the source of truth for assignment and support **multiple assignees**. The legacy scalar `assignee` field is deprecated (still read, not written).
|
|
88
|
+
- With ClickUp enabled, the full assignee set round-trips to ClickUp's native `assignees[]` bidirectionally; map each person to a member with `dreamcontext config clickup-member <person> <memberId>` (see [integrations.md](integrations.md)).
|
|
89
|
+
- `DREAMCONTEXT_PERSON` env names the current person for attribution.
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## The Workflow flowchart (keep it in sync)
|
|
94
|
+
|
|
95
|
+
Every task file has a `## Workflow` mermaid block near the top: one node per acceptance criterion, grouped under milestone subgraphs, with status classes `done` / `active` / `todo` / `blocked`. It is the load-bearing summary of the task — drift makes future sessions misread progress.
|
|
96
|
+
|
|
97
|
+
**Whenever** you check off a criterion, start one, add/remove one, or hit a blocker → update that node's `:::class`. Then verify:
|
|
98
|
+
```bash
|
|
99
|
+
dreamcontext tasks doctor <name> # checks flowchart ⇄ acceptance-criteria sync (all tasks if omitted)
|
|
100
|
+
```
|
|
101
|
+
And flip the matching `- [ ]` → `- [x]` in the Acceptance Criteria list immediately — don't wait for sleep.
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## Task file schema (reference)
|
|
106
|
+
```yaml
|
|
107
|
+
---
|
|
108
|
+
id: "task_abc123"
|
|
109
|
+
name: "Implement auth middleware"
|
|
110
|
+
description: "Add JWT validation to protected routes"
|
|
111
|
+
priority: "high" # critical | high | medium | low
|
|
112
|
+
urgency: "medium" # critical | high | medium | low (Eisenhower axis)
|
|
113
|
+
status: "todo" # todo | in_progress | in_review | completed
|
|
114
|
+
created_at: "2026-02-25"
|
|
115
|
+
updated_at: "2026-02-25"
|
|
116
|
+
tags: [] # includes person:<slug> for assignees
|
|
117
|
+
version: "v0.9.0" # planning-version association (auto-set to active planning version)
|
|
118
|
+
parent_task: null
|
|
119
|
+
related_feature: null # feature slug for cross-link
|
|
120
|
+
product: null # multi-product scoping (optional)
|
|
121
|
+
due: null # YYYY-MM-DD
|
|
122
|
+
rice: { reach: 5, impact: 3, confidence: 75, effort: 2, score: 5.625 }
|
|
123
|
+
---
|
|
124
|
+
```
|
|
125
|
+
Files live at `_dream_context/state/<slug>.md`. Lookup is fuzzy: exact slug → prefix → substring.
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## Features (PRDs)
|
|
130
|
+
|
|
131
|
+
Retrospective product documentation, **created and updated exclusively by the sleep agent**. During active work, everything goes in the task; sleep consolidates task content into the matching feature.
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
dreamcontext features create <name> -w "Why" -t backend,api -s planning --related-tasks a,b
|
|
135
|
+
dreamcontext features set <name> status active
|
|
136
|
+
dreamcontext features set <name> tags backend,api,topic:recall
|
|
137
|
+
dreamcontext features insert <name> acceptance_criteria "..." # auto-formats as - [ ]
|
|
138
|
+
dreamcontext features doctor # staleness / orphans / dangling refs
|
|
139
|
+
```
|
|
140
|
+
Status values: `planning | in_progress | in_review | active | shipped | deprecated`. Sections: `changelog`, `notes`, `technical_details`, `constraints`, `user_stories`, `acceptance_criteria`, `why`. PRDs live in `core/features/<name>.md` (flat directory; may carry `product:`).
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## Versioning & releases
|
|
145
|
+
|
|
146
|
+
Versions and releases are unified in `RELEASES.json`. A "version" is a release entry with `status: planning`; releasing flips it to `released` with a date. Lifecycle: `planning → released`.
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
dreamcontext core releases add --ver v0.9.0 --summary "Dashboard improvements" --status planning
|
|
150
|
+
dreamcontext core releases active # print the active planning version
|
|
151
|
+
dreamcontext core releases active v0.10.0 # switch active planning version
|
|
152
|
+
dreamcontext core releases active --clear # unset
|
|
153
|
+
dreamcontext core releases list -n 10
|
|
154
|
+
dreamcontext core releases show v0.9.0
|
|
155
|
+
```
|
|
156
|
+
New tasks without `--version` auto-attach to the active planning version, so work is always linked to a milestone. If none exists, the sleep agent creates one. The dashboard Version Manager plans and releases versions; the sleep agent reports release readiness when all of a planning version's tasks are done.
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
## Multi-product (monorepos)
|
|
161
|
+
|
|
162
|
+
`dreamcontext init` asks whether the project is a monorepo with multiple products and records the list in `state/.config.json` under `multiProduct: string[] | false`. When products are configured:
|
|
163
|
+
|
|
164
|
+
- **Per-product data structures**: `knowledge/data-structures/<product>.md` (single-product → `default.md`). Body format is a single ` ```sql ` fenced block with `-- ...` comments (the dashboard highlights it). Recall-indexed, owned by `sleep-product`.
|
|
165
|
+
- **Per-product knowledge**: `knowledge/products/<product>.md`. Cross-cutting knowledge stays at top-level `knowledge/`.
|
|
166
|
+
- **Tasks** may carry `product: <name>` in frontmatter; CLI/dashboard surface a product filter.
|
|
167
|
+
- **Feature PRDs** may carry `product: <name>` (still in the flat `core/features/` directory).
|
|
168
|
+
- **Auto-injection**: the SessionStart hook resolves the active task (override `state/.active-task`, else most-recently-modified `in_progress` task). If its `product:` is in `multiProduct`, the hook injects `knowledge/products/<name>.md` into the snapshot under `## Active Product Knowledge: <name>` (capped ~200 lines). You don't load it manually — it's already in context.
|
|
169
|
+
|
|
170
|
+
If `multiProduct` is `false`/absent, treat the project as single-product and use `data-structures/default.md`.
|
|
@@ -119,8 +119,9 @@ the user. Ask:
|
|
|
119
119
|
|
|
120
120
|
- **y** → `dreamcontext council promote <debate_id>` (writes
|
|
121
121
|
`_dream_context/knowledge/decision-<slug>.md`)
|
|
122
|
-
- **n / later** → leave as-is. The
|
|
123
|
-
|
|
122
|
+
- **n / later** → leave as-is. The next sleep consolidation will pick it up (the
|
|
123
|
+
main agent runs `dreamcontext council list --unpromoted` during the sleep flow)
|
|
124
|
+
and decide based on your engagement signals.
|
|
124
125
|
|
|
125
126
|
## Hard rules
|
|
126
127
|
|
|
@@ -23,7 +23,7 @@ and idempotency notes.
|
|
|
23
23
|
| `council synthesize <id>` | Prepare synthesis | Prints manifest. Status → `synthesizing`. |
|
|
24
24
|
| `council complete <id>` | Finalize | Requires `final-report.md` to exist. |
|
|
25
25
|
| `council promote <id>` | Copy to knowledge/ | Trims to Verdict + Why + Minority views + Open risks. Skips What-was-debated + Appendix. |
|
|
26
|
-
| `council list [--unpromoted\|--all]` | Triage | `--unpromoted` used
|
|
26
|
+
| `council list [--unpromoted\|--all]` | Triage | `--unpromoted` used during the sleep consolidation (council-promote check). |
|
|
27
27
|
| `council show <id>` | Inspection | Prints debate metadata + round-log. |
|
|
28
28
|
|
|
29
29
|
### Sub-agent commands
|
|
@@ -205,9 +205,13 @@ See `reference/format.md` for the exact `.excalidraw.md` anatomy reverse-enginee
|
|
|
205
205
|
|
|
206
206
|
## Boards as first-class knowledge in dreamcontext
|
|
207
207
|
|
|
208
|
-
When the project uses dreamcontext, Excalidraw
|
|
209
|
-
|
|
210
|
-
|
|
208
|
+
When the project uses dreamcontext, an Excalidraw board belongs **inside the context folder it
|
|
209
|
+
documents** — co-located with that context's knowledge, e.g.
|
|
210
|
+
`_dream_context/knowledge/<context>/<title>/<title>.excalidraw.md`. Diagrams are NOT a segregated
|
|
211
|
+
top-level dump; they live with the context they illustrate (`knowledge/**/*.md` is indexed
|
|
212
|
+
recursively, so a board in a context subfolder is fully recalled). Boards are indexed and recalled
|
|
213
|
+
like any knowledge file — but memory extracts ONLY the `## Text Elements` section (never the scene
|
|
214
|
+
JSON).
|
|
211
215
|
|
|
212
216
|
### Required frontmatter
|
|
213
217
|
|
|
@@ -225,26 +229,29 @@ excalidraw-plugin: parsed
|
|
|
225
229
|
|
|
226
230
|
### Folder convention (preferred)
|
|
227
231
|
|
|
232
|
+
A board lives in its own `<title>/` wrapper folder, INSIDE the context it documents:
|
|
233
|
+
|
|
228
234
|
```
|
|
229
|
-
_dream_context/knowledge/
|
|
230
|
-
├──
|
|
231
|
-
│ ├──
|
|
232
|
-
│
|
|
233
|
-
│
|
|
234
|
-
├──
|
|
235
|
-
│
|
|
236
|
-
|
|
237
|
-
└──
|
|
235
|
+
_dream_context/knowledge/
|
|
236
|
+
├── recall/ ← a context folder (its knowledge + its diagram)
|
|
237
|
+
│ ├── recall-engine-v2.md
|
|
238
|
+
│ └── recall/
|
|
239
|
+
│ ├── recall.excalidraw.md ← generated board (do NOT hand-edit scene JSON)
|
|
240
|
+
│ ├── recall.board.cjs ← generator (dark sibling — excluded from index/recall)
|
|
241
|
+
│ └── recall.json ← spec / source of truth (dark sibling — excluded)
|
|
242
|
+
├── system/
|
|
243
|
+
│ └── architecture/
|
|
244
|
+
│ └── architecture.excalidraw.md
|
|
245
|
+
└── diagrams/ ← LEGACY top-level tree still works (apply-diagrams maintains it)
|
|
246
|
+
└── legacy-flat.excalidraw.md
|
|
238
247
|
```
|
|
239
248
|
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
`.board.cjs` that `require()`s shared helpers by relative path must use a depth that matches its
|
|
245
|
-
actual location.
|
|
249
|
+
Nesting is free-form, any depth — the dashboard Knowledge view renders the whole `knowledge/` tree
|
|
250
|
+
as a nested, collapsible folder tree (each board shows a sketch icon), so a large diagram set stays
|
|
251
|
+
navigable. A board's own `<title>/` folder is always its innermost folder. Note: a `.board.cjs`
|
|
252
|
+
that `require()`s shared helpers by relative path must use a depth that matches its actual location.
|
|
246
253
|
|
|
247
|
-
**Dark siblings**: tooling files inside a
|
|
254
|
+
**Dark siblings**: tooling files inside a board's `<title>/` folder are automatically excluded
|
|
248
255
|
from the index, recall corpus, snapshot, and dashboard list — generator scripts (`.board.cjs`),
|
|
249
256
|
spec JSON, and frontmatter-less helper `.md` notes. They are tooling — they do not pollute memory.
|
|
250
257
|
|
|
@@ -254,8 +261,9 @@ detailed write-up — e.g. `acme/acme.excalidraw.md` next to `acme/acme.teardown
|
|
|
254
261
|
teardown recall normally. Only frontmatter-less notes stay dark, so good organization no longer
|
|
255
262
|
costs you recall.
|
|
256
263
|
|
|
257
|
-
**Flat layout** (`diagrams/<title>.excalidraw.md`) works without
|
|
258
|
-
|
|
264
|
+
**Flat legacy layout** (`diagrams/<title>.excalidraw.md`) still works without migration, but new
|
|
265
|
+
boards belong in their context folder (above); use a per-title `<title>/` folder to keep the
|
|
266
|
+
board + generator + spec together cleanly.
|
|
259
267
|
|
|
260
268
|
### Memory contract
|
|
261
269
|
|
|
@@ -270,18 +278,20 @@ per-title folder when you want to keep the board + generator + spec together cle
|
|
|
270
278
|
|
|
271
279
|
| Board nature | Location | Indexed? |
|
|
272
280
|
|---|---|---|
|
|
273
|
-
| Canonical / source-of-truth (architecture, system flows, roadmaps, durable plans the agent should recall in future sessions) | `
|
|
281
|
+
| Canonical / source-of-truth (architecture, system flows, roadmaps, durable plans the agent should recall in future sessions) | inside its `knowledge/<context>/<title>/` folder | Yes — indexed, recalled |
|
|
274
282
|
| Temporary / scratch / exploratory / in-progress | `inbox/` or `workspace/` (dark by location) | No — not indexed, will not pollute recall |
|
|
275
283
|
|
|
276
|
-
**Decision rule**: "Will a future session need to know this? → `knowledge
|
|
284
|
+
**Decision rule**: "Will a future session need to know this? → its context folder under `knowledge/`. Throwaway/working? → `inbox/` or `workspace/`."
|
|
277
285
|
|
|
278
|
-
Promote a board from inbox/workspace
|
|
286
|
+
Promote a board from inbox/workspace into its context folder only once it becomes canonical.
|
|
279
287
|
|
|
280
|
-
###
|
|
288
|
+
### Legacy `knowledge/diagrams/` + migration
|
|
281
289
|
|
|
282
|
-
|
|
290
|
+
Older projects kept all boards under a single top-level `knowledge/diagrams/` tree. That still
|
|
291
|
+
indexes and renders, and `sleep-product` keeps the store organized over time — but new boards
|
|
292
|
+
should go in their **context folder** (above), not the segregated dump.
|
|
283
293
|
|
|
284
|
-
- `dreamcontext migrations pending` — see pending migration task instructions (
|
|
285
|
-
- `dreamcontext migrations apply-diagrams` —
|
|
294
|
+
- `dreamcontext migrations pending` — see pending migration task instructions (incl. 0.7.2 diagrams-folder-convention).
|
|
295
|
+
- `dreamcontext migrations apply-diagrams` — structural/legacy: folds flat `knowledge/diagrams/*.excalidraw.md` boards into per-title folders AND rewrites inbound [[wikilinks]] atomically. Safe to re-run. Do NOT hand-edit wikilinks manually.
|
|
286
296
|
|
|
287
297
|
Only organize boards you confirm are canonical knowledge. Temp/scratch boards stay in inbox/workspace.
|