@geminilight/mindos 0.6.57 → 0.6.59

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 (293) hide show
  1. package/_standalone/.mindos-build-version +1 -1
  2. package/_standalone/.next/BUILD_ID +1 -1
  3. package/_standalone/.next/app-path-routes-manifest.json +24 -24
  4. package/_standalone/.next/build-manifest.json +3 -3
  5. package/_standalone/.next/cache/.previewinfo +1 -1
  6. package/_standalone/.next/cache/.rscinfo +1 -1
  7. package/_standalone/.next/cache/config.json +3 -3
  8. package/_standalone/.next/prerender-manifest.json +3 -3
  9. package/_standalone/.next/react-loadable-manifest.json +1 -1
  10. package/_standalone/.next/server/app/.well-known/agent-card.json/route_client-reference-manifest.js +1 -1
  11. package/_standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  12. package/_standalone/.next/server/app/_global-error.html +2 -2
  13. package/_standalone/.next/server/app/_global-error.rsc +1 -1
  14. package/_standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  15. package/_standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  16. package/_standalone/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  17. package/_standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  18. package/_standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  19. package/_standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  20. package/_standalone/.next/server/app/_not-found/page.js +1 -1
  21. package/_standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
  22. package/_standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  23. package/_standalone/.next/server/app/agents/[agentKey]/page.js +2 -2
  24. package/_standalone/.next/server/app/agents/[agentKey]/page.js.nft.json +1 -1
  25. package/_standalone/.next/server/app/agents/[agentKey]/page_client-reference-manifest.js +1 -1
  26. package/_standalone/.next/server/app/agents/page.js +2 -2
  27. package/_standalone/.next/server/app/agents/page.js.nft.json +1 -1
  28. package/_standalone/.next/server/app/agents/page_client-reference-manifest.js +1 -1
  29. package/_standalone/.next/server/app/api/a2a/agents/route_client-reference-manifest.js +1 -1
  30. package/_standalone/.next/server/app/api/a2a/delegations/route_client-reference-manifest.js +1 -1
  31. package/_standalone/.next/server/app/api/a2a/discover/route_client-reference-manifest.js +1 -1
  32. package/_standalone/.next/server/app/api/a2a/route_client-reference-manifest.js +1 -1
  33. package/_standalone/.next/server/app/api/acp/config/route.js +1 -1
  34. package/_standalone/.next/server/app/api/acp/config/route_client-reference-manifest.js +1 -1
  35. package/_standalone/.next/server/app/api/acp/detect/route.js +1 -1
  36. package/_standalone/.next/server/app/api/acp/detect/route_client-reference-manifest.js +1 -1
  37. package/_standalone/.next/server/app/api/acp/install/route_client-reference-manifest.js +1 -1
  38. package/_standalone/.next/server/app/api/acp/registry/route_client-reference-manifest.js +1 -1
  39. package/_standalone/.next/server/app/api/acp/session/route_client-reference-manifest.js +1 -1
  40. package/_standalone/.next/server/app/api/agent-activity/route_client-reference-manifest.js +1 -1
  41. package/_standalone/.next/server/app/api/agents/custom/detect/route.js +1 -1
  42. package/_standalone/.next/server/app/api/agents/custom/detect/route_client-reference-manifest.js +1 -1
  43. package/_standalone/.next/server/app/api/agents/custom/route.js +1 -1
  44. package/_standalone/.next/server/app/api/agents/custom/route_client-reference-manifest.js +1 -1
  45. package/_standalone/.next/server/app/api/ask/route.js +5 -5
  46. package/_standalone/.next/server/app/api/ask/route.js.nft.json +1 -1
  47. package/_standalone/.next/server/app/api/ask/route_client-reference-manifest.js +1 -1
  48. package/_standalone/.next/server/app/api/ask-sessions/route_client-reference-manifest.js +1 -1
  49. package/_standalone/.next/server/app/api/auth/route_client-reference-manifest.js +1 -1
  50. package/_standalone/.next/server/app/api/backlinks/route.js.nft.json +1 -1
  51. package/_standalone/.next/server/app/api/backlinks/route_client-reference-manifest.js +1 -1
  52. package/_standalone/.next/server/app/api/bootstrap/route.js.nft.json +1 -1
  53. package/_standalone/.next/server/app/api/bootstrap/route_client-reference-manifest.js +1 -1
  54. package/_standalone/.next/server/app/api/changes/route.js.nft.json +1 -1
  55. package/_standalone/.next/server/app/api/changes/route_client-reference-manifest.js +1 -1
  56. package/_standalone/.next/server/app/api/export/route.js.nft.json +1 -1
  57. package/_standalone/.next/server/app/api/export/route_client-reference-manifest.js +1 -1
  58. package/_standalone/.next/server/app/api/extract-pdf/route_client-reference-manifest.js +1 -1
  59. package/_standalone/.next/server/app/api/file/import/route.js.nft.json +1 -1
  60. package/_standalone/.next/server/app/api/file/import/route_client-reference-manifest.js +1 -1
  61. package/_standalone/.next/server/app/api/file/raw/route.js.nft.json +1 -1
  62. package/_standalone/.next/server/app/api/file/raw/route_client-reference-manifest.js +1 -1
  63. package/_standalone/.next/server/app/api/file/route.js.nft.json +1 -1
  64. package/_standalone/.next/server/app/api/file/route_client-reference-manifest.js +1 -1
  65. package/_standalone/.next/server/app/api/files/route.js.nft.json +1 -1
  66. package/_standalone/.next/server/app/api/files/route_client-reference-manifest.js +1 -1
  67. package/_standalone/.next/server/app/api/git/route.js.nft.json +1 -1
  68. package/_standalone/.next/server/app/api/git/route_client-reference-manifest.js +1 -1
  69. package/_standalone/.next/server/app/api/graph/route.js.nft.json +1 -1
  70. package/_standalone/.next/server/app/api/graph/route_client-reference-manifest.js +1 -1
  71. package/_standalone/.next/server/app/api/health/route_client-reference-manifest.js +1 -1
  72. package/_standalone/.next/server/app/api/inbox/route.js.nft.json +1 -1
  73. package/_standalone/.next/server/app/api/inbox/route_client-reference-manifest.js +1 -1
  74. package/_standalone/.next/server/app/api/init/route.js.nft.json +1 -1
  75. package/_standalone/.next/server/app/api/init/route_client-reference-manifest.js +1 -1
  76. package/_standalone/.next/server/app/api/mcp/agents/route.js +1 -1
  77. package/_standalone/.next/server/app/api/mcp/agents/route.js.nft.json +1 -1
  78. package/_standalone/.next/server/app/api/mcp/agents/route_client-reference-manifest.js +1 -1
  79. package/_standalone/.next/server/app/api/mcp/install/route.js +1 -1
  80. package/_standalone/.next/server/app/api/mcp/install/route_client-reference-manifest.js +1 -1
  81. package/_standalone/.next/server/app/api/mcp/install-skill/route_client-reference-manifest.js +1 -1
  82. package/_standalone/.next/server/app/api/mcp/restart/route_client-reference-manifest.js +1 -1
  83. package/_standalone/.next/server/app/api/mcp/status/route.js +1 -1
  84. package/_standalone/.next/server/app/api/mcp/status/route_client-reference-manifest.js +1 -1
  85. package/_standalone/.next/server/app/api/mcp/uninstall/route_client-reference-manifest.js +1 -1
  86. package/_standalone/.next/server/app/api/monitoring/route.js.nft.json +1 -1
  87. package/_standalone/.next/server/app/api/monitoring/route_client-reference-manifest.js +1 -1
  88. package/_standalone/.next/server/app/api/recent-files/route.js.nft.json +1 -1
  89. package/_standalone/.next/server/app/api/recent-files/route_client-reference-manifest.js +1 -1
  90. package/_standalone/.next/server/app/api/restart/route_client-reference-manifest.js +1 -1
  91. package/_standalone/.next/server/app/api/search/route.js.nft.json +1 -1
  92. package/_standalone/.next/server/app/api/search/route_client-reference-manifest.js +1 -1
  93. package/_standalone/.next/server/app/api/settings/list-models/route_client-reference-manifest.js +1 -1
  94. package/_standalone/.next/server/app/api/settings/reset-token/route.js +1 -1
  95. package/_standalone/.next/server/app/api/settings/reset-token/route_client-reference-manifest.js +1 -1
  96. package/_standalone/.next/server/app/api/settings/route.js +1 -1
  97. package/_standalone/.next/server/app/api/settings/route.js.nft.json +1 -1
  98. package/_standalone/.next/server/app/api/settings/route_client-reference-manifest.js +1 -1
  99. package/_standalone/.next/server/app/api/settings/test-key/route.js +1 -1
  100. package/_standalone/.next/server/app/api/settings/test-key/route_client-reference-manifest.js +1 -1
  101. package/_standalone/.next/server/app/api/setup/check-path/route_client-reference-manifest.js +1 -1
  102. package/_standalone/.next/server/app/api/setup/check-port/route_client-reference-manifest.js +1 -1
  103. package/_standalone/.next/server/app/api/setup/generate-token/route_client-reference-manifest.js +1 -1
  104. package/_standalone/.next/server/app/api/setup/ls/route_client-reference-manifest.js +1 -1
  105. package/_standalone/.next/server/app/api/setup/route.js +1 -1
  106. package/_standalone/.next/server/app/api/setup/route_client-reference-manifest.js +1 -1
  107. package/_standalone/.next/server/app/api/skills/route.js +1 -1
  108. package/_standalone/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
  109. package/_standalone/.next/server/app/api/sync/route_client-reference-manifest.js +1 -1
  110. package/_standalone/.next/server/app/api/tree-version/route.js.nft.json +1 -1
  111. package/_standalone/.next/server/app/api/tree-version/route_client-reference-manifest.js +1 -1
  112. package/_standalone/.next/server/app/api/uninstall/route_client-reference-manifest.js +1 -1
  113. package/_standalone/.next/server/app/api/update/route_client-reference-manifest.js +1 -1
  114. package/_standalone/.next/server/app/api/update-check/route_client-reference-manifest.js +1 -1
  115. package/_standalone/.next/server/app/api/update-status/route_client-reference-manifest.js +1 -1
  116. package/_standalone/.next/server/app/api/workflows/route.js.nft.json +1 -1
  117. package/_standalone/.next/server/app/api/workflows/route_client-reference-manifest.js +1 -1
  118. package/_standalone/.next/server/app/changes/page.js +2 -2
  119. package/_standalone/.next/server/app/changes/page.js.nft.json +1 -1
  120. package/_standalone/.next/server/app/changes/page_client-reference-manifest.js +1 -1
  121. package/_standalone/.next/server/app/echo/[segment]/page.js +3 -3
  122. package/_standalone/.next/server/app/echo/[segment]/page.js.nft.json +1 -1
  123. package/_standalone/.next/server/app/echo/[segment]/page_client-reference-manifest.js +1 -1
  124. package/_standalone/.next/server/app/echo/page.js +1 -1
  125. package/_standalone/.next/server/app/echo/page.js.nft.json +1 -1
  126. package/_standalone/.next/server/app/echo/page_client-reference-manifest.js +1 -1
  127. package/_standalone/.next/server/app/explore/page.js +3 -3
  128. package/_standalone/.next/server/app/explore/page.js.nft.json +1 -1
  129. package/_standalone/.next/server/app/explore/page_client-reference-manifest.js +1 -1
  130. package/_standalone/.next/server/app/help/page.js +2 -2
  131. package/_standalone/.next/server/app/help/page.js.nft.json +1 -1
  132. package/_standalone/.next/server/app/help/page_client-reference-manifest.js +1 -1
  133. package/_standalone/.next/server/app/inbox/history/page.js +1 -1
  134. package/_standalone/.next/server/app/inbox/history/page.js.nft.json +1 -1
  135. package/_standalone/.next/server/app/inbox/history/page_client-reference-manifest.js +1 -1
  136. package/_standalone/.next/server/app/login/page.js +2 -2
  137. package/_standalone/.next/server/app/login/page.js.nft.json +1 -1
  138. package/_standalone/.next/server/app/login/page_client-reference-manifest.js +1 -1
  139. package/_standalone/.next/server/app/page.js +2 -8
  140. package/_standalone/.next/server/app/page.js.nft.json +1 -1
  141. package/_standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  142. package/_standalone/.next/server/app/setup/page.js +2 -2
  143. package/_standalone/.next/server/app/setup/page.js.nft.json +1 -1
  144. package/_standalone/.next/server/app/setup/page_client-reference-manifest.js +1 -1
  145. package/_standalone/.next/server/app/trash/page.js +3 -3
  146. package/_standalone/.next/server/app/trash/page.js.nft.json +1 -1
  147. package/_standalone/.next/server/app/trash/page_client-reference-manifest.js +1 -1
  148. package/_standalone/.next/server/app/view/[...path]/page.js +3 -3
  149. package/_standalone/.next/server/app/view/[...path]/page.js.nft.json +1 -1
  150. package/_standalone/.next/server/app/view/[...path]/page_client-reference-manifest.js +1 -1
  151. package/_standalone/.next/server/app/wiki/page.js +2 -2
  152. package/_standalone/.next/server/app/wiki/page.js.nft.json +1 -1
  153. package/_standalone/.next/server/app/wiki/page_client-reference-manifest.js +1 -1
  154. package/_standalone/.next/server/app-paths-manifest.json +24 -24
  155. package/_standalone/.next/server/chunks/1550.js +1 -1
  156. package/_standalone/.next/server/chunks/1750.js +1 -1
  157. package/_standalone/.next/server/chunks/3484.js +1 -1
  158. package/_standalone/.next/server/chunks/530.js +61 -62
  159. package/_standalone/.next/server/chunks/6539.js +1 -1
  160. package/_standalone/.next/server/chunks/{2159.js → 8343.js} +2 -2
  161. package/_standalone/.next/server/chunks/9787.js +2 -0
  162. package/_standalone/.next/server/middleware-build-manifest.js +1 -1
  163. package/_standalone/.next/server/middleware-react-loadable-manifest.js +1 -1
  164. package/_standalone/.next/server/pages/500.html +2 -2
  165. package/_standalone/.next/server/server-reference-manifest.js +1 -1
  166. package/_standalone/.next/server/server-reference-manifest.json +1 -1
  167. package/_standalone/.next/static/chunks/{1814.a7c127b2c73d1f70.js → 1814.a79b84d37df75c43.js} +1 -1
  168. package/_standalone/.next/static/chunks/3427-2e61a5df1f5e55fb.js +1 -0
  169. package/_standalone/.next/static/chunks/5581-dac72e9f16e5ea29.js +29 -0
  170. package/_standalone/.next/static/chunks/6297-085daa21037d5f81.js +1 -0
  171. package/_standalone/.next/static/chunks/7249-6cf8f2b78718c59e.js +11 -0
  172. package/_standalone/.next/static/chunks/8520-56ec9ff087c15204.js +22 -0
  173. package/_standalone/.next/static/chunks/9905-a19d379cb225246e.js +1 -0
  174. package/_standalone/.next/static/chunks/app/agents/[agentKey]/{page-7bdeab5af8e4f5f2.js → page-35ea6de1af2be3b5.js} +1 -1
  175. package/_standalone/.next/static/chunks/app/agents/page-b172ea3743adb047.js +1 -0
  176. package/_standalone/.next/static/chunks/app/changes/{page-5a72144d1080a699.js → page-6d2f49651c0061f7.js} +1 -1
  177. package/_standalone/.next/static/chunks/app/echo/[segment]/page-84b95256f6e38aae.js +11 -0
  178. package/_standalone/.next/static/chunks/app/explore/{page-d3d99308146c2240.js → page-d9f58000bc445360.js} +2 -2
  179. package/_standalone/.next/static/chunks/app/help/{page-222df603080b5fab.js → page-f8cb806371b3175f.js} +1 -1
  180. package/_standalone/.next/static/chunks/app/inbox/history/{page-07819cf95cb0805f.js → page-26e71fb6f716a4c4.js} +1 -1
  181. package/_standalone/.next/static/chunks/app/layout-b89b0d955f39a753.js +164 -0
  182. package/_standalone/.next/static/chunks/app/login/{page-0eeef685052869a6.js → page-18fb00d568cd1f0e.js} +1 -1
  183. package/_standalone/.next/static/chunks/app/page-a8e6f085f38388bf.js +1 -0
  184. package/_standalone/.next/static/chunks/app/setup/{page-99fcfc460fa29733.js → page-821714e7477be46c.js} +1 -1
  185. package/_standalone/.next/static/chunks/app/trash/page-f92b728b78ac0f7e.js +1 -0
  186. package/_standalone/.next/static/chunks/app/view/[...path]/{not-found-fc04c2bd4f35bc6f.js → not-found-6e0c75ad26ce8572.js} +1 -1
  187. package/_standalone/.next/static/chunks/app/view/[...path]/page-f87f4901b5e1a88f.js +12 -0
  188. package/_standalone/.next/static/chunks/app/wiki/page-641edb1f3cff2f93.js +1 -0
  189. package/_standalone/.next/static/chunks/{webpack-2c19436659aa657b.js → webpack-72e8d9e9073fd1f9.js} +1 -1
  190. package/_standalone/.next/static/css/6c104b118d3bc9b7.css +1 -0
  191. package/_standalone/.next/trace +64 -64
  192. package/_standalone/__tests__/api/mcp-install.test.ts +3 -2
  193. package/_standalone/__tests__/ask/non-streaming-api.test.ts +281 -0
  194. package/_standalone/__tests__/core/skill-install-logic.test.ts +1 -0
  195. package/_standalone/app/globals.css +2 -1
  196. package/_standalone/components/AskFab.tsx +4 -4
  197. package/_standalone/components/AskModal.tsx +1 -1
  198. package/_standalone/components/GuideCard.tsx +101 -152
  199. package/_standalone/components/RightAskPanel.tsx +2 -2
  200. package/_standalone/components/agents/CustomAgentModal.tsx +32 -8
  201. package/_standalone/components/ask/AskContent.tsx +90 -51
  202. package/_standalone/components/ask/AskHeader.tsx +218 -18
  203. package/_standalone/components/ask/MessageList.tsx +66 -47
  204. package/_standalone/components/ask/SessionHistory.tsx +86 -60
  205. package/_standalone/components/ask/SessionTabBar.tsx +29 -21
  206. package/_standalone/components/ask/ThinkingBlock.tsx +6 -5
  207. package/_standalone/components/ask/ToolCallBlock.tsx +10 -9
  208. package/_standalone/components/settings/SettingsContent.tsx +1 -1
  209. package/_standalone/data/skills/mindos/SKILL.md +72 -15
  210. package/_standalone/data/skills/mindos-zh/SKILL.md +73 -8
  211. package/_standalone/hooks/useAskSession.ts +23 -1
  212. package/_standalone/lib/stores/locale-store.ts +20 -6
  213. package/_standalone/tsconfig.tsbuildinfo +1 -1
  214. package/app/app/api/agents/custom/route.ts +8 -0
  215. package/app/app/api/ask/route.ts +171 -10
  216. package/app/app/api/mcp/agents/route.ts +5 -3
  217. package/app/app/api/settings/route.ts +9 -0
  218. package/app/app/api/settings/test-key/route.ts +13 -1
  219. package/app/app/globals.css +2 -1
  220. package/app/app/layout.tsx +16 -4
  221. package/app/components/AskFab.tsx +4 -4
  222. package/app/components/AskModal.tsx +1 -1
  223. package/app/components/GuideCard.tsx +101 -152
  224. package/app/components/HomeContent.tsx +116 -575
  225. package/app/components/RightAskPanel.tsx +2 -2
  226. package/app/components/WikiHomeContent.tsx +151 -3
  227. package/app/components/agents/CustomAgentModal.tsx +32 -8
  228. package/app/components/ask/AskContent.tsx +90 -51
  229. package/app/components/ask/AskHeader.tsx +218 -18
  230. package/app/components/ask/MessageList.tsx +66 -47
  231. package/app/components/ask/SessionHistory.tsx +86 -60
  232. package/app/components/ask/SessionTabBar.tsx +29 -21
  233. package/app/components/ask/ThinkingBlock.tsx +6 -5
  234. package/app/components/ask/ToolCallBlock.tsx +10 -9
  235. package/app/components/settings/SettingsContent.tsx +1 -1
  236. package/app/data/skills/mindos/SKILL.md +72 -15
  237. package/app/data/skills/mindos-zh/SKILL.md +73 -8
  238. package/app/hooks/useAskSession.ts +23 -1
  239. package/app/lib/custom-agents.ts +45 -2
  240. package/app/lib/i18n/modules/ai-chat.ts +97 -10
  241. package/app/lib/i18n/modules/onboarding.ts +12 -12
  242. package/app/lib/i18n/modules/panels.ts +10 -2
  243. package/app/lib/mcp-agents.ts +10 -0
  244. package/app/lib/stores/LocaleStoreInit.tsx +24 -1
  245. package/app/lib/stores/locale-store.ts +20 -6
  246. package/app/lib/types.ts +1 -0
  247. package/bin/lib/mcp-agents.js +10 -0
  248. package/package.json +1 -1
  249. package/skills/mindos/SKILL.md +69 -11
  250. package/skills/mindos/references/knowledge-health.md +120 -0
  251. package/skills/mindos-max/SKILL.md +238 -0
  252. package/skills/mindos-max-workspace/evals/evals.json +23 -0
  253. package/skills/mindos-max-workspace/iteration-1/capture-debugging-experience-en/eval_metadata.json +11 -0
  254. package/skills/mindos-max-workspace/iteration-1/capture-debugging-experience-en/old_skill/grading.json +28 -0
  255. package/skills/mindos-max-workspace/iteration-1/capture-debugging-experience-en/old_skill/outputs/transcript.md +203 -0
  256. package/skills/mindos-max-workspace/iteration-1/capture-debugging-experience-en/with_skill/grading.json +28 -0
  257. package/skills/mindos-max-workspace/iteration-1/capture-debugging-experience-en/with_skill/outputs/transcript.md +271 -0
  258. package/skills/mindos-max-workspace/iteration-1/save-meeting-decision-zh/eval_metadata.json +11 -0
  259. package/skills/mindos-max-workspace/iteration-1/save-meeting-decision-zh/old_skill/grading.json +28 -0
  260. package/skills/mindos-max-workspace/iteration-1/save-meeting-decision-zh/old_skill/outputs/transcript.md +121 -0
  261. package/skills/mindos-max-workspace/iteration-1/save-meeting-decision-zh/with_skill/grading.json +28 -0
  262. package/skills/mindos-max-workspace/iteration-1/save-meeting-decision-zh/with_skill/outputs/transcript.md +168 -0
  263. package/skills/mindos-max-workspace/iteration-1/search-past-decision-zh/eval_metadata.json +11 -0
  264. package/skills/mindos-max-workspace/iteration-1/search-past-decision-zh/old_skill/grading.json +28 -0
  265. package/skills/mindos-max-workspace/iteration-1/search-past-decision-zh/old_skill/outputs/transcript.md +143 -0
  266. package/skills/mindos-max-workspace/iteration-1/search-past-decision-zh/with_skill/grading.json +28 -0
  267. package/skills/mindos-max-workspace/iteration-1/search-past-decision-zh/with_skill/outputs/transcript.md +233 -0
  268. package/skills/mindos-max-workspace/skill-snapshot/mindos-original/SKILL.md +165 -0
  269. package/skills/mindos-max-workspace/skill-snapshot/mindos-original/references/README.md +12 -0
  270. package/skills/mindos-max-workspace/skill-snapshot/mindos-original/references/post-task-hooks.md +27 -0
  271. package/skills/mindos-max-workspace/skill-snapshot/mindos-original/references/preference-capture.md +41 -0
  272. package/skills/mindos-max-workspace/skill-snapshot/mindos-original/references/sop-template.md +74 -0
  273. package/skills/mindos-max-workspace/skill-snapshot/mindos-original/references/write-supplement.md +119 -0
  274. package/skills/mindos-max-zh/SKILL.md +241 -0
  275. package/skills/mindos-zh/SKILL.md +72 -8
  276. package/_standalone/.next/server/chunks/2364.js +0 -2
  277. package/_standalone/.next/server/chunks/357.js +0 -1
  278. package/_standalone/.next/static/chunks/1053-5cb008a24930e271.js +0 -29
  279. package/_standalone/.next/static/chunks/178-105779afb62d36d9.js +0 -1
  280. package/_standalone/.next/static/chunks/2218-d54538000574ffef.js +0 -1
  281. package/_standalone/.next/static/chunks/2549-e63cf57fa927a41d.js +0 -1
  282. package/_standalone/.next/static/chunks/7249-8cd568ad23656622.js +0 -11
  283. package/_standalone/.next/static/chunks/9274-296ab35f9f09e42e.js +0 -1
  284. package/_standalone/.next/static/chunks/app/agents/page-5d1446665ddb3801.js +0 -1
  285. package/_standalone/.next/static/chunks/app/echo/[segment]/page-b0103509ce34444b.js +0 -11
  286. package/_standalone/.next/static/chunks/app/layout-b3919384ec2eb979.js +0 -186
  287. package/_standalone/.next/static/chunks/app/page-6436a99cda35132b.js +0 -7
  288. package/_standalone/.next/static/chunks/app/trash/page-8dc388695344fdd4.js +0 -1
  289. package/_standalone/.next/static/chunks/app/view/[...path]/page-b292b55305ecc021.js +0 -12
  290. package/_standalone/.next/static/chunks/app/wiki/page-d492256a93f0b8bc.js +0 -1
  291. package/_standalone/.next/static/css/fd84c8316ead16eb.css +0 -1
  292. /package/_standalone/.next/static/{zOaEtgJbdRMncnCBucULp → u8p6oIRTcr_ns-ElNZ9rl}/_buildManifest.js +0 -0
  293. /package/_standalone/.next/static/{zOaEtgJbdRMncnCBucULp → u8p6oIRTcr_ns-ElNZ9rl}/_ssgManifest.js +0 -0
