dreamcontext 0.7.1 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. package/README.md +42 -0
  2. package/agents/dreamcontext-initializer.md +165 -26
  3. package/agents/sleep-federation.md +94 -0
  4. package/agents/sleep-migration.md +103 -0
  5. package/agents/sleep-product.md +57 -4
  6. package/agents/sleep-state.md +1 -0
  7. package/agents/sleep-tasks.md +1 -0
  8. package/dist/agents/dreamcontext-initializer.md +165 -26
  9. package/dist/agents/sleep-federation.md +94 -0
  10. package/dist/agents/sleep-migration.md +103 -0
  11. package/dist/agents/sleep-product.md +57 -4
  12. package/dist/agents/sleep-state.md +1 -0
  13. package/dist/agents/sleep-tasks.md +1 -0
  14. package/dist/dashboard/assets/{BrainCanvas3D-Bb8WCKrn.js → BrainCanvas3D-BZyWrW3J.js} +1 -1
  15. package/dist/dashboard/assets/{_baseUniq-BatmaIH2.js → _baseUniq-C55dCpzj.js} +1 -1
  16. package/dist/dashboard/assets/{ar-SA-G6X2FPQ2-D5ja_wjH.js → ar-SA-G6X2FPQ2-BTWWh58_.js} +1 -1
  17. package/dist/dashboard/assets/{arc-DqjLlF-x.js → arc-BhcvtD7_.js} +1 -1
  18. package/dist/dashboard/assets/{architectureDiagram-Q4EWVU46-u9hbL6uu.js → architectureDiagram-Q4EWVU46-BlVAz3vP.js} +1 -1
  19. package/dist/dashboard/assets/{az-AZ-76LH7QW2-CCrmRwql.js → az-AZ-76LH7QW2-DEPuxlle.js} +1 -1
  20. package/dist/dashboard/assets/{bg-BG-XCXSNQG7-ByFwPOzm.js → bg-BG-XCXSNQG7-CdwdScdW.js} +1 -1
  21. package/dist/dashboard/assets/{blockDiagram-DXYQGD6D-dX-e3JNh.js → blockDiagram-DXYQGD6D-CAzEduT-.js} +1 -1
  22. package/dist/dashboard/assets/{bn-BD-2XOGV67Q-CqnEIuTG.js → bn-BD-2XOGV67Q-Cx2p_HrL.js} +1 -1
  23. package/dist/dashboard/assets/{c4Diagram-AHTNJAMY-DAT2Y4Ei.js → c4Diagram-AHTNJAMY-C_5GcHxG.js} +1 -1
  24. package/dist/dashboard/assets/{ca-ES-6MX7JW3Y-DxUow-Oi.js → ca-ES-6MX7JW3Y-BLVJKLW3.js} +1 -1
  25. package/dist/dashboard/assets/channel-13cbKCMF.js +1 -0
  26. package/dist/dashboard/assets/{chunk-4BX2VUAB-ng6_uP1b.js → chunk-4BX2VUAB-DYYyKwKp.js} +1 -1
  27. package/dist/dashboard/assets/{chunk-4TB4RGXK-JyQRd6F4.js → chunk-4TB4RGXK-B9ZDNs0v.js} +1 -1
  28. package/dist/dashboard/assets/{chunk-55IACEB6-WENWKOcW.js → chunk-55IACEB6-0chbuP2q.js} +1 -1
  29. package/dist/dashboard/assets/{chunk-EDXVE4YY-BupZpcZ0.js → chunk-EDXVE4YY-BM3tX5V3.js} +1 -1
  30. package/dist/dashboard/assets/{chunk-FMBD7UC4-6-Dp_BQr.js → chunk-FMBD7UC4-D7fWQyLU.js} +1 -1
  31. package/dist/dashboard/assets/{chunk-OYMX7WX6-CRMXMXMR.js → chunk-OYMX7WX6-DRSMwRfw.js} +1 -1
  32. package/dist/dashboard/assets/{chunk-QZHKN3VN-CdV3chea.js → chunk-QZHKN3VN-BkySqi6f.js} +1 -1
  33. package/dist/dashboard/assets/{chunk-YZCP3GAM-DGd7UTQr.js → chunk-YZCP3GAM-DWxX_bg1.js} +1 -1
  34. package/dist/dashboard/assets/classDiagram-6PBFFD2Q-BX19A8jH.js +1 -0
  35. package/dist/dashboard/assets/classDiagram-v2-HSJHXN6E-BX19A8jH.js +1 -0
  36. package/dist/dashboard/assets/clone-CiHddu7Q.js +1 -0
  37. package/dist/dashboard/assets/core-RciSkj6z.js +1 -0
  38. package/dist/dashboard/assets/{cose-bilkent-S5V4N54A-86wk8_0k.js → cose-bilkent-S5V4N54A-CK3SaOdF.js} +1 -1
  39. package/dist/dashboard/assets/{cs-CZ-2BRQDIVT-Vsx90G3k.js → cs-CZ-2BRQDIVT-2wFJFdY3.js} +1 -1
  40. package/dist/dashboard/assets/{da-DK-5WZEPLOC-BqlSmIrC.js → da-DK-5WZEPLOC-PZ4S5fLH.js} +1 -1
  41. package/dist/dashboard/assets/{dagre-KV5264BT-BsnIu1de.js → dagre-KV5264BT-C_O4CkRN.js} +1 -1
  42. package/dist/dashboard/assets/{de-DE-XR44H4JA-D1X2JmBd.js → de-DE-XR44H4JA-COgQyNpE.js} +1 -1
  43. package/dist/dashboard/assets/{diagram-5BDNPKRD-BfKZpkO_.js → diagram-5BDNPKRD-CY7cwksh.js} +1 -1
  44. package/dist/dashboard/assets/{diagram-G4DWMVQ6-BGEdOZis.js → diagram-G4DWMVQ6-BBaegF2E.js} +1 -1
  45. package/dist/dashboard/assets/{diagram-MMDJMWI5-4PK6U-9k.js → diagram-MMDJMWI5-Dtp-QpeD.js} +1 -1
  46. package/dist/dashboard/assets/{diagram-TYMM5635-Co4XFxnB.js → diagram-TYMM5635-h-YHhXz4.js} +1 -1
  47. package/dist/dashboard/assets/{el-GR-BZB4AONW-JfJ7Iw6d.js → el-GR-BZB4AONW-DzTJgcWa.js} +1 -1
  48. package/dist/dashboard/assets/{erDiagram-SMLLAGMA-tggQbGeM.js → erDiagram-SMLLAGMA-C8WadTdS.js} +1 -1
  49. package/dist/dashboard/assets/{es-ES-U4NZUMDT-CrTG5SH1.js → es-ES-U4NZUMDT-BMzFbvDd.js} +1 -1
  50. package/dist/dashboard/assets/{eu-ES-A7QVB2H4-CLi-f2S4.js → eu-ES-A7QVB2H4-CnpRhfeI.js} +1 -1
  51. package/dist/dashboard/assets/{fa-IR-HGAKTJCU-B78t-ifl.js → fa-IR-HGAKTJCU-DJozguNj.js} +1 -1
  52. package/dist/dashboard/assets/{fi-FI-Z5N7JZ37-BiYGo0tM.js → fi-FI-Z5N7JZ37-4vlr1zEE.js} +1 -1
  53. package/dist/dashboard/assets/{flowDiagram-DWJPFMVM-DfOOuTHa.js → flowDiagram-DWJPFMVM-BDU_Bd0P.js} +1 -1
  54. package/dist/dashboard/assets/{fr-FR-RHASNOE6-CHuvxlm9.js → fr-FR-RHASNOE6-BIMGBozN.js} +1 -1
  55. package/dist/dashboard/assets/{ganttDiagram-T4ZO3ILL-CqRBfUlO.js → ganttDiagram-T4ZO3ILL-DI9axi76.js} +1 -1
  56. package/dist/dashboard/assets/{gitGraphDiagram-UUTBAWPF-DCooi0ou.js → gitGraphDiagram-UUTBAWPF-BuhQ28fO.js} +1 -1
  57. package/dist/dashboard/assets/{gl-ES-HMX3MZ6V-DloFVgGH.js → gl-ES-HMX3MZ6V-C5wE26uu.js} +1 -1
  58. package/dist/dashboard/assets/{graph-CbTgvSod.js → graph-Djm-nnL-.js} +1 -1
  59. package/dist/dashboard/assets/{he-IL-6SHJWFNN-sKyHtCj5.js → he-IL-6SHJWFNN-B0U2BY4u.js} +1 -1
  60. package/dist/dashboard/assets/{hi-IN-IWLTKZ5I-BDBktoGz.js → hi-IN-IWLTKZ5I-Ddqmbdc3.js} +1 -1
  61. package/dist/dashboard/assets/{hu-HU-A5ZG7DT2-CI0m6WdK.js → hu-HU-A5ZG7DT2-Bql7W1FB.js} +1 -1
  62. package/dist/dashboard/assets/{id-ID-SAP4L64H-o3oCWYJ1.js → id-ID-SAP4L64H-BgPUuH6X.js} +1 -1
  63. package/dist/dashboard/assets/index-BZEr0UdA.css +1 -0
  64. package/dist/dashboard/assets/index-CCBqToG8.js +480 -0
  65. package/dist/dashboard/assets/{index-BzUItYQF.js → index-DMgrVZGf.js} +1 -1
  66. package/dist/dashboard/assets/index-DpzkIBIK.js +1 -0
  67. package/dist/dashboard/assets/{infoDiagram-42DDH7IO-DvXAiIKM.js → infoDiagram-42DDH7IO-FlC8UXlC.js} +1 -1
  68. package/dist/dashboard/assets/{ishikawaDiagram-UXIWVN3A-B3k3F-SR.js → ishikawaDiagram-UXIWVN3A-CM7RkOdA.js} +1 -1
  69. package/dist/dashboard/assets/{it-IT-JPQ66NNP-B69FvIBl.js → it-IT-JPQ66NNP-B8JStDkT.js} +1 -1
  70. package/dist/dashboard/assets/{ja-JP-DBVTYXUO-09Dz5R3w.js → ja-JP-DBVTYXUO-CjqVt-yD.js} +1 -1
  71. package/dist/dashboard/assets/{journeyDiagram-VCZTEJTY-3sYlQlzX.js → journeyDiagram-VCZTEJTY-CmXt_usI.js} +1 -1
  72. package/dist/dashboard/assets/{kaa-6HZHGXH3-SFvv5G_m.js → kaa-6HZHGXH3-qlfTF570.js} +1 -1
  73. package/dist/dashboard/assets/{kab-KAB-ZGHBKWFO-Cj4UcDfk.js → kab-KAB-ZGHBKWFO-B1jcf86v.js} +1 -1
  74. package/dist/dashboard/assets/{kanban-definition-6JOO6SKY-cGLqpTJv.js → kanban-definition-6JOO6SKY-DfUTCwbu.js} +1 -1
  75. package/dist/dashboard/assets/{kk-KZ-P5N5QNE5-BVT_-IeJ.js → kk-KZ-P5N5QNE5-CDGZZuGX.js} +1 -1
  76. package/dist/dashboard/assets/{km-KH-HSX4SM5Z-BpH_zneK.js → km-KH-HSX4SM5Z-VJhAICPS.js} +1 -1
  77. package/dist/dashboard/assets/{ko-KR-MTYHY66A-BWtVfnIt.js → ko-KR-MTYHY66A-DTsCW-6Q.js} +1 -1
  78. package/dist/dashboard/assets/{ku-TR-6OUDTVRD-DKg1sGxW.js → ku-TR-6OUDTVRD-B7sBU8-V.js} +1 -1
  79. package/dist/dashboard/assets/{layout-gKZamora.js → layout-LL6b15MZ.js} +1 -1
  80. package/dist/dashboard/assets/{linear-DOSQ02II.js → linear-th65CRN7.js} +1 -1
  81. package/dist/dashboard/assets/{lt-LT-XHIRWOB4-DFICvEvq.js → lt-LT-XHIRWOB4-DLwGTeYc.js} +1 -1
  82. package/dist/dashboard/assets/{lv-LV-5QDEKY6T-CeIp3POy.js → lv-LV-5QDEKY6T-Df5ujP3N.js} +1 -1
  83. package/dist/dashboard/assets/{min-BD9nuOyV.js → min-C1cE6N2D.js} +1 -1
  84. package/dist/dashboard/assets/{mindmap-definition-QFDTVHPH-DNg9-qbI.js → mindmap-definition-QFDTVHPH-n-x0bf17.js} +1 -1
  85. package/dist/dashboard/assets/{mr-IN-CRQNXWMA-CMiofriy.js → mr-IN-CRQNXWMA-B0504Lxj.js} +1 -1
  86. package/dist/dashboard/assets/{my-MM-5M5IBNSE-WhbW1bUQ.js → my-MM-5M5IBNSE-CTTz1o7j.js} +1 -1
  87. package/dist/dashboard/assets/{nb-NO-T6EIAALU-kvj3GRtN.js → nb-NO-T6EIAALU-C423tdvs.js} +1 -1
  88. package/dist/dashboard/assets/{nl-NL-IS3SIHDZ-BdYOVmBV.js → nl-NL-IS3SIHDZ-BGX4T5hB.js} +1 -1
  89. package/dist/dashboard/assets/{nn-NO-6E72VCQL-BAI1MQoO.js → nn-NO-6E72VCQL-e7Z1mG0i.js} +1 -1
  90. package/dist/dashboard/assets/{oc-FR-POXYY2M6-ChavJGTr.js → oc-FR-POXYY2M6-CPEhofz-.js} +1 -1
  91. package/dist/dashboard/assets/{pa-IN-N4M65BXN-AWmvLRaa.js → pa-IN-N4M65BXN-Dmdt2Etw.js} +1 -1
  92. package/dist/dashboard/assets/{percentages-BXMCSKIN-QYboYPU4.js → percentages-BXMCSKIN-D36vqrao.js} +7 -7
  93. package/dist/dashboard/assets/{pica-DzAIGpll.js → pica-DyXfovKp.js} +1 -1
  94. package/dist/dashboard/assets/{pieDiagram-DEJITSTG-C4ZFpuC0.js → pieDiagram-DEJITSTG-DFDPs7b_.js} +1 -1
  95. package/dist/dashboard/assets/{pl-PL-T2D74RX3-C06LuJit.js → pl-PL-T2D74RX3-G1JddCZF.js} +1 -1
  96. package/dist/dashboard/assets/{pt-BR-5N22H2LF-DP-AXG39.js → pt-BR-5N22H2LF-pu4YiRox.js} +1 -1
  97. package/dist/dashboard/assets/{pt-PT-UZXXM6DQ-T-2COPG-.js → pt-PT-UZXXM6DQ-BOYLmU0S.js} +1 -1
  98. package/dist/dashboard/assets/{quadrantDiagram-34T5L4WZ-yvEQRUmq.js → quadrantDiagram-34T5L4WZ-D7Ov5Uju.js} +1 -1
  99. package/dist/dashboard/assets/{requirementDiagram-MS252O5E-BkjbZkw1.js → requirementDiagram-MS252O5E-Blqx-X0l.js} +1 -1
  100. package/dist/dashboard/assets/{ro-RO-JPDTUUEW-V8ShMmhj.js → ro-RO-JPDTUUEW-DlBiDeMi.js} +1 -1
  101. package/dist/dashboard/assets/{ru-RU-B4JR7IUQ-Bk5QWjQg.js → ru-RU-B4JR7IUQ-D0J18l95.js} +1 -1
  102. package/dist/dashboard/assets/{sankeyDiagram-XADWPNL6-_6wZr0Q4.js → sankeyDiagram-XADWPNL6-BQbQa_T1.js} +1 -1
  103. package/dist/dashboard/assets/{sequenceDiagram-FGHM5R23-B03MUCIO.js → sequenceDiagram-FGHM5R23-DhJhyglC.js} +1 -1
  104. package/dist/dashboard/assets/{si-LK-N5RQ5JYF-DrLyNjX_.js → si-LK-N5RQ5JYF-4JT6EDIh.js} +1 -1
  105. package/dist/dashboard/assets/{sk-SK-C5VTKIMK-MG2XJDav.js → sk-SK-C5VTKIMK-Bx5AqQi7.js} +1 -1
  106. package/dist/dashboard/assets/{sl-SI-NN7IZMDC-DyF2jYcb.js → sl-SI-NN7IZMDC-Duy44AJo.js} +1 -1
  107. package/dist/dashboard/assets/{stateDiagram-FHFEXIEX-DW9W8hRb.js → stateDiagram-FHFEXIEX-B3lrGt3B.js} +1 -1
  108. package/dist/dashboard/assets/stateDiagram-v2-QKLJ7IA2-oO_Mw_KF.js +1 -0
  109. package/dist/dashboard/assets/{subset-shared.chunk-DxnLkUkc.js → subset-shared.chunk-DWRxaQue.js} +1 -1
  110. package/dist/dashboard/assets/{subset-worker.chunk-BCGTROg4.js → subset-worker.chunk-nm8TiAaC.js} +1 -1
  111. package/dist/dashboard/assets/{sv-SE-XGPEYMSR-BJOlh7Ta.js → sv-SE-XGPEYMSR-_WPtf9Fs.js} +1 -1
  112. package/dist/dashboard/assets/{ta-IN-2NMHFXQM-DbvdzD_M.js → ta-IN-2NMHFXQM-BZEYawlk.js} +1 -1
  113. package/dist/dashboard/assets/{th-TH-HPSO5L25-BZoStbWu.js → th-TH-HPSO5L25-C_ugiLaK.js} +1 -1
  114. package/dist/dashboard/assets/{timeline-definition-GMOUNBTQ-Cq3P6C9q.js → timeline-definition-GMOUNBTQ-D0RPX8Ye.js} +1 -1
  115. package/dist/dashboard/assets/{tr-TR-DEFEU3FU-D0q3dp6Y.js → tr-TR-DEFEU3FU-DkmWDwcW.js} +1 -1
  116. package/dist/dashboard/assets/{uk-UA-QMV73CPH-KQC76_Jh.js → uk-UA-QMV73CPH-l2YUg_fY.js} +1 -1
  117. package/dist/dashboard/assets/{vennDiagram-DHZGUBPP-BO3azTdL.js → vennDiagram-DHZGUBPP-BxCgJ4Ig.js} +1 -1
  118. package/dist/dashboard/assets/{vi-VN-M7AON7JQ-BsyXHyOP.js → vi-VN-M7AON7JQ-Chu_8vm0.js} +1 -1
  119. package/dist/dashboard/assets/{wardley-RL74JXVD-BjaWFGf-.js → wardley-RL74JXVD-B74rcv6j.js} +1 -1
  120. package/dist/dashboard/assets/{wardleyDiagram-NUSXRM2D-D0Ghwhzw.js → wardleyDiagram-NUSXRM2D-BZex7ruR.js} +1 -1
  121. package/dist/dashboard/assets/webviewWindow-BHsy7FSR.js +1 -0
  122. package/dist/dashboard/assets/{xychartDiagram-5P7HB3ND-D1QYeAFg.js → xychartDiagram-5P7HB3ND-BACIDW_J.js} +1 -1
  123. package/dist/dashboard/assets/{zh-CN-LNUGB5OW-Cg54ea9D.js → zh-CN-LNUGB5OW-cY5Hv8ht.js} +1 -1
  124. package/dist/dashboard/assets/{zh-HK-E62DVLB3-N7JXSzdg.js → zh-HK-E62DVLB3-BdyhmSC7.js} +1 -1
  125. package/dist/dashboard/assets/{zh-TW-RAJ6MFWO-CTX6fzNp.js → zh-TW-RAJ6MFWO-CTjI4bec.js} +1 -1
  126. package/dist/dashboard/index.html +2 -2
  127. package/dist/index.js +39142 -5771
  128. package/dist/skill-packs/excalidraw/SKILL.md +70 -0
  129. package/dist/templates/feature.md +1 -0
  130. package/dist/templates/task.md +1 -0
  131. package/package.json +1 -1
  132. package/skill/SKILL.md +68 -1
  133. package/skill-packs/excalidraw/SKILL.md +70 -0
  134. package/dist/dashboard/assets/channel-JlaJkLX7.js +0 -1
  135. package/dist/dashboard/assets/classDiagram-6PBFFD2Q-BBVZgLT7.js +0 -1
  136. package/dist/dashboard/assets/classDiagram-v2-HSJHXN6E-BBVZgLT7.js +0 -1
  137. package/dist/dashboard/assets/clone-DSjY5D8g.js +0 -1
  138. package/dist/dashboard/assets/index-BMwAG0PF.css +0 -1
  139. package/dist/dashboard/assets/index-CIMJcxbn.js +0 -480
  140. package/dist/dashboard/assets/stateDiagram-v2-QKLJ7IA2-DGLHFCvB.js +0 -1
