dreamcontext 0.8.7 → 0.9.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 +31 -7
- package/agents/curator-auditor.md +114 -0
- package/agents/curator-verifier.md +86 -0
- package/agents/curator-worker.md +81 -0
- package/agents/dreamcontext-explore.md +7 -3
- package/agents/initializer-ingestor.md +84 -0
- package/agents/initializer-scout.md +87 -0
- package/agents/initializer-verifier.md +75 -0
- package/agents/sleep-migration.md +18 -10
- package/agents/sleep-product.md +7 -7
- package/agents/sleep-state.md +3 -3
- package/agents/sleep-tasks.md +4 -3
- package/dist/agents/curator-auditor.md +114 -0
- package/dist/agents/curator-verifier.md +86 -0
- package/dist/agents/curator-worker.md +81 -0
- package/dist/agents/dreamcontext-explore.md +7 -3
- package/dist/agents/initializer-ingestor.md +84 -0
- package/dist/agents/initializer-scout.md +87 -0
- package/dist/agents/initializer-verifier.md +75 -0
- package/dist/agents/sleep-migration.md +18 -10
- package/dist/agents/sleep-product.md +7 -7
- package/dist/agents/sleep-state.md +3 -3
- package/dist/agents/sleep-tasks.md +4 -3
- package/dist/dashboard/assets/{BrainCanvas3D-CyuMh6vC.js → BrainCanvas3D-hy-bJKIJ.js} +1 -1
- package/dist/dashboard/assets/{_baseUniq-TeXEp9Tn.js → _baseUniq-DduL-UlQ.js} +1 -1
- package/dist/dashboard/assets/{ar-SA-G6X2FPQ2-Da5wNUeW.js → ar-SA-G6X2FPQ2-CrmB7xfA.js} +1 -1
- package/dist/dashboard/assets/{arc-NQuoeYrp.js → arc-sHUGY_nD.js} +1 -1
- package/dist/dashboard/assets/{architectureDiagram-Q4EWVU46-B108azq_.js → architectureDiagram-Q4EWVU46-DgYle1Hc.js} +1 -1
- package/dist/dashboard/assets/{az-AZ-76LH7QW2-cJYSsraO.js → az-AZ-76LH7QW2-xoplM1zS.js} +1 -1
- package/dist/dashboard/assets/{bg-BG-XCXSNQG7-Dt4_IvAk.js → bg-BG-XCXSNQG7-BF4iIrZQ.js} +1 -1
- package/dist/dashboard/assets/{blockDiagram-DXYQGD6D-HAo6Tqxd.js → blockDiagram-DXYQGD6D-YPBR1t-F.js} +1 -1
- package/dist/dashboard/assets/{bn-BD-2XOGV67Q-DE20hZpG.js → bn-BD-2XOGV67Q-KGLt7gMU.js} +1 -1
- package/dist/dashboard/assets/{c4Diagram-AHTNJAMY-SHRA5Nk_.js → c4Diagram-AHTNJAMY-B1KEuF7Q.js} +1 -1
- package/dist/dashboard/assets/{ca-ES-6MX7JW3Y-9ZUzuDs-.js → ca-ES-6MX7JW3Y-BYuoubhq.js} +1 -1
- package/dist/dashboard/assets/channel-BvyIgIvU.js +1 -0
- package/dist/dashboard/assets/{chunk-4BX2VUAB-BlLy4y9z.js → chunk-4BX2VUAB-BALrhoW_.js} +1 -1
- package/dist/dashboard/assets/{chunk-4TB4RGXK-cDLog-pk.js → chunk-4TB4RGXK-8uLOmmU8.js} +1 -1
- package/dist/dashboard/assets/{chunk-55IACEB6-BfLlL9Jv.js → chunk-55IACEB6-D2hViX7K.js} +1 -1
- package/dist/dashboard/assets/{chunk-EDXVE4YY-BjKTlHye.js → chunk-EDXVE4YY-C9foqo-F.js} +1 -1
- package/dist/dashboard/assets/{chunk-FMBD7UC4-CoMoOB69.js → chunk-FMBD7UC4-D1G0o3Ow.js} +1 -1
- package/dist/dashboard/assets/{chunk-OYMX7WX6-DSYZ4BzO.js → chunk-OYMX7WX6-CiVziVyS.js} +1 -1
- package/dist/dashboard/assets/{chunk-QZHKN3VN-hsCUyt37.js → chunk-QZHKN3VN-DE5GBsSY.js} +1 -1
- package/dist/dashboard/assets/{chunk-YZCP3GAM-CMBEUThQ.js → chunk-YZCP3GAM-BpQQIx3b.js} +1 -1
- package/dist/dashboard/assets/classDiagram-6PBFFD2Q-B2f-mNIc.js +1 -0
- package/dist/dashboard/assets/classDiagram-v2-HSJHXN6E-B2f-mNIc.js +1 -0
- package/dist/dashboard/assets/clone-BOZwMwp7.js +1 -0
- package/dist/dashboard/assets/{cose-bilkent-S5V4N54A-Ds3A4r-y.js → cose-bilkent-S5V4N54A-KvwZaKE7.js} +1 -1
- package/dist/dashboard/assets/{cs-CZ-2BRQDIVT-WgNPbRaT.js → cs-CZ-2BRQDIVT-xYBULEJ9.js} +1 -1
- package/dist/dashboard/assets/{da-DK-5WZEPLOC-BQPVoqBy.js → da-DK-5WZEPLOC-DF2tyJRb.js} +1 -1
- package/dist/dashboard/assets/{dagre-KV5264BT-D3AamC0s.js → dagre-KV5264BT-Du_qjhF2.js} +1 -1
- package/dist/dashboard/assets/{de-DE-XR44H4JA-FOMlLeg-.js → de-DE-XR44H4JA-DlmZt5e9.js} +1 -1
- package/dist/dashboard/assets/{diagram-5BDNPKRD-DeAuY_LW.js → diagram-5BDNPKRD-D7slatQr.js} +1 -1
- package/dist/dashboard/assets/{diagram-G4DWMVQ6-CsPuBl6m.js → diagram-G4DWMVQ6-DiCZYy5B.js} +1 -1
- package/dist/dashboard/assets/{diagram-MMDJMWI5-Celrp7iZ.js → diagram-MMDJMWI5-BxckEUHv.js} +1 -1
- package/dist/dashboard/assets/{diagram-TYMM5635-D-Y8kdqj.js → diagram-TYMM5635-BGh7adH7.js} +1 -1
- package/dist/dashboard/assets/{el-GR-BZB4AONW-DdhrZvUu.js → el-GR-BZB4AONW-3_nYTnDJ.js} +1 -1
- package/dist/dashboard/assets/{erDiagram-SMLLAGMA-CyPB81Ul.js → erDiagram-SMLLAGMA-Bgu7PR3l.js} +1 -1
- package/dist/dashboard/assets/{es-ES-U4NZUMDT-B-Hbpc6c.js → es-ES-U4NZUMDT-Blp-jVT8.js} +1 -1
- package/dist/dashboard/assets/{eu-ES-A7QVB2H4-CIeXN6PD.js → eu-ES-A7QVB2H4-DksJfC54.js} +1 -1
- package/dist/dashboard/assets/{fa-IR-HGAKTJCU-BojqXzkR.js → fa-IR-HGAKTJCU-DgwscI8H.js} +1 -1
- package/dist/dashboard/assets/{fi-FI-Z5N7JZ37-Dix2X0V9.js → fi-FI-Z5N7JZ37-D5xWl1j1.js} +1 -1
- package/dist/dashboard/assets/{flowDiagram-DWJPFMVM-D7IX0DxI.js → flowDiagram-DWJPFMVM-DRYxEOwt.js} +1 -1
- package/dist/dashboard/assets/{fr-FR-RHASNOE6-B-jqOA6L.js → fr-FR-RHASNOE6-C5ic6hfW.js} +1 -1
- package/dist/dashboard/assets/{ganttDiagram-T4ZO3ILL-CbK6p7_G.js → ganttDiagram-T4ZO3ILL-CNf0-tRS.js} +1 -1
- package/dist/dashboard/assets/{gitGraphDiagram-UUTBAWPF-DWDwNpLK.js → gitGraphDiagram-UUTBAWPF-B-fWXvro.js} +1 -1
- package/dist/dashboard/assets/{gl-ES-HMX3MZ6V-B6zmZpsw.js → gl-ES-HMX3MZ6V-CYsGLfzn.js} +1 -1
- package/dist/dashboard/assets/{graph-CrDZc6w0.js → graph-CqM3kXVs.js} +1 -1
- package/dist/dashboard/assets/{he-IL-6SHJWFNN-CaSPpOxb.js → he-IL-6SHJWFNN-DZp7dZBD.js} +1 -1
- package/dist/dashboard/assets/{hi-IN-IWLTKZ5I-n86mXoF4.js → hi-IN-IWLTKZ5I-DZ-8BLt8.js} +1 -1
- package/dist/dashboard/assets/{hu-HU-A5ZG7DT2-MqIG43UE.js → hu-HU-A5ZG7DT2-cIzehzha.js} +1 -1
- package/dist/dashboard/assets/{id-ID-SAP4L64H-DbrGiOFJ.js → id-ID-SAP4L64H-CHmT4Y6G.js} +1 -1
- package/dist/dashboard/assets/index-B_cYqPxr.js +482 -0
- package/dist/dashboard/assets/{index-zJ2-S49k.js → index-WuRpIREk.js} +1 -1
- package/dist/dashboard/assets/{infoDiagram-42DDH7IO-CpAQyAyt.js → infoDiagram-42DDH7IO-zeTnmz1D.js} +1 -1
- package/dist/dashboard/assets/{ishikawaDiagram-UXIWVN3A-DXIwINgb.js → ishikawaDiagram-UXIWVN3A-Bb756K5U.js} +1 -1
- package/dist/dashboard/assets/{it-IT-JPQ66NNP-IX1Td9Wl.js → it-IT-JPQ66NNP-D6lXGD0z.js} +1 -1
- package/dist/dashboard/assets/{ja-JP-DBVTYXUO-Bd8nX8VR.js → ja-JP-DBVTYXUO-DyuGqonM.js} +1 -1
- package/dist/dashboard/assets/{journeyDiagram-VCZTEJTY-DZlgujgy.js → journeyDiagram-VCZTEJTY-DFWvXLzk.js} +1 -1
- package/dist/dashboard/assets/{kaa-6HZHGXH3-D5xD9fsf.js → kaa-6HZHGXH3-oNCeqt-A.js} +1 -1
- package/dist/dashboard/assets/{kab-KAB-ZGHBKWFO-xBaAbT-9.js → kab-KAB-ZGHBKWFO-DfP6kptf.js} +1 -1
- package/dist/dashboard/assets/{kanban-definition-6JOO6SKY-0klC865z.js → kanban-definition-6JOO6SKY-DhKLuu7C.js} +1 -1
- package/dist/dashboard/assets/{kk-KZ-P5N5QNE5-CboXRRre.js → kk-KZ-P5N5QNE5-B63w7yii.js} +1 -1
- package/dist/dashboard/assets/{km-KH-HSX4SM5Z-Clsilmtp.js → km-KH-HSX4SM5Z-C8nYbGAM.js} +1 -1
- package/dist/dashboard/assets/{ko-KR-MTYHY66A-CIjzZcRO.js → ko-KR-MTYHY66A-D3wzPaIE.js} +1 -1
- package/dist/dashboard/assets/{ku-TR-6OUDTVRD-Bs1RU4e9.js → ku-TR-6OUDTVRD-C59UaChS.js} +1 -1
- package/dist/dashboard/assets/{layout-fipBctpD.js → layout-CtFtUFag.js} +1 -1
- package/dist/dashboard/assets/{linear-DVXXJr0u.js → linear-DubzSxx7.js} +1 -1
- package/dist/dashboard/assets/{lt-LT-XHIRWOB4-CQ-xLU_o.js → lt-LT-XHIRWOB4-C_buJu91.js} +1 -1
- package/dist/dashboard/assets/{lv-LV-5QDEKY6T-C0inT4d9.js → lv-LV-5QDEKY6T-BhQWVAR-.js} +1 -1
- package/dist/dashboard/assets/{min-B_cNy5kS.js → min-DcWdHBie.js} +1 -1
- package/dist/dashboard/assets/{mindmap-definition-QFDTVHPH-Cioz1NOY.js → mindmap-definition-QFDTVHPH-BSWtNXnF.js} +1 -1
- package/dist/dashboard/assets/{mr-IN-CRQNXWMA-DhEHYUYK.js → mr-IN-CRQNXWMA-DEac6VeJ.js} +1 -1
- package/dist/dashboard/assets/{my-MM-5M5IBNSE-Dj4Iwdrf.js → my-MM-5M5IBNSE-DcSFgD6q.js} +1 -1
- package/dist/dashboard/assets/{nb-NO-T6EIAALU-CvAPy7iN.js → nb-NO-T6EIAALU-CMd5OV1y.js} +1 -1
- package/dist/dashboard/assets/{nl-NL-IS3SIHDZ-DgQc3gPO.js → nl-NL-IS3SIHDZ-CX2kfxhY.js} +1 -1
- package/dist/dashboard/assets/{nn-NO-6E72VCQL-DORPUv8K.js → nn-NO-6E72VCQL-MpSm1-uc.js} +1 -1
- package/dist/dashboard/assets/{oc-FR-POXYY2M6-Cym9O8Me.js → oc-FR-POXYY2M6-Nso9HjoJ.js} +1 -1
- package/dist/dashboard/assets/{pa-IN-N4M65BXN-BiE5SCOy.js → pa-IN-N4M65BXN-Bc_09DWN.js} +1 -1
- package/dist/dashboard/assets/{percentages-BXMCSKIN-B-_e8Y6s.js → percentages-BXMCSKIN-DP6uG13u.js} +7 -7
- package/dist/dashboard/assets/{pica-C5ISA_oR.js → pica-CMpqUhac.js} +1 -1
- package/dist/dashboard/assets/{pieDiagram-DEJITSTG-CD7iu1Mo.js → pieDiagram-DEJITSTG-BNsvSiV8.js} +1 -1
- package/dist/dashboard/assets/{pl-PL-T2D74RX3-C-29ZIfD.js → pl-PL-T2D74RX3-CJWz-KGN.js} +1 -1
- package/dist/dashboard/assets/{pt-BR-5N22H2LF-CIQq615m.js → pt-BR-5N22H2LF-DHX3cV6G.js} +1 -1
- package/dist/dashboard/assets/{pt-PT-UZXXM6DQ-CN7xbXrH.js → pt-PT-UZXXM6DQ-CU_RnGju.js} +1 -1
- package/dist/dashboard/assets/{quadrantDiagram-34T5L4WZ-DEPkZ_lv.js → quadrantDiagram-34T5L4WZ-CnG8TUp0.js} +1 -1
- package/dist/dashboard/assets/{requirementDiagram-MS252O5E-BpAjr03x.js → requirementDiagram-MS252O5E-CVzV4vf5.js} +1 -1
- package/dist/dashboard/assets/{ro-RO-JPDTUUEW-DBtenXzw.js → ro-RO-JPDTUUEW-aYl76VP7.js} +1 -1
- package/dist/dashboard/assets/{ru-RU-B4JR7IUQ-CA_iHOeh.js → ru-RU-B4JR7IUQ-B_y9bRe1.js} +1 -1
- package/dist/dashboard/assets/{sankeyDiagram-XADWPNL6-B1zLPVle.js → sankeyDiagram-XADWPNL6-CZLhklJg.js} +1 -1
- package/dist/dashboard/assets/{sequenceDiagram-FGHM5R23-pEX8i9B5.js → sequenceDiagram-FGHM5R23-DjCIzK1N.js} +1 -1
- package/dist/dashboard/assets/{si-LK-N5RQ5JYF-BTsFn4Rn.js → si-LK-N5RQ5JYF-DYVfARgr.js} +1 -1
- package/dist/dashboard/assets/{sk-SK-C5VTKIMK-DGoN-I5B.js → sk-SK-C5VTKIMK-B6Mg_bJ9.js} +1 -1
- package/dist/dashboard/assets/{sl-SI-NN7IZMDC-CwiRr92B.js → sl-SI-NN7IZMDC-Ck2a-g0A.js} +1 -1
- package/dist/dashboard/assets/{stateDiagram-FHFEXIEX-W_EdYNVF.js → stateDiagram-FHFEXIEX-D9Z-sJAh.js} +1 -1
- package/dist/dashboard/assets/stateDiagram-v2-QKLJ7IA2-nhVyYoyX.js +1 -0
- package/dist/dashboard/assets/{subset-shared.chunk-CAlKIepB.js → subset-shared.chunk-CE199FVY.js} +1 -1
- package/dist/dashboard/assets/{subset-worker.chunk-YIXEPnjQ.js → subset-worker.chunk-DKgKGIuW.js} +1 -1
- package/dist/dashboard/assets/{sv-SE-XGPEYMSR-7SNur8Fe.js → sv-SE-XGPEYMSR-C9Hkuq3i.js} +1 -1
- package/dist/dashboard/assets/{ta-IN-2NMHFXQM-DqQBCB2J.js → ta-IN-2NMHFXQM-IEhskXEC.js} +1 -1
- package/dist/dashboard/assets/{th-TH-HPSO5L25-ClwEsAak.js → th-TH-HPSO5L25-DTb8f2Te.js} +1 -1
- package/dist/dashboard/assets/{timeline-definition-GMOUNBTQ-uPtwwnY7.js → timeline-definition-GMOUNBTQ-n1YhmZQ4.js} +1 -1
- package/dist/dashboard/assets/{tr-TR-DEFEU3FU-DmCg5qbG.js → tr-TR-DEFEU3FU-CnEnSvd1.js} +1 -1
- package/dist/dashboard/assets/{uk-UA-QMV73CPH-DixKG8eB.js → uk-UA-QMV73CPH-CV5yaOns.js} +1 -1
- package/dist/dashboard/assets/{vennDiagram-DHZGUBPP-CAggDlIj.js → vennDiagram-DHZGUBPP-EZuBw-Y1.js} +1 -1
- package/dist/dashboard/assets/{vi-VN-M7AON7JQ-C15Za2rn.js → vi-VN-M7AON7JQ-C_pZqaaY.js} +1 -1
- package/dist/dashboard/assets/{wardley-RL74JXVD-D5C_gWsf.js → wardley-RL74JXVD-CEAA3DK-.js} +1 -1
- package/dist/dashboard/assets/{wardleyDiagram-NUSXRM2D-tqYHOmfO.js → wardleyDiagram-NUSXRM2D-DhmpY-nw.js} +1 -1
- package/dist/dashboard/assets/{xychartDiagram-5P7HB3ND-CsxZKm-V.js → xychartDiagram-5P7HB3ND-BCfqQ3yb.js} +1 -1
- package/dist/dashboard/assets/{zh-CN-LNUGB5OW-BhlF39b5.js → zh-CN-LNUGB5OW-C9EPIaEx.js} +1 -1
- package/dist/dashboard/assets/{zh-HK-E62DVLB3-P2FWmB4w.js → zh-HK-E62DVLB3-RZGyfbKw.js} +1 -1
- package/dist/dashboard/assets/{zh-TW-RAJ6MFWO-B0yB1dNp.js → zh-TW-RAJ6MFWO-CfQ4KbkI.js} +1 -1
- package/dist/dashboard/index.html +1 -1
- package/dist/index.js +4142 -1919
- package/dist/skill-packs/council/SKILL.md +3 -2
- package/dist/skill-packs/council/debate-protocol.md +1 -1
- package/dist/skill-packs/excalidraw/SKILL.md +38 -28
- package/dist/templates/AGENTS.md +1 -1
- package/dist/templates/CLAUDE.md +1 -1
- package/package.json +3 -1
- package/skill/SKILL.md +206 -498
- package/skill/references/cli-reference.md +203 -0
- package/skill/references/improving-dreamcontext.md +39 -0
- package/skill/references/integrations.md +236 -0
- package/skill/references/knowledge-and-recall.md +157 -0
- package/skill/references/sleep.md +88 -0
- package/skill/references/tasks-and-features.md +170 -0
- package/skill-curator/SKILL.md +234 -0
- package/skill-initializer/SKILL.md +243 -0
- package/skill-packs/council/SKILL.md +3 -2
- package/skill-packs/council/debate-protocol.md +1 -1
- package/skill-packs/excalidraw/SKILL.md +38 -28
- package/agents/dreamcontext-initializer.md +0 -308
- package/dist/agents/dreamcontext-initializer.md +0 -308
- package/dist/dashboard/assets/channel-CIQg6WkP.js +0 -1
- package/dist/dashboard/assets/classDiagram-6PBFFD2Q-kJkUaIqm.js +0 -1
- package/dist/dashboard/assets/classDiagram-v2-HSJHXN6E-kJkUaIqm.js +0 -1
- package/dist/dashboard/assets/clone-COSoK5_M.js +0 -1
- package/dist/dashboard/assets/index-DjaqCcd7.js +0 -482
- package/dist/dashboard/assets/stateDiagram-v2-QKLJ7IA2-BsdphuJ6.js +0 -1
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# Sleep / Consolidation — full flow
|
|
2
|
+
|
|
3
|
+
Sleep (RemSleep) is how working-session changes get folded back into the durable brain. It mirrors how the brain consolidates memory during sleep. **The main agent runs the orchestration directly** — sub-agents cannot reliably fan out to other sub-agents.
|
|
4
|
+
|
|
5
|
+
## When to sleep
|
|
6
|
+
|
|
7
|
+
Sleep debt accumulates automatically via hooks (per Write/Edit tool use). Hooks inject directives — honor them.
|
|
8
|
+
|
|
9
|
+
| Debt | Level | Per-change score | Required behavior |
|
|
10
|
+
|------|-------|------------------|-------------------|
|
|
11
|
+
| 0–3 | Alert | 1–3 changes → +1 | No action |
|
|
12
|
+
| 4–6 | Drowsy | 4–8 changes → +2 | After completing a task: **inform user + offer** consolidation |
|
|
13
|
+
| 7–9 | Sleepy | 9+ changes → +3 | At session start: **inform user + recommend** consolidation before new work |
|
|
14
|
+
| 10+ | Must sleep | — | **Consolidate immediately**, before or right after the current task |
|
|
15
|
+
|
|
16
|
+
Also triggers an advisory: a **★★★ bookmark** exists (regardless of debt), or **3+ sessions** since last sleep.
|
|
17
|
+
|
|
18
|
+
Injected directives (SessionStart + every user message via UserPromptSubmit when debt ≥4):
|
|
19
|
+
- Debt ≥10 → "CONSOLIDATION REQUIRED"
|
|
20
|
+
- Debt ≥7 → "CONSOLIDATION RECOMMENDED"
|
|
21
|
+
- Debt ≥4 → offer after the current task
|
|
22
|
+
|
|
23
|
+
**MANDATORY post-task check:** after any task/major implementation, if debt ≥4 tell the user: *"Sleep debt is [N]. I can consolidate now to preserve this work. Want me to run it?"* Never silently finish.
|
|
24
|
+
**Auto-sleep (act without asking):** task completed with debt ≥7; major implementation finished with debt ≥4.
|
|
25
|
+
**Ask first:** debt 4–6 after a task; accumulated small changes; user wrapping up.
|
|
26
|
+
|
|
27
|
+
For non-file-change work (architecture discussion, a decision with no edits): `dreamcontext sleep add <score> "<reason>"`.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## The flow (run from the main agent context)
|
|
32
|
+
|
|
33
|
+
1. **Tell the user** you're consolidating.
|
|
34
|
+
2. **`dreamcontext sleep start`** — pins the epoch timestamp (safe clearing). Add `--deep` only when you intend to authorize destructive knowledge ops (merges/deletes); a normal sleep is non-destructive.
|
|
35
|
+
3. **Build the brief inline** (cheap CLI, no transcript content):
|
|
36
|
+
- `cat _dream_context/state/.sleep.json` — session IDs, task slugs, `last_assistant_message`, `knowledge_access`
|
|
37
|
+
- `git status --short` and `git log --oneline --since=$(jq -r '.sleep_started_at // .last_sleep' _dream_context/state/.sleep.json)`
|
|
38
|
+
- `dreamcontext core releases active` — the planning version (create one with `dreamcontext core releases add --ver vX.Y.Z --status planning --summary "<theme>" --yes` if missing)
|
|
39
|
+
4. **Dispatch specialists in parallel** — one message, multiple Agent tool calls. Each owns a non-overlapping file domain (no stomping):
|
|
40
|
+
- **Always fire:** `sleep-tasks`, `sleep-state`.
|
|
41
|
+
- **Conditionally fire `sleep-product`** if ANY of:
|
|
42
|
+
- `last_assistant_message` mentions research/analysis/decision
|
|
43
|
+
- a `knowledge_access` entry is 30+ days untouched
|
|
44
|
+
- a research bookmark exists
|
|
45
|
+
- a task slug matches an existing feature PRD filename
|
|
46
|
+
- `git status` shows changes under `_dream_context/core/features/`
|
|
47
|
+
- a session advanced ≥1 acceptance criterion, OR introduced a feature concept with ≥2 criteria, OR the user named something "a feature" / "we should add X", OR a task has `feature:` frontmatter pointing to a non-existent PRD
|
|
48
|
+
- the user hint mentions knowledge or a feature
|
|
49
|
+
- When unsure, **over-fire** `sleep-product` — it no-ops cheaply.
|
|
50
|
+
- **Conditionally fire `sleep-migration`** only when `dreamcontext migrations pending` produces output. Contract: structure-only (paths/frontmatter/fences), no body prose changes; writes the ledger via `dreamcontext migrations record` on completion.
|
|
51
|
+
- **Do NOT fire `sleep-federation`.** Copy-based federation is disabled; peers are read live at recall time, not synced at sleep. The specialist is retained but inert.
|
|
52
|
+
- Pass each specialist a small text brief: epoch, session IDs, active task slugs, planning version, the signals relevant to it, optional user hint. Do **not** paste transcript content — specialists call `dreamcontext transcript distill <id>` themselves.
|
|
53
|
+
5. **Wait for all reports** (each returns a short structured report).
|
|
54
|
+
6. **`dreamcontext reflect`** — each candidate is a term seen across multiple sessions not yet in soul/user/memory/knowledge. Promote into `2.memory.md` or a knowledge file ONLY if genuinely load-bearing; most are noise — discard. Never auto-promote.
|
|
55
|
+
7. **Marketing pass** if `_dream_context/marketing/` exists: `dreamcontext mk rem-sleep`.
|
|
56
|
+
8. **Council promote check:** `dreamcontext council list --unpromoted` — promote if the user engaged positively.
|
|
57
|
+
9. **`dreamcontext sleep done "<one-paragraph summary stitched from specialist reports>"`** — clears pre-epoch state, resets debt, writes a history entry. (If a remote backend — ClickUp or GitHub — is active and any task pushes failed, this auto-retries once, then errors loudly with the failed slugs.)
|
|
58
|
+
10. **Report** the consolidated summary to the user.
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Specialist ownership (non-overlapping domains)
|
|
63
|
+
|
|
64
|
+
| Specialist | Owns | Notes |
|
|
65
|
+
|---|---|---|
|
|
66
|
+
| `sleep-tasks` | Task files (`state/*.md`) | Reconciles task bodies to truth, bumps statuses, creates tasks for untracked work, attaches to the planning version. |
|
|
67
|
+
| `sleep-state` | Core identity (soul, user, memory, core 3–6), CHANGELOG, RELEASES | Records patterns/decisions/preferences, writes a changelog entry per meaningful change since the epoch, surfaces release readiness, enforces anti-bloat ceilings, flags stale knowledge for `sleep-product`. |
|
|
68
|
+
| `sleep-product` | Knowledge files + feature PRDs | Creates/reconciles `knowledge/*.md` and `core/features/*.md`, processes staleness flags, maintains the knowledge index + taxonomy. |
|
|
69
|
+
| `sleep-migration` | Structure only | Moves/renames folders, normalizes frontmatter, wraps fences. Never alters body prose. |
|
|
70
|
+
|
|
71
|
+
**Consolidation discipline (remind specialists in the brief):** prefer *updating/extending* an existing entity over creating a new one. `sleep-tasks` folds a smaller slice into the task that already covers it (broaden its title + insert sub-items) rather than forking a duplicate. `sleep-product` keeps similar verticals/topics in the fewest knowledge files, splitting only on a sharp topical boundary. Duplicate tasks and fragmented near-duplicate knowledge are the top failure modes — but genuinely separate concerns still get their own task/file.
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## Epoch safety
|
|
76
|
+
|
|
77
|
+
`sleep start` pins a timestamp epoch. `sleep done` only clears sessions/changes/bookmarks from *before* the epoch — parallel sessions that finish during consolidation are preserved for the next cycle. This is why you always `sleep start` before dispatching and `sleep done` after, never in the reverse order.
|
|
78
|
+
|
|
79
|
+
## Commands
|
|
80
|
+
```bash
|
|
81
|
+
dreamcontext sleep status # debt level + history
|
|
82
|
+
dreamcontext sleep start [--deep] # begin epoch
|
|
83
|
+
dreamcontext sleep done "<summary>" # finish, reset debt
|
|
84
|
+
dreamcontext sleep add <score> "<why>" # manual debt for non-file work
|
|
85
|
+
dreamcontext sleep debt # debt number (programmatic)
|
|
86
|
+
dreamcontext sleep history [-n N] # consolidation history
|
|
87
|
+
dreamcontext reflect [--write] # cross-session term candidates
|
|
88
|
+
```
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
# Tasks & Features — full protocol
|
|
2
|
+
|
|
3
|
+
## Tasks are your working documents
|
|
4
|
+
|
|
5
|
+
All context, decisions, user stories, acceptance criteria, constraints, technical details, notes, and progress live in the **task body**. Features are retrospective product docs updated only during sleep — never put in-progress context in a feature.
|
|
6
|
+
|
|
7
|
+
The auto-loaded snapshot already lists every non-completed task with status, priority, and last-updated date. Answer "what am I working on?" / "which tasks are active?" directly from it — no tool calls. Only read the full file when you need the body (the **Changelog** section is where the previous session left off).
|
|
8
|
+
|
|
9
|
+
### Lifecycle
|
|
10
|
+
```
|
|
11
|
+
todo → in_progress → in_review → completed
|
|
12
|
+
```
|
|
13
|
+
The sleep agent picks the status that matches reality: `completed` for work that's demonstrably done, low-risk, already validated; `in_review` only when a human genuinely must verify (a behavior change, a design decision, a risky/critical-path change). It does not reflexively park everything in `in_review`, and it closes finished work — so tasks neither rot in `todo` nor rot half-closed in `in_review`.
|
|
14
|
+
|
|
15
|
+
### Create
|
|
16
|
+
```bash
|
|
17
|
+
dreamcontext tasks create <name> \
|
|
18
|
+
--description "..." --priority medium --why "What this accomplishes" \
|
|
19
|
+
[--version v0.9.0] [--person "Ada"] [--due 2026-07-01] [--tags backend,api]
|
|
20
|
+
```
|
|
21
|
+
Defaults: `priority=medium`, `status=todo`. A task created without `--version` auto-attaches to the **active planning version** (see Versioning).
|
|
22
|
+
|
|
23
|
+
### Enrich (insert into any section during active work)
|
|
24
|
+
```bash
|
|
25
|
+
dreamcontext tasks insert <name> user_stories "As a user, I want X so that Y"
|
|
26
|
+
dreamcontext tasks insert <name> acceptance_criteria "API returns 200 with paginated results"
|
|
27
|
+
dreamcontext tasks insert <name> constraints "Use native fetch, no axios"
|
|
28
|
+
dreamcontext tasks insert <name> technical_details "Key file: src/api/tasks.ts (Express router)"
|
|
29
|
+
dreamcontext tasks insert <name> notes "Edge case: empty results return [] not null"
|
|
30
|
+
dreamcontext tasks insert <name> changelog "Implemented pagination for /api/tasks"
|
|
31
|
+
```
|
|
32
|
+
Sections: `why`, `user_stories`, `acceptance_criteria`, `constraints`, `technical_details`, `notes`, `changelog`.
|
|
33
|
+
|
|
34
|
+
### Lifecycle commands
|
|
35
|
+
```bash
|
|
36
|
+
dreamcontext tasks log <name> "what was done" # changelog entry — MANDATORY each session
|
|
37
|
+
dreamcontext tasks status <name> in_review "reason" # bump status (logs automatically)
|
|
38
|
+
dreamcontext tasks complete <name> "summary" # mark complete
|
|
39
|
+
dreamcontext tasks delete <name> --yes # delete (propagates to remote on sync)
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Filtering & discovery
|
|
43
|
+
```bash
|
|
44
|
+
dreamcontext tasks list --version S5 # one milestone
|
|
45
|
+
dreamcontext tasks list --tag memoryos --tag backend --status todo # --tag repeatable, AND
|
|
46
|
+
dreamcontext tasks list --any-tag lina --any-tag studio # --any-tag repeatable, OR
|
|
47
|
+
dreamcontext tasks list --priority critical
|
|
48
|
+
dreamcontext tasks list --feature recall-engine # match related_feature
|
|
49
|
+
dreamcontext tasks list --group-by version --all # sectioned + counts
|
|
50
|
+
dreamcontext tasks list --tag lina --json # scriptable (use this, not awk/grep)
|
|
51
|
+
dreamcontext tasks tags # distinct tags with counts
|
|
52
|
+
```
|
|
53
|
+
Filters compose (AND across flags), case-insensitive; version/priority/feature match exactly.
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## RICE prioritization
|
|
58
|
+
|
|
59
|
+
Optional, additive to priority/urgency; powers the dashboard Scatter view and RICE sort.
|
|
60
|
+
```bash
|
|
61
|
+
dreamcontext tasks create <name> --reach 5 --impact 3 --confidence 75 --effort 2
|
|
62
|
+
dreamcontext tasks rice <name> # print current values
|
|
63
|
+
dreamcontext tasks rice <name> --effort 4 # update one field, recompute
|
|
64
|
+
dreamcontext tasks rice <name> --clear # remove all RICE values
|
|
65
|
+
```
|
|
66
|
+
- `--reach` integer 1–10 · `--impact` integer 1–5 · `--confidence` one of 25/50/75/100 (%) · `--effort` person-weeks (>0, ≤52, 0.5 steps).
|
|
67
|
+
- Score = `(reach × impact × confidence/100) / effort`, computed server-side, stored in frontmatter.
|
|
68
|
+
|
|
69
|
+
## Due dates & urgency
|
|
70
|
+
```bash
|
|
71
|
+
dreamcontext tasks due <name> 2026-07-01 # set
|
|
72
|
+
dreamcontext tasks due <name> clear # clear
|
|
73
|
+
```
|
|
74
|
+
`urgency` (critical/high/medium/low) is the second Eisenhower axis (priority × urgency) for the dashboard matrix.
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## People & assignees (multi-person)
|
|
79
|
+
|
|
80
|
+
Single-person projects ignore all of this. For teams:
|
|
81
|
+
```bash
|
|
82
|
+
dreamcontext config people "Ada" "Mehmet" # set the roster (syncs ## People in 1.user.md)
|
|
83
|
+
dreamcontext tasks create <name> --person "Ada" # records a person:ada tag
|
|
84
|
+
dreamcontext tasks tag <name> person:mehmet # add another assignee
|
|
85
|
+
dreamcontext tasks tag <name> person:ada --remove # unassign
|
|
86
|
+
```
|
|
87
|
+
- `person:<slug>` tags are the source of truth for assignment and support **multiple assignees**. The legacy scalar `assignee` field is deprecated (still read, not written).
|
|
88
|
+
- With ClickUp enabled, the full assignee set round-trips to ClickUp's native `assignees[]` bidirectionally; map each person to a member with `dreamcontext config clickup-member <person> <memberId>`. With **GitHub** enabled, `person:<slug>` tags round-trip to issue assignees (repo collaborators; a non-collaborator is skipped, never a sync error). (see [integrations.md](integrations.md)).
|
|
89
|
+
- `DREAMCONTEXT_PERSON` env names the current person for attribution.
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## The Workflow flowchart (keep it in sync)
|
|
94
|
+
|
|
95
|
+
Every task file has a `## Workflow` mermaid block near the top: one node per acceptance criterion, grouped under milestone subgraphs, with status classes `done` / `active` / `todo` / `blocked`. It is the load-bearing summary of the task — drift makes future sessions misread progress.
|
|
96
|
+
|
|
97
|
+
**Whenever** you check off a criterion, start one, add/remove one, or hit a blocker → update that node's `:::class`. Then verify:
|
|
98
|
+
```bash
|
|
99
|
+
dreamcontext tasks doctor <name> # checks flowchart ⇄ acceptance-criteria sync (all tasks if omitted)
|
|
100
|
+
```
|
|
101
|
+
And flip the matching `- [ ]` → `- [x]` in the Acceptance Criteria list immediately — don't wait for sleep.
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## Task file schema (reference)
|
|
106
|
+
```yaml
|
|
107
|
+
---
|
|
108
|
+
id: "task_abc123"
|
|
109
|
+
name: "Implement auth middleware"
|
|
110
|
+
description: "Add JWT validation to protected routes"
|
|
111
|
+
priority: "high" # critical | high | medium | low
|
|
112
|
+
urgency: "medium" # critical | high | medium | low (Eisenhower axis)
|
|
113
|
+
status: "todo" # todo | in_progress | in_review | completed
|
|
114
|
+
created_at: "2026-02-25"
|
|
115
|
+
updated_at: "2026-02-25"
|
|
116
|
+
tags: [] # includes person:<slug> for assignees
|
|
117
|
+
version: "v0.9.0" # planning-version association (auto-set to active planning version)
|
|
118
|
+
parent_task: null
|
|
119
|
+
related_feature: null # feature slug for cross-link
|
|
120
|
+
product: null # multi-product scoping (optional)
|
|
121
|
+
due: null # YYYY-MM-DD
|
|
122
|
+
rice: { reach: 5, impact: 3, confidence: 75, effort: 2, score: 5.625 }
|
|
123
|
+
---
|
|
124
|
+
```
|
|
125
|
+
Files live at `_dream_context/state/<slug>.md`. Lookup is fuzzy: exact slug → prefix → substring.
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## Features (PRDs)
|
|
130
|
+
|
|
131
|
+
Retrospective product documentation, **created and updated exclusively by the sleep agent**. During active work, everything goes in the task; sleep consolidates task content into the matching feature.
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
dreamcontext features create <name> -w "Why" -t backend,api -s planning --related-tasks a,b
|
|
135
|
+
dreamcontext features set <name> status active
|
|
136
|
+
dreamcontext features set <name> tags backend,api,topic:recall
|
|
137
|
+
dreamcontext features insert <name> acceptance_criteria "..." # auto-formats as - [ ]
|
|
138
|
+
dreamcontext features doctor # staleness / orphans / dangling refs
|
|
139
|
+
```
|
|
140
|
+
Status values: `planning | in_progress | in_review | active | shipped | deprecated`. Sections: `changelog`, `notes`, `technical_details`, `constraints`, `user_stories`, `acceptance_criteria`, `why`. PRDs live in `core/features/<name>.md` (flat directory; may carry `product:`).
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## Versioning & releases
|
|
145
|
+
|
|
146
|
+
Versions and releases are unified in `RELEASES.json`. A "version" is a release entry with `status: planning`; releasing flips it to `released` with a date. Lifecycle: `planning → released`.
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
dreamcontext core releases add --ver v0.9.0 --summary "Dashboard improvements" --status planning
|
|
150
|
+
dreamcontext core releases active # print the active planning version
|
|
151
|
+
dreamcontext core releases active v0.10.0 # switch active planning version
|
|
152
|
+
dreamcontext core releases active --clear # unset
|
|
153
|
+
dreamcontext core releases list -n 10
|
|
154
|
+
dreamcontext core releases show v0.9.0
|
|
155
|
+
```
|
|
156
|
+
New tasks without `--version` auto-attach to the active planning version, so work is always linked to a milestone. If none exists, the sleep agent creates one. The dashboard Version Manager plans and releases versions; the sleep agent reports release readiness when all of a planning version's tasks are done.
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
## Multi-product (monorepos)
|
|
161
|
+
|
|
162
|
+
`dreamcontext init` asks whether the project is a monorepo with multiple products and records the list in `state/.config.json` under `multiProduct: string[] | false`. When products are configured:
|
|
163
|
+
|
|
164
|
+
- **Per-product data structures**: `knowledge/data-structures/<product>.md` (single-product → `default.md`). Body format is a single ` ```sql ` fenced block with `-- ...` comments (the dashboard highlights it). Recall-indexed, owned by `sleep-product`.
|
|
165
|
+
- **Per-product knowledge**: `knowledge/products/<product>.md`. Cross-cutting knowledge stays at top-level `knowledge/`.
|
|
166
|
+
- **Tasks** may carry `product: <name>` in frontmatter; CLI/dashboard surface a product filter.
|
|
167
|
+
- **Feature PRDs** may carry `product: <name>` (still in the flat `core/features/` directory).
|
|
168
|
+
- **Auto-injection**: the SessionStart hook resolves the active task (override `state/.active-task`, else most-recently-modified `in_progress` task). If its `product:` is in `multiProduct`, the hook injects `knowledge/products/<name>.md` into the snapshot under `## Active Product Knowledge: <name>` (capped ~200 lines). You don't load it manually — it's already in context.
|
|
169
|
+
|
|
170
|
+
If `multiProduct` is `false`/absent, treat the project as single-product and use `data-structures/default.md`.
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: curator
|
|
3
|
+
description: >
|
|
4
|
+
Load when a dreamcontext brain has grown additively and needs a periodic refactor pass that
|
|
5
|
+
re-orders content into the right shape — or the user invokes `/curator`. Triggers: "curate
|
|
6
|
+
the brain", "re-organize my context", "the knowledge base has gotten messy", "clean up /
|
|
7
|
+
refactor the brain", "conform everything to current conventions", "dedup the knowledge",
|
|
8
|
+
"fix the structure, not just append to it", or any time the corpus has drifted from current
|
|
9
|
+
architecture conventions (duplicate knowledge, topics living as both feature and knowledge,
|
|
10
|
+
stale task statuses, off-vocabulary tags, a flat knowledge dump that should be foldered).
|
|
11
|
+
This is the interactive, sub-agent-driven brain REFACTOR — the pass that sleep won't do. It is
|
|
12
|
+
allowed to MOVE, MERGE, SPLIT, RENAME, RE-TYPE, and RETIRE content to reach the right
|
|
13
|
+
knowledge / feature / task / version shape.
|
|
14
|
+
user-invocable: true
|
|
15
|
+
alwaysApply: false
|
|
16
|
+
tags: [curator, refactor, reorganize, cleanup, dedup, single-source-of-truth, orchestration, sub-agents, dreamcontext]
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
# Curator — interactive, sub-agent-driven brain refactor
|
|
20
|
+
|
|
21
|
+
You are the **orchestrator**. Like `goal-skill`, `initializer`, `multi-review`, and `council`,
|
|
22
|
+
**you do not hand-author the bulk of the work yourself** — you dispatch sub-agents, read their
|
|
23
|
+
results, gate the transitions, and drive convergence loops until the brain conforms. Your value
|
|
24
|
+
is judgment at the gates and the conversation with the user about the *shape* — not running every
|
|
25
|
+
`knowledge merge` by hand.
|
|
26
|
+
|
|
27
|
+
**Why this exists, vs sleep.** Sleep/consolidation is conservative and additive — it polishes
|
|
28
|
+
whatever shape already exists and keeps appending. The curator is the periodic **brain refactor**
|
|
29
|
+
sleep won't do: it re-orders content into the right shape and is explicitly allowed to **MOVE,
|
|
30
|
+
MERGE, SPLIT, RENAME, RE-TYPE, and RETIRE**. A brain is **curated** when the verifier passes:
|
|
31
|
+
`doctor` clean, zero duplicate-topic knowledge, zero topics living as both a feature and a
|
|
32
|
+
knowledge file, every task/feature/version status reflecting reality, tags normalized to the
|
|
33
|
+
vocabulary, recall precision not regressed, and an immediate second run finding nothing material
|
|
34
|
+
to change (convergence). Not when "some files got tidied".
|
|
35
|
+
|
|
36
|
+
**Conventions are read AT RUN TIME — never hardcoded.** The whole point is to conform the brain
|
|
37
|
+
to *today's* architecture, not the shape that accreted. Every target shape comes from the live
|
|
38
|
+
system: the installed `dreamcontext` skill + `references/`, `dreamcontext taxonomy vocab`, and the
|
|
39
|
+
project's own `core/0.soul.md` / `1.user.md`. When the conventions change, the curator's behavior
|
|
40
|
+
changes with them — no edits to this skill required.
|
|
41
|
+
|
|
42
|
+
## When to invoke
|
|
43
|
+
|
|
44
|
+
- `/curator` (primary entry).
|
|
45
|
+
- The brain has clearly drifted: duplicate/near-duplicate knowledge, a flat `knowledge/` dump that
|
|
46
|
+
should be foldered, topics living as both a feature and a knowledge file, stale `in_progress`
|
|
47
|
+
tasks that actually shipped, off-vocabulary tags, bloated core files.
|
|
48
|
+
- "Re-organize / refactor / curate the brain", "dedup the knowledge", "conform to conventions".
|
|
49
|
+
|
|
50
|
+
**Scale the machinery to the drift.** A small, tidy brain does not need the full five-auditor
|
|
51
|
+
fan-out. Say so and run a **light path**: one `curator-auditor` over the whole corpus + one
|
|
52
|
+
`curator-worker` for the handful of fixes, then verify. Reserve the full orchestration for a brain
|
|
53
|
+
with real accreted drift across domains.
|
|
54
|
+
|
|
55
|
+
## Commitment ritual (do this FIRST — non-negotiable)
|
|
56
|
+
|
|
57
|
+
1. **Announce**: tell the user you're running the curator orchestration and what it's allowed to do
|
|
58
|
+
(MOVE/MERGE/SPLIT/RENAME/RE-TYPE/RETIRE), and that **it mutates the real corpus** — so it runs
|
|
59
|
+
plan-first and you'll confirm the shape before executing.
|
|
60
|
+
2. **TodoWrite** the phases (0–7) as items. A phase isn't done until its gate passes.
|
|
61
|
+
3. **Track iteration counts** in the todo text for each convergence loop, e.g.
|
|
62
|
+
`Phase 4: execute (batch 3/6)`, `Phase 6: verify (iteration 2/3)`.
|
|
63
|
+
|
|
64
|
+
Skipping the ritual is the first step toward executing destructive moves the user never saw.
|
|
65
|
+
|
|
66
|
+
## Orchestration flow
|
|
67
|
+
|
|
68
|
+
```mermaid
|
|
69
|
+
flowchart TD
|
|
70
|
+
P0[Phase 0 — RECOGNIZE & SCOPE: confirm brain exists + drifted, announce, pick scope, READ current conventions] --> P1[Phase 1 — AUDIT: fan out curator-auditor, one per domain -> reorg findings]
|
|
71
|
+
P1 --> P2[Phase 2 — REORG PLAN: merge findings into ONE source→action→target plan; de-conflict; batch]
|
|
72
|
+
P2 --> P3{Phase 3 — CONFIRM THE SHAPE: show the dry-run plan, user adjusts -> approved?}
|
|
73
|
+
P3 -->|user revises| P2
|
|
74
|
+
P3 -->|approved| P4[Phase 4 — EXECUTE: fan out curator-worker per batch; track coverage]
|
|
75
|
+
P4 --> P5[Phase 5 — RECONCILE: knowledge index, releases/versions, taxonomy.json]
|
|
76
|
+
P5 --> P6{Phase 6 — VERIFY: curator-verifier — PASS? + idempotency re-run}
|
|
77
|
+
P6 -->|FAIL and iter < 3| P4
|
|
78
|
+
P6 -->|cap reached| ESC[ESCALATE to user with the unresolved gaps]
|
|
79
|
+
P6 -->|PASS| P7[Phase 7 — REPORT: what moved/merged/retired + recall before/after + offer a sleep]
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### Phase 0 — RECOGNIZE & SCOPE (interactive — ask, then wait)
|
|
83
|
+
|
|
84
|
+
1. Confirm there IS a brain and it has drifted (`dreamcontext doctor`, `knowledge index`,
|
|
85
|
+
`features list`, `tasks list --all`). If the brain is missing/sparse, this is the wrong skill —
|
|
86
|
+
point the user at `initializer` instead.
|
|
87
|
+
2. **Read the current conventions** so the whole run targets *today's* shape: the installed
|
|
88
|
+
`dreamcontext` skill + references, `dreamcontext taxonomy vocab`, `core/0.soul.md`, `1.user.md`.
|
|
89
|
+
3. **Announce** (per the ritual) and ask **only what you can't determine** (keep it short):
|
|
90
|
+
- **Scope**: the whole brain, or one domain (knowledge / features / tasks / versions)?
|
|
91
|
+
- **Anything off-limits** — files/areas you should not touch this pass?
|
|
92
|
+
- Confirm they want a **real run** (it mutates the corpus) — the plan is shown before execution.
|
|
93
|
+
On a clean git tree, note it; if there are uncommitted changes, recommend committing first so the
|
|
94
|
+
reorg diff is reviewable in isolation. Wait for the answers; capture them in TodoWrite.
|
|
95
|
+
|
|
96
|
+
### Phase 1 — AUDIT (sub-agent fan-out → reorg findings)
|
|
97
|
+
|
|
98
|
+
Dispatch **`curator-auditor`** (read-only). For a full curate, **fan out in parallel, one auditor
|
|
99
|
+
per domain** (single message, multiple Agent calls), each blind to the others — you merge their
|
|
100
|
+
findings:
|
|
101
|
+
|
|
102
|
+
| Domain | What it audits |
|
|
103
|
+
|---|---|
|
|
104
|
+
| `knowledge` | bloat (COMPRESS), tag drift (RETAG), flat files that should be foldered (MOVE), near-duplicates (MERGE), stale files (RETIRE) |
|
|
105
|
+
| `ssot` | the cross-cutting single-source-of-truth pass — topics as BOTH feature and knowledge, duplicate knowledge, overlapping features → fold/redirect to one home |
|
|
106
|
+
| `features` | reconcile status to reality, rename to current vocabulary, dedup vs knowledge, flag stale |
|
|
107
|
+
| `tasks` | finished tasks still open (STATUS-BUMP), duplicate/stale tasks (MERGE/RETIRE), orphans → attach to a planning version |
|
|
108
|
+
| `versions` | reconcile release/version statuses so they're tidy and consistent |
|
|
109
|
+
|
|
110
|
+
Give each auditor its domain + the conventions you read in Phase 0. Each returns a **source → action
|
|
111
|
+
→ target** findings table. A finding that says "clean up knowledge" without naming each file and the
|
|
112
|
+
exact action is rejected — send it back.
|
|
113
|
+
|
|
114
|
+
### Phase 2 — REORG PLAN (you synthesize)
|
|
115
|
+
|
|
116
|
+
Merge the auditors' findings into **ONE concrete reorg plan** — `source → action → target` per item.
|
|
117
|
+
This is your synthesis work (not a sub-agent's):
|
|
118
|
+
|
|
119
|
+
- **De-conflict.** Two auditors touching the same file → one action wins. Sequence dependent moves
|
|
120
|
+
(RE-TYPE before the RETIRE of the original; MERGE survivors chosen before their MOVEs).
|
|
121
|
+
- **Batch** the plan into independent units a worker can own without racing another (group by folder
|
|
122
|
+
/ topic cluster; never split a MERGE pair across two workers).
|
|
123
|
+
- Keep the plan **reviewable**: a flat list the user can read top-to-bottom, each row carrying the
|
|
124
|
+
*why* (the convention it satisfies).
|
|
125
|
+
|
|
126
|
+
### Phase 3 — CONFIRM THE SHAPE (interactive gate — the user owns the shape)
|
|
127
|
+
|
|
128
|
+
Show the user the **dry-run reorg plan**: every `source → action → target` row, grouped by domain,
|
|
129
|
+
with risk notes (anything that could move recall precision or a wikilink graph). **This is where the
|
|
130
|
+
user's intent wins** — they veto a merge, keep a "duplicate" that's intentional, rename a target
|
|
131
|
+
folder, downgrade a RETIRE to an archive. Iterate Phase 2 ↔ 3 until they approve. **Do not execute
|
|
132
|
+
until the plan is approved** — a wrong MERGE/RETIRE is expensive to unwind.
|
|
133
|
+
|
|
134
|
+
Before executing, capture a **recall BEFORE snapshot**: pick ~5 seed queries spanning the domains
|
|
135
|
+
touched and record `dreamcontext memory recall "<q>"` top-3 for each. The verifier diffs against this.
|
|
136
|
+
|
|
137
|
+
If running fully autonomously with no user, adopt the synthesized plan, record that you chose it, and
|
|
138
|
+
surface it in the Phase 7 report for confirmation — but still skip any row flagged destructive +
|
|
139
|
+
ambiguous, and list it as deferred.
|
|
140
|
+
|
|
141
|
+
### Phase 4 — EXECUTE (sub-agent fan-out — the core)
|
|
142
|
+
|
|
143
|
+
Dispatch **`curator-worker`** over the approved plan, **one batch per worker** so each fits in
|
|
144
|
+
context. Use `parallel` for independent batches; **`pipeline`/sequential when batches depend on each
|
|
145
|
+
other** (a RE-TYPE that another batch's MERGE survivor points at). Each worker applies its batch via
|
|
146
|
+
the CLI (`knowledge move`, `knowledge merge`, `tasks status`, `features set`), distills merged prose,
|
|
147
|
+
and repoints wikilinks. **Track coverage in TodoWrite** (`batch N/M`). Loop until every plan row is
|
|
148
|
+
applied or consciously deferred. **Nothing is silently skipped** — at the cap (3 passes) with rows
|
|
149
|
+
unapplied, ESCALATE with the list. Re-dispatch failed batches; don't drop them.
|
|
150
|
+
|
|
151
|
+
### Phase 5 — RECONCILE
|
|
152
|
+
|
|
153
|
+
Centralized cleanup after the workers (you or a final worker pass): rebuild/verify the knowledge index
|
|
154
|
+
is coherent, reconcile `core releases` / version statuses, ensure any new canonical tags are in
|
|
155
|
+
`core/taxonomy.json` (`taxonomy add`), and confirm no `[[wikilink]]` dangles.
|
|
156
|
+
|
|
157
|
+
### Phase 6 — VERIFY (the real gate)
|
|
158
|
+
|
|
159
|
+
Dispatch **`curator-verifier`** (read-only + Bash) with the seed queries + the BEFORE recall snapshot.
|
|
160
|
+
It returns `PASS | FAIL` with evidence: `doctor` clean, knowledge index coherent, **zero duplicate-topic
|
|
161
|
+
knowledge**, **zero topic-as-both-feature-and-knowledge**, statuses reflect reality, taxonomy normalized,
|
|
162
|
+
no dangling wikilinks, **recall not regressed** vs the snapshot.
|
|
163
|
+
|
|
164
|
+
- **FAIL** → route **back to Phase 4**, fix the specific gaps, re-verify. Cap = 3 → ESCALATE.
|
|
165
|
+
- **PASS** → run the **idempotency check**: an immediate second audit must find nothing material to
|
|
166
|
+
change. Residual churn means the conventions weren't reached — treat it as a FAIL and loop. When the
|
|
167
|
+
re-run is clean, the brain is curated.
|
|
168
|
+
|
|
169
|
+
### Phase 7 — REPORT
|
|
170
|
+
|
|
171
|
+
Summarize what moved / merged / split / re-typed / retired (counts + the notable ones), the recall
|
|
172
|
+
before/after for the seed queries (proving no regression), anything consciously **deferred** (and why),
|
|
173
|
+
and then **offer a sleep** so the freshly-reorganized corpus is consolidated and the index/staleness warm.
|
|
174
|
+
|
|
175
|
+
## Convergence rules (how the loops end)
|
|
176
|
+
|
|
177
|
+
- Every loop has a hard **iteration cap of 3**. Hitting it means **ESCALATE to the user** — never
|
|
178
|
+
"good enough, the structure's better than it was".
|
|
179
|
+
- Update the TodoWrite count before each loop-back. Past the cap → stop and escalate with specifics.
|
|
180
|
+
- "Curated" is defined by Phase 6 PASS **plus** a clean idempotency re-run — not by the corpus
|
|
181
|
+
looking tidier.
|
|
182
|
+
|
|
183
|
+
## Red Flags — STOP, you're about to corrupt the brain
|
|
184
|
+
|
|
185
|
+
| Thought | Reality |
|
|
186
|
+
|---|---|
|
|
187
|
+
| "I'll just start moving and merging files." | Plan first, confirm the shape (Phase 3), THEN execute. The curator mutates real content. |
|
|
188
|
+
| "I know the conventions, no need to read them." | Read them at run time (Phase 0). The brain conforms to *today's* shape, which you may be misremembering. |
|
|
189
|
+
| "These two files look similar — I'll delete one." | MERGE folds + repoints + preserves; RETIRE archives. Silent deletion loses signal and dangles wikilinks. |
|
|
190
|
+
| "This task is probably done, bump it to completed." | Reality-based only. Cite the changelog/release/code evidence, or leave it. |
|
|
191
|
+
| "Recall is fine, skip the before/after." | A reorg can drop a relevant doc from reach. Snapshot before, diff after — it's an acceptance criterion. |
|
|
192
|
+
| "Verifier passed, we're done." | Not until the idempotency re-run is clean. Residual churn = conventions not reached. |
|
|
193
|
+
| "It's a feature AND a knowledge file — leave both." | One home per topic. RE-TYPE / fold to the canonical one; the verifier fails this. |
|
|
194
|
+
| "I'll author the whole reorg myself." | The orchestrator dispatches auditors + workers. You synthesize the plan and gate; you don't run every merge by hand. |
|
|
195
|
+
|
|
196
|
+
## Rationalization table
|
|
197
|
+
|
|
198
|
+
| If you think… | The truth is… | So… |
|
|
199
|
+
|---|---|---|
|
|
200
|
+
| "Auditing every domain is overhead; I'll eyeball it." | One pass over a drifted brain misses cross-cutting dupes and status drift. | Fan out an auditor per domain; merge their findings. |
|
|
201
|
+
| "The user will just approve the plan, skip the gate." | A wrong MERGE/RETIRE is expensive to unwind once files move. | Confirm the shape in Phase 3 before executing. |
|
|
202
|
+
| "Conventions don't change that often, hardcoding is fine." | The point of the curator is to track *current* conventions. Hardcoding makes it stale the day the skill changes. | Read taxonomy vocab + the live skill + soul at run time. |
|
|
203
|
+
| "Verifier will rubber-stamp." | A mis-prompted verifier rubber-stamps. Give it the checklist + the recall snapshot and demand evidence. | Treat FAIL as binding; loop or escalate. |
|
|
204
|
+
|
|
205
|
+
## Hard rules
|
|
206
|
+
|
|
207
|
+
- **Orchestrator drives sub-agents.** Auditor (intake) → worker (fan-out execute) → verifier (gate).
|
|
208
|
+
You synthesize the plan and gate; you don't run the whole reorg by hand.
|
|
209
|
+
- **Read conventions at run time.** taxonomy vocab + the installed skill + soul define the target shape.
|
|
210
|
+
- **Plan-first, confirm the shape (Phase 3) before executing.** The curator mutates real content.
|
|
211
|
+
- **Preserve signal.** MOVE/MERGE/RETIRE keep content findable and repoint every inbound `[[wikilink]]`.
|
|
212
|
+
Never silent-delete a topic.
|
|
213
|
+
- **One home per topic.** Feature **or** knowledge, never both — the verifier enforces it.
|
|
214
|
+
- **CLI for structure, native edits for prose** — `knowledge move`/`merge`, `tasks status`,
|
|
215
|
+
`features set`; hand-edit only the wording the CLI doesn't own.
|
|
216
|
+
- **Reality-based status.** Bump only what is demonstrably done, with cited evidence.
|
|
217
|
+
- **Recall must not regress.** Snapshot seed queries before; the verifier diffs after.
|
|
218
|
+
- **Caps are hard** (3 per loop). At the cap, escalate — never declare curated.
|
|
219
|
+
- **Done = Phase 6 PASS + a clean idempotency re-run.** Use the `dreamcontext` skill throughout.
|
|
220
|
+
|
|
221
|
+
## Relationship to other surfaces
|
|
222
|
+
|
|
223
|
+
| Surface | Stage | Relationship |
|
|
224
|
+
|---|---|---|
|
|
225
|
+
| `curator` (this) | Periodic brain refactor | Re-orders an existing brain into the current shape — MOVE/MERGE/SPLIT/RENAME/RE-TYPE/RETIRE. The pass sleep won't do. |
|
|
226
|
+
| `curator-auditor` / `-worker` / `-verifier` | This skill's workers | Audit (findings) → fan-out execute → PASS/FAIL gate. Dispatched at Phases 1 / 4 / 6. |
|
|
227
|
+
| `initializer` | First-run / bootstrap | Builds the brain from raw material. Curator *refactors* an existing one. Use initializer to create, curator to re-shape. |
|
|
228
|
+
| Sleep / consolidation | Ongoing, additive | Sleep polishes + appends conservatively. Curator is the periodic structural refactor sleep deliberately avoids. Offer a sleep *after* a curate (Phase 7). |
|
|
229
|
+
| `goal-skill` | End-to-end build of a goal | The orchestration pattern this skill mirrors (plan→review→implement→validate ≈ audit→confirm→execute→verify). |
|
|
230
|
+
|
|
231
|
+
## Slash command wiring
|
|
232
|
+
|
|
233
|
+
`/curator` invokes this skill. The natural-language triggers in **When to invoke** also load it.
|
|
234
|
+
(Named `curator`, distinct from `sleep` — sleep consolidates additively; the curator refactors.)
|