@@ -0,0 +1,120 @@
1
+ # Knowledge Health Check
2
+
3
+ When the user asks to check KB health, detect conflicts, or audit knowledge quality, follow this guide.
4
+
5
+ ## Dimensions
6
+
7
+ ### 1. Contradictions / Conflicts
8
+
9
+ Two or more files state conflicting facts about the same topic (e.g., one says "rate limit = 100/min", another says "rate limit = 200/min" without distinguishing context).
10
+
11
+ **Detection procedure:**
12
+ 1. Identify the topic scope (user may specify, or scan recent edits)
13
+ 2. Search for all files related to the topic (2-4 keyword variants)
14
+ 3. Read each hit and extract key claims/decisions
15
+ 4. Compare claims across files — flag any pair that contradicts
16
+ 5. Present conflicts to user with file paths and quotes
17
+
18
+ **Resolution:** Ask user which version is authoritative. Update or annotate the non-authoritative file to reference the correct source. Never silently overwrite.
19
+
20
+ ### 2. Orphan References
21
+
22
+ A file links to another file that no longer exists (broken `[[link]]` or markdown link).
23
+
24
+ **Detection procedure:**
25
+ 1. List all files in KB
26
+ 2. For each file, extract all internal links (markdown links, wiki-links)
27
+ 3. Check if each link target exists
28
+ 4. Report broken links with source file path and line
29
+
30
+ **Resolution:** Either remove the dead link, or recreate the missing file if the content is recoverable from git history.
31
+
32
+ ### 3. Stale / Outdated Content
33
+
34
+ Files with explicit date markers (e.g., "Last verified: 2025-01-15") that are significantly old, or files whose topic has clearly evolved but the file hasn't been updated.
35
+
36
+ **Detection procedure:**
37
+ 1. Search for date markers: "Last verified", "Last updated", "截止日期", "更新时间"
38
+ 2. Flag any file where the marker date is >90 days old
39
+ 3. Also check `mindos file history <path>` — files untouched for >6 months with active topics are suspects
40
+
41
+ **Resolution:** Present the list to user. For each stale file, ask: still accurate? update? archive?
42
+
43
+ ### 4. Duplicate Content
44
+
45
+ Two files covering the same topic with substantial overlap, neither referencing the other.
46
+
47
+ **Detection procedure:**
48
+ 1. Search for the topic from multiple angles
49
+ 2. If two files return as top results for the same query, read both
50
+ 3. Compare: are they covering the same ground? Is one a superset of the other?
51
+ 4. Flag duplicates with a similarity summary
52
+
53
+ **Resolution:** Merge into one authoritative file. Convert the other into a redirect/link. Never delete without confirmation.
54
+
55
+ ### 5. Orphan Files
56
+
57
+ Files that no other file references — isolated knowledge that may be hard to discover.
58
+
59
+ **Detection procedure:**
60
+ 1. For each file, run `mindos file backlinks <path>`
61
+ 2. Files with zero backlinks AND not in a well-indexed directory (no README listing them) are orphan candidates
62
+ 3. Exclude governance files (INSTRUCTION.md, README.md) and root-level files
63
+
64
+ **Resolution:** Suggest adding links from relevant parent documents or READMEs.
65
+
66
+ ### 6. Structural Issues
67
+
68
+ - Files in wrong directories (content doesn't match the directory's topic)
69
+ - Inbox files that have been sitting >7 days (aging)
70
+ - Missing READMEs in directories with >3 files
71
+ - Inconsistent naming conventions within a directory
72
+
73
+ **Detection procedure:**
74
+ 1. Bootstrap the KB tree
75
+ 2. For each directory: check if README exists, read a sample of files to verify topic consistency
76
+ 3. Check Inbox for aging files (>7 days)
77
+ 4. Spot-check naming patterns per directory
78
+
79
+ ## Health Report Format
80
+
81
+ Present findings as a structured report:
82
+
83
+ ```markdown
84
+ # Knowledge Health Report — {date}
85
+
86
+ ## Summary
87
+ - Contradictions found: N
88
+ - Broken links: N
89
+ - Stale files (>90 days): N
90
+ - Duplicates suspected: N
91
+ - Orphan files: N
92
+ - Structural issues: N
93
+ - **Overall health: {Good / Needs Attention / Critical}**
94
+
95
+ ## Contradictions
96
+ 1. `file-a.md` vs `file-b.md` — {description}
97
+ ...
98
+
99
+ ## Broken Links
100
+ 1. `source.md` line N → `missing-target.md` (not found)
101
+ ...
102
+
103
+ ## Stale Content
104
+ 1. `old-file.md` — Last updated: {date}, {N} days ago
105
+ ...
106
+
107
+ (... other sections ...)
108
+
109
+ ## Recommended Actions
110
+ 1. {Highest priority fix}
111
+ 2. ...
112
+ ```
113
+
114
+ ## Scope Control
115
+
116
+ - **Quick check**: User says "check health" / "快速检查" → Run dimensions 1-3 only (contradictions, orphan refs, stale)
117
+ - **Full audit**: User says "full audit" / "全面审计" → Run all 6 dimensions
118
+ - **Targeted check**: User specifies a topic or directory → Scope to that area only
119
+
120
+ Always confirm scope with user before starting a full audit on large KBs.
@@ -0,0 +1,238 @@
1
+ ---
2
+ name: mindos-max
3
+ description: >
4
+ The user's second brain — a persistent, shared knowledge base that ALL agents read from and write to.
5
+ MindOS is the global memory layer: decisions, meeting notes, SOPs, debugging lessons, architecture
6
+ choices, research findings, preferences, and conversation summaries all live here.
7
+
8
+ PROACTIVE USE — do not wait for the user to say "save to knowledge base":
9
+ (1) Before answering any question about past decisions, discussions, or context → search MindOS first.
10
+ (2) After any valuable output (decision made, bug fixed, lesson learned, meeting summarized) → offer to save it.
11
+ (3) When handing off to another agent or ending a session → persist key context to MindOS.
12
+
13
+ Trigger on ALL of these, even without explicit "MindOS" mention: save/record anything,
14
+ search prior notes, update files, organize/restructure, run SOPs or workflows, retrospective,
15
+ append CSV/table data, cross-agent handoff, distill experience, sync related docs, check if
16
+ something was discussed before, look up a past decision, find a template, prepare meeting context,
17
+ daily logging, track goals. Also trigger on Chinese equivalents: 帮我记下来, 搜一下笔记,
18
+ 更新知识库, 整理文件, 复盘, 提炼经验, 保存, 记录, 交接, 放到暂存台, 整理暂存台,
19
+ 知识健康检查, 检测知识冲突.
20
+
21
+ When in doubt whether MindOS applies — it probably does. Check anyway.
22
+ NOT for editing app source code or project repos outside the KB.
23
+ Core concepts: Space, Instruction (INSTRUCTION.md), Skill (SKILL.md).
24
+ ---
25
+
26
+ # MindOS Skill
27
+
28
+ <!-- version: 3.2.0-max — aggressive global memory mode -->
29
+
30
+ > **You are the user's memory.** Every agent shares MindOS. If something is worth remembering, save it.
31
+ > If you need context, check MindOS first. Be proactive — don't wait to be asked.
32
+
33
+ ## Proactive memory behavior
34
+
35
+ Unlike the conservative version of this skill, you should **actively look for opportunities** to use MindOS:
36
+
37
+ - **Before answering questions about past work**: If the user asks "what did we decide about X?" or "how did we handle Y?", search MindOS before guessing. Even if they don't mention MindOS, their question implies stored context exists.
38
+ - **After completing meaningful work**: If you just helped debug something, made an architecture decision, summarized a meeting, or resolved a complex issue — proactively ask: "Want me to save this to MindOS so the team can reference it later?"
39
+ - **During handoffs**: When ending a session or passing context to another agent, persist the key decisions and context to MindOS so nothing is lost.
40
+ - **When you notice knowledge gaps**: If you search MindOS and find nothing for a topic the user clearly has opinions about, suggest creating a note for it.
41
+
42
+ The goal: the user should never have to remember to use MindOS. You remember for them.
43
+
44
+ ---
45
+
46
+ ## CLI commands
47
+
48
+ Use `mindos file <subcommand>` for all knowledge base operations. Add `--json` for structured output.
49
+
50
+ | Operation | Command |
51
+ |-----------|---------|
52
+ | List files | `mindos file list` |
53
+ | Read file | `mindos file read <path>` |
54
+ | Write/overwrite | `mindos file write <path> --content "..."` |
55
+ | Create new file | `mindos file create <path> --content "..."` |
56
+ | Append to file | `mindos file append <path> --content "..."` |
57
+ | Edit section | `mindos file edit-section <path> -H "## Heading" --content "..."` |
58
+ | Insert after heading | `mindos file insert-heading <path> -H "## Heading" --content "..."` |
59
+ | Append CSV row | `mindos file append-csv <path> --row "col1,col2,col3"` |
60
+ | Delete file | `mindos file delete <path>` |
61
+ | Rename/move | `mindos file rename <old> <new>` |
62
+ | Search | `mindos search "query"` |
63
+ | Backlinks | `mindos file backlinks <path>` |
64
+ | Recent files | `mindos file recent --limit 10` |
65
+ | Git history | `mindos file history <path>` |
66
+ | List spaces | `mindos space list` |
67
+ | Create space | `mindos space create "name"` |
68
+
69
+ > **MCP users:** If you only have MCP tools (`mindos_*`), use them directly — they are self-describing via their schemas. Prefer CLI when available (lower token cost).
70
+
71
+ ### CLI setup
72
+
73
+ ```bash
74
+ npm install -g @geminilight/mindos
75
+ # Remote mode: mindos config set url http://<IP>:<PORT> && mindos config set authToken <token>
76
+ ```
77
+
78
+ ---
79
+
80
+ ## Rules
81
+
82
+ 1. **Bootstrap first** — list the KB tree to understand structure before searching or writing.
83
+ 2. **Default to read-only.** Only write when the user explicitly asks to save, record, organize, or edit. Lookup / summarize / quote = no writes.
84
+ 3. **Rule precedence** (highest wins): user's current-turn instruction > `.mindos/user-preferences.md` > nearest directory `INSTRUCTION.md` > root `INSTRUCTION.md` > this SKILL's defaults.
85
+ 4. **Multi-file edits require a plan first.** Present the full change list; execute only after approval.
86
+ 5. After create/delete/move/rename > **sync affected READMEs** automatically.
87
+ 6. **Read before write.** Always read a file before overwriting it. Never write based on assumptions.
88
+
89
+ ---
90
+
91
+ ## NEVER do (hard-won pitfalls)
92
+
93
+ - **NEVER write to the KB root** unless explicitly told. Root is for governance files only. New content goes under the most fitting subdirectory.
94
+ - **NEVER assume directory names.** Infer from the actual bootstrap tree — the KB may use Chinese names or flat layout.
95
+ - **NEVER use full-file overwrite for a small edit.** Use `mindos file edit-section` or `mindos file insert-heading` for targeted changes. Full rewrites destroy git diffs.
96
+ - **NEVER search with a single keyword.** Fire 2-4 parallel searches (synonyms, abbreviations, Chinese/English variants).
97
+ - **NEVER modify `INSTRUCTION.md` or `README.md` without confirmation.** Governance docs — treat as high-sensitivity.
98
+ - **NEVER create a file without checking siblings.** Read 1-2 files in the target directory to learn local style.
99
+ - **NEVER leave orphan references.** After rename/move, check backlinks and update every referring file.
100
+ - **NEVER skip routing confirmation for multi-file writes.** The user's mental model may differ from yours.
101
+
102
+ ---
103
+
104
+ ## MindOS concepts
105
+
106
+ - **Space** — Knowledge partitions organized the way you think. Agents follow the same structure.
107
+ - **Instruction** — A rules file (`INSTRUCTION.md`) all connected agents obey.
108
+ - **Skill** — Teaches agents how to read, write, and organize the KB.
109
+ - **Inbox** — The `Inbox/` directory is a staging area for quick capture. Files land here when there's no obvious home yet. They get organized later — by the user manually or via AI-assisted batch organization.
110
+
111
+ Notes can embody both Instruction and Skill — they're just Markdown files in the tree.
112
+
113
+ ---
114
+
115
+ ## Decision tree
116
+
117
+ ```
118
+ User request
119
+ |
120
+ |- Lookup / summarize / quote?
121
+ | -> [Read-only]: search -> read -> answer with citations. No writes.
122
+ |
123
+ |- Save / record / update / organize specific content?
124
+ | |- Know where it goes -> [Single-file edit]
125
+ | |- Don't know where it goes -> [Inbox path] -- save to Inbox/, classify later
126
+ | -> Multiple files or unclear -> [Multi-file routing] -- plan first
127
+ |
128
+ |- Organize inbox / classify staged files?
129
+ | -> [Inbox organize] -- read Inbox/ files, propose destinations, move after approval
130
+ |
131
+ |- Structural change (rename / move / delete / reorganize)?
132
+ | -> [Structural path] -- check backlinks before and after
133
+ |
134
+ |- Procedural / repeatable task?
135
+ | -> [SOP path] -- find and follow existing SOP, or create one
136
+ |
137
+ |- Retrospective / distill / handoff?
138
+ | -> [Retrospective path]
139
+ |
140
+ |- Knowledge health check / detect conflicts?
141
+ | -> [Health check path] -- read references/knowledge-health.md
142
+ |
143
+ -> Ambiguous?
144
+ -> ASK. Propose 2-3 specific options based on KB state.
145
+ ```
146
+
147
+ ---
148
+
149
+ ## Judgment heuristics
150
+
151
+ **Save intent boundary:**
152
+ - "save this" / "record" / "write down" = write
153
+ - "search" / "summarize" / "look up" = read-only
154
+ - "organize" -> ask: display only, or write back?
155
+
156
+ **File location uncertainty:**
157
+ - Can't decide in 5 seconds -> save to `Inbox/`, inform user, propose classification later
158
+ - "Just put it somewhere" / "先放着" -> save to `Inbox/`
159
+ - User drags files or pastes unstructured content without specifying location -> `Inbox/`
160
+
161
+ **Scope creep:**
162
+ - Input routes to >5 files -> pause, confirm scope
163
+ - "Update all of these" spanning multiple topics -> split into batches
164
+
165
+ **Citation:** KB-cited facts must include the file path.
166
+
167
+ ---
168
+
169
+ ## Post-task hooks
170
+
171
+ After write tasks (not simple reads), scan this table. At most 1 proposal; highest priority wins. Check `.mindos/user-preferences.md` suppression first.
172
+
173
+ | Hook | Priority | Condition |
174
+ |------|----------|-----------|
175
+ | Experience capture | high | Debugging, troubleshooting, or multi-round work |
176
+ | Consistency sync | high | Edited file with backlinks |
177
+ | SOP drift | medium | Followed SOP but diverged |
178
+ | Linked update | medium | Changed CSV/TODO status with related docs |
179
+ | Structure classification | medium | Created file in inbox/temp location |
180
+ | Pattern extraction | low | 3+ similar operations this session |
181
+
182
+ If a hook triggers -> read [references/post-task-hooks.md](../mindos/references/post-task-hooks.md).
183
+
184
+ ## Preference capture
185
+
186
+ When user expresses a standing preference -> read [references/preference-capture.md](../mindos/references/preference-capture.md) and follow confirm-then-write flow.
187
+
188
+ ## SOP authoring
189
+
190
+ When creating/rewriting an SOP -> read [references/sop-template.md](../mindos/references/sop-template.md).
191
+
192
+ ## Inbox (staging area)
193
+
194
+ The `Inbox/` directory is the KB's quick-capture zone. It has its own `INSTRUCTION.md` that governs behavior.
195
+
196
+ **When to use Inbox:**
197
+ - User says "just save it" / "先放着" / "放到暂存台" without specifying a location
198
+ - Content doesn't clearly fit any existing Space or directory
199
+ - Batch import of multiple files that need individual classification
200
+
201
+ **How to save to Inbox:**
202
+ ```bash
203
+ mindos file create "Inbox/<filename>.md" --content "..."
204
+ ```
205
+
206
+ **How to organize Inbox:**
207
+ 1. List Inbox files: `mindos file list Inbox/`
208
+ 2. Read each file to understand its content
209
+ 3. For each file, propose the best destination directory based on KB structure
210
+ 4. Present the full routing plan to user for approval
211
+ 5. Move files: `mindos file rename "Inbox/<file>" "<target-dir>/<file>"`
212
+ 6. After moving, check if the target directory's README needs updating
213
+
214
+ **Aging reminder:** Files in Inbox older than 7 days are considered "aging". If you notice aging files during bootstrap, mention it: "You have N files in Inbox that have been sitting there for over a week. Want me to help organize them?"
215
+
216
+ ## Knowledge health check
217
+
218
+ When user asks to check knowledge health, detect conflicts, audit quality, or says "知识健康检查" / "检测冲突" / "check knowledge health"
219
+ -> read [references/knowledge-health.md](../mindos/references/knowledge-health.md) for the full procedure.
220
+
221
+ Quick summary of what gets checked:
222
+ - **Contradictions**: conflicting facts across files on the same topic
223
+ - **Broken links**: references to files that no longer exist
224
+ - **Stale content**: files with outdated date markers or untouched for >6 months
225
+ - **Duplicates**: two files covering the same ground without cross-referencing
226
+ - **Orphan files**: files with zero backlinks, hard to discover
227
+ - **Structural issues**: wrong directory, missing READMEs, aging Inbox files
228
+
229
+ ---
230
+
231
+ ## Error handling (CLI)
232
+
233
+ ```bash
234
+ "command not found: mindos" -> npm install -g @geminilight/mindos
235
+ "Mind root not configured" -> mindos onboard
236
+ "401 Unauthorized" -> Check AUTH_TOKEN: mindos token (on server)
237
+ "ECONNREFUSED" -> Start server: mindos start
238
+ ```
@@ -0,0 +1,23 @@
1
+ {
2
+ "skill_name": "mindos-max",
3
+ "evals": [
4
+ {
5
+ "id": 1,
6
+ "prompt": "我昨天跟产品经理开会讨论了一个新的用户反馈系统的方案,他们建议用NPS打分加上开放式评论,我觉得挺好的。帮我把这个决策记下来,以后其他同事问起来可以查到。",
7
+ "expected_output": "Agent should recognize this as a 'save decision from meeting' task, use MindOS to store the meeting note with proper structure (date, attendees implied, decision, rationale), and place it in an appropriate directory in the KB.",
8
+ "files": []
9
+ },
10
+ {
11
+ "id": 2,
12
+ "prompt": "上周我记得我们讨论过API限流的方案,具体是怎么定的来着?好像是每分钟100次还是200次?我找不到了。",
13
+ "expected_output": "Agent should recognize this as a 'search for past decision' task, use MindOS search to find the API rate limiting discussion, and return the relevant content with file path citation.",
14
+ "files": []
15
+ },
16
+ {
17
+ "id": 3,
18
+ "prompt": "I just finished debugging a really tricky race condition in our payment service - turns out the mutex wasn't being released properly in the error path. Took me 3 hours to figure out. I want to make sure the team doesn't hit this again.",
19
+ "expected_output": "Agent should recognize this as 'capture debugging experience/lessons learned', use MindOS to save a structured troubleshooting note with problem description, root cause, solution, and prevention tips.",
20
+ "files": []
21
+ }
22
+ ]
23
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "eval_id": 3,
3
+ "eval_name": "capture-debugging-experience-en",
4
+ "prompt": "I just finished debugging a really tricky race condition in our payment service - turns out the mutex wasn't being released properly in the error path. Took me 3 hours to figure out. I want to make sure the team doesn't hit this again.",
5
+ "assertions": [
6
+ {"text": "Uses mindos CLI to save debugging experience note", "type": "behavioral"},
7
+ {"text": "Structured note includes: problem description, root cause, solution, prevention tips", "type": "content"},
8
+ {"text": "Bootstraps KB tree before writing", "type": "behavioral"},
9
+ {"text": "Recognizes this as experience capture / lessons learned scenario", "type": "behavioral"}
10
+ ]
11
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "eval_id": 3,
3
+ "eval_name": "capture-debugging-experience-en",
4
+ "run_type": "old_skill",
5
+ "skill": "mindos-original",
6
+ "expectations": [
7
+ {
8
+ "text": "Uses mindos CLI to save debugging experience note",
9
+ "passed": true,
10
+ "evidence": "Uses `mindos file insert-heading \"engineering/debugging-experiences.md\"` in Step 5 — chose to append to existing file rather than create new."
11
+ },
12
+ {
13
+ "text": "Structured note includes: problem description, root cause, solution, prevention tips",
14
+ "passed": true,
15
+ "evidence": "Content has Problem, Root Cause, Solution, Rule (with code review checklist), Debugging Approach, Tags sections."
16
+ },
17
+ {
18
+ "text": "Bootstraps KB tree before writing",
19
+ "passed": true,
20
+ "evidence": "Step 1 runs `mindos file list`."
21
+ },
22
+ {
23
+ "text": "Recognizes this as experience capture / lessons learned scenario",
24
+ "passed": true,
25
+ "evidence": "Decision tree analysis identifies 'save / record' path and Experience capture hook (high priority)."
26
+ }
27
+ ]
28
+ }
@@ -0,0 +1,203 @@
1
+ # Transcript: Capturing Debugging Experience — Payment Service Race Condition
2
+
3
+ ## User Input
4
+
5
+ > I just finished debugging a really tricky race condition in our payment service - turns out the mutex wasn't being released properly in the error path. Took me 3 hours to figure out. I want to make sure the team doesn't hit this again.
6
+
7
+ ---
8
+
9
+ ## Skill Analysis
10
+
11
+ ### Decision Tree Path
12
+
13
+ Following the SKILL.md decision tree:
14
+
15
+ - **Is this a lookup / summarize / quote?** → No.
16
+ - **Is this a save / record / update / organize?** → **Yes.** The user explicitly says "I want to make sure the team doesn't hit this again" — this is a request to record/save experience.
17
+ - This is a **single-file edit** (or creation) — the debugging experience needs to be captured somewhere in the KB.
18
+
19
+ ### Post-Task Hook Triggered
20
+
21
+ The "Experience capture" hook (priority: high) applies because this is **debugging / troubleshooting** work. Per the hook template:
22
+
23
+ > "Record this experience to {related experience file}?" — Format: problem → cause → solution → rule
24
+
25
+ ---
26
+
27
+ ## Simulated Execution Plan
28
+
29
+ ### Step 1: Bootstrap — List the KB tree
30
+
31
+ ```bash
32
+ mindos file list
33
+ ```
34
+
35
+ **Purpose:** Understand the KB structure before deciding where to save. Per Rule 1: "Bootstrap first — list the KB tree to understand structure before searching or writing."
36
+
37
+ **Expected output (hypothetical):**
38
+
39
+ ```
40
+ /
41
+ ├── projects/
42
+ │ ├── payment-service/
43
+ │ │ ├── README.md
44
+ │ │ ├── architecture.md
45
+ │ │ └── troubleshooting.md
46
+ │ └── ...
47
+ ├── engineering/
48
+ │ ├── debugging-experiences.md
49
+ │ ├── best-practices.md
50
+ │ └── ...
51
+ ├── inbox/
52
+ └── INSTRUCTION.md
53
+ ```
54
+
55
+ ### Step 2: Search for related files
56
+
57
+ Per the NEVER rule: "NEVER search with a single keyword. Fire 2-4 parallel searches."
58
+
59
+ ```bash
60
+ mindos search "race condition"
61
+ mindos search "mutex debugging"
62
+ mindos search "payment service"
63
+ mindos search "concurrency bug"
64
+ ```
65
+
66
+ **Purpose:** Find if there's already a debugging experience file, a payment service section, or an existing concurrency-related note to append to rather than creating a duplicate.
67
+
68
+ ### Step 3: Read existing files in the target directory
69
+
70
+ Per the NEVER rule: "NEVER create a file without checking siblings. Read 1-2 files in the target directory to learn local style."
71
+
72
+ Assuming the search found a relevant directory (e.g., `engineering/` or `projects/payment-service/`), read sibling files:
73
+
74
+ ```bash
75
+ mindos file read "engineering/debugging-experiences.md"
76
+ ```
77
+
78
+ **Purpose:** Learn the local style and format so the new entry matches existing conventions.
79
+
80
+ ### Step 4: Determine save location
81
+
82
+ **If** a file like `engineering/debugging-experiences.md` or `projects/payment-service/troubleshooting.md` already exists:
83
+ → Append to it using `insert-heading` or `append`.
84
+
85
+ **If** no suitable file exists:
86
+ → Create a new file in the most fitting subdirectory.
87
+
88
+ For this simulation, I'll assume an existing `engineering/debugging-experiences.md` exists and already has entries.
89
+
90
+ ### Step 5: Write the experience entry
91
+
92
+ Using the experience capture format from the post-task hook: **problem → cause → solution → rule**.
93
+
94
+ ```bash
95
+ mindos file insert-heading "engineering/debugging-experiences.md" \
96
+ -H "## Experiences" \
97
+ --content "### Payment Service Race Condition — Mutex Not Released in Error Path
98
+
99
+ **Date:** 2026-04-07
100
+ **Time spent:** ~3 hours
101
+ **Severity:** High (potential payment inconsistency)
102
+
103
+ #### Problem
104
+ The payment service intermittently hung under concurrent requests. Transactions would stall and eventually time out, but only under load — never reproducible with a single request.
105
+
106
+ #### Root Cause
107
+ The mutex guarding the payment transaction critical section was acquired at the start of the handler but was **not released in the error path**. When an error occurred (e.g., validation failure, downstream timeout), the function returned early without calling \`mutex.Unlock()\` (or equivalent release). Subsequent requests waiting on the same mutex would block indefinitely.
108
+
109
+ Specifically:
110
+ - The happy path correctly released the mutex via \`defer\` or explicit unlock at the end.
111
+ - An early-return error branch added later bypassed the unlock.
112
+ - Under normal load, errors were rare enough that the mutex was eventually released by other mechanisms (process restart, timeout). Under high load, the probability of hitting the error path increased, causing cascading stalls.
113
+
114
+ #### Solution
115
+ 1. Ensured the mutex release is handled via \`defer mutex.Unlock()\` immediately after acquisition — guaranteeing release regardless of which code path executes.
116
+ 2. Audited all other critical sections in the payment service for the same pattern.
117
+ 3. Added a unit test that forces an error after mutex acquisition and verifies the mutex is released.
118
+
119
+ #### Rule (for the team)
120
+ > **Always use defer (or try-finally / RAII) to release locks immediately after acquisition.** Never rely on explicit unlock calls scattered across multiple return paths. If your language supports it, the lock-release pair should be on adjacent lines:
121
+ >
122
+ > \`\`\`go
123
+ > mu.Lock()
124
+ > defer mu.Unlock()
125
+ > \`\`\`
126
+ >
127
+ > **Code review checklist item:** When reviewing any function that acquires a lock, verify that every return path (including error returns and panics) releases it. Search for early returns between Lock() and Unlock().
128
+
129
+ #### Debugging Approach (what made it hard)
130
+ - The bug was intermittent — only triggered under concurrent load when an error happened.
131
+ - Initial investigation focused on network timeouts (wrong direction).
132
+ - Breakthrough: added lock-acquisition logging with timestamps, which showed a lock was held for >30s — way beyond any normal transaction time.
133
+ - Narrowed to the specific error path by correlating the held-lock timestamp with error logs.
134
+
135
+ **Tags:** #concurrency #mutex #race-condition #payment-service #debugging"
136
+ ```
137
+
138
+ ### Step 6: Verify the write
139
+
140
+ ```bash
141
+ mindos file read "engineering/debugging-experiences.md"
142
+ ```
143
+
144
+ **Purpose:** Confirm the entry was appended correctly and the file is well-formed.
145
+
146
+ ### Step 7: Check backlinks and related files
147
+
148
+ ```bash
149
+ mindos file backlinks "engineering/debugging-experiences.md"
150
+ ```
151
+
152
+ If the payment service has its own troubleshooting doc, consider adding a cross-reference:
153
+
154
+ ```bash
155
+ mindos file insert-heading "projects/payment-service/troubleshooting.md" \
156
+ -H "## Known Issues" \
157
+ --content "- **Mutex release in error paths** — See [[engineering/debugging-experiences.md#Payment Service Race Condition]] for full write-up. Rule: always use defer/finally for lock release."
158
+ ```
159
+
160
+ ### Step 8: Post-task hook evaluation
161
+
162
+ After the write, scan the post-task hooks table:
163
+
164
+ | Hook | Triggered? | Action |
165
+ |------|-----------|--------|
166
+ | Experience capture | ✅ Already handled | This was the primary task |
167
+ | Consistency sync | Maybe | If backlinks exist to the edited file, propose sync |
168
+ | SOP drift | No | No SOP was followed |
169
+ | Linked update | Maybe | If a concurrency best-practices doc exists, propose update |
170
+ | Structure classification | No | File was placed in an existing directory |
171
+ | Pattern extraction | No | Single operation |
172
+
173
+ **Proposal to user (if applicable):**
174
+
175
+ > "Your engineering/best-practices.md has a concurrency section — add this mutex rule there too?"
176
+
177
+ ---
178
+
179
+ ## Summary of Commands (in order)
180
+
181
+ | # | Command | Purpose |
182
+ |---|---------|---------|
183
+ | 1 | `mindos file list` | Bootstrap: understand KB structure |
184
+ | 2 | `mindos search "race condition"` | Find related files (search 1/4) |
185
+ | 3 | `mindos search "mutex debugging"` | Find related files (search 2/4) |
186
+ | 4 | `mindos search "payment service"` | Find related files (search 3/4) |
187
+ | 5 | `mindos search "concurrency bug"` | Find related files (search 4/4) |
188
+ | 6 | `mindos file read "engineering/debugging-experiences.md"` | Read target file to learn style |
189
+ | 7 | `mindos file insert-heading "engineering/debugging-experiences.md" -H "## Experiences" --content "..."` | Write the experience entry |
190
+ | 8 | `mindos file read "engineering/debugging-experiences.md"` | Verify write succeeded |
191
+ | 9 | `mindos file backlinks "engineering/debugging-experiences.md"` | Check for files that reference this one |
192
+ | 10 | `mindos file insert-heading "projects/payment-service/troubleshooting.md" -H "## Known Issues" --content "..."` | Cross-reference in project-specific doc |
193
+
194
+ ## Content Written
195
+
196
+ The experience entry follows the **problem → cause → solution → rule** format prescribed by the post-task hook, and includes:
197
+
198
+ - **Problem**: Observable symptoms (intermittent hangs under load)
199
+ - **Root Cause**: Mutex not released in error path due to early return
200
+ - **Solution**: Use `defer` for lock release + audit + add test
201
+ - **Rule**: Actionable team guideline with code review checklist item
202
+ - **Debugging Approach**: What made it hard and what the breakthrough was (useful for future investigators)
203
+ - **Tags**: For searchability within the KB
@@ -0,0 +1,28 @@
1
+ {
2
+ "eval_id": 3,
3
+ "eval_name": "capture-debugging-experience-en",
4
+ "run_type": "with_skill",
5
+ "skill": "mindos-max",
6
+ "expectations": [
7
+ {
8
+ "text": "Uses mindos CLI to save debugging experience note",
9
+ "passed": true,
10
+ "evidence": "Uses `mindos file create \"engineering/debugging/payment-service-mutex-race-condition.md\"` in Step 5."
11
+ },
12
+ {
13
+ "text": "Structured note includes: problem description, root cause, solution, prevention tips",
14
+ "passed": true,
15
+ "evidence": "Content has Problem, Symptoms, Root Cause, Solution, Prevention Rules (4 rules), Debugging Approach, Related Patterns, Tags sections."
16
+ },
17
+ {
18
+ "text": "Bootstraps KB tree before writing",
19
+ "passed": true,
20
+ "evidence": "Step 2 runs `mindos file list`."
21
+ },
22
+ {
23
+ "text": "Recognizes this as experience capture / lessons learned scenario",
24
+ "passed": true,
25
+ "evidence": "Step 1 maps to 'Retrospective / distill' in decision tree and identifies Experience capture post-task hook."
26
+ }
27
+ ]
28
+ }