dreamcontext 0.14.2 → 0.16.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.
Files changed (127) hide show
  1. package/README.md +45 -20
  2. package/agents/dreamcontext-explore.md +3 -1
  3. package/dist/agents/dreamcontext-explore.md +3 -1
  4. package/dist/dashboard/assets/{BrainCanvas3D-B1Ia2HWN.js → BrainCanvas3D-Dq2AZVLs.js} +1 -1
  5. package/dist/dashboard/assets/{_baseUniq-B74oJzMc.js → _baseUniq-Rjr0gzcI.js} +1 -1
  6. package/dist/dashboard/assets/{ar-SA-G6X2FPQ2-DOKHn365.js → ar-SA-G6X2FPQ2-B6xPVLtZ.js} +1 -1
  7. package/dist/dashboard/assets/{arc-B-uBpPoM.js → arc-MywWiHZZ.js} +1 -1
  8. package/dist/dashboard/assets/{architectureDiagram-Q4EWVU46-D2lyk9NB.js → architectureDiagram-Q4EWVU46-DYku7HV_.js} +1 -1
  9. package/dist/dashboard/assets/{az-AZ-76LH7QW2-CgyZJLLo.js → az-AZ-76LH7QW2-DS6KjFyN.js} +1 -1
  10. package/dist/dashboard/assets/{bg-BG-XCXSNQG7-BPLlwY2s.js → bg-BG-XCXSNQG7-5dVZIYN7.js} +1 -1
  11. package/dist/dashboard/assets/{blockDiagram-DXYQGD6D-Df8Y7Srr.js → blockDiagram-DXYQGD6D-CLHIA42j.js} +1 -1
  12. package/dist/dashboard/assets/{bn-BD-2XOGV67Q-CY-dhlzi.js → bn-BD-2XOGV67Q-DPdctd0M.js} +1 -1
  13. package/dist/dashboard/assets/{c4Diagram-AHTNJAMY-D7TG6J6Q.js → c4Diagram-AHTNJAMY-KCxsjhZ-.js} +1 -1
  14. package/dist/dashboard/assets/{ca-ES-6MX7JW3Y-DFf13e9p.js → ca-ES-6MX7JW3Y-BwsiffyD.js} +1 -1
  15. package/dist/dashboard/assets/channel-C8dyNz3Z.js +1 -0
  16. package/dist/dashboard/assets/{chunk-4BX2VUAB-DCA-ERlu.js → chunk-4BX2VUAB-CXYJqRL7.js} +1 -1
  17. package/dist/dashboard/assets/{chunk-4TB4RGXK-Bczdxdod.js → chunk-4TB4RGXK-64IoWLUH.js} +1 -1
  18. package/dist/dashboard/assets/{chunk-55IACEB6-B3649L4a.js → chunk-55IACEB6-oeTs6Ons.js} +1 -1
  19. package/dist/dashboard/assets/{chunk-EDXVE4YY-Bwj1fYhG.js → chunk-EDXVE4YY-DnBDiozF.js} +1 -1
  20. package/dist/dashboard/assets/{chunk-FMBD7UC4-oY1KO--2.js → chunk-FMBD7UC4-1vZj5k6I.js} +1 -1
  21. package/dist/dashboard/assets/{chunk-OYMX7WX6-B4MPzc-c.js → chunk-OYMX7WX6-ChzA2Qb2.js} +1 -1
  22. package/dist/dashboard/assets/{chunk-QZHKN3VN-mVSSFcuA.js → chunk-QZHKN3VN-DFD_tEP6.js} +1 -1
  23. package/dist/dashboard/assets/{chunk-YZCP3GAM-DeRyq2BY.js → chunk-YZCP3GAM-BHU_oH_c.js} +1 -1
  24. package/dist/dashboard/assets/classDiagram-6PBFFD2Q-BAOXjBRe.js +1 -0
  25. package/dist/dashboard/assets/classDiagram-v2-HSJHXN6E-BAOXjBRe.js +1 -0
  26. package/dist/dashboard/assets/clone-Cpvwh6xu.js +1 -0
  27. package/dist/dashboard/assets/{cose-bilkent-S5V4N54A-BTtdOgy5.js → cose-bilkent-S5V4N54A-Bg8VEGjl.js} +1 -1
  28. package/dist/dashboard/assets/{cs-CZ-2BRQDIVT-BzC5Rf0R.js → cs-CZ-2BRQDIVT-CwAnE7Z6.js} +1 -1
  29. package/dist/dashboard/assets/{da-DK-5WZEPLOC-gF4jrIY7.js → da-DK-5WZEPLOC-DsAINO0_.js} +1 -1
  30. package/dist/dashboard/assets/{dagre-KV5264BT-8Cpaf4My.js → dagre-KV5264BT-CdNovau5.js} +1 -1
  31. package/dist/dashboard/assets/{de-DE-XR44H4JA-BzHDEugW.js → de-DE-XR44H4JA-DQ5OpjQD.js} +1 -1
  32. package/dist/dashboard/assets/{diagram-5BDNPKRD-BUa2eqbA.js → diagram-5BDNPKRD-DIm6J283.js} +1 -1
  33. package/dist/dashboard/assets/{diagram-G4DWMVQ6-CsHVo990.js → diagram-G4DWMVQ6-CK08ITsx.js} +1 -1
  34. package/dist/dashboard/assets/{diagram-MMDJMWI5-CFdSOuIW.js → diagram-MMDJMWI5-DhJYPP7z.js} +1 -1
  35. package/dist/dashboard/assets/{diagram-TYMM5635-Cv2e3TBK.js → diagram-TYMM5635-C_e80UTu.js} +1 -1
  36. package/dist/dashboard/assets/{el-GR-BZB4AONW-Bw-xG8H1.js → el-GR-BZB4AONW-DclRqvkS.js} +1 -1
  37. package/dist/dashboard/assets/{erDiagram-SMLLAGMA-Di1x3Ld5.js → erDiagram-SMLLAGMA-MyfjSgFp.js} +1 -1
  38. package/dist/dashboard/assets/{es-ES-U4NZUMDT-BgdmgnEL.js → es-ES-U4NZUMDT-CHBzsVCs.js} +1 -1
  39. package/dist/dashboard/assets/{eu-ES-A7QVB2H4-C_-W1jiT.js → eu-ES-A7QVB2H4-CVStEZVJ.js} +1 -1
  40. package/dist/dashboard/assets/{fa-IR-HGAKTJCU-D-Z42ygz.js → fa-IR-HGAKTJCU-84UjGZiC.js} +1 -1
  41. package/dist/dashboard/assets/{fi-FI-Z5N7JZ37-CKqV9a_l.js → fi-FI-Z5N7JZ37-B-_lgOAU.js} +1 -1
  42. package/dist/dashboard/assets/{flowDiagram-DWJPFMVM-C0HsaC5L.js → flowDiagram-DWJPFMVM-nR9IojlX.js} +1 -1
  43. package/dist/dashboard/assets/{fr-FR-RHASNOE6-DPDm5F3m.js → fr-FR-RHASNOE6-lXmb84Qf.js} +1 -1
  44. package/dist/dashboard/assets/{ganttDiagram-T4ZO3ILL-T-R79Oea.js → ganttDiagram-T4ZO3ILL-CDXS_k5x.js} +1 -1
  45. package/dist/dashboard/assets/{gitGraphDiagram-UUTBAWPF-DmdlPMiD.js → gitGraphDiagram-UUTBAWPF-DlSCg_be.js} +1 -1
  46. package/dist/dashboard/assets/{gl-ES-HMX3MZ6V-c2pDP6q3.js → gl-ES-HMX3MZ6V-DsAiVwM4.js} +1 -1
  47. package/dist/dashboard/assets/{graph-55sHob5M.js → graph-C23F2q3y.js} +1 -1
  48. package/dist/dashboard/assets/{he-IL-6SHJWFNN-QzeRcOiz.js → he-IL-6SHJWFNN-CNHUnglJ.js} +1 -1
  49. package/dist/dashboard/assets/{hi-IN-IWLTKZ5I-CmRjYfDv.js → hi-IN-IWLTKZ5I-gkocGD33.js} +1 -1
  50. package/dist/dashboard/assets/{hu-HU-A5ZG7DT2-DQS4XtgQ.js → hu-HU-A5ZG7DT2-lq_pPFj9.js} +1 -1
  51. package/dist/dashboard/assets/{id-ID-SAP4L64H-D-BFw5MU.js → id-ID-SAP4L64H-DUKThVft.js} +1 -1
  52. package/dist/dashboard/assets/{index-MPnw9upZ.css → index-CVcgkdal.css} +1 -1
  53. package/dist/dashboard/assets/{index-C2j0AERU.js → index-DFFGxCUu.js} +1 -1
  54. package/dist/dashboard/assets/{index-pZP-3m96.js → index-xYYnjbSx.js} +131 -131
  55. package/dist/dashboard/assets/{infoDiagram-42DDH7IO-BaT4J3uc.js → infoDiagram-42DDH7IO-BIZDd3qg.js} +1 -1
  56. package/dist/dashboard/assets/{ishikawaDiagram-UXIWVN3A-DsizYWBB.js → ishikawaDiagram-UXIWVN3A-Bj5MHhfc.js} +1 -1
  57. package/dist/dashboard/assets/{it-IT-JPQ66NNP-CFAPcTjk.js → it-IT-JPQ66NNP-DIDeuYqe.js} +1 -1
  58. package/dist/dashboard/assets/{ja-JP-DBVTYXUO-Bzs_hBtx.js → ja-JP-DBVTYXUO-BqPEBA22.js} +1 -1
  59. package/dist/dashboard/assets/{journeyDiagram-VCZTEJTY-B9kB5yN9.js → journeyDiagram-VCZTEJTY-B41HNLhc.js} +1 -1
  60. package/dist/dashboard/assets/{kaa-6HZHGXH3-CqRi76QS.js → kaa-6HZHGXH3-CCgtE0-l.js} +1 -1
  61. package/dist/dashboard/assets/{kab-KAB-ZGHBKWFO-wSqF6nkL.js → kab-KAB-ZGHBKWFO-A4y6sskJ.js} +1 -1
  62. package/dist/dashboard/assets/{kanban-definition-6JOO6SKY-DasidrnL.js → kanban-definition-6JOO6SKY-DR-Zc9Wa.js} +1 -1
  63. package/dist/dashboard/assets/{kk-KZ-P5N5QNE5-ins4bRlm.js → kk-KZ-P5N5QNE5-CaXfkWxC.js} +1 -1
  64. package/dist/dashboard/assets/{km-KH-HSX4SM5Z-BjJepDRC.js → km-KH-HSX4SM5Z-DGfryG3j.js} +1 -1
  65. package/dist/dashboard/assets/{ko-KR-MTYHY66A-Cmak8rUq.js → ko-KR-MTYHY66A-CuNG6PfQ.js} +1 -1
  66. package/dist/dashboard/assets/{ku-TR-6OUDTVRD-Dbz6ljVD.js → ku-TR-6OUDTVRD-DZNsnhP9.js} +1 -1
  67. package/dist/dashboard/assets/{layout-DMQli9Le.js → layout-CThyY_Dn.js} +1 -1
  68. package/dist/dashboard/assets/{linear-B6VVSyMW.js → linear-DBRj6V2K.js} +1 -1
  69. package/dist/dashboard/assets/{lt-LT-XHIRWOB4-CEmAxA9u.js → lt-LT-XHIRWOB4-B97DldtT.js} +1 -1
  70. package/dist/dashboard/assets/{lv-LV-5QDEKY6T-CJR-At7g.js → lv-LV-5QDEKY6T-yrPeKaL3.js} +1 -1
  71. package/dist/dashboard/assets/{min-CqkwiHUc.js → min-DHVsc_O1.js} +1 -1
  72. package/dist/dashboard/assets/{mindmap-definition-QFDTVHPH-bsYCrNtj.js → mindmap-definition-QFDTVHPH-ta1H_Vv6.js} +1 -1
  73. package/dist/dashboard/assets/{mr-IN-CRQNXWMA-P4spwjT8.js → mr-IN-CRQNXWMA-b3dApjRs.js} +1 -1
  74. package/dist/dashboard/assets/{my-MM-5M5IBNSE-a1rvArEV.js → my-MM-5M5IBNSE-BHIBHPam.js} +1 -1
  75. package/dist/dashboard/assets/{nb-NO-T6EIAALU-Dw_J2QCA.js → nb-NO-T6EIAALU-MhmUUkRf.js} +1 -1
  76. package/dist/dashboard/assets/{nl-NL-IS3SIHDZ-DyJZtP9s.js → nl-NL-IS3SIHDZ-lff3Vuu6.js} +1 -1
  77. package/dist/dashboard/assets/{nn-NO-6E72VCQL-4acyfJJj.js → nn-NO-6E72VCQL-DXvDarQa.js} +1 -1
  78. package/dist/dashboard/assets/{oc-FR-POXYY2M6-D8pDlGpO.js → oc-FR-POXYY2M6-Ckw3bKbR.js} +1 -1
  79. package/dist/dashboard/assets/{pa-IN-N4M65BXN-CUXWRM9Z.js → pa-IN-N4M65BXN-B2_S0arL.js} +1 -1
  80. package/dist/dashboard/assets/{percentages-BXMCSKIN-jDtw9CS_.js → percentages-BXMCSKIN-B3ROetXt.js} +7 -7
  81. package/dist/dashboard/assets/{pica-D2k8QhiT.js → pica-g7PUwtlw.js} +1 -1
  82. package/dist/dashboard/assets/{pieDiagram-DEJITSTG-BY5lDpxM.js → pieDiagram-DEJITSTG-CjThCCvb.js} +1 -1
  83. package/dist/dashboard/assets/{pl-PL-T2D74RX3-BTVl1PaU.js → pl-PL-T2D74RX3-DzkRcoZK.js} +1 -1
  84. package/dist/dashboard/assets/{pt-BR-5N22H2LF-CRV4c2FR.js → pt-BR-5N22H2LF-D41OxsmY.js} +1 -1
  85. package/dist/dashboard/assets/{pt-PT-UZXXM6DQ-Ciz73XBG.js → pt-PT-UZXXM6DQ-BuClZ87f.js} +1 -1
  86. package/dist/dashboard/assets/{quadrantDiagram-34T5L4WZ-CkCyPark.js → quadrantDiagram-34T5L4WZ-RD4818Y7.js} +1 -1
  87. package/dist/dashboard/assets/{requirementDiagram-MS252O5E-pkDzqMen.js → requirementDiagram-MS252O5E-CXJidhho.js} +1 -1
  88. package/dist/dashboard/assets/{ro-RO-JPDTUUEW-B5tB2ZMk.js → ro-RO-JPDTUUEW-DqTdk1yt.js} +1 -1
  89. package/dist/dashboard/assets/{ru-RU-B4JR7IUQ-CjaSKApe.js → ru-RU-B4JR7IUQ-V4DgtGOD.js} +1 -1
  90. package/dist/dashboard/assets/{sankeyDiagram-XADWPNL6-CrziMmSl.js → sankeyDiagram-XADWPNL6-C1sycfmk.js} +1 -1
  91. package/dist/dashboard/assets/{sequenceDiagram-FGHM5R23-D5zUE04i.js → sequenceDiagram-FGHM5R23-BsRhf00C.js} +1 -1
  92. package/dist/dashboard/assets/{si-LK-N5RQ5JYF-QK81fzaG.js → si-LK-N5RQ5JYF-BkjJVIKw.js} +1 -1
  93. package/dist/dashboard/assets/{sk-SK-C5VTKIMK-TANqzQvg.js → sk-SK-C5VTKIMK-CGyzVMuS.js} +1 -1
  94. package/dist/dashboard/assets/{sl-SI-NN7IZMDC-Dht86ddT.js → sl-SI-NN7IZMDC-B_v3LIOj.js} +1 -1
  95. package/dist/dashboard/assets/{stateDiagram-FHFEXIEX-CcR_Q14Z.js → stateDiagram-FHFEXIEX-AHgyeSSd.js} +1 -1
  96. package/dist/dashboard/assets/stateDiagram-v2-QKLJ7IA2-XVTOYBBV.js +1 -0
  97. package/dist/dashboard/assets/{subset-shared.chunk-NAGN_SBv.js → subset-shared.chunk-Ci_oaXw-.js} +1 -1
  98. package/dist/dashboard/assets/{subset-worker.chunk-wsRwU71V.js → subset-worker.chunk-CVvKFWGY.js} +1 -1
  99. package/dist/dashboard/assets/{sv-SE-XGPEYMSR-DidGUaol.js → sv-SE-XGPEYMSR-D5t6-bQC.js} +1 -1
  100. package/dist/dashboard/assets/{ta-IN-2NMHFXQM-YZmBodpj.js → ta-IN-2NMHFXQM-DEKtK_gX.js} +1 -1
  101. package/dist/dashboard/assets/{th-TH-HPSO5L25-CVvvXQFu.js → th-TH-HPSO5L25-DRcU9LZ2.js} +1 -1
  102. package/dist/dashboard/assets/{timeline-definition-GMOUNBTQ-B8I1QieK.js → timeline-definition-GMOUNBTQ-PBxzQfC2.js} +1 -1
  103. package/dist/dashboard/assets/{tr-TR-DEFEU3FU-DjyXDfoR.js → tr-TR-DEFEU3FU-CBguuduX.js} +1 -1
  104. package/dist/dashboard/assets/{uk-UA-QMV73CPH-1pRnjZIi.js → uk-UA-QMV73CPH-i0PRyM7M.js} +1 -1
  105. package/dist/dashboard/assets/{vennDiagram-DHZGUBPP-BsBRDs0e.js → vennDiagram-DHZGUBPP-YAtaCt6v.js} +1 -1
  106. package/dist/dashboard/assets/{vi-VN-M7AON7JQ-CualwmWX.js → vi-VN-M7AON7JQ-NwV9F7AH.js} +1 -1
  107. package/dist/dashboard/assets/{wardley-RL74JXVD-BP4Ewc0H.js → wardley-RL74JXVD-fgxrOw2v.js} +1 -1
  108. package/dist/dashboard/assets/{wardleyDiagram-NUSXRM2D-B_WTb-rg.js → wardleyDiagram-NUSXRM2D-Dpq96Mxt.js} +1 -1
  109. package/dist/dashboard/assets/{xychartDiagram-5P7HB3ND-vB-uMt25.js → xychartDiagram-5P7HB3ND-DiPx1Q_d.js} +1 -1
  110. package/dist/dashboard/assets/{zh-CN-LNUGB5OW-CQjWtZ9Y.js → zh-CN-LNUGB5OW-DkOI6Dmv.js} +1 -1
  111. package/dist/dashboard/assets/{zh-HK-E62DVLB3-DzC49dFs.js → zh-HK-E62DVLB3-lIsB7f8U.js} +1 -1
  112. package/dist/dashboard/assets/{zh-TW-RAJ6MFWO-C4KJuhZE.js → zh-TW-RAJ6MFWO-DbxNlWLc.js} +1 -1
  113. package/dist/dashboard/index.html +2 -2
  114. package/dist/index.js +2770 -2539
  115. package/package.json +1 -1
  116. package/skill/SKILL.md +6 -4
  117. package/skill/references/brain-sync.md +39 -51
  118. package/skill/references/cli-reference.md +18 -6
  119. package/skill/references/integrations.md +21 -31
  120. package/skill-deep-research/SKILL.md +1 -0
  121. package/skill-sync/SKILL.md +2 -3
  122. package/skill-sync/references/merge-rules.md +33 -37
  123. package/dist/dashboard/assets/channel-CqCT8-qB.js +0 -1
  124. package/dist/dashboard/assets/classDiagram-6PBFFD2Q-C9WQPvu9.js +0 -1
  125. package/dist/dashboard/assets/classDiagram-v2-HSJHXN6E-C9WQPvu9.js +0 -1
  126. package/dist/dashboard/assets/clone-B0kf3g9o.js +0 -1
  127. package/dist/dashboard/assets/stateDiagram-v2-QKLJ7IA2-DIVPLDRd.js +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dreamcontext",
