@liangjie559567/ultrapower 5.5.12 → 5.5.13

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 (489) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/.claude-plugin/plugin.json +2 -2
  3. package/LICENSE +21 -21
  4. package/bridge/gyoshu_bridge.py +846 -846
  5. package/bridge/mcp-server.cjs +145 -38
  6. package/commands/wizard.md +5 -0
  7. package/dist/agents/__tests__/agent-wrapper.test.d.ts +2 -0
  8. package/dist/agents/__tests__/agent-wrapper.test.d.ts.map +1 -0
  9. package/dist/agents/__tests__/agent-wrapper.test.js +37 -0
  10. package/dist/agents/__tests__/agent-wrapper.test.js.map +1 -0
  11. package/dist/agents/__tests__/timeout-config.test.d.ts +2 -0
  12. package/dist/agents/__tests__/timeout-config.test.d.ts.map +1 -0
  13. package/dist/agents/__tests__/timeout-config.test.js +35 -0
  14. package/dist/agents/__tests__/timeout-config.test.js.map +1 -0
  15. package/dist/agents/__tests__/timeout-manager.test.d.ts +2 -0
  16. package/dist/agents/__tests__/timeout-manager.test.d.ts.map +1 -0
  17. package/dist/agents/__tests__/timeout-manager.test.js +37 -0
  18. package/dist/agents/__tests__/timeout-manager.test.js.map +1 -0
  19. package/dist/agents/agent-wrapper.d.ts +22 -0
  20. package/dist/agents/agent-wrapper.d.ts.map +1 -0
  21. package/dist/agents/agent-wrapper.js +51 -0
  22. package/dist/agents/agent-wrapper.js.map +1 -0
  23. package/dist/agents/coordinator-deprecated.d.ts +18 -0
  24. package/dist/agents/coordinator-deprecated.d.ts.map +1 -0
  25. package/dist/agents/coordinator-deprecated.js +38 -0
  26. package/dist/agents/coordinator-deprecated.js.map +1 -0
  27. package/dist/agents/index.d.ts +3 -0
  28. package/dist/agents/index.d.ts.map +1 -1
  29. package/dist/agents/index.js +4 -0
  30. package/dist/agents/index.js.map +1 -1
  31. package/dist/agents/timeout-config.d.ts +19 -0
  32. package/dist/agents/timeout-config.d.ts.map +1 -0
  33. package/dist/agents/timeout-config.js +57 -0
  34. package/dist/agents/timeout-config.js.map +1 -0
  35. package/dist/agents/timeout-manager.d.ts +30 -0
  36. package/dist/agents/timeout-manager.d.ts.map +1 -0
  37. package/dist/agents/timeout-manager.js +47 -0
  38. package/dist/agents/timeout-manager.js.map +1 -0
  39. package/dist/analytics/analytics-summary.d.ts.map +1 -1
  40. package/dist/analytics/analytics-summary.js +7 -1
  41. package/dist/analytics/analytics-summary.js.map +1 -1
  42. package/dist/analytics/metrics-collector.d.ts.map +1 -1
  43. package/dist/analytics/metrics-collector.js +9 -1
  44. package/dist/analytics/metrics-collector.js.map +1 -1
  45. package/dist/analytics/query-engine.d.ts.map +1 -1
  46. package/dist/analytics/query-engine.js +21 -3
  47. package/dist/analytics/query-engine.js.map +1 -1
  48. package/dist/analytics/token-tracker.js +3 -3
  49. package/dist/analytics/token-tracker.js.map +1 -1
  50. package/dist/analytics/transcript-scanner.d.ts.map +1 -1
  51. package/dist/analytics/transcript-scanner.js +1 -0
  52. package/dist/analytics/transcript-scanner.js.map +1 -1
  53. package/dist/audit/logger.d.ts +28 -0
  54. package/dist/audit/logger.d.ts.map +1 -0
  55. package/dist/audit/logger.js +78 -0
  56. package/dist/audit/logger.js.map +1 -0
  57. package/dist/audit/verify-cli.d.ts +2 -0
  58. package/dist/audit/verify-cli.d.ts.map +1 -0
  59. package/dist/audit/verify-cli.js +10 -0
  60. package/dist/audit/verify-cli.js.map +1 -0
  61. package/dist/core/hud-config.d.ts +19 -0
  62. package/dist/core/hud-config.d.ts.map +1 -0
  63. package/dist/core/hud-config.js +6 -0
  64. package/dist/core/hud-config.js.map +1 -0
  65. package/dist/core/job-types.d.ts +22 -0
  66. package/dist/core/job-types.d.ts.map +1 -0
  67. package/dist/core/job-types.js +6 -0
  68. package/dist/core/job-types.js.map +1 -0
  69. package/dist/features/diagnostics/error-matcher.d.ts +12 -0
  70. package/dist/features/diagnostics/error-matcher.d.ts.map +1 -0
  71. package/dist/features/diagnostics/error-matcher.js +41 -0
  72. package/dist/features/diagnostics/error-matcher.js.map +1 -0
  73. package/dist/features/diagnostics/index.d.ts +3 -0
  74. package/dist/features/diagnostics/index.d.ts.map +1 -0
  75. package/dist/features/diagnostics/index.js +3 -0
  76. package/dist/features/diagnostics/index.js.map +1 -0
  77. package/dist/features/diagnostics/solution-suggester.d.ts +12 -0
  78. package/dist/features/diagnostics/solution-suggester.d.ts.map +1 -0
  79. package/dist/features/diagnostics/solution-suggester.js +46 -0
  80. package/dist/features/diagnostics/solution-suggester.js.map +1 -0
  81. package/dist/features/diagnostics/types.d.ts +25 -0
  82. package/dist/features/diagnostics/types.d.ts.map +1 -0
  83. package/dist/features/diagnostics/types.js +5 -0
  84. package/dist/features/diagnostics/types.js.map +1 -0
  85. package/dist/features/state-manager/__tests__/cache.test.js +17 -17
  86. package/dist/features/state-manager/__tests__/cache.test.js.map +1 -1
  87. package/dist/features/state-manager/__tests__/encryption-performance.test.d.ts +2 -0
  88. package/dist/features/state-manager/__tests__/encryption-performance.test.d.ts.map +1 -0
  89. package/dist/features/state-manager/__tests__/encryption-performance.test.js +42 -0
  90. package/dist/features/state-manager/__tests__/encryption-performance.test.js.map +1 -0
  91. package/dist/features/state-manager/__tests__/encryption.test.d.ts +2 -0
  92. package/dist/features/state-manager/__tests__/encryption.test.d.ts.map +1 -0
  93. package/dist/features/state-manager/__tests__/encryption.test.js +68 -0
  94. package/dist/features/state-manager/__tests__/encryption.test.js.map +1 -0
  95. package/dist/features/state-manager/encryption.d.ts +24 -0
  96. package/dist/features/state-manager/encryption.d.ts.map +1 -0
  97. package/dist/features/state-manager/encryption.js +86 -0
  98. package/dist/features/state-manager/encryption.js.map +1 -0
  99. package/dist/features/state-manager/index.d.ts +4 -0
  100. package/dist/features/state-manager/index.d.ts.map +1 -1
  101. package/dist/features/state-manager/index.js +94 -6
  102. package/dist/features/state-manager/index.js.map +1 -1
  103. package/dist/features/state-manager/tiered-writer.d.ts +44 -0
  104. package/dist/features/state-manager/tiered-writer.d.ts.map +1 -0
  105. package/dist/features/state-manager/tiered-writer.js +76 -0
  106. package/dist/features/state-manager/tiered-writer.js.map +1 -0
  107. package/dist/features/state-manager/wal.d.ts +21 -0
  108. package/dist/features/state-manager/wal.d.ts.map +1 -0
  109. package/dist/features/state-manager/wal.js +75 -0
  110. package/dist/features/state-manager/wal.js.map +1 -0
  111. package/dist/features/task-templates/index.d.ts +13 -0
  112. package/dist/features/task-templates/index.d.ts.map +1 -0
  113. package/dist/features/task-templates/index.js +31 -0
  114. package/dist/features/task-templates/index.js.map +1 -0
  115. package/dist/features/task-templates/wizard-integration.d.ts +15 -0
  116. package/dist/features/task-templates/wizard-integration.d.ts.map +1 -0
  117. package/dist/features/task-templates/wizard-integration.js +27 -0
  118. package/dist/features/task-templates/wizard-integration.js.map +1 -0
  119. package/dist/features/wizard/__tests__/engine.test.d.ts +2 -0
  120. package/dist/features/wizard/__tests__/engine.test.d.ts.map +1 -0
  121. package/dist/features/wizard/__tests__/engine.test.js +78 -0
  122. package/dist/features/wizard/__tests__/engine.test.js.map +1 -0
  123. package/dist/features/wizard/__tests__/recommendation-engine.test.d.ts +2 -0
  124. package/dist/features/wizard/__tests__/recommendation-engine.test.d.ts.map +1 -0
  125. package/dist/features/wizard/__tests__/recommendation-engine.test.js +43 -0
  126. package/dist/features/wizard/__tests__/recommendation-engine.test.js.map +1 -0
  127. package/dist/features/wizard/engine.d.ts +15 -0
  128. package/dist/features/wizard/engine.d.ts.map +1 -0
  129. package/dist/features/wizard/engine.js +74 -0
  130. package/dist/features/wizard/engine.js.map +1 -0
  131. package/dist/features/wizard/index.d.ts +8 -0
  132. package/dist/features/wizard/index.d.ts.map +1 -0
  133. package/dist/features/wizard/index.js +7 -0
  134. package/dist/features/wizard/index.js.map +1 -0
  135. package/dist/features/wizard/questions.d.ts +6 -0
  136. package/dist/features/wizard/questions.d.ts.map +1 -0
  137. package/dist/features/wizard/questions.js +64 -0
  138. package/dist/features/wizard/questions.js.map +1 -0
  139. package/dist/features/wizard/recommendation-engine.d.ts +6 -0
  140. package/dist/features/wizard/recommendation-engine.d.ts.map +1 -0
  141. package/dist/features/wizard/recommendation-engine.js +33 -0
  142. package/dist/features/wizard/recommendation-engine.js.map +1 -0
  143. package/dist/features/wizard/types.d.ts +23 -0
  144. package/dist/features/wizard/types.d.ts.map +1 -0
  145. package/dist/features/wizard/types.js +5 -0
  146. package/dist/features/wizard/types.js.map +1 -0
  147. package/dist/features/workflow-recommender/context-analyzer.d.ts +6 -0
  148. package/dist/features/workflow-recommender/context-analyzer.d.ts.map +1 -0
  149. package/dist/features/workflow-recommender/context-analyzer.js +20 -0
  150. package/dist/features/workflow-recommender/context-analyzer.js.map +1 -0
  151. package/dist/features/workflow-recommender/index.d.ts +8 -0
  152. package/dist/features/workflow-recommender/index.d.ts.map +1 -0
  153. package/dist/features/workflow-recommender/index.js +7 -0
  154. package/dist/features/workflow-recommender/index.js.map +1 -0
  155. package/dist/features/workflow-recommender/intent-classifier.d.ts +6 -0
  156. package/dist/features/workflow-recommender/intent-classifier.d.ts.map +1 -0
  157. package/dist/features/workflow-recommender/intent-classifier.js +24 -0
  158. package/dist/features/workflow-recommender/intent-classifier.js.map +1 -0
  159. package/dist/features/workflow-recommender/recommendation-engine.d.ts +6 -0
  160. package/dist/features/workflow-recommender/recommendation-engine.d.ts.map +1 -0
  161. package/dist/features/workflow-recommender/recommendation-engine.js +110 -0
  162. package/dist/features/workflow-recommender/recommendation-engine.js.map +1 -0
  163. package/dist/features/workflow-recommender/types.d.ts +20 -0
  164. package/dist/features/workflow-recommender/types.d.ts.map +1 -0
  165. package/dist/features/workflow-recommender/types.js +5 -0
  166. package/dist/features/workflow-recommender/types.js.map +1 -0
  167. package/dist/hooks/__tests__/bridge-normalize.test.d.ts +2 -0
  168. package/dist/hooks/__tests__/bridge-normalize.test.d.ts.map +1 -0
  169. package/dist/hooks/__tests__/bridge-normalize.test.js +90 -0
  170. package/dist/hooks/__tests__/bridge-normalize.test.js.map +1 -0
  171. package/dist/hooks/__tests__/bridge-security.test.js +23 -41
  172. package/dist/hooks/__tests__/bridge-security.test.js.map +1 -1
  173. package/dist/hooks/auto-slash-command/__tests__/detector.test.d.ts +2 -0
  174. package/dist/hooks/auto-slash-command/__tests__/detector.test.d.ts.map +1 -0
  175. package/dist/hooks/auto-slash-command/__tests__/detector.test.js +70 -0
  176. package/dist/hooks/auto-slash-command/__tests__/detector.test.js.map +1 -0
  177. package/dist/hooks/auto-slash-command/__tests__/executor.test.d.ts +2 -0
  178. package/dist/hooks/auto-slash-command/__tests__/executor.test.d.ts.map +1 -0
  179. package/dist/hooks/auto-slash-command/__tests__/executor.test.js +55 -0
  180. package/dist/hooks/auto-slash-command/__tests__/executor.test.js.map +1 -0
  181. package/dist/hooks/auto-slash-command/__tests__/index.test.d.ts +2 -0
  182. package/dist/hooks/auto-slash-command/__tests__/index.test.d.ts.map +1 -0
  183. package/dist/hooks/auto-slash-command/__tests__/index.test.js +50 -0
  184. package/dist/hooks/auto-slash-command/__tests__/index.test.js.map +1 -0
  185. package/dist/hooks/autopilot/__tests__/prompts.test.js +19 -1
  186. package/dist/hooks/autopilot/__tests__/prompts.test.js.map +1 -1
  187. package/dist/hooks/autopilot/enforcement.d.ts +1 -1
  188. package/dist/hooks/autopilot/enforcement.d.ts.map +1 -1
  189. package/dist/hooks/autopilot/enforcement.js +1 -1
  190. package/dist/hooks/autopilot/enforcement.js.map +1 -1
  191. package/dist/hooks/bridge-normalize.d.ts +43 -3
  192. package/dist/hooks/bridge-normalize.d.ts.map +1 -1
  193. package/dist/hooks/bridge-normalize.js +110 -15
  194. package/dist/hooks/bridge-normalize.js.map +1 -1
  195. package/dist/hooks/bridge-types.d.ts +48 -0
  196. package/dist/hooks/bridge-types.d.ts.map +1 -0
  197. package/dist/hooks/bridge-types.js +6 -0
  198. package/dist/hooks/bridge-types.js.map +1 -0
  199. package/dist/hooks/bridge.d.ts +1 -43
  200. package/dist/hooks/bridge.d.ts.map +1 -1
  201. package/dist/hooks/bridge.js +18 -2
  202. package/dist/hooks/bridge.js.map +1 -1
  203. package/dist/hooks/dependency-analyzer.d.ts +32 -0
  204. package/dist/hooks/dependency-analyzer.d.ts.map +1 -0
  205. package/dist/hooks/dependency-analyzer.js +199 -0
  206. package/dist/hooks/dependency-analyzer.js.map +1 -0
  207. package/dist/hooks/index.d.ts +2 -1
  208. package/dist/hooks/index.d.ts.map +1 -1
  209. package/dist/hooks/index.js.map +1 -1
  210. package/dist/hooks/learner/__tests__/detector.test.d.ts +2 -0
  211. package/dist/hooks/learner/__tests__/detector.test.d.ts.map +1 -0
  212. package/dist/hooks/learner/__tests__/detector.test.js +170 -0
  213. package/dist/hooks/learner/__tests__/detector.test.js.map +1 -0
  214. package/dist/hooks/learner/__tests__/index.test.d.ts +2 -0
  215. package/dist/hooks/learner/__tests__/index.test.d.ts.map +1 -0
  216. package/dist/hooks/learner/__tests__/index.test.js +48 -0
  217. package/dist/hooks/learner/__tests__/index.test.js.map +1 -0
  218. package/dist/hooks/learner/__tests__/matcher.test.d.ts +2 -0
  219. package/dist/hooks/learner/__tests__/matcher.test.d.ts.map +1 -0
  220. package/dist/hooks/learner/__tests__/matcher.test.js +114 -0
  221. package/dist/hooks/learner/__tests__/matcher.test.js.map +1 -0
  222. package/dist/hooks/learner/__tests__/promotion.test.d.ts +2 -0
  223. package/dist/hooks/learner/__tests__/promotion.test.d.ts.map +1 -0
  224. package/dist/hooks/learner/__tests__/promotion.test.js +146 -0
  225. package/dist/hooks/learner/__tests__/promotion.test.js.map +1 -0
  226. package/dist/hooks/learner/__tests__/validator.test.d.ts +2 -0
  227. package/dist/hooks/learner/__tests__/validator.test.d.ts.map +1 -0
  228. package/dist/hooks/learner/__tests__/validator.test.js +123 -0
  229. package/dist/hooks/learner/__tests__/validator.test.js.map +1 -0
  230. package/dist/hooks/learner/__tests__/writer.test.d.ts +2 -0
  231. package/dist/hooks/learner/__tests__/writer.test.d.ts.map +1 -0
  232. package/dist/hooks/learner/__tests__/writer.test.js +141 -0
  233. package/dist/hooks/learner/__tests__/writer.test.js.map +1 -0
  234. package/dist/hooks/learner/detection-hook.js +2 -2
  235. package/dist/hooks/learner/detection-hook.js.map +1 -1
  236. package/dist/hooks/parallel-executor.d.ts +24 -0
  237. package/dist/hooks/parallel-executor.d.ts.map +1 -0
  238. package/dist/hooks/parallel-executor.js +82 -0
  239. package/dist/hooks/parallel-executor.js.map +1 -0
  240. package/dist/hooks/persistent-mode/index.d.ts +2 -21
  241. package/dist/hooks/persistent-mode/index.d.ts.map +1 -1
  242. package/dist/hooks/persistent-mode/index.js +4 -85
  243. package/dist/hooks/persistent-mode/index.js.map +1 -1
  244. package/dist/hooks/persistent-mode/tool-error.d.ts +15 -0
  245. package/dist/hooks/persistent-mode/tool-error.d.ts.map +1 -0
  246. package/dist/hooks/persistent-mode/tool-error.js +80 -0
  247. package/dist/hooks/persistent-mode/tool-error.js.map +1 -0
  248. package/dist/hooks/pre-compact/index.d.ts.map +1 -1
  249. package/dist/hooks/pre-compact/index.js +0 -1
  250. package/dist/hooks/pre-compact/index.js.map +1 -1
  251. package/dist/hooks/project-memory/learner.d.ts +13 -1
  252. package/dist/hooks/project-memory/learner.d.ts.map +1 -1
  253. package/dist/hooks/project-memory/learner.js +24 -12
  254. package/dist/hooks/project-memory/learner.js.map +1 -1
  255. package/dist/hooks/race-detector.d.ts +51 -0
  256. package/dist/hooks/race-detector.d.ts.map +1 -0
  257. package/dist/hooks/race-detector.js +121 -0
  258. package/dist/hooks/race-detector.js.map +1 -0
  259. package/dist/hooks/ralph/__tests__/loop.test.d.ts +2 -0
  260. package/dist/hooks/ralph/__tests__/loop.test.d.ts.map +1 -0
  261. package/dist/hooks/ralph/__tests__/loop.test.js +268 -0
  262. package/dist/hooks/ralph/__tests__/loop.test.js.map +1 -0
  263. package/dist/hooks/ralph/__tests__/prd.test.d.ts +2 -0
  264. package/dist/hooks/ralph/__tests__/prd.test.d.ts.map +1 -0
  265. package/dist/hooks/ralph/__tests__/prd.test.js +197 -0
  266. package/dist/hooks/ralph/__tests__/prd.test.js.map +1 -0
  267. package/dist/hooks/ralph/__tests__/progress.test.d.ts +2 -0
  268. package/dist/hooks/ralph/__tests__/progress.test.d.ts.map +1 -0
  269. package/dist/hooks/ralph/__tests__/progress.test.js +120 -0
  270. package/dist/hooks/ralph/__tests__/progress.test.js.map +1 -0
  271. package/dist/hooks/ralph/__tests__/verifier.test.d.ts +2 -0
  272. package/dist/hooks/ralph/__tests__/verifier.test.d.ts.map +1 -0
  273. package/dist/hooks/ralph/__tests__/verifier.test.js +75 -0
  274. package/dist/hooks/ralph/__tests__/verifier.test.js.map +1 -0
  275. package/dist/hooks/recovery/__tests__/context-window.test.d.ts +2 -0
  276. package/dist/hooks/recovery/__tests__/context-window.test.d.ts.map +1 -0
  277. package/dist/hooks/recovery/__tests__/context-window.test.js +131 -0
  278. package/dist/hooks/recovery/__tests__/context-window.test.js.map +1 -0
  279. package/dist/hooks/recovery/__tests__/edit-error.test.d.ts +2 -0
  280. package/dist/hooks/recovery/__tests__/edit-error.test.d.ts.map +1 -0
  281. package/dist/hooks/recovery/__tests__/edit-error.test.js +88 -0
  282. package/dist/hooks/recovery/__tests__/edit-error.test.js.map +1 -0
  283. package/dist/hooks/recovery/__tests__/index.test.d.ts +2 -0
  284. package/dist/hooks/recovery/__tests__/index.test.d.ts.map +1 -0
  285. package/dist/hooks/recovery/__tests__/index.test.js +270 -0
  286. package/dist/hooks/recovery/__tests__/index.test.js.map +1 -0
  287. package/dist/hooks/recovery/__tests__/session-recovery.test.d.ts +2 -0
  288. package/dist/hooks/recovery/__tests__/session-recovery.test.d.ts.map +1 -0
  289. package/dist/hooks/recovery/__tests__/session-recovery.test.js +129 -0
  290. package/dist/hooks/recovery/__tests__/session-recovery.test.js.map +1 -0
  291. package/dist/hooks/recovery/__tests__/storage.test.d.ts +2 -0
  292. package/dist/hooks/recovery/__tests__/storage.test.d.ts.map +1 -0
  293. package/dist/hooks/recovery/__tests__/storage.test.js +549 -0
  294. package/dist/hooks/recovery/__tests__/storage.test.js.map +1 -0
  295. package/dist/hooks/rules-injector/__tests__/finder.test.d.ts +2 -0
  296. package/dist/hooks/rules-injector/__tests__/finder.test.d.ts.map +1 -0
  297. package/dist/hooks/rules-injector/__tests__/finder.test.js +68 -0
  298. package/dist/hooks/rules-injector/__tests__/finder.test.js.map +1 -0
  299. package/dist/hooks/rules-injector/__tests__/index.test.d.ts +2 -0
  300. package/dist/hooks/rules-injector/__tests__/index.test.d.ts.map +1 -0
  301. package/dist/hooks/rules-injector/__tests__/index.test.js +58 -0
  302. package/dist/hooks/rules-injector/__tests__/index.test.js.map +1 -0
  303. package/dist/hooks/rules-injector/__tests__/matcher.test.d.ts +2 -0
  304. package/dist/hooks/rules-injector/__tests__/matcher.test.d.ts.map +1 -0
  305. package/dist/hooks/rules-injector/__tests__/matcher.test.js +86 -0
  306. package/dist/hooks/rules-injector/__tests__/matcher.test.js.map +1 -0
  307. package/dist/hooks/rules-injector/__tests__/parser.test.d.ts +2 -0
  308. package/dist/hooks/rules-injector/__tests__/parser.test.d.ts.map +1 -0
  309. package/dist/hooks/rules-injector/__tests__/parser.test.js +86 -0
  310. package/dist/hooks/rules-injector/__tests__/parser.test.js.map +1 -0
  311. package/dist/hooks/session-end/__tests__/index.test.d.ts +2 -0
  312. package/dist/hooks/session-end/__tests__/index.test.d.ts.map +1 -0
  313. package/dist/hooks/session-end/__tests__/index.test.js +77 -0
  314. package/dist/hooks/session-end/__tests__/index.test.js.map +1 -0
  315. package/dist/hooks/session-end/callbacks.d.ts +1 -1
  316. package/dist/hooks/session-end/index.d.ts +2 -21
  317. package/dist/hooks/session-end/index.d.ts.map +1 -1
  318. package/dist/hooks/session-end/index.js.map +1 -1
  319. package/dist/hooks/session-end/types.d.ts +26 -0
  320. package/dist/hooks/session-end/types.d.ts.map +1 -0
  321. package/dist/hooks/session-end/types.js +6 -0
  322. package/dist/hooks/session-end/types.js.map +1 -0
  323. package/dist/hooks/setup/__tests__/index.test.d.ts +2 -0
  324. package/dist/hooks/setup/__tests__/index.test.d.ts.map +1 -0
  325. package/dist/hooks/setup/__tests__/index.test.js +68 -0
  326. package/dist/hooks/setup/__tests__/index.test.js.map +1 -0
  327. package/dist/hooks/team-pipeline/__tests__/state.test.d.ts +2 -0
  328. package/dist/hooks/team-pipeline/__tests__/state.test.d.ts.map +1 -0
  329. package/dist/hooks/team-pipeline/__tests__/state.test.js +94 -0
  330. package/dist/hooks/team-pipeline/__tests__/state.test.js.map +1 -0
  331. package/dist/hud/elements/autopilot.d.ts +1 -1
  332. package/dist/hud/elements/autopilot.d.ts.map +1 -1
  333. package/dist/hud/state.d.ts.map +1 -1
  334. package/dist/hud/state.js +69 -1
  335. package/dist/hud/state.js.map +1 -1
  336. package/dist/hud/types.d.ts +2 -15
  337. package/dist/hud/types.d.ts.map +1 -1
  338. package/dist/hud/types.js.map +1 -1
  339. package/dist/lib/__tests__/validateMode.test.d.ts +2 -0
  340. package/dist/lib/__tests__/validateMode.test.d.ts.map +1 -0
  341. package/dist/lib/__tests__/validateMode.test.js +61 -0
  342. package/dist/lib/__tests__/validateMode.test.js.map +1 -0
  343. package/dist/lib/path-validator.d.ts +25 -0
  344. package/dist/lib/path-validator.d.ts.map +1 -0
  345. package/dist/lib/path-validator.js +81 -0
  346. package/dist/lib/path-validator.js.map +1 -0
  347. package/dist/lib/validateMode.d.ts +3 -0
  348. package/dist/lib/validateMode.d.ts.map +1 -1
  349. package/dist/lib/validateMode.js +28 -2
  350. package/dist/lib/validateMode.js.map +1 -1
  351. package/dist/mcp/__tests__/codex-core.test.d.ts +2 -0
  352. package/dist/mcp/__tests__/codex-core.test.d.ts.map +1 -0
  353. package/dist/mcp/__tests__/codex-core.test.js +143 -0
  354. package/dist/mcp/__tests__/codex-core.test.js.map +1 -0
  355. package/dist/mcp/__tests__/gemini-core.test.d.ts +2 -0
  356. package/dist/mcp/__tests__/gemini-core.test.d.ts.map +1 -0
  357. package/dist/mcp/__tests__/gemini-core.test.js +53 -0
  358. package/dist/mcp/__tests__/gemini-core.test.js.map +1 -0
  359. package/dist/mcp/__tests__/job-state-db-deprecation.test.js +48 -1
  360. package/dist/mcp/__tests__/job-state-db-deprecation.test.js.map +1 -1
  361. package/dist/mcp/__tests__/omc-tools-server.test.d.ts +2 -0
  362. package/dist/mcp/__tests__/omc-tools-server.test.d.ts.map +1 -0
  363. package/dist/mcp/__tests__/omc-tools-server.test.js +108 -0
  364. package/dist/mcp/__tests__/omc-tools-server.test.js.map +1 -0
  365. package/dist/mcp/job-state-db.d.ts +1 -1
  366. package/dist/mcp/job-state-db.d.ts.map +1 -1
  367. package/dist/mcp/prompt-persistence.d.ts +2 -17
  368. package/dist/mcp/prompt-persistence.d.ts.map +1 -1
  369. package/dist/mcp/prompt-persistence.js.map +1 -1
  370. package/dist/team/__tests__/deadlock-detector.test.d.ts +2 -0
  371. package/dist/team/__tests__/deadlock-detector.test.d.ts.map +1 -0
  372. package/dist/team/__tests__/deadlock-detector.test.js +50 -0
  373. package/dist/team/__tests__/deadlock-detector.test.js.map +1 -0
  374. package/dist/team/__tests__/dependency-graph.test.d.ts +2 -0
  375. package/dist/team/__tests__/dependency-graph.test.d.ts.map +1 -0
  376. package/dist/team/__tests__/dependency-graph.test.js +29 -0
  377. package/dist/team/__tests__/dependency-graph.test.js.map +1 -0
  378. package/dist/team/capabilities.d.ts +1 -2
  379. package/dist/team/capabilities.d.ts.map +1 -1
  380. package/dist/team/capabilities.js.map +1 -1
  381. package/dist/team/deadlock-detector.d.ts +16 -0
  382. package/dist/team/deadlock-detector.d.ts.map +1 -0
  383. package/dist/team/deadlock-detector.js +52 -0
  384. package/dist/team/deadlock-detector.js.map +1 -0
  385. package/dist/team/dependency-graph.d.ts +23 -0
  386. package/dist/team/dependency-graph.d.ts.map +1 -0
  387. package/dist/team/dependency-graph.js +35 -0
  388. package/dist/team/dependency-graph.js.map +1 -0
  389. package/dist/team/index.d.ts +3 -0
  390. package/dist/team/index.d.ts.map +1 -1
  391. package/dist/team/index.js +2 -0
  392. package/dist/team/index.js.map +1 -1
  393. package/dist/team/types.d.ts +15 -4
  394. package/dist/team/types.d.ts.map +1 -1
  395. package/dist/team/types.js +0 -1
  396. package/dist/team/types.js.map +1 -1
  397. package/dist/team/unified-team.d.ts +2 -11
  398. package/dist/team/unified-team.d.ts.map +1 -1
  399. package/dist/team/unified-team.js.map +1 -1
  400. package/dist/tools/__tests__/ast-tools.test.d.ts +2 -0
  401. package/dist/tools/__tests__/ast-tools.test.d.ts.map +1 -0
  402. package/dist/tools/__tests__/ast-tools.test.js +178 -0
  403. package/dist/tools/__tests__/ast-tools.test.js.map +1 -0
  404. package/dist/tools/__tests__/lsp-tools.test.d.ts +2 -0
  405. package/dist/tools/__tests__/lsp-tools.test.d.ts.map +1 -0
  406. package/dist/tools/__tests__/lsp-tools.test.js +252 -0
  407. package/dist/tools/__tests__/lsp-tools.test.js.map +1 -0
  408. package/dist/tools/diagnostics/__tests__/index.test.d.ts +2 -0
  409. package/dist/tools/diagnostics/__tests__/index.test.d.ts.map +1 -0
  410. package/dist/tools/diagnostics/__tests__/index.test.js +111 -0
  411. package/dist/tools/diagnostics/__tests__/index.test.js.map +1 -0
  412. package/dist/tools/diagnostics/__tests__/lsp-aggregator.test.d.ts +2 -0
  413. package/dist/tools/diagnostics/__tests__/lsp-aggregator.test.d.ts.map +1 -0
  414. package/dist/tools/diagnostics/__tests__/lsp-aggregator.test.js +120 -0
  415. package/dist/tools/diagnostics/__tests__/lsp-aggregator.test.js.map +1 -0
  416. package/dist/tools/diagnostics/__tests__/tsc-runner.test.d.ts +2 -0
  417. package/dist/tools/diagnostics/__tests__/tsc-runner.test.d.ts.map +1 -0
  418. package/dist/tools/diagnostics/__tests__/tsc-runner.test.js +86 -0
  419. package/dist/tools/diagnostics/__tests__/tsc-runner.test.js.map +1 -0
  420. package/dist/tools/diagnostics/constants.d.ts +5 -0
  421. package/dist/tools/diagnostics/constants.d.ts.map +1 -0
  422. package/dist/tools/diagnostics/constants.js +5 -0
  423. package/dist/tools/diagnostics/constants.js.map +1 -0
  424. package/dist/tools/diagnostics/index.d.ts +2 -1
  425. package/dist/tools/diagnostics/index.d.ts.map +1 -1
  426. package/dist/tools/diagnostics/index.js +2 -1
  427. package/dist/tools/diagnostics/index.js.map +1 -1
  428. package/dist/tools/diagnostics/lsp-aggregator.js +1 -1
  429. package/dist/tools/diagnostics/lsp-aggregator.js.map +1 -1
  430. package/dist/tools/lsp/__tests__/utils.test.d.ts +2 -0
  431. package/dist/tools/lsp/__tests__/utils.test.d.ts.map +1 -0
  432. package/dist/tools/lsp/__tests__/utils.test.js +338 -0
  433. package/dist/tools/lsp/__tests__/utils.test.js.map +1 -0
  434. package/dist/tools/lsp/utils.d.ts.map +1 -1
  435. package/dist/tools/lsp/utils.js +2 -2
  436. package/dist/tools/lsp/utils.js.map +1 -1
  437. package/dist/tools/python-repl/__tests__/bridge-manager.test.d.ts +2 -0
  438. package/dist/tools/python-repl/__tests__/bridge-manager.test.d.ts.map +1 -0
  439. package/dist/tools/python-repl/__tests__/bridge-manager.test.js +338 -0
  440. package/dist/tools/python-repl/__tests__/bridge-manager.test.js.map +1 -0
  441. package/dist/tools/python-repl/__tests__/socket-client.test.d.ts +2 -0
  442. package/dist/tools/python-repl/__tests__/socket-client.test.d.ts.map +1 -0
  443. package/dist/tools/python-repl/__tests__/socket-client.test.js +155 -0
  444. package/dist/tools/python-repl/__tests__/socket-client.test.js.map +1 -0
  445. package/dist/tools/python-repl/bridge-manager.d.ts +4 -0
  446. package/dist/tools/python-repl/bridge-manager.d.ts.map +1 -1
  447. package/dist/tools/python-repl/bridge-manager.js +4 -1
  448. package/dist/tools/python-repl/bridge-manager.js.map +1 -1
  449. package/docs/guides/task-templates-guide.md +153 -0
  450. package/docs/guides/troubleshooting-guide.md +110 -0
  451. package/docs/guides/wizard-user-guide.md +85 -0
  452. package/docs/guides/workflow-recommendation-guide.md +97 -0
  453. package/docs/reviews/ultrapower-security/review_critic.md +450 -0
  454. package/docs/reviews/ultrapower-tech-review/review_tech.md +180 -0
  455. package/docs/troubleshooting/agent-timeouts.md +37 -0
  456. package/docs/troubleshooting/common-errors.md +37 -0
  457. package/docs/troubleshooting/hook-failures.md +29 -0
  458. package/docs/troubleshooting/performance-issues.md +41 -0
  459. package/docs/troubleshooting/state-corruption.md +36 -0
  460. package/hooks/run-hook.cmd +0 -0
  461. package/hooks/session-start +0 -0
  462. package/package.json +1 -1
  463. package/scripts/analyze-dependencies.ts +47 -0
  464. package/scripts/analyze-hook-coverage.ts +55 -0
  465. package/scripts/performance-regression.ts +28 -0
  466. package/scripts/persistent-mode.cjs +605 -605
  467. package/scripts/profiling.ts +95 -0
  468. package/scripts/run-profiling.ts +64 -0
  469. package/scripts/test-parallel-execution.ts +72 -0
  470. package/scripts/test-race-detection.ts +57 -0
  471. package/scripts/test-tiered-writer.ts +60 -0
  472. package/scripts/test-wal-integration.ts +29 -0
  473. package/scripts/test-wal.ts +48 -0
  474. package/skills/next-step-router/SKILL.md +17 -0
  475. package/skills/systematic-debugging/find-polluter.sh +0 -0
  476. package/skills/wizard/SKILL.md +103 -72
  477. package/skills/writing-skills/graphviz-conventions.dot +171 -171
  478. package/skills/writing-skills/render-graphs.js +0 -0
  479. package/templates/axiom/scripts/Check-Memory.ps1 +68 -68
  480. package/templates/axiom/scripts/Poll-Memory.ps1 +36 -36
  481. package/templates/axiom/scripts/Watch-Memory.ps1 +149 -149
  482. package/templates/axiom/scripts/agent-runner.ps1 +101 -101
  483. package/templates/axiom/scripts/start-reviews.ps1 +19 -19
  484. package/templates/tasks/README.md +45 -0
  485. package/templates/tasks/bug-fix.md +37 -0
  486. package/templates/tasks/code-review.md +36 -0
  487. package/templates/tasks/feature-development.md +43 -0
  488. package/templates/tasks/refactoring.md +37 -0
  489. package/templates/tasks/security-audit.md +37 -0
