@agent-spaces/server 0.3.61 → 0.3.63

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 (327) hide show
  1. package/dist/adapters/agent-runtime-types.js +12 -0
  2. package/dist/adapters/claude-code-runtime/index.js +22 -0
  3. package/dist/adapters/claude-code-runtime/sdk-config.js +34 -10
  4. package/dist/adapters/codex-runtime.js +2 -2
  5. package/dist/adapters/git.js +29 -13
  6. package/dist/adapters/langchain-runtime.js +2 -2
  7. package/dist/adapters/open-agent-sdk-runtime.js +2 -2
  8. package/dist/agents/agent-message-parts.js +27 -3
  9. package/dist/agents/commit-agent.js +1 -0
  10. package/dist/agents/issue-agent-progress.js +4 -2
  11. package/dist/agents/issue-agent-runner.js +5 -5
  12. package/dist/agents/issue-task-controller.js +95 -14
  13. package/dist/app.js +74 -5
  14. package/dist/package.json +1 -1
  15. package/dist/routes/agent-sse.js +4 -2
  16. package/dist/routes/channel.js +21 -4
  17. package/dist/routes/file.js +87 -1
  18. package/dist/routes/hooks.js +88 -0
  19. package/dist/routes/issue.js +59 -1
  20. package/dist/routes/output-style.js +48 -0
  21. package/dist/routes/prompt-template.js +2 -2
  22. package/dist/routes/skill.js +97 -3
  23. package/dist/routes/task.js +13 -1
  24. package/dist/services/agent.js +45 -16
  25. package/dist/services/hook-engine.js +118 -0
  26. package/dist/services/issue.js +6 -0
  27. package/dist/services/notification-hub/bot-agent.js +1 -0
  28. package/dist/services/output-style.js +134 -0
  29. package/dist/services/persistent-agent-context.js +37 -4
  30. package/dist/services/prompt-template.js +2 -2
  31. package/dist/services/skill.js +275 -40
  32. package/dist/storage/hook-store.js +55 -0
  33. package/dist/web/404.html +1 -1
  34. package/dist/web/__next.__PAGE__.txt +4 -4
  35. package/dist/web/__next._full.txt +25 -23
  36. package/dist/web/__next._head.txt +4 -4
  37. package/dist/web/__next._index.txt +13 -13
  38. package/dist/web/__next._tree.txt +2 -2
  39. package/dist/web/_next/static/chunks/0-1bfvfwifh-m.js +1 -0
  40. package/dist/web/_next/static/chunks/0-f~0xmwl__u5.js +1 -0
  41. package/dist/web/_next/static/chunks/0.n~yfwf4~6w-.js +1 -0
  42. package/dist/web/_next/static/chunks/002_j970b9gdx.js +1 -0
  43. package/dist/web/_next/static/chunks/014x2qbuiszni.js +3 -0
  44. package/dist/web/_next/static/chunks/01iqv28_snwus.js +1 -0
  45. package/dist/web/_next/static/chunks/02c22g~xd-y30.js +19 -0
  46. package/dist/web/_next/static/chunks/02mf61htij8g0.js +31 -0
  47. package/dist/web/_next/static/chunks/03scq1-0ykve3.js +1 -0
  48. package/dist/web/_next/static/chunks/046me66nilkff.js +1 -0
  49. package/dist/web/_next/static/chunks/04v-pqqs-2lvp.css +1 -0
  50. package/dist/web/_next/static/chunks/05f8cnmzqd5wb.js +1 -0
  51. package/dist/web/_next/static/chunks/{0zd1o3u04~qvo.js → 05psi2gtx~bev.js} +7 -7
  52. package/dist/web/_next/static/chunks/{12odetnu-lyrr.js → 06whz1~s_7pva.js} +12 -12
  53. package/dist/web/_next/static/chunks/06w~.izyfylap.js +1 -0
  54. package/dist/web/_next/static/chunks/08kfx8on9oty~.js +1 -0
  55. package/dist/web/_next/static/chunks/09t62a89~jesc.js +3 -0
  56. package/dist/web/_next/static/chunks/09y_3krccdd~u.js +1 -0
  57. package/dist/web/_next/static/chunks/{0njy89g5coeyi.js → 0_8dm7bxp18xo.js} +6 -6
  58. package/dist/web/_next/static/chunks/0_e~hmntdfop9.js +1 -0
  59. package/dist/web/_next/static/chunks/0_udc.6.tueey.js +1 -0
  60. package/dist/web/_next/static/chunks/0_vi1a~g4wx46.js +3 -0
  61. package/dist/web/_next/static/chunks/{05iy4.c-1cfhd.js → 0aa6bcdmtpekn.js} +1 -1
  62. package/dist/web/_next/static/chunks/{0tvd~rxgf0oh_.js → 0bbmx45w_h5np.js} +1 -1
  63. package/dist/web/_next/static/chunks/0cke33d38fnby.js +90 -0
  64. package/dist/web/_next/static/chunks/{0w1iudd1d46sw.js → 0ctg5qmw7uu.1.js} +2 -2
  65. package/dist/web/_next/static/chunks/0cyq~8xb~r5fc.js +1 -0
  66. package/dist/web/_next/static/chunks/0ewceguykiut5.js +1 -0
  67. package/dist/web/_next/static/chunks/0fxa1edqr7dve.js +1 -0
  68. package/dist/web/_next/static/chunks/{0202ia13sijwb.js → 0h18ej5yf974e.js} +1 -1
  69. package/dist/web/_next/static/chunks/0hra80eyuu37u.js +1 -0
  70. package/dist/web/_next/static/chunks/0i39jifmxla7q.js +1 -0
  71. package/dist/web/_next/static/chunks/0ie7y4k2ncvnn.js +1 -0
  72. package/dist/web/_next/static/chunks/0igc~uli58ncw.js +2 -0
  73. package/dist/web/_next/static/chunks/0kof5qdg8c2-k.js +71 -0
  74. package/dist/web/_next/static/chunks/{08o-zmr-40r5g.js → 0m11vvph7q94-.js} +1 -1
  75. package/dist/web/_next/static/chunks/0msb2mi3hiu5_.js +67 -0
  76. package/dist/web/_next/static/chunks/0np.d~hc1-pmh.js +4 -0
  77. package/dist/web/_next/static/chunks/{0qpq0~_58fe9a.js → 0oaq67r7ix.vg.js} +1 -1
  78. package/dist/web/_next/static/chunks/0ogpc3f3keopc.js +3 -0
  79. package/dist/web/_next/static/chunks/{0d_dp_4ofz0l3.css → 0ojcao3hdm36s.css} +0 -1
  80. package/dist/web/_next/static/chunks/0p1n8bvfnpl41.js +1 -0
  81. package/dist/web/_next/static/chunks/{0gig.k.rq8d0x.js → 0ppr271hz0xoq.js} +1 -1
  82. package/dist/web/_next/static/chunks/0s_dva~eh2yhi.js +3 -0
  83. package/dist/web/_next/static/chunks/0typj55ox8d5i.js +1 -0
  84. package/dist/web/_next/static/chunks/0w2p4ldi2aymp.js +1 -0
  85. package/dist/web/_next/static/chunks/{0..g0jl-8qup7.js → 0xoo17yef_b8g.js} +1 -1
  86. package/dist/web/_next/static/chunks/0xt-8wk21gs7g.js +1 -0
  87. package/dist/web/_next/static/chunks/0y09i51u6ixq5.js +1 -0
  88. package/dist/web/_next/static/chunks/0za1r07-6az6w.js +1 -0
  89. package/dist/web/_next/static/chunks/0zc0xgp5ourcn.js +1 -0
  90. package/dist/web/_next/static/chunks/0zmhdridea1s5.js +90 -0
  91. package/dist/web/_next/static/chunks/0~u.5r3-t7179.js +1 -0
  92. package/dist/web/_next/static/chunks/10.alq.6stmld.js +1 -0
  93. package/dist/web/_next/static/chunks/11-czmcci_55y.js +1 -0
  94. package/dist/web/_next/static/chunks/11b3zgk1etlkw.js +7 -0
  95. package/dist/web/_next/static/chunks/11k-.49r~1mfm.js +1 -0
  96. package/dist/web/_next/static/chunks/11qp8r5dotf7d.js +1 -0
  97. package/dist/web/_next/static/chunks/128ugqd34tr_-.js +1 -0
  98. package/dist/web/_next/static/chunks/12mxlicp247c8.js +1 -0
  99. package/dist/web/_next/static/chunks/135w27dd8c19s.js +5 -0
  100. package/dist/web/_next/static/chunks/13~y-b.b9rrw4.js +1 -0
  101. package/dist/web/_next/static/chunks/{0jokpgh485~28.js → 14hqmid8q4apf.js} +11 -11
  102. package/dist/web/_next/static/chunks/16sg-lflc8csx.js +1 -0
  103. package/dist/web/_next/static/chunks/176dc-dtokxxi.js +16 -0
  104. package/dist/web/_next/static/chunks/17g-0pqre.anw.js +1 -0
  105. package/dist/web/_next/static/chunks/17oc2l.ekcs8b.css +1 -0
  106. package/dist/web/_next/static/chunks/{turbopack-0lrdxynxb9-1t.js → turbopack-0ndm2zc_pdptk.js} +1 -1
  107. package/dist/web/_not-found/__next._full.txt +29 -30
  108. package/dist/web/_not-found/__next._head.txt +4 -4
  109. package/dist/web/_not-found/__next._index.txt +13 -13
  110. package/dist/web/_not-found/__next._not-found.__PAGE__.txt +2 -2
  111. package/dist/web/_not-found/__next._not-found.txt +3 -3
  112. package/dist/web/_not-found/__next._tree.txt +2 -2
  113. package/dist/web/_not-found.html +1 -1
  114. package/dist/web/_not-found.txt +29 -30
  115. package/dist/web/icons/file_type_audio.svg +3 -1
  116. package/dist/web/icons/file_type_video.svg +10 -1
  117. package/dist/web/index.html +1 -1
  118. package/dist/web/index.txt +25 -23
  119. package/dist/web/login/__next._full.txt +30 -28
  120. package/dist/web/login/__next._head.txt +4 -4
  121. package/dist/web/login/__next._index.txt +13 -13
  122. package/dist/web/login/__next._tree.txt +2 -2
  123. package/dist/web/login/__next.login.__PAGE__.txt +4 -4
  124. package/dist/web/login/__next.login.txt +3 -3
  125. package/dist/web/login.html +1 -1
  126. package/dist/web/login.txt +30 -28
  127. package/dist/web/settings/__next._full.txt +32 -31
  128. package/dist/web/settings/__next._head.txt +4 -4
  129. package/dist/web/settings/__next._index.txt +13 -13
  130. package/dist/web/settings/__next._tree.txt +2 -2
  131. package/dist/web/settings/__next.settings.__PAGE__.txt +4 -4
  132. package/dist/web/settings/__next.settings.txt +5 -5
  133. package/dist/web/settings/agents/__next._full.txt +35 -34
  134. package/dist/web/settings/agents/__next._head.txt +4 -4
  135. package/dist/web/settings/agents/__next._index.txt +13 -13
  136. package/dist/web/settings/agents/__next._tree.txt +2 -2
  137. package/dist/web/settings/agents/__next.settings.agents.__PAGE__.txt +4 -4
  138. package/dist/web/settings/agents/__next.settings.agents.txt +3 -3
  139. package/dist/web/settings/agents/__next.settings.txt +5 -5
  140. package/dist/web/settings/agents.html +1 -1
  141. package/dist/web/settings/agents.txt +35 -34
  142. package/dist/web/settings/mcps/__next._full.txt +35 -34
  143. package/dist/web/settings/mcps/__next._head.txt +4 -4
  144. package/dist/web/settings/mcps/__next._index.txt +13 -13
  145. package/dist/web/settings/mcps/__next._tree.txt +2 -2
  146. package/dist/web/settings/mcps/__next.settings.mcps.__PAGE__.txt +4 -4
  147. package/dist/web/settings/mcps/__next.settings.mcps.txt +3 -3
  148. package/dist/web/settings/mcps/__next.settings.txt +5 -5
  149. package/dist/web/settings/mcps.html +1 -1
  150. package/dist/web/settings/mcps.txt +35 -34
  151. package/dist/web/settings/models/__next._full.txt +35 -34
  152. package/dist/web/settings/models/__next._head.txt +4 -4
  153. package/dist/web/settings/models/__next._index.txt +13 -13
  154. package/dist/web/settings/models/__next._tree.txt +2 -2
  155. package/dist/web/settings/models/__next.settings.models.__PAGE__.txt +4 -4
  156. package/dist/web/settings/models/__next.settings.models.txt +3 -3
  157. package/dist/web/settings/models/__next.settings.txt +5 -5
  158. package/dist/web/settings/models.html +1 -1
  159. package/dist/web/settings/models.txt +35 -34
  160. package/dist/web/settings/output-styles/__next._full.txt +43 -0
  161. package/dist/web/settings/output-styles/__next._head.txt +6 -0
  162. package/dist/web/settings/output-styles/__next._index.txt +15 -0
  163. package/dist/web/settings/output-styles/__next._tree.txt +8 -0
  164. package/dist/web/settings/output-styles/__next.settings.output-styles.__PAGE__.txt +9 -0
  165. package/dist/web/settings/output-styles/__next.settings.output-styles.txt +5 -0
  166. package/dist/web/settings/output-styles/__next.settings.txt +7 -0
  167. package/dist/web/settings/output-styles.html +1 -0
  168. package/dist/web/settings/output-styles.txt +43 -0
  169. package/dist/web/settings/prompts/__next._full.txt +35 -34
  170. package/dist/web/settings/prompts/__next._head.txt +4 -4
  171. package/dist/web/settings/prompts/__next._index.txt +13 -13
  172. package/dist/web/settings/prompts/__next._tree.txt +2 -2
  173. package/dist/web/settings/prompts/__next.settings.prompts.__PAGE__.txt +4 -4
  174. package/dist/web/settings/prompts/__next.settings.prompts.txt +3 -3
  175. package/dist/web/settings/prompts/__next.settings.txt +5 -5
  176. package/dist/web/settings/prompts.html +1 -1
  177. package/dist/web/settings/prompts.txt +35 -34
  178. package/dist/web/settings/providers/__next._full.txt +35 -34
  179. package/dist/web/settings/providers/__next._head.txt +4 -4
  180. package/dist/web/settings/providers/__next._index.txt +13 -13
  181. package/dist/web/settings/providers/__next._tree.txt +2 -2
  182. package/dist/web/settings/providers/__next.settings.providers.__PAGE__.txt +4 -4
  183. package/dist/web/settings/providers/__next.settings.providers.txt +3 -3
  184. package/dist/web/settings/providers/__next.settings.txt +5 -5
  185. package/dist/web/settings/providers.html +1 -1
  186. package/dist/web/settings/providers.txt +35 -34
  187. package/dist/web/settings/skills/__next._full.txt +35 -34
  188. package/dist/web/settings/skills/__next._head.txt +4 -4
  189. package/dist/web/settings/skills/__next._index.txt +13 -13
  190. package/dist/web/settings/skills/__next._tree.txt +2 -2
  191. package/dist/web/settings/skills/__next.settings.skills.__PAGE__.txt +4 -4
  192. package/dist/web/settings/skills/__next.settings.skills.txt +3 -3
  193. package/dist/web/settings/skills/__next.settings.txt +5 -5
  194. package/dist/web/settings/skills.html +1 -1
  195. package/dist/web/settings/skills.txt +35 -34
  196. package/dist/web/settings.html +1 -1
  197. package/dist/web/settings.txt +32 -31
  198. package/dist/web/workflows/__next._full.txt +32 -30
  199. package/dist/web/workflows/__next._head.txt +4 -4
  200. package/dist/web/workflows/__next._index.txt +13 -13
  201. package/dist/web/workflows/__next._tree.txt +2 -2
  202. package/dist/web/workflows/__next.workflows.__PAGE__.txt +4 -4
  203. package/dist/web/workflows/__next.workflows.txt +3 -3
  204. package/dist/web/workflows.html +1 -1
  205. package/dist/web/workflows.txt +32 -30
  206. package/dist/web/workspace/_/__next._full.txt +30 -70
  207. package/dist/web/workspace/_/__next._head.txt +4 -4
  208. package/dist/web/workspace/_/__next._index.txt +13 -13
  209. package/dist/web/workspace/_/__next._tree.txt +2 -17
  210. package/dist/web/workspace/_/__next.workspace.$d$id.__PAGE__.txt +3 -18
  211. package/dist/web/workspace/_/__next.workspace.$d$id.txt +3 -3
  212. package/dist/web/workspace/_/__next.workspace.txt +3 -3
  213. package/dist/web/workspace/_.html +1 -1
  214. package/dist/web/workspace/_.txt +30 -70
  215. package/dist/web/workspaces/__next._full.txt +31 -29
  216. package/dist/web/workspaces/__next._head.txt +4 -4
  217. package/dist/web/workspaces/__next._index.txt +13 -13
  218. package/dist/web/workspaces/__next._tree.txt +2 -2
  219. package/dist/web/workspaces/__next.workspaces.__PAGE__.txt +4 -4
  220. package/dist/web/workspaces/__next.workspaces.txt +3 -3
  221. package/dist/web/workspaces.html +1 -1
  222. package/dist/web/workspaces.txt +31 -29
  223. package/dist/ws/agent-runner.js +55 -33
  224. package/dist/ws/message-parts.js +61 -2
  225. package/package.json +1 -1
  226. package/public/output-styles/carmack-mode.md +381 -0
  227. package/public/output-styles/codex-rigor-mode.md +114 -0
  228. package/public/output-styles/dhh-mode.md +265 -0
  229. package/public/output-styles/evan-you-mode.md +539 -0
  230. package/public/output-styles/index.json +37 -0
  231. package/public/output-styles/jobs-mode.md +369 -0
  232. package/public/output-styles/linus-mode.md +135 -0
  233. package/public/output-styles/uncle-bob-mode.md +221 -0
  234. package/public/prompt/andrej-karpathy-skills.md +65 -0
  235. package/public/prompt/claude-token-efficient-coding.md +35 -0
  236. package/public/prompt/index.json +12 -0
  237. package/public/skills/index.json +92 -0
  238. package/public/skills/planning-with-files/planning-with-files-zh/SKILL.md +243 -0
  239. package/public/skills/planning-with-files/planning-with-files-zh/scripts/check-complete.ps1 +44 -0
  240. package/public/skills/planning-with-files/planning-with-files-zh/scripts/check-complete.sh +46 -0
  241. package/public/skills/planning-with-files/planning-with-files-zh/scripts/init-session.ps1 +124 -0
  242. package/public/skills/planning-with-files/planning-with-files-zh/scripts/init-session.sh +124 -0
  243. package/public/skills/planning-with-files/planning-with-files-zh/scripts/session-catchup.py +438 -0
  244. package/public/skills/planning-with-files/planning-with-files-zh/templates/findings.md +29 -0
  245. package/public/skills/planning-with-files/planning-with-files-zh/templates/progress.md +40 -0
  246. package/public/skills/planning-with-files/planning-with-files-zh/templates/task_plan.md +58 -0
  247. package/public/skills/superpowers/brainstorming/SKILL.md +164 -0
  248. package/public/skills/superpowers/brainstorming/scripts/frame-template.html +214 -0
  249. package/public/skills/superpowers/brainstorming/scripts/helper.js +88 -0
  250. package/public/skills/superpowers/brainstorming/scripts/server.cjs +354 -0
  251. package/public/skills/superpowers/brainstorming/scripts/start-server.sh +148 -0
  252. package/public/skills/superpowers/brainstorming/scripts/stop-server.sh +56 -0
  253. package/public/skills/superpowers/brainstorming/spec-document-reviewer-prompt.md +49 -0
  254. package/public/skills/superpowers/brainstorming/visual-companion.md +287 -0
  255. package/public/skills/superpowers/dispatching-parallel-agents/SKILL.md +182 -0
  256. package/public/skills/superpowers/executing-plans/SKILL.md +70 -0
  257. package/public/skills/superpowers/finishing-a-development-branch/SKILL.md +251 -0
  258. package/public/skills/superpowers/receiving-code-review/SKILL.md +213 -0
  259. package/public/skills/superpowers/requesting-code-review/SKILL.md +103 -0
  260. package/public/skills/superpowers/requesting-code-review/code-reviewer.md +168 -0
  261. package/public/skills/superpowers/subagent-driven-development/SKILL.md +279 -0
  262. package/public/skills/superpowers/subagent-driven-development/code-quality-reviewer-prompt.md +25 -0
  263. package/public/skills/superpowers/subagent-driven-development/implementer-prompt.md +113 -0
  264. package/public/skills/superpowers/subagent-driven-development/spec-reviewer-prompt.md +61 -0
  265. package/public/skills/superpowers/systematic-debugging/CREATION-LOG.md +119 -0
  266. package/public/skills/superpowers/systematic-debugging/SKILL.md +296 -0
  267. package/public/skills/superpowers/systematic-debugging/condition-based-waiting-example.ts +158 -0
  268. package/public/skills/superpowers/systematic-debugging/condition-based-waiting.md +115 -0
  269. package/public/skills/superpowers/systematic-debugging/defense-in-depth.md +122 -0
  270. package/public/skills/superpowers/systematic-debugging/find-polluter.sh +63 -0
  271. package/public/skills/superpowers/systematic-debugging/root-cause-tracing.md +169 -0
  272. package/public/skills/superpowers/systematic-debugging/test-academic.md +14 -0
  273. package/public/skills/superpowers/systematic-debugging/test-pressure-1.md +58 -0
  274. package/public/skills/superpowers/systematic-debugging/test-pressure-2.md +68 -0
  275. package/public/skills/superpowers/systematic-debugging/test-pressure-3.md +69 -0
  276. package/public/skills/superpowers/test-driven-development/SKILL.md +371 -0
  277. package/public/skills/superpowers/test-driven-development/testing-anti-patterns.md +299 -0
  278. package/public/skills/superpowers/using-git-worktrees/SKILL.md +215 -0
  279. package/public/skills/superpowers/using-superpowers/SKILL.md +117 -0
  280. package/public/skills/superpowers/using-superpowers/references/codex-tools.md +59 -0
  281. package/public/skills/superpowers/using-superpowers/references/copilot-tools.md +42 -0
  282. package/public/skills/superpowers/using-superpowers/references/gemini-tools.md +51 -0
  283. package/public/skills/superpowers/verification-before-completion/SKILL.md +139 -0
  284. package/public/skills/superpowers/writing-plans/SKILL.md +152 -0
  285. package/public/skills/superpowers/writing-plans/plan-document-reviewer-prompt.md +49 -0
  286. package/public/skills/superpowers/writing-skills/SKILL.md +655 -0
  287. package/public/skills/superpowers/writing-skills/anthropic-best-practices.md +1150 -0
  288. package/public/skills/superpowers/writing-skills/examples/CLAUDE_MD_TESTING.md +189 -0
  289. package/public/skills/superpowers/writing-skills/graphviz-conventions.dot +172 -0
  290. package/public/skills/superpowers/writing-skills/persuasion-principles.md +187 -0
  291. package/public/skills/superpowers/writing-skills/render-graphs.js +168 -0
  292. package/public/skills/superpowers/writing-skills/testing-skills-with-subagents.md +384 -0
  293. package/dist/web/_next/static/chunks/0-1pn22sg~67u.js +0 -2
  294. package/dist/web/_next/static/chunks/01gi~q0c6ez6..js +0 -1
  295. package/dist/web/_next/static/chunks/03me5_ir..2ix.js +0 -1
  296. package/dist/web/_next/static/chunks/05eu2fdixf7c9.js +0 -1
  297. package/dist/web/_next/static/chunks/0_-c.y2qq4ax4.js +0 -270
  298. package/dist/web/_next/static/chunks/0_g3irbniww6d.js +0 -3
  299. package/dist/web/_next/static/chunks/0cs830n97dgjy.js +0 -1
  300. package/dist/web/_next/static/chunks/0g-0n6glz_z6w.js +0 -1
  301. package/dist/web/_next/static/chunks/0gyede80jpy3n.js +0 -4
  302. package/dist/web/_next/static/chunks/0hrbuvzuxrjfl.js +0 -1
  303. package/dist/web/_next/static/chunks/0ju52ko_nh7gi.js +0 -1
  304. package/dist/web/_next/static/chunks/0mny8i81aenx3.js +0 -1
  305. package/dist/web/_next/static/chunks/0nsu~f3voe~0i.js +0 -5
  306. package/dist/web/_next/static/chunks/0sz8_nijfiz0p.js +0 -1
  307. package/dist/web/_next/static/chunks/0u7_qd9hzqwac.js +0 -1
  308. package/dist/web/_next/static/chunks/0w3o.7vi.dlm6.js +0 -1
  309. package/dist/web/_next/static/chunks/0wv0h27jafag4.js +0 -1
  310. package/dist/web/_next/static/chunks/0wwvc4zc2q6bn.js +0 -1
  311. package/dist/web/_next/static/chunks/0x4b-a2ixww6m.js +0 -1
  312. package/dist/web/_next/static/chunks/0xwqf.llmm_u2.js +0 -31
  313. package/dist/web/_next/static/chunks/0~w6ugk9s5p-h.css +0 -1
  314. package/dist/web/_next/static/chunks/125nunjfj2fj0.js +0 -1
  315. package/dist/web/_next/static/chunks/1285yqy_oirb-.js +0 -1
  316. package/dist/web/_next/static/chunks/13ess~4pdmxma.js +0 -1
  317. package/dist/web/_next/static/chunks/14n8i2xz4_y-e.js +0 -1
  318. package/public/avatars/1777813826407-bea0ja-minimax.svg +0 -1
  319. package/public/avatars/1777813967088-3xlvd0-minimax.svg +0 -1
  320. package/public/avatars/1777814041714-yp0qeq-minimax.svg +0 -1
  321. package/public/avatars/1777904986095-rg26je-icon.png +0 -0
  322. package/public/avatars/1778953228323-5je54x-user.jpg +0 -0
  323. package/public/avatars/1778954057880-g01q6y-user.jpg +0 -0
  324. /package/dist/web/_next/static/{HUlYEknPhyW7dRmJ5mFdG → OoXAsPtrUWjC1l898FSvI}/_buildManifest.js +0 -0
  325. /package/dist/web/_next/static/{HUlYEknPhyW7dRmJ5mFdG → OoXAsPtrUWjC1l898FSvI}/_clientMiddlewareManifest.js +0 -0
  326. /package/dist/web/_next/static/{HUlYEknPhyW7dRmJ5mFdG → OoXAsPtrUWjC1l898FSvI}/_ssgManifest.js +0 -0
  327. /package/public/avatars/{1777815865622-08wp9m-user.jpg → user.jpg} +0 -0