3
- "version": "0.14.2",
3
+ "version": "0.16.0",
4
4
  "description": "dreamcontext — the persistent brain for your AI agents. Remembers what you built, knows how your project works.",
5
5
  "type": "module",
6
6
  "bin": {
package/skill/SKILL.md CHANGED
@@ -91,7 +91,8 @@ 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 (shared repo)** | **Yes — a team OR one person across machines can share ONE brain.** The brain is git-synced to a GitHub remote in one of **three modes** `separate` (brain in its own repo), `full-repo` (whole project its `origin`), `in-tree` (commit-only default). `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) |
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
+ | **Linked repos** | One brain governs **bare code repos** (products in their own GitHub repos, no `_dream_context/`): the shared `{name,url}` travels with the team; a machine-local `url→path` registry (`~/.dreamcontext/linked-repos.json`, never synced) resolves each on THIS machine. `dreamcontext link add\|clone\|ls\|rm`, a session-start present/missing glance, a trust-gated clone, a dashboard panel. A **pointer to code, not a sync**. | [cli-reference.md](references/cli-reference.md) |
95
96
  | **Council** | Structured multi-persona debates with a synthesized verdict | [integrations.md](references/integrations.md) |
96
97
  | **Marketing (`mk`)** | Meta marketing skill: cohorts, campaigns, competitor ingest | [integrations.md](references/integrations.md) |
97
98
  | **Versions / releases** | Planning versions and releases unify in RELEASES.json | [tasks-and-features.md](references/tasks-and-features.md) |
@@ -364,7 +365,7 @@ All sub-agents get a lightweight context briefing via the SubagentStart hook. Wh
364
365
  - `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
366
  - `dreamcontext doctor` — validate `_dream_context/` structure.
366
367
  - `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", "put the brain in its own repo", "sync my brain to GitHub", "set it up on my other machine"), that's the **shared brain repo**: `dreamcontext brain init` (create) / `brain attach <url>` (join) / `brain status`, auto-synced at `sleep done`, prose conflicts resolved by the **`/dream-sync`** skill. **Guide them into it — don't say "unsupported".** Three modes (separate / full-repo / in-tree), per-machine token, and cross-OS setup → [brain-sync.md](references/brain-sync.md).
368
+ - **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
369
 
369
370
  ---
370
371
 
@@ -399,7 +400,8 @@ _dream_context/
399
400
  │ └── task.md ← OPTIONAL: project task template + custom_fields schema (briefed to agents)
400
401
  ├── state/
401
402
  │ ├── <task>.md ← Active tasks (frontmatter may include product:, start_date, due_date, custom_fields)
402
- │ ├── .config.json ← platforms, packs, multiProduct, taskBackend, people…
403
+ │ ├── .config.json ← platforms, packs, multiProduct, taskBackend, people, linkedRepos
404
+ │ │ (linked-repo LOCAL paths live in ~/.dreamcontext/linked-repos.json, never synced)
403
405
  │ ├── .active-version.json ← current sprint (active planning version)
404
406
  │ ├── .sleep.json .secrets.json (gitignored) .active-task
405
407
  ```
@@ -414,6 +416,6 @@ Open these with `Read` when the task needs depth:
414
416
  - **[tasks-and-features.md](references/tasks-and-features.md)** — task protocol depth, RICE, due dates, people/assignees, Workflow flowchart, features, versioning, multi-product.
415
417
  - **[knowledge-and-recall.md](references/knowledge-and-recall.md)** — knowledge files, pinning, recall modes, taxonomy, Excalidraw/diagrams.
416
418
  - **[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)** — **shared brain repo / GitHub cloud sync**: the three modes (separate/full-repo/in-tree), setup, per-machine token + auth, shared vs machine-local config, lifecycle, **cross-OS setup**, and the silent-failure troubleshooting playbook.
419
+ - **[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
420
  - **[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
421
  - **[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 brain)
1
+ # Brain sync (GitHub cloud sync for the whole project)
2
2
 
3
- The one reference for the **shared brain repo** — what it is, the three 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.
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), and from **linked repos** (pointers to the bare code repos a brain governs — name+URL shared with the team, the local path machine-only; linking never clones, pushes, or pulls the target). 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," "put the brain in its own repo," "sync my brain to GitHub."* Do NOT answer "we don't support that" — this is the feature.
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 (`_dream_context/`) is mirrored to a **GitHub remote** 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.
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 three sync modes
13
+ ## The two sync modes
14
14
 
15
- Mode lives in `_dream_context/state/.config.json` under `brainRepo.mode`. **Anything not `separate`/`full-repo` resolves to `in-tree`.**
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
- | **`separate`** | `_dream_context/` (the brain is its OWN repo) | a dedicated brain repo (`brainRepo.remote`) | always `main` | the **contents of `_dream_context/`** at the repo root (core/, knowledge/, state/…) | **Yes** |
20
- | **`full-repo`** | the **project root** (whole project is the repo) | the project's own `origin` | the **current** branch (never assumes `main`) | the **entire project** code + `_dream_context/` nested inside it | **Yes** |
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
- - **`separate`** is the classic "team shares one brain repo, separate from the code repo." Created by `brain init` / joined by `brain attach`.
24
- - **`full-repo`** makes the whole project folder the synced repo (brain nested under `_dream_context/`, plus root `CLAUDE.md` / `.claude/` if present). 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`.
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
- **Switching modes:** there is **no `brain scope` / `brain mode` CLI command.** Switching to/from `full-repo` is done from the **dashboard** (Settings → Brain → Sync scope; server route `POST /api/brain/scope`). `full-repo` requires the project to already have a GitHub `origin` (it errors `no_origin` otherwise). To go the other way it becomes `separate` if a brain remote exists, else `in-tree`. `brain init` produces `separate`; a project with no brain config is `in-tree`.
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 — init/attach and every push need it (see Auth for scope + resolution order).
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
- # Create a brand-new shared brain repo (PRIVATE by default), scrubbed first push → separate mode
36
- dreamcontext brain init --owner <you-or-org> --name <repo> # --code-repo <url> pins the paired code repo
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
- # OR join an existing brain repo (a TRUST decision it loads into every session)
39
- dreamcontext brain discover # list repos tagged `dreamcontext-brain` you can access
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
- `brain init` creates the GitHub repo through the API with the **same resolved token**, so set the token (or be logged into dreamcontext for the global store) *before* `init`/`attach`. (PowerShell/cmd have no `$(…)` — use `dreamcontext config github-token <token>` or set `GITHUB_TOKEN`.)
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
- Carry the Claude Code layer with the brain so a fresh clone is ready to use:
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):** brain sync **pushes repo contents**, so the token needs classic **`repo`** scope, or a fine-grained PAT with **Contents: read & write** (add **Administration: read & write** on the owner if you'll `brain init` to *create* the 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 brain push**. When in doubt, use a classic `repo` token or a fine-grained PAT that includes Contents:write.
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 whole `brainRepo` block: **`mode`, `enabled`, `remote`, `autoSync`**. Consequence: **an explicit `mode` or `enabled` propagates to everyone** on the next sync — they are a *shared* decision, not per-machine. (This is deliberate: one remote can only have one structure, so all machines must agree on the mode.)
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`, OR `brainRepo.remote` is set), else OFF. So the *default* is per-machine; an *explicit* toggle is global.
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 `separate`/`full-repo` + `autoSync`; honors `DREAMCONTEXT_BRAIN_SYNC=0`). Its results land on the **NEXT** session (you see the previous pull's `pulledUpdates`).
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(brain): sync` (separate/in-tree), `chore: sync project (dreamcontext)` (full-repo), `chore(brain): merge team updates` (auto-merge), `… (agent-resolved)` (after `/dream-sync`).
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. In `full-repo`, 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).
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 brain 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.**
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 brain folder must be its OWN git root (the enclosing-repo trap).** In `separate` mode the repo root must be `_dream_context/`; in `full-repo` it must be the project folder. Verify: `git -C <that folder> rev-parse --show-toplevel` should print *that* folder — **not climb into an enclosing parent repo** (e.g. a home-directory `~/.git` or a wrapping code repo). dreamcontext guards this at `init`/`attach`/disconnect, but the per-sync path only checks "is a git repo," so a misplaced enclosing `.git` can hijack resolution. If sync targets the wrong tree, hunt for a parent `.git` above the folder and remove its stray `origin`.
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 brain 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.
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
- - **Windows symlinks (separate mode).** `brain platform` shares CLAUDE.md/.claude by **symlinking** them from the project root, and every `brain sync` re-creates missing links. On Windows, creating symlinks normally needs **Developer Mode enabled or an elevated shell** otherwise `brain platform` fails. On a Windows brain, prefer **`full-repo` mode**, where root files sync natively and no symlinks are involved.
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
- | `brain platform` symlinks | native | native | **need Developer Mode / elevated shell** or use `full-repo` (root files sync natively) |
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), symlink privilege (step 3), and `core.autocrlf` (step 6) all differ.
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 <brain-or-project-url>` (or `dreamcontext brain attach <url>` in an existing checkout).
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 platform` — re-create root `CLAUDE.md` / `.claude/` symlinks (separate mode; Windows needs Developer Mode/elevation, or use `full-repo` mode).
113
- 4. `dreamcontext brain status` — confirm mode, remote, cloud-sync ON, right git root.
114
- 5. `dreamcontext brain sync --pull-only` take the latest, verify a clean pull.
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. **`full-repo` on a detached HEAD** → `detached-head` refusal. Check out a branch.
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 (10 subcommands)
117
+ ## `brain` command surface (5 subcommands)
130
118
 
131
- `status`, `enable`, `disable`, `init`, `attach`, `discover`, `platform`, `scrub`, `sync`, `detach`. (`sync` flags: `--pull-only`, `--push-only`, `--strict`, `--continue`, `--resume` — the last two are attended-only; never drive them unattended.) 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`.
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,19 +214,31 @@ Sync the WHOLE brain (`_dream_context/`) — tasks, knowledge, features, sleep s
214
214
 
215
215
  | Command | Description |
216
216
  |---|---|
217
- | `brain status` | Show brain-repo mode (`separate`/`in-tree`), remote, sync state, and whether cloud sync is ON. Reports `mergeInProgress` / `pendingAgentMerge` (the `/dream-sync` handoff signals). |
218
- | `brain init` | Create a NEW brain repo on GitHub (**private by default**) and push a scrubbed first commit. `--public` (requires interactive confirm), `--code-repo <url>` (store a pointer to the paired code repo). |
219
- | `brain attach <url>` | Attach an EXISTING team brain repo a **TRUST decision** (S6): prints a trust warning + incoming-diff preview and refuses without confirmation. `-y/--yes` to skip the prompt. |
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 OFFrevert 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.
227
224
 
228
225
  ---
229
226
 
227
+ ## Linked repos — the bare code repos a brain governs (see [brain-sync.md](brain-sync.md))
228
+
229
+ One shared brain can point at the **bare code repos it governs** — products/services in their own GitHub repos, cloned at different local paths on each machine (or absent on some), with **no `_dream_context/` of their own**. Distinct from **brain sync** (syncs the whole project) and **federation** (read-only recall across *brains*): linked repos are **pointers to code, not a sync** — linking never clones, pushes, pulls, or commits the target. Two layers: the **shared** half (`{name, gitRemoteUrl}` in `.config.json`) travels to the team so everyone knows the repo exists; the **machine-local** half (`~/.dreamcontext/linked-repos.json`, keyed by canonical URL → local path) records where it lives on *this* machine and **never leaves it**. GitHub-only for now.
230
+
231
+ | Command | Description |
232
+ |---|---|
233
+ | `link add <name> <path>` | Register a local checkout the brain governs. Derives the canonical GitHub URL from the repo's `origin` (or pass `--url`); writes `{name,url}` to `.config.json` + `url→path` to the machine-local registry. Requires `path` to be a git repo whose `origin` matches — **no fetch/clone happens**. |
234
+ | `link ls` (alias: `links`) | List governed repos: ✓ present (resolved local path) / ✗ missing on this machine. `--json`. |
235
+ | `link clone <name>` | Clone a **missing** repo from its shared URL to this machine — a normal one-way `git clone`, behind a **trust-gate** (the URL is team-writable). `--dir <dir>`, `--yes`. |
236
+ | `link rm <name>` (alias: `unlink`) | Drop the repo from `.config.json`; the machine-local `url→path` mapping is intentionally **left** (re-link stays instant; other brains keep resolving it). |
237
+
238
+ The SessionStart snapshot shows a cheap **Linked repos** glance (present → the resolved path is handed to the agent so it can Grep/Read the governed code; missing → a `link clone` hint). Fully manageable from the dashboard (Settings → Cloud sync → **Linked repos**; desktop-gated, native folder picker).
239
+
240
+ ---
241
+
230
242
  ## Council (see [integrations.md](integrations.md))
231
243
 
232
244
  `council create`, `council agent create`, `council round start\|end`, `council synthesize`, `council complete`, `council promote`, `council list`, `council show`. Plus sub-agent helpers (`round-context`, `report append`, `summaries`, `research add\|list`).
@@ -214,59 +214,49 @@ dreamcontext federation purge --dry-run # preview
214
214
 
215
215
  ---
216
216
 
217
- ## ✅ Team brain sync (shared brain repo) — collaborate on ONE brain
217
+ ## ✅ Team brain sync (whole project) — collaborate on ONE brain
218
218
 
219
- **Yes, a team can share a single dreamcontext brain.** The whole `_dream_context/` (tasks, knowledge, features, sleep state) becomes **its own git repo** with its own remote separate from the code repo 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.
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," "put the brain in its own repo,"* or *"set it up on my other machine."* Do NOT answer "we don't support that" — this is the feature.
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 three modes (separate / 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.
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
- - **Shared brain repo (this)** — the *whole* brain is one git-synced artifact several people edit together.
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 (M1 — CLI, shipped today)
230
+ ### Onboarding a team
231
231
 
232
232
  ```bash
233
- # Person Acreate a brand-new shared brain repo (PRIVATE by default) and push a scrubbed first commit
234
- dreamcontext brain init --code-repo https://github.com/acme/app # pointer back to the paired code repo
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
- # Person B (and every teammate / each new machine) attach the existing brain repo (a TRUST decision: it loads every session)
237
- dreamcontext brain discover # list dreamcontext-brain-topic repos you can access
238
- dreamcontext brain attach https://github.com/acme/app-brain # trust warning + diff preview, then confirm
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 config github-token "$(gh auth token)" # per-MACHINE token — the token is gitignored, never travels with the repo
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 brain (sync failure never fails sleep). **Session start** does a non-blocking background pull. So teammates' consolidated context reaches everyone without a manual step.
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:** `separate` (brain in its own remote, full auto-sync) · `full-repo` (whole project → its own `origin`, on the current branch switch from the dashboard: Settings → Brain → Sync scope) · `in-tree` (commit-only, **never** auto-pushes; the safe default). All run the scrub gate. Full detail + cross-OS setup → [brain-sync.md](brain-sync.md).
265
- - **Safety rails (always on):** brain repos default **private** (`--public` needs an explicit confirm); a **scrub gate** blocks secrets / absolute local paths before every commit and push; tokens are supplied via `GIT_ASKPASS` (never embedded in the remote URL); per-machine indexes/caches are gitignored and never pushed.
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? — M2, PENDING (not yet shipped)
257
+ ### From the desktop app
268
258
 
269
- The one-click UX — **GitHub device-flow login from the Launcher, a repo picker over your `dreamcontext-brain`-topic repos, UI "create"/"attach" with the trust preview, and a team-updates badge** is **M2, still pending**. Today the shared-brain setup is **CLI-only** (a technical user runs `brain init` / `brain attach`). Be honest about this: a non-technical teammate can't yet do the *setup* from the app; once attached, the normal dashboard/app reads the shared brain like any other. (Full status: `knowledge/features/brain-repo-sync.md`; merge internals: `skill-sync/references/merge-rules.md`.)
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
 
@@ -89,6 +89,7 @@ the planner and the synthesizer.
89
89
  - current vault only → recall as-is (already spans eligible peers by default),
90
90
  - specific peers → `--vault <name>` (repeatable),
91
91
  - everything readable → `--connected` (out/both peers) or `--all-vaults`.
92
+ - If the brain **governs linked code repos** (`dreamcontext links` → resolved local paths for the bare product repos it points at, no `_dream_context/` of their own), those checkouts are part of the substrate too: a fan-out searcher can Grep/Read a governed product's *code* directly when a claim depends on the implementation, not just the docs. Missing (✗) linked repos aren't on this machine — note the gap rather than guessing.
92
93
  - **Seed with recall, in JSON, scoped by type:**
93
94
  ```bash
94
95
  dreamcontext memory recall "<facet>" --json --top 15 --types knowledge,feature,task,memory,changelog,objective --connected
@@ -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>` inside the brain repo (in `separate` mode, the brain repo root
70
- IS `_dream_context/`; in `in-tree` mode, it's the code repo root and `path` already carries the
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
- - **`separate`** — the brain (`_dream_context/`) lives in its own git repo + remote. Full
9
- auto-sync: fetch merge commit push. Opt-in (`dreamcontext brain init`/`attach`).
10
- - **`in-tree`** the brain is nested inside the code repo (the default for every existing
11
- project). **Commit-only — NEVER auto-pushes** (a push here would push the code repo). The scrub
12
- gate still runs before every in-tree commitan in-tree commit lands in the code repo's history
13
- and can be pushed to a public OSS remote by the user's own normal `git push`.
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'`, OR a
19
- `brainRepo.remote` is configured) — **OFF** otherwise (new/unconnected projects stay off until the
20
- user runs `dreamcontext brain enable` or flips the Settings toggle). When OFF: `sleep done` skips
21
- the whole block with one dim line, the session-start pull is never spawned, and `brain sync`
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 — the brain repo's own `.gitignore`
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
- A separate-mode brain repo is rooted at `_dream_context/`, so the Claude Code project files at
45
- the PROJECT root would never sync. `dreamcontext brain platform` migrates them: the real files
46
- move to `_dream_context/platform/{CLAUDE.md,.claude}` and the project root keeps relative
47
- symlinks into it (Claude Code resolves them transparently). On every `runBrainSync` the engine
48
- best-effort re-creates missing root symlinks (`healPlatformLinks`), so a fresh clone of the brain
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 brain content commit: in-tree, separate, `brain init`'s first commit, `brain
78
- detach`, and after every merge (a merge can reintroduce a secret).
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 (separate mode only — in-tree bypasses this entirely, see §1) checks, in
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 (M2 — appendix)
211
+ ## 15. Manual UI checklist (dashboard — appendix)
216
212
 
217
- When M2 (launcher/dashboard) ships, verify by hand: device-flow login (shows `user_code`, opens
218
- `verification_uri`) AND the PAT-paste fallback, both with the scope disclosure visible; `Discover`
219
- lists only `dreamcontext-brain`-topic repos; `Create` defaults private (public requires a
220
- confirmed toggle); `Attach` shows the trust warning + incoming diff preview and refuses without
221
- confirmation; the team-updates badge shows N after a teammate pushes, driven by a background fetch
222
- (the badge endpoint itself makes no network call in the request path).
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 separate/in-tree contract:
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};