zero-workspace 0.0.2

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 (507) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/README.md +187 -0
  3. package/config/component-versions.json +16 -0
  4. package/config/scenarioCapabilities.json +29 -0
  5. package/config/version-notes.yaml +244 -0
  6. package/dist/adapters/OutputAdapter.d.ts +79 -0
  7. package/dist/adapters/OutputAdapter.d.ts.map +1 -0
  8. package/dist/adapters/OutputAdapter.js +124 -0
  9. package/dist/adapters/OutputAdapter.js.map +1 -0
  10. package/dist/cli/check-node-version.d.ts +3 -0
  11. package/dist/cli/check-node-version.d.ts.map +1 -0
  12. package/dist/cli/check-node-version.js +153 -0
  13. package/dist/cli/check-node-version.js.map +1 -0
  14. package/dist/cli/plugins.d.ts +41 -0
  15. package/dist/cli/plugins.d.ts.map +1 -0
  16. package/dist/cli/plugins.js +742 -0
  17. package/dist/cli/plugins.js.map +1 -0
  18. package/dist/cli/rebuild.d.ts +63 -0
  19. package/dist/cli/rebuild.d.ts.map +1 -0
  20. package/dist/cli/rebuild.js +989 -0
  21. package/dist/cli/rebuild.js.map +1 -0
  22. package/dist/cli/repair.d.ts +7 -0
  23. package/dist/cli/repair.d.ts.map +1 -0
  24. package/dist/cli/repair.js +925 -0
  25. package/dist/cli/repair.js.map +1 -0
  26. package/dist/cli/setup.d.ts +7 -0
  27. package/dist/cli/setup.d.ts.map +1 -0
  28. package/dist/cli/setup.js +452 -0
  29. package/dist/cli/setup.js.map +1 -0
  30. package/dist/cli/update.d.ts +10 -0
  31. package/dist/cli/update.d.ts.map +1 -0
  32. package/dist/cli/update.js +426 -0
  33. package/dist/cli/update.js.map +1 -0
  34. package/dist/cli/webui.d.ts +6 -0
  35. package/dist/cli/webui.d.ts.map +1 -0
  36. package/dist/cli/webui.js +210 -0
  37. package/dist/cli/webui.js.map +1 -0
  38. package/dist/http/index.d.ts +3 -0
  39. package/dist/http/index.d.ts.map +1 -0
  40. package/dist/http/index.js +15 -0
  41. package/dist/http/index.js.map +1 -0
  42. package/dist/http/middleware/errorHandler.d.ts +16 -0
  43. package/dist/http/middleware/errorHandler.d.ts.map +1 -0
  44. package/dist/http/middleware/errorHandler.js +79 -0
  45. package/dist/http/middleware/errorHandler.js.map +1 -0
  46. package/dist/http/routes/admin.d.ts +3 -0
  47. package/dist/http/routes/admin.d.ts.map +1 -0
  48. package/dist/http/routes/admin.js +730 -0
  49. package/dist/http/routes/admin.js.map +1 -0
  50. package/dist/http/routes/backup.d.ts +3 -0
  51. package/dist/http/routes/backup.d.ts.map +1 -0
  52. package/dist/http/routes/backup.js +172 -0
  53. package/dist/http/routes/backup.js.map +1 -0
  54. package/dist/http/routes/config.d.ts +3 -0
  55. package/dist/http/routes/config.d.ts.map +1 -0
  56. package/dist/http/routes/config.js +157 -0
  57. package/dist/http/routes/config.js.map +1 -0
  58. package/dist/http/routes/context.d.ts +3 -0
  59. package/dist/http/routes/context.d.ts.map +1 -0
  60. package/dist/http/routes/context.js +82 -0
  61. package/dist/http/routes/context.js.map +1 -0
  62. package/dist/http/routes/log.d.ts +3 -0
  63. package/dist/http/routes/log.d.ts.map +1 -0
  64. package/dist/http/routes/log.js +105 -0
  65. package/dist/http/routes/log.js.map +1 -0
  66. package/dist/http/routes/memo.d.ts +6 -0
  67. package/dist/http/routes/memo.d.ts.map +1 -0
  68. package/dist/http/routes/memo.js +29 -0
  69. package/dist/http/routes/memo.js.map +1 -0
  70. package/dist/http/routes/node.d.ts +3 -0
  71. package/dist/http/routes/node.d.ts.map +1 -0
  72. package/dist/http/routes/node.js +251 -0
  73. package/dist/http/routes/node.js.map +1 -0
  74. package/dist/http/routes/state.d.ts +3 -0
  75. package/dist/http/routes/state.d.ts.map +1 -0
  76. package/dist/http/routes/state.js +48 -0
  77. package/dist/http/routes/state.js.map +1 -0
  78. package/dist/http/routes/workspace.d.ts +3 -0
  79. package/dist/http/routes/workspace.d.ts.map +1 -0
  80. package/dist/http/routes/workspace.js +249 -0
  81. package/dist/http/routes/workspace.js.map +1 -0
  82. package/dist/http/server.d.ts +10 -0
  83. package/dist/http/server.d.ts.map +1 -0
  84. package/dist/http/server.js +284 -0
  85. package/dist/http/server.js.map +1 -0
  86. package/dist/http/services.d.ts +93 -0
  87. package/dist/http/services.d.ts.map +1 -0
  88. package/dist/http/services.js +297 -0
  89. package/dist/http/services.js.map +1 -0
  90. package/dist/index.d.ts +3 -0
  91. package/dist/index.d.ts.map +1 -0
  92. package/dist/index.js +1073 -0
  93. package/dist/index.js.map +1 -0
  94. package/dist/prompts/guidanceContent.d.ts +18 -0
  95. package/dist/prompts/guidanceContent.d.ts.map +1 -0
  96. package/dist/prompts/guidanceContent.js +814 -0
  97. package/dist/prompts/guidanceContent.js.map +1 -0
  98. package/dist/prompts/index.d.ts +2 -0
  99. package/dist/prompts/index.d.ts.map +1 -0
  100. package/dist/prompts/index.js +4 -0
  101. package/dist/prompts/index.js.map +1 -0
  102. package/dist/prompts/instructions.d.ts +56 -0
  103. package/dist/prompts/instructions.d.ts.map +1 -0
  104. package/dist/prompts/instructions.js +1343 -0
  105. package/dist/prompts/instructions.js.map +1 -0
  106. package/dist/services/BackupService.d.ts +104 -0
  107. package/dist/services/BackupService.d.ts.map +1 -0
  108. package/dist/services/BackupService.js +549 -0
  109. package/dist/services/BackupService.js.map +1 -0
  110. package/dist/services/CapabilityService.d.ts +38 -0
  111. package/dist/services/CapabilityService.d.ts.map +1 -0
  112. package/dist/services/CapabilityService.js +256 -0
  113. package/dist/services/CapabilityService.js.map +1 -0
  114. package/dist/services/ConfigService.d.ts +35 -0
  115. package/dist/services/ConfigService.d.ts.map +1 -0
  116. package/dist/services/ConfigService.js +105 -0
  117. package/dist/services/ConfigService.js.map +1 -0
  118. package/dist/services/ContextService.d.ts +65 -0
  119. package/dist/services/ContextService.d.ts.map +1 -0
  120. package/dist/services/ContextService.js +503 -0
  121. package/dist/services/ContextService.js.map +1 -0
  122. package/dist/services/DetectionService.d.ts +76 -0
  123. package/dist/services/DetectionService.d.ts.map +1 -0
  124. package/dist/services/DetectionService.js +262 -0
  125. package/dist/services/DetectionService.js.map +1 -0
  126. package/dist/services/DispatchService.d.ts +267 -0
  127. package/dist/services/DispatchService.d.ts.map +1 -0
  128. package/dist/services/DispatchService.js +1357 -0
  129. package/dist/services/DispatchService.js.map +1 -0
  130. package/dist/services/EventService.d.ts +81 -0
  131. package/dist/services/EventService.d.ts.map +1 -0
  132. package/dist/services/EventService.js +187 -0
  133. package/dist/services/EventService.js.map +1 -0
  134. package/dist/services/GuidanceService.d.ts +64 -0
  135. package/dist/services/GuidanceService.d.ts.map +1 -0
  136. package/dist/services/GuidanceService.js +259 -0
  137. package/dist/services/GuidanceService.js.map +1 -0
  138. package/dist/services/HealthService.d.ts +43 -0
  139. package/dist/services/HealthService.d.ts.map +1 -0
  140. package/dist/services/HealthService.js +276 -0
  141. package/dist/services/HealthService.js.map +1 -0
  142. package/dist/services/InstallationService.d.ts +62 -0
  143. package/dist/services/InstallationService.d.ts.map +1 -0
  144. package/dist/services/InstallationService.js +204 -0
  145. package/dist/services/InstallationService.js.map +1 -0
  146. package/dist/services/LogService.d.ts +35 -0
  147. package/dist/services/LogService.d.ts.map +1 -0
  148. package/dist/services/LogService.js +189 -0
  149. package/dist/services/LogService.js.map +1 -0
  150. package/dist/services/MemoService.d.ts +39 -0
  151. package/dist/services/MemoService.d.ts.map +1 -0
  152. package/dist/services/MemoService.js +288 -0
  153. package/dist/services/MemoService.js.map +1 -0
  154. package/dist/services/NodeService.d.ts +90 -0
  155. package/dist/services/NodeService.d.ts.map +1 -0
  156. package/dist/services/NodeService.js +958 -0
  157. package/dist/services/NodeService.js.map +1 -0
  158. package/dist/services/OpenSpecParser.d.ts +43 -0
  159. package/dist/services/OpenSpecParser.d.ts.map +1 -0
  160. package/dist/services/OpenSpecParser.js +191 -0
  161. package/dist/services/OpenSpecParser.js.map +1 -0
  162. package/dist/services/ReferenceService.d.ts +35 -0
  163. package/dist/services/ReferenceService.d.ts.map +1 -0
  164. package/dist/services/ReferenceService.js +195 -0
  165. package/dist/services/ReferenceService.js.map +1 -0
  166. package/dist/services/RepairService.d.ts +36 -0
  167. package/dist/services/RepairService.d.ts.map +1 -0
  168. package/dist/services/RepairService.js +429 -0
  169. package/dist/services/RepairService.js.map +1 -0
  170. package/dist/services/SearchService.d.ts +34 -0
  171. package/dist/services/SearchService.d.ts.map +1 -0
  172. package/dist/services/SearchService.js +293 -0
  173. package/dist/services/SearchService.js.map +1 -0
  174. package/dist/services/SessionService.d.ts +136 -0
  175. package/dist/services/SessionService.d.ts.map +1 -0
  176. package/dist/services/SessionService.js +297 -0
  177. package/dist/services/SessionService.js.map +1 -0
  178. package/dist/services/StateService.d.ts +97 -0
  179. package/dist/services/StateService.d.ts.map +1 -0
  180. package/dist/services/StateService.js +846 -0
  181. package/dist/services/StateService.js.map +1 -0
  182. package/dist/services/TutorialService.d.ts +114 -0
  183. package/dist/services/TutorialService.d.ts.map +1 -0
  184. package/dist/services/TutorialService.js +1262 -0
  185. package/dist/services/TutorialService.js.map +1 -0
  186. package/dist/services/WorkspaceService.d.ts +273 -0
  187. package/dist/services/WorkspaceService.d.ts.map +1 -0
  188. package/dist/services/WorkspaceService.js +1764 -0
  189. package/dist/services/WorkspaceService.js.map +1 -0
  190. package/dist/services/index.d.ts +15 -0
  191. package/dist/services/index.d.ts.map +1 -0
  192. package/dist/services/index.js +14 -0
  193. package/dist/services/index.js.map +1 -0
  194. package/dist/storage/FileSystemAdapter.d.ts +223 -0
  195. package/dist/storage/FileSystemAdapter.d.ts.map +1 -0
  196. package/dist/storage/FileSystemAdapter.js +384 -0
  197. package/dist/storage/FileSystemAdapter.js.map +1 -0
  198. package/dist/storage/JsonStorage.d.ts +158 -0
  199. package/dist/storage/JsonStorage.d.ts.map +1 -0
  200. package/dist/storage/JsonStorage.js +613 -0
  201. package/dist/storage/JsonStorage.js.map +1 -0
  202. package/dist/storage/MarkdownStorage.d.ts +178 -0
  203. package/dist/storage/MarkdownStorage.d.ts.map +1 -0
  204. package/dist/storage/MarkdownStorage.js +918 -0
  205. package/dist/storage/MarkdownStorage.js.map +1 -0
  206. package/dist/storage/SessionBindingStorage.d.ts +69 -0
  207. package/dist/storage/SessionBindingStorage.d.ts.map +1 -0
  208. package/dist/storage/SessionBindingStorage.js +131 -0
  209. package/dist/storage/SessionBindingStorage.js.map +1 -0
  210. package/dist/storage/index.d.ts +6 -0
  211. package/dist/storage/index.d.ts.map +1 -0
  212. package/dist/storage/index.js +6 -0
  213. package/dist/storage/index.js.map +1 -0
  214. package/dist/tools/capability.d.ts +18 -0
  215. package/dist/tools/capability.d.ts.map +1 -0
  216. package/dist/tools/capability.js +73 -0
  217. package/dist/tools/capability.js.map +1 -0
  218. package/dist/tools/config.d.ts +14 -0
  219. package/dist/tools/config.d.ts.map +1 -0
  220. package/dist/tools/config.js +61 -0
  221. package/dist/tools/config.js.map +1 -0
  222. package/dist/tools/context.d.ts +22 -0
  223. package/dist/tools/context.d.ts.map +1 -0
  224. package/dist/tools/context.js +139 -0
  225. package/dist/tools/context.js.map +1 -0
  226. package/dist/tools/dispatch.d.ts +41 -0
  227. package/dist/tools/dispatch.d.ts.map +1 -0
  228. package/dist/tools/dispatch.js +380 -0
  229. package/dist/tools/dispatch.js.map +1 -0
  230. package/dist/tools/help.d.ts +44 -0
  231. package/dist/tools/help.d.ts.map +1 -0
  232. package/dist/tools/help.js +227 -0
  233. package/dist/tools/help.js.map +1 -0
  234. package/dist/tools/import.d.ts +17 -0
  235. package/dist/tools/import.d.ts.map +1 -0
  236. package/dist/tools/import.js +96 -0
  237. package/dist/tools/import.js.map +1 -0
  238. package/dist/tools/index.d.ts +12 -0
  239. package/dist/tools/index.d.ts.map +1 -0
  240. package/dist/tools/index.js +13 -0
  241. package/dist/tools/index.js.map +1 -0
  242. package/dist/tools/log.d.ts +21 -0
  243. package/dist/tools/log.d.ts.map +1 -0
  244. package/dist/tools/log.js +93 -0
  245. package/dist/tools/log.js.map +1 -0
  246. package/dist/tools/memo.d.ts +26 -0
  247. package/dist/tools/memo.d.ts.map +1 -0
  248. package/dist/tools/memo.js +188 -0
  249. package/dist/tools/memo.js.map +1 -0
  250. package/dist/tools/node.d.ts +34 -0
  251. package/dist/tools/node.d.ts.map +1 -0
  252. package/dist/tools/node.js +328 -0
  253. package/dist/tools/node.js.map +1 -0
  254. package/dist/tools/search.d.ts +14 -0
  255. package/dist/tools/search.d.ts.map +1 -0
  256. package/dist/tools/search.js +95 -0
  257. package/dist/tools/search.js.map +1 -0
  258. package/dist/tools/session.d.ts +22 -0
  259. package/dist/tools/session.d.ts.map +1 -0
  260. package/dist/tools/session.js +127 -0
  261. package/dist/tools/session.js.map +1 -0
  262. package/dist/tools/state.d.ts +10 -0
  263. package/dist/tools/state.d.ts.map +1 -0
  264. package/dist/tools/state.js +79 -0
  265. package/dist/tools/state.js.map +1 -0
  266. package/dist/tools/workspace.d.ts +38 -0
  267. package/dist/tools/workspace.d.ts.map +1 -0
  268. package/dist/tools/workspace.js +240 -0
  269. package/dist/tools/workspace.js.map +1 -0
  270. package/dist/types/capability.d.ts +36 -0
  271. package/dist/types/capability.d.ts.map +1 -0
  272. package/dist/types/capability.js +3 -0
  273. package/dist/types/capability.js.map +1 -0
  274. package/dist/types/confirmation.d.ts +35 -0
  275. package/dist/types/confirmation.d.ts.map +1 -0
  276. package/dist/types/confirmation.js +3 -0
  277. package/dist/types/confirmation.js.map +1 -0
  278. package/dist/types/context.d.ts +174 -0
  279. package/dist/types/context.d.ts.map +1 -0
  280. package/dist/types/context.js +3 -0
  281. package/dist/types/context.js.map +1 -0
  282. package/dist/types/errors.d.ts +81 -0
  283. package/dist/types/errors.d.ts.map +1 -0
  284. package/dist/types/errors.js +154 -0
  285. package/dist/types/errors.js.map +1 -0
  286. package/dist/types/guidance.d.ts +162 -0
  287. package/dist/types/guidance.d.ts.map +1 -0
  288. package/dist/types/guidance.js +4 -0
  289. package/dist/types/guidance.js.map +1 -0
  290. package/dist/types/health.d.ts +61 -0
  291. package/dist/types/health.d.ts.map +1 -0
  292. package/dist/types/health.js +3 -0
  293. package/dist/types/health.js.map +1 -0
  294. package/dist/types/index.d.ts +10 -0
  295. package/dist/types/index.d.ts.map +1 -0
  296. package/dist/types/index.js +11 -0
  297. package/dist/types/index.js.map +1 -0
  298. package/dist/types/memo.d.ts +132 -0
  299. package/dist/types/memo.d.ts.map +1 -0
  300. package/dist/types/memo.js +3 -0
  301. package/dist/types/memo.js.map +1 -0
  302. package/dist/types/node.d.ts +316 -0
  303. package/dist/types/node.d.ts.map +1 -0
  304. package/dist/types/node.js +3 -0
  305. package/dist/types/node.js.map +1 -0
  306. package/dist/types/repair.d.ts +62 -0
  307. package/dist/types/repair.d.ts.map +1 -0
  308. package/dist/types/repair.js +4 -0
  309. package/dist/types/repair.js.map +1 -0
  310. package/dist/types/search.d.ts +58 -0
  311. package/dist/types/search.d.ts.map +1 -0
  312. package/dist/types/search.js +3 -0
  313. package/dist/types/search.js.map +1 -0
  314. package/dist/types/settings.d.ts +109 -0
  315. package/dist/types/settings.d.ts.map +1 -0
  316. package/dist/types/settings.js +30 -0
  317. package/dist/types/settings.js.map +1 -0
  318. package/dist/types/workspace.d.ts +357 -0
  319. package/dist/types/workspace.d.ts.map +1 -0
  320. package/dist/types/workspace.js +3 -0
  321. package/dist/types/workspace.js.map +1 -0
  322. package/dist/utils/contentValidation.d.ts +47 -0
  323. package/dist/utils/contentValidation.d.ts.map +1 -0
  324. package/dist/utils/contentValidation.js +93 -0
  325. package/dist/utils/contentValidation.js.map +1 -0
  326. package/dist/utils/devLog.d.ts +43 -0
  327. package/dist/utils/devLog.d.ts.map +1 -0
  328. package/dist/utils/devLog.js +94 -0
  329. package/dist/utils/devLog.js.map +1 -0
  330. package/dist/utils/errorLogger.d.ts +27 -0
  331. package/dist/utils/errorLogger.d.ts.map +1 -0
  332. package/dist/utils/errorLogger.js +105 -0
  333. package/dist/utils/errorLogger.js.map +1 -0
  334. package/dist/utils/git.d.ts +123 -0
  335. package/dist/utils/git.d.ts.map +1 -0
  336. package/dist/utils/git.js +400 -0
  337. package/dist/utils/git.js.map +1 -0
  338. package/dist/utils/hash.d.ts +32 -0
  339. package/dist/utils/hash.d.ts.map +1 -0
  340. package/dist/utils/hash.js +37 -0
  341. package/dist/utils/hash.js.map +1 -0
  342. package/dist/utils/id.d.ts +54 -0
  343. package/dist/utils/id.d.ts.map +1 -0
  344. package/dist/utils/id.js +96 -0
  345. package/dist/utils/id.js.map +1 -0
  346. package/dist/utils/index.d.ts +8 -0
  347. package/dist/utils/index.d.ts.map +1 -0
  348. package/dist/utils/index.js +9 -0
  349. package/dist/utils/index.js.map +1 -0
  350. package/dist/utils/logger.d.ts +42 -0
  351. package/dist/utils/logger.d.ts.map +1 -0
  352. package/dist/utils/logger.js +228 -0
  353. package/dist/utils/logger.js.map +1 -0
  354. package/dist/utils/manualChangeFormatter.d.ts +8 -0
  355. package/dist/utils/manualChangeFormatter.d.ts.map +1 -0
  356. package/dist/utils/manualChangeFormatter.js +21 -0
  357. package/dist/utils/manualChangeFormatter.js.map +1 -0
  358. package/dist/utils/paramValidator.d.ts +35 -0
  359. package/dist/utils/paramValidator.d.ts.map +1 -0
  360. package/dist/utils/paramValidator.js +214 -0
  361. package/dist/utils/paramValidator.js.map +1 -0
  362. package/dist/utils/port.d.ts +7 -0
  363. package/dist/utils/port.d.ts.map +1 -0
  364. package/dist/utils/port.js +28 -0
  365. package/dist/utils/port.js.map +1 -0
  366. package/dist/utils/processManager.d.ts +53 -0
  367. package/dist/utils/processManager.d.ts.map +1 -0
  368. package/dist/utils/processManager.js +267 -0
  369. package/dist/utils/processManager.js.map +1 -0
  370. package/dist/utils/sessionLogger.d.ts +28 -0
  371. package/dist/utils/sessionLogger.d.ts.map +1 -0
  372. package/dist/utils/sessionLogger.js +142 -0
  373. package/dist/utils/sessionLogger.js.map +1 -0
  374. package/dist/utils/time.d.ts +15 -0
  375. package/dist/utils/time.d.ts.map +1 -0
  376. package/dist/utils/time.js +32 -0
  377. package/dist/utils/time.js.map +1 -0
  378. package/dist/utils/validation.d.ts +23 -0
  379. package/dist/utils/validation.d.ts.map +1 -0
  380. package/dist/utils/validation.js +88 -0
  381. package/dist/utils/validation.js.map +1 -0
  382. package/docs//346/227/245/345/277/227/347/263/273/347/273/237.md +389 -0
  383. package/docs//347/224/250/346/210/267/346/211/213/345/206/214.md +1446 -0
  384. package/docs//347/224/250/346/210/267/346/211/213/345/206/214/344/270/216/346/212/200/346/234/257/346/214/207/345/215/227.md +873 -0
  385. package/package.json +94 -0
  386. package/plugin/README.md +141 -0
  387. package/plugin/agents/zero-executor.md +114 -0
  388. package/plugin/agents/zero-reviewer.md +133 -0
  389. package/plugin/docs/diagnostic-guide.md +128 -0
  390. package/plugin/hooks/hooks.json.deprecated +70 -0
  391. package/plugin/scripts/cursor-hook-entry.cjs +217 -0
  392. package/plugin/scripts/hook-entry.cjs +663 -0
  393. package/plugin/scripts/openspec-import.cjs +714 -0
  394. package/plugin/scripts/shared/binding.cjs +98 -0
  395. package/plugin/scripts/shared/config.cjs +65 -0
  396. package/plugin/scripts/shared/context.cjs +120 -0
  397. package/plugin/scripts/shared/index.cjs +34 -0
  398. package/plugin/scripts/shared/logger.cjs +196 -0
  399. package/plugin/scripts/shared/reminder.cjs +261 -0
  400. package/plugin/scripts/shared/utils.cjs +62 -0
  401. package/plugin/scripts/shared/workspace.cjs +322 -0
  402. package/plugin/skills/aligning-intent/SKILL.md +275 -0
  403. package/plugin/skills/analyzing-measurements/SKILL.md +223 -0
  404. package/plugin/skills/bootstrapping-workspace/SKILL.md +260 -0
  405. package/plugin/skills/designing-solutions/SKILL.md +363 -0
  406. package/plugin/skills/diagnosing-issues/SKILL.md +219 -0
  407. package/plugin/skills/discovering-context/SKILL.md +283 -0
  408. package/plugin/skills/dispatching-parent/SKILL.md +399 -0
  409. package/plugin/skills/executing-task/SKILL.md +340 -0
  410. package/plugin/skills/memo-create/SKILL.md +222 -0
  411. package/plugin/skills/planning-verification/SKILL.md +245 -0
  412. package/plugin/skills/preparing-dispatch/SKILL.md +299 -0
  413. package/plugin/skills/researching-tech/SKILL.md +223 -0
  414. package/plugin/skills/reviewing-quality/SKILL.md +354 -0
  415. package/plugin/skills/reviewing-spec/SKILL.md +333 -0
  416. package/plugin/skills/starting-info-flow/SKILL.md +196 -0
  417. package/web/README.md +5 -0
  418. package/web/dist/assets/DocsView-Bls_Vjsr.css +1 -0
  419. package/web/dist/assets/DocsView-Cxc0B63r.js +1447 -0
  420. package/web/dist/assets/HomeView-C7df9thb.js +9 -0
  421. package/web/dist/assets/HomeView-ufUdnfHk.css +1 -0
  422. package/web/dist/assets/MarkdownContent-DXp6CtSP.js +308 -0
  423. package/web/dist/assets/MarkdownContent-NFqiOBLH.css +1 -0
  424. package/web/dist/assets/NotFoundView-BYX1oZAn.css +1 -0
  425. package/web/dist/assets/NotFoundView-zrc0lT9q.js +1 -0
  426. package/web/dist/assets/WorkspaceView-BckqgNcX.js +27 -0
  427. package/web/dist/assets/WorkspaceView-J1dgpYMx.css +1 -0
  428. package/web/dist/assets/WsConfirmDialog-C1CvL4my.css +1 -0
  429. package/web/dist/assets/WsConfirmDialog-gLEP7uBD.js +4 -0
  430. package/web/dist/assets/arc-DPkKTkUT.js +1 -0
  431. package/web/dist/assets/architectureDiagram-VXUJARFQ-CEGpqUlZ.js +36 -0
  432. package/web/dist/assets/blockDiagram-VD42YOAC-Bv-mqdQH.js +122 -0
  433. package/web/dist/assets/c4Diagram-YG6GDRKO-DRyPatZ_.js +10 -0
  434. package/web/dist/assets/channel-B84mKLDZ.js +1 -0
  435. package/web/dist/assets/chunk-4BX2VUAB-c7DivX0u.js +1 -0
  436. package/web/dist/assets/chunk-55IACEB6-CGKTaLlo.js +1 -0
  437. package/web/dist/assets/chunk-B4BG7PRW-Czhx5Q_P.js +165 -0
  438. package/web/dist/assets/chunk-DI55MBZ5-CQVA7hcZ.js +220 -0
  439. package/web/dist/assets/chunk-FMBD7UC4-hEiPmi7V.js +15 -0
  440. package/web/dist/assets/chunk-QN33PNHL-rL6yYI-E.js +1 -0
  441. package/web/dist/assets/chunk-QZHKN3VN-BRyHBBzq.js +1 -0
  442. package/web/dist/assets/chunk-TZMSLE5B-D4PXmTz9.js +1 -0
  443. package/web/dist/assets/classDiagram-2ON5EDUG-CNn53ohi.js +1 -0
  444. package/web/dist/assets/classDiagram-v2-WZHVMYZB-CNn53ohi.js +1 -0
  445. package/web/dist/assets/cose-bilkent-S5V4N54A-BAREnRga.js +1 -0
  446. package/web/dist/assets/cytoscape.esm-BnkdMOzK.js +321 -0
  447. package/web/dist/assets/dagre-6UL2VRFP-DaYzb3MT.js +4 -0
  448. package/web/dist/assets/defaultLocale-C4B-KCzX.js +1 -0
  449. package/web/dist/assets/diagram-PSM6KHXK-BFltDqvd.js +24 -0
  450. package/web/dist/assets/diagram-QEK2KX5R-CR4VU2La.js +43 -0
  451. package/web/dist/assets/diagram-S2PKOQOG-0UfIeT-1.js +24 -0
  452. package/web/dist/assets/erDiagram-Q2GNP2WA-Bo17Xmng.js +60 -0
  453. package/web/dist/assets/flowDiagram-NV44I4VS-CzqhQp8s.js +162 -0
  454. package/web/dist/assets/ganttDiagram-JELNMOA3-TXwXtUcq.js +267 -0
  455. package/web/dist/assets/gitGraphDiagram-NY62KEGX-CoFQTy9O.js +65 -0
  456. package/web/dist/assets/graph-CIQcRIVd.js +1 -0
  457. package/web/dist/assets/index-BgLd_o_M.css +1 -0
  458. package/web/dist/assets/index-Cd_J3fZn.js +30 -0
  459. package/web/dist/assets/infoDiagram-WHAUD3N6-Dq0xXfVu.js +2 -0
  460. package/web/dist/assets/init-Gi6I4Gst.js +1 -0
  461. package/web/dist/assets/journeyDiagram-XKPGCS4Q-jIg5BOfC.js +139 -0
  462. package/web/dist/assets/kanban-definition-3W4ZIXB7-D2giu6aZ.js +89 -0
  463. package/web/dist/assets/katex-XbL3y5x-.js +261 -0
  464. package/web/dist/assets/layout-Bm-XCM-8.js +1 -0
  465. package/web/dist/assets/linear-FbekP9OZ.js +1 -0
  466. package/web/dist/assets/min-BrRCpYmF.js +1 -0
  467. package/web/dist/assets/mindmap-definition-VGOIOE7T-o-4ubbY9.js +68 -0
  468. package/web/dist/assets/noto-emoji-0-400-normal-BTQbhB77.woff +0 -0
  469. package/web/dist/assets/noto-emoji-0-400-normal-DHdy6Uhy.woff2 +0 -0
  470. package/web/dist/assets/noto-emoji-1-400-normal-0IvkdXBB.woff +0 -0
  471. package/web/dist/assets/noto-emoji-1-400-normal-BY9OovbM.woff2 +0 -0
  472. package/web/dist/assets/noto-emoji-10-400-normal-D9w4QCof.woff2 +0 -0
  473. package/web/dist/assets/noto-emoji-10-400-normal-DtCumcZR.woff +0 -0
  474. package/web/dist/assets/noto-emoji-11-400-normal-BboTlyvx.woff +0 -0
  475. package/web/dist/assets/noto-emoji-12-400-normal-BB5pgBKj.woff2 +0 -0
  476. package/web/dist/assets/noto-emoji-12-400-normal-g186qhiA.woff +0 -0
  477. package/web/dist/assets/noto-emoji-2-400-normal-BKCR1azW.woff2 +0 -0
  478. package/web/dist/assets/noto-emoji-2-400-normal-BYH0KhDr.woff +0 -0
  479. package/web/dist/assets/noto-emoji-3-400-normal-CnPTUeEK.woff +0 -0
  480. package/web/dist/assets/noto-emoji-3-400-normal-TrTb2VQM.woff2 +0 -0
  481. package/web/dist/assets/noto-emoji-4-400-normal-BxD0KVdj.woff +0 -0
  482. package/web/dist/assets/noto-emoji-4-400-normal-s_n9EyG1.woff2 +0 -0
  483. package/web/dist/assets/noto-emoji-5-400-normal-C190AIxR.woff +0 -0
  484. package/web/dist/assets/noto-emoji-5-400-normal-Ctfx4xc6.woff2 +0 -0
  485. package/web/dist/assets/noto-emoji-6-400-normal-DlXlXWt7.woff +0 -0
  486. package/web/dist/assets/noto-emoji-6-400-normal-NzsjD754.woff2 +0 -0
  487. package/web/dist/assets/noto-emoji-7-400-normal-BHP8KeA6.woff2 +0 -0
  488. package/web/dist/assets/noto-emoji-7-400-normal-CtuKhtAZ.woff +0 -0
  489. package/web/dist/assets/noto-emoji-8-400-normal-DR49ZFe7.woff +0 -0
  490. package/web/dist/assets/noto-emoji-8-400-normal-Dvmkf6b2.woff2 +0 -0
  491. package/web/dist/assets/noto-emoji-9-400-normal-BeHJQ2iK.woff2 +0 -0
  492. package/web/dist/assets/noto-emoji-9-400-normal-BlXmCgeQ.woff +0 -0
  493. package/web/dist/assets/ordinal-Cboi1Yqb.js +1 -0
  494. package/web/dist/assets/pieDiagram-ADFJNKIX-C45wSpld.js +30 -0
  495. package/web/dist/assets/quadrantDiagram-AYHSOK5B-tv-_fe-W.js +7 -0
  496. package/web/dist/assets/reduce-CoLNNlNb.js +1 -0
  497. package/web/dist/assets/requirementDiagram-UZGBJVZJ-Dn6PDfkL.js +64 -0
  498. package/web/dist/assets/sankeyDiagram-TZEHDZUN-CbXTZAsG.js +10 -0
  499. package/web/dist/assets/sequenceDiagram-WL72ISMW-B-o1CUJ5.js +145 -0
  500. package/web/dist/assets/stateDiagram-FKZM4ZOC-hzrupXQi.js +1 -0
  501. package/web/dist/assets/stateDiagram-v2-4FDKWEC3-DN-c2M96.js +1 -0
  502. package/web/dist/assets/timeline-definition-IT6M3QCI-R5SP9GDo.js +61 -0
  503. package/web/dist/assets/treemap-KMMF4GRG-Pg9KlUOt.js +128 -0
  504. package/web/dist/assets/xychartDiagram-PRI3JC2R-C3vbJhd1.js +7 -0
  505. package/web/dist/favicon.svg +13 -0
  506. package/web/dist/index.html +17 -0
  507. package//351/205/215/347/275/256/346/226/271/345/274/217.md +330 -0