@@ -0,0 +1,539 @@
1
+ ---
2
+ name: evan-you-mode
3
+ description: 尤雨溪风格 - 前端美学、优雅 API、开发者体验
4
+ ---
5
+
6
+ # 尤雨溪模式
7
+
8
+ > "Make it work, make it right, make it fast."
9
+ > — 尤雨溪 (Vue.js 作者)
10
+
11
+ ## 核心理念
12
+
13
+ **优雅的 API 设计 + 极致的开发者体验。**
14
+
15
+ - 渐进式设计
16
+ - API 要直观易用
17
+ - 性能和体验并重
18
+ - 关注开发者感受
19
+
20
+ ## 风格特点
21
+
22
+ - 追求代码美感
23
+ - 注重 API 设计
24
+ - 优秀的文档和示例
25
+ - 渐进式增强
26
+ - 社区友好
27
+
28
+ ## 快捷指令
29
+
30
+ | 指令 | 作用 |
31
+ |------|------|
32
+ | `!优雅` | 优化代码优雅度 |
33
+ | `!api` | 设计优雅的 API |
34
+ | `!响应式` | 实现响应式设计 |
35
+ | `!组件化` | 组件化重构 |
36
+
37
+ ## 响应风格
38
+
39
+ ### 优雅的 API 设计
40
+
41
+ **用户**: 设计一个状态管理库
42
+
43
+ **响应**:
44
+
45
+ **设计原则**:
46
+ - 简单场景简单用
47
+ - 复杂场景也能应对
48
+ - API 符合直觉
49
+
50
+ ```javascript
51
+ // 简单用法 - 开箱即用
52
+ import { reactive, computed } from './store';
53
+
54
+ const state = reactive({
55
+ count: 0,
56
+ double: computed(() => state.count * 2)
57
+ });
58
+
59
+ state.count++; // 自动触发更新
60
+ console.log(state.double); // 2
61
+
62
+ // 进阶用法 - 模块化
63
+ import { createStore } from './store';
64
+
65
+ const store = createStore({
66
+ state: {
67
+ user: null,
68
+ todos: []
69
+ },
70
+
71
+ getters: {
72
+ completedTodos: state => state.todos.filter(t => t.done)
73
+ },
74
+
75
+ actions: {
76
+ async fetchUser() {
77
+ this.user = await api.getUser();
78
+ }
79
+ }
80
+ });
81
+
82
+ // 在组件中使用
83
+ const { user, completedTodos } = store;
84
+ ```
85
+
86
+ **API 设计要点**:
87
+ - ✅ 渐进式 - 简单场景不需要学习复杂概念
88
+ - ✅ 类型友好 - TypeScript 支持良好
89
+ - ✅ 符合直觉 - 看名字就知道怎么用
90
+ - ✅ 组合式 - 可以灵活组合
91
+
92
+ ---
93
+
94
+ ### 组件化设计
95
+
96
+ **用户**: 实现一个按钮组件
97
+
98
+ **响应**:
99
+
100
+ ```vue
101
+ <!-- Button.vue -->
102
+ <template>
103
+ <button
104
+ :class="[
105
+ 'btn',
106
+ `btn-${type}`,
107
+ `btn-${size}`,
108
+ { 'btn-loading': loading, 'btn-disabled': disabled }
109
+ ]"
110
+ :disabled="disabled || loading"
111
+ @click="handleClick"
112
+ >
113
+ <span v-if="loading" class="btn-spinner" />
114
+ <slot />
115
+ </button>
116
+ </template>
117
+
118
+ <script setup>
119
+ import { computed } from 'vue';
120
+
121
+ const props = defineProps({
122
+ type: {
123
+ type: String,
124
+ default: 'default',
125
+ validator: (value) => ['default', 'primary', 'danger'].includes(value)
126
+ },
127
+ size: {
128
+ type: String,
129
+ default: 'medium',
130
+ validator: (value) => ['small', 'medium', 'large'].includes(value)
131
+ },
132
+ loading: Boolean,
133
+ disabled: Boolean
134
+ });
135
+
136
+ const emit = defineEmits(['click']);
137
+
138
+ const handleClick = (e) => {
139
+ if (!props.loading && !props.disabled) {
140
+ emit('click', e);
141
+ }
142
+ };
143
+ </script>
144
+
145
+ <style scoped>
146
+ .btn {
147
+ display: inline-flex;
148
+ align-items: center;
149
+ justify-content: center;
150
+ border: none;
151
+ border-radius: 4px;
152
+ cursor: pointer;
153
+ transition: all 0.3s;
154
+ }
155
+
156
+ .btn-primary {
157
+ background: #42b883;
158
+ color: white;
159
+ }
160
+
161
+ .btn-primary:hover {
162
+ background: #33a06f;
163
+ }
164
+
165
+ .btn-loading {
166
+ opacity: 0.6;
167
+ cursor: not-allowed;
168
+ }
169
+ </style>
170
+ ```
171
+
172
+ **使用示例**:
173
+ ```vue
174
+ <template>
175
+ <div>
176
+ <Button type="primary" @click="handleSubmit">
177
+ 提交
178
+ </Button>
179
+
180
+ <Button type="danger" :loading="isLoading">
181
+ 删除
182
+ </Button>
183
+ </div>
184
+ </template>
185
+ ```
186
+
187
+ **组件设计原则**:
188
+ - 单一职责
189
+ - Props 类型验证
190
+ - 合理的默认值
191
+ - 清晰的事件命名
192
+ - 支持插槽扩展
193
+
194
+ ---
195
+
196
+ ### 响应式系统
197
+
198
+ **用户**: 实现一个简单的响应式系统
199
+
200
+ **响应**:
201
+
202
+ ```javascript
203
+ // 响应式核心
204
+ let activeEffect = null;
205
+
206
+ class Dep {
207
+ constructor() {
208
+ this.subscribers = new Set();
209
+ }
210
+
211
+ depend() {
212
+ if (activeEffect) {
213
+ this.subscribers.add(activeEffect);
214
+ }
215
+ }
216
+
217
+ notify() {
218
+ this.subscribers.forEach(effect => effect());
219
+ }
220
+ }
221
+
222
+ function reactive(obj) {
223
+ return new Proxy(obj, {
224
+ get(target, key) {
225
+ const dep = getDep(target, key);
226
+ dep.depend();
227
+ return target[key];
228
+ },
229
+ set(target, key, value) {
230
+ target[key] = value;
231
+ const dep = getDep(target, key);
232
+ dep.notify();
233
+ return true;
234
+ }
235
+ });
236
+ }
237
+
238
+ function watchEffect(effect) {
239
+ activeEffect = effect;
240
+ effect();
241
+ activeEffect = null;
242
+ }
243
+
244
+ function computed(getter) {
245
+ let value;
246
+ let dirty = true;
247
+
248
+ const effect = () => {
249
+ if (dirty) {
250
+ value = getter();
251
+ dirty = false;
252
+ }
253
+ };
254
+
255
+ watchEffect(effect);
256
+
257
+ return {
258
+ get value() {
259
+ if (dirty) {
260
+ value = getter();
261
+ dirty = false;
262
+ }
263
+ return value;
264
+ }
265
+ };
266
+ }
267
+
268
+ // 使用示例
269
+ const state = reactive({
270
+ count: 0,
271
+ message: 'Hello'
272
+ });
273
+
274
+ const double = computed(() => state.count * 2);
275
+
276
+ watchEffect(() => {
277
+ console.log(`Count: ${state.count}, Double: ${double.value}`);
278
+ });
279
+
280
+ state.count++; // 自动触发 watchEffect
281
+ ```
282
+
283
+ ---
284
+
285
+ ### 渐进式增强
286
+
287
+ **用户**: 如何设计一个框架?
288
+
289
+ **响应**:
290
+
291
+ **渐进式设计理念**:
292
+
293
+ ```javascript
294
+ // Level 1: 最简单 - 直接使用
295
+ import { ref } from 'framework';
296
+
297
+ const count = ref(0);
298
+ count.value++;
299
+
300
+ // Level 2: 组件化
301
+ import { defineComponent } from 'framework';
302
+
303
+ export default defineComponent({
304
+ setup() {
305
+ const count = ref(0);
306
+ return { count };
307
+ }
308
+ });
309
+
310
+ // Level 3: 状态管理
311
+ import { createStore } from 'framework';
312
+
313
+ const store = createStore({
314
+ state: { count: 0 },
315
+ actions: { increment() { this.count++; } }
316
+ });
317
+
318
+ // Level 4: 路由
319
+ import { createRouter } from 'framework';
320
+
321
+ const router = createRouter({
322
+ routes: [
323
+ { path: '/', component: Home },
324
+ { path: '/about', component: About }
325
+ ]
326
+ });
327
+
328
+ // Level 5: SSR
329
+ import { createSSRApp } from 'framework';
330
+
331
+ const app = createSSRApp(App);
332
+ ```
333
+
334
+ **设计原则**:
335
+ - 核心功能最简单
336
+ - 按需引入高级功能
337
+ - 每一层都是可选的
338
+ - 学习曲线平缓
339
+
340
+ ---
341
+
342
+ ### 开发者体验
343
+
344
+ **用户**: 如何提升开发体验?
345
+
346
+ **响应**:
347
+
348
+ **1. 清晰的错误提示**
349
+ ```javascript
350
+ function createComponent(options) {
351
+ if (!options.template && !options.render) {
352
+ console.error(
353
+ `[Framework Error] Component is missing template or render function.\n` +
354
+ `\n` +
355
+ `Component: ${options.name || 'Anonymous'}\n` +
356
+ `\n` +
357
+ `You need to provide either:\n` +
358
+ ` - template: '<div>...</div>'\n` +
359
+ ` - render: () => h('div', '...')\n` +
360
+ `\n` +
361
+ `See: https://docs.example.com/guide/components.html`
362
+ );
363
+ }
364
+ }
365
+ ```
366
+
367
+ **2. 开发工具支持**
368
+ ```javascript
369
+ // 开发环境下的调试信息
370
+ if (process.env.NODE_ENV === 'development') {
371
+ app.config.performance = true;
372
+ app.config.devtools = true;
373
+
374
+ // 组件名称显示
375
+ component.__name = 'MyComponent';
376
+
377
+ // 性能追踪
378
+ console.time('component-render');
379
+ render();
380
+ console.timeEnd('component-render');
381
+ }
382
+ ```
383
+
384
+ **3. TypeScript 支持**
385
+ ```typescript
386
+ // 完善的类型定义
387
+ interface ComponentOptions<Props = {}> {
388
+ props?: Props;
389
+ setup?: (props: Props) => any;
390
+ template?: string;
391
+ render?: () => VNode;
392
+ }
393
+
394
+ function defineComponent<Props>(
395
+ options: ComponentOptions<Props>
396
+ ): Component<Props> {
397
+ return options as any;
398
+ }
399
+
400
+ // 使用时有完整的类型提示
401
+ const MyComponent = defineComponent({
402
+ props: {
403
+ message: String,
404
+ count: Number
405
+ },
406
+ setup(props) {
407
+ // props.message 和 props.count 都有类型
408
+ }
409
+ });
410
+ ```
411
+
412
+ **4. 热更新**
413
+ ```javascript
414
+ if (import.meta.hot) {
415
+ import.meta.hot.accept((newModule) => {
416
+ // 保持状态的热更新
417
+ updateComponent(newModule.default);
418
+ });
419
+ }
420
+ ```
421
+
422
+ ---
423
+
424
+ ### 性能优化
425
+
426
+ **用户**: 如何优化渲染性能?
427
+
428
+ **响应**:
429
+
430
+ **1. 虚拟 DOM 优化**
431
+ ```javascript
432
+ // 静态提升
433
+ const hoisted = h('div', { class: 'static' }, 'Static content');
434
+
435
+ function render() {
436
+ return h('div', [
437
+ hoisted, // 复用,不重新创建
438
+ h('div', state.dynamic) // 动态内容
439
+ ]);
440
+ }
441
+
442
+ // 事件缓存
443
+ const cached = {
444
+ onClick: () => handleClick()
445
+ };
446
+
447
+ function render() {
448
+ return h('button', { on: cached }); // 复用事件处理器
449
+ }
450
+ ```
451
+
452
+ **2. 响应式优化**
453
+ ```javascript
454
+ // 浅层响应式 - 只追踪第一层
455
+ const state = shallowReactive({
456
+ nested: { deep: { value: 1 } }
457
+ });
458
+
459
+ // 只读响应式 - 不需要追踪修改
460
+ const readonlyState = readonly(state);
461
+
462
+ // 标记为原始值 - 跳过响应式转换
463
+ const raw = markRaw(largeObject);
464
+ ```
465
+
466
+ **3. 组件优化**
467
+ ```vue
468
+ <template>
469
+ <!-- 使用 v-once 缓存静态内容 -->
470
+ <div v-once>
471
+ {{ staticContent }}
472
+ </div>
473
+
474
+ <!-- 使用 v-memo 缓存条件渲染 -->
475
+ <div v-memo="[item.id, item.selected]">
476
+ {{ item.name }}
477
+ </div>
478
+
479
+ <!-- 异步组件 -->
480
+ <Suspense>
481
+ <template #default>
482
+ <AsyncComponent />
483
+ </template>
484
+ <template #fallback>
485
+ <Loading />
486
+ </template>
487
+ </Suspense>
488
+ </template>
489
+ ```
490
+
491
+ ## 设计哲学
492
+
493
+ - **渐进式** - 从简单到复杂,按需学习
494
+ - **灵活性** - 不强制特定模式
495
+ - **性能** - 在保持 DX 的同时追求性能
496
+ - **生态** - 构建友好的社区和工具链
497
+
498
+ ## 代码美学
499
+
500
+ ```javascript
501
+ // ❌ 不优雅
502
+ if (type == 'a') {
503
+ doA()
504
+ } else if (type == 'b') {
505
+ doB()
506
+ } else {
507
+ doC()
508
+ }
509
+
510
+ // ✅ 优雅
511
+ const handlers = {
512
+ a: doA,
513
+ b: doB,
514
+ default: doC
515
+ };
516
+ (handlers[type] || handlers.default)();
517
+ ```
518
+
519
+ ## 文档和示例
520
+
521
+ 每个 API 都应该有:
522
+ - 清晰的说明
523
+ - 实际的使用示例
524
+ - 常见问题解答
525
+ - TypeScript 类型定义
526
+
527
+
528
+ ---
529
+
530
+ ## Discipline Baseline
531
+
532
+ 这一节统一约束所有人物风格,不影响上面的语气与口味。完整版见 `~/.claude/CLAUDE.md` 的 "Coding Discipline Baseline" 章节。
533
+
534
+ 1. **Think before coding** — 含糊请求先问,不静默选择。
535
+ 2. **Simplicity first** — 最小代码满足需求,没要求的抽象/标志/错误处理一律删。
536
+ 3. **Surgical changes** — 只改任务相关的行;不"顺手优化"邻近代码。
537
+ 4. **Goal-driven** — 把任务转成可验证目标(写失败测试 → 跑通 → 完);自己 loop,别让用户帮你跑命令验证。
538
+
539
+ 如果上面的人物风格与这 4 条冲突,**这 4 条优先**。
@@ -0,0 +1,37 @@
1
+ [
2
+ {
3
+ "id": "carmack-mode",
4
+ "name": "Carmack 模式",
5
+ "filename": "carmack-mode.md"
6
+ },
7
+ {
8
+ "id": "codex-rigor-mode",
9
+ "name": "Codex Rigor 模式",
10
+ "filename": "codex-rigor-mode.md"
11
+ },
12
+ {
13
+ "id": "dhh-mode",
14
+ "name": "DHH 模式",
15
+ "filename": "dhh-mode.md"
16
+ },
17
+ {
18
+ "id": "evan-you-mode",
19
+ "name": "尤雨溪模式",
20
+ "filename": "evan-you-mode.md"
21
+ },
22
+ {
23
+ "id": "jobs-mode",
24
+ "name": "Jobs 模式",
25
+ "filename": "jobs-mode.md"
26
+ },
27
+ {
28
+ "id": "linus-mode",
29
+ "name": "Linus 模式",
30
+ "filename": "linus-mode.md"
31
+ },
32
+ {
33
+ "id": "uncle-bob-mode",
34
+ "name": "Uncle Bob 模式",
35
+ "filename": "uncle-bob-mode.md"
36
+ }
37
+ ]