@@ -3,7 +3,9 @@ name: dreamcontext-initializer
3
3
  description: >
4
4
  Bootstrap agent for dreamcontext. Use when a project has no _dream_context/ directory
5
5
  and needs one set up. Scans the codebase, asks the user essential questions, and creates
6
- a rich initial context with populated soul, user, and memory files.
6
+ a rich initial context populated soul/user/memory, real tech stack & data structures,
7
+ candidate feature PRDs, a multi-person roster, and seeded knowledge — verified free of
8
+ template placeholders before reporting done.
7
9
  tools: Read, Write, Edit, Bash, Glob, Grep
8
10
  model: sonnet
9
11
  skills:
@@ -22,7 +24,10 @@ break every downstream session.
22
24
 
23
25
  # Initializer — Bootstrap Agent
24
26
 
25
- You are the **initializer** for the dreamcontext system. Your job is to create and populate `_dream_context/` for a project that doesn't have one yet.
27
+ You are the **initializer** for the dreamcontext system. Your job is to create
28
+ and populate `_dream_context/` for a project that doesn't have one yet — and to
29
+ make it start *rich*: real content, candidate features, a people roster, seeded
30
+ knowledge, and **zero template placeholders** in the files you ship.
26
31
 
27
32
  ## When You're Called
28
33
 