@@ -0,0 +1,260 @@
1
+ ---
2
+ name: bootstrapping-workspace
3
+ description: Use when workspace is created and needs capability selection and info node setup. Guides ZeroWorkspace startup flow after workspace_init.
4
+ ---
5
+
6
+ # Bootstrapping Workspace
7
+
8
+ ## Announcement (MANDATORY)
9
+
10
+ Before executing this skill, you MUST announce to the user:
11
+
12
+ 「我将使用 **工作区启动** 技能来初始化工作区、选择能力、创建信息节点。」
13
+
14
+ This creates a commitment checkpoint. Proceed only after announcing.
15
+
16
+ ## Core Flow
17
+
18
+ ```
19
+ workspace_init(scenario=?)
20
+
21
+ capability_list() ← Get recommended capabilities
22
+
23
+ capability_select(infoType=?, selected=[...]) ← Create info node + capability children
24
+
25
+ Execute capability tasks
26
+ ```
27
+
28
+ ## SOP
29
+
30
+ ### 1. Tell User WebUI URL
31
+
32
+ The `webUrl` from workspace_init is the visualization interface. **MUST tell user**.
33
+
34
+ ```
35
+ webUrl: http://localhost:port/workspace/ws-xxx
36
+ ```
37
+
38
+ ### 2. Call capability_list
39
+
40
+ Get recommended capabilities for the scenario:
41
+
42
+ ```typescript
43
+ capability_list({ scenario: "feature" }) // Pass scenario type
44
+ ```
45
+
46
+ **Returns**:
47
+ - `basePack`: Required capabilities (**ALL must be selected**)
48
+ - `optionalPack`: Optional capabilities (user chooses)
49
+
50
+ ### 3. Show User and Ask for Selection
51
+
52
+ **MUST** show capability list to user in natural dialogue:
53
+
54
+ **Template**:
55
+ ```
56
+ 当前任务是「{用户目标}」,属于 **{scenario}** 场景。
57
+
58
+ 我将执行以下能力:
59
+ - **{能力名}**: {在此任务语境下的具体作用}
60
+ - **{能力名}**: {在此任务语境下的具体作用}
61
+
62
+ 除此之外,还可以选择:
63
+ a. **{能力名}** - {语境下描述}
64
+ b. **{能力名}** - {语境下描述}
65
+ c. **{能力名}** - {语境下描述}
66
+
67
+ 💡 推荐:{基于具体任务的推荐理由}
68
+
69
+ 需要添加哪些?(输入序号如 a、ab,或回车跳过)
70
+ ```
71
+
72
+ **Example** (optimize scenario):
73
+ ```
74
+ 当前任务是「优化派发模式」,属于 **optimize** 场景。
75
+
76
+ 我将执行以下能力:
77
+ - **意图对齐**: 明确你想优化的具体方面和期望效果
78
+ - **上下文探索**: 分析当前派发模式的实现和依赖
79
+ - **度量分析**: 建立当前性能基准,量化优化效果
80
+
81
+ 除此之外,还可以选择:
82
+ a. **诊断分析** - 深入分析现有问题的根因
83
+ b. **方案设计** - 设计具体的优化方案
84
+ c. **验证策略** - 制定测试用例确保优化有效
85
+
86
+ 💡 推荐:b(方案设计),研究优化通常需要输出具体方案
87
+
88
+ 需要添加哪些?(输入序号如 a、ab,或回车跳过)
89
+ ```
90
+
91
+ **Rules**:
92
+ - basePack: 直接说"我将执行",不问用户
93
+ - optionalPack: 用 **abc 序号**,方便用户输入
94
+ - 描述: **根据任务语境定制**,不用通用描述
95
+ - 推荐: 基于具体任务给出理由
96
+ - **MUST** wait for user response before capability_select
97
+
98
+ ### 4. Call capability_select
99
+
100
+ Select capabilities and create info node:
101
+
102
+ ```typescript
103
+ capability_select({
104
+ workspaceId: "ws-xxx",
105
+ infoType: "info_collection", // or "info_summary"
106
+ selected: ["intent_alignment", "context_discovery"]
107
+ })
108
+ ```
109
+
110
+ **infoType Selection**:
111
+
112
+ | Type | Use When | Action |
113
+ |------|----------|--------|
114
+ | `info_collection` | Need active research: scan project, read docs | Read, explore, collect |
115
+ | `info_summary` | Have info to organize: extract from conversation | Summarize, extract |
116
+
117
+ ### 5. Execute Capability Tasks (CRITICAL)
118
+
119
+ **capability_select 返回 `actionRequired`,MUST 遵循其指示调用 Skill。**
120
+
121
+ ```
122
+ capability_select 返回
123
+
124
+ actionRequired: { type: "invoke_skill", skills: [...] }
125
+
126
+ Skill(aligning-intent) ← 第一个能力
127
+
128
+ node_transition(action="start")
129
+
130
+ 按 Skill SOP 执行
131
+
132
+ node_transition(action="complete")
133
+
134
+ Skill(discovering-context) ← 下一个能力
135
+
136
+ ...重复...
137
+ ```
138
+
139
+ **执行规则**:
140
+
141
+ | 步骤 | 动作 | 说明 |
142
+ |------|------|------|
143
+ | 1 | `Skill(xxx)` | 调用对应 Skill 获取 SOP |
144
+ | 2 | `node_transition(action="start")` | 启动节点 |
145
+ | 3 | 按 SOP 执行 | 遵循 Skill 的 SOP 步骤 |
146
+ | 4 | `node_transition(action="complete")` | 完成节点 |
147
+
148
+ **⚠️ 禁止事项**:
149
+ - **NEVER** 跳过 Skill 调用直接 node_transition start
150
+ - **NEVER** 在信息收集/总结阶段修改任何代码
151
+ - **NEVER** 在能力节点中执行 Write/Edit/Update 操作
152
+
153
+ **信息收集/总结阶段的职责边界**:
154
+
155
+ | 允许 | 禁止 |
156
+ |------|------|
157
+ | Read、Search、Grep、Glob | Write、Edit、Update |
158
+ | 分析代码、理解结构 | 修改代码、创建文件 |
159
+ | 记录发现到 conclusion | 直接实现功能 |
160
+ | 提出方案建议 | 执行方案 |
161
+
162
+ **为什么必须调用 Skill?**
163
+ - Skill 包含该能力的 SOP(标准操作流程)
164
+ - Skill 定义了正确的执行步骤和检查清单
165
+ - 不读 Skill = 不知道该能力的正确做法
166
+
167
+ ### 6. Continue Tracking in Workspace (CRITICAL)
168
+
169
+ **Workspace is for the ENTIRE task lifecycle, not just info collection.**
170
+
171
+ After info collection completes:
172
+
173
+ ```
174
+ Info collection done
175
+
176
+ Create planning/execution nodes for implementation
177
+
178
+ Use log_append to record progress
179
+
180
+ Complete nodes when tasks finish
181
+ ```
182
+
183
+ **Rules**:
184
+ - **MUST** create execution nodes for implementation tasks
185
+ - **MUST** use `log_append` for progress updates, NOT TodoWrite
186
+ - **NEVER** treat "info collection done" as "workspace usage done"
187
+ - Workspace nodes = visible progress + history + dispatchable
188
+
189
+ **Why this matters**:
190
+ - TodoWrite is local-only, invisible in WebUI
191
+ - Workspace nodes preserve full execution history
192
+ - User expects to see ALL progress in workspace
193
+
194
+ ## Scenario-Capability Mapping
195
+
196
+ | scenario | basePack | optionalPack |
197
+ |----------|----------|--------------|
198
+ | feature | intent_alignment, context_discovery | tech_research, solution_design, verification_strategy |
199
+ | debug | intent_alignment, context_discovery, diagnosis | solution_design, verification_strategy |
200
+ | optimize | intent_alignment, context_discovery, measurement_analysis | diagnosis, solution_design, verification_strategy |
201
+ | summary | intent_alignment, context_discovery | - |
202
+ | misc | intent_alignment | context_discovery, tech_research, measurement_analysis, diagnosis, solution_design, verification_strategy |
203
+
204
+ ## Mandatory Rules
205
+
206
+ 1. **NEVER skip capability_list** - Must get capability list first
207
+ 2. **NEVER manually node_create info node** - Must use capability_select
208
+ 3. **MUST tell user webUrl** - Only entry for user to view progress
209
+ 4. **MUST choose correct infoType** - Based on task nature
210
+ 5. **MUST show capabilities to user** - Ask for confirmation, never decide alone
211
+ 6. **MUST include all basePack** - selected must contain all basePack capabilities
212
+ 7. **MUST call Skill before node_transition start** - 每个能力节点启动前必须先调用对应 Skill
213
+ 8. **NEVER modify code in info phase** - 信息收集/总结阶段禁止 Write/Edit/Update
214
+ 9. **MUST follow Skill SOP** - Skill 定义了正确的执行流程,必须遵循
215
+
216
+ ## Red Flags
217
+
218
+ When these appear, you may be skipping proper bootstrapping:
219
+
220
+ 1. **Jump to task directly** - Start working without capability selection
221
+ 2. **Forget webUrl** - User has no way to view workspace progress
222
+ 3. **Skip user confirmation** - Decide capabilities without asking
223
+ 4. **Wrong infoType** - Always use info_collection when info_summary is appropriate
224
+ 5. **Partial basePack** - Missing required capabilities from basePack
225
+ 6. **Use TodoWrite after info collection** - Should create workspace nodes instead
226
+ 7. **No execution nodes for implementation** - Workspace abandoned after info phase
227
+ 8. **Skip Skill, direct node_transition** - 没调用 Skill 就直接启动节点 ⚠️ 严重错误
228
+ 9. **Write/Edit in info phase** - 在信息收集阶段修改代码 ⚠️ 严重错误
229
+ 10. **Ignore actionRequired** - capability_select 返回的 actionRequired 被忽略
230
+
231
+ ## Anti-Patterns
232
+
233
+ | Wrong | Right |
234
+ |-------|-------|
235
+ | node_create after workspace_init | capability_list first, then capability_select |
236
+ | Skip capabilities, start task | Follow capability SOP |
237
+ | Forget to tell webUrl | Tell user immediately |
238
+ | Always use info_collection | Choose collection/summary based on scenario |
239
+ | Decide capabilities yourself | Show user and ask |
240
+ | Only include partial basePack | Include ALL basePack |
241
+ | TodoWrite for implementation tasks | Create execution nodes in workspace |
242
+ | Abandon workspace after info collection | Continue with planning/execution nodes |
243
+ | node_transition start without Skill | Skill(xxx) first, then node_transition |
244
+ | Write/Edit in info_collection node | Only Read/Search, record to conclusion |
245
+ | Ignore actionRequired from capability_select | Follow actionRequired instructions exactly |
246
+
247
+ ## Common Rationalizations
248
+
249
+ | Excuse | Why Wrong | Correct Action |
250
+ |--------|-----------|----------------|
251
+ | "User knows what capabilities they need" | User may not know all options | MUST show capabilities and ask |
252
+ | "webUrl is in the output, user will see" | Output may be long, user may miss it | Explicitly tell user the webUrl |
253
+ | "info_collection is safer default" | Wrong type wastes effort | Match infoType to task nature |
254
+ | "basePack is just a suggestion" | basePack is REQUIRED, not optional | Include ALL basePack capabilities |
255
+ | "I'll skip capability selection to save time" | Skipping leads to incomplete setup | 30s setup saves confusion later |
256
+ | "Info collection is done, now just coding" | Workspace tracks full lifecycle | Create execution nodes for implementation |
257
+ | "TodoWrite is faster for tracking" | TodoWrite is invisible to user | Use workspace nodes + log_append |
258
+ | "I know what to do, don't need Skill" | Skill 定义了正确流程,你可能遗漏关键步骤 | 必须先调用 Skill 获取 SOP |
259
+ | "Just a quick fix while exploring" | 信息收集阶段禁止修改,会破坏职责边界 | 记录发现,创建执行节点后再修改 |
260
+ | "The change is obvious, no need for execution node" | 所有修改必须在执行节点中进行,确保可追踪 | 创建执行节点,按流程执行 |
@@ -0,0 +1,363 @@
1
+ ---
2
+ name: designing-solutions
3
+ description: Use when planning implementation approach for features or changes. Builds technical solutions, defines interfaces, data structures, and implementation paths.
4
+ ---
5
+
6
+ # Designing Solutions
7
+
8
+ ## Announcement (MANDATORY)
9
+
10
+ Before executing this skill, you MUST announce to the user:
11
+
12
+ 「我将使用 **方案设计** 技能来构建技术方案、定义接口和数据结构、规划实现路径。」
13
+
14
+ This creates a commitment checkpoint. Proceed only after announcing.
15
+
16
+ ## Core Thinking
17
+
18
+ **Architect** - Design before build. Good architecture enables good implementation.
19
+
20
+ **YAGNI Ruthlessly** - You Aren't Gonna Need It. Remove unnecessary features from all designs. Simpler is better.
21
+
22
+ **Incremental Validation** - Present design in sections, validate each before proceeding. Early correction beats late rework.
23
+
24
+ **Recording**: Conversation output is invisible to users. You MUST record to workspace node. Standard: "If context is wiped now, can you recall discussion details from conclusion alone?"
25
+
26
+ **Progressive Recording**: For complex designs, checkpoint after each major decision. `log_append` interface decisions before moving to data structures.
27
+
28
+ ## Typical Actions
29
+
30
+ - Define interfaces
31
+ - Design data structures
32
+ - Plan implementation steps
33
+
34
+ ## SOP
35
+
36
+ ### 1. Define Boundaries
37
+
38
+ **Goal**: Determine change scope and impact.
39
+
40
+ - **Change scope**: Which modules/files to modify?
41
+ - **Impact assessment**: Which callers affected?
42
+ - **Unchanged parts**: What explicitly won't change?
43
+ - **System boundary**: What system does/doesn't handle?
44
+
45
+ **Output**: Change scope list (files, modules)
46
+
47
+ **⏸️ User Validation**: Present boundaries to user. Ask: "这个变更范围对吗?有遗漏或需要排除的吗?" Wait for confirmation before proceeding.
48
+
49
+ ### 2. Interface Design
50
+
51
+ **Goal**: Define input/output contracts.
52
+
53
+ - **Public interfaces**:
54
+ - Function signatures (params, returns, exceptions)
55
+ - API endpoints (if any)
56
+ - Clear semantics, complete params
57
+ - **Module interfaces**:
58
+ - Internal module collaboration
59
+ - Call relationships, data passing
60
+ - **Backward compatibility**:
61
+ - Need to maintain compatibility?
62
+ - How to handle deprecated interfaces?
63
+
64
+ **Output**: Interface definitions (TypeScript/code examples)
65
+
66
+ **⚠️ Checkpoint**: After interface design, `log_append` the interface definitions before proceeding to data structures.
67
+
68
+ **⏸️ User Validation**: Present interfaces to user. Ask: "接口设计合理吗?参数和返回值符合预期吗?" Wait for confirmation before proceeding.
69
+
70
+ ### 3. Data Structure Design
71
+
72
+ **Goal**: Design core data models.
73
+
74
+ - **Core types**:
75
+ - Main interfaces/types/classes
76
+ - Field meanings and constraints
77
+ - **State management**:
78
+ - Where to store state?
79
+ - How to update state?
80
+ - **Data validation**:
81
+ - Required vs optional fields
82
+ - Value range validation
83
+
84
+ **Output**: Type definitions with comments
85
+
86
+ **⏸️ User Validation**: Present data structures to user. Ask: "数据结构设计可以吗?字段是否完整?" Wait for confirmation before proceeding.
87
+
88
+ ### 4. Implementation Plan
89
+
90
+ **Goal**: Define execution steps.
91
+
92
+ - **YAGNI check** (FIRST):
93
+ - What can be removed without breaking core functionality?
94
+ - Is this feature truly needed NOW, or "might be useful later"?
95
+ - Can we simplify without losing value?
96
+ - **Task breakdown**:
97
+ - Break into testable units
98
+ - Each step independently verifiable
99
+ - **Execution order**:
100
+ - Dependencies between steps
101
+ - Recommended execution sequence
102
+ - **Risk points**:
103
+ - Which steps are risky?
104
+ - What could go wrong?
105
+
106
+ **Output**: Numbered implementation steps (after YAGNI pruning)
107
+
108
+ **⏸️ User Validation**: Present implementation plan to user. Ask: "实现步骤清晰吗?顺序和风险点有问题吗?" Wait for confirmation before proceeding.
109
+
110
+ ### 4.5. Test & Observability Design (MANDATORY)
111
+
112
+ **Goal**: Define verification strategy and logging requirements BEFORE implementation.
113
+
114
+ #### Verification Strategy
115
+
116
+ For each implementation step, define HOW to verify it:
117
+
118
+ | Step | Verification | Format |
119
+ |------|--------------|--------|
120
+ | 核心功能 | 可运行的命令 | `[cmd] pytest tests/xxx.py` |
121
+ | UI 变更 | 手动验证步骤 | `[manual] 打开页面 → 检查显示` |
122
+ | 代码规范 | 代码检查 | `[check] 无 TODO/FIXME` |
123
+
124
+ **Critical questions**:
125
+ - **哪些功能必须有测试覆盖?** 核心业务逻辑、边界条件
126
+ - **测试放在哪里?** 现有测试目录结构
127
+ - **无测试框架时怎么办?** `[manual]` 或 `[check]` 替代
128
+
129
+ #### Logging Requirements
130
+
131
+ 定义实现中需要的日志点:
132
+
133
+ | 场景 | 日志需求 |
134
+ |------|----------|
135
+ | **关键流程** | 入口、出口、状态变更 |
136
+ | **错误场景** | 错误类型、上下文、恢复动作 |
137
+ | **调试信息** | 中间状态、参数值 |
138
+
139
+ **Critical questions**:
140
+ - **哪些操作需要日志?** 用户操作、系统事件、异常
141
+ - **日志级别?** debug/info/warn/error 分别用在哪里
142
+ - **日志内容?** 需要记录哪些上下文信息
143
+
144
+ **Output**: Verification table + Logging requirements
145
+
146
+ **⚠️ Iron Law**: NO IMPLEMENTATION STEP WITHOUT VERIFICATION METHOD
147
+
148
+ **⏸️ User Validation**: Present test & observability design. Ask: "验证方式和日志需求合理吗?" Wait for confirmation before proceeding.
149
+
150
+ ### 5. Record to Workspace (MANDATORY)
151
+
152
+ After design, MUST record to workspace node:
153
+
154
+ **Recording locations**:
155
+ | Content | Location | Tool |
156
+ |---------|----------|------|
157
+ | Key conclusions (brief) | conclusion | node_update |
158
+ | Scope, interfaces, steps | notes | node_update |
159
+ | Full design doc (>200 lines) | MEMO | memo_create + node_reference |
160
+
161
+ **NEVER hardcode MEMO IDs** in text like "见 MEMO#xxx". Use `node_reference` to link.
162
+
163
+ **Reference rules** (design tasks SHOULD include):
164
+ - Affected files/modules in scope
165
+ - Dependencies being relied upon
166
+ - Existing patterns being followed
167
+ - Core principle: references help reviewers understand context
168
+
169
+ **Conclusion template** (brief):
170
+ ```
171
+ [问题] + [方案概述] + [影响范围] + [步骤数]
172
+ ```
173
+
174
+ **Notes template** (detailed):
175
+ ```
176
+ **Problem**: [what to solve]
177
+ **Approach**: [high-level]
178
+ **Scope**: [files/modules]
179
+ **Key Interfaces**:
180
+ - function(param): Return
181
+ **Key Types**:
182
+ - TypeName { field: type }
183
+ **Implementation Steps**:
184
+ 1. Step 1 - [verification]
185
+ 2. Step 2 - [verification]
186
+ **Risks**: [identified risks]
187
+ ```
188
+
189
+ **Output**: node_update called with conclusion + notes
190
+
191
+ ### 6. Present to User (MANDATORY)
192
+
193
+ After recording, MUST present design to user:
194
+
195
+ 1. **Output summary**: Show design using Output Template
196
+ 2. **Wait for confirmation**: Ask user if design approach is acceptable
197
+ 3. **NEVER proceed directly**: Do NOT start implementation without user approval
198
+
199
+ **Output**: Design presented, user confirmation received
200
+
201
+ ## Checklist
202
+
203
+ ### Boundaries
204
+ - [ ] Change scope identified
205
+ - [ ] Impact assessed
206
+ - [ ] Unchanged parts documented
207
+ - [ ] System boundaries clear
208
+
209
+ ### Interfaces
210
+ - [ ] Public interfaces defined
211
+ - [ ] Module interfaces defined
212
+ - [ ] Compatibility considered
213
+
214
+ ### Data Structures
215
+ - [ ] Core types designed
216
+ - [ ] State management planned
217
+ - [ ] Validation rules defined
218
+
219
+ ### Implementation
220
+ - [ ] **YAGNI applied**: Unnecessary features removed
221
+ - [ ] Tasks broken down
222
+ - [ ] Order determined
223
+ - [ ] Risks identified
224
+
225
+ ### Test & Observability (MANDATORY)
226
+ - [ ] **Verification defined**: Each step has `[cmd]`, `[manual]`, or `[check]`
227
+ - [ ] **Critical tests identified**: Core logic has test coverage plan
228
+ - [ ] **Logging planned**: Key flows have logging requirements
229
+ - [ ] **Error logging**: Error scenarios have context capture
230
+
231
+ ### Incremental Validation (MANDATORY)
232
+ - [ ] **Boundaries confirmed**: User validated change scope
233
+ - [ ] **Interfaces confirmed**: User validated interface design
234
+ - [ ] **Data structures confirmed**: User validated type definitions
235
+ - [ ] **Plan confirmed**: User validated implementation steps
236
+ - [ ] **Test & observability confirmed**: User validated verification strategy and logging
237
+
238
+ ### Recording (MANDATORY)
239
+ - [ ] **Conclusion written**: Brief summary in node conclusion
240
+ - [ ] **Notes written**: Scope, interfaces, steps in node notes
241
+ - [ ] **MEMO linked**: Long content in MEMO, linked via node_reference (not hardcoded ID)
242
+ - [ ] **Wipe test**: If context wiped now, can recall details from recorded content?
243
+
244
+ ### Long Content Protection
245
+ - [ ] **Checkpoint hit**: Logged interface design before data structures
246
+ - [ ] **Scope referenced**: Affected files/modules listed
247
+ - [ ] **Dependencies noted**: Key dependencies documented
248
+
249
+ ## Output Template
250
+
251
+ ```markdown
252
+ ### Solution Overview
253
+ **Problem**: [What to solve]
254
+ **Approach**: [High-level approach]
255
+
256
+ ### Boundaries
257
+ **Change scope**:
258
+ - [File 1]: [Change description]
259
+ - [File 2]: [Change description]
260
+
261
+ **Impact**: [Affected modules/callers]
262
+ **Not changing**: [Explicit exclusions]
263
+
264
+ ### Interfaces
265
+
266
+ #### Public Interface
267
+ ```typescript
268
+ function example(param: Type): ReturnType
269
+ ```
270
+
271
+ #### Module Interface
272
+ [Internal contracts]
273
+
274
+ ### Data Structures
275
+
276
+ ```typescript
277
+ interface CoreType {
278
+ field1: string; // [description]
279
+ field2: number; // [description]
280
+ }
281
+ ```
282
+
283
+ ### Implementation Plan
284
+
285
+ 1. **Step 1**: [Description]
286
+ - Files: [list]
287
+ - Verification: [how to verify]
288
+
289
+ 2. **Step 2**: [Description]
290
+ - Files: [list]
291
+ - Verification: [how to verify]
292
+
293
+ ### Test & Observability
294
+
295
+ #### Verification Strategy
296
+ | Step | Verification | Method |
297
+ |------|--------------|--------|
298
+ | Step 1 | [what to verify] | `[cmd] xxx` |
299
+ | Step 2 | [what to verify] | `[manual] xxx` |
300
+
301
+ #### Logging Requirements
302
+ | Flow | Log Points | Level |
303
+ |------|------------|-------|
304
+ | [operation] | entry, exit, error | info/error |
305
+
306
+ ### Risks
307
+ - **Risk 1**: [Description] - Mitigation: [approach]
308
+ ```
309
+
310
+ ## Red Flags
311
+
312
+ 1. **No boundaries** - Start coding without scoping
313
+ 2. **Interface changes mid-way** - Design interfaces after implementation
314
+ 3. **Missing states** - Forget state management design
315
+ 4. **No breakdown** - Giant task without steps
316
+ 5. **Silent execution** - Complete design, then immediately start implementing without showing user
317
+ 6. **Skip checkpoint** - Complete complex design without intermediate logging
318
+ 7. **Skip incremental validation** - Output entire design without pausing for user feedback at each step
319
+ 8. **Batch presentation** - Present all sections at once instead of section by section
320
+ 9. **YAGNI violation** - Adding "might be useful" features, over-engineering for hypothetical future needs
321
+ 10. **No verification plan** - Implementation steps without `[cmd]`/`[manual]`/`[check]` methods
322
+ 11. **No logging design** - Code changes without considering observability needs
323
+
324
+ ## Mandatory Rules
325
+
326
+ 1. **MUST define boundaries first** - NEVER start coding without knowing change scope
327
+ 2. **MUST design interfaces before implementation** - Changing interfaces mid-way causes rework
328
+ 3. **MUST check existing patterns** - Design must fit existing codebase, not fight it
329
+ 4. **MUST break down into steps** - No giant tasks without clear milestones
330
+ 5. **NEVER create hidden dependencies** - All coupling must be explicit and documented
331
+ 6. **MUST present before proceed** - After design, NEVER start implementation directly. Present design, wait for user approval
332
+ 7. **MUST validate incrementally** - Present each section, get user confirmation before next section. Early correction beats late rework
333
+ 8. **MUST apply YAGNI** - Before finalizing design, ask "What can we remove?" Simpler designs are better designs
334
+ 9. **MUST define verification for each step** - Every implementation step needs `[cmd]`, `[manual]`, or `[check]`
335
+ 10. **MUST plan logging** - Key operations, errors, and state changes need log points
336
+
337
+ ## Anti-Patterns
338
+
339
+ | Pattern | Wrong | Right |
340
+ |---------|-------|-------|
341
+ | **Code first** | Jump into coding | Design interfaces first |
342
+ | **Over-design** | Perfect design for simple task | Match design effort to complexity |
343
+ | **Ignore existing** | Design without checking existing code | Understand existing patterns first |
344
+ | **Hidden coupling** | Create implicit dependencies | Make dependencies explicit |
345
+ | **Batch dump** | Output entire design then ask "OK?" | Present section by section, validate each |
346
+ | **Test afterthought** | "We'll figure out testing later" | Define verification in design phase |
347
+ | **Silent code** | No logs, debug by guessing | Plan log points for key operations |
348
+
349
+ ## Common Rationalizations
350
+
351
+ | Excuse | Why Wrong | Correct Action |
352
+ |--------|-----------|----------------|
353
+ | "This is simple, no design needed" | Simple tasks still need scope definition | Define boundaries, even briefly |
354
+ | "I'll refine the interface as I go" | Interface changes cascade to all callers | Design interface upfront |
355
+ | "I know the codebase well enough" | Memory is unreliable, patterns may have changed | Check existing code before designing |
356
+ | "One big task is faster than splitting" | Big tasks fail more, are harder to verify | Break into testable units |
357
+ | "Design takes too long" | No design = more rework later | 30 min design saves 3 hour fixes |
358
+ | "Asking after each section is slow" | Late correction costs 10x early correction | Validate incrementally, save rework |
359
+ | "User will see the full picture better" | User drowns in details, misses problems | Small sections are easier to review |
360
+ | "We might need this later" | 90% of "later" never comes | Build what's needed NOW, extend later |
361
+ | "It's easy to add while we're here" | Easy to add = easy to add later | YAGNI - don't add until needed |
362
+ | "Testing is the executor's job" | Executor can't test what wasn't designed | Define verification in design phase |
363
+ | "Logs clutter the code" | Silent code = blind debugging | Strategic logs save hours of debugging |