dreamcontext 0.12.0 → 0.13.1
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 +10 -10
- package/agents/sleep-product.md +2 -1
- package/agents/sleep-state.md +4 -1
- package/agents/sleep-tasks.md +5 -2
- package/dist/agents/sleep-product.md +2 -1
- package/dist/agents/sleep-state.md +4 -1
- package/dist/agents/sleep-tasks.md +5 -2
- package/dist/dashboard/assets/{BrainCanvas3D-mZCAQwGS.js → BrainCanvas3D-f5Y6PT-1.js} +1 -1
- package/dist/dashboard/assets/{_baseUniq-BUxsWVsL.js → _baseUniq-Ta62vsP4.js} +1 -1
- package/dist/dashboard/assets/{ar-SA-G6X2FPQ2-CccKfvbE.js → ar-SA-G6X2FPQ2-jzxJ_ECp.js} +1 -1
- package/dist/dashboard/assets/{arc-DKUqFYZl.js → arc-D-o-9UoH.js} +1 -1
- package/dist/dashboard/assets/{architectureDiagram-Q4EWVU46-4WGtSdey.js → architectureDiagram-Q4EWVU46-DiKlGJXZ.js} +1 -1
- package/dist/dashboard/assets/{az-AZ-76LH7QW2-C-NroZco.js → az-AZ-76LH7QW2-BL9xCgsH.js} +1 -1
- package/dist/dashboard/assets/{bg-BG-XCXSNQG7-rQaoynHO.js → bg-BG-XCXSNQG7-Ry_R9evo.js} +1 -1
- package/dist/dashboard/assets/{blockDiagram-DXYQGD6D-DFuSTaR5.js → blockDiagram-DXYQGD6D-RsaId3-k.js} +1 -1
- package/dist/dashboard/assets/{bn-BD-2XOGV67Q-D7R-v0tl.js → bn-BD-2XOGV67Q-CUgI7mYR.js} +1 -1
- package/dist/dashboard/assets/{c4Diagram-AHTNJAMY-BJ_6YYYT.js → c4Diagram-AHTNJAMY-DPghs0tx.js} +1 -1
- package/dist/dashboard/assets/{ca-ES-6MX7JW3Y-dsbdYGPx.js → ca-ES-6MX7JW3Y-BRaiYGc1.js} +1 -1
- package/dist/dashboard/assets/channel-BxXtm6aL.js +1 -0
- package/dist/dashboard/assets/{chunk-4BX2VUAB-HJLHjOrd.js → chunk-4BX2VUAB-O7GB9cgM.js} +1 -1
- package/dist/dashboard/assets/{chunk-4TB4RGXK-DjvoLiQ0.js → chunk-4TB4RGXK-BQOhV1JT.js} +1 -1
- package/dist/dashboard/assets/{chunk-55IACEB6-D-m72jvC.js → chunk-55IACEB6-DhAIH--W.js} +1 -1
- package/dist/dashboard/assets/{chunk-EDXVE4YY-BCjmEpM7.js → chunk-EDXVE4YY-Chs7mD-k.js} +1 -1
- package/dist/dashboard/assets/{chunk-FMBD7UC4-DDlvS1yz.js → chunk-FMBD7UC4-BowamHD9.js} +1 -1
- package/dist/dashboard/assets/{chunk-OYMX7WX6-DYJRxE9t.js → chunk-OYMX7WX6-D8UJr8j4.js} +1 -1
- package/dist/dashboard/assets/{chunk-QZHKN3VN-B76yDzg6.js → chunk-QZHKN3VN-BOqj47Nb.js} +1 -1
- package/dist/dashboard/assets/{chunk-YZCP3GAM-CZjAdM3g.js → chunk-YZCP3GAM-UDOQPnhm.js} +1 -1
- package/dist/dashboard/assets/classDiagram-6PBFFD2Q-DRDRixtt.js +1 -0
- package/dist/dashboard/assets/classDiagram-v2-HSJHXN6E-DRDRixtt.js +1 -0
- package/dist/dashboard/assets/clone-DDdzwqUk.js +1 -0
- package/dist/dashboard/assets/{cose-bilkent-S5V4N54A-CbVNpzeg.js → cose-bilkent-S5V4N54A-D-2ct0N_.js} +1 -1
- package/dist/dashboard/assets/{cs-CZ-2BRQDIVT-J9uouZQt.js → cs-CZ-2BRQDIVT-y64ojEgs.js} +1 -1
- package/dist/dashboard/assets/{da-DK-5WZEPLOC-CEwRNThM.js → da-DK-5WZEPLOC-CuGITxZe.js} +1 -1
- package/dist/dashboard/assets/{dagre-KV5264BT-bTITGm1T.js → dagre-KV5264BT-Cl90-nVJ.js} +1 -1
- package/dist/dashboard/assets/{de-DE-XR44H4JA-__KY_QPB.js → de-DE-XR44H4JA-C4yUFwSz.js} +1 -1
- package/dist/dashboard/assets/{diagram-5BDNPKRD-CMb_WZII.js → diagram-5BDNPKRD-CifW537A.js} +1 -1
- package/dist/dashboard/assets/{diagram-G4DWMVQ6-ebqTPDMj.js → diagram-G4DWMVQ6-JF8e4CmK.js} +1 -1
- package/dist/dashboard/assets/{diagram-MMDJMWI5-dtIkfYIv.js → diagram-MMDJMWI5-CYpfsP8h.js} +1 -1
- package/dist/dashboard/assets/{diagram-TYMM5635-BhtWl36c.js → diagram-TYMM5635-b9Z_ORTT.js} +1 -1
- package/dist/dashboard/assets/{el-GR-BZB4AONW-CYkyOlmf.js → el-GR-BZB4AONW-CgIyu6Mx.js} +1 -1
- package/dist/dashboard/assets/{erDiagram-SMLLAGMA-DcDH5wz0.js → erDiagram-SMLLAGMA-HTrqyUnO.js} +1 -1
- package/dist/dashboard/assets/{es-ES-U4NZUMDT-Bu5LUk6U.js → es-ES-U4NZUMDT-g-shI88D.js} +1 -1
- package/dist/dashboard/assets/{eu-ES-A7QVB2H4-IlNi4UGh.js → eu-ES-A7QVB2H4-DRfvnooC.js} +1 -1
- package/dist/dashboard/assets/{fa-IR-HGAKTJCU-Jyt7rkFV.js → fa-IR-HGAKTJCU-KqJ-bb8r.js} +1 -1
- package/dist/dashboard/assets/{fi-FI-Z5N7JZ37-Cqcoli78.js → fi-FI-Z5N7JZ37-Ccm3nZmM.js} +1 -1
- package/dist/dashboard/assets/{flowDiagram-DWJPFMVM-B3iy-L85.js → flowDiagram-DWJPFMVM-B27j9wPy.js} +1 -1
- package/dist/dashboard/assets/{fr-FR-RHASNOE6-IKVJ17C4.js → fr-FR-RHASNOE6-DvWMfb10.js} +1 -1
- package/dist/dashboard/assets/{ganttDiagram-T4ZO3ILL-UKhI0SVC.js → ganttDiagram-T4ZO3ILL-DFbnEWs4.js} +1 -1
- package/dist/dashboard/assets/{gitGraphDiagram-UUTBAWPF-D-GWZW87.js → gitGraphDiagram-UUTBAWPF-Bl-6_fjw.js} +1 -1
- package/dist/dashboard/assets/{gl-ES-HMX3MZ6V-C3efiprZ.js → gl-ES-HMX3MZ6V-CfsSyCvn.js} +1 -1
- package/dist/dashboard/assets/{graph-BFYZl1aj.js → graph-BJt4v-K6.js} +1 -1
- package/dist/dashboard/assets/{he-IL-6SHJWFNN-BsFohTT8.js → he-IL-6SHJWFNN-DvCmEeEq.js} +1 -1
- package/dist/dashboard/assets/{hi-IN-IWLTKZ5I-Cdag_2yp.js → hi-IN-IWLTKZ5I-Caxq3QFJ.js} +1 -1
- package/dist/dashboard/assets/{hu-HU-A5ZG7DT2-CybG-BTD.js → hu-HU-A5ZG7DT2-Cak3F0Es.js} +1 -1
- package/dist/dashboard/assets/{id-ID-SAP4L64H-sH8BmLkx.js → id-ID-SAP4L64H-G6xGS3sm.js} +1 -1
- package/dist/dashboard/assets/index-BoxnNYGo.css +32 -0
- package/dist/dashboard/assets/index-CchlcoQO.js +516 -0
- package/dist/dashboard/assets/{index-D724s9RT.js → index-CmFgzgpQ.js} +1 -1
- package/dist/dashboard/assets/{infoDiagram-42DDH7IO-D4tIVELa.js → infoDiagram-42DDH7IO-CpKMgFKt.js} +1 -1
- package/dist/dashboard/assets/{ishikawaDiagram-UXIWVN3A-C3kfQJPs.js → ishikawaDiagram-UXIWVN3A-RFbi-dXL.js} +1 -1
- package/dist/dashboard/assets/{it-IT-JPQ66NNP-BUL9bA1N.js → it-IT-JPQ66NNP-CRMjGfJO.js} +1 -1
- package/dist/dashboard/assets/{ja-JP-DBVTYXUO-D5RAsuhQ.js → ja-JP-DBVTYXUO-qKukhnUz.js} +1 -1
- package/dist/dashboard/assets/{journeyDiagram-VCZTEJTY-DhXdAiRb.js → journeyDiagram-VCZTEJTY-CTNV9WYX.js} +1 -1
- package/dist/dashboard/assets/{kaa-6HZHGXH3-BFnf-Ufc.js → kaa-6HZHGXH3-B5jCPUdj.js} +1 -1
- package/dist/dashboard/assets/{kab-KAB-ZGHBKWFO-DiGK_ZTh.js → kab-KAB-ZGHBKWFO-BlL73uqK.js} +1 -1
- package/dist/dashboard/assets/{kanban-definition-6JOO6SKY-Cx5laNH2.js → kanban-definition-6JOO6SKY-COgJyhmy.js} +1 -1
- package/dist/dashboard/assets/{kk-KZ-P5N5QNE5-DxsR0KaB.js → kk-KZ-P5N5QNE5-CG0hwSh6.js} +1 -1
- package/dist/dashboard/assets/{km-KH-HSX4SM5Z-CvoPabo9.js → km-KH-HSX4SM5Z-D7_LIf3_.js} +1 -1
- package/dist/dashboard/assets/{ko-KR-MTYHY66A-B9c5NmSl.js → ko-KR-MTYHY66A-DDs6LMMU.js} +1 -1
- package/dist/dashboard/assets/{ku-TR-6OUDTVRD-DG055kJy.js → ku-TR-6OUDTVRD-AmvNC30P.js} +1 -1
- package/dist/dashboard/assets/{layout-DwwzFzt3.js → layout-CpLiDGZe.js} +1 -1
- package/dist/dashboard/assets/{linear-CCkgZ20z.js → linear-hxRkR_6Y.js} +1 -1
- package/dist/dashboard/assets/{lt-LT-XHIRWOB4-CToLILNS.js → lt-LT-XHIRWOB4-DIZituwF.js} +1 -1
- package/dist/dashboard/assets/{lv-LV-5QDEKY6T-RFiS8ekQ.js → lv-LV-5QDEKY6T-BF9ddjMv.js} +1 -1
- package/dist/dashboard/assets/{min-Dc2FnahZ.js → min-BXf0ulcG.js} +1 -1
- package/dist/dashboard/assets/{mindmap-definition-QFDTVHPH-LUttOfMV.js → mindmap-definition-QFDTVHPH-CkrPsGZI.js} +1 -1
- package/dist/dashboard/assets/{mr-IN-CRQNXWMA-CnEWhejt.js → mr-IN-CRQNXWMA-DvT8rSdX.js} +1 -1
- package/dist/dashboard/assets/{my-MM-5M5IBNSE-Bf6P8QZs.js → my-MM-5M5IBNSE-oTzpHZmp.js} +1 -1
- package/dist/dashboard/assets/{nb-NO-T6EIAALU-Cr7PzKgs.js → nb-NO-T6EIAALU-mFTc2K9E.js} +1 -1
- package/dist/dashboard/assets/{nl-NL-IS3SIHDZ-D9Gjqrcc.js → nl-NL-IS3SIHDZ-BvHG6k52.js} +1 -1
- package/dist/dashboard/assets/{nn-NO-6E72VCQL-SGn5Xm7M.js → nn-NO-6E72VCQL-DlLoXNop.js} +1 -1
- package/dist/dashboard/assets/{oc-FR-POXYY2M6-BJrKiOwj.js → oc-FR-POXYY2M6-Cxl6Ws6i.js} +1 -1
- package/dist/dashboard/assets/{pa-IN-N4M65BXN-CAMb13rV.js → pa-IN-N4M65BXN-BWtil7Y8.js} +1 -1
- package/dist/dashboard/assets/{percentages-BXMCSKIN-DYtyPGCn.js → percentages-BXMCSKIN-CLq2oyzj.js} +7 -7
- package/dist/dashboard/assets/{pica-CsfxH0Em.js → pica-CMJDNnKQ.js} +1 -1
- package/dist/dashboard/assets/{pieDiagram-DEJITSTG-C3G7iSyy.js → pieDiagram-DEJITSTG-wlxYzLe8.js} +1 -1
- package/dist/dashboard/assets/{pl-PL-T2D74RX3-D6RD-xuv.js → pl-PL-T2D74RX3-Bmw53sUP.js} +1 -1
- package/dist/dashboard/assets/{pt-BR-5N22H2LF-BubaEA_3.js → pt-BR-5N22H2LF-ULX3TBZk.js} +1 -1
- package/dist/dashboard/assets/{pt-PT-UZXXM6DQ-CdM_0BZc.js → pt-PT-UZXXM6DQ-DfHyDkUR.js} +1 -1
- package/dist/dashboard/assets/{quadrantDiagram-34T5L4WZ-CVEg1LD9.js → quadrantDiagram-34T5L4WZ-BR5iSy7H.js} +1 -1
- package/dist/dashboard/assets/{requirementDiagram-MS252O5E-DnXTKVKA.js → requirementDiagram-MS252O5E-BNuuSVYh.js} +1 -1
- package/dist/dashboard/assets/{ro-RO-JPDTUUEW-5i2wmUHd.js → ro-RO-JPDTUUEW-BC_5xxMm.js} +1 -1
- package/dist/dashboard/assets/{ru-RU-B4JR7IUQ-HtCIg5-6.js → ru-RU-B4JR7IUQ-CQPnfmdC.js} +1 -1
- package/dist/dashboard/assets/{sankeyDiagram-XADWPNL6-D-Q3LUMx.js → sankeyDiagram-XADWPNL6-CwwUGQVB.js} +1 -1
- package/dist/dashboard/assets/{sequenceDiagram-FGHM5R23-D8wOCFBc.js → sequenceDiagram-FGHM5R23-Dida7vc4.js} +1 -1
- package/dist/dashboard/assets/{si-LK-N5RQ5JYF-gdNFoVlI.js → si-LK-N5RQ5JYF-C53L84xe.js} +1 -1
- package/dist/dashboard/assets/{sk-SK-C5VTKIMK-Eag9tQA5.js → sk-SK-C5VTKIMK-BcDGWL_O.js} +1 -1
- package/dist/dashboard/assets/{sl-SI-NN7IZMDC-BFlQuwpN.js → sl-SI-NN7IZMDC-FuMpHBk9.js} +1 -1
- package/dist/dashboard/assets/{stateDiagram-FHFEXIEX-Do9qEX6W.js → stateDiagram-FHFEXIEX-CNvfKe7v.js} +1 -1
- package/dist/dashboard/assets/stateDiagram-v2-QKLJ7IA2-B8F8hUBl.js +1 -0
- package/dist/dashboard/assets/{subset-shared.chunk-Cm4V9KkI.js → subset-shared.chunk-Do9_AHqy.js} +1 -1
- package/dist/dashboard/assets/{subset-worker.chunk-DbIuMVFm.js → subset-worker.chunk-i2BHHQN3.js} +1 -1
- package/dist/dashboard/assets/{sv-SE-XGPEYMSR-ZEKrtqFc.js → sv-SE-XGPEYMSR-CAB9zxpi.js} +1 -1
- package/dist/dashboard/assets/{ta-IN-2NMHFXQM-gchwtW9r.js → ta-IN-2NMHFXQM-yDO7M7xr.js} +1 -1
- package/dist/dashboard/assets/{th-TH-HPSO5L25-DohfXasj.js → th-TH-HPSO5L25-B1m3C6pX.js} +1 -1
- package/dist/dashboard/assets/{timeline-definition-GMOUNBTQ-Czx9VG5g.js → timeline-definition-GMOUNBTQ-CujUrKzh.js} +1 -1
- package/dist/dashboard/assets/{tr-TR-DEFEU3FU-DYV95LVI.js → tr-TR-DEFEU3FU-CL5wc1n8.js} +1 -1
- package/dist/dashboard/assets/{uk-UA-QMV73CPH-Bpxsn2xS.js → uk-UA-QMV73CPH-BbweuNSf.js} +1 -1
- package/dist/dashboard/assets/{vennDiagram-DHZGUBPP-Ce_Sxxfx.js → vennDiagram-DHZGUBPP-ar0AgOfJ.js} +1 -1
- package/dist/dashboard/assets/{vi-VN-M7AON7JQ-BK8ew4LX.js → vi-VN-M7AON7JQ--lCR5VP0.js} +1 -1
- package/dist/dashboard/assets/{wardley-RL74JXVD-DPv1FABO.js → wardley-RL74JXVD-DWD-UZhX.js} +1 -1
- package/dist/dashboard/assets/{wardleyDiagram-NUSXRM2D-CCn43KWG.js → wardleyDiagram-NUSXRM2D-Et52gtVy.js} +1 -1
- package/dist/dashboard/assets/{xychartDiagram-5P7HB3ND-D8jqISXa.js → xychartDiagram-5P7HB3ND-pMHGVahC.js} +1 -1
- package/dist/dashboard/assets/{zh-CN-LNUGB5OW-MHsVZfMi.js → zh-CN-LNUGB5OW-DSVSl5q1.js} +1 -1
- package/dist/dashboard/assets/{zh-HK-E62DVLB3-vWPe0Xiq.js → zh-HK-E62DVLB3-DxZ5YtvV.js} +1 -1
- package/dist/dashboard/assets/{zh-TW-RAJ6MFWO-D1qdXP-0.js → zh-TW-RAJ6MFWO-DlXNVnbL.js} +1 -1
- package/dist/dashboard/index.html +2 -2
- package/dist/git-sync/askpass.cjs +0 -0
- package/dist/index.js +10804 -10337
- package/package.json +1 -1
- package/skill/SKILL.md +47 -5
- package/skill/references/cli-reference.md +21 -2
- package/skill/references/knowledge-and-recall.md +5 -2
- package/skill/references/sleep.md +2 -1
- package/skill/references/tasks-and-features.md +51 -2
- package/dist/dashboard/assets/channel-CIIBmX-d.js +0 -1
- package/dist/dashboard/assets/classDiagram-6PBFFD2Q-BmFrdEQk.js +0 -1
- package/dist/dashboard/assets/classDiagram-v2-HSJHXN6E-BmFrdEQk.js +0 -1
- package/dist/dashboard/assets/clone-CNozcEzk.js +0 -1
- package/dist/dashboard/assets/index-C2R7Is0-.js +0 -516
- package/dist/dashboard/assets/index-d0njwauj.css +0 -32
- package/dist/dashboard/assets/stateDiagram-v2-QKLJ7IA2-D7FDMEq6.js +0 -1
package/package.json
CHANGED
package/skill/SKILL.md
CHANGED
|
@@ -3,10 +3,12 @@ name: dreamcontext
|
|
|
3
3
|
description: >
|
|
4
4
|
AI agent persistent context management system. Activate when working on any project
|
|
5
5
|
that has an _dream_context/ directory, when managing tasks, features, knowledge,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
task
|
|
9
|
-
|
|
6
|
+
insights (Lab analytics metrics), roadmap objectives/OKRs, session continuity, or
|
|
7
|
+
when the user mentions context management, agent memory, or project state — the words
|
|
8
|
+
insight, objective, task, feature, knowledge name dreamcontext entities in any language.
|
|
9
|
+
Provides structured memory, task lifecycle management, analytics insight syncing,
|
|
10
|
+
ClickUp/GitHub task sync, a web dashboard, cross-project federation, and cross-session
|
|
11
|
+
continuity via the dreamcontext CLI.
|
|
10
12
|
user-invocable: false
|
|
11
13
|
alwaysApply: true
|
|
12
14
|
hooks:
|
|
@@ -77,6 +79,7 @@ dreamcontext is **more than memory files**. Every capability below is real and s
|
|
|
77
79
|
| **Structured memory** | soul/user/memory + knowledge + tasks, auto-loaded each session | this file |
|
|
78
80
|
| **Tasks** | Working documents with changelog, RICE, status lifecycle, start/due date ranges, resolved assignees, and project-declared custom fields (`overrides/task.md`) | [tasks-and-features.md](references/tasks-and-features.md) |
|
|
79
81
|
| **Roadmap / Objectives** | PO-authored OKR board: objectives in `core/objectives/`, many-to-many task links (`objectives:` frontmatter), dependency DAG with full forecast cascade, target vs forecast slip detection, `dreamcontext roadmap` (+ `--json`) | [tasks-and-features.md](references/tasks-and-features.md) |
|
|
82
|
+
| **Lab / Insights** | Curated analytics **metrics** ("insights") synced from HTTP APIs or local scripts into the brain: manifests in `lab/insights/`, cached series every session, roadmap Key-Result binding (`lab bind` / the dashboard's objective dialogs — one feeder per objective, seeds `metric.current` on connect), dashboard Lab page. **An insight is NOT a knowledge file** — create with `dreamcontext lab create`, never `knowledge create` | [tasks-and-features.md](references/tasks-and-features.md) |
|
|
80
83
|
| **Features (PRDs)** | Retrospective product docs, updated only during sleep | [tasks-and-features.md](references/tasks-and-features.md) |
|
|
81
84
|
| **Knowledge** | Tagged deep docs, pinning, staleness, Excalidraw diagrams | [knowledge-and-recall.md](references/knowledge-and-recall.md) |
|
|
82
85
|
| **Memory recall** | Haiku/BM25 search over the whole corpus; auto-injected on prompts | [knowledge-and-recall.md](references/knowledge-and-recall.md) |
|
|
@@ -101,6 +104,38 @@ dreamcontext is **more than memory files**. Every capability below is real and s
|
|
|
101
104
|
|
|
102
105
|
---
|
|
103
106
|
|
|
107
|
+
## Entity Router — create the RIGHT thing (past sessions got this wrong)
|
|
108
|
+
|
|
109
|
+
dreamcontext has **eight distinct entity types**, each with ONE home and ONE creation path. When the user says "create/add/track X", route by what X **is** — never by the nearest command you happen to remember. The canonical mistake: user says *"create an insight"* and the agent runs `knowledge create`. An insight is not knowledge.
|
|
110
|
+
|
|
111
|
+
Two routing rules that override surface reading:
|
|
112
|
+
|
|
113
|
+
- **Entity nouns are reserved words — in ANY language.** In a dreamcontext project, *insight, objective, roadmap, task, feature, knowledge, bookmark, trigger, release* name THESE entities, not their dictionary meanings — whatever language the sentence around them is in ("insight oluşturalım", "crea un insight" → `lab create`, not a prose analysis or an external dashboard). The trigger phrases below are English examples; match the **intent**, not the exact words.
|
|
114
|
+
- **Route by problem-shape too, not only by verbs.** Users often describe the need without naming the entity. If the described capability matches a subsystem's shape (see litmus tests + the "don't rebuild" rule below), that subsystem IS the answer.
|
|
115
|
+
|
|
116
|
+
| User says… | Entity | What it IS | Create with |
|
|
117
|
+
|---|---|---|---|
|
|
118
|
+
| "create an insight", "track MRR / WAU / signups", "add a metric", "I want to see X every session", **or the problem-shape:** "a chart/number that refreshes itself from Notion/Stripe/an API", "I don't want to ask you to re-fetch it every time", "same data, different views/date ranges" | **Insight** — `lab/insights/<slug>.md` | A curated analytics **metric backed by an external source** (HTTP API or script) — a number/series that re-syncs. Has a manifest, cache, TTL, adapters, tweaks, dashboard renders with a refresh button, optional KR binding (`lab bind <insight> <objective>`) | `dreamcontext lab create <slug> --title "…"` (offer-and-confirm protocol → [tasks-and-features.md](references/tasks-and-features.md)) |
|
|
119
|
+
| "add an objective / goal / OKR", "put it on the roadmap", "we want X by Q4" | **Objective** — `core/objectives/<slug>.md` | A PO-authored **outcome** with target date, dependency DAG, optional Key-Result metric | `dreamcontext roadmap objective create` (ASK first — objectives are PO-owned) |
|
|
120
|
+
| "document this", "write up the research / decision / how X works" | **Knowledge** — `knowledge/…` | Durable **prose**: research, decisions, rationale, domain context. It doesn't refresh itself and it isn't work to do | `dreamcontext knowledge create <name>` |
|
|
121
|
+
| "the X feature", what a shipped capability is | **Feature PRD** — `knowledge/features/` | Retrospective **product doc** (user stories + acceptance criteria) | Sleep agent ONLY — never during active work |
|
|
122
|
+
| any work over ~5 minutes, "let's build / fix X" | **Task** — `state/<slug>.md` | A **working document** with lifecycle, changelog, criteria | `dreamcontext tasks create` (check for an existing one first) |
|
|
123
|
+
| a moment worth remembering, a correction, a decision made | **Bookmark** | A salience-tagged marker for the sleep agent | `dreamcontext bookmark add "…" -s N --task <slug>` |
|
|
124
|
+
| "remind me when / next time X comes up" | **Trigger** | Prospective memory — fires when context matches | `dreamcontext trigger add <when> <remind>` |
|
|
125
|
+
| "version / release / sprint / milestone" | **Release entry** — `RELEASES.json` | A planning version or shipped release | `dreamcontext core releases add` |
|
|
126
|
+
|
|
127
|
+
**Litmus tests when unsure:**
|
|
128
|
+
- Is it a **number/series that updates from a source**? → insight (`lab`).
|
|
129
|
+
- Is it an **outcome with a committed date**? → objective (`roadmap`).
|
|
130
|
+
- Is it **prose you write once and maintain**? → knowledge.
|
|
131
|
+
- Is it **work to do**? → task.
|
|
132
|
+
|
|
133
|
+
**Don't rebuild what the brain already has.** Before proposing to scaffold ANY new app, script, page, or external service for the user's need, check whether a dreamcontext subsystem already covers it: a self-refreshing metric/chart → **Lab insight** (the dashboard's Lab page IS the refreshable view — adapters, tweaks, renders included); OKR/goal tracking → **roadmap objectives**; "remind me when…" → **triggers**; kanban/board views → the **dashboard**. The second canonical mistake (a real past failure): the user described "a debt number that refreshes from Notion, with tweakable views" and the agent designed a brand-new Vercel dashboard — when `lab create` + a script adapter was the whole answer. Propose external builds only when no subsystem fits, and say why it doesn't.
|
|
134
|
+
|
|
135
|
+
If the requested entity type is ambiguous ("track this" could be insight, objective, or trigger), **ask one clarifying question instead of guessing** — creating the wrong entity pollutes the brain and the user has to notice and undo it.
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
104
139
|
## What Is Already In Your Context (do not re-read)
|
|
105
140
|
|
|
106
141
|
The SessionStart hook injects this automatically every session — answer from it directly, **zero tool calls needed**:
|
|
@@ -109,6 +144,7 @@ The SessionStart hook injects this automatically every session — answer from i
|
|
|
109
144
|
- **Extended core files index** — names/types of style guide, tech stack, system flow
|
|
110
145
|
- **Active tasks** — status, priority, last updated, and the objectives each serves (answer "which tasks are active?" from this)
|
|
111
146
|
- **Objectives (roadmap)** — active + recently-finished objectives with progress %, target vs forecast, and slip flags. **Weigh decisions against these outcomes** — they are WHAT the project is driving toward
|
|
147
|
+
- **Lab insights** — cached analytics metrics (title / latest value / staleness / group) when `lab/insights/` is non-empty. Answer "what's our MRR/WAU?" from it; `dreamcontext lab sync` only when stale
|
|
112
148
|
- **Bookmarks** — tagged important moments from prior sessions, by salience
|
|
113
149
|
- **Contextual reminders** — triggers matching active tasks (prospective memory)
|
|
114
150
|
- **Sleep state** — current debt level, sessions since last sleep, history
|
|
@@ -180,7 +216,7 @@ When in doubt about a command or flag, open [cli-reference.md](references/cli-re
|
|
|
180
216
|
|
|
181
217
|
Skip triage only when the request is (a) a 1-line factual question, (b) purely about dreamcontext mechanics (this skill), or (c) outside every available skill's domain. When in doubt, load.
|
|
182
218
|
|
|
183
|
-
3. **Recall before grep.** Before grepping `_dream_context/` for prior decisions or "did we already do X?", run `dreamcontext memory recall "<query>"`. It ranks across knowledge, features, tasks, memory, and
|
|
219
|
+
3. **Recall before grep.** Before grepping `_dream_context/` for prior decisions or "did we already do X?", run `dreamcontext memory recall "<query>"`. It ranks across knowledge, features, tasks, memory, changelog, objectives, and insights in one shot — cheaper and more on-target than blind Grep.
|
|
184
220
|
|
|
185
221
|
4. **Single source of truth — check before creating, update over duplicate.** Every fact lives in exactly ONE place. Before creating any task/feature/knowledge, `dreamcontext memory recall` for it; if it exists, UPDATE it instead of forking a copy.
|
|
186
222
|
- **Know feature vs knowledge.** A **feature** (`knowledge/features/<name>.md` — typed knowledge, `type: feature`; the `dreamcontext features` CLI is a deprecated compat alias) is product documentation — what a capability *is*, its user stories + acceptance criteria — updated only at sleep. **Knowledge** (`knowledge/…`) is other durable material: research, decisions, rationale, domain/technical context. In-progress work lives in a **task**, never in a feature or knowledge file.
|
|
@@ -300,6 +336,7 @@ Status: `todo → in_progress → in_review → completed`. Sections: `why`, `us
|
|
|
300
336
|
- **Quick capture:** `dreamcontext memory remember "<text>"` writes a `type=note` CHANGELOG entry; sleep reconciles it later. (`2.memory.md` no longer has a LIFO ship-narrative section — ship events live in CHANGELOG.)
|
|
301
337
|
- **Knowledge files:** index auto-loaded; create with `dreamcontext knowledge create <name>`; pin frequently-needed ones (`pinned: true`); read non-pinned on demand and `knowledge touch` after. Group a flat file into a context folder with `dreamcontext knowledge move <slug> <folder>` (atomic move + inbound `[[wikilink]]` rewrite — never `mv` + hand-edit links).
|
|
302
338
|
- **Features are sleep-only** (see rule 9).
|
|
339
|
+
- **Insights are NOT knowledge** — a metric the user wants tracked ("create an insight", "track MRR") is a **Lab insight** (`dreamcontext lab create`), not a knowledge file. See the Entity Router above; full protocol → [tasks-and-features.md](references/tasks-and-features.md).
|
|
303
340
|
|
|
304
341
|
**Recall modes, taxonomy, Excalidraw boards/diagrams, multi-product knowledge** → [knowledge-and-recall.md](references/knowledge-and-recall.md).
|
|
305
342
|
|
|
@@ -353,6 +390,11 @@ _dream_context/
|
|
|
353
390
|
│ ├── features/<feature>.md ← Feature PRDs, typed knowledge (type: feature; may include product:)
|
|
354
391
|
│ ├── data-structures/{default,<product>}.md ← schemas (recall-indexed; ```sql body)
|
|
355
392
|
│ └── products/<product>.md ← per-product knowledge (multi-product)
|
|
393
|
+
├── lab/ ← Analytics insights (curated metrics — NOT knowledge)
|
|
394
|
+
│ ├── insights/<slug>.md ← insight manifests (`dreamcontext lab create`)
|
|
395
|
+
│ ├── cache/<slug>.json ← synced series snapshots (never hand-edit)
|
|
396
|
+
│ ├── scripts/<slug>.mjs ← custom-script adapters (run locally with your credentials)
|
|
397
|
+
│ └── credentials.json ← gitignored — write ONLY via `lab credentials set`
|
|
356
398
|
├── overrides/
|
|
357
399
|
│ └── task.md ← OPTIONAL: project task template + custom_fields schema (briefed to agents)
|
|
358
400
|
├── state/
|
|
@@ -71,12 +71,31 @@ Sections for `tasks insert`: `why`, `user_stories`, `acceptance_criteria`, `cons
|
|
|
71
71
|
| `roadmap objective delete <slug>` | Delete; other objectives' `depends_on` are healed automatically. `--yes`. |
|
|
72
72
|
| `roadmap objective depend <A> <B>` | A depends on B — **rejected at write time** if it would create a circular dependency. |
|
|
73
73
|
| `roadmap objective undepend <A> <B>` | Remove the dependency edge. |
|
|
74
|
-
| `roadmap objective metric <slug>` | Set/update the objective's Key Result metric (outcome-based progress instead of task rollup). `--current <n>` (the common nudge — latest observed value), `--target <n>`, `--baseline <n>`, `--label <text>`, `--unit <text>`, `--clear` (remove the metric, back to task-based progress). Sleep may update `--current` when it observes a new real value; all other objective fields stay PO-owned. |
|
|
74
|
+
| `roadmap objective metric <slug>` | Set/update the objective's Key Result metric (outcome-based progress instead of task rollup). `--current <n>` (the common nudge — latest observed value), `--target <n>`, `--baseline <n>`, `--label <text>`, `--unit <text>`, `--clear` (remove the metric, back to task-based progress). Sleep may update `--current` when it observes a new real value; all other objective fields stay PO-owned. **Insight-fed objectives are hands-off:** if a Lab insight binds this objective (`lab list --json` → `binding.objective`), `lab sync` owns `current` — don't hand-write it, suggest a sync instead; and before `--clear`, disconnect the feeder (`lab bind <insight> --clear`) so no binding is left warning on every sync. |
|
|
75
75
|
|
|
76
76
|
Task-side linkage: `tasks create --objectives a,b` · `tasks objectives <task> a,b|clear` · `tasks list --objective <slug>`. Objectives are recallable: `memory recall "<query>" --types objective`.
|
|
77
77
|
|
|
78
78
|
---
|
|
79
79
|
|
|
80
|
+
## Lab (analytics insights — see [tasks-and-features.md](tasks-and-features.md))
|
|
81
|
+
|
|
82
|
+
Curated metrics synced from HTTP APIs or local scripts into `_dream_context/lab/`. **This — not `knowledge create` — is what "create an insight" means.** The SessionStart snapshot renders a Lab section; insights are recallable via `memory recall "<query>" --types insight`.
|
|
83
|
+
|
|
84
|
+
| Command | Description |
|
|
85
|
+
|---|---|
|
|
86
|
+
| `lab create <slug>` | Scaffold `lab/insights/<slug>.md`. `--title <str>` (required), `--group <section>`, `--render number\|line\|pie\|raw` (default number), `--adapter http\|script` (default http), `--unit <str>`, `--ttl <minutes>` (default 1440). Edit the manifest afterwards to set the real endpoint/extract (or script) config, then sync. |
|
|
87
|
+
| `lab sync [slug]` | Sync one insight, or every insight with `--all`. `--force` refetches even when the cache is within TTL (fresh insights are otherwise skipped and reported). On failure the prior series is kept, the error is loud, and the exit code is non-zero — never a silent half-sync. A changed custom script prints a loud tripwire notice before executing. |
|
|
88
|
+
| `lab list` | All insights with latest value, unit, staleness. `--json`. |
|
|
89
|
+
| `lab show <slug>` | Manifest + cached series — **cache only, never fetches**. `--json`. |
|
|
90
|
+
| `lab tweak <slug> <key> <value>` | Set one declared tweak (typed `enum\|date\|string`; a relative range is an enum tweak keyed `range`). |
|
|
91
|
+
| `lab bind <slug> [objective]` | Connect an insight to an objective's Key Result (`--value latest\|series:<name>`; `--clear` disconnects). Enforces ONE feeder per objective (a previous feeder is unbound loudly) and immediately seeds `metric.current` from the cached latest. The dashboard equivalent lives in the objective create modal / detail panel (Key Result section). |
|
|
92
|
+
| `lab credentials set <key>` | Store a secret for `{{cred:key}}` placeholders — hidden prompt (`--value` works but is shell-history-risky). Gitignore-first, mode 0600. **The only supported way to create `lab/credentials.json`.** |
|
|
93
|
+
| `lab credentials list` | Credential key NAMES only — values are never printed. |
|
|
94
|
+
|
|
95
|
+
**Trust note:** `lab/scripts/*.mjs` run locally, in-process, with credentials passed in — same trust level as the repo. Review scripts before their first sync. **Sleep does NOT run lab sync** — refreshing is always an explicit action. An insight manifest may carry `binding: {objective: <slug>, value: latest}` to auto-write that objective's Key-Result `metric.current` on every successful sync — set it via `lab bind` or the dashboard's objective dialogs, not by hand.
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
80
99
|
## Features
|
|
81
100
|
|
|
82
101
|
| Command | Description |
|
|
@@ -120,7 +139,7 @@ Sections for `features insert`: `changelog`, `notes`, `technical_details`, `cons
|
|
|
120
139
|
|
|
121
140
|
| Command | Description |
|
|
122
141
|
|---|---|
|
|
123
|
-
| `memory recall <query...>` | Search the corpus (knowledge + features + tasks + memory + changelog). `-t/--top <n>`, `--types <csv>`, `--json`, `--plain`, `--vault <name>` (repeatable), `--connected`, `--all-vaults`. |
|
|
142
|
+
| `memory recall <query...>` | Search the corpus (knowledge + features + tasks + memory + changelog + objectives + insights). `-t/--top <n>`, `--types <csv>`, `--json`, `--plain`, `--vault <name>` (repeatable), `--connected`, `--all-vaults`. |
|
|
124
143
|
| `memory remember <text...>` | Quick-append a CHANGELOG entry (`type=note`, `scope=quick`). `--summary`, `--type`, `--scope`, `--references <csv>`, `--person <csv>`. |
|
|
125
144
|
| `memory update <slug>` | Update a knowledge file. `-d/--description`, `-t/--tags`, `-c/--content`, `--append <text>`, `--pin`, `--unpin`. |
|
|
126
145
|
| `memory delete <slug>` | Delete a knowledge file (irreversible; recover via git). `-f/--force`. |
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
Deep, durable docs the agent should recall in future sessions (research, design rationale, domain context). The **index is auto-loaded each session** (names, descriptions, tags, staleness) — so you already know what exists.
|
|
6
6
|
|
|
7
|
+
**Knowledge is prose, not everything.** A metric the user wants tracked ("create an insight", "track MRR") is a **Lab insight** (`dreamcontext lab create` — see [tasks-and-features.md](tasks-and-features.md)); an outcome with a target date is a roadmap **objective**; what a shipped capability is belongs in a **feature PRD**. See the Entity Router in SKILL.md before creating anything.
|
|
8
|
+
|
|
7
9
|
```bash
|
|
8
10
|
dreamcontext knowledge create <name> -d "description" -t architecture,api -c "body"
|
|
9
11
|
dreamcontext knowledge index [--tag <tag>] [--plain]
|
|
@@ -43,7 +45,7 @@ It moves the file **and** rewrites every inbound `[[wikilink]]` in one atomic st
|
|
|
43
45
|
|
|
44
46
|
## Memory functions — what they are and how to use them
|
|
45
47
|
|
|
46
|
-
The `memory` command group is your interface to the curated corpus: `knowledge/*` (`knowledge/features/*` loads as its own `feature` channel — `--types feature` vs `--types knowledge` — never double-counted), `state/*.md`, `core/2.memory.md` (Technical Decisions + Known Issues),
|
|
48
|
+
The `memory` command group is your interface to the curated corpus: `knowledge/*` (`knowledge/features/*` loads as its own `feature` channel — `--types feature` vs `--types knowledge` — never double-counted), `state/*.md`, `core/2.memory.md` (Technical Decisions + Known Issues), every `core/CHANGELOG.json` entry, `core/objectives/*` (`objective` channel), and `lab/insights/*` (`insight` channel). No setup, no index file, no external service — rebuilt in memory each call (<100ms on ~130 docs).
|
|
47
49
|
|
|
48
50
|
| Function | Use it to… | Command |
|
|
49
51
|
|---|---|---|
|
|
@@ -57,7 +59,7 @@ The `memory` command group is your interface to the curated corpus: `knowledge/*
|
|
|
57
59
|
|
|
58
60
|
### recall — your first-line discovery tool
|
|
59
61
|
|
|
60
|
-
**Run `memory recall` BEFORE grep or blind file reads** whenever the user asks "where did we decide X?", "have we discussed Y?", "what do we know about Z?", or before duplicating work. It ranks across knowledge + features + tasks + memory + changelog in one shot.
|
|
62
|
+
**Run `memory recall` BEFORE grep or blind file reads** whenever the user asks "where did we decide X?", "have we discussed Y?", "what do we know about Z?", or before duplicating work. It ranks across knowledge + features + tasks + memory + changelog + objectives + insights in one shot.
|
|
61
63
|
|
|
62
64
|
```bash
|
|
63
65
|
# Plain discovery — top 10 hits with snippets
|
|
@@ -68,6 +70,7 @@ dreamcontext memory recall "auth flow" --types knowledge,feature
|
|
|
68
70
|
dreamcontext memory recall "deprecated" --types changelog # ship history
|
|
69
71
|
dreamcontext memory recall "rate limit" --types task # in-flight work
|
|
70
72
|
dreamcontext memory recall "retention goal" --types objective # roadmap objectives (OKR outcomes)
|
|
73
|
+
dreamcontext memory recall "weekly active users" --types insight # lab insights (curated analytics metrics)
|
|
71
74
|
|
|
72
75
|
# Tune result count / machine-readable output
|
|
73
76
|
dreamcontext memory recall "rice prioritization" --top 3 --json
|
|
@@ -53,6 +53,7 @@ For non-file-change work (architecture discussion, a decision with no edits): `d
|
|
|
53
53
|
5. **Wait for all reports** (each returns a short structured report).
|
|
54
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
55
|
7. **Roadmap refresh** if `_dream_context/core/objectives/` is non-empty: run `dreamcontext roadmap` — a cheap deterministic call that recomputes rollups/forecasts from the reconciled tasks and rewrites the auto-generated `knowledge/roadmap/board.md`. Surface any 🔴 SLIPPING objectives (and objectives whose member tasks are now all complete — suggest the PO confirm them done) in your summary. Sleep never edits objective files themselves — they are PO-authored.
|
|
56
|
+
**Insight-fed objectives:** if `_dream_context/lab/insights/` is non-empty, also run `dreamcontext lab list` — an objective fed by a bound insight (`binding.objective` in the manifest) has a *measured* KR `current` owned by `lab sync`; no specialist hand-writes it. Surface any bound insight whose cache is stale or errored ("KR for `<objective>` is fed by insight `<slug>`, last synced `<date>` — suggest `dreamcontext lab sync <slug>`"). **Sleep NEVER runs `lab sync`** — credentials, latency, non-determinism; refreshing is always an explicit user/agent action outside sleep.
|
|
56
57
|
8. **Marketing pass** if `_dream_context/marketing/` exists: `dreamcontext mk rem-sleep`.
|
|
57
58
|
9. **Council promote check:** `dreamcontext council list --unpromoted` — promote if the user engaged positively.
|
|
58
59
|
10. **`dreamcontext sleep done "<one-paragraph summary stitched from specialist reports>"`** — clears pre-epoch state, resets debt, writes a history entry. (If a remote backend — ClickUp or GitHub — is active and any task pushes failed, this auto-retries once, then errors loudly with the failed slugs.)
|
|
@@ -64,7 +65,7 @@ For non-file-change work (architecture discussion, a decision with no edits): `d
|
|
|
64
65
|
|
|
65
66
|
| Specialist | Owns | Notes |
|
|
66
67
|
|---|---|---|
|
|
67
|
-
| `sleep-tasks` | Task files (`state/*.md`) | Reconciles task bodies to truth, bumps statuses, creates tasks for untracked work, attaches to the planning version, sets the start/due range, and keeps declared custom fields current (never fabricating `ask` fields in the no-user sleep context). When objectives exist, proposes `objectives:` links for tasks with an EMPTY/absent list (multiple slugs when a task serves several outcomes) — **never overwrites a non-empty list** (that's a PO decision). |
|
|
68
|
+
| `sleep-tasks` | Task files (`state/*.md`) | Reconciles task bodies to truth, bumps statuses, creates tasks for untracked work, attaches to the planning version, sets the start/due range, and keeps declared custom fields current (never fabricating `ask` fields in the no-user sleep context). When objectives exist, proposes `objectives:` links for tasks with an EMPTY/absent list (multiple slugs when a task serves several outcomes) — **never overwrites a non-empty list** (that's a PO decision). May refresh a KR's observed `current` via `roadmap objective metric` — EXCEPT objectives fed by a bound Lab insight (measured by `lab sync`; hands-off, staleness surfaced instead). |
|
|
68
69
|
| `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`. |
|
|
69
70
|
| `sleep-product` | Knowledge files + feature PRDs | Creates/reconciles `knowledge/*.md` and `knowledge/features/*.md` (typed knowledge, `type: feature`), processes staleness flags, maintains the knowledge index + taxonomy. |
|
|
70
71
|
| `sleep-migration` | Structure only | Moves/renames folders, normalizes frontmatter, wraps fences. Never alters body prose. |
|
|
@@ -143,14 +143,63 @@ Objectives are PO-authored, so this is an **offer-and-confirm** flow, never a si
|
|
|
143
143
|
1. **Dedup first.** Run `dreamcontext roadmap objective list` and `dreamcontext memory recall "<the outcome>" --types objective`. If an objective already covers it, DON'T propose a new one — offer to update the existing one instead (or just link the current work to it).
|
|
144
144
|
2. **Offer it.** If it's genuinely new, ask: *"This sounds like a roadmap objective — want me to add it?"* Never create without a yes.
|
|
145
145
|
3. **Ask the dates.** On yes, ask for the committed window — start and target date (`--target`, and set start via `objective edit`/dashboard). Don't invent dates.
|
|
146
|
-
4. **Offer a Key Result.** Ask whether to track it by a number rather than member tasks: *"Track this by a metric (e.g. MRR 0→2000) or by its tasks?"* If a metric, capture `label` + `baseline`/`target` (`--metric*` flags on create, or `objective metric` after).
|
|
146
|
+
4. **Offer a Key Result.** Ask whether to track it by a number rather than member tasks: *"Track this by a metric (e.g. MRR 0→2000) or by its tasks?"* If a metric, capture `label` + `baseline`/`target` (`--metric*` flags on create, or `objective metric` after). If a Lab insight already measures this outcome (`memory recall "<outcome>" --types insight`), offer to connect it — `dreamcontext lab bind <insight> <objective>` — so `current` is measured, not asserted.
|
|
147
147
|
5. **Detect + propose dependencies.** From the existing objective list, infer likely `depends_on` edges ("make-it-a-business can't happen before simplified-ux and team-ready ship") and **propose them for confirmation**; on yes, apply with `objective depend <A> <B>` (the write-time cycle guard protects you). Never write a dependency edge silently.
|
|
148
|
-
6. **Keep the Key Result current.** When the session later surfaces a real observed value for a tracked objective ("MRR just hit $1,250", "we're at 400 active users"), offer to update it: `dreamcontext roadmap objective metric <slug> --current <n>`. Use a value you actually observed — never estimate. (Sleep may also refresh `--current` autonomously from observed values.)
|
|
148
|
+
6. **Keep the Key Result current — unless an insight feeds it.** When the session later surfaces a real observed value for a tracked objective ("MRR just hit $1,250", "we're at 400 active users"), offer to update it: `dreamcontext roadmap objective metric <slug> --current <n>`. Use a value you actually observed — never estimate. (Sleep may also refresh `--current` autonomously from observed values.) **Exception:** if a bound insight feeds the objective (`dreamcontext lab list --json` → a manifest whose `binding.objective` is the slug), `current` is *measured* — hands off; suggest `dreamcontext lab sync <insight>` instead of writing a number the next sync would overwrite. And when removing a fed objective's metric (`--clear`), disconnect the feeder first (`lab bind <insight> --clear`) — a binding with no Key Result warns on every sync.
|
|
149
149
|
|
|
150
150
|
The through-line: **you detect and propose; the PO confirms.** Every create, date, dependency, and metric write waits for a yes — matching the "objectives are PO-authored" invariant and the board-first ritual (`knowledge/visual-first-board-ritual.md`).
|
|
151
151
|
|
|
152
152
|
---
|
|
153
153
|
|
|
154
|
+
## Lab insights — curated analytics metrics
|
|
155
|
+
|
|
156
|
+
An **insight** is a named, curated **metric backed by an external source** — "Weekly Active Users from our PostHog API", "MRR from a billing script". It is a number/series that **re-syncs on demand**, never a prose document. This is the entity users mean by "create an insight", "track signups", "I want to see MRR every session".
|
|
157
|
+
|
|
158
|
+
**What an insight is NOT (route correctly):**
|
|
159
|
+
- NOT **knowledge** — knowledge is prose you write and maintain; an insight fetches its value from a source. Never `knowledge create` for a metric.
|
|
160
|
+
- NOT an **objective** — an objective is an outcome with a target date; an insight is the *measurement*. (The two connect: an insight can *feed* an objective's Key Result via binding, below.)
|
|
161
|
+
- NOT a raw data dump — rollup structurally caps every series at 62 points (daily→weekly→monthly coarsening by span). Insights are curated metrics, by design.
|
|
162
|
+
|
|
163
|
+
**Where it lives:** manifest at `_dream_context/lab/insights/<slug>.md` (frontmatter config + a `## Meaning` prose section that makes it recallable), cached series at `lab/cache/<slug>.json`, custom scripts at `lab/scripts/<slug>.mjs`, secrets in gitignored `lab/credentials.json`. Manifests + caches sync in the brain repo; only credentials stay local.
|
|
164
|
+
|
|
165
|
+
**How agents see it:** the SessionStart snapshot renders a **Lab** section (title / latest value / staleness / group) — answer "what's our MRR?" from it without tool calls. Deeper: `dreamcontext lab show <slug>` (cache only, no fetch) and `memory recall "<meaning phrase>" --types insight`. The dashboard has a Lab page (number/line/pie/raw cards, per-insight refresh, sync-all, tweak editing).
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
dreamcontext lab create <slug> --title "Weekly Active Users" [--render number|line|pie|raw] [--adapter http|script] [--group <section>] [--unit users] [--ttl 1440]
|
|
169
|
+
dreamcontext lab sync <slug> [--force] # one insight (TTL-fresh is skipped unless --force)
|
|
170
|
+
dreamcontext lab sync --all [--force] # every insight; exits non-zero if any fail
|
|
171
|
+
dreamcontext lab list [--json] # all insights with latest value + staleness
|
|
172
|
+
dreamcontext lab show <slug> [--json] # manifest + cached series (never fetches)
|
|
173
|
+
dreamcontext lab tweak <slug> <key> <value> # set a declared tweak (e.g. range last_1_year)
|
|
174
|
+
dreamcontext lab bind <slug> <objective> # connect to an objective's KR (--value latest|series:<name>; --clear)
|
|
175
|
+
dreamcontext lab credentials set <key> # hidden prompt; the ONLY way to store a secret
|
|
176
|
+
dreamcontext lab credentials list # key NAMES only — values are never printed
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
**Adapters:** `http` — declarative JSON API (endpoint/headers/body templates with `{{tweak:key}}` and `{{cred:key}}` placeholders, JSON-path `extract`, multi-series split via `seriesKey`); `script` — escape hatch, `lab/scripts/<slug>.mjs` exporting a default async function. `lab create` scaffolds the manifest; edit it to set the real endpoint/extract config, then run the first sync.
|
|
180
|
+
|
|
181
|
+
**Key-Result binding (insight → objective):** a manifest `binding: {objective: <slug>, value: latest}` makes every successful sync write the objective's KR `metric.current` automatically — upgrading the roadmap from PO-asserted numbers to measured ones. Offer this whenever an insight measures an existing objective's outcome. Set it via `lab bind` (or the dashboard's objective create modal / detail panel, which search insights by name); binding is ONE feeder per objective — connecting a new insight unbinds the previous one loudly, and connecting immediately seeds `metric.current` from the cached latest.
|
|
182
|
+
|
|
183
|
+
**Sync semantics:** TTL staleness (default 1440 min) — fresh insights are skipped and reported, `--force` refetches; on failure the prior series is KEPT and the error is loud (never a silent half-sync). **Sleep does NOT run lab sync** — refresh is always an explicit user/agent action.
|
|
184
|
+
|
|
185
|
+
### Insight capture (in-session — ASK, never auto-create)
|
|
186
|
+
|
|
187
|
+
Mirrors proactive objective capture. When the user states or implies a recurring metric need ("I keep checking MRR by hand", "we should watch signups", "create an insight for DAU"):
|
|
188
|
+
|
|
189
|
+
1. **Dedup first.** `dreamcontext memory recall "<metric>" --types insight` and `dreamcontext lab list`. If one covers it, offer to update/re-sync it instead.
|
|
190
|
+
2. **Offer it.** *"Want me to track this as a Lab insight so every session sees the current value?"* Never create without a yes.
|
|
191
|
+
3. **Agree the shape.** Slug, title, render (number/line/pie/raw), group, unit — and write a real `## Meaning` section (it powers recall).
|
|
192
|
+
4. **Pick the source.** HTTP endpoint (+ extract path) or a custom script. Secrets go in via `dreamcontext lab credentials set <key>` — never inline in the manifest.
|
|
193
|
+
5. **Declare tweaks** the user will want to adjust (typed `enum`/`date`/`string`; a relative range is an enum tweak keyed `range`).
|
|
194
|
+
6. **Scaffold + first sync.** `lab create`, edit the manifest, `lab sync <slug>`, confirm the value looks right.
|
|
195
|
+
7. **Offer KR binding** if an existing roadmap objective tracks the same outcome: `dreamcontext lab bind <insight> <objective>` — connecting seeds the objective's `metric.current` from the cached latest immediately, and every future sync keeps it measured. One feeder per objective (binding a new insight unbinds the previous one loudly); disconnect with `lab bind <insight> --clear`.
|
|
196
|
+
|
|
197
|
+
Every write waits for a yes.
|
|
198
|
+
|
|
199
|
+
**Security (plain language, tell the user when relevant):** lab scripts execute **locally, in-process, with your credentials passed in** — anyone who can push to a shared brain repo can change what runs on your machine at the next sync. Review a script before its first sync and heed the loud "script changed since last run" tripwire notice. Credentials are written ONLY via `lab credentials set` (gitignore-first, file mode 0600, never printed back, redacted from every error/log).
|
|
200
|
+
|
|
201
|
+
---
|
|
202
|
+
|
|
154
203
|
## The Workflow flowchart (keep it in sync)
|
|
155
204
|
|
|
156
205
|
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.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{aq as o,ar as n}from"./index-C2R7Is0-.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-DjvoLiQ0.js";import{_ as i}from"./index-C2R7Is0-.js";import"./chunk-FMBD7UC4-DDlvS1yz.js";import"./chunk-YZCP3GAM-CZjAdM3g.js";import"./chunk-55IACEB6-D-m72jvC.js";import"./chunk-EDXVE4YY-BCjmEpM7.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-DjvoLiQ0.js";import{_ as i}from"./index-C2R7Is0-.js";import"./chunk-FMBD7UC4-DDlvS1yz.js";import"./chunk-YZCP3GAM-CZjAdM3g.js";import"./chunk-55IACEB6-D-m72jvC.js";import"./chunk-EDXVE4YY-BCjmEpM7.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-BFYZl1aj.js";var e=4;function a(o){return r(o,e)}export{a as c};
|