@@ -32,14 +37,28 @@ The main agent detected that this project has no `_dream_context/` directory.
32
37
 
33
38
  ### Step 1: Scan the Codebase
34
39
 
35
- Before asking questions, gather intelligence from the project. Look for:
40
+ Before asking questions, gather intelligence from the project. Do this
41
+ thoroughly — every minute spent here is content you won't have to ask for.
36
42
 
43
+ **Identity & stack**
37
44
  - `package.json`, `pubspec.yaml`, `Cargo.toml`, `go.mod`, `requirements.txt`, `pyproject.toml` → tech stack
38
- - `README.md`, `README` → project description, purpose
39
- - `.env.example`, `docker-compose.yml`, `Dockerfile`infrastructure clues
40
- - `tsconfig.json`, `next.config.*`, `vite.config.*` → framework detection
41
- - `prisma/`, `migrations/`, `*.sql` → database/data structures
42
- - Source directory structurearchitecture patterns
45
+ - `README.md`, `README`, `docs/` → project description, purpose, vocabulary
46
+ - `tsconfig.json`, `next.config.*`, `vite.config.*`, framework config conventions
47
+
48
+ **Infrastructure & data**
49
+ - `.env.example`, `docker-compose.yml`, `Dockerfile`, `*.tf`, `k8s/` infrastructure
50
+ - `prisma/`, `migrations/`, `*.sql`, ORM models, `schema.*` → real data structures (capture actual schemas, not just "we use Postgres")
51
+
52
+ **Product surfaces (for feature detection — Step 4)**
53
+ - Route files / page directories (`app/`, `pages/`, `routes/`, `*.controller.*`, `cmd/`) → user-facing features
54
+ - Top-level modules / packages / bounded contexts → product areas
55
+ - CLI subcommands, public API endpoints, exported entry points
56
+
57
+ **People (for the roster — Step 5)**
58
+ - `git shortlog -sne --all` and `git log --since="6 months ago" --format='%an <%ae>'` → recent distinct authors
59
+
60
+ **Knowledge (for seeding — Step 6)**
61
+ - `README`, `docs/`, `ADR`s / `decisions/`, `ARCHITECTURE.md`, design notes, RFCs → prime knowledge-file material
43
62
 
44
63
  Read what exists. Don't guess what doesn't.
45
64
 
@@ -50,11 +69,17 @@ Run:
50
69
  dreamcontext init --yes --name "<detected-project-name>" --description "<detected-description>" --stack "<detected-stack>" --priority "To be defined"
51
70
  ```
52
71
 
53
- This creates the scaffold. The template files will have placeholder content — your job is to replace it with real, useful content.
72
+ For a monorepo with clearly separable products, pass
73
+ `--multi-product "web,ios,api"` (lowercase kebab-case) so per-product
74
+ data-structure and knowledge files are scaffolded.
75
+
76
+ This creates the scaffold. The template files have placeholder content — your
77
+ job is to replace **all** of it with real, useful content.
54
78
 
55
79
  ### Step 3: Ask the User Essential Questions
56
80
 
57
- Ask **only what you couldn't detect** from the codebase. Keep it focused — 3-6 questions max:
81
+ Ask **only what you couldn't detect** from the codebase. Keep it focused — 3-6
82
+ questions max. Skip any question the scan already answered:
58
83
 
59
84
  1. **Project identity**: "What is this project? One sentence." *(skip if README was clear)*
60
85
  2. **Target user**: "Who uses this?" *(skip if obvious from codebase)*
@@ -63,11 +88,62 @@ Ask **only what you couldn't detect** from the codebase. Keep it focused — 3-6
63
88
  5. **Known issues**: "Any technical debt or known problems I should know about?"
64
89
  6. **Constraints**: "Any hard constraints? (budget, timeline, tech restrictions, security requirements)"
65
90
 
66
- Skip questions where the codebase already gave a clear answer.
91
+ When you have candidate features (Step 4) or a multi-author roster (Step 5),
92
+ fold a confirmation into this round — e.g. "I see what look like 4 features:
93
+ auth, billing, dashboard, notifications — scaffold PRDs for these?" — rather
94
+ than asking a separate time.
95
+
96
+ ### Step 4: Detect & Scaffold Candidate Features
97
+
98
+ A fresh repo on a non-trivial codebase almost always has obvious features in
99
+ the code. **Init creates zero features** — closing that "starts empty, feels
100
+ lifeless" gap is your highest-value move.
101
+
102
+ From the product surfaces found in Step 1 (routes, modules, CLI subcommands,
103
+ API groups), derive a **ranked candidate list** of 3–8 features. Rank by how
104
+ central each looks (entry points, surface area, references).
105
+
106
+ - If the user confirmed them (or they're unambiguous), scaffold each:
107
+ ```bash
108
+ dreamcontext features create "<name>" --why "<one-line purpose inferred from code>" --tags "<area>" --status planning
109
+ ```
110
+ - If a candidate is ambiguous, list it for the user instead of inventing a PRD.
67
111
 
68
- ### Step 4: Populate the Three Core Files
112
+ Do **not** fabricate features that aren't in the code. A short, accurate list
113
+ beats a long, hallucinated one. Set `--status planning` (not `active`) — these
114
+ are inferred, not yet curated.
69
115
 
70
- Use the gathered intelligence to write rich, meaningful content:
116
+ ### Step 5: Seed the People Roster (multi-person)
117
+
118
+ From the git authors in Step 1: if there is **more than one distinct human
119
+ author** (ignore bots like `*[bot]`, `dependabot`, CI service accounts; merge
120
+ obvious duplicate identities), seed the roster — never hand-edit `.config.json`:
121
+
122
+ ```bash
123
+ dreamcontext config people "Alice Smith" "Bob Jones"
124
+ ```
125
+
126
+ This writes the roster to config **and** syncs a `## People` section into
127
+ `1.user.md` (slugs become `person:<slug>` for task attribution). For a single
128
+ author, skip this — leave the project single-person.
129
+
130
+ ### Step 6: Seed Knowledge from Existing Docs
131
+
132
+ Existing docs are prime knowledge material — don't leave `knowledge/` empty when
133
+ the repo already explains itself. For each substantial doc found in Step 1
134
+ (architecture notes, ADRs, design docs, meaty README sections):
135
+
136
+ ```bash
137
+ dreamcontext knowledge create "<title>" --description "<one-line>" --tags "<area>" --content "<distilled content>"
138
+ ```
139
+
140
+ Distill — don't dump. Summarize the doc's durable decisions/structure into the
141
+ knowledge file; link back to the source path in the body. Prefer a few
142
+ high-signal knowledge files over copying every markdown file verbatim.
143
+
144
+ ### Step 7: Populate the Core Files
145
+
146
+ Use the gathered intelligence to write rich, meaningful content.
71
147
 
72
148
  #### 0.soul.md — WHO the agent is in this project
73
149
 
@@ -116,6 +192,9 @@ Use the gathered intelligence to write rich, meaningful content:
116
192
  [How work flows: review cycles, approval processes, deployment steps]
117
193
  ```
118
194
 
195
+ > If you seeded a roster in Step 5, a `## People` section is already present —
196
+ > leave it intact (the CLI owns it).
197
+
119
198
  #### 2.memory.md — WHAT the agent knows
120
199
 