@@ -1,101 +1,101 @@
1
- #!/usr/bin/env pwsh
2
- # .agent/scripts/agent-runner.ps1
3
- # Agent Execution Lifecycle Manager
4
- # 1. Pre-Execution: Check Watchdog Status -> Inject Prompt if needed.
5
- # 2. Execution: Run the Agent (Codex Worker).
6
- # 3. Post-Execution: Update Memory Status (for next turn).
7
-
8
- param(
9
- [Parameter(ValueFromRemainingArguments=$true)]
10
- [string[]]$CodexArgs
11
- )
12
-
13
- # 1. Resolve Environment
14
- $ScriptDir = $PSScriptRoot
15
- $AgentRoot = Resolve-Path "$ScriptDir\..\.."
16
- $ContextFile = Join-Path $AgentRoot ".agent\memory\active_context.md"
17
- $CheckScript = Join-Path $ScriptDir "Check-Memory.ps1"
18
-
19
- # 2. Extract Session ID (default: 'unknown')
20
- $SessionId = "unknown"
21
- if (Test-Path $ContextFile) {
22
- try {
23
- $Content = Get-Content $ContextFile -Raw -ErrorAction SilentlyContinue
24
- if ($Content -match 'session_id:\s*"?([^"\r\n]+)"?') {
25
- $SessionId = $Matches[1].Trim()
26
- }
27
- } catch {
28
- # Ignore read errors
29
- }
30
- }
31
-
32
- # 3. Pre-Execution Hook: Check Watchdog Status & Inject Prompt
33
- $StatusLockFile = Join-Path $AgentRoot ".agent\memory\watchdog_status.lock"
34
- $WatchdogStatus = "NORMAL"
35
- $InjectionPre = ""
36
- $InjectionPost = ""
37
-
38
- if (Test-Path $StatusLockFile) {
39
- try {
40
- $JsonContent = Get-Content $StatusLockFile -Raw -ErrorAction SilentlyContinue | ConvertFrom-Json
41
- if ($JsonContent.status) { $WatchdogStatus = $JsonContent.status }
42
- } catch {
43
- # Default to NORMAL on error
44
- }
45
- }
46
- # Debug Output (Hidden in production or used for verbose logging)
47
- # Write-Host " [Watchdog-Debug] Status: $WatchdogStatus" -ForegroundColor Cyan
48
-
49
- if ($WatchdogStatus -eq "WARNING") {
50
- $InjectionPost = "`n`n[Warning: Memory Limit Approaching. Please be concise.]"
51
- Write-Host " [Watchdog] Injecting WARNING prompt." -ForegroundColor Yellow
52
- } elseif ($WatchdogStatus -eq "CRITICAL") {
53
- $InjectionPre = "[CRITICAL: Memory Limit Reached. Please run /suspend immediately.]`n`n"
54
- Write-Host " [Watchdog] Injecting CRITICAL prompt." -ForegroundColor Red
55
- }
56
-
57
- # 4. Define Post-Execution Hook Function
58
- function Invoke-MemoryUpdate {
59
- if (Test-Path $CheckScript) {
60
- # Write-Host " [Watchdog] Updating memory status..." -ForegroundColor DarkGray
61
-
62
- # Run detached to avoid blocking user response
63
- try {
64
- # Use 'powershell' (Windows 5.1+) or 'pwsh' (Core 6+)
65
- $PSExe = if (Get-Command pwsh -ErrorAction SilentlyContinue) { "pwsh" } else { "powershell" }
66
- $p = Start-Process -FilePath $PSExe -ArgumentList "-NoProfile", "-File", "`"$CheckScript`"", "-SessionId", "`"$SessionId`"" -PassThru -WindowStyle Hidden -ErrorAction SilentlyContinue
67
-
68
- # Wait up to 2 seconds (Failsafe)
69
- if ($null -ne $p) {
70
- if ($p.WaitForExit(2000)) {
71
- # Completed
72
- } else {
73
- Stop-Process -Id $p.Id -Force -ErrorAction SilentlyContinue
74
- # Write-Host " [Watchdog] Update timed out." -ForegroundColor DarkYellow
75
- }
76
- }
77
- } catch {
78
- Write-Host " [Watchdog] Failed to execute status update: $_" -ForegroundColor DarkYellow
79
- }
80
- }
81
- }
82
-
83
- # 5. Execution Phase (Run Worker)
84
- try {
85
- # Check if input is being piped
86
- if ($MyInvocation.ExpectingInput) {
87
- $InputContent = $Input | Out-String
88
- # Inject warning/critical messages into the prompt stream
89
- $FinalInput = "${InjectionPre}${InputContent}${InjectionPost}"
90
- $FinalInput | codex exec @CodexArgs
91
- } else {
92
- # Direct execution without stdin injection
93
- if ($WatchdogStatus -ne "NORMAL") {
94
- Write-Host " [Watchdog] Alert: Status is $WatchdogStatus (Input injection skipped for non-interactive mode)." -ForegroundColor Yellow
95
- }
96
- codex exec @CodexArgs
97
- }
98
- } finally {
99
- # 6. Post-Execution Phase
100
- Invoke-MemoryUpdate
101
- }
1
+ #!/usr/bin/env pwsh
2
+ # .agent/scripts/agent-runner.ps1
3
+ # Agent Execution Lifecycle Manager
4
+ # 1. Pre-Execution: Check Watchdog Status -> Inject Prompt if needed.
5
+ # 2. Execution: Run the Agent (Codex Worker).
6
+ # 3. Post-Execution: Update Memory Status (for next turn).
7
+
8
+ param(
9
+ [Parameter(ValueFromRemainingArguments=$true)]
10
+ [string[]]$CodexArgs
11
+ )
12
+
13
+ # 1. Resolve Environment
14
+ $ScriptDir = $PSScriptRoot
15
+ $AgentRoot = Resolve-Path "$ScriptDir\..\.."
16
+ $ContextFile = Join-Path $AgentRoot ".agent\memory\active_context.md"
17
+ $CheckScript = Join-Path $ScriptDir "Check-Memory.ps1"
18
+
19
+ # 2. Extract Session ID (default: 'unknown')
20
+ $SessionId = "unknown"
21
+ if (Test-Path $ContextFile) {
22
+ try {
23
+ $Content = Get-Content $ContextFile -Raw -ErrorAction SilentlyContinue
24
+ if ($Content -match 'session_id:\s*"?([^"\r\n]+)"?') {
25
+ $SessionId = $Matches[1].Trim()
26
+ }
27
+ } catch {
28
+ # Ignore read errors
29
+ }
30
+ }
31
+
32
+ # 3. Pre-Execution Hook: Check Watchdog Status & Inject Prompt
33
+ $StatusLockFile = Join-Path $AgentRoot ".agent\memory\watchdog_status.lock"
34
+ $WatchdogStatus = "NORMAL"
35
+ $InjectionPre = ""
36
+ $InjectionPost = ""
37
+
38
+ if (Test-Path $StatusLockFile) {
39
+ try {
40
+ $JsonContent = Get-Content $StatusLockFile -Raw -ErrorAction SilentlyContinue | ConvertFrom-Json
41
+ if ($JsonContent.status) { $WatchdogStatus = $JsonContent.status }
42
+ } catch {
43
+ # Default to NORMAL on error
44
+ }
45
+ }
46
+ # Debug Output (Hidden in production or used for verbose logging)
47
+ # Write-Host " [Watchdog-Debug] Status: $WatchdogStatus" -ForegroundColor Cyan
48
+
49
+ if ($WatchdogStatus -eq "WARNING") {
50
+ $InjectionPost = "`n`n[Warning: Memory Limit Approaching. Please be concise.]"
51
+ Write-Host " [Watchdog] Injecting WARNING prompt." -ForegroundColor Yellow
52
+ } elseif ($WatchdogStatus -eq "CRITICAL") {
53
+ $InjectionPre = "[CRITICAL: Memory Limit Reached. Please run /suspend immediately.]`n`n"
54
+ Write-Host " [Watchdog] Injecting CRITICAL prompt." -ForegroundColor Red
55
+ }
56
+
57
+ # 4. Define Post-Execution Hook Function
58
+ function Invoke-MemoryUpdate {
59
+ if (Test-Path $CheckScript) {
60
+ # Write-Host " [Watchdog] Updating memory status..." -ForegroundColor DarkGray
61
+
62
+ # Run detached to avoid blocking user response
63
+ try {
64
+ # Use 'powershell' (Windows 5.1+) or 'pwsh' (Core 6+)
65
+ $PSExe = if (Get-Command pwsh -ErrorAction SilentlyContinue) { "pwsh" } else { "powershell" }
66
+ $p = Start-Process -FilePath $PSExe -ArgumentList "-NoProfile", "-File", "`"$CheckScript`"", "-SessionId", "`"$SessionId`"" -PassThru -WindowStyle Hidden -ErrorAction SilentlyContinue
67
+
68
+ # Wait up to 2 seconds (Failsafe)
69
+ if ($null -ne $p) {
70
+ if ($p.WaitForExit(2000)) {
71
+ # Completed
72
+ } else {
73
+ Stop-Process -Id $p.Id -Force -ErrorAction SilentlyContinue
74
+ # Write-Host " [Watchdog] Update timed out." -ForegroundColor DarkYellow
75
+ }
76
+ }
77
+ } catch {
78
+ Write-Host " [Watchdog] Failed to execute status update: $_" -ForegroundColor DarkYellow
79
+ }
80
+ }
81
+ }
82
+
83
+ # 5. Execution Phase (Run Worker)
84
+ try {
85
+ # Check if input is being piped
86
+ if ($MyInvocation.ExpectingInput) {
87
+ $InputContent = $Input | Out-String
88
+ # Inject warning/critical messages into the prompt stream
89
+ $FinalInput = "${InjectionPre}${InputContent}${InjectionPost}"
90
+ $FinalInput | codex exec @CodexArgs
91
+ } else {
92
+ # Direct execution without stdin injection
93
+ if ($WatchdogStatus -ne "NORMAL") {
94
+ Write-Host " [Watchdog] Alert: Status is $WatchdogStatus (Input injection skipped for non-interactive mode)." -ForegroundColor Yellow
95
+ }
96
+ codex exec @CodexArgs
97
+ }
98
+ } finally {
99
+ # 6. Post-Execution Phase
100
+ Invoke-MemoryUpdate
101
+ }
@@ -1,19 +1,19 @@
1
- #!/usr/bin/env pwsh
2
-
3
- param(
4
- [Parameter(ValueFromRemainingArguments=$true)]
5
- [string[]]$Args
6
- )
7
-
8
- $ScriptDir = $PSScriptRoot
9
- $Runner = Join-Path $ScriptDir "agent-runner.ps1"
10
-
11
- if (-not (Test-Path $Runner)) {
12
- Write-Error "agent-runner.ps1 not found: $Runner"
13
- exit 1
14
- }
15
-
16
- # Route review execution through watchdog-aware runner.
17
- # The command text keeps compatibility with previous docs/tests.
18
- $ReviewPrompt = if ($Args.Count -gt 0) { $Args -join " " } else { "执行 review 流程" }
19
- & pwsh -NoProfile -File $Runner --prompt "$ReviewPrompt" "codex exec"
1
+ #!/usr/bin/env pwsh
2
+
3
+ param(
4
+ [Parameter(ValueFromRemainingArguments=$true)]
5
+ [string[]]$Args
6
+ )
7
+
8
+ $ScriptDir = $PSScriptRoot
9
+ $Runner = Join-Path $ScriptDir "agent-runner.ps1"
10
+
11
+ if (-not (Test-Path $Runner)) {
12
+ Write-Error "agent-runner.ps1 not found: $Runner"
13
+ exit 1
14
+ }
15
+
16
+ # Route review execution through watchdog-aware runner.
17
+ # The command text keeps compatibility with previous docs/tests.
18
+ $ReviewPrompt = if ($Args.Count -gt 0) { $Args -join " " } else { "执行 review 流程" }
19
+ & pwsh -NoProfile -File $Runner --prompt "$ReviewPrompt" "codex exec"
@@ -0,0 +1,45 @@
1
+ # 任务模板库
2
+
3
+ ## 可用模板
4
+
5
+ ### 功能开发
6
+ 文件: `feature-development.md`
7
+ 适用于: 实现新功能或改进现有功能
8
+ 包含: 需求分析、设计、实现、测试、文档
9
+
10
+ ### Bug 修复
11
+ 文件: `bug-fix.md`
12
+ 适用于: 修复 bug 和问题
13
+ 包含: 问题复现、根因分析、修复、回归测试
14
+
15
+ ### 代码审查
16
+ 文件: `code-review.md`
17
+ 适用于: 审查代码变更
18
+ 包含: 质量检查、功能验证、性能安全、文档测试
19
+
20
+ ### 重构
21
+ 文件: `refactoring.md`
22
+ 适用于: 改进代码结构
23
+ 包含: 现状分析、设计、实现、测试、文档
24
+
25
+ ### 安全审计
26
+ 文件: `security-audit.md`
27
+ 适用于: 安全审查和加固
28
+ 包含: 威胁建模、代码审查、依赖检查、配置审查
29
+
30
+ ## 使用方式
31
+
32
+ ```bash
33
+ # 查看模板
34
+ cat templates/tasks/feature-development.md
35
+
36
+ # 应用模板到任务
37
+ /template apply feature-development "功能描述"
38
+ ```
39
+
40
+ ## 模板特点
41
+
42
+ - ✅ 预定义检查清单
43
+ - ✅ 标准化工作流程
44
+ - ✅ 最佳实践指导
45
+ - ✅ 易于定制扩展
@@ -0,0 +1,37 @@
1
+ # Bug 修复模板
2
+
3
+ ## 问题信息
4
+ - **Bug ID**: [ID]
5
+ - **严重级别**: [Critical/High/Medium/Low]
6
+ - **影响范围**: [模块/功能]
7
+ - **报告者**: [姓名]
8
+
9
+ ## 问题复现
10
+ - [ ] 理解问题现象
11
+ - [ ] 确认复现步骤
12
+ - [ ] 收集错误日志
13
+ - [ ] 确认影响版本
14
+
15
+ ## 根因分析
16
+ - [ ] 定位问题代码
17
+ - [ ] 分析根本原因
18
+ - [ ] 评估影响范围
19
+ - [ ] 制定修复方案
20
+
21
+ ## 修复实现
22
+ - [ ] 编写修复代码
23
+ - [ ] 添加防护措施
24
+ - [ ] 代码审查
25
+ - [ ] 本地验证
26
+
27
+ ## 回归测试
28
+ - [ ] 验证问题已解决
29
+ - [ ] 检查相关功能
30
+ - [ ] 运行完整测试套件
31
+ - [ ] 性能检查
32
+
33
+ ## 发布
34
+ - [ ] 更新变更日志
35
+ - [ ] 标记版本
36
+ - [ ] 发布补丁
37
+ - [ ] 通知用户
@@ -0,0 +1,36 @@
1
+ # 代码审查模板
2
+
3
+ ## 审查信息
4
+ - **PR ID**: [ID]
5
+ - **作者**: [姓名]
6
+ - **审查者**: [姓名]
7
+ - **变更类型**: [Feature/Fix/Refactor/Docs]
8
+
9
+ ## 代码质量
10
+ - [ ] 代码风格一致
11
+ - [ ] 命名规范正确
12
+ - [ ] 无重复代码
13
+ - [ ] 复杂度合理
14
+
15
+ ## 功能正确性
16
+ - [ ] 逻辑正确
17
+ - [ ] 边界情况处理
18
+ - [ ] 错误处理完善
19
+ - [ ] 测试充分
20
+
21
+ ## 性能和安全
22
+ - [ ] 无性能问题
23
+ - [ ] 无安全漏洞
24
+ - [ ] 资源管理正确
25
+ - [ ] 依赖版本安全
26
+
27
+ ## 文档和测试
28
+ - [ ] 代码注释清晰
29
+ - [ ] 文档已更新
30
+ - [ ] 测试覆盖充分
31
+ - [ ] 变更日志已更新
32
+
33
+ ## 审查结论
34
+ - [ ] 批准合并
35
+ - [ ] 需要修改
36
+ - [ ] 需要重新审查
@@ -0,0 +1,43 @@
1
+ # 功能开发模板
2
+
3
+ ## 任务信息
4
+ - **功能名称**: [功能名称]
5
+ - **优先级**: [P0/P1/P2]
6
+ - **预计工时**: [X 人天]
7
+ - **负责人**: [姓名]
8
+
9
+ ## 需求分析
10
+ - [ ] 理解用户需求和使用场景
11
+ - [ ] 确认验收标准
12
+ - [ ] 识别依赖关系和风险
13
+ - [ ] 评估工作量
14
+
15
+ ## 设计审查
16
+ - [ ] 架构设计和模块划分
17
+ - [ ] API 接口设计
18
+ - [ ] 数据模型设计
19
+ - [ ] 性能和安全考虑
20
+
21
+ ## 实现
22
+ - [ ] 编写核心代码
23
+ - [ ] 添加错误处理
24
+ - [ ] 代码审查
25
+ - [ ] 集成测试
26
+
27
+ ## 测试
28
+ - [ ] 单元测试 (>80% 覆盖率)
29
+ - [ ] 集成测试
30
+ - [ ] 端到端测试
31
+ - [ ] 性能测试
32
+
33
+ ## 文档
34
+ - [ ] API 文档
35
+ - [ ] 用户指南
36
+ - [ ] 变更日志
37
+ - [ ] 示例代码
38
+
39
+ ## 验收
40
+ - [ ] 所有测试通过
41
+ - [ ] 代码审查通过
42
+ - [ ] 文档完整
43
+ - [ ] 性能达标
@@ -0,0 +1,37 @@
1
+ # 重构模板
2
+
3
+ ## 重构信息
4
+ - **模块名称**: [模块名]
5
+ - **重构范围**: [文件/目录]
6
+ - **预计工时**: [X 人天]
7
+ - **目标**: [改进目标]
8
+
9
+ ## 现状分析
10
+ - [ ] 分析现有代码结构
11
+ - [ ] 识别技术债务
12
+ - [ ] 评估重构风险
13
+ - [ ] 制定重构计划
14
+
15
+ ## 重构设计
16
+ - [ ] 新架构设计
17
+ - [ ] 模块划分
18
+ - [ ] 接口定义
19
+ - [ ] 迁移策略
20
+
21
+ ## 实现变更
22
+ - [ ] 编写新代码
23
+ - [ ] 迁移现有逻辑
24
+ - [ ] 更新依赖关系
25
+ - [ ] 代码审查
26
+
27
+ ## 测试验证
28
+ - [ ] 单元测试通过
29
+ - [ ] 集成测试通过
30
+ - [ ] 回归测试通过
31
+ - [ ] 性能对比
32
+
33
+ ## 文档更新
34
+ - [ ] 架构文档
35
+ - [ ] API 文档
36
+ - [ ] 迁移指南
37
+ - [ ] 变更日志
@@ -0,0 +1,37 @@
1
+ # 安全审计模板
2
+
3
+ ## 审计信息
4
+ - **审计范围**: [模块/系统]
5
+ - **审计日期**: [日期]
6
+ - **审计员**: [姓名]
7
+ - **风险等级**: [Critical/High/Medium/Low]
8
+
9
+ ## 威胁建模
10
+ - [ ] 识别资产
11
+ - [ ] 识别威胁
12
+ - [ ] 评估风险
13
+ - [ ] 制定对策
14
+
15
+ ## 代码审查
16
+ - [ ] 检查认证机制
17
+ - [ ] 检查授权控制
18
+ - [ ] 检查输入验证
19
+ - [ ] 检查加密实现
20
+
21
+ ## 依赖检查
22
+ - [ ] 扫描已知漏洞
23
+ - [ ] 检查版本更新
24
+ - [ ] 评估依赖风险
25
+ - [ ] 制定升级计划
26
+
27
+ ## 配置审查
28
+ - [ ] 检查密钥管理
29
+ - [ ] 检查访问控制
30
+ - [ ] 检查日志记录
31
+ - [ ] 检查错误处理
32
+
33
+ ## 修复和验证
34
+ - [ ] 修复发现的问题
35
+ - [ ] 验证修复有效性
36
+ - [ ] 更新安全文档
37
+ - [ ] 计划后续审计