dreamcontext 0.7.0 → 0.8.0
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/README.md +42 -0
- package/agents/dreamcontext-initializer.md +165 -26
- package/agents/sleep-federation.md +94 -0
- package/agents/sleep-migration.md +103 -0
- package/agents/sleep-product.md +57 -4
- package/agents/sleep-state.md +1 -0
- package/agents/sleep-tasks.md +21 -0
- package/dist/agents/dreamcontext-initializer.md +165 -26
- package/dist/agents/sleep-federation.md +94 -0
- package/dist/agents/sleep-migration.md +103 -0
- package/dist/agents/sleep-product.md +57 -4
- package/dist/agents/sleep-state.md +1 -0
- package/dist/agents/sleep-tasks.md +21 -0
- package/dist/dashboard/assets/{BrainCanvas3D-lFgJbbhZ.js → BrainCanvas3D-BZyWrW3J.js} +21 -21
- package/dist/dashboard/assets/{_baseUniq-BpANgc_i.js → _baseUniq-C55dCpzj.js} +1 -1
- package/dist/dashboard/assets/ar-SA-G6X2FPQ2-BTWWh58_.js +10 -0
- package/dist/dashboard/assets/{arc-CX32Jm7E.js → arc-BhcvtD7_.js} +1 -1
- package/dist/dashboard/assets/{architectureDiagram-Q4EWVU46-ARASlGxO.js → architectureDiagram-Q4EWVU46-BlVAz3vP.js} +1 -1
- package/dist/dashboard/assets/az-AZ-76LH7QW2-DEPuxlle.js +1 -0
- package/dist/dashboard/assets/bg-BG-XCXSNQG7-CdwdScdW.js +5 -0
- package/dist/dashboard/assets/{blockDiagram-DXYQGD6D-BBvsYm9E.js → blockDiagram-DXYQGD6D-CAzEduT-.js} +1 -1
- package/dist/dashboard/assets/bn-BD-2XOGV67Q-Cx2p_HrL.js +5 -0
- package/dist/dashboard/assets/{c4Diagram-AHTNJAMY-ChSUfXR9.js → c4Diagram-AHTNJAMY-C_5GcHxG.js} +1 -1
- package/dist/dashboard/assets/ca-ES-6MX7JW3Y-BLVJKLW3.js +8 -0
- package/dist/dashboard/assets/channel-13cbKCMF.js +1 -0
- package/dist/dashboard/assets/{chunk-4BX2VUAB-COHoVEpt.js → chunk-4BX2VUAB-DYYyKwKp.js} +1 -1
- package/dist/dashboard/assets/{chunk-4TB4RGXK-DKJFLaTC.js → chunk-4TB4RGXK-B9ZDNs0v.js} +1 -1
- package/dist/dashboard/assets/{chunk-55IACEB6-CKZPWZRu.js → chunk-55IACEB6-0chbuP2q.js} +1 -1
- package/dist/dashboard/assets/{chunk-EDXVE4YY-k1y4mGUJ.js → chunk-EDXVE4YY-BM3tX5V3.js} +1 -1
- package/dist/dashboard/assets/{chunk-FMBD7UC4-ixXe5R10.js → chunk-FMBD7UC4-D7fWQyLU.js} +1 -1
- package/dist/dashboard/assets/{chunk-OYMX7WX6-NDFap7xg.js → chunk-OYMX7WX6-DRSMwRfw.js} +1 -1
- package/dist/dashboard/assets/{chunk-QZHKN3VN-vY0UpHjB.js → chunk-QZHKN3VN-BkySqi6f.js} +1 -1
- package/dist/dashboard/assets/{chunk-YZCP3GAM-yztvsKR-.js → chunk-YZCP3GAM-DWxX_bg1.js} +1 -1
- package/dist/dashboard/assets/classDiagram-6PBFFD2Q-BX19A8jH.js +1 -0
- package/dist/dashboard/assets/classDiagram-v2-HSJHXN6E-BX19A8jH.js +1 -0
- package/dist/dashboard/assets/clone-CiHddu7Q.js +1 -0
- package/dist/dashboard/assets/core-RciSkj6z.js +1 -0
- package/dist/dashboard/assets/{cose-bilkent-S5V4N54A-DKXM5Fh5.js → cose-bilkent-S5V4N54A-CK3SaOdF.js} +1 -1
- package/dist/dashboard/assets/cs-CZ-2BRQDIVT-2wFJFdY3.js +11 -0
- package/dist/dashboard/assets/da-DK-5WZEPLOC-PZ4S5fLH.js +5 -0
- package/dist/dashboard/assets/{dagre-KV5264BT-DN1Nlsmy.js → dagre-KV5264BT-C_O4CkRN.js} +1 -1
- package/dist/dashboard/assets/de-DE-XR44H4JA-COgQyNpE.js +8 -0
- package/dist/dashboard/assets/{diagram-5BDNPKRD-DnoJFRqR.js → diagram-5BDNPKRD-CY7cwksh.js} +1 -1
- package/dist/dashboard/assets/{diagram-G4DWMVQ6-CF1_jTNI.js → diagram-G4DWMVQ6-BBaegF2E.js} +1 -1
- package/dist/dashboard/assets/{diagram-MMDJMWI5-D4-bZZEt.js → diagram-MMDJMWI5-Dtp-QpeD.js} +1 -1
- package/dist/dashboard/assets/{diagram-TYMM5635-al8RqVgf.js → diagram-TYMM5635-h-YHhXz4.js} +1 -1
- package/dist/dashboard/assets/directory-open-01563666-DWU9wJ6I.js +1 -0
- package/dist/dashboard/assets/directory-open-4ed118d0-CunoC1EB.js +1 -0
- package/dist/dashboard/assets/el-GR-BZB4AONW-DzTJgcWa.js +10 -0
- package/dist/dashboard/assets/{erDiagram-SMLLAGMA-MEcC0rwO.js → erDiagram-SMLLAGMA-C8WadTdS.js} +1 -1
- package/dist/dashboard/assets/es-ES-U4NZUMDT-BMzFbvDd.js +9 -0
- package/dist/dashboard/assets/eu-ES-A7QVB2H4-CnpRhfeI.js +11 -0
- package/dist/dashboard/assets/extends-CF3RwP-h.js +1 -0
- package/dist/dashboard/assets/fa-IR-HGAKTJCU-DJozguNj.js +8 -0
- package/dist/dashboard/assets/fi-FI-Z5N7JZ37-4vlr1zEE.js +6 -0
- package/dist/dashboard/assets/file-open-002ab408-DIuFHtCF.js +1 -0
- package/dist/dashboard/assets/file-open-7c801643-684qeFg4.js +1 -0
- package/dist/dashboard/assets/file-save-3189631c-C1wFhQhH.js +1 -0
- package/dist/dashboard/assets/file-save-745eba88-Bb9F9Kg7.js +1 -0
- package/dist/dashboard/assets/{flowDiagram-DWJPFMVM-DCLyNpW8.js → flowDiagram-DWJPFMVM-BDU_Bd0P.js} +1 -1
- package/dist/dashboard/assets/fr-FR-RHASNOE6-BIMGBozN.js +9 -0
- package/dist/dashboard/assets/{ganttDiagram-T4ZO3ILL-DfEvbbJK.js → ganttDiagram-T4ZO3ILL-DI9axi76.js} +1 -1
- package/dist/dashboard/assets/{gitGraphDiagram-UUTBAWPF-C_YozdVL.js → gitGraphDiagram-UUTBAWPF-BuhQ28fO.js} +1 -1
- package/dist/dashboard/assets/gl-ES-HMX3MZ6V-C5wE26uu.js +10 -0
- package/dist/dashboard/assets/{graph-DpIXS1G1.js → graph-Djm-nnL-.js} +1 -1
- package/dist/dashboard/assets/he-IL-6SHJWFNN-B0U2BY4u.js +10 -0
- package/dist/dashboard/assets/hi-IN-IWLTKZ5I-Ddqmbdc3.js +4 -0
- package/dist/dashboard/assets/hu-HU-A5ZG7DT2-Bql7W1FB.js +7 -0
- package/dist/dashboard/assets/id-ID-SAP4L64H-BgPUuH6X.js +10 -0
- package/dist/dashboard/assets/image-blob-reduce.esm-D6s-rqMO.js +7 -0
- package/dist/dashboard/assets/index-BZEr0UdA.css +1 -0
- package/dist/dashboard/assets/index-CCBqToG8.js +480 -0
- package/dist/dashboard/assets/index-DMgrVZGf.js +19 -0
- package/dist/dashboard/assets/index-DpzkIBIK.js +1 -0
- package/dist/dashboard/assets/{infoDiagram-42DDH7IO-AdT6kjzj.js → infoDiagram-42DDH7IO-FlC8UXlC.js} +1 -1
- package/dist/dashboard/assets/{ishikawaDiagram-UXIWVN3A-B0_9IZVO.js → ishikawaDiagram-UXIWVN3A-CM7RkOdA.js} +1 -1
- package/dist/dashboard/assets/it-IT-JPQ66NNP-B8JStDkT.js +11 -0
- package/dist/dashboard/assets/ja-JP-DBVTYXUO-CjqVt-yD.js +8 -0
- package/dist/dashboard/assets/{journeyDiagram-VCZTEJTY-BveNBswQ.js → journeyDiagram-VCZTEJTY-CmXt_usI.js} +1 -1
- package/dist/dashboard/assets/kaa-6HZHGXH3-qlfTF570.js +1 -0
- package/dist/dashboard/assets/kab-KAB-ZGHBKWFO-B1jcf86v.js +8 -0
- package/dist/dashboard/assets/{kanban-definition-6JOO6SKY-CFI8j4jR.js → kanban-definition-6JOO6SKY-DfUTCwbu.js} +1 -1
- package/dist/dashboard/assets/kk-KZ-P5N5QNE5-CDGZZuGX.js +1 -0
- package/dist/dashboard/assets/km-KH-HSX4SM5Z-VJhAICPS.js +11 -0
- package/dist/dashboard/assets/ko-KR-MTYHY66A-DTsCW-6Q.js +9 -0
- package/dist/dashboard/assets/ku-TR-6OUDTVRD-B7sBU8-V.js +9 -0
- package/dist/dashboard/assets/{layout-DI7XjZy1.js → layout-LL6b15MZ.js} +1 -1
- package/dist/dashboard/assets/{linear-CSjp56iw.js → linear-th65CRN7.js} +1 -1
- package/dist/dashboard/assets/lt-LT-XHIRWOB4-DLwGTeYc.js +3 -0
- package/dist/dashboard/assets/lv-LV-5QDEKY6T-Df5ujP3N.js +7 -0
- package/dist/dashboard/assets/min-C1cE6N2D.js +1 -0
- package/dist/dashboard/assets/{mindmap-definition-QFDTVHPH-C2mBnknr.js → mindmap-definition-QFDTVHPH-n-x0bf17.js} +7 -7
- package/dist/dashboard/assets/mr-IN-CRQNXWMA-B0504Lxj.js +13 -0
- package/dist/dashboard/assets/my-MM-5M5IBNSE-CTTz1o7j.js +1 -0
- package/dist/dashboard/assets/nb-NO-T6EIAALU-C423tdvs.js +10 -0
- package/dist/dashboard/assets/nl-NL-IS3SIHDZ-BGX4T5hB.js +8 -0
- package/dist/dashboard/assets/nn-NO-6E72VCQL-e7Z1mG0i.js +8 -0
- package/dist/dashboard/assets/oc-FR-POXYY2M6-CPEhofz-.js +8 -0
- package/dist/dashboard/assets/pa-IN-N4M65BXN-Dmdt2Etw.js +4 -0
- package/dist/dashboard/assets/percentages-BXMCSKIN-D36vqrao.js +215 -0
- package/dist/dashboard/assets/pica-DyXfovKp.js +7 -0
- package/dist/dashboard/assets/{pieDiagram-DEJITSTG-i_phWDqD.js → pieDiagram-DEJITSTG-DFDPs7b_.js} +1 -1
- package/dist/dashboard/assets/pl-PL-T2D74RX3-G1JddCZF.js +9 -0
- package/dist/dashboard/assets/pt-BR-5N22H2LF-pu4YiRox.js +9 -0
- package/dist/dashboard/assets/pt-PT-UZXXM6DQ-BOYLmU0S.js +9 -0
- package/dist/dashboard/assets/{quadrantDiagram-34T5L4WZ-Dv7TGJjw.js → quadrantDiagram-34T5L4WZ-D7Ov5Uju.js} +1 -1
- package/dist/dashboard/assets/{requirementDiagram-MS252O5E-CB2Jl-O5.js → requirementDiagram-MS252O5E-Blqx-X0l.js} +1 -1
- package/dist/dashboard/assets/ro-RO-JPDTUUEW-DlBiDeMi.js +11 -0
- package/dist/dashboard/assets/roundRect-0PYZxl1G.js +1 -0
- package/dist/dashboard/assets/ru-RU-B4JR7IUQ-D0J18l95.js +9 -0
- package/dist/dashboard/assets/{sankeyDiagram-XADWPNL6-DxCoN-EI.js → sankeyDiagram-XADWPNL6-BQbQa_T1.js} +1 -1
- package/dist/dashboard/assets/{sequenceDiagram-FGHM5R23-BeZyaehJ.js → sequenceDiagram-FGHM5R23-DhJhyglC.js} +1 -1
- package/dist/dashboard/assets/si-LK-N5RQ5JYF-4JT6EDIh.js +1 -0
- package/dist/dashboard/assets/sk-SK-C5VTKIMK-Bx5AqQi7.js +6 -0
- package/dist/dashboard/assets/sl-SI-NN7IZMDC-Duy44AJo.js +6 -0
- package/dist/dashboard/assets/{stateDiagram-FHFEXIEX-D3AjQzD1.js → stateDiagram-FHFEXIEX-B3lrGt3B.js} +1 -1
- package/dist/dashboard/assets/stateDiagram-v2-QKLJ7IA2-oO_Mw_KF.js +1 -0
- package/dist/dashboard/assets/subset-shared.chunk-DWRxaQue.js +84 -0
- package/dist/dashboard/assets/subset-worker.chunk-nm8TiAaC.js +1 -0
- package/dist/dashboard/assets/sv-SE-XGPEYMSR-_WPtf9Fs.js +10 -0
- package/dist/dashboard/assets/ta-IN-2NMHFXQM-BZEYawlk.js +9 -0
- package/dist/dashboard/assets/th-TH-HPSO5L25-C_ugiLaK.js +2 -0
- package/dist/dashboard/assets/{timeline-definition-GMOUNBTQ-3l_8RFUg.js → timeline-definition-GMOUNBTQ-D0RPX8Ye.js} +1 -1
- package/dist/dashboard/assets/tr-TR-DEFEU3FU-DkmWDwcW.js +7 -0
- package/dist/dashboard/assets/uk-UA-QMV73CPH-l2YUg_fY.js +6 -0
- package/dist/dashboard/assets/{vennDiagram-DHZGUBPP-2QiY25JD.js → vennDiagram-DHZGUBPP-BxCgJ4Ig.js} +1 -1
- package/dist/dashboard/assets/vi-VN-M7AON7JQ-Chu_8vm0.js +5 -0
- package/dist/dashboard/assets/{wardley-RL74JXVD-DNLmFofz.js → wardley-RL74JXVD-B74rcv6j.js} +1 -1
- package/dist/dashboard/assets/{wardleyDiagram-NUSXRM2D-BI0tupiS.js → wardleyDiagram-NUSXRM2D-BZex7ruR.js} +1 -1
- package/dist/dashboard/assets/webviewWindow-BHsy7FSR.js +1 -0
- package/dist/dashboard/assets/{xychartDiagram-5P7HB3ND-CghXPE7_.js → xychartDiagram-5P7HB3ND-BACIDW_J.js} +1 -1
- package/dist/dashboard/assets/zh-CN-LNUGB5OW-cY5Hv8ht.js +10 -0
- package/dist/dashboard/assets/zh-HK-E62DVLB3-BdyhmSC7.js +1 -0
- package/dist/dashboard/assets/zh-TW-RAJ6MFWO-CTjI4bec.js +9 -0
- package/dist/dashboard/index.html +2 -2
- package/dist/index.js +42156 -8141
- package/dist/skill-packs/excalidraw/SKILL.md +70 -0
- package/dist/templates/feature.md +1 -0
- package/dist/templates/task.md +1 -0
- package/package.json +1 -1
- package/skill/SKILL.md +90 -1
- package/skill-packs/excalidraw/SKILL.md +70 -0
- package/dist/dashboard/assets/channel-w_Bp182N.js +0 -1
- package/dist/dashboard/assets/classDiagram-6PBFFD2Q-CcQxcqy9.js +0 -1
- package/dist/dashboard/assets/classDiagram-v2-HSJHXN6E-CcQxcqy9.js +0 -1
- package/dist/dashboard/assets/clone-_znoR_ci.js +0 -1
- package/dist/dashboard/assets/index-Bo5CUa_M.js +0 -480
- package/dist/dashboard/assets/index-DrqurW1c.css +0 -1
- package/dist/dashboard/assets/min-pAGUJmEC.js +0 -1
- package/dist/dashboard/assets/stateDiagram-v2-QKLJ7IA2-Ci9v--xK.js +0 -1
|
@@ -200,3 +200,73 @@ node examples/style_board.js # JS API: card/conne
|
|
|
200
200
|
Then open the resulting board in Obsidian (Excalidraw view) to confirm it renders.
|
|
201
201
|
|
|
202
202
|
See `reference/format.md` for the exact `.excalidraw.md` anatomy reverse-engineered from this vault.
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
## Boards as first-class knowledge in dreamcontext
|
|
207
|
+
|
|
208
|
+
When the project uses dreamcontext, Excalidraw boards belong in `_dream_context/knowledge/diagrams/`.
|
|
209
|
+
They are indexed and recalled just like any knowledge file — but memory extracts ONLY the
|
|
210
|
+
`## Text Elements` section (never the scene JSON).
|
|
211
|
+
|
|
212
|
+
### Required frontmatter
|
|
213
|
+
|
|
214
|
+
Every board MUST have `name:` and `description:`. Boards with no `## Text Elements` content rely
|
|
215
|
+
entirely on description for recall — make it descriptive.
|
|
216
|
+
|
|
217
|
+
```yaml
|
|
218
|
+
---
|
|
219
|
+
name: My Board Title
|
|
220
|
+
description: One-sentence summary of what this board visualises.
|
|
221
|
+
tags: [architecture, excalidraw]
|
|
222
|
+
excalidraw-plugin: parsed
|
|
223
|
+
---
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
### Folder convention (preferred)
|
|
227
|
+
|
|
228
|
+
```
|
|
229
|
+
_dream_context/knowledge/diagrams/
|
|
230
|
+
├── my-board/
|
|
231
|
+
│ ├── my-board.excalidraw.md ← generated board (do NOT hand-edit scene JSON)
|
|
232
|
+
│ ├── my-board.board.cjs ← generator (dark sibling — excluded from index/recall)
|
|
233
|
+
│ └── my-board.json ← spec / source of truth (dark sibling — excluded)
|
|
234
|
+
└── legacy-flat.excalidraw.md ← flat layout still works; no forced migration
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
**Dark siblings**: any file inside a `diagrams/<title>/` folder that is NOT the board itself
|
|
238
|
+
is automatically excluded from the index, recall corpus, snapshot, and dashboard list.
|
|
239
|
+
This includes generator scripts (`.board.cjs`), spec JSON, and any helper `.md` notes.
|
|
240
|
+
They are tooling — they do not pollute memory.
|
|
241
|
+
|
|
242
|
+
**Flat layout** (`diagrams/<title>.excalidraw.md`) works without any migration. Use the
|
|
243
|
+
per-title folder when you want to keep the board + generator + spec together cleanly.
|
|
244
|
+
|
|
245
|
+
### Memory contract
|
|
246
|
+
|
|
247
|
+
- Memory indexes: frontmatter (`name`, `description`, `tags`) + `## Text Elements` labels.
|
|
248
|
+
- Memory never indexes: scene JSON, base64 blobs, element ids, `## Embedded Files` map.
|
|
249
|
+
- The dashboard renderer receives the raw body (full scene JSON) via the detail API route —
|
|
250
|
+
rendering is unaffected by extraction.
|
|
251
|
+
- A 2 MB board with rich Text Elements and a tiny board with the same labels have the same
|
|
252
|
+
recall surface. Scene size does not affect recall or snapshot token cost.
|
|
253
|
+
|
|
254
|
+
### Where does a board go?
|
|
255
|
+
|
|
256
|
+
| Board nature | Location | Indexed? |
|
|
257
|
+
|---|---|---|
|
|
258
|
+
| Canonical / source-of-truth (architecture, system flows, roadmaps, durable plans the agent should recall in future sessions) | `_dream_context/knowledge/diagrams/<title>/` | Yes — indexed, recalled |
|
|
259
|
+
| Temporary / scratch / exploratory / in-progress | `inbox/` or `workspace/` (dark by location) | No — not indexed, will not pollute recall |
|
|
260
|
+
|
|
261
|
+
**Decision rule**: "Will a future session need to know this? → `knowledge/diagrams/`. Throwaway/working? → `inbox/` or `workspace/`."
|
|
262
|
+
|
|
263
|
+
Promote a board from inbox/workspace to `knowledge/diagrams/` only once it becomes canonical.
|
|
264
|
+
|
|
265
|
+
### Migration
|
|
266
|
+
|
|
267
|
+
Flat boards in `knowledge/diagrams/` do NOT auto-migrate.
|
|
268
|
+
|
|
269
|
+
- `dreamcontext migrations pending` — see pending migration task instructions (including 0.7.2 diagrams-folder-convention).
|
|
270
|
+
- `dreamcontext migrations apply-diagrams` — opt-in: moves flat `knowledge/diagrams/*.excalidraw.md` boards into per-title folders AND rewrites all inbound [[wikilinks]] atomically. Safe to re-run. Do NOT hand-edit wikilinks manually.
|
|
271
|
+
|
|
272
|
+
Only organize boards you confirm are canonical knowledge. Temp/scratch boards stay in inbox/workspace.
|
package/dist/templates/task.md
CHANGED
|
@@ -8,6 +8,7 @@ status: "{{STATUS}}"
|
|
|
8
8
|
created_at: "{{DATE}}"
|
|
9
9
|
updated_at: "{{DATE}}"
|
|
10
10
|
tags: {{TAGS}}
|
|
11
|
+
# tags: use canonical faceted vocabulary (facet:value, kebab-case singular) — run: dreamcontext taxonomy vocab
|
|
11
12
|
parent_task: null
|
|
12
13
|
related_feature: null
|
|
13
14
|
version: {{VERSION}}
|
package/package.json
CHANGED
package/skill/SKILL.md
CHANGED
|
@@ -209,6 +209,7 @@ These files vary across projects. Do not assume a fixed list. Always discover dy
|
|
|
209
209
|
12a. **Keep the Workflow flowchart in sync.** Every task file has a `## Workflow` mermaid block at the top — one node per acceptance criterion, grouped under milestone subgraphs, with status classes `done` / `active` / `todo` / `blocked`. Whenever you check off a criterion, start work on one, add/remove a criterion, or hit a blocker: update the corresponding node's `:::class`. Run `dreamcontext tasks doctor <name>` to verify sync. The flowchart is the load-bearing summary of the task — drift makes future sessions misread progress.
|
|
210
210
|
13. **Reuse before create.** Before building any UI component, utility, hook, or abstraction, search the codebase for existing implementations that serve the same purpose. Use `dreamcontext-explore` to find reusable candidates. If a match exists, use it or extend it. Never duplicate functionality that already exists. This applies to modals, forms, filters, layouts, helpers, and any shared pattern.
|
|
211
211
|
14. **Recall before grep.** Before grepping `_dream_context/` for prior decisions, design rationale, or "did we already address X?", run `dreamcontext memory recall "<query>"`. BM25 ranks across knowledge, features, tasks, and memory entries in one shot — cheaper and more on-target than blind Grep.
|
|
212
|
+
15. **Tag before you create.** Before tagging any task, feature, or knowledge file, consult the project taxonomy vocabulary (`dreamcontext taxonomy vocab`). Reuse canonical faceted tags (`topic:recall`, `domain:security`, etc.) or bare standard tags before inventing new ones — fragmenting tags degrades recall quality. To add new vocabulary: `dreamcontext taxonomy add <tag>` (new domain terms) or `dreamcontext taxonomy alias <alias> <canonical>` (merging shorthands). Use `dreamcontext taxonomy resolve <tag>` to verify classification.
|
|
212
213
|
|
|
213
214
|
---
|
|
214
215
|
|
|
@@ -317,6 +318,8 @@ Sleep debt reminders are injected on every user message (via UserPromptSubmit ho
|
|
|
317
318
|
- a session advanced ≥1 acceptance criterion, OR introduced a feature concept with ≥2 acceptance criteria, OR the user named something "a feature" / "we should add X", OR a task has `feature:` frontmatter pointing to a non-existent PRD
|
|
318
319
|
- user hint mentions knowledge or a feature
|
|
319
320
|
- When unsure, **over-fire** `sleep-product` — it no-ops cheaply.
|
|
321
|
+
- **Conditional fire**: `sleep-migration` when `dreamcontext migrations pending` produces output (pending agent migration tasks exist). Contract: no-content changes only (structure/paths/frontmatter/fences); writes ledger via `dreamcontext migrations record` on completion.
|
|
322
|
+
- **Conditional fire**: `sleep-federation` when `state/.connections.json` has active (non-stale) links OR the federation inbox has pending entries (check `dreamcontext federation status`). Contract: **drain THEN distribute** — `dreamcontext federation drain` (ingest peer digests into first-class `knowledge/*--from-*.md` with `federated:true` provenance, surface conflict-notes as bookmarks, never auto-resolve) then `dreamcontext federation sync` (consent-gated, recall-filtered push into connected peers' inboxes, watermark advances). Owns ONLY `.connections.json` + `.federation-inbox/` + `knowledge/*--from-*.md`. Idempotent — over-fire cheaply.
|
|
320
323
|
- Pass each specialist a small text brief in its prompt: epoch, session IDs, active task slugs, planning version, signals relevant to that specialist, optional user hint. Do **not** include transcript content — specialists call `dreamcontext transcript distill <id>` themselves.
|
|
321
324
|
- **Consolidation discipline (remind both 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 or a needless sub-task; `sleep-product` keeps similar verticals/brands/topics in the fewest knowledge files, splitting only on a sharp topical boundary that sharpens tags. Duplicate tasks and fragmented near-duplicate knowledge are the top consolidation failure modes — but genuinely separate concerns/topics still get their own task/file.
|
|
322
325
|
5. Wait for all specialist reports. Each returns a short structured report.
|
|
@@ -428,7 +431,36 @@ Task insert sections: `why`, `user_stories`, `acceptance_criteria`, `constraints
|
|
|
428
431
|
|
|
429
432
|
**Knowledge**: Index auto-loaded each session. Pin frequently-needed files (`pinned: true` in frontmatter). Read non-pinned on demand. Create with `dreamcontext knowledge create <name>`.
|
|
430
433
|
|
|
431
|
-
Standard tags: `architecture`, `api`, `frontend`, `backend`, `database`, `devops`, `security`, `testing`, `design`, `decisions`, `onboarding`, `domain`. Custom tags allowed.
|
|
434
|
+
Standard tags: `architecture`, `api`, `frontend`, `backend`, `database`, `devops`, `security`, `testing`, `design`, `decisions`, `onboarding`, `domain`. Custom tags allowed. For the full resolved project vocabulary (including faceted tags and aliases), run `dreamcontext taxonomy vocab`. The project vocabulary is maintained in `core/taxonomy.json`; scaffold it with `dreamcontext taxonomy init`. Mutate vocabulary via CLI — never hand-edit the JSON: `dreamcontext taxonomy add <facet:value>` for new tags, `dreamcontext taxonomy alias <alias> <canonical>` for merges, `dreamcontext taxonomy resolve <tag>` to check classification. sleep-product runs taxonomy maintenance during Pass C.
|
|
435
|
+
|
|
436
|
+
**Taxonomy**: Tags drive BM25 recall precision. Prefer canonical faceted tags (`topic:recall`, `domain:database`) over bare duplicates. Run `dreamcontext taxonomy audit` to surface non-canonical or orphan tags.
|
|
437
|
+
|
|
438
|
+
### Excalidraw boards in knowledge/diagrams/
|
|
439
|
+
|
|
440
|
+
Excalidraw boards (`.excalidraw.md`) are first-class knowledge files. Two layouts are both supported:
|
|
441
|
+
|
|
442
|
+
**Flat** (legacy, still works): `knowledge/diagrams/<title>.excalidraw.md`
|
|
443
|
+
|
|
444
|
+
**Per-title folder** (preferred convention): `knowledge/diagrams/<title>/<title>.excalidraw.md`
|
|
445
|
+
|
|
446
|
+
Rules:
|
|
447
|
+
- **REQUIRED frontmatter**: every board MUST have `name:` and `description:` fields. Boards with no `## Text Elements` section fall back to description-only recall — make it descriptive.
|
|
448
|
+
- **Do NOT hand-edit scene JSON.** The `.excalidraw.md` file is generated output. Build a spec and run the generator (`.board.cjs`). Edit the spec, not the board.
|
|
449
|
+
- **Spec is the source of truth.** If the spec and the board ever disagree, the spec wins. Commit both.
|
|
450
|
+
- **Dark siblings**: all files inside a `knowledge/diagrams/<title>/` folder that are NOT the board itself (generator scripts `.board.cjs`, spec `.json`, helper `.md`) are excluded from the index, recall corpus, snapshot, and dashboard. They are tooling artifacts — they do NOT surface in memory.
|
|
451
|
+
- **Memory indexes only frontmatter + ## Text Elements**: scene JSON, base64, and element ids are stripped before indexing. A 2 MB board with rich Text Elements is as searchable as a tiny board. The dashboard renderer still receives the raw body (with full scene JSON) via the detail API route.
|
|
452
|
+
- **Migration is opt-in**: flat boards stay flat unless you explicitly ask for reorganization. Use `dreamcontext migrations pending` to see pending migration tasks; use `dreamcontext migrations apply-diagrams` to opt-in to organizing flat boards into per-title folders.
|
|
453
|
+
|
|
454
|
+
#### Where does a board go?
|
|
455
|
+
|
|
456
|
+
| Board nature | Location | Indexed? |
|
|
457
|
+
|---|---|---|
|
|
458
|
+
| Canonical / source-of-truth (architecture, system flows, roadmaps, durable plans the agent should recall in future sessions) | `knowledge/diagrams/<title>/` | Yes — indexed, recalled |
|
|
459
|
+
| Temporary / scratch / exploratory / in-progress | `inbox/` or `workspace/` (dark by location) | No — not indexed, will not pollute recall |
|
|
460
|
+
|
|
461
|
+
**Decision rule**: "Will a future session need to know this? → `knowledge/diagrams/`. Throwaway/working? → `inbox/` or `workspace/`."
|
|
462
|
+
|
|
463
|
+
Promote a board from `inbox/workspace` to `knowledge/diagrams/` only once it becomes canonical. Use `dreamcontext migrations apply-diagrams` to move flat boards + rewrite inbound [[wikilinks]] atomically — do NOT hand-edit wikilinks.
|
|
432
464
|
|
|
433
465
|
---
|
|
434
466
|
|
|
@@ -457,6 +489,34 @@ dreamcontext memory status
|
|
|
457
489
|
|
|
458
490
|
---
|
|
459
491
|
|
|
492
|
+
## Cross-Project Federation (issue #25)
|
|
493
|
+
|
|
494
|
+
Every `_dream_context/` is normally an island. Federation lets you reach across projects — recall what you worked out in *another* vault — using nothing but the local filesystem (no network, ever). Phase 1 is **read-only**: discovery + cross-vault recall + peer snapshots.
|
|
495
|
+
|
|
496
|
+
```bash
|
|
497
|
+
dreamcontext vaults discover [root] [--register] # find every _dream_context/ under a tree (node_modules ignored, depth-bounded)
|
|
498
|
+
dreamcontext memory recall <query...> --vault <name> # also search a peer vault (repeatable)
|
|
499
|
+
dreamcontext memory recall <query...> --all-vaults # search current + every SHAREABLE registered vault
|
|
500
|
+
dreamcontext memory recall <query...> --connected # search current + out/both connections (degenerate=local until Phase 2)
|
|
501
|
+
dreamcontext snapshot --vault <name> # print a peer vault's context snapshot
|
|
502
|
+
dreamcontext config shareable on|off # opt this project IN/OUT of peer recall (default: off)
|
|
503
|
+
```
|
|
504
|
+
|
|
505
|
+
**Trust model — shareable gates READS, private by default.** A vault is invisible to peer recall until its owner runs `config shareable on`. New and migrated projects default to `shareable: false`. `shareable` is asymmetric: it controls whether OTHERS may pull *your* corpus — it never blocks *you* from reading a shareable peer, and the current vault is always searched regardless of its own flag. Non-shareable peers are silently excluded from `--all-vaults` (never an error). Cross-vault hits are namespaced `<vault>::<type>/<slug>` so the same slug in two vaults never collides.
|
|
506
|
+
|
|
507
|
+
**When to reach across.** Use `--vault`/`--all-vaults` for "how did I solve this in project X?" / "did we already build Y somewhere?" before re-deriving knowledge that already exists in a sibling project.
|
|
508
|
+
|
|
509
|
+
**Per-link connections (Phase 2).** `dreamcontext connect <vault> --direction out|in|both [--topics a,b]` builds an outgoing mesh in `state/.connections.json`; `connections list` / `disconnect <vault>` manage it. Direction is asymmetric: `out` = your digest may flow TO the peer, `in` = you accept the peer's digest, `both` = bidirectional. The dashboard Settings → Cross-Project Federation card edits all of this plus the shareable switch.
|
|
510
|
+
|
|
511
|
+
**Sleep-driven digest inbox (Phase 3).** Federated knowledge crosses a boundary as a *directory of one-file-per-entry JSON digests* under `state/.federation-inbox/` (consumed entries archive to `consumed/`). The `sleep-federation` specialist runs two idempotent steps, ALWAYS in this order:
|
|
512
|
+
|
|
513
|
+
1. **Drain** (`dreamcontext federation drain`) — ingest each pending inbox entry as **first-class** local `knowledge/<slug>.md` carrying `federated: true` + `origin{vault,entryId,sourceTimestamp}` provenance. A slug collision lands at `knowledge/<slug>--from-<vault>.md` (the local doc is never clobbered). A `conflict-note` entry is ingested AND surfaced as a bookmark for the user — never auto-resolved. Version-incompatible entries are quarantined in place.
|
|
514
|
+
2. **Distribute** (`dreamcontext federation sync`) — for each `out`/`both` connection, the sender reads the RECEIVER's `.connections.json` and writes ONLY if the receiver declares `in`/`both` back (the **consent rule**); it computes a recall-filtered digest since `last_synced_at`, writes one file per entry into the peer's inbox, and advances the watermark. Draining first means freshly-ingested peer knowledge is in the corpus when the outbound digest is computed — and is then EXCLUDED from it, because `federated: true` docs are dropped from BOTH digest computation AND cross-vault recall serving (the transitive-leak guard: a third vault never sees what merely passed through this one). Filename dedup + watermark + that exclusion make an A↔B cycle echo-free.
|
|
515
|
+
|
|
516
|
+
The SessionStart snapshot stays on the hot path: it only ever does a single local `pendingInboxCount` readdir to nudge "N pending peer digests — drain them"; it NEVER resolves a peer or builds a peer corpus. Dashboard previews via `POST /api/federation/sync` are **dry-run by construction** (no write function reachable from any server route).
|
|
517
|
+
|
|
518
|
+
---
|
|
519
|
+
|
|
460
520
|
## Structure
|
|
461
521
|
|
|
462
522
|
```
|
|
@@ -474,6 +534,13 @@ _dream_context/
|
|
|
474
534
|
| +-- data-structures/ <- Per-product schemas (recall-indexed knowledge)
|
|
475
535
|
| | +-- default.md <- single-product fallback
|
|
476
536
|
| | +-- <product>.md <- one per product if monorepo
|
|
537
|
+
| +-- diagrams/ <- Excalidraw boards (flat or per-title folder)
|
|
538
|
+
| | +-- <title>.excalidraw.md <- flat layout (still works; legacy OK)
|
|
539
|
+
| | +-- <title>/ <- preferred: per-title folder
|
|
540
|
+
| | | +-- <title>.excalidraw.md <- generated board (do NOT hand-edit scene JSON)
|
|
541
|
+
| | | +-- <title>.board.cjs <- generator script (dark sibling — excluded from index/recall)
|
|
542
|
+
| | | +-- <title>.json <- spec/source of truth (dark sibling — excluded)
|
|
543
|
+
| | | +-- notes.md <- any helper .md (dark sibling — excluded)
|
|
477
544
|
| +-- products/<product>.md <- Per-product knowledge (multi-product)
|
|
478
545
|
+-- state/
|
|
479
546
|
| +-- <task>.md <- Active tasks (frontmatter may include product:)
|
|
@@ -482,6 +549,27 @@ _dream_context/
|
|
|
482
549
|
|
|
483
550
|
---
|
|
484
551
|
|
|
552
|
+
## Improving dreamcontext (Agent Feedback)
|
|
553
|
+
|
|
554
|
+
You are not just a *user* of dreamcontext — you are its field reporter. When dreamcontext gets in your way, the system can only improve if that friction reaches its maintainers. Take responsibility: file it.
|
|
555
|
+
|
|
556
|
+
**Trigger — the moment you notice any of these, consider filing feedback:**
|
|
557
|
+
- You expected a fact to be in memory but `memory recall` didn't surface it (a recall gap, not a missing fact).
|
|
558
|
+
- You wished a CLI command existed and there was no path (e.g. "I want to reopen a completed task" and no `tasks reopen`).
|
|
559
|
+
- A command, hook, or doc behaved wrong, was confusing, or crashed.
|
|
560
|
+
- The structure forced an awkward workaround to do something the system should support directly.
|
|
561
|
+
|
|
562
|
+
Do **not** silently work around it. A workaround fixes today; feedback fixes the system.
|
|
563
|
+
|
|
564
|
+
**The loop (this is the only sanctioned way to file — never run `gh issue create` by hand):**
|
|
565
|
+
1. **Draft.** Run `dreamcontext feedback --dry-run` with the category and a complete scenario. Fill `-s` (what you were doing), `-e` (what you expected), `-g` (what was missing/broken), `-r` (exact commands), `-p` (your proposed improvement). A maintainer who has never seen your session must understand it from the issue alone — include the whole scenario.
|
|
566
|
+
2. **Confirm with the user.** Show them the rendered draft and ask permission. This writes to a public repo on their behalf — never file without an explicit yes.
|
|
567
|
+
3. **File.** Re-run the same command without `--dry-run` and with `--yes`. It checks for near-duplicate open issues, applies the `agent-feedback` label, and files to the dreamcontext project (`meanllbrl/dreamcontext`) — **not** the user's own repo.
|
|
568
|
+
|
|
569
|
+
**No GitHub access?** If the command reports `gh` is missing or unauthenticated, relay its guidance to the user: install `gh` + run `gh auth login`, and if they have no GitHub account, ask them to create a free one at github.com/signup. They need an account to file. Once they're signed in, re-run the loop.
|
|
570
|
+
|
|
571
|
+
**Quality bar:** one issue per distinct gap, concrete title, full scenario, a concrete proposal. Vague feedback ("recall is bad") is noise; a reproducible scenario with a proposed command is signal.
|
|
572
|
+
|
|
485
573
|
## Command Reference
|
|
486
574
|
|
|
487
575
|
All commands prefixed with `dreamcontext`. For reading/searching, use native tools directly.
|
|
@@ -543,6 +631,7 @@ All commands prefixed with `dreamcontext`. For reading/searching, use native too
|
|
|
543
631
|
| `config show` | Print project config (platforms, packs, native-memory state) |
|
|
544
632
|
| `config native-memory <enable\|disable>` | Toggle Claude's native auto-memory; disabled by default so dreamcontext owns project memory |
|
|
545
633
|
| `upgrade [--check]` | Update the dreamcontext CLI itself to the latest npm release |
|
|
634
|
+
| `feedback -c <category> -t <title> -s <scenario> [-e expected] [-g gap] [-r repro] [-p proposal] [--dry-run] [--yes]` | File a structured gap/bug as a GitHub issue to the **dreamcontext project** (upstream, not the user's repo). Use `--dry-run` to render a draft for the user; file with `--yes` only after they approve. Categories: `bug \| missing-cli \| unseen-memory \| feature \| docs \| other`. See "Improving dreamcontext" below. |
|
|
546
635
|
|
|
547
636
|
Feature insert sections: `changelog`, `notes`, `technical_details`, `constraints`, `user_stories`, `acceptance_criteria`, `why`
|
|
548
637
|
Task insert sections: `why`, `user_stories`, `acceptance_criteria`, `constraints`, `technical_details`, `notes`, `changelog`
|
|
@@ -200,3 +200,73 @@ node examples/style_board.js # JS API: card/conne
|
|
|
200
200
|
Then open the resulting board in Obsidian (Excalidraw view) to confirm it renders.
|
|
201
201
|
|
|
202
202
|
See `reference/format.md` for the exact `.excalidraw.md` anatomy reverse-engineered from this vault.
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
## Boards as first-class knowledge in dreamcontext
|
|
207
|
+
|
|
208
|
+
When the project uses dreamcontext, Excalidraw boards belong in `_dream_context/knowledge/diagrams/`.
|
|
209
|
+
They are indexed and recalled just like any knowledge file — but memory extracts ONLY the
|
|
210
|
+
`## Text Elements` section (never the scene JSON).
|
|
211
|
+
|
|
212
|
+
### Required frontmatter
|
|
213
|
+
|
|
214
|
+
Every board MUST have `name:` and `description:`. Boards with no `## Text Elements` content rely
|
|
215
|
+
entirely on description for recall — make it descriptive.
|
|
216
|
+
|
|
217
|
+
```yaml
|
|
218
|
+
---
|
|
219
|
+
name: My Board Title
|
|
220
|
+
description: One-sentence summary of what this board visualises.
|
|
221
|
+
tags: [architecture, excalidraw]
|
|
222
|
+
excalidraw-plugin: parsed
|
|
223
|
+
---
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
### Folder convention (preferred)
|
|
227
|
+
|
|
228
|
+
```
|
|
229
|
+
_dream_context/knowledge/diagrams/
|
|
230
|
+
├── my-board/
|
|
231
|
+
│ ├── my-board.excalidraw.md ← generated board (do NOT hand-edit scene JSON)
|
|
232
|
+
│ ├── my-board.board.cjs ← generator (dark sibling — excluded from index/recall)
|
|
233
|
+
│ └── my-board.json ← spec / source of truth (dark sibling — excluded)
|
|
234
|
+
└── legacy-flat.excalidraw.md ← flat layout still works; no forced migration
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
**Dark siblings**: any file inside a `diagrams/<title>/` folder that is NOT the board itself
|
|
238
|
+
is automatically excluded from the index, recall corpus, snapshot, and dashboard list.
|
|
239
|
+
This includes generator scripts (`.board.cjs`), spec JSON, and any helper `.md` notes.
|
|
240
|
+
They are tooling — they do not pollute memory.
|
|
241
|
+
|
|
242
|
+
**Flat layout** (`diagrams/<title>.excalidraw.md`) works without any migration. Use the
|
|
243
|
+
per-title folder when you want to keep the board + generator + spec together cleanly.
|
|
244
|
+
|
|
245
|
+
### Memory contract
|
|
246
|
+
|
|
247
|
+
- Memory indexes: frontmatter (`name`, `description`, `tags`) + `## Text Elements` labels.
|
|
248
|
+
- Memory never indexes: scene JSON, base64 blobs, element ids, `## Embedded Files` map.
|
|
249
|
+
- The dashboard renderer receives the raw body (full scene JSON) via the detail API route —
|
|
250
|
+
rendering is unaffected by extraction.
|
|
251
|
+
- A 2 MB board with rich Text Elements and a tiny board with the same labels have the same
|
|
252
|
+
recall surface. Scene size does not affect recall or snapshot token cost.
|
|
253
|
+
|
|
254
|
+
### Where does a board go?
|
|
255
|
+
|
|
256
|
+
| Board nature | Location | Indexed? |
|
|
257
|
+
|---|---|---|
|
|
258
|
+
| Canonical / source-of-truth (architecture, system flows, roadmaps, durable plans the agent should recall in future sessions) | `_dream_context/knowledge/diagrams/<title>/` | Yes — indexed, recalled |
|
|
259
|
+
| Temporary / scratch / exploratory / in-progress | `inbox/` or `workspace/` (dark by location) | No — not indexed, will not pollute recall |
|
|
260
|
+
|
|
261
|
+
**Decision rule**: "Will a future session need to know this? → `knowledge/diagrams/`. Throwaway/working? → `inbox/` or `workspace/`."
|
|
262
|
+
|
|
263
|
+
Promote a board from inbox/workspace to `knowledge/diagrams/` only once it becomes canonical.
|
|
264
|
+
|
|
265
|
+
### Migration
|
|
266
|
+
|
|
267
|
+
Flat boards in `knowledge/diagrams/` do NOT auto-migrate.
|
|
268
|
+
|
|
269
|
+
- `dreamcontext migrations pending` — see pending migration task instructions (including 0.7.2 diagrams-folder-convention).
|
|
270
|
+
- `dreamcontext migrations apply-diagrams` — opt-in: moves flat `knowledge/diagrams/*.excalidraw.md` boards into per-title folders AND rewrites all inbound [[wikilinks]] atomically. Safe to re-run. Do NOT hand-edit wikilinks manually.
|
|
271
|
+
|
|
272
|
+
Only organize boards you confirm are canonical knowledge. Temp/scratch boards stay in inbox/workspace.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{aq as o,ar as n}from"./index-Bo5CUa_M.js";const t=(r,a)=>o.lang.round(n.parse(r)[a]);export{t as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as a,c as s,a as e,C as t}from"./chunk-4TB4RGXK-DKJFLaTC.js";import{_ as i}from"./index-Bo5CUa_M.js";import"./chunk-FMBD7UC4-ixXe5R10.js";import"./chunk-YZCP3GAM-yztvsKR-.js";import"./chunk-55IACEB6-CKZPWZRu.js";import"./chunk-EDXVE4YY-k1y4mGUJ.js";var u={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{u as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as a,c as s,a as e,C as t}from"./chunk-4TB4RGXK-DKJFLaTC.js";import{_ as i}from"./index-Bo5CUa_M.js";import"./chunk-FMBD7UC4-ixXe5R10.js";import"./chunk-YZCP3GAM-yztvsKR-.js";import"./chunk-55IACEB6-CKZPWZRu.js";import"./chunk-EDXVE4YY-k1y4mGUJ.js";var u={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{u as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as r}from"./graph-DpIXS1G1.js";var e=4;function a(o){return r(o,e)}export{a as c};
|