@geminilight/mindos 0.1.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 (282) hide show
  1. package/.env.local.example +38 -0
  2. package/LICENSE +21 -0
  3. package/README.md +423 -0
  4. package/README_zh.md +423 -0
  5. package/app/README.md +152 -0
  6. package/app/app/api/ask/route.ts +170 -0
  7. package/app/app/api/ask-sessions/route.ts +90 -0
  8. package/app/app/api/auth/route.ts +37 -0
  9. package/app/app/api/backlinks/route.ts +22 -0
  10. package/app/app/api/bootstrap/route.ts +37 -0
  11. package/app/app/api/extract-pdf/route.ts +82 -0
  12. package/app/app/api/file/route.ts +138 -0
  13. package/app/app/api/files/route.ts +12 -0
  14. package/app/app/api/git/route.ts +42 -0
  15. package/app/app/api/graph/route.ts +113 -0
  16. package/app/app/api/recent-files/route.ts +10 -0
  17. package/app/app/api/search/route.ts +17 -0
  18. package/app/app/api/settings/reset-token/route.ts +21 -0
  19. package/app/app/api/settings/route.ts +123 -0
  20. package/app/app/error.tsx +33 -0
  21. package/app/app/globals.css +368 -0
  22. package/app/app/icon.svg +35 -0
  23. package/app/app/layout.tsx +103 -0
  24. package/app/app/login/page.tsx +120 -0
  25. package/app/app/page.tsx +12 -0
  26. package/app/app/view/[...path]/ViewPageClient.tsx +343 -0
  27. package/app/app/view/[...path]/error.tsx +33 -0
  28. package/app/app/view/[...path]/loading.tsx +15 -0
  29. package/app/app/view/[...path]/page.tsx +93 -0
  30. package/app/components/AskFab.tsx +59 -0
  31. package/app/components/AskModal.tsx +398 -0
  32. package/app/components/Backlinks.tsx +75 -0
  33. package/app/components/Breadcrumb.tsx +31 -0
  34. package/app/components/CsvView.tsx +325 -0
  35. package/app/components/DirView.tsx +138 -0
  36. package/app/components/Editor.tsx +124 -0
  37. package/app/components/EditorWrapper.tsx +17 -0
  38. package/app/components/ErrorBoundary.tsx +53 -0
  39. package/app/components/FileTree.tsx +369 -0
  40. package/app/components/HomeContent.tsx +262 -0
  41. package/app/components/JsonView.tsx +27 -0
  42. package/app/components/MarkdownEditor.tsx +95 -0
  43. package/app/components/MarkdownView.tsx +118 -0
  44. package/app/components/SearchModal.tsx +193 -0
  45. package/app/components/SettingsModal.tsx +237 -0
  46. package/app/components/Sidebar.tsx +136 -0
  47. package/app/components/SidebarLayout.tsx +36 -0
  48. package/app/components/TableOfContents.tsx +150 -0
  49. package/app/components/ThemeToggle.tsx +34 -0
  50. package/app/components/WysiwygEditor.tsx +75 -0
  51. package/app/components/ask/FileChip.tsx +30 -0
  52. package/app/components/ask/MentionPopover.tsx +52 -0
  53. package/app/components/ask/MessageList.tsx +126 -0
  54. package/app/components/ask/SessionHistory.tsx +49 -0
  55. package/app/components/renderers/AgentInspectorRenderer.tsx +277 -0
  56. package/app/components/renderers/BacklinksRenderer.tsx +147 -0
  57. package/app/components/renderers/ConfigRenderer.tsx +236 -0
  58. package/app/components/renderers/CsvRenderer.tsx +77 -0
  59. package/app/components/renderers/DiffRenderer.tsx +310 -0
  60. package/app/components/renderers/GraphRenderer.tsx +428 -0
  61. package/app/components/renderers/SummaryRenderer.tsx +251 -0
  62. package/app/components/renderers/TimelineRenderer.tsx +213 -0
  63. package/app/components/renderers/TodoRenderer.tsx +474 -0
  64. package/app/components/renderers/WorkflowRenderer.tsx +404 -0
  65. package/app/components/renderers/csv/BoardView.tsx +146 -0
  66. package/app/components/renderers/csv/ConfigPanel.tsx +117 -0
  67. package/app/components/renderers/csv/EditableCell.tsx +43 -0
  68. package/app/components/renderers/csv/GalleryView.tsx +40 -0
  69. package/app/components/renderers/csv/TableView.tsx +164 -0
  70. package/app/components/renderers/csv/types.ts +87 -0
  71. package/app/components/settings/AiTab.tsx +111 -0
  72. package/app/components/settings/AppearanceTab.tsx +101 -0
  73. package/app/components/settings/KnowledgeTab.tsx +157 -0
  74. package/app/components/settings/PluginsTab.tsx +82 -0
  75. package/app/components/settings/Primitives.tsx +60 -0
  76. package/app/components/settings/ShortcutsTab.tsx +22 -0
  77. package/app/components/settings/types.ts +41 -0
  78. package/app/components/ui/button.tsx +60 -0
  79. package/app/components/ui/dialog.tsx +157 -0
  80. package/app/components/ui/input.tsx +20 -0
  81. package/app/components/ui/scroll-area.tsx +55 -0
  82. package/app/components/ui/toggle.tsx +44 -0
  83. package/app/components/ui/tooltip.tsx +66 -0
  84. package/app/components.json +25 -0
  85. package/app/data/pages/home-dark.png +0 -0
  86. package/app/data/pages/home-mobile-crop.png +0 -0
  87. package/app/data/pages/home-mobile.png +0 -0
  88. package/app/data/pages/home.png +0 -0
  89. package/app/data/pages/view-dir.png +0 -0
  90. package/app/data/pages/view-file-bot.png +0 -0
  91. package/app/data/pages/view-file-dark-crop.png +0 -0
  92. package/app/data/pages/view-file-dark.png +0 -0
  93. package/app/data/pages/view-file-mobile.png +0 -0
  94. package/app/data/pages/view-file-sm.png +0 -0
  95. package/app/data/pages/view-file-top.png +0 -0
  96. package/app/data/pages/view-file.png +0 -0
  97. package/app/eslint.config.mjs +18 -0
  98. package/app/hooks/useAskSession.ts +181 -0
  99. package/app/hooks/useFileUpload.ts +126 -0
  100. package/app/hooks/useMention.ts +65 -0
  101. package/app/lib/LocaleContext.tsx +40 -0
  102. package/app/lib/actions.ts +40 -0
  103. package/app/lib/agent/index.ts +3 -0
  104. package/app/lib/agent/model.ts +18 -0
  105. package/app/lib/agent/prompt.ts +32 -0
  106. package/app/lib/agent/tools.ts +151 -0
  107. package/app/lib/api.ts +55 -0
  108. package/app/lib/core/backlinks.ts +40 -0
  109. package/app/lib/core/csv.ts +28 -0
  110. package/app/lib/core/fs-ops.ts +118 -0
  111. package/app/lib/core/git.ts +50 -0
  112. package/app/lib/core/index.ts +58 -0
  113. package/app/lib/core/lines.ts +89 -0
  114. package/app/lib/core/search.ts +79 -0
  115. package/app/lib/core/security.ts +43 -0
  116. package/app/lib/core/tree.ts +113 -0
  117. package/app/lib/core/types.ts +40 -0
  118. package/app/lib/fs.ts +467 -0
  119. package/app/lib/i18n.ts +300 -0
  120. package/app/lib/jwt.ts +58 -0
  121. package/app/lib/renderers/index.ts +79 -0
  122. package/app/lib/renderers/registry.ts +70 -0
  123. package/app/lib/settings.ts +150 -0
  124. package/app/lib/types.ts +32 -0
  125. package/app/lib/utils.ts +34 -0
  126. package/app/next-env.d.ts +6 -0
  127. package/app/next.config.ts +10 -0
  128. package/app/package-lock.json +15306 -0
  129. package/app/package.json +71 -0
  130. package/app/postcss.config.mjs +7 -0
  131. package/app/proxy.ts +64 -0
  132. package/app/public/file.svg +1 -0
  133. package/app/public/globe.svg +1 -0
  134. package/app/public/landing/index.html +353 -0
  135. package/app/public/landing/style.css +216 -0
  136. package/app/public/logo-square.svg +37 -0
  137. package/app/public/logo.svg +37 -0
  138. package/app/public/next.svg +1 -0
  139. package/app/public/vercel.svg +1 -0
  140. package/app/public/window.svg +1 -0
  141. package/app/scripts/extract-pdf.cjs +56 -0
  142. package/app/tsconfig.json +34 -0
  143. package/app/vitest.config.ts +14 -0
  144. package/assets/demo-flow-zh.html +622 -0
  145. package/assets/images/demo-flow-dark.png +0 -0
  146. package/assets/images/demo-flow-light.png +0 -0
  147. package/assets/images/demo-flow-zh-dark.png +0 -0
  148. package/assets/images/demo-flow-zh-light.png +0 -0
  149. package/assets/images/gui-sync-cv.png +0 -0
  150. package/assets/logo-square.svg +37 -0
  151. package/bin/cli.js +894 -0
  152. package/mcp/README.md +113 -0
  153. package/mcp/package-lock.json +1717 -0
  154. package/mcp/package.json +18 -0
  155. package/mcp/src/index.ts +494 -0
  156. package/mcp/tsconfig.json +13 -0
  157. package/package.json +49 -0
  158. package/scripts/setup.js +675 -0
  159. package/scripts/upgrade-prompt.md +147 -0
  160. package/skills/mindos/SKILL.md +319 -0
  161. package/skills/mindos-zh/SKILL.md +318 -0
  162. package/templates/README.md +31 -0
  163. package/templates/empty/CHANGELOG.md +9 -0
  164. package/templates/empty/CONFIG.json +197 -0
  165. package/templates/empty/CONFIG.md +73 -0
  166. package/templates/empty/INSTRUCTION.md +177 -0
  167. package/templates/empty/README.md +27 -0
  168. package/templates/en/CHANGELOG.md +9 -0
  169. package/templates/en/CONFIG.json +197 -0
  170. package/templates/en/CONFIG.md +73 -0
  171. package/templates/en/INSTRUCTION.md +177 -0
  172. package/templates/en/README.md +27 -0
  173. package/templates/en/TODO.md +13 -0
  174. package/templates/en//360/237/221/244 Profile/INSTRUCTION.md" +21 -0
  175. package/templates/en//360/237/221/244 Profile/README.md" +15 -0
  176. package/templates/en//360/237/221/244 Profile//342/232/231/357/270/217 Preferences.md" +21 -0
  177. package/templates/en//360/237/221/244 Profile//360/237/216/257 Focus.md" +31 -0
  178. package/templates/en//360/237/221/244 Profile//360/237/221/244 Identity.md" +22 -0
  179. package/templates/en//360/237/223/232 Resources/INSTRUCTION.md" +29 -0
  180. package/templates/en//360/237/223/232 Resources/README.md" +21 -0
  181. package/templates/en//360/237/223/232 Resources//360/237/247/276 AI Influencers.csv" +1 -0
  182. package/templates/en//360/237/223/232 Resources//360/237/247/276 AI Products.csv" +1 -0
  183. package/templates/en//360/237/223/232 Resources//360/237/247/276 AI Scholars.csv" +1 -0
  184. package/templates/en//360/237/223/232 Resources//360/237/247/276 AI Tools.csv" +1 -0
  185. package/templates/en//360/237/223/235 Notes/INSTRUCTION.md" +31 -0
  186. package/templates/en//360/237/223/235 Notes/Ideas/README.md" +8 -0
  187. package/templates/en//360/237/223/235 Notes/Ideas//360/237/247/252_example_product_idea.md" +16 -0
  188. package/templates/en//360/237/223/235 Notes/Inbox/README.md" +8 -0
  189. package/templates/en//360/237/223/235 Notes/Inbox//360/237/247/252_example_quick_capture.md" +14 -0
  190. package/templates/en//360/237/223/235 Notes/Meetings/README.md" +8 -0
  191. package/templates/en//360/237/223/235 Notes/Meetings//360/237/247/252_example_meeting_note.md" +17 -0
  192. package/templates/en//360/237/223/235 Notes/README.md" +24 -0
  193. package/templates/en//360/237/223/235 Notes/Waiting/README.md" +8 -0
  194. package/templates/en//360/237/223/235 Notes/Waiting//360/237/247/252_example_blocked_item.md" +16 -0
  195. package/templates/en//360/237/224/204 Workflows/Configurations/README.md" +3 -0
  196. package/templates/en//360/237/224/204 Workflows/Configurations//360/237/247/252_example_config_update_sop.md" +14 -0
  197. package/templates/en//360/237/224/204 Workflows/INSTRUCTION.md" +21 -0
  198. package/templates/en//360/237/224/204 Workflows/Information/README.md" +16 -0
  199. package/templates/en//360/237/224/204 Workflows/Information//360/237/247/252_example_info_capture_sop.md" +13 -0
  200. package/templates/en//360/237/224/204 Workflows/Media/README.md" +16 -0
  201. package/templates/en//360/237/224/204 Workflows/Media//360/237/247/252_example_content_publish_sop.md" +13 -0
  202. package/templates/en//360/237/224/204 Workflows/README.md" +22 -0
  203. package/templates/en//360/237/224/204 Workflows/Research/README.md" +16 -0
  204. package/templates/en//360/237/224/204 Workflows/Research//360/237/247/252_example_lit_review_sop.md" +16 -0
  205. package/templates/en//360/237/224/204 Workflows/Startup/README.md" +3 -0
  206. package/templates/en//360/237/224/204 Workflows/Startup//360/237/247/252_example_weekly_founder_ops.md" +22 -0
  207. package/templates/en//360/237/224/227 Connections/Classmates/README.md" +11 -0
  208. package/templates/en//360/237/224/227 Connections/Classmates//360/237/247/252_example_leo_chen.md" +16 -0
  209. package/templates/en//360/237/224/227 Connections/Colleagues/README.md" +11 -0
  210. package/templates/en//360/237/224/227 Connections/Colleagues//360/237/247/252_example_ethan_zhao.md" +16 -0
  211. package/templates/en//360/237/224/227 Connections/Connections Overview.csv" +5 -0
  212. package/templates/en//360/237/224/227 Connections/Family/README.md" +11 -0
  213. package/templates/en//360/237/224/227 Connections/Family//360/237/247/252_example_james_wang.md" +16 -0
  214. package/templates/en//360/237/224/227 Connections/Friends/README.md" +11 -0
  215. package/templates/en//360/237/224/227 Connections/Friends//360/237/247/252_example_lily_lin.md" +16 -0
  216. package/templates/en//360/237/224/227 Connections/INSTRUCTION.md" +56 -0
  217. package/templates/en//360/237/224/227 Connections/README.md" +20 -0
  218. package/templates/en//360/237/232/200 Projects/Archived/README.md" +9 -0
  219. package/templates/en//360/237/232/200 Projects/Archived//360/237/247/252_example_archived_project_note.md" +14 -0
  220. package/templates/en//360/237/232/200 Projects/INSTRUCTION.md" +29 -0
  221. package/templates/en//360/237/232/200 Projects/Products/README.md" +16 -0
  222. package/templates/en//360/237/232/200 Projects/Products//360/237/247/252_example_product_project_brief.md" +20 -0
  223. package/templates/en//360/237/232/200 Projects/README.md" +21 -0
  224. package/templates/en//360/237/232/200 Projects/Research/README.md" +16 -0
  225. package/templates/en//360/237/232/200 Projects/Research//360/237/247/252_example_research_project_brief.md" +16 -0
  226. package/templates/template-generation-skill.md +79 -0
  227. package/templates/zh/CHANGELOG.md +9 -0
  228. package/templates/zh/CONFIG.json +197 -0
  229. package/templates/zh/CONFIG.md +66 -0
  230. package/templates/zh/INSTRUCTION.md +177 -0
  231. package/templates/zh/README.md +27 -0
  232. package/templates/zh/TODO.md +13 -0
  233. package/templates/zh//360/237/221/244 /347/224/273/345/203/217/INSTRUCTION.md" +28 -0
  234. package/templates/zh//360/237/221/244 /347/224/273/345/203/217/README.md" +20 -0
  235. package/templates/zh//360/237/221/244 /347/224/273/345/203/217//342/232/231/357/270/217 Preferences.md" +21 -0
  236. package/templates/zh//360/237/221/244 /347/224/273/345/203/217//360/237/216/257 Focus.md" +31 -0
  237. package/templates/zh//360/237/221/244 /347/224/273/345/203/217//360/237/221/244 Identity.md" +22 -0
  238. package/templates/zh//360/237/223/232 /350/265/204/346/272/220/INSTRUCTION.md" +29 -0
  239. package/templates/zh//360/237/223/232 /350/265/204/346/272/220/README.md" +21 -0
  240. package/templates/zh//360/237/223/232 /350/265/204/346/272/220//360/237/247/276 AI Inferencers.csv" +1 -0
  241. package/templates/zh//360/237/223/232 /350/265/204/346/272/220//360/237/247/276 AI /344/272/247/345/223/201.csv" +1 -0
  242. package/templates/zh//360/237/223/232 /350/265/204/346/272/220//360/237/247/276 AI /345/255/246/350/200/205/346/270/205/345/215/225.csv" +1 -0
  243. package/templates/zh//360/237/223/232 /350/265/204/346/272/220//360/237/247/276 AI /345/267/245/345/205/267/346/270/205/345/215/225.csv" +1 -0
  244. package/templates/zh//360/237/223/235 /347/254/224/350/256/260/INSTRUCTION.md" +31 -0
  245. package/templates/zh//360/237/223/235 /347/254/224/350/256/260/README.md" +24 -0
  246. package/templates/zh//360/237/223/235 /347/254/224/350/256/260//344/274/232/350/256/256/README.md" +8 -0
  247. package/templates/zh//360/237/223/235 /347/254/224/350/256/260//344/274/232/350/256/256//360/237/247/252_example_/344/274/232/350/256/256/347/272/252/350/246/201.md" +17 -0
  248. package/templates/zh//360/237/223/235 /347/254/224/350/256/260//345/276/205/345/217/215/351/246/210/README.md" +8 -0
  249. package/templates/zh//360/237/223/235 /347/254/224/350/256/260//345/276/205/345/217/215/351/246/210//360/237/247/252_example_/345/276/205/345/217/215/351/246/210/344/272/213/351/241/271.md" +16 -0
  250. package/templates/zh//360/237/223/235 /347/254/224/350/256/260//346/203/263/346/263/225/README.md" +8 -0
  251. package/templates/zh//360/237/223/235 /347/254/224/350/256/260//346/203/263/346/263/225//360/237/247/252_example_/344/272/247/345/223/201/346/203/263/346/263/225.md" +16 -0
  252. package/templates/zh//360/237/223/235 /347/254/224/350/256/260//346/224/266/344/273/266/347/256/261/README.md" +8 -0
  253. package/templates/zh//360/237/223/235 /347/254/224/350/256/260//346/224/266/344/273/266/347/256/261//360/237/247/252_example_/344/270/264/346/227/266/351/200/237/350/256/260.md" +13 -0
  254. package/templates/zh//360/237/224/204 /346/265/201/347/250/213/INSTRUCTION.md" +29 -0
  255. package/templates/zh//360/237/224/204 /346/265/201/347/250/213/README.md" +21 -0
  256. package/templates/zh//360/237/224/204 /346/265/201/347/250/213//344/277/241/346/201/257/README.md" +16 -0
  257. package/templates/zh//360/237/224/204 /346/265/201/347/250/213//344/277/241/346/201/257//360/237/247/252_example_/344/277/241/346/201/257/351/207/207/351/233/206/346/265/201/347/250/213.md" +13 -0
  258. package/templates/zh//360/237/224/204 /346/265/201/347/250/213//345/252/222/344/275/223/README.md" +16 -0
  259. package/templates/zh//360/237/224/204 /346/265/201/347/250/213//345/252/222/344/275/223//360/237/247/252_example_/345/206/205/345/256/271/345/217/221/345/270/203/346/265/201/347/250/213.md" +13 -0
  260. package/templates/zh//360/237/224/204 /346/265/201/347/250/213//347/247/221/347/240/224/README.md" +16 -0
  261. package/templates/zh//360/237/224/204 /346/265/201/347/250/213//347/247/221/347/240/224//360/237/247/252_example_/346/226/207/347/214/256/347/273/274/350/277/260/346/265/201/347/250/213.md" +16 -0
  262. package/templates/zh//360/237/224/204 /346/265/201/347/250/213//351/205/215/347/275/256/README.md" +3 -0
  263. package/templates/zh//360/237/224/204 /346/265/201/347/250/213//351/205/215/347/275/256//360/237/247/252_example_/351/205/215/347/275/256/346/233/264/346/226/260/346/265/201/347/250/213.md" +26 -0
  264. package/templates/zh//360/237/224/227 /345/205/263/347/263/273/INSTRUCTION.md" +62 -0
  265. package/templates/zh//360/237/224/227 /345/205/263/347/263/273/README.md" +20 -0
  266. package/templates/zh//360/237/224/227 /345/205/263/347/263/273//345/205/263/347/263/273/346/200/273/350/247/210.csv" +5 -0
  267. package/templates/zh//360/237/224/227 /345/205/263/347/263/273//345/220/214/344/272/213/README.md" +11 -0
  268. package/templates/zh//360/237/224/227 /345/205/263/347/263/273//345/220/214/344/272/213//360/237/247/252_example_/345/220/214/344/272/213/350/265/265/344/270/200/350/276/260.md" +16 -0
  269. package/templates/zh//360/237/224/227 /345/205/263/347/263/273//345/220/214/345/255/246/README.md" +11 -0
  270. package/templates/zh//360/237/224/227 /345/205/263/347/263/273//345/220/214/345/255/246//360/237/247/252_example_/345/220/214/345/255/246/351/231/210/347/253/213/346/254/247.md" +16 -0
  271. package/templates/zh//360/237/224/227 /345/205/263/347/263/273//345/256/266/344/272/272/README.md" +11 -0
  272. package/templates/zh//360/237/224/227 /345/205/263/347/263/273//345/256/266/344/272/272//360/237/247/252_example_/345/256/266/344/272/272/347/216/213/345/273/272/345/233/275.md" +16 -0
  273. package/templates/zh//360/237/224/227 /345/205/263/347/263/273//346/234/213/345/217/213/README.md" +11 -0
  274. package/templates/zh//360/237/224/227 /345/205/263/347/263/273//346/234/213/345/217/213//360/237/247/252_example_/346/234/213/345/217/213/346/236/227/345/260/217/344/270/275.md" +16 -0
  275. package/templates/zh//360/237/232/200 /351/241/271/347/233/256/INSTRUCTION.md" +31 -0
  276. package/templates/zh//360/237/232/200 /351/241/271/347/233/256/README.md" +21 -0
  277. package/templates/zh//360/237/232/200 /351/241/271/347/233/256//344/272/247/345/223/201/README.md" +16 -0
  278. package/templates/zh//360/237/232/200 /351/241/271/347/233/256//344/272/247/345/223/201//360/237/247/252_example_/344/272/247/345/223/201/351/241/271/347/233/256/347/256/200/346/212/245.md" +20 -0
  279. package/templates/zh//360/237/232/200 /351/241/271/347/233/256//345/267/262/345/275/222/346/241/243/README.md" +9 -0
  280. package/templates/zh//360/237/232/200 /351/241/271/347/233/256//345/267/262/345/275/222/346/241/243//360/237/247/252_example_/345/275/222/346/241/243/351/241/271/347/233/256/350/256/260/345/275/225.md" +15 -0
  281. package/templates/zh//360/237/232/200 /351/241/271/347/233/256//347/247/221/347/240/224/README.md" +16 -0
  282. package/templates/zh//360/237/232/200 /351/241/271/347/233/256//347/247/221/347/240/224//360/237/247/252_example_/347/247/221/347/240/224/351/241/271/347/233/256/347/256/200/346/212/245.md" +16 -0