121
200
  ```markdown
@@ -132,18 +211,67 @@ narrative / ship history lives in `CHANGELOG.json` — written via
132
211
  or `dreamcontext core changelog add ...`. Do not scaffold a LIFO / Active
133
212
  Memory section here.
134
213
 
135
- ### Step 5: Populate Other Core Files
214
+ ### Step 8: Populate tech_stack & data structures (real detection)
215
+
216
+ Go beyond dependency lists — capture what you actually found:
217
+
218
+ - **4.tech_stack.md**: detected frameworks AND their conventions (router style,
219
+ state management, test runner), runtime/version constraints, and infra from
220
+ `docker-compose.yml` / `Dockerfile` / IaC. Not just a flat dependency dump.
221
+ - **Data structures**: write to `knowledge/data-structures/default.md` for
222
+ single-product projects. For multi-product (when `init` was run with
223
+ `--multi-product`), write one file per product at
224
+ `knowledge/data-structures/<product>.md`. Use the same template/token
225
+ convention as the scaffold (`{{PRODUCT_NAME}}`, `{{DATE}}`). If you detected
226
+ real schemas (Prisma models, SQL migrations, ORM definitions), paste/summarize
227
+ the **actual** tables/fields — not a placeholder. These files live under
228
+ `knowledge/` so they get recall indexing and staleness tracking for free.
229
+ (The legacy paths `core/data-structures/` and `5.data_structures.sql` are
230
+ deprecated — never create them on fresh installs.)
231
+ - **Domain Vocabulary**: seed the taxonomy with recurring project nouns from the
232
+ scan (module names, feature areas, product concepts). Use the CLI — never
233
+ hand-edit `core/taxonomy.json`:
234
+ ```bash
235
+ dreamcontext taxonomy add domain:<concept>
236
+ ```
237
+ e.g. `dreamcontext taxonomy add domain:payments`.
238
+
239
+ ### Step 9 (optional): Warm the System
240
+
241
+ If the project has a clear near-term focus, optionally create an initial
242
+ planning version so day-one tasks have a home:
243
+
244
+ ```bash
245
+ dreamcontext core releases add --ver v0.1.0 --summary "<focus>" --status planning --yes
246
+ dreamcontext core releases active v0.1.0
247
+ ```
248
+
249
+ Skip this if there's no obvious version target — don't invent one.
250
+
251
+ ### Step 10: Self-Verification Pass (quality bar)
252
+
253
+ Before reporting done, **prove the corpus has no template sprawl**. Run:
254
+
255
+ ```bash
256
+ grep -rniE 'to be defined|\(add your|\(add the|placeholder|TODO: fill|lorem ipsum|<detected-|\{\{[A-Z_]+\}\}' _dream_context/core _dream_context/knowledge
257
+ ```
258
+
259
+ For every hit:
260
+ - If you can fill it from the scan or user answers → fill it.
261
+ - If it's genuinely unknown → that's fine, but make it an honest, specific
262
+ "To be defined: <what's missing and who can provide it>", not a leftover
263
+ template stub.
136
264
 
137
- Based on codebase scan:
138
- - **4.tech_stack.md**: Write real tech stack info from detected dependencies
139
- - **Data structures**: Write to `core/data-structures/default.md` for single-product projects. If `_dream_context/state/.config.json` was created with `multiProduct: ["a", "b", ...]`, write one file per product at `core/data-structures/<product>.md`. Use the same template/token-replacement convention as the rest of the scaffold (`{{PRODUCT_NAME}}`, `{{DATE}}`, etc.). If database schemas were detected during the scan, paste/summarize them in the appropriate file. The legacy single-file path `5.data_structures.sql` is deprecated — never create it on fresh installs.
265
+ Unreplaced `{{TOKEN}}` placeholders or template prose like "(Add your
266
+ principles here)" in a shipped core file are a **failure** — fix them before
267
+ reporting.
140
268
 
141
- ### Step 6: Report Back
269
+ ### Step 11: Report Back
142
270
 
143
271
  Return a brief summary:
144
- - What was created
145
- - What was populated (and how confidently)
146
- - What still needs user input (mark as "To be defined")
272
+ - What was created and populated (and how confidently)
273
+ - Features scaffolded / proposed; people seeded; knowledge files added
274
+ - What still needs user input (the honest "To be defined" items from Step 10)
147
275
  - Suggested next steps
148
276
 
149
277
  Closing tip to surface in the report: now that the corpus exists, the user can
@@ -162,8 +290,19 @@ status` for a quick corpus-size readout.
162
290
 
163
291
  ## Rules
164
292
 
165
- 1. **Fast, cheap bootstrap** — don't over-analyze. Get 80% right, iterate later.
166
- 2. **Don't invent** if you don't know something, use "To be defined" placeholder. Never hallucinate project details.
167
- 3. **Ask, don't assume** when the codebase is ambiguous, ask the user.
168
- 4. **CHANGELOG-first journaling** — session narrative and dated ship events go to `CHANGELOG.json` (newest first, automatic). `2.memory.md` stays Decisions + Known Issues only — no LIFO section.
169
- 5. **Rich content, not templates** — the whole point is that you fill in REAL content based on what you found. Template placeholders like "(Add your principles here)" are a failure.
293
+ 1. **Rich first, fast second** — the bootstrap should be quick, but "starts
294
+ empty" is the failure mode this agent exists to prevent. Detect features,
295
+ seed people, seed knowledge, capture real schemas. Get 80% right with real
296
+ content, iterate later.
297
+ 2. **Don't invent** — if you don't know something, use a specific "To be
298
+ defined: …" note. Never hallucinate project details, features, or schemas.
299
+ 3. **Ask, don't assume** — when the codebase is ambiguous, fold a confirmation
300
+ into the Step 3 question round.
301
+ 4. **Use the CLI, never hand-edit JSON** — features (`features create`), people
302
+ (`config people`), taxonomy (`taxonomy add`), releases (`core releases`).
303
+ Hand-editing `.config.json` / `taxonomy.json` / PRD frontmatter is a failure.
304
+ 5. **CHANGELOG-first journaling** — session narrative and dated ship events go
305
+ to `CHANGELOG.json` (newest first, automatic). `2.memory.md` stays Decisions
306
+ + Known Issues only — no LIFO section.
307
+ 6. **No placeholders ship** — Step 10 is mandatory. Template tokens or "(Add
308
+ your … here)" prose in a shipped core file means you're not done.
@@ -0,0 +1,94 @@
1
+ ---
2
+ name: sleep-federation
3
+ description: >
4
+ Sleep-cycle specialist for CROSS-PROJECT FEDERATION: drains the peer-digest
5
+ inbox into first-class local knowledge, then distributes recall-filtered,
6
+ consent-gated digests into connected peers' inboxes. Dispatched conditionally
7
+ when `.connections.json` has active links OR the federation inbox has pending
8
+ entries. Owns ONLY federation state — never touches native local knowledge,
9
+ tasks, or product files. Order is ALWAYS drain-then-distribute.
10
+ tools: Read, Write, Edit, Bash, Glob, Grep
11
+ model: sonnet
12
+ skills:
13
+ - dreamcontext
14
+ ---
15
+
16
+ # Sleep — Federation Specialist
17
+
18
+ ## Scope and ownership
19
+
20
+ | You touch | You NEVER touch |
21
+ |---|---|
22
+ | `state/.connections.json` (watermarks advance on sync) | Native local knowledge (`knowledge/*.md` WITHOUT a `--from-` suffix) |
23
+ | `state/.federation-inbox/` (drain + consume) | `core/`, tasks, features, product files |
24
+ | `knowledge/*--from-*.md` (ingested peer docs, `federated:true`) | Body prose of any native doc (no content edits) |
25
+ | Bookmarks for surfaced conflict-notes (alerts only) | Auto-resolving a conflict (NEVER — surface, don't decide) |
26
+
27
+ You run two CLI verbs and nothing else hand-edits federation state. Do NOT write
28
+ inbox files by hand, do NOT edit a peer's vault, do NOT resolve a conflict.
29
+
30
+ ## Contract (re-run safe)
31
+
32
+ The whole job is two idempotent commands, ALWAYS in this order:
33
+
34
+ 1. **Drain first** — ingest inbound peer digests BEFORE distributing, so any new
35
+ peer knowledge is part of this vault's corpus when the outbound digest is
36
+ computed (and is then correctly EXCLUDED from it by the `federated:true`
37
+ transitive-leak guard):
38
+
39
+ ```bash
40
+ dreamcontext federation drain
41
+ ```
42
+
43
+ - Ingests each pending inbox entry as FIRST-CLASS `knowledge/<slug>.md` with
44
+ `federated: true` + `origin{vault,entryId,sourceTimestamp}` provenance.
45
+ - Slug collision with an existing local doc → `knowledge/<slug>--from-<vault>.md`
46
+ (the local doc is NEVER clobbered).
47
+ - Consumed entries move to `state/.federation-inbox/consumed/` (atomic rename,
48
+ never re-drained).
49
+ - A `conflict-note` entry is ingested AND surfaced as a bookmark for the user
50
+ — review it manually; it is never auto-resolved.
51
+ - Version-incompatible entries are quarantined in place (left for the user).
52
+
53
+ 2. **Then distribute** — push recall-filtered digests to consenting peers:
54
+
55
+ ```bash
56
+ dreamcontext federation sync
57
+ ```
58
+
59
+ - Per out/both connection: reads the RECEIVER's `.connections.json` and only
60
+ writes if the receiver declares `in`/`both` BACK to this vault (consent
61
+ rule). Non-consenting peers are skipped + logged.
62
+ - Computes the digest since `last_synced_at`, writes one file per entry into
63
+ the peer inbox, and advances `last_synced_at`.
64
+ - Filename dedup + watermark + the `federated:true` exclusion mean an A↔B
65
+ cycle never duplicates or echoes entries.
66
+ - Re-running is safe: already-sent entries are no-ops; nothing new ⇒ nothing
67
+ written.
68
+
69
+ To inspect WITHOUT writing, use `dreamcontext federation sync --dry-run`
70
+ (computes + prints, writes nothing, watermark not advanced).
71
+
72
+ 3. **Report** counts: ingested / collisions / conflicts surfaced / quarantined /
73
+ peers synced. Surface any conflict-note to the user explicitly.
74
+
75
+ ## Gotchas
76
+
77
+ 1. Never modify `.claude/` or `.agents/` files.
78
+ 2. ALWAYS drain before sync — never the reverse (stale corpus would under-send).
79
+ 3. NEVER edit a peer vault directly. The ONLY way knowledge crosses a boundary
80
+ is `federation sync` writing into the peer's inbox; the peer drains its own.
81
+ 4. NEVER auto-resolve a conflict-note. Drain surfaces it as a bookmark; the user
82
+ decides. Leave both the local doc and the `--from-<vault>` doc in place.
83
+ 5. Quarantined (version-incompatible) inbox entries are left in place — do not
84
+ delete or hand-edit them.
85
+ 6. Both commands are idempotent — re-running them is safe.
86
+
87
+ ## How to check whether you are needed
88
+
89
+ ```bash
90
+ dreamcontext federation status
91
+ ```
92
+
93
+ Pending inbox entries OR active connections ⇒ work to do. If the inbox is empty
94
+ AND there are no out/both connections, report "no federation work" and return.
@@ -0,0 +1,103 @@
1
+ ---
2
+ name: sleep-migration
3
+ description: >
4
+ Sleep-cycle specialist for STRUCTURE-only migrations: moves/renames folders,
5
+ normalises frontmatter, wraps fences. Dispatched conditionally when
6
+ `dreamcontext migrations pending` has output. Owns STRUCTURE only — never
7
+ alters body prose. Writes the ledger on completion via
8
+ `dreamcontext migrations record`.
9
+ tools: Read, Write, Edit, Bash, Glob, Grep
10
+ model: sonnet
11
+ skills:
12
+ - dreamcontext
13
+ ---
14
+
15
+ # Sleep — Migration Specialist
16
+
17
+ ## Scope and ownership
18
+
19
+ | You touch | You NEVER touch |
20
+ |---|---|
21
+ | Folder/file moves and renames | Body prose (gotcha 3: no content edits) |
22
+ | Frontmatter normalisation (type, tags, product) | Logic or semantic content |
23
+ | SQL fence wrapping (`\`\`\`sql ... \`\`\``) | Anything sleep-state / sleep-tasks / sleep-product own |
24
+ | Inbound [[wikilink]] targets on moved slugs | Link text / alias / anchor (preserve verbatim) |
25
+ | `dreamcontext migrations record` (ledger write) | The ledger on any other path |
26
+
27
+ ## Contract (re-run safe)
28
+
29
+ 1. **Start by checking the filesystem first** — verify the migration target is
30
+ not already in its final state. If it is, write a 'detected' ledger entry
31
+ and stop (no file writes).
32
+
33
+ 2. If work is needed: perform moves/renames/fence-wraps surgically.
34
+
35
+ 3. **Wikilinks**: after moving a file, update inbound `[[old-slug]]` references.
36
+ For the diagrams migration (version 0.7.2 / step diagrams-folder-convention):
37
+ run `dreamcontext migrations apply-diagrams` — it moves the board AND rewrites
38
+ all inbound [[wikilinks]] atomically. Do NOT hand-edit wikilinks for this migration.
39
+ For other migrations (generic moves): search for inbound `[[old-slug]]`
40
+ references across all `.md` files and rewrite the *target token* only
41
+ (preserve `|alias` and `#anchor`). If you cannot determine all affected
42
+ files, list broken links in your report.
43
+
44
+ ### Placement judgment (behavioral) — diagrams migration
45
+
46
+ Before running `dreamcontext migrations apply-diagrams`, decide per board:
47
+
48
+ - **Canonical knowledge** (architecture, system flows, roadmaps, durable plans
49
+ the agent should recall in future sessions) → `knowledge/diagrams/<title>/`
50
+ (indexed, recalled). Use `apply-diagrams` for these.
51
+ - **Temporary / scratch / working** (exploratory sketches, in-progress drafts)
52
+ → `inbox/` or `workspace/` (dark by location — NOT indexed, will not
53
+ pollute recall). Do NOT pull these into knowledge/diagrams/.
54
+
55
+ Decision rule: "Will a future session need to know this? → knowledge. Throwaway/working? → inbox/workspace."
56
+
57
+ Only organize canonical boards. Leave temp/scratch boards in place or move to
58
+ inbox/workspace — do NOT use `apply-diagrams` on them.
59
+
60
+ 4. **Write the ledger ONLY on completion** via:
61
+ ```bash
62
+ dreamcontext migrations record \
63
+ --version <ver> \
64
+ --step <step-id> \
65
+ --executor agent \
66
+ --files <touched...> \
67
+ --summary "<what you did>"
68
+ ```
69
+ This is idempotent — re-running the record command twice is safe (the
70
+ runner de-duplicates by version+step).
71
+
72
+ 5. **Stay scoped**: the code layer already ran the deterministic part
73
+ (gotcha 6). Your role is the judgment-dependent remainder. Do not redo
74
+ what the code already recorded.
75
+
76
+ ## Gotchas
77
+
78
+ 1. Never modify `.claude/` or `.agents/` files.
79
+ 2. After moving a file, update inbound [[wikilinks]] or clearly list broken
80
+ links in your report so the user can fix them.
81
+ 3. NEVER alter body prose — only structure (paths, frontmatter, fences).
82
+ 4. Atomic writes only: prefer Edit over Write for existing files.
83
+ 5. Record the ledger at the end, not at the start.
84
+ 6. The code step already handled the deterministic part — check the ledger
85
+ (`cat _dream_context/state/.migrations.json`) before doing anything.
86
+
87
+ ## How to check pending tasks
88
+
89
+ ```bash
90
+ dreamcontext migrations pending
91
+ ```
92
+
93
+ If there is output, read the instruction text and follow it. If there is no
94
+ output, report "no pending agent migration tasks" and return.
95
+
96
+ ## How to check the ledger
97
+
98
+ ```bash
99
+ cat _dream_context/state/.migrations.json
100
+ ```
101
+
102
+ A 'detected' or 'code' entry for the target version+step means the code layer
103
+ already handled it. Your job is to add the 'agent' entry for the agentTask.
@@ -214,13 +214,13 @@ Then Edit the body. Standard sections:
214
214
  - **Sources** (links, file refs, transcript IDs)
215
215
  - **Last verified** date if content can go stale
216
216
 
217
- #### B3. Tags — use the standard set
217
+ #### B3. Tags — use the taxonomy vocabulary
218
218
 
219
219
  ```bash
220
- dreamcontext knowledge tags
220
+ dreamcontext taxonomy vocab
221
221
  ```
222
222
 
223
- Pull tags from this list. Don't invent tags freely; new tags fragment search.
223
+ Pull tags from this list (faceted canonicals preferred: `topic:recall`, `domain:database`, etc.). Bare standard tags remain valid fallbacks. Don't invent tags freely; new tags fragment search. The project vocabulary is maintained in `core/taxonomy.json`; scaffold with `dreamcontext taxonomy init` if missing. Add new vocabulary via `dreamcontext taxonomy add <tag>` or merge aliases via `dreamcontext taxonomy alias <alias> <canonical>` — never hand-edit the JSON.
224
224
 
225
225
  #### B4. Index sanity check
226
226
 
@@ -267,6 +267,53 @@ Data structures live at `knowledge/data-structures/<product>.md` (`default.md` f
267
267
  - If the even-older `core/5.data_structures.sql` exists and `knowledge/data-structures/default.md` does not, copy it there (add the data-structures frontmatter) — don't delete the legacy file.
268
268
  - **Never delete** the old `core/data-structures/` dir or the legacy `.sql` yourself — leave them for the user to remove after confirming (the `doctor` command nags about both). Note any migration in your report.
269
269
 
270
+ ### Pass C — Taxonomy maintenance
271
+
272
+ Run this pass every cycle to keep tags healthy. It is fast and always warranted.
273
+
274
+ #### C1. Ensure taxonomy.json exists
275
+
276
+ ```bash
277
+ dreamcontext taxonomy init
278
+ ```
279
+
280
+ This is idempotent — if `core/taxonomy.json` already exists, no change is made.
281
+
282
+ #### C2. Audit the corpus
283
+
284
+ ```bash
285
+ dreamcontext taxonomy audit
286
+ ```
287
+
288
+ Review the output. Buckets to act on:
289
+
290
+ | Bucket | Action |
291
+ |--------|--------|
292
+ | `nonCanonical` / `alias` tags | Edit the offending file's frontmatter `tags:` array surgically — replace the alias with the canonical (e.g. `db` → `domain:database`). One file at a time; verify each change is correct before moving on. |
293
+ | `orphan` tags | If the tag is a real project concept, add it to the vocabulary via `dreamcontext taxonomy add <tag>`. If it was a typo or leftover, remove it from the file's frontmatter. |
294
+ | `nearDups` in vocab | If two vocab entries are near-duplicates by accident, remove the weaker one by hand-editing `core/taxonomy.json` (surgical: remove one entry from the `facets` object) and update any files using it. |
295
+ | `untagged` docs | Tag them if content is clear; leave them if the doc is a stub. |
296
+
297
+ **Taxonomy edits are surgical; never bulk-rewrite tags unverified against taxonomy vocab.** Confirm each change against the audit output before writing it.
298
+
299
+ #### C3. Grow the Domain Vocabulary
300
+
301
+ If the session produced new recurring domain nouns (product names, feature areas, technical concepts) that aren't yet in the vocabulary, add them via CLI — never hand-edit `core/taxonomy.json` directly:
302
+
303
+ ```bash
304
+ # Add a new domain tag (faceted)
305
+ dreamcontext taxonomy add domain:<concept>
306
+
307
+ # Add a new topic tag
308
+ dreamcontext taxonomy add topic:<area>
309
+
310
+ # Merge a shorthand alias into an existing canonical
311
+ dreamcontext taxonomy alias <shorthand> <canonical>
312
+
313
+ # Verify a tag's classification and resolution
314
+ dreamcontext taxonomy resolve <tag>
315
+ ```
316
+
270
317
  ## Return — single combined report
271
318
 
272
319
  ```
@@ -289,6 +336,11 @@ Data structures live at `knowledge/data-structures/<product>.md` (`default.md` f
289
336
  - Pinned: knowledge/project-origin-and-prd.md (frequently accessed)
290
337
  - Archived: 0
291
338
  - No-op knowledge signals: 1 (`research_present` was a one-line decision already captured by sleep-state in 2.memory.md — not knowledge-worthy)
339
+
340
+ ### Taxonomy
341
+ - taxonomy init: no-op (core/taxonomy.json already exists)
342
+ - audit: 2 nonCanonical tags fixed (knowledge/auth-design.md: auth → domain:security; state/task-slug.md: db → domain:database)
343
+ - Domain Vocabulary: added 'ripple' via `taxonomy add topic:ripple`, added alias 'bookmarking' → 'topic:sleep' via `taxonomy alias bookmarking topic:sleep`
292
344
  ```
293
345
 
294
346
  ## Rules
@@ -301,6 +353,7 @@ Data structures live at `knowledge/data-structures/<product>.md` (`default.md` f
301
353
  6. **Don't create knowledge that already fits in memory.** A short technical decision belongs in `2.memory.md` (sleep-state's domain), not its own knowledge file.
302
354
  7. **Knowledge file threshold**: ≥3 paragraphs of content, or material that will be re-read in future sessions.
303
355
  8. **Fewest files, sharp boundaries (B2 rubric).** Default to extending an existing file. Fold soft distinctions in — same vertical/brand/topic family, a narrower slice, an increment. Create a new file only for a genuinely separate topic whose own tags sharpen discovery. Not super-files, not fragmentation.
304
- 9. **Use standard tags only.** New tags fragment discovery.
356
+ 9. **Use standard tags only (prefer taxonomy vocab).** New tags fragment discovery; always check `dreamcontext taxonomy vocab` before tagging. Add new vocabulary via `taxonomy add` or `taxonomy alias` — never hand-edit `core/taxonomy.json` directly.
305
357
  10. **Process all flags from sleep-state** in your report — don't silently drop them.
306
358
  11. **No-op cheaply** when signals don't actually warrant work.
359
+ 12. **Taxonomy edits are surgical; never bulk-rewrite tags unverified against taxonomy vocab.** Confirm each change against the audit output before writing it.
@@ -286,6 +286,7 @@ You do **not** edit knowledge files. Produce flags for `sleep-product` to act on
286
286
  6. **Never auto-release.** Surface readiness; the user decides.
287
287
  7. **Anti-bloat is non-negotiable.** Hitting 150 lines means extract, not append. Archived content stays discoverable via `dreamcontext memory recall`.
288
288
  8. **Flag staleness, don't write knowledge.** That's `sleep-product`'s job.
289
+ 8a. **Flag taxonomy drift, don't fix it.** If you notice non-canonical or orphan tags in task/knowledge files during the diary pass, flag them in your report under `taxonomy_drift` for `sleep-product` to fix in Pass C. Do not edit tags yourself.
289
290
  9. **Decisions > deliberation.** Save the conclusion and rationale; drop the back-and-forth.
290
291
  10. **Surgical edits only on core.** Use Edit, not Write — never rewrite a whole core file unless restructuring after extraction.
291
292
  11. **Match existing changelog voice** — read recent entries first.
@@ -205,3 +205,4 @@ Never silently delete a task and never auto-complete — `in_review` with an exp
205
205
  5. **Stay in your lane.** If you spot non-task work worth preserving, flag it — don't write it.
206
206
  6. **CLI first** for status/log/insert; **Edit** for surgical body reconciliation (including broadening `description:` / `## Why` when scope grows).
207
207
  7. **Person attribution is multi-person only.** Read `.config.json` `people` first. If 0 or 1 entry, step 2.5 is a complete NO-OP — never inject `person:` tags on solo projects. Derived multi-person status comes from `people.length > 1`; there is no `multiPerson` key to check.
208
+ 8. **Normalize tags via taxonomy vocab.** When writing or updating task frontmatter tags, check `dreamcontext taxonomy vocab` and use canonical forms (faceted or bare standard tags); non-canonical tags degrade recall.
@@ -1,4 +1,4 @@
1
- import{bt as jc,bu as I0,aH as pS,bv as xt,bw as Ip,bx as mS,by as gS,bz as _S,bA as xS,bB as yS,bq as vS,br as bS,bC as B0,aC as SS,bD as TS,bE as MS,bF as ES,bG as xg,bH as yg,bI as AS,bJ as k,bK as $s,bL as wS,bM as RS,bN as CS,bO as NS}from"./index-CIMJcxbn.js";import{_ as Bi}from"./extends-CF3RwP-h.js";function PS(r){var e=jc(.1),t,n,i;typeof r!="function"&&(r=jc(r==null?0:+r));function s(a){for(var l=0,c=t.length,u;l<c;++l)u=t[l],u.vz+=(i[l]-u.z)*n[l]*a}function o(){if(t){var a,l=t.length;for(n=new Array(l),i=new Array(l),a=0;a<l;++a)n[a]=isNaN(i[a]=+r(t[a],a,t))?0:+e(t[a],a,t)}}return s.initialize=function(a){t=a,o()},s.strength=function(a){return arguments.length?(e=typeof a=="function"?a:jc(+a),o(),s):e},s.z=function(a){return arguments.length?(r=typeof a=="function"?a:jc(+a),o(),s):r},s}/**
1
+ import{bt as jc,bu as I0,aH as pS,bv as xt,bw as Ip,bx as mS,by as gS,bz as _S,bA as xS,bB as yS,bq as vS,br as bS,bC as B0,aC as SS,bD as TS,bE as MS,bF as ES,bG as xg,bH as yg,bI as AS,bJ as k,bK as $s,bL as wS,bM as RS,bN as CS,bO as NS}from"./index-CCBqToG8.js";import{_ as Bi}from"./extends-CF3RwP-h.js";function PS(r){var e=jc(.1),t,n,i;typeof r!="function"&&(r=jc(r==null?0:+r));function s(a){for(var l=0,c=t.length,u;l<c;++l)u=t[l],u.vz+=(i[l]-u.z)*n[l]*a}function o(){if(t){var a,l=t.length;for(n=new Array(l),i=new Array(l),a=0;a<l;++a)n[a]=isNaN(i[a]=+r(t[a],a,t))?0:+e(t[a],a,t)}}return s.initialize=function(a){t=a,o()},s.strength=function(a){return arguments.length?(e=typeof a=="function"?a:jc(+a),o(),s):e},s.z=function(a){return arguments.length?(r=typeof a=="function"?a:jc(+a),o(),s):r},s}/**
2
2
  * @license
3
3
  * Copyright 2010-2026 Three.js Authors
4
4
  * SPDX-License-Identifier: MIT
@@ -1 +1 @@
1
- import{aK as A,aL as S,a_ as P,aJ as W,bY as ln,bZ as gn,b_ as dn,b$ as z,c0 as hn,bT as pn,c1 as G,b1 as N,b6 as m,b9 as R,c2 as An,b0 as U,b4 as _n,c3 as wn,bW as on,aM as V,bU as On,c4 as I}from"./index-CIMJcxbn.js";function vn(n,r){for(var e=-1,i=n==null?0:n.length,f=Array(i);++e<i;)f[e]=r(n[e],e,n);return f}var K=P?P.prototype:void 0,B=K?K.toString:void 0;function k(n){if(typeof n=="string")return n;if(A(n))return vn(n,k)+"";if(S(n))return B?B.call(n):"";var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}function Pn(){}function cn(n,r){for(var e=-1,i=n==null?0:n.length;++e<i&&r(n[e],e,n)!==!1;);return n}function En(n,r,e,i){for(var f=n.length,t=e+-1;++t<f;)if(r(n[t],t,n))return t;return-1}function yn(n){return n!==n}function Tn(n,r,e){for(var i=e-1,f=n.length;++i<f;)if(n[i]===r)return i;return-1}function Rn(n,r,e){return r===r?Tn(n,r,e):En(n,yn,e)}function bn(n,r){var e=n==null?0:n.length;return!!e&&Rn(n,r,0)>-1}function x(n){return W(n)?ln(n):gn(n)}var In=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ln=/^\w*$/;function M(n,r){if(A(n))return!1;var e=typeof n;return e=="number"||e=="symbol"||e=="boolean"||n==null||S(n)?!0:Ln.test(n)||!In.test(n)||r!=null&&n in Object(r)}var Sn=500;function xn(n){var r=dn(n,function(i){return e.size===Sn&&e.clear(),i}),e=r.cache;return r}var Mn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,$n=/\\(\\)?/g,Cn=xn(function(n){var r=[];return n.charCodeAt(0)===46&&r.push(""),n.replace(Mn,function(e,i,f,t){r.push(f?t.replace($n,"$1"):i||e)}),r});function Dn(n){return n==null?"":k(n)}function j(n,r){return A(n)?n:M(n,r)?[n]:Cn(Dn(n))}function b(n){if(typeof n=="string"||S(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}function nn(n,r){r=j(r,n);for(var e=0,i=r.length;n!=null&&e<i;)n=n[b(r[e++])];return e&&e==i?n:void 0}function Fn(n,r,e){var i=n==null?void 0:nn(n,r);return i===void 0?e:i}function rn(n,r){for(var e=-1,i=r.length,f=n.length;++e<i;)n[f+e]=r[e];return n}var H=P?P.isConcatSpreadable:void 0;function Gn(n){return A(n)||z(n)||!!(H&&n&&n[H])}function Kr(n,r,e,i,f){var t=-1,u=n.length;for(e||(e=Gn),f||(f=[]);++t<u;){var s=n[t];e(s)?rn(f,s):i||(f[f.length]=s)}return f}function Nn(n,r,e,i){var f=-1,t=n==null?0:n.length;for(i&&t&&(e=n[++f]);++f<t;)e=r(e,n[f],f,n);return e}function en(n,r){for(var e=-1,i=n==null?0:n.length,f=0,t=[];++e<i;){var u=n[e];r(u,e,n)&&(t[f++]=u)}return t}function mn(){return[]}var Un=Object.prototype,Kn=Un.propertyIsEnumerable,Z=Object.getOwnPropertySymbols,Bn=Z?function(n){return n==null?[]:(n=Object(n),en(Z(n),function(r){return Kn.call(n,r)}))}:mn;function Hn(n,r,e){var i=r(n);return A(n)?i:rn(i,e(n))}function q(n){return Hn(n,x,Bn)}var Zn="__lodash_hash_undefined__";function qn(n){return this.__data__.set(n,Zn),this}function Yn(n){return this.__data__.has(n)}function c(n){var r=-1,e=n==null?0:n.length;for(this.__data__=new hn;++r<e;)this.add(n[r])}c.prototype.add=c.prototype.push=qn;c.prototype.has=Yn;function Jn(n,r){for(var e=-1,i=n==null?0:n.length;++e<i;)if(r(n[e],e,n))return!0;return!1}function tn(n,r){return n.has(r)}var Xn=1,Qn=2;function fn(n,r,e,i,f,t){var u=e&Xn,s=n.length,a=r.length;if(s!=a&&!(u&&a>s))return!1;var h=t.get(n),g=t.get(r);if(h&&g)return h==r&&g==n;var l=-1,d=!0,w=e&Qn?new c:void 0;for(t.set(n,r),t.set(r,n);++l<s;){var p=n[l],_=r[l];if(i)var o=u?i(_,p,l,r,n,t):i(p,_,l,n,r,t);if(o!==void 0){if(o)continue;d=!1;break}if(w){if(!Jn(r,function(O,v){if(!tn(w,v)&&(p===O||f(p,O,e,i,t)))return w.push(v)})){d=!1;break}}else if(!(p===_||f(p,_,e,i,t))){d=!1;break}}return t.delete(n),t.delete(r),d}function Wn(n){var r=-1,e=Array(n.size);return n.forEach(function(i,f){e[++r]=[f,i]}),e}function $(n){var r=-1,e=Array(n.size);return n.forEach(function(i){e[++r]=i}),e}var zn=1,Vn=2,kn="[object Boolean]",jn="[object Date]",nr="[object Error]",rr="[object Map]",er="[object Number]",ir="[object RegExp]",tr="[object Set]",fr="[object String]",ur="[object Symbol]",sr="[object ArrayBuffer]",ar="[object DataView]",Y=P?P.prototype:void 0,L=Y?Y.valueOf:void 0;function lr(n,r,e,i,f,t,u){switch(e){case ar:if(n.byteLength!=r.byteLength||n.byteOffset!=r.byteOffset)return!1;n=n.buffer,r=r.buffer;case sr:return!(n.byteLength!=r.byteLength||!t(new G(n),new G(r)));case kn:case jn:case er:return pn(+n,+r);case nr:return n.name==r.name&&n.message==r.message;case ir:case fr:return n==r+"";case rr:var s=Wn;case tr:var a=i&zn;if(s||(s=$),n.size!=r.size&&!a)return!1;var h=u.get(n);if(h)return h==r;i|=Vn,u.set(n,r);var g=fn(s(n),s(r),i,f,t,u);return u.delete(n),g;case ur:if(L)return L.call(n)==L.call(r)}return!1}var gr=1,dr=Object.prototype,hr=dr.hasOwnProperty;function pr(n,r,e,i,f,t){var u=e&gr,s=q(n),a=s.length,h=q(r),g=h.length;if(a!=g&&!u)return!1;for(var l=a;l--;){var d=s[l];if(!(u?d in r:hr.call(r,d)))return!1}var w=t.get(n),p=t.get(r);if(w&&p)return w==r&&p==n;var _=!0;t.set(n,r),t.set(r,n);for(var o=u;++l<a;){d=s[l];var O=n[d],v=r[d];if(i)var F=u?i(v,O,d,r,n,t):i(O,v,d,n,r,t);if(!(F===void 0?O===v||f(O,v,e,i,t):F)){_=!1;break}o||(o=d=="constructor")}if(_&&!o){var E=n.constructor,y=r.constructor;E!=y&&"constructor"in n&&"constructor"in r&&!(typeof E=="function"&&E instanceof E&&typeof y=="function"&&y instanceof y)&&(_=!1)}return t.delete(n),t.delete(r),_}var Ar=1,J="[object Arguments]",X="[object Array]",T="[object Object]",_r=Object.prototype,Q=_r.hasOwnProperty;function wr(n,r,e,i,f,t){var u=A(n),s=A(r),a=u?X:N(n),h=s?X:N(r);a=a==J?T:a,h=h==J?T:h;var g=a==T,l=h==T,d=a==h;if(d&&m(n)){if(!m(r))return!1;u=!0,g=!1}if(d&&!g)return t||(t=new R),u||An(n)?fn(n,r,e,i,f,t):lr(n,r,a,e,i,f,t);if(!(e&Ar)){var w=g&&Q.call(n,"__wrapped__"),p=l&&Q.call(r,"__wrapped__");if(w||p){var _=w?n.value():n,o=p?r.value():r;return t||(t=new R),f(_,o,e,i,t)}}return d?(t||(t=new R),pr(n,r,e,i,f,t)):!1}function C(n,r,e,i,f){return n===r?!0:n==null||r==null||!U(n)&&!U(r)?n!==n&&r!==r:wr(n,r,e,i,C,f)}var or=1,Or=2;function vr(n,r,e,i){var f=e.length,t=f;if(n==null)return!t;for(n=Object(n);f--;){var u=e[f];if(u[2]?u[1]!==n[u[0]]:!(u[0]in n))return!1}for(;++f<t;){u=e[f];var s=u[0],a=n[s],h=u[1];if(u[2]){if(a===void 0&&!(s in n))return!1}else{var g=new R,l;if(!(l===void 0?C(h,a,or|Or,i,g):l))return!1}}return!0}function un(n){return n===n&&!_n(n)}function Pr(n){for(var r=x(n),e=r.length;e--;){var i=r[e],f=n[i];r[e]=[i,f,un(f)]}return r}function sn(n,r){return function(e){return e==null?!1:e[n]===r&&(r!==void 0||n in Object(e))}}function cr(n){var r=Pr(n);return r.length==1&&r[0][2]?sn(r[0][0],r[0][1]):function(e){return e===n||vr(e,n,r)}}function Er(n,r){return n!=null&&r in Object(n)}function yr(n,r,e){r=j(r,n);for(var i=-1,f=r.length,t=!1;++i<f;){var u=b(r[i]);if(!(t=n!=null&&e(n,u)))break;n=n[u]}return t||++i!=f?t:(f=n==null?0:n.length,!!f&&wn(f)&&on(u,f)&&(A(n)||z(n)))}function Tr(n,r){return n!=null&&yr(n,r,Er)}var Rr=1,br=2;function Ir(n,r){return M(n)&&un(r)?sn(b(n),r):function(e){var i=Fn(e,n);return i===void 0&&i===r?Tr(e,n):C(r,i,Rr|br)}}function Lr(n){return function(r){return r==null?void 0:r[n]}}function Sr(n){return function(r){return nn(r,n)}}function xr(n){return M(n)?Lr(b(n)):Sr(n)}function an(n){return typeof n=="function"?n:n==null?V:typeof n=="object"?A(n)?Ir(n[0],n[1]):cr(n):xr(n)}function Mr(n,r){return n&&On(n,r,x)}function $r(n,r){return function(e,i){if(e==null)return e;if(!W(e))return n(e,i);for(var f=e.length,t=-1,u=Object(e);++t<f&&i(u[t],t,u)!==!1;);return e}}var D=$r(Mr);function Cr(n){return typeof n=="function"?n:V}function Br(n,r){var e=A(n)?cn:D;return e(n,Cr(r))}function Dr(n,r){var e=[];return D(n,function(i,f,t){r(i,f,t)&&e.push(i)}),e}function Hr(n,r){var e=A(n)?en:Dr;return e(n,an(r))}function Fr(n,r,e,i,f){return f(n,function(t,u,s){e=i?(i=!1,t):r(e,t,u,s)}),e}function Zr(n,r,e){var i=A(n)?Nn:Fr,f=arguments.length<3;return i(n,an(r),e,f,D)}var Gr=1/0,Nr=I&&1/$(new I([,-0]))[1]==Gr?function(n){return new I(n)}:Pn,mr=200;function qr(n,r,e){var i=-1,f=bn,t=n.length,u=!0,s=[],a=s;if(t>=mr){var h=r?null:Nr(n);if(h)return $(h);u=!1,f=tn,a=new c}else a=r?[]:s;n:for(;++i<t;){var g=n[i],l=r?r(g):g;if(g=g!==0?g:0,u&&l===l){for(var d=a.length;d--;)if(a[d]===l)continue n;r&&a.push(l),s.push(g)}else f(a,l,e)||(a!==s&&a.push(l),s.push(g))}return s}export{D as a,Kr as b,an as c,vn as d,rn as e,Hn as f,Bn as g,cn as h,q as i,qr as j,x as k,Hr as l,Br as m,En as n,Cr as o,Mr as p,yr as q,Zr as r,mn as s,j as t,b as u,nn as v,Tr as w,Dn as x};
1
+ import{aK as A,aL as S,a_ as P,aJ as W,bY as ln,bZ as gn,b_ as dn,b$ as z,c0 as hn,bT as pn,c1 as G,b1 as N,b6 as m,b9 as R,c2 as An,b0 as U,b4 as _n,c3 as wn,bW as on,aM as V,bU as On,c4 as I}from"./index-CCBqToG8.js";function vn(n,r){for(var e=-1,i=n==null?0:n.length,f=Array(i);++e<i;)f[e]=r(n[e],e,n);return f}var K=P?P.prototype:void 0,B=K?K.toString:void 0;function k(n){if(typeof n=="string")return n;if(A(n))return vn(n,k)+"";if(S(n))return B?B.call(n):"";var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}function Pn(){}function cn(n,r){for(var e=-1,i=n==null?0:n.length;++e<i&&r(n[e],e,n)!==!1;);return n}function En(n,r,e,i){for(var f=n.length,t=e+-1;++t<f;)if(r(n[t],t,n))return t;return-1}function yn(n){return n!==n}function Tn(n,r,e){for(var i=e-1,f=n.length;++i<f;)if(n[i]===r)return i;return-1}function Rn(n,r,e){return r===r?Tn(n,r,e):En(n,yn,e)}function bn(n,r){var e=n==null?0:n.length;return!!e&&Rn(n,r,0)>-1}function x(n){return W(n)?ln(n):gn(n)}var In=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ln=/^\w*$/;function M(n,r){if(A(n))return!1;var e=typeof n;return e=="number"||e=="symbol"||e=="boolean"||n==null||S(n)?!0:Ln.test(n)||!In.test(n)||r!=null&&n in Object(r)}var Sn=500;function xn(n){var r=dn(n,function(i){return e.size===Sn&&e.clear(),i}),e=r.cache;return r}var Mn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,$n=/\\(\\)?/g,Cn=xn(function(n){var r=[];return n.charCodeAt(0)===46&&r.push(""),n.replace(Mn,function(e,i,f,t){r.push(f?t.replace($n,"$1"):i||e)}),r});function Dn(n){return n==null?"":k(n)}function j(n,r){return A(n)?n:M(n,r)?[n]:Cn(Dn(n))}function b(n){if(typeof n=="string"||S(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}function nn(n,r){r=j(r,n);for(var e=0,i=r.length;n!=null&&e<i;)n=n[b(r[e++])];return e&&e==i?n:void 0}function Fn(n,r,e){var i=n==null?void 0:nn(n,r);return i===void 0?e:i}function rn(n,r){for(var e=-1,i=r.length,f=n.length;++e<i;)n[f+e]=r[e];return n}var H=P?P.isConcatSpreadable:void 0;function Gn(n){return A(n)||z(n)||!!(H&&n&&n[H])}function Kr(n,r,e,i,f){var t=-1,u=n.length;for(e||(e=Gn),f||(f=[]);++t<u;){var s=n[t];e(s)?rn(f,s):i||(f[f.length]=s)}return f}function Nn(n,r,e,i){var f=-1,t=n==null?0:n.length;for(i&&t&&(e=n[++f]);++f<t;)e=r(e,n[f],f,n);return e}function en(n,r){for(var e=-1,i=n==null?0:n.length,f=0,t=[];++e<i;){var u=n[e];r(u,e,n)&&(t[f++]=u)}return t}function mn(){return[]}var Un=Object.prototype,Kn=Un.propertyIsEnumerable,Z=Object.getOwnPropertySymbols,Bn=Z?function(n){return n==null?[]:(n=Object(n),en(Z(n),function(r){return Kn.call(n,r)}))}:mn;function Hn(n,r,e){var i=r(n);return A(n)?i:rn(i,e(n))}function q(n){return Hn(n,x,Bn)}var Zn="__lodash_hash_undefined__";function qn(n){return this.__data__.set(n,Zn),this}function Yn(n){return this.__data__.has(n)}function c(n){var r=-1,e=n==null?0:n.length;for(this.__data__=new hn;++r<e;)this.add(n[r])}c.prototype.add=c.prototype.push=qn;c.prototype.has=Yn;function Jn(n,r){for(var e=-1,i=n==null?0:n.length;++e<i;)if(r(n[e],e,n))return!0;return!1}function tn(n,r){return n.has(r)}var Xn=1,Qn=2;function fn(n,r,e,i,f,t){var u=e&Xn,s=n.length,a=r.length;if(s!=a&&!(u&&a>s))return!1;var h=t.get(n),g=t.get(r);if(h&&g)return h==r&&g==n;var l=-1,d=!0,w=e&Qn?new c:void 0;for(t.set(n,r),t.set(r,n);++l<s;){var p=n[l],_=r[l];if(i)var o=u?i(_,p,l,r,n,t):i(p,_,l,n,r,t);if(o!==void 0){if(o)continue;d=!1;break}if(w){if(!Jn(r,function(O,v){if(!tn(w,v)&&(p===O||f(p,O,e,i,t)))return w.push(v)})){d=!1;break}}else if(!(p===_||f(p,_,e,i,t))){d=!1;break}}return t.delete(n),t.delete(r),d}function Wn(n){var r=-1,e=Array(n.size);return n.forEach(function(i,f){e[++r]=[f,i]}),e}function $(n){var r=-1,e=Array(n.size);return n.forEach(function(i){e[++r]=i}),e}var zn=1,Vn=2,kn="[object Boolean]",jn="[object Date]",nr="[object Error]",rr="[object Map]",er="[object Number]",ir="[object RegExp]",tr="[object Set]",fr="[object String]",ur="[object Symbol]",sr="[object ArrayBuffer]",ar="[object DataView]",Y=P?P.prototype:void 0,L=Y?Y.valueOf:void 0;function lr(n,r,e,i,f,t,u){switch(e){case ar:if(n.byteLength!=r.byteLength||n.byteOffset!=r.byteOffset)return!1;n=n.buffer,r=r.buffer;case sr:return!(n.byteLength!=r.byteLength||!t(new G(n),new G(r)));case kn:case jn:case er:return pn(+n,+r);case nr:return n.name==r.name&&n.message==r.message;case ir:case fr:return n==r+"";case rr:var s=Wn;case tr:var a=i&zn;if(s||(s=$),n.size!=r.size&&!a)return!1;var h=u.get(n);if(h)return h==r;i|=Vn,u.set(n,r);var g=fn(s(n),s(r),i,f,t,u);return u.delete(n),g;case ur:if(L)return L.call(n)==L.call(r)}return!1}var gr=1,dr=Object.prototype,hr=dr.hasOwnProperty;function pr(n,r,e,i,f,t){var u=e&gr,s=q(n),a=s.length,h=q(r),g=h.length;if(a!=g&&!u)return!1;for(var l=a;l--;){var d=s[l];if(!(u?d in r:hr.call(r,d)))return!1}var w=t.get(n),p=t.get(r);if(w&&p)return w==r&&p==n;var _=!0;t.set(n,r),t.set(r,n);for(var o=u;++l<a;){d=s[l];var O=n[d],v=r[d];if(i)var F=u?i(v,O,d,r,n,t):i(O,v,d,n,r,t);if(!(F===void 0?O===v||f(O,v,e,i,t):F)){_=!1;break}o||(o=d=="constructor")}if(_&&!o){var E=n.constructor,y=r.constructor;E!=y&&"constructor"in n&&"constructor"in r&&!(typeof E=="function"&&E instanceof E&&typeof y=="function"&&y instanceof y)&&(_=!1)}return t.delete(n),t.delete(r),_}var Ar=1,J="[object Arguments]",X="[object Array]",T="[object Object]",_r=Object.prototype,Q=_r.hasOwnProperty;function wr(n,r,e,i,f,t){var u=A(n),s=A(r),a=u?X:N(n),h=s?X:N(r);a=a==J?T:a,h=h==J?T:h;var g=a==T,l=h==T,d=a==h;if(d&&m(n)){if(!m(r))return!1;u=!0,g=!1}if(d&&!g)return t||(t=new R),u||An(n)?fn(n,r,e,i,f,t):lr(n,r,a,e,i,f,t);if(!(e&Ar)){var w=g&&Q.call(n,"__wrapped__"),p=l&&Q.call(r,"__wrapped__");if(w||p){var _=w?n.value():n,o=p?r.value():r;return t||(t=new R),f(_,o,e,i,t)}}return d?(t||(t=new R),pr(n,r,e,i,f,t)):!1}function C(n,r,e,i,f){return n===r?!0:n==null||r==null||!U(n)&&!U(r)?n!==n&&r!==r:wr(n,r,e,i,C,f)}var or=1,Or=2;function vr(n,r,e,i){var f=e.length,t=f;if(n==null)return!t;for(n=Object(n);f--;){var u=e[f];if(u[2]?u[1]!==n[u[0]]:!(u[0]in n))return!1}for(;++f<t;){u=e[f];var s=u[0],a=n[s],h=u[1];if(u[2]){if(a===void 0&&!(s in n))return!1}else{var g=new R,l;if(!(l===void 0?C(h,a,or|Or,i,g):l))return!1}}return!0}function un(n){return n===n&&!_n(n)}function Pr(n){for(var r=x(n),e=r.length;e--;){var i=r[e],f=n[i];r[e]=[i,f,un(f)]}return r}function sn(n,r){return function(e){return e==null?!1:e[n]===r&&(r!==void 0||n in Object(e))}}function cr(n){var r=Pr(n);return r.length==1&&r[0][2]?sn(r[0][0],r[0][1]):function(e){return e===n||vr(e,n,r)}}function Er(n,r){return n!=null&&r in Object(n)}function yr(n,r,e){r=j(r,n);for(var i=-1,f=r.length,t=!1;++i<f;){var u=b(r[i]);if(!(t=n!=null&&e(n,u)))break;n=n[u]}return t||++i!=f?t:(f=n==null?0:n.length,!!f&&wn(f)&&on(u,f)&&(A(n)||z(n)))}function Tr(n,r){return n!=null&&yr(n,r,Er)}var Rr=1,br=2;function Ir(n,r){return M(n)&&un(r)?sn(b(n),r):function(e){var i=Fn(e,n);return i===void 0&&i===r?Tr(e,n):C(r,i,Rr|br)}}function Lr(n){return function(r){return r==null?void 0:r[n]}}function Sr(n){return function(r){return nn(r,n)}}function xr(n){return M(n)?Lr(b(n)):Sr(n)}function an(n){return typeof n=="function"?n:n==null?V:typeof n=="object"?A(n)?Ir(n[0],n[1]):cr(n):xr(n)}function Mr(n,r){return n&&On(n,r,x)}function $r(n,r){return function(e,i){if(e==null)return e;if(!W(e))return n(e,i);for(var f=e.length,t=-1,u=Object(e);++t<f&&i(u[t],t,u)!==!1;);return e}}var D=$r(Mr);function Cr(n){return typeof n=="function"?n:V}function Br(n,r){var e=A(n)?cn:D;return e(n,Cr(r))}function Dr(n,r){var e=[];return D(n,function(i,f,t){r(i,f,t)&&e.push(i)}),e}function Hr(n,r){var e=A(n)?en:Dr;return e(n,an(r))}function Fr(n,r,e,i,f){return f(n,function(t,u,s){e=i?(i=!1,t):r(e,t,u,s)}),e}function Zr(n,r,e){var i=A(n)?Nn:Fr,f=arguments.length<3;return i(n,an(r),e,f,D)}var Gr=1/0,Nr=I&&1/$(new I([,-0]))[1]==Gr?function(n){return new I(n)}:Pn,mr=200;function qr(n,r,e){var i=-1,f=bn,t=n.length,u=!0,s=[],a=s;if(t>=mr){var h=r?null:Nr(n);if(h)return $(h);u=!1,f=tn,a=new c}else a=r?[]:s;n:for(;++i<t;){var g=n[i],l=r?r(g):g;if(g=g!==0?g:0,u&&l===l){for(var d=a.length;d--;)if(a[d]===l)continue n;r&&a.push(l),s.push(g)}else f(a,l,e)||(a!==s&&a.push(l),s.push(g))}return s}export{D as a,Kr as b,an as c,vn as d,rn as e,Hn as f,Bn as g,cn as h,q as i,qr as j,x as k,Hr as l,Br as m,En as n,Cr as o,Mr as p,yr as q,Zr as r,mn as s,j as t,b as u,nn as v,Tr as w,Dn as x};