dreamcontext 0.14.2 → 0.15.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 +15 -20
- package/dist/dashboard/assets/{BrainCanvas3D-B1Ia2HWN.js → BrainCanvas3D-D4YivUjx.js} +1 -1
- package/dist/dashboard/assets/{_baseUniq-B74oJzMc.js → _baseUniq--w3QZgRc.js} +1 -1
- package/dist/dashboard/assets/{ar-SA-G6X2FPQ2-DOKHn365.js → ar-SA-G6X2FPQ2-BS1K06dI.js} +1 -1
- package/dist/dashboard/assets/{arc-B-uBpPoM.js → arc-DvE6lN6F.js} +1 -1
- package/dist/dashboard/assets/{architectureDiagram-Q4EWVU46-D2lyk9NB.js → architectureDiagram-Q4EWVU46-BuLHJd-J.js} +1 -1
- package/dist/dashboard/assets/{az-AZ-76LH7QW2-CgyZJLLo.js → az-AZ-76LH7QW2-DcxZHidu.js} +1 -1
- package/dist/dashboard/assets/{bg-BG-XCXSNQG7-BPLlwY2s.js → bg-BG-XCXSNQG7-t9W3DG9h.js} +1 -1
- package/dist/dashboard/assets/{blockDiagram-DXYQGD6D-Df8Y7Srr.js → blockDiagram-DXYQGD6D-D1yosf_d.js} +1 -1
- package/dist/dashboard/assets/{bn-BD-2XOGV67Q-CY-dhlzi.js → bn-BD-2XOGV67Q-CbBSwTYP.js} +1 -1
- package/dist/dashboard/assets/{c4Diagram-AHTNJAMY-D7TG6J6Q.js → c4Diagram-AHTNJAMY-Ck_IThhw.js} +1 -1
- package/dist/dashboard/assets/{ca-ES-6MX7JW3Y-DFf13e9p.js → ca-ES-6MX7JW3Y-CULIknat.js} +1 -1
- package/dist/dashboard/assets/channel-C4zP-AEe.js +1 -0
- package/dist/dashboard/assets/{chunk-4BX2VUAB-DCA-ERlu.js → chunk-4BX2VUAB-FhSNTeOM.js} +1 -1
- package/dist/dashboard/assets/{chunk-4TB4RGXK-Bczdxdod.js → chunk-4TB4RGXK-B-0fS7DN.js} +1 -1
- package/dist/dashboard/assets/{chunk-55IACEB6-B3649L4a.js → chunk-55IACEB6-CgZcHbxh.js} +1 -1
- package/dist/dashboard/assets/{chunk-EDXVE4YY-Bwj1fYhG.js → chunk-EDXVE4YY-Cgtb_QhN.js} +1 -1
- package/dist/dashboard/assets/{chunk-FMBD7UC4-oY1KO--2.js → chunk-FMBD7UC4-CiPyOehc.js} +1 -1
- package/dist/dashboard/assets/{chunk-OYMX7WX6-B4MPzc-c.js → chunk-OYMX7WX6-sCPqGdKS.js} +1 -1
- package/dist/dashboard/assets/{chunk-QZHKN3VN-mVSSFcuA.js → chunk-QZHKN3VN-BVWImlQ_.js} +1 -1
- package/dist/dashboard/assets/{chunk-YZCP3GAM-DeRyq2BY.js → chunk-YZCP3GAM-BuBIza_r.js} +1 -1
- package/dist/dashboard/assets/classDiagram-6PBFFD2Q-DfKte-F8.js +1 -0
- package/dist/dashboard/assets/classDiagram-v2-HSJHXN6E-DfKte-F8.js +1 -0
- package/dist/dashboard/assets/clone-BSgKpRTm.js +1 -0
- package/dist/dashboard/assets/{cose-bilkent-S5V4N54A-BTtdOgy5.js → cose-bilkent-S5V4N54A-CCaC8B1u.js} +1 -1
- package/dist/dashboard/assets/{cs-CZ-2BRQDIVT-BzC5Rf0R.js → cs-CZ-2BRQDIVT-CY3a2n17.js} +1 -1
- package/dist/dashboard/assets/{da-DK-5WZEPLOC-gF4jrIY7.js → da-DK-5WZEPLOC-G83I7akJ.js} +1 -1
- package/dist/dashboard/assets/{dagre-KV5264BT-8Cpaf4My.js → dagre-KV5264BT-BWnfN5tG.js} +1 -1
- package/dist/dashboard/assets/{de-DE-XR44H4JA-BzHDEugW.js → de-DE-XR44H4JA-u7RaXwaD.js} +1 -1
- package/dist/dashboard/assets/{diagram-5BDNPKRD-BUa2eqbA.js → diagram-5BDNPKRD-0oefz_jx.js} +1 -1
- package/dist/dashboard/assets/{diagram-G4DWMVQ6-CsHVo990.js → diagram-G4DWMVQ6-EQ_FZox4.js} +1 -1
- package/dist/dashboard/assets/{diagram-MMDJMWI5-CFdSOuIW.js → diagram-MMDJMWI5-B_EeT5hu.js} +1 -1
- package/dist/dashboard/assets/{diagram-TYMM5635-Cv2e3TBK.js → diagram-TYMM5635-DdJP7clT.js} +1 -1
- package/dist/dashboard/assets/{el-GR-BZB4AONW-Bw-xG8H1.js → el-GR-BZB4AONW-D569CbUE.js} +1 -1
- package/dist/dashboard/assets/{erDiagram-SMLLAGMA-Di1x3Ld5.js → erDiagram-SMLLAGMA-Mc1WtRaS.js} +1 -1
- package/dist/dashboard/assets/{es-ES-U4NZUMDT-BgdmgnEL.js → es-ES-U4NZUMDT-C-1lvm0Q.js} +1 -1
- package/dist/dashboard/assets/{eu-ES-A7QVB2H4-C_-W1jiT.js → eu-ES-A7QVB2H4-Dpl_ROTp.js} +1 -1
- package/dist/dashboard/assets/{fa-IR-HGAKTJCU-D-Z42ygz.js → fa-IR-HGAKTJCU--9CvY3M7.js} +1 -1
- package/dist/dashboard/assets/{fi-FI-Z5N7JZ37-CKqV9a_l.js → fi-FI-Z5N7JZ37-BRF_h6SA.js} +1 -1
- package/dist/dashboard/assets/{flowDiagram-DWJPFMVM-C0HsaC5L.js → flowDiagram-DWJPFMVM-B8O0N5R8.js} +1 -1
- package/dist/dashboard/assets/{fr-FR-RHASNOE6-DPDm5F3m.js → fr-FR-RHASNOE6-H03i3895.js} +1 -1
- package/dist/dashboard/assets/{ganttDiagram-T4ZO3ILL-T-R79Oea.js → ganttDiagram-T4ZO3ILL-Be4tXepX.js} +1 -1
- package/dist/dashboard/assets/{gitGraphDiagram-UUTBAWPF-DmdlPMiD.js → gitGraphDiagram-UUTBAWPF-Bk-0Ou0k.js} +1 -1
- package/dist/dashboard/assets/{gl-ES-HMX3MZ6V-c2pDP6q3.js → gl-ES-HMX3MZ6V-DmNNXC49.js} +1 -1
- package/dist/dashboard/assets/{graph-55sHob5M.js → graph-ie2aMk7l.js} +1 -1
- package/dist/dashboard/assets/{he-IL-6SHJWFNN-QzeRcOiz.js → he-IL-6SHJWFNN-DwA4-t4e.js} +1 -1
- package/dist/dashboard/assets/{hi-IN-IWLTKZ5I-CmRjYfDv.js → hi-IN-IWLTKZ5I-DZuYYdfu.js} +1 -1
- package/dist/dashboard/assets/{hu-HU-A5ZG7DT2-DQS4XtgQ.js → hu-HU-A5ZG7DT2-CvmzKZoP.js} +1 -1
- package/dist/dashboard/assets/{id-ID-SAP4L64H-D-BFw5MU.js → id-ID-SAP4L64H-D_c7p2Dj.js} +1 -1
- package/dist/dashboard/assets/{index-MPnw9upZ.css → index-Chy9TZYk.css} +1 -1
- package/dist/dashboard/assets/{index-C2j0AERU.js → index-Ddhkf24Q.js} +1 -1
- package/dist/dashboard/assets/{index-pZP-3m96.js → index-QrTsw4kJ.js} +129 -129
- package/dist/dashboard/assets/{infoDiagram-42DDH7IO-BaT4J3uc.js → infoDiagram-42DDH7IO-9TyCWaBY.js} +1 -1
- package/dist/dashboard/assets/{ishikawaDiagram-UXIWVN3A-DsizYWBB.js → ishikawaDiagram-UXIWVN3A-C3E82MOu.js} +1 -1
- package/dist/dashboard/assets/{it-IT-JPQ66NNP-CFAPcTjk.js → it-IT-JPQ66NNP-H3GcetvH.js} +1 -1
- package/dist/dashboard/assets/{ja-JP-DBVTYXUO-Bzs_hBtx.js → ja-JP-DBVTYXUO-BKyK1SLw.js} +1 -1
- package/dist/dashboard/assets/{journeyDiagram-VCZTEJTY-B9kB5yN9.js → journeyDiagram-VCZTEJTY-DNJlbWgo.js} +1 -1
- package/dist/dashboard/assets/{kaa-6HZHGXH3-CqRi76QS.js → kaa-6HZHGXH3-DRxI1mkF.js} +1 -1
- package/dist/dashboard/assets/{kab-KAB-ZGHBKWFO-wSqF6nkL.js → kab-KAB-ZGHBKWFO-Dc14HtoS.js} +1 -1
- package/dist/dashboard/assets/{kanban-definition-6JOO6SKY-DasidrnL.js → kanban-definition-6JOO6SKY-B6NjvJyd.js} +1 -1
- package/dist/dashboard/assets/{kk-KZ-P5N5QNE5-ins4bRlm.js → kk-KZ-P5N5QNE5-ACq-tnbt.js} +1 -1
- package/dist/dashboard/assets/{km-KH-HSX4SM5Z-BjJepDRC.js → km-KH-HSX4SM5Z-DGxP4MY7.js} +1 -1
- package/dist/dashboard/assets/{ko-KR-MTYHY66A-Cmak8rUq.js → ko-KR-MTYHY66A-D9wPf-mq.js} +1 -1
- package/dist/dashboard/assets/{ku-TR-6OUDTVRD-Dbz6ljVD.js → ku-TR-6OUDTVRD-BUpYZsl-.js} +1 -1
- package/dist/dashboard/assets/{layout-DMQli9Le.js → layout-BtCeXA1s.js} +1 -1
- package/dist/dashboard/assets/{linear-B6VVSyMW.js → linear-D3Noa1lq.js} +1 -1
- package/dist/dashboard/assets/{lt-LT-XHIRWOB4-CEmAxA9u.js → lt-LT-XHIRWOB4-BLQA9Nda.js} +1 -1
- package/dist/dashboard/assets/{lv-LV-5QDEKY6T-CJR-At7g.js → lv-LV-5QDEKY6T-BhK_4waX.js} +1 -1
- package/dist/dashboard/assets/{min-CqkwiHUc.js → min-laN3ibId.js} +1 -1
- package/dist/dashboard/assets/{mindmap-definition-QFDTVHPH-bsYCrNtj.js → mindmap-definition-QFDTVHPH-Ij7b5o63.js} +1 -1
- package/dist/dashboard/assets/{mr-IN-CRQNXWMA-P4spwjT8.js → mr-IN-CRQNXWMA-DsA56L97.js} +1 -1
- package/dist/dashboard/assets/{my-MM-5M5IBNSE-a1rvArEV.js → my-MM-5M5IBNSE-CPfcm668.js} +1 -1
- package/dist/dashboard/assets/{nb-NO-T6EIAALU-Dw_J2QCA.js → nb-NO-T6EIAALU-B5MPTVpt.js} +1 -1
- package/dist/dashboard/assets/{nl-NL-IS3SIHDZ-DyJZtP9s.js → nl-NL-IS3SIHDZ-DaAOOzMv.js} +1 -1
- package/dist/dashboard/assets/{nn-NO-6E72VCQL-4acyfJJj.js → nn-NO-6E72VCQL-8eqdmBWq.js} +1 -1
- package/dist/dashboard/assets/{oc-FR-POXYY2M6-D8pDlGpO.js → oc-FR-POXYY2M6-B0qF57BV.js} +1 -1
- package/dist/dashboard/assets/{pa-IN-N4M65BXN-CUXWRM9Z.js → pa-IN-N4M65BXN-DDtpE07e.js} +1 -1
- package/dist/dashboard/assets/{percentages-BXMCSKIN-jDtw9CS_.js → percentages-BXMCSKIN-CFEd2naP.js} +7 -7
- package/dist/dashboard/assets/{pica-D2k8QhiT.js → pica-DhmMmpov.js} +1 -1
- package/dist/dashboard/assets/{pieDiagram-DEJITSTG-BY5lDpxM.js → pieDiagram-DEJITSTG-Cmj6uNO2.js} +1 -1
- package/dist/dashboard/assets/{pl-PL-T2D74RX3-BTVl1PaU.js → pl-PL-T2D74RX3-BhmMlvaA.js} +1 -1
- package/dist/dashboard/assets/{pt-BR-5N22H2LF-CRV4c2FR.js → pt-BR-5N22H2LF-C9RdtZTM.js} +1 -1
- package/dist/dashboard/assets/{pt-PT-UZXXM6DQ-Ciz73XBG.js → pt-PT-UZXXM6DQ-Cs09dbxz.js} +1 -1
- package/dist/dashboard/assets/{quadrantDiagram-34T5L4WZ-CkCyPark.js → quadrantDiagram-34T5L4WZ-CBhsDpDm.js} +1 -1
- package/dist/dashboard/assets/{requirementDiagram-MS252O5E-pkDzqMen.js → requirementDiagram-MS252O5E-UqGmmvOP.js} +1 -1
- package/dist/dashboard/assets/{ro-RO-JPDTUUEW-B5tB2ZMk.js → ro-RO-JPDTUUEW-BT0bLGb1.js} +1 -1
- package/dist/dashboard/assets/{ru-RU-B4JR7IUQ-CjaSKApe.js → ru-RU-B4JR7IUQ-Ddg0_XYY.js} +1 -1
- package/dist/dashboard/assets/{sankeyDiagram-XADWPNL6-CrziMmSl.js → sankeyDiagram-XADWPNL6-B2YpfOz1.js} +1 -1
- package/dist/dashboard/assets/{sequenceDiagram-FGHM5R23-D5zUE04i.js → sequenceDiagram-FGHM5R23-DR-Ef2wv.js} +1 -1
- package/dist/dashboard/assets/{si-LK-N5RQ5JYF-QK81fzaG.js → si-LK-N5RQ5JYF-DHNfYMV2.js} +1 -1
- package/dist/dashboard/assets/{sk-SK-C5VTKIMK-TANqzQvg.js → sk-SK-C5VTKIMK-Ca43AL1V.js} +1 -1
- package/dist/dashboard/assets/{sl-SI-NN7IZMDC-Dht86ddT.js → sl-SI-NN7IZMDC-BIa1taRD.js} +1 -1
- package/dist/dashboard/assets/{stateDiagram-FHFEXIEX-CcR_Q14Z.js → stateDiagram-FHFEXIEX-DkoV190G.js} +1 -1
- package/dist/dashboard/assets/stateDiagram-v2-QKLJ7IA2-b_Rafygl.js +1 -0
- package/dist/dashboard/assets/{subset-shared.chunk-NAGN_SBv.js → subset-shared.chunk-CaY7_SwS.js} +1 -1
- package/dist/dashboard/assets/{subset-worker.chunk-wsRwU71V.js → subset-worker.chunk-BeRMJAeA.js} +1 -1
- package/dist/dashboard/assets/{sv-SE-XGPEYMSR-DidGUaol.js → sv-SE-XGPEYMSR-CefYINk3.js} +1 -1
- package/dist/dashboard/assets/{ta-IN-2NMHFXQM-YZmBodpj.js → ta-IN-2NMHFXQM-B9shz2rt.js} +1 -1
- package/dist/dashboard/assets/{th-TH-HPSO5L25-CVvvXQFu.js → th-TH-HPSO5L25-C4_khwyk.js} +1 -1
- package/dist/dashboard/assets/{timeline-definition-GMOUNBTQ-B8I1QieK.js → timeline-definition-GMOUNBTQ-kDfiGIlx.js} +1 -1
- package/dist/dashboard/assets/{tr-TR-DEFEU3FU-DjyXDfoR.js → tr-TR-DEFEU3FU-BbWvclxA.js} +1 -1
- package/dist/dashboard/assets/{uk-UA-QMV73CPH-1pRnjZIi.js → uk-UA-QMV73CPH-rptFf1AT.js} +1 -1
- package/dist/dashboard/assets/{vennDiagram-DHZGUBPP-BsBRDs0e.js → vennDiagram-DHZGUBPP-DwN27hmj.js} +1 -1
- package/dist/dashboard/assets/{vi-VN-M7AON7JQ-CualwmWX.js → vi-VN-M7AON7JQ-DD1C1F-4.js} +1 -1
- package/dist/dashboard/assets/{wardley-RL74JXVD-BP4Ewc0H.js → wardley-RL74JXVD-Bb5eAxHk.js} +1 -1
- package/dist/dashboard/assets/{wardleyDiagram-NUSXRM2D-B_WTb-rg.js → wardleyDiagram-NUSXRM2D-bogdMmS3.js} +1 -1
- package/dist/dashboard/assets/{xychartDiagram-5P7HB3ND-vB-uMt25.js → xychartDiagram-5P7HB3ND-562jKD97.js} +1 -1
- package/dist/dashboard/assets/{zh-CN-LNUGB5OW-CQjWtZ9Y.js → zh-CN-LNUGB5OW-D0fnJQNq.js} +1 -1
- package/dist/dashboard/assets/{zh-HK-E62DVLB3-DzC49dFs.js → zh-HK-E62DVLB3-CyHkLQXi.js} +1 -1
- package/dist/dashboard/assets/{zh-TW-RAJ6MFWO-C4KJuhZE.js → zh-TW-RAJ6MFWO-BCkW9UHn.js} +1 -1
- package/dist/dashboard/index.html +2 -2
- package/dist/index.js +2574 -2719
- package/package.json +1 -1
- package/skill/SKILL.md +3 -3
- package/skill/references/brain-sync.md +39 -51
- package/skill/references/cli-reference.md +3 -6
- package/skill/references/integrations.md +21 -31
- package/skill-sync/SKILL.md +2 -3
- package/skill-sync/references/merge-rules.md +33 -37
- package/dist/dashboard/assets/channel-CqCT8-qB.js +0 -1
- package/dist/dashboard/assets/classDiagram-6PBFFD2Q-C9WQPvu9.js +0 -1
- package/dist/dashboard/assets/classDiagram-v2-HSJHXN6E-C9WQPvu9.js +0 -1
- package/dist/dashboard/assets/clone-B0kf3g9o.js +0 -1
- package/dist/dashboard/assets/stateDiagram-v2-QKLJ7IA2-DIVPLDRd.js +0 -1
package/package.json
CHANGED
package/skill/SKILL.md
CHANGED
|
@@ -91,7 +91,7 @@ dreamcontext is **more than memory files**. Every capability below is real and s
|
|
|
91
91
|
| **Web dashboard** | Local React UI: Kanban, Eisenhower matrix, brain graph, sleep tracker, council hall | [integrations.md](references/integrations.md) |
|
|
92
92
|
| **Desktop app** | macOS Tauri app: multi-vault launcher, federation board, Sleepy notch capture | [integrations.md](references/integrations.md) |
|
|
93
93
|
| **Federation** | Recall across multiple projects (vaults) live, read-only | [integrations.md](references/integrations.md) |
|
|
94
|
-
| **✅ Team brain sync (
|
|
94
|
+
| **✅ Team brain sync (whole project)** | **Yes — a team OR one person across machines can share ONE brain.** Cloud sync pushes the WHOLE project (code + `.claude/` + `_dream_context/`) to its GitHub `origin` on the current branch (`full-repo`); when off it's `in-tree` (commit-only). `sleep done` auto fetch→merge→commit→pushes it; the `/dream-sync` skill resolves prose conflicts. Different from federation (read-only cross-project recall) and cloud task sync (tasks only). Each machine needs its own token. | [brain-sync.md](references/brain-sync.md) |
|
|
95
95
|
| **Council** | Structured multi-persona debates with a synthesized verdict | [integrations.md](references/integrations.md) |
|
|
96
96
|
| **Marketing (`mk`)** | Meta marketing skill: cohorts, campaigns, competitor ingest | [integrations.md](references/integrations.md) |
|
|
97
97
|
| **Versions / releases** | Planning versions and releases unify in RELEASES.json | [tasks-and-features.md](references/tasks-and-features.md) |
|
|
@@ -364,7 +364,7 @@ All sub-agents get a lightweight context briefing via the SubagentStart hook. Wh
|
|
|
364
364
|
- `dreamcontext upgrade` — upgrade the CLI, then (one command) update the desktop app if installed and offer to refresh **every registered project** to match (`--yes` does it all non-interactively). **Keeping projects + app updated is the CLI's job — you should not run per-project updates by hand or ask the user to.**
|
|
365
365
|
- `dreamcontext doctor` — validate `_dream_context/` structure.
|
|
366
366
|
- `dreamcontext dashboard` — open the web UI. `dreamcontext app install|update|status` — the desktop app.
|
|
367
|
-
- **Team collaboration / shared brain / second machine** — when the user wants to **use one brain with other people or on another computer** ("share the brain", "collaborate on tasks/knowledge together", "
|
|
367
|
+
- **Team collaboration / shared brain / second machine** — when the user wants to **use one brain with other people or on another computer** ("share the brain", "collaborate on tasks/knowledge together", "sync my project to GitHub", "set it up on my other machine"), that's **whole-project cloud sync**: `dreamcontext brain enable` (turn it on — needs a GitHub `origin`) / `brain status`, auto-synced at `sleep done`, prose conflicts resolved by the **`/dream-sync`** skill. **Guide them into it — don't say "unsupported".** Two modes (`full-repo` when on / `in-tree` when off), per-machine token, and cross-OS setup → [brain-sync.md](references/brain-sync.md).
|
|
368
368
|
|
|
369
369
|
---
|
|
370
370
|
|
|
@@ -414,6 +414,6 @@ Open these with `Read` when the task needs depth:
|
|
|
414
414
|
- **[tasks-and-features.md](references/tasks-and-features.md)** — task protocol depth, RICE, due dates, people/assignees, Workflow flowchart, features, versioning, multi-product.
|
|
415
415
|
- **[knowledge-and-recall.md](references/knowledge-and-recall.md)** — knowledge files, pinning, recall modes, taxonomy, Excalidraw/diagrams.
|
|
416
416
|
- **[sleep.md](references/sleep.md)** — full consolidation flow, specialist contracts, deep sleep, epoch safety, reflect, marketing/council passes.
|
|
417
|
-
- **[brain-sync.md](references/brain-sync.md)** — **
|
|
417
|
+
- **[brain-sync.md](references/brain-sync.md)** — **whole-project GitHub cloud sync**: the two modes (full-repo/in-tree), setup, per-machine token + auth, shared vs machine-local config, lifecycle, **cross-OS setup**, and the silent-failure troubleshooting playbook.
|
|
418
418
|
- **[integrations.md](references/integrations.md)** — ClickUp/GitHub task sync (one cloud backend at a time), dashboard, desktop app, federation/vaults, council, marketing. (Brain sync has its own reference above.)
|
|
419
419
|
- **[improving-dreamcontext.md](references/improving-dreamcontext.md)** — the feedback loop, when and how to file.
|
|
@@ -1,58 +1,47 @@
|
|
|
1
|
-
# Brain sync (GitHub cloud sync for the
|
|
1
|
+
# Brain sync (GitHub cloud sync for the whole project)
|
|
2
2
|
|
|
3
|
-
The one reference for
|
|
3
|
+
The one reference for **cloud sync** — what it is, the two modes, how it's set up, how it authenticates, what it syncs, the cross-machine / cross-OS setup, and how to diagnose it when it silently stops. This is a *different* feature from **cloud task sync** (ClickUp/GitHub Issues — tasks only) and **federation** (read-only recall across your own separate projects — nothing is copied). Say so if the user conflates them.
|
|
4
4
|
|
|
5
|
-
**Guide the user into this** the moment they say *"use this with my team / on another machine," "share the brain," "
|
|
5
|
+
**Guide the user into this** the moment they say *"use this with my team / on another machine," "share the brain," "sync my project to GitHub."* Do NOT answer "we don't support that" — this is the feature.
|
|
6
6
|
|
|
7
7
|
## What it is
|
|
8
8
|
|
|
9
|
-
The brain
|
|
9
|
+
The project (your code + `.claude/` + the brain under `_dream_context/`) is synced to the project's **own GitHub repo** and kept in sync across people/machines. Local markdown + JSON on disk stays canonical (local-first); **git is just the transport**, not a new database. Merges are **agent-assisted and semantic**: the CLI auto-resolves deterministic files itself and only defers overlapping *prose* edits to the `/dream-sync` skill.
|
|
10
10
|
|
|
11
|
-
A **master switch** (cloud sync ON/OFF) gates everything: `dreamcontext brain enable` / `brain disable`, resolved and shown by `dreamcontext brain status`.
|
|
11
|
+
A **master switch** (cloud sync ON/OFF) gates everything: `dreamcontext brain enable` / `brain disable`, resolved and shown by `dreamcontext brain status`. There is one shared, whole-project model — `.claude/` and `_dream_context/` live in the code repo and travel together, so there is no separate brain repo and no symlink layer to maintain.
|
|
12
12
|
|
|
13
|
-
## The
|
|
13
|
+
## The two sync modes
|
|
14
14
|
|
|
15
|
-
Mode lives in `_dream_context/state/.config.json` under `brainRepo.mode`. **Anything not `
|
|
15
|
+
Mode lives in `_dream_context/state/.config.json` under `brainRepo.mode`. **Anything not `full-repo` resolves to `in-tree`.**
|
|
16
16
|
|
|
17
17
|
| Mode | Git root | Remote | Branch | What lands on the remote | Auto-push? |
|
|
18
18
|
|---|---|---|---|---|---|
|
|
19
|
-
| **`
|
|
20
|
-
| **`
|
|
21
|
-
| **`in-tree`** (default) | — | — | — | nothing pushed — **commit-only**, stages `_dream_context/` and commits locally | **No, never** |
|
|
19
|
+
| **`full-repo`** | the **project root** (the whole project is the repo) | the project's own `origin` | the **current** branch (never assumes `main`) | the **entire project** — code + `.claude/` + `_dream_context/` nested inside it | **Yes** |
|
|
20
|
+
| **`in-tree`** (default) | the project root | — | — | nothing pushed — **commit-only**, stages `_dream_context/` and commits locally | **No, never** |
|
|
22
21
|
|
|
23
|
-
- **`
|
|
24
|
-
- **`
|
|
25
|
-
- **`in-tree`** is the safe default: it commits the brain alongside your code but **never pushes** — you sync manually or promote to another mode.
|
|
22
|
+
- **`full-repo`** is cloud sync turned ON: the whole project folder is the synced repo (brain nested under `_dream_context/`, plus root `CLAUDE.md` / `.claude/`). It **refuses on a detached HEAD** (`detached-head`) and force-writes machine-local excludes into the project-root `.gitignore` before every sync so secrets/lock files never get staged by `git add -A`.
|
|
23
|
+
- **`in-tree`** is the safe default (cloud sync OFF): it commits the brain alongside your code but **never pushes** — turn cloud sync on to promote it to `full-repo`.
|
|
26
24
|
|
|
27
|
-
**
|
|
25
|
+
**Turning it on/off:** cloud sync is the master switch. Enable it from the **dashboard** (Settings → Brain → Cloud sync toggle; server route `POST /api/brain/settings`) or the CLI (`dreamcontext brain enable`). Enabling requires the project to already have a GitHub `origin` (it errors `no_origin` otherwise) and flips the mode to `full-repo`; disabling reverts to `in-tree`.
|
|
28
26
|
|
|
29
27
|
## Set it up (CLI)
|
|
30
28
|
|
|
31
29
|
```bash
|
|
32
|
-
# 0. Token FIRST —
|
|
30
|
+
# 0. Token FIRST — every push needs it (see Auth for scope + resolution order).
|
|
33
31
|
dreamcontext config github-token "$(gh auth token)" # per-MACHINE token; gitignored, never travels with the repo
|
|
34
32
|
|
|
35
|
-
#
|
|
36
|
-
|
|
33
|
+
# 1. Make sure the project has a GitHub origin (full-repo pushes to it).
|
|
34
|
+
git remote add origin https://github.com/<you-or-org>/<repo>.git # skip if it already has one
|
|
37
35
|
|
|
38
|
-
#
|
|
39
|
-
dreamcontext brain
|
|
40
|
-
dreamcontext brain attach <brain-repo-url> # trust warning + read-only diff preview, then confirm
|
|
36
|
+
# 2. Turn cloud sync ON — flips the project to full-repo (whole project → origin, current branch).
|
|
37
|
+
dreamcontext brain enable
|
|
41
38
|
|
|
42
|
-
dreamcontext brain status # verify: mode, remote, resolved cloud-sync switch
|
|
39
|
+
dreamcontext brain status # verify: mode full-repo, remote, resolved cloud-sync switch
|
|
43
40
|
```
|
|
44
41
|
|
|
45
|
-
|
|
42
|
+
Every push uses the **same resolved token**, so set the token (or be logged into dreamcontext for the global store) *before* enabling. (PowerShell/cmd have no `$(…)` — use `dreamcontext config github-token <token>` or set `GITHUB_TOKEN`.) Because the whole project is the synced unit, `CLAUDE.md` and `.claude/` are already at the project root and sync natively — nothing extra to wire up.
|
|
46
43
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
```bash
|
|
50
|
-
dreamcontext brain platform # moves CLAUDE.md + .claude/ into _dream_context/platform/ and symlinks from root
|
|
51
|
-
dreamcontext brain platform --status
|
|
52
|
-
```
|
|
53
|
-
(Separate mode only — its repo is rooted at `_dream_context/`, so root files wouldn't sync otherwise. In `full-repo` the root files sync natively and `brain platform` is unnecessary. Every `brain sync` re-creates missing root symlinks on a fresh clone; `doctor` flags broken links.)
|
|
54
|
-
|
|
55
|
-
## Auth — how the brain repo authenticates (NOT gh, NOT the keychain)
|
|
44
|
+
## Auth — how sync authenticates (NOT gh, NOT the keychain)
|
|
56
45
|
|
|
57
46
|
The token is resolved by **`resolveBrainSyncToken`, secrets-first, env-last**:
|
|
58
47
|
|
|
@@ -62,33 +51,33 @@ The token is resolved by **`resolveBrainSyncToken`, secrets-first, env-last**:
|
|
|
62
51
|
|
|
63
52
|
**The `gh` CLI and git credential helpers are never consulted** — helpers are actively disabled on every networked git call (`-c credential.helper=`), and the token is handed to git only through a `GIT_ASKPASS` helper pointed at a fresh **0600** temp file (never in the remote URL or argv). `.secrets.json` is written **gitignore-first** (the write aborts if it can't be ignored) and chmod **0600**.
|
|
64
53
|
|
|
65
|
-
> **Required scope (this bites people):**
|
|
54
|
+
> **Required scope (this bites people):** sync **pushes repo contents**, so the token needs classic **`repo`** scope, or a fine-grained PAT with **Contents: read & write** on the project repo. `config github-token` writes the SAME per-project store the GitHub-Issues *task* backend uses — but a fine-grained **Issues-only** token (enough for task sync) will authenticate that and yet **silently fail every push**. When in doubt, use a classic `repo` token or a fine-grained PAT that includes Contents:write.
|
|
66
55
|
|
|
67
56
|
## Shared vs machine-local config (important)
|
|
68
57
|
|
|
69
|
-
- **`state/.config.json` — SYNCS** across machines/teammates. It holds the
|
|
58
|
+
- **`state/.config.json` — SYNCS** across machines/teammates. It holds the `brainRepo` block: **`mode`, `enabled`, `autoSync`**. Consequence: **an explicit `mode` or `enabled` propagates to everyone** on the next sync — they are a *shared* decision, not per-machine.
|
|
70
59
|
- **`state/.brain-local.json` — MACHINE-LOCAL** (gitignored). Only runtime bookkeeping: `lastFetchAt`, `pulledUpdates`, `pendingAgentMerge`, `needsTaskSync`, `codeRepoPath`. This is what keeps two machines from clobbering each other's sync state.
|
|
71
|
-
- **`enabled` resolution:** an explicit `true`/`false` in `.config.json` wins (and is shared). If **absent**, it's **derived per-machine** — ON iff this machine is GitHub-connected (local `origin` is github.com, OR `taskBackend=github
|
|
60
|
+
- **`enabled` resolution:** an explicit `true`/`false` in `.config.json` wins (and is shared). If **absent**, it's **derived per-machine** — ON iff this machine is GitHub-connected (local `origin` is github.com, OR `taskBackend=github`), else OFF. So the *default* is per-machine; an *explicit* toggle is global.
|
|
72
61
|
|
|
73
62
|
## Lifecycle — when sync happens
|
|
74
63
|
|
|
75
|
-
- **Session start:** a **detached, non-blocking** `brain sync --pull-only` fires in the background (only when `enabled` + mode `
|
|
64
|
+
- **Session start:** a **detached, non-blocking** `brain sync --pull-only` fires in the background (only when `enabled` + mode `full-repo` + `autoSync`; honors `DREAMCONTEXT_BRAIN_SYNC=0`). Its results land on the **NEXT** session (you see the previous pull's `pulledUpdates`).
|
|
76
65
|
- **`sleep done`:** runs a foreground `brain sync` (fetch → merge → commit → push) when `autoSync` is set. **Sync failure never fails sleep** — but on a prose conflict it pauses with `awaiting-agent` and prints the `/dream-sync` prompt.
|
|
77
66
|
- **Manual, any time:** `dreamcontext brain sync` (flags: `--pull-only`, `--push-only`, `--strict`, `--continue`, `--resume`).
|
|
78
|
-
- **Commit messages** (so you can recognize them): `chore
|
|
67
|
+
- **Commit messages** (so you can recognize them): `chore: sync project (dreamcontext)` (full-repo), `chore(brain): sync` (in-tree commit-only), `chore(brain): merge team updates` (auto-merge), `… (agent-resolved)` (after `/dream-sync`).
|
|
79
68
|
|
|
80
|
-
**Conflicts:** deterministic files — JSON (changelog/releases/config/taxonomy) and task `.md` — are auto-merged by the CLI. Only overlapping edits to the **same `##` section of a knowledge/feature (prose) doc** defer to the agent (`awaiting-agent`): a report with base/ours/theirs snapshots is written to `state/.brain-merge/`, the `/dream-sync` skill writes the real merge, and `brain sync --continue` commits it.
|
|
69
|
+
**Conflicts:** deterministic files — JSON (changelog/releases/config/taxonomy) and task `.md` — are auto-merged by the CLI. Only overlapping edits to the **same `##` section of a knowledge/feature (prose) doc** defer to the agent (`awaiting-agent`): a report with base/ours/theirs snapshots is written to `state/.brain-merge/`, the `/dream-sync` skill writes the real merge, and `brain sync --continue` commits it. Real **code** conflicts go to the human with native git markers (never to the agent). A **scrub gate** runs before every commit and push (BLOCK always stops it; WARN stops only under `--strict` or a headless pull-only).
|
|
81
70
|
|
|
82
71
|
## Cross-machine / cross-OS setup
|
|
83
72
|
|
|
84
|
-
The
|
|
73
|
+
The project is portable, but each machine needs a few things right. **The #1 real-world failure is a machine with no token — sync then silently no-ops.**
|
|
85
74
|
|
|
86
75
|
- **Every machine needs its own token.** `.secrets.json` is gitignored, so the token does **not** travel with the repo. On each new machine run **`dreamcontext config github-token "$(gh auth token)"`** (or set `GITHUB_TOKEN`, or log in so the global `~/.dreamcontext/.secrets.json` is populated). No `gh`/keychain fallback exists — if none of the three token sources is set, push/pull just quietly do nothing.
|
|
87
|
-
- **The
|
|
88
|
-
- **Windows / WSL — line endings.** dreamcontext does **not** normalize CRLF. On Windows, set `git config core.autocrlf false` (or commit a `.gitattributes` with `* text=lf`) in the
|
|
76
|
+
- **The project must be its OWN git root (the enclosing-repo trap).** In `full-repo` the repo root must be the project folder. Verify: `git -C <project> rev-parse --show-toplevel` should print *that* folder — **not climb into an enclosing parent repo** (e.g. a home-directory `~/.git`). If sync targets the wrong tree, hunt for a parent `.git` above the folder and remove its stray `origin`.
|
|
77
|
+
- **Windows / WSL — line endings.** dreamcontext does **not** normalize CRLF. On Windows, set `git config core.autocrlf false` (or commit a `.gitattributes` with `* text=lf`) in the project repo to avoid phantom whole-file conflicts on markdown/JSON. A mixed Windows⇄WSL checkout of the *same* folder is the highest-risk setup — pick one.
|
|
89
78
|
- **Node/npx must be on PATH for GUI-launched agents.** The background pull launches via the node binary directly (not a bare `dreamcontext`), so a minimal Finder/Explorer PATH is tolerated — but the CLI itself must be installed on each machine.
|
|
90
79
|
- **Credential helpers are bypassed by design**, so macOS Keychain / Windows Credential Manager / libsecret differences don't matter — auth is only the resolved token via askpass.
|
|
91
|
-
- **
|
|
80
|
+
- **No symlinks involved.** Because the whole project syncs natively, `CLAUDE.md`/`.claude/` are plain files at the project root on every OS — no symlink layer, so Windows Developer-Mode / elevation is never required for cloud sync.
|
|
92
81
|
|
|
93
82
|
**Per-OS quick matrix**
|
|
94
83
|
|
|
@@ -98,21 +87,20 @@ The brain is portable, but each machine needs a few things right. **The #1 real-
|
|
|
98
87
|
| Line endings | fine | fine | **set `core.autocrlf false`** |
|
|
99
88
|
| Git root check | `rev-parse --show-toplevel` | same | same |
|
|
100
89
|
| Keychain/helper | bypassed | bypassed | bypassed |
|
|
101
|
-
| `
|
|
90
|
+
| `CLAUDE.md` / `.claude/` | plain files (sync natively) | native | native (no symlinks, no Developer Mode needed) |
|
|
102
91
|
| Token scope | `repo` / Contents:write | same | same (an Issues-only fine-grained token won't push) |
|
|
103
92
|
|
|
104
93
|
**Operating rule — sleep before you leave a machine.** `sleep done` pushes the consolidated state, so the next machine pulls clean. Skipping it is the main way two machines drift into an avoidable prose conflict.
|
|
105
94
|
|
|
106
95
|
## Onboarding a second machine (same user) — checklist
|
|
107
96
|
|
|
108
|
-
**On Windows, read the Cross-OS section first** — the token syntax (step 2)
|
|
97
|
+
**On Windows, read the Cross-OS section first** — the token syntax (step 2) and `core.autocrlf` (step 5) differ.
|
|
109
98
|
|
|
110
|
-
1. `git clone <
|
|
99
|
+
1. `git clone <project-url>` — the whole project (code + `.claude/` + `_dream_context/`).
|
|
111
100
|
2. `dreamcontext config github-token "$(gh auth token)"` — the per-machine token (Windows: `config github-token <token>` or `GITHUB_TOKEN`; scope must include Contents:write).
|
|
112
|
-
3. `dreamcontext brain
|
|
113
|
-
4. `dreamcontext brain
|
|
114
|
-
5.
|
|
115
|
-
6. On Windows: `git config core.autocrlf false` first.
|
|
101
|
+
3. `dreamcontext brain status` — confirm mode `full-repo`, remote, cloud-sync ON, right git root.
|
|
102
|
+
4. `dreamcontext brain sync --pull-only` — take the latest, verify a clean pull.
|
|
103
|
+
5. On Windows: `git config core.autocrlf false` first.
|
|
116
104
|
|
|
117
105
|
## When sync is "silently failing" (troubleshooting)
|
|
118
106
|
|
|
@@ -122,10 +110,10 @@ Failures are swallowed by design (they never fail sleep or block a session). Whe
|
|
|
122
110
|
2. **Token present?** Check `state/.secrets.json` (or global / `GITHUB_TOKEN`). No token = silent no-op — the most common cause. Set it and retry.
|
|
123
111
|
3. **`dreamcontext brain scrub`** — a scrub-gate BLOCK is the #1 *silent* blocker; it stops the push before anything leaves. Fix the flagged secret/absolute-path and re-sync.
|
|
124
112
|
4. **`dreamcontext brain sync --push-only`** (foreground) — forces the error to the surface instead of the background swallowing it.
|
|
125
|
-
5.
|
|
113
|
+
5. **Detached HEAD** → `detached-head` refusal. Check out a branch.
|
|
126
114
|
6. **Wrong git root** → the enclosing-repo trap above (`rev-parse --show-toplevel`).
|
|
127
115
|
7. **`pendingAgentMerge` / `awaiting-agent`** → a prose conflict is waiting: run **`/dream-sync`**, then `brain sync --continue`.
|
|
128
116
|
|
|
129
|
-
## `brain` command surface (
|
|
117
|
+
## `brain` command surface (5 subcommands)
|
|
130
118
|
|
|
131
|
-
`status`, `enable`, `disable`, `
|
|
119
|
+
`status`, `enable`, `disable`, `scrub`, `sync`. (`sync` flags: `--pull-only`, `--push-only`, `--strict`, `--continue`, `--resume` — the last two are attended-only; never drive them unattended.) `brain enable` turns cloud sync ON (whole-project `full-repo` sync — needs a GitHub `origin`); `brain disable` reverts to `in-tree`. Merge internals live in the `/dream-sync` skill and `skill-sync/references/merge-rules.md`; full feature status in `knowledge/features/brain-repo-sync.md`.
|
|
@@ -214,13 +214,10 @@ Sync the WHOLE brain (`_dream_context/`) — tasks, knowledge, features, sleep s
|
|
|
214
214
|
|
|
215
215
|
| Command | Description |
|
|
216
216
|
|---|---|
|
|
217
|
-
| `brain status` | Show
|
|
218
|
-
| `brain
|
|
219
|
-
| `brain
|
|
220
|
-
| `brain discover` | List `dreamcontext-brain`-topic repos you can access on GitHub. |
|
|
217
|
+
| `brain status` | Show sync mode (`full-repo`/`in-tree`), remote, sync state, and whether cloud sync is ON. Reports `mergeInProgress` / `pendingAgentMerge` (the `/dream-sync` handoff signals). |
|
|
218
|
+
| `brain enable` | Turn cloud sync ON — sync the WHOLE project (code + `.claude/` + `_dream_context/`) to its GitHub `origin` on the current branch (`full-repo`). Needs a GitHub `origin`. |
|
|
219
|
+
| `brain disable` | Turn cloud sync OFF — revert to `in-tree` (the brain is still committed locally, never pushed). |
|
|
221
220
|
| `brain sync` | Fetch → semantic-merge-on-conflict → commit → push (or, in `in-tree` mode, commit-only — never auto-pushes). `--pull-only` (take team content in, never push), `--push-only`, `--strict` (WARN scrub hits block too), `--resume` / `--continue` (the attended `/dream-sync` handoff — see below). |
|
|
222
|
-
| `brain enable` / `brain disable` | Explicit master switch for cloud sync on this project (v3.3). |
|
|
223
|
-
| `brain platform` | Carry the Claude Code layer (CLAUDE.md + `.claude/`) INSIDE the brain repo: moves them into `_dream_context/platform/` and symlinks them back from the project root, so they sync with the team. Missing root symlinks are re-created automatically by every `brain sync` (fresh clones self-wire) and flagged by `doctor`. `--status` reports without changing anything. Machine-local files (`platform/.claude/settings.local.json`, `scheduled_tasks.lock`) never sync. |
|
|
224
221
|
| `brain scrub` | Dry-run the secrets/absolute-path scrub gate against the current staged tree. |
|
|
225
222
|
|
|
226
223
|
**Automatic sync:** every `dreamcontext sleep done` runs a brain sync (fetch/merge/commit/push); failure never fails sleep. Session-start does a non-blocking background pull. **On an agent-class merge conflict** (two people edited the same prose section) the CLI stops at `already-awaiting-agent` and defers to the **`/dream-sync` skill** — the agent half that reads base/ours/theirs and writes the semantic merge, then `brain sync --continue`. Never drive `--resume`/`--continue` unattended.
|
|
@@ -214,59 +214,49 @@ dreamcontext federation purge --dry-run # preview
|
|
|
214
214
|
|
|
215
215
|
---
|
|
216
216
|
|
|
217
|
-
## ✅ Team brain sync (
|
|
217
|
+
## ✅ Team brain sync (whole project) — collaborate on ONE brain
|
|
218
218
|
|
|
219
|
-
**Yes, a team can share a single dreamcontext brain.**
|
|
219
|
+
**Yes, a team can share a single dreamcontext brain.** Cloud sync pushes the **whole project** — your code, `.claude/`, and the brain nested under `_dream_context/` — to the project's own GitHub `origin` on the current branch, and the CLI/desktop app push/pull/merge it the way a team collaborates on code. The brain stays plain markdown/JSON on disk (local-first); git is just the sync transport, not a new database. Because `.claude/` and `_dream_context/` already live in the code repo, they travel together — there is no separate brain repo and no symlink layer to maintain.
|
|
220
220
|
|
|
221
|
-
**Guide the user here** the moment they say *"I want to use this with my team / with other people," "share the brain," "collaborate on tasks/knowledge together,"
|
|
221
|
+
**Guide the user here** the moment they say *"I want to use this with my team / with other people," "share the brain," "collaborate on tasks/knowledge together,"* or *"set it up on my other machine."* Do NOT answer "we don't support that" — this is the feature.
|
|
222
222
|
|
|
223
|
-
> **Full reference → [brain-sync.md](brain-sync.md)** — the
|
|
223
|
+
> **Full reference → [brain-sync.md](brain-sync.md)** — the two modes (full-repo / in-tree), per-machine token + auth, shared vs machine-local config, **cross-OS setup**, and the silent-failure troubleshooting playbook. The section below is the quick tour.
|
|
224
224
|
|
|
225
225
|
**How it differs from its neighbors** (say this if the user conflates them):
|
|
226
226
|
- **Cloud task sync** (ClickUp/GitHub Issues) — mirrors only *tasks* to a task manager, one backend at a time.
|
|
227
227
|
- **Federation** — read-only recall across your OWN separate projects; nothing is ever copied.
|
|
228
|
-
- **
|
|
228
|
+
- **Whole-project sync (this)** — the *whole* project (code + brain) is one git-synced artifact several people edit together.
|
|
229
229
|
|
|
230
|
-
### Onboarding a team
|
|
230
|
+
### Onboarding a team
|
|
231
231
|
|
|
232
232
|
```bash
|
|
233
|
-
#
|
|
234
|
-
dreamcontext
|
|
233
|
+
# Each person / each machine — set a per-MACHINE token (gitignored, never travels with the repo)
|
|
234
|
+
dreamcontext config github-token "$(gh auth token)"
|
|
235
235
|
|
|
236
|
-
#
|
|
237
|
-
|
|
238
|
-
dreamcontext brain
|
|
236
|
+
# Make sure the project has a GitHub origin (full-repo pushes to it), then turn cloud sync ON
|
|
237
|
+
git remote add origin https://github.com/acme/app.git # skip if it already has one
|
|
238
|
+
dreamcontext brain enable # flips the project to full-repo (whole project → origin)
|
|
239
239
|
|
|
240
|
-
dreamcontext
|
|
241
|
-
dreamcontext brain status # mode (separate/full-repo/in-tree), remote, sync state, cloud-sync switch
|
|
240
|
+
dreamcontext brain status # mode (full-repo/in-tree), remote, sync state, cloud-sync switch
|
|
242
241
|
```
|
|
243
242
|
|
|
243
|
+
Teammates just `git clone` the project and run the same two steps (token + `brain enable`). Cloud sync can also be toggled from the dashboard (Settings → Brain → Cloud sync).
|
|
244
|
+
|
|
244
245
|
### Day-to-day (mostly automatic)
|
|
245
246
|
|
|
246
|
-
- **Every `sleep done`** fetches → semantic-merges on conflict → commits → pushes the
|
|
247
|
+
- **Every `sleep done`** fetches → semantic-merges on conflict → commits → pushes the project (sync failure never fails sleep). **Session start** does a non-blocking background pull. So teammates' consolidated context reaches everyone without a manual step.
|
|
247
248
|
- **Manual sync any time:** `dreamcontext brain sync` (or `--pull-only` to just take team content in).
|
|
248
|
-
- **On a prose merge conflict** (two people edited the same `##` section of a knowledge/feature doc), the CLI resolves every deterministic file itself and stops at `already-awaiting-agent`, deferring the rest to the **`/dream-sync` skill** — the agent reads base/ours/theirs snapshots, writes the real semantic merge, and hands back with `brain sync --continue`. (`--resume`/`--continue` are attended-only; never drive them unattended.)
|
|
249
|
-
|
|
250
|
-
### Platform layer — share CLAUDE.md + .claude with the team
|
|
251
|
-
|
|
252
|
-
A separate-mode brain repo is rooted at `_dream_context/`, so the Claude Code files at the
|
|
253
|
-
project root (CLAUDE.md, `.claude/` skills/agents/hooks) would never sync on their own.
|
|
254
|
-
`dreamcontext brain platform` fixes that: it moves them into `_dream_context/platform/` and
|
|
255
|
-
symlinks them back from the project root (Claude Code resolves the links transparently).
|
|
256
|
-
From then on they sync with the brain like everything else; every `brain sync` re-creates
|
|
257
|
-
missing root symlinks on a fresh clone, and `doctor` flags broken links. Machine-local files
|
|
258
|
-
(`platform/.claude/settings.local.json`, `scheduled_tasks.lock`) stay gitignored.
|
|
259
|
-
`brain platform --status` reports without changing anything.
|
|
249
|
+
- **On a prose merge conflict** (two people edited the same `##` section of a knowledge/feature doc), the CLI resolves every deterministic file itself and stops at `already-awaiting-agent`, deferring the rest to the **`/dream-sync` skill** — the agent reads base/ours/theirs snapshots, writes the real semantic merge, and hands back with `brain sync --continue`. A real **code** conflict is left for the human's editor with native git markers (never sent to the agent). (`--resume`/`--continue` are attended-only; never drive them unattended.)
|
|
260
250
|
|
|
261
251
|
### Editing / reconfiguring
|
|
262
252
|
|
|
263
|
-
- **Turn cloud sync on/off:** `dreamcontext brain enable` / `brain disable
|
|
264
|
-
- **Modes:** `
|
|
265
|
-
- **Safety rails (always on):**
|
|
253
|
+
- **Turn cloud sync on/off:** `dreamcontext brain enable` / `brain disable`, or the dashboard Settings → Brain toggle.
|
|
254
|
+
- **Modes:** `full-repo` (cloud sync ON — whole project → its own `origin`, on the current branch; needs a GitHub `origin`) · `in-tree` (cloud sync OFF — commit-only, **never** auto-pushes; the safe default). Both run the scrub gate. Full detail + cross-OS setup → [brain-sync.md](brain-sync.md).
|
|
255
|
+
- **Safety rails (always on):** a **scrub gate** blocks secrets / absolute local paths before every commit and push; the project-root `.gitignore` is force-written with the machine-local brain excludes + secrets before every whole-project stage; tokens are supplied via `GIT_ASKPASS` (never embedded in the remote URL); per-machine indexes/caches are gitignored and never pushed.
|
|
266
256
|
|
|
267
|
-
### From the desktop app
|
|
257
|
+
### From the desktop app
|
|
268
258
|
|
|
269
|
-
|
|
259
|
+
**GitHub device-flow login from the Launcher** and the dashboard **Settings → Brain Cloud-sync toggle** turn whole-project sync on/off (with a **team-updates badge** and a one-click "Resolve with AI" for a deferred prose merge). (Full status: `knowledge/features/brain-repo-sync.md`; merge internals: `skill-sync/references/merge-rules.md`.)
|
|
270
260
|
|
|
271
261
|
---
|
|
272
262
|
|
package/skill-sync/SKILL.md
CHANGED
|
@@ -66,9 +66,8 @@ Read `_dream_context/state/.brain-merge/report.json`. For each entry in `deferre
|
|
|
66
66
|
section-by-section — sections only one side touched keep that side's version; sections BOTH
|
|
67
67
|
touched are the ones you're here for — read them and write prose that keeps both people's point,
|
|
68
68
|
reconciling wording, not concatenating raw diffs.
|
|
69
|
-
3. Stage it — run `git add <path>`
|
|
70
|
-
|
|
71
|
-
`_dream_context/` prefix).
|
|
69
|
+
3. Stage it — run `git add <path>` at the project root (the git root is the project folder, so
|
|
70
|
+
`path` carries the `_dream_context/` prefix).
|
|
72
71
|
|
|
73
72
|
Do this for every entry in `deferred` before moving on — `--continue` commits everything staged in
|
|
74
73
|
one shot.
|
|
@@ -5,23 +5,28 @@ plan v3.3). The CLI (`src/lib/git-sync/*`) implements everything on this page.
|
|
|
5
5
|
|
|
6
6
|
## 1. Modes
|
|
7
7
|
|
|
8
|
-
- **`
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
- **`full-repo`** — cloud sync ON: the WHOLE project (code + `.claude/` + `_dream_context/`) is the
|
|
9
|
+
synced unit, pushed to the project's own `origin` on the CURRENT branch. Full auto-sync: fetch →
|
|
10
|
+
merge → commit → push. Enabled via `dreamcontext brain enable` or the Settings toggle (requires a
|
|
11
|
+
GitHub `origin`).
|
|
12
|
+
- **`in-tree`** (default) — cloud sync OFF: the brain is nested inside the code repo. **Commit-only —
|
|
13
|
+
NEVER auto-pushes.** The scrub gate still runs before every in-tree commit — an in-tree commit
|
|
14
|
+
lands in the code repo's history and can be pushed to a public OSS remote by the user's own normal
|
|
15
|
+
`git push`.
|
|
14
16
|
|
|
15
17
|
## 2. Cloud-sync master switch (v3.3)
|
|
16
18
|
|
|
17
19
|
`brainRepo.enabled` (explicit) always wins. Absent ⇒ derived: **ON** iff the project is already
|
|
18
|
-
GitHub-connected (code repo's `origin` is a `github.com` URL, OR `taskBackend==='github'
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
the whole block with one dim line, the session-start pull is never
|
|
22
|
-
returns `action:'disabled'`.
|
|
20
|
+
GitHub-connected (code repo's `origin` is a `github.com` URL, OR `taskBackend==='github'`) — **OFF**
|
|
21
|
+
otherwise (new/unconnected projects stay off until the user runs `dreamcontext brain enable` or
|
|
22
|
+
flips the Settings toggle). Enabling flips the mode to `full-repo`; disabling reverts to `in-tree`.
|
|
23
|
+
When OFF: `sleep done` skips the whole block with one dim line, the session-start pull is never
|
|
24
|
+
spawned, and `brain sync` returns `action:'disabled'`.
|
|
23
25
|
|
|
24
|
-
## 3. Tracked vs local —
|
|
26
|
+
## 3. Tracked vs local — machine-local excludes under `_dream_context/`
|
|
27
|
+
|
|
28
|
+
In `full-repo` the whole project is staged with `git add -A` at the project root, so the project's
|
|
29
|
+
own `.gitignore` must exclude the machine-local brain runtime + secrets (prefixed `_dream_context/`).
|
|
25
30
|
|
|
26
31
|
| Path | `taskBackend=local` | `taskBackend=github`/`clickup` |
|
|
27
32
|
|---|---|---|
|
|
@@ -33,21 +38,12 @@ returns `action:'disabled'`.
|
|
|
33
38
|
| `state/.secrets.json`, `.sleep.json`, `.sleep-history.json`, `.agent-sessions.json`, `.session-digests/`, `.conflicts/`, `.brain-merge/`, `.version-check.json`, `.auto-upgrade.json`, `.brain-local.json`, `.lab-prefs.json`, `.tasks-map.json`, `.tasks-sync.*`, `.tasks-queue.json`, `.obsidian/`, `tmp/`, `**/.env`, `**/.DS_Store` | gitignored | gitignored |
|
|
34
39
|
| `lab/**` (insights + cache) | tracked | tracked |
|
|
35
40
|
| `lab/credentials.json` / `lab/credentials.*` (except the tracked `credentials.example.json`) | gitignored | gitignored |
|
|
36
|
-
| `platform/**` (Claude Code layer: CLAUDE.md + .claude) | tracked | tracked |
|
|
37
|
-
| `platform/.claude/settings.local.json`, `platform/.claude/scheduled_tasks.lock` | gitignored | gitignored |
|
|
38
|
-
|
|
39
|
-
Built by `buildBrainGitignore(taskBackend)` (`src/lib/git-sync/brain-repo.ts`) and written on
|
|
40
|
-
bootstrap (`brain init`/`attach`); `ensureLocalOnlyArtifacts` re-asserts it after a clone/pull.
|
|
41
|
-
|
|
42
|
-
## 3b. Platform layer — CLAUDE.md + .claude travel with the brain
|
|
43
41
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
is fully wired after its first sync; `doctor` flags missing links and root-vs-platform conflicts.
|
|
50
|
-
Machine-local runtime files inside `platform/.claude/` (see table) never sync.
|
|
42
|
+
The `_dream_context/.gitignore` is built by `buildBrainGitignore(taskBackend)` and the project-root
|
|
43
|
+
excludes by `ensureFullRepoGitignore(projectRoot, taskBackend)` (both `src/lib/git-sync/brain-repo.ts`),
|
|
44
|
+
written gitignore-first before every whole-project stage; `ensureLocalOnlyArtifacts` re-asserts the
|
|
45
|
+
`_dream_context/.gitignore` after a clone/pull. `CLAUDE.md` and `.claude/` are plain files at the
|
|
46
|
+
project root and sync natively — no separate brain repo, no platform-layer symlinks.
|
|
51
47
|
|
|
52
48
|
## 4. Credential supply (GIT_ASKPASS — decision F)
|
|
53
49
|
|
|
@@ -74,8 +70,8 @@ global `~/.dreamcontext/.secrets.json` tier between the two.)
|
|
|
74
70
|
|
|
75
71
|
## 6. Scrub gate (decisions — BLOCK vs WARN)
|
|
76
72
|
|
|
77
|
-
Runs before EVERY
|
|
78
|
-
|
|
73
|
+
Runs before EVERY commit: in-tree commits, the full-repo whole-project push, and after every merge
|
|
74
|
+
(a merge can reintroduce a secret).
|
|
79
75
|
|
|
80
76
|
- **BLOCK** (aborts everywhere, loudly, non-zero exit): GitHub PAT/OAuth tokens, AWS/Google/Slack/
|
|
81
77
|
OpenAI/Anthropic/Stripe keys, private-key headers, 3-part JWTs.
|
|
@@ -145,7 +141,7 @@ report is a LIVE handoff — never auto-cleared, consumable only via `--resume`.
|
|
|
145
141
|
|
|
146
142
|
## 10. The reentrancy guard — 5-clause precedence (v3.2)
|
|
147
143
|
|
|
148
|
-
Every `runBrainSync` call (
|
|
144
|
+
Every `runBrainSync` call (full-repo only — in-tree bypasses this entirely, see §1) checks, in
|
|
149
145
|
order, BEFORE acquiring the lock:
|
|
150
146
|
|
|
151
147
|
1. **Flag misuse** → `invalid-flag` + a guiding `note`: `--continue` without `MERGE_HEAD`;
|
|
@@ -212,19 +208,19 @@ the fixed `dreamcontext-sync <noreply@dreamcontext.local>` author (passed explic
|
|
|
212
208
|
takes zero forward dependency on M3. **M3 tier (adds, does not replace):** once a GitHub login
|
|
213
209
|
exists, `mapLoginToPerson(login)` swaps in the resolved `person:` identity on top.
|
|
214
210
|
|
|
215
|
-
## 15. Manual UI checklist (
|
|
211
|
+
## 15. Manual UI checklist (dashboard — appendix)
|
|
216
212
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
213
|
+
Verify by hand: device-flow login (shows `user_code`, opens `verification_uri`) AND the PAT-paste
|
|
214
|
+
fallback, both with the scope disclosure visible; the **Cloud sync toggle** turns whole-project
|
|
215
|
+
sync on (400 `no_origin` if the project has no GitHub `origin`) and off (reverts to `in-tree`);
|
|
216
|
+
the team-updates badge shows N after a teammate pushes, driven by a background fetch (the badge
|
|
217
|
+
endpoint itself makes no network call in the request path); a deferred prose merge surfaces a
|
|
218
|
+
one-click **"Resolve with AI"** banner.
|
|
223
219
|
|
|
224
220
|
## 16. full-repo hardening (2026-07-08) — refuse/defer/recover, never mangle
|
|
225
221
|
|
|
226
222
|
`full-repo` mode makes the WHOLE project repo the synced unit, so the engine touches real code
|
|
227
|
-
and the user's own git state. Five extra guarantees on top of the
|
|
223
|
+
and the user's own git state. Five extra guarantees on top of the base merge contract:
|
|
228
224
|
|
|
229
225
|
- **Detached HEAD → refuse.** `full-repo` syncs the CURRENT branch (`git.currentBranch`); on a
|
|
230
226
|
detached HEAD there is no branch to push. The engine returns **`detached-head`** ("check out a
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{aq as o,ar as n}from"./index-pZP-3m96.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-Bczdxdod.js";import{_ as i}from"./index-pZP-3m96.js";import"./chunk-FMBD7UC4-oY1KO--2.js";import"./chunk-YZCP3GAM-DeRyq2BY.js";import"./chunk-55IACEB6-B3649L4a.js";import"./chunk-EDXVE4YY-Bwj1fYhG.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-Bczdxdod.js";import{_ as i}from"./index-pZP-3m96.js";import"./chunk-FMBD7UC4-oY1KO--2.js";import"./chunk-YZCP3GAM-DeRyq2BY.js";import"./chunk-55IACEB6-B3649L4a.js";import"./chunk-EDXVE4YY-Bwj1fYhG.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-55sHob5M.js";var e=4;function a(o){return r(o,e)}export{a as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as t,b as r,a,S as s}from"./chunk-OYMX7WX6-B4MPzc-c.js";import{_ as i}from"./index-pZP-3m96.js";import"./chunk-55IACEB6-B3649L4a.js";import"./chunk-EDXVE4YY-Bwj1fYhG.js";var l={parser:a,get db(){return new s(2)},renderer:r,styles:t,init:i(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{l as diagram};
|