@@ -0,0 +1,147 @@
1
+ # MindOS Upgrade Prompt
2
+
3
+ Send this to your Agent (e.g. Claude Code) to upgrade from the old source-based setup to the new npm package.
4
+
5
+ ---
6
+
7
+ ## English
8
+
9
+ ```
10
+ Help me upgrade my MindOS installation from the old source-based setup to the new npm package version.
11
+
12
+ **Old setup (what I have now):**
13
+ - Cloned the MindOS repo
14
+ - Ran `cd app && npm install` and `cd mcp && npm install && npm run build`
15
+ - Configured via `app/.env.local` (with MIND_ROOT, ANTHROPIC_API_KEY, etc.)
16
+ - Started with `cd app && npm run dev`
17
+ - MCP was started separately via `cd mcp && npm run start` or similar
18
+
19
+ **New setup (target):**
20
+ - Installed as a global npm package: `npm install -g mindos@latest`
21
+ - Configured via `~/.mindos/config.json` (managed by `mindos onboard`)
22
+ - Started with a single `mindos start` command (app + MCP together)
23
+
24
+ **Please do the following:**
25
+
26
+ 1. **Install the new package globally:**
27
+ ```bash
28
+ npm install -g mindos@latest
29
+ ```
30
+
31
+ 2. **Read my current `app/.env.local`** to extract my existing configuration:
32
+ - `MIND_ROOT` → knowledge base path
33
+ - `AI_PROVIDER`, `ANTHROPIC_API_KEY`, `ANTHROPIC_MODEL`, `OPENAI_API_KEY`, `OPENAI_MODEL`, `OPENAI_BASE_URL`
34
+ - `AUTH_TOKEN` (if set)
35
+
36
+ 3. **Write `~/.mindos/config.json`** with those values in the new format:
37
+ ```json
38
+ {
39
+ "mindRoot": "<value of MIND_ROOT>",
40
+ "port": 3000,
41
+ "mcpPort": 8787,
42
+ "authToken": "<value of AUTH_TOKEN or empty string>",
43
+ "webPassword": "",
44
+ "ai": {
45
+ "provider": "<value of AI_PROVIDER, default: anthropic>",
46
+ "providers": {
47
+ "anthropic": {
48
+ "apiKey": "<value of ANTHROPIC_API_KEY>",
49
+ "model": "<value of ANTHROPIC_MODEL, default: claude-sonnet-4-6>"
50
+ },
51
+ "openai": {
52
+ "apiKey": "<value of OPENAI_API_KEY>",
53
+ "model": "<value of OPENAI_MODEL, default: gpt-5.4>",
54
+ "baseUrl": "<value of OPENAI_BASE_URL or empty string>"
55
+ }
56
+ }
57
+ }
58
+ }
59
+ ```
60
+ Create `~/.mindos/` directory if it doesn't exist.
61
+
62
+ 4. **Verify** the config was written correctly by reading it back.
63
+
64
+ 5. **Kill any running old MindOS processes** (next dev, mcp server).
65
+
66
+ 6. **Start MindOS with the new command:**
67
+ ```bash
68
+ mindos start
69
+ ```
70
+ (First run will build automatically — this may take a minute.)
71
+
72
+ 7. **Confirm** the app is accessible at http://localhost:3000 and MCP is running at http://localhost:8787/mcp.
73
+
74
+ Do not delete the old cloned repository — keep it as a backup. The `app/.env.local` file can also be kept as reference.
75
+ ```
76
+
77
+ ---
78
+
79
+ ## 中文版
80
+
81
+ ```
82
+ 帮我把 MindOS 从旧版本(源码方式)升级到新的 npm 包版本。
83
+
84
+ **旧版安装方式(我现在的状态):**
85
+ - 克隆了 MindOS 仓库
86
+ - 分别执行了 `cd app && npm install` 和 `cd mcp && npm install && npm run build`
87
+ - 通过 `app/.env.local` 配置(包含 MIND_ROOT、ANTHROPIC_API_KEY 等)
88
+ - 用 `cd app && npm run dev` 启动
89
+ - MCP 需要单独启动
90
+
91
+ **新版安装方式(目标):**
92
+ - 全局 npm 包:`npm install -g mindos@latest`
93
+ - 通过 `~/.mindos/config.json` 统一配置(由 `mindos onboard` 管理)
94
+ - 一个命令启动 app + MCP:`mindos start`
95
+
96
+ **请按以下步骤操作:**
97
+
98
+ 1. **安装新版全局包:**
99
+ ```bash
100
+ npm install -g mindos@latest
101
+ ```
102
+
103
+ 2. **读取我现有的 `app/.env.local`**,提取以下配置:
104
+ - `MIND_ROOT` → 知识库路径
105
+ - `AI_PROVIDER`、`ANTHROPIC_API_KEY`、`ANTHROPIC_MODEL`、`OPENAI_API_KEY`、`OPENAI_MODEL`、`OPENAI_BASE_URL`
106
+ - `AUTH_TOKEN`(如果有)
107
+
108
+ 3. **写入 `~/.mindos/config.json`**,格式如下:
109
+ ```json
110
+ {
111
+ "mindRoot": "<MIND_ROOT 的值>",
112
+ "port": 3000,
113
+ "mcpPort": 8787,
114
+ "authToken": "<AUTH_TOKEN 的值,没有则留空字符串>",
115
+ "webPassword": "",
116
+ "ai": {
117
+ "provider": "<AI_PROVIDER 的值,默认 anthropic>",
118
+ "providers": {
119
+ "anthropic": {
120
+ "apiKey": "<ANTHROPIC_API_KEY 的值>",
121
+ "model": "<ANTHROPIC_MODEL 的值,默认 claude-sonnet-4-6>"
122
+ },
123
+ "openai": {
124
+ "apiKey": "<OPENAI_API_KEY 的值>",
125
+ "model": "<OPENAI_MODEL 的值,默认 gpt-5.4>",
126
+ "baseUrl": "<OPENAI_BASE_URL 的值,没有则留空字符串>"
127
+ }
128
+ }
129
+ }
130
+ }
131
+ ```
132
+ 如果 `~/.mindos/` 目录不存在,请先创建。
133
+
134
+ 4. **验证**配置文件写入正确。
135
+
136
+ 5. **停止旧的 MindOS 进程**(next dev、mcp server 等)。
137
+
138
+ 6. **用新命令启动:**
139
+ ```bash
140
+ mindos start
141
+ ```
142
+ (首次运行会自动构建,可能需要一两分钟。)
143
+
144
+ 7. **确认** http://localhost:3000 可以访问,http://localhost:8787/mcp 的 MCP 服务也在运行。
145
+
146
+ 不要删除旧的克隆仓库,保留作为备份。`app/.env.local` 也可以保留作参考。
147
+ ```
@@ -0,0 +1,319 @@
1
+ ---
2
+ name: mindos
3
+ description: >
4
+ MindOS knowledge base operation guide for agent tasks on local markdown/csv knowledge bases.
5
+ Use proactively whenever work touches note files, SOP/workflow docs, profile/context docs,
6
+ CSV tables, knowledge-base organization, cross-agent handoff, or decision sync through MindOS MCP tools.
7
+ Trigger on requests like "update notes", "search knowledge base", "organize files", "execute SOP",
8
+ "review with our standards", "handoff to another agent", "sync decisions", "append CSV",
9
+ "retrospective", "distill this conversation", "capture key learnings", "update related docs adaptively",
10
+ "route this to the right files", "update everything related", "sync this across my knowledge base",
11
+ and generally any local knowledge-maintenance workflow even if the user does not explicitly mention MindOS.
12
+ ---
13
+
14
+ # MindOS Knowledge Base Operation Guide
15
+
16
+ Use this skill to operate safely and consistently in a MindOS-style local knowledge base.
17
+
18
+ ## Core Principles
19
+
20
+ - Treat repository state as source of truth.
21
+ - **The directory tree loaded at bootstrap is a first-class semantic asset.** Directory names, file names, and their hierarchy encode what the user has stored and how they organize their thinking. Always reason from this structure before resorting to search — it often tells you where content lives without any tool call.
22
+ - Read before write.
23
+ - Prefer minimal, precise edits.
24
+ - Keep changes auditable and easy to review.
25
+
26
+ ## Startup Protocol
27
+
28
+ Run this sequence before substantive edits:
29
+
30
+ 1. Load root guidance.
31
+ - Prefer `mindos_bootstrap`.
32
+ - If unavailable, read root `INSTRUCTION.md` and root `README.md` directly.
33
+
34
+ 2. Discover current structure dynamically.
35
+ - Use `mindos_list_files` and targeted `mindos_search_notes`.
36
+ - Do not assume fixed top-level directory names.
37
+
38
+ 3. Load local guidance around target paths.
39
+ - Read nearby `README.md` / `INSTRUCTION.md` when present.
40
+ - Follow local conventions over global assumptions.
41
+
42
+ 4. Execute edits.
43
+
44
+ If required context is missing, continue with best effort and state assumptions explicitly.
45
+
46
+ ## Dynamic Structure Rules
47
+
48
+ - Do not hardcode a canonical directory tree.
49
+ - Infer conventions from neighboring files before creating or rewriting content.
50
+ - Mirror existing local patterns for naming, heading structure, CSV schema, and references.
51
+ - For new files, follow sibling style rather than inventing a new standard.
52
+ - **Never create files or directories in the root directory unless the user explicitly requests it.** The root is reserved for top-level governance files (README, INSTRUCTION, CONFIG). New content should be placed under the most semantically appropriate existing subdirectory. Reason from the directory tree in context to find the right home.
53
+ - When creating a new file or directory, always determine the best parent directory first by reviewing the existing structure. If no existing directory is a clear fit, propose 1-2 candidate locations and ask the user before creating.
54
+ - **After any file create/delete/move/rename, always sync affected README files.** READMEs serve as directory indexes and navigation entry points. Any operation that changes a directory's contents (creating, deleting, moving, or renaming files or subdirectories) must trigger an automatic check and update of the README in that directory and its parent directory, so they accurately reflect the current structure. This requires no user prompting — it is basic structural consistency discipline.
55
+
56
+ ## Pre-Write Checklist
57
+
58
+ Before any non-trivial write, confirm all checks:
59
+
60
+ 1. Target file/path is confirmed and exists or should be created.
61
+ 2. **Target location is under an appropriate subdirectory, not the root.** If unsure which directory fits best, propose candidates and ask the user.
62
+ 3. Current content has been read, or absence is explicitly confirmed.
63
+ 4. Local governance docs near the target path are considered.
64
+ 5. Edit scope is minimal and aligned with user intent.
65
+ 6. Reference/backlink impact is evaluated for path changes.
66
+
67
+ ## Tool Selection Guide
68
+
69
+ ### Discovery
70
+
71
+ - `mindos_bootstrap`: Load startup context.
72
+ - `mindos_list_files`: Inspect file tree.
73
+ - `mindos_search_notes`: Locate relevant files by keyword/scope/type/date. **When searching, always issue multiple parallel searches with different keywords upfront** — synonyms, abbreviations, English/Chinese variants, and broader/narrower terms. A single keyword is fragile; casting a wider net on the first try avoids wasted rounds.
74
+ - `mindos_get_recent`: Inspect latest activity.
75
+ - `mindos_get_backlinks`: Assess impact before rename/move/delete.
76
+
77
+ ### Read and write
78
+
79
+ - `mindos_read_file`: Read file content.
80
+ - `mindos_write_file`: Use only for true full replacement.
81
+ - `mindos_create_file`: Create `.md`/`.csv` files.
82
+ - `mindos_delete_file`: Delete only with explicit user intent.
83
+ - `mindos_rename_file`, `mindos_move_file`: Structural edits with follow-up reference checks.
84
+
85
+ ### Precise editing
86
+
87
+ - `mindos_read_lines`: Locate exact lines.
88
+ - `mindos_insert_lines`: Insert at index.
89
+ - `mindos_update_lines`: Replace specific range.
90
+ - `mindos_append_to_file`: Append to end.
91
+ - `mindos_insert_after_heading`: Insert under heading.
92
+ - `mindos_update_section`: Replace one markdown section.
93
+
94
+ ### History and tables
95
+
96
+ - `mindos_get_history`, `mindos_get_file_at_version`: Investigate/recover history.
97
+ - `mindos_append_csv`: Append validated row after header check.
98
+
99
+ ## Fallback Rules
100
+
101
+ - If some `mindos_*` tools are unavailable, use equivalent available tools while preserving the same safety discipline.
102
+ - If `mindos_bootstrap` is unavailable, do manual startup reads.
103
+ - If line/section edit tools are unavailable, emulate minimal edits through read plus constrained rewrite.
104
+ - If `mindos_search_notes` returns no results, do not give up. The directory tree loaded at bootstrap is already in your context — directory names, file names, and their hierarchy are semantically rich and often enough to infer where content lives. Escalate progressively:
105
+ 1. Review the directory structure already in context. Reason about which directories and files are likely relevant based on naming, hierarchy, and topic proximity.
106
+ 2. Read the most promising candidate files directly to confirm relevance.
107
+ 3. If candidates are unclear, use `mindos_list_files` on a specific subdirectory for finer-grained structure not captured at bootstrap.
108
+ 4. Try alternative search terms (synonyms, broader/narrower keywords, English/Chinese variants) as a parallel strategy.
109
+
110
+ ## Execution Patterns
111
+
112
+ ### Capture or update notes
113
+
114
+ 1. Search existing docs.
115
+ 2. Read target docs and local rules.
116
+ 3. Apply minimal edit.
117
+ 4. Keep references consistent when paths change.
118
+
119
+ ### Distill cross-agent discussion
120
+
121
+ 1. Ask user to confirm key decisions and conclusions.
122
+ 2. Locate destination docs.
123
+ 3. Structure content as problem, decision, rationale, caveats, next actions.
124
+ 4. Write back with minimal invasive edits.
125
+
126
+ Never imply access to private history from other agent sessions.
127
+
128
+ ### Conversation retrospective and adaptive updates
129
+
130
+ 1. Ask the user to confirm retrospective objective and scope for this conversation.
131
+ 2. Extract reusable artifacts: decisions, rationale, pitfalls, unresolved questions, and next actions.
132
+ 3. Route each artifact to the most appropriate existing file by searching and reading candidate docs.
133
+ 4. If a matching file exists, update minimally at section/line level; if not, create a well-scoped new file near related docs.
134
+ 5. Keep references/backlinks consistent and add a short trace note of what changed and why.
135
+ 6. If confidence in file routing is low, present 1-2 candidate destinations and ask user to choose before writing.
136
+
137
+ ### Execute or update workflow/SOP docs
138
+
139
+ 1. Read workflow doc fully.
140
+ 2. Execute stepwise and record outcomes.
141
+ 3. If outdated, update only affected section and include rationale.
142
+
143
+ ### CSV operations
144
+
145
+ 1. Read header.
146
+ 2. Validate field order, count, and type.
147
+ 3. Append one row.
148
+
149
+ ### Information collection and outreach
150
+
151
+ 1. Locate authoritative contact/list sources.
152
+ 2. Read relevant outreach/execution workflow docs.
153
+ 3. Generate personalized outputs per target using profile tags, domain, and tone.
154
+ 4. Write outcomes and next actions back for traceability.
155
+
156
+ ### Project bootstrap with personal/team standards
157
+
158
+ 1. Read preference/context docs such as stack, style, and constraints.
159
+ 2. Read startup/engineering workflow docs.
160
+ 3. Produce initial scaffold/configuration aligned with those standards.
161
+ 4. Record key decisions and setup status for future handoff.
162
+
163
+ ### Standards-aligned code review
164
+
165
+ 1. Read applicable review and engineering standards.
166
+ 2. Review naming, error handling, performance, security, and maintainability.
167
+ 3. Output actionable findings with concrete file-level suggestions.
168
+ 4. Keep tone and structure consistent with team review style.
169
+
170
+ ### Cross-agent handoff continuity
171
+
172
+ 1. Treat the shared knowledge base as handoff contract.
173
+ 2. Before continuing work, read task state, decisions, and pending items.
174
+ 3. Continue without re-discovery and preserve conventions/rationale.
175
+ 4. Write back progress so later sessions can resume immediately.
176
+
177
+ ### Relationship and follow-up management
178
+
179
+ 1. Extract factual updates, intent, and sentiment from user-provided conversation notes.
180
+ 2. Update relationship/contact records in structured form.
181
+ 3. Generate next-step strategy, todo items, and suggested follow-up timing.
182
+ 4. Store updates in reusable format for future session continuity.
183
+
184
+ ### Structure-aware multi-file routing
185
+
186
+ A single unstructured input (chat export, meeting notes, voice transcript, braindump) often contains information that belongs in multiple places. MindOS knows the full directory tree and inter-document relationships from bootstrap, so it can decompose the input and route each piece to the right file — in one pass, without the user manually specifying destinations.
187
+
188
+ 1. Load structure context via `mindos_bootstrap` and `mindos_list_files` to understand the full knowledge topology.
189
+ 2. Parse the input into distinct semantic units (facts, decisions, ideas, action items, relationship updates, new concepts).
190
+ 3. For each unit, search and read candidate destination files to find the best match by topic, scope, and existing structure.
191
+ 4. **Before writing, present the routing plan to the user for approval.** Show a clear summary table: what will be written, to which file, at which location. Only proceed after user confirms.
192
+ 5. Apply minimal edits to each target file at the correct location (section, heading, or line level). Create new files only when no existing file is a reasonable fit.
193
+ 6. If routing confidence is low for any unit, present candidate destinations and ask the user to choose.
194
+ 7. After all writes, summarize what changed and where, so the user can audit the full update in one glance.
195
+
196
+ This pattern is what makes MindOS fundamentally different from document-per-document tools: the structural prior means one input triggers coordinated updates across the knowledge base, and nothing falls through the cracks because the agent sees the whole graph.
197
+
198
+ ### Knowledge conflict resolution
199
+
200
+ When a decision, preference, or fact changes (e.g., "we switched from Redis to Memcached"), all documents referencing the old information must be updated consistently.
201
+
202
+ 1. Search the entire knowledge base for references to the outdated information (use multiple search terms, including abbreviations and variants).
203
+ 2. List all affected files and the specific lines/sections that reference the old decision.
204
+ 3. Present the full change plan to the user: which files, what will change, and why.
205
+ 4. After approval, update each file with minimal targeted edits.
206
+ 5. Verify no inconsistent references remain after the update.
207
+
208
+ ### Distill experience into new SOP
209
+
210
+ When the user has just completed a complex task and wants to capture the process for reuse, create a structured, reusable workflow document — not just a one-time record.
211
+
212
+ 1. Extract the procedure, decision points, prerequisites, and common pitfalls from the user's description.
213
+ 2. Generalize: remove one-off specifics, keep the reusable pattern.
214
+ 3. Find the appropriate location under Workflows/ or a similar directory. Check for existing SOP templates or sibling format.
215
+ 4. Create the SOP with clear sections: prerequisites, step-by-step procedure, troubleshooting/pitfalls, and references to related docs.
216
+ 5. Link the new SOP from relevant index files if applicable.
217
+
218
+ ### Periodic review and summary
219
+
220
+ When the user asks for a weekly review, monthly recap, or progress summary:
221
+
222
+ 1. Use `mindos_get_recent` and/or `mindos_get_history` to identify files changed in the relevant time window.
223
+ 2. Read changed files to understand what happened.
224
+ 3. Categorize changes by area (projects, profile, workflows, etc.).
225
+ 4. Produce a structured summary: key decisions made, progress on active projects, open items, and things that need attention.
226
+ 5. Offer to write the summary back as a review note if the user wants to keep it.
227
+
228
+ ### Context-aware question answering
229
+
230
+ When the user asks a question about themselves, their projects, preferences, or stored knowledge:
231
+
232
+ 1. Reason from the directory tree to identify which files likely contain the answer.
233
+ 2. Read the relevant files — do not guess or assume from general knowledge.
234
+ 3. Answer grounded in actual stored content, citing source files.
235
+ 4. If the information is incomplete or missing, say so explicitly rather than fabricating.
236
+
237
+ ### TODO and task list management
238
+
239
+ When the user wants to add, complete, or modify tasks:
240
+
241
+ 1. Locate the TODO file or task list (search or navigate from directory structure).
242
+ 2. Read current content to understand existing format (checkboxes, priorities, categories).
243
+ 3. Make minimal targeted edits: mark items, add items, or update status.
244
+ 4. Preserve all other existing content and formatting.
245
+ 5. Follow the existing format conventions exactly — do not introduce a new task format.
246
+
247
+ ### Handoff document synthesis
248
+
249
+ When the user needs to create a handoff or briefing document for someone else (new team member, collaborator, manager):
250
+
251
+ 1. Identify all relevant source files across the knowledge base for the topic (project docs, decisions, status, tech stack, open items).
252
+ 2. Read each source file to extract the relevant information.
253
+ 3. Synthesize into a single coherent handoff document with sections: background, key decisions and rationale, current status, open items, and further reading (with links to source files).
254
+ 4. Place the handoff document in the appropriate project directory, not the root.
255
+
256
+ ### Structural rename and move
257
+
258
+ When renaming or moving files/directories:
259
+
260
+ 1. Use `mindos_get_backlinks` to find all files referencing the target path.
261
+ 2. Report the full impact scope to the user: how many files, which ones, what references.
262
+ 3. Ask for confirmation before proceeding.
263
+ 4. Execute the rename/move.
264
+ 5. Update all broken references in affected files.
265
+ 6. Verify no orphaned links remain.
266
+
267
+ ### Auto-sync READMEs after directory changes
268
+
269
+ After any operation that affects directory structure (creating, deleting, moving, or renaming files or subdirectories):
270
+
271
+ 1. Identify affected directories: the directory where the file was (source), the directory where it now is (destination), and their parent directories.
272
+ 2. Read the README in each affected directory (if one exists).
273
+ 3. Update file listings, indexes, and navigation in each README to accurately reflect the current directory contents.
274
+ 4. If the README contains file descriptions or links, update paths and names accordingly.
275
+ 5. If a directory has no README but sibling directories generally do, consider creating one for the new directory.
276
+
277
+ This step is an automatic follow-up to all structural change operations — it does not require a separate user request.
278
+
279
+ ## Interaction Rules
280
+
281
+ - **When a request is ambiguous or too broad (e.g., "help me organize things"), always ask for clarification before acting.** Propose specific options based on what you see in the knowledge base (recent changes, directory structure), but do not start reorganizing or rewriting without understanding the user's intent and scope.
282
+ - When presenting search results or options, prioritize brevity and relevance. Show the most likely match first.
283
+ - When answering questions from stored knowledge, always cite the source file path so the user can verify.
284
+
285
+ ## Safety Rules
286
+
287
+ - By default, treat root `INSTRUCTION.md`, root `README.md`, and any directory-level `INSTRUCTION.md` governance docs as high-sensitivity; ask for confirmation before modifying them.
288
+ - Ask before editing high-sensitivity governance files.
289
+ - Ask before high-impact actions.
290
+ - High-impact actions include bulk deletion, large-scale rename/move, broad directory restructuring, and cross-file mass rewrites.
291
+ - **When an operation will touch multiple files, always present the full change plan to the user first.** List each target file, what will change, and why. Wait for approval before executing. This is non-negotiable — users must be able to see and control multi-file updates before they happen.
292
+ - Never store secrets, tokens, or passwords.
293
+ - Never delete or rewrite outside user intent.
294
+
295
+ ## Continuous Evaluation Loop
296
+
297
+ For important workflows, run a fast iterate loop:
298
+
299
+ 1. Define 2-3 representative prompts for the current task type.
300
+ 2. Run the workflow with this skill guidance.
301
+ 3. Check result quality against user intent, local conventions, and safety rules.
302
+ 4. Identify the smallest instruction change that would prevent observed failure modes.
303
+ 5. Re-run prompts and keep only changes that improve consistency without overfitting.
304
+
305
+ ## Quality Gates
306
+
307
+ Before finishing, verify:
308
+
309
+ 1. Result directly answers user intent.
310
+ 2. Updated content matches local style and structure.
311
+ 3. References/links remain valid after structural edits.
312
+ 4. No sensitive information was introduced.
313
+ 5. Summary to user is specific enough for quick audit.
314
+
315
+ ## Style Rules
316
+
317
+ - Follow repository-local style.
318
+ - Keep language concise and execution-oriented.
319
+ - Preserve useful structure like headings, checklists, tables, and references.