@coralai/sps-cli 0.55.13 → 0.56.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (428) hide show
  1. package/dist/commands/cardMarkComplete.d.ts.map +1 -1
  2. package/dist/commands/cardMarkComplete.js +6 -3
  3. package/dist/commands/cardMarkComplete.js.map +1 -1
  4. package/dist/commands/projectInit.d.ts +18 -16
  5. package/dist/commands/projectInit.d.ts.map +1 -1
  6. package/dist/commands/projectInit.js +59 -186
  7. package/dist/commands/projectInit.js.map +1 -1
  8. package/dist/commands/skillCommand.js +7 -4
  9. package/dist/commands/skillCommand.js.map +1 -1
  10. package/dist/commands/tick.d.ts +2 -20
  11. package/dist/commands/tick.d.ts.map +1 -1
  12. package/dist/commands/tick.js +58 -1
  13. package/dist/commands/tick.js.map +1 -1
  14. package/dist/console/index.d.ts.map +1 -1
  15. package/dist/console/index.js +4 -0
  16. package/dist/console/index.js.map +1 -1
  17. package/dist/console/routes/chat.d.ts.map +1 -1
  18. package/dist/console/routes/chat.js +121 -0
  19. package/dist/console/routes/chat.js.map +1 -1
  20. package/dist/console/routes/projects.d.ts +0 -6
  21. package/dist/console/routes/projects.d.ts.map +1 -1
  22. package/dist/console/routes/projects.js +11 -2
  23. package/dist/console/routes/projects.js.map +1 -1
  24. package/dist/console/routes/providers.d.ts +10 -0
  25. package/dist/console/routes/providers.d.ts.map +1 -0
  26. package/dist/console/routes/providers.js +63 -0
  27. package/dist/console/routes/providers.js.map +1 -0
  28. package/dist/console/routes/smartarrange.d.ts +4 -0
  29. package/dist/console/routes/smartarrange.d.ts.map +1 -0
  30. package/dist/console/routes/smartarrange.js +107 -0
  31. package/dist/console/routes/smartarrange.js.map +1 -0
  32. package/dist/console/routes/system.d.ts.map +1 -1
  33. package/dist/console/routes/system.js +28 -0
  34. package/dist/console/routes/system.js.map +1 -1
  35. package/dist/console/routes/workers.d.ts.map +1 -1
  36. package/dist/console/routes/workers.js +36 -4
  37. package/dist/console/routes/workers.js.map +1 -1
  38. package/dist/console-assets/assets/index-CWkYVI5d.js +600 -0
  39. package/dist/console-assets/assets/index-CnUBHNsN.css +10 -0
  40. package/dist/console-assets/index.html +2 -2
  41. package/dist/core/agents/AcpBackend.d.ts +24 -0
  42. package/dist/core/agents/AcpBackend.d.ts.map +1 -0
  43. package/dist/core/agents/AcpBackend.js +86 -0
  44. package/dist/core/agents/AcpBackend.js.map +1 -0
  45. package/dist/core/agents/AgentBackend.d.ts +53 -0
  46. package/dist/core/agents/AgentBackend.d.ts.map +1 -0
  47. package/dist/core/agents/AgentBackend.js +18 -0
  48. package/dist/core/agents/AgentBackend.js.map +1 -0
  49. package/dist/core/agents/ClaudeAcpBackend.d.ts +13 -0
  50. package/dist/core/agents/ClaudeAcpBackend.d.ts.map +1 -0
  51. package/dist/core/agents/ClaudeAcpBackend.js +14 -0
  52. package/dist/core/agents/ClaudeAcpBackend.js.map +1 -0
  53. package/dist/core/agents/ClaudeSdkBackend.d.ts +26 -0
  54. package/dist/core/agents/ClaudeSdkBackend.d.ts.map +1 -0
  55. package/dist/core/agents/ClaudeSdkBackend.js +102 -0
  56. package/dist/core/agents/ClaudeSdkBackend.js.map +1 -0
  57. package/dist/core/agents/CodexAppServerBackend.d.ts +33 -0
  58. package/dist/core/agents/CodexAppServerBackend.d.ts.map +1 -0
  59. package/dist/core/agents/CodexAppServerBackend.js +168 -0
  60. package/dist/core/agents/CodexAppServerBackend.js.map +1 -0
  61. package/dist/core/agents/OpenAiAgentBackend.d.ts +39 -0
  62. package/dist/core/agents/OpenAiAgentBackend.d.ts.map +1 -0
  63. package/dist/core/agents/OpenAiAgentBackend.js +132 -0
  64. package/dist/core/agents/OpenAiAgentBackend.js.map +1 -0
  65. package/dist/core/agents/agentsMd.d.ts +2 -0
  66. package/dist/core/agents/agentsMd.d.ts.map +1 -0
  67. package/dist/core/agents/agentsMd.js +22 -0
  68. package/dist/core/agents/agentsMd.js.map +1 -0
  69. package/dist/core/agents/localTracing.d.ts +3 -0
  70. package/dist/core/agents/localTracing.d.ts.map +1 -0
  71. package/dist/core/agents/localTracing.js +42 -0
  72. package/dist/core/agents/localTracing.js.map +1 -0
  73. package/dist/core/agents/resolveBackend.d.ts +26 -0
  74. package/dist/core/agents/resolveBackend.d.ts.map +1 -0
  75. package/dist/core/agents/resolveBackend.js +27 -0
  76. package/dist/core/agents/resolveBackend.js.map +1 -0
  77. package/dist/core/agents/workerOutputSink.d.ts +4 -0
  78. package/dist/core/agents/workerOutputSink.d.ts.map +1 -0
  79. package/dist/core/agents/workerOutputSink.js +39 -0
  80. package/dist/core/agents/workerOutputSink.js.map +1 -0
  81. package/dist/core/config.d.ts +6 -0
  82. package/dist/core/config.d.ts.map +1 -1
  83. package/dist/core/config.js +4 -0
  84. package/dist/core/config.js.map +1 -1
  85. package/dist/core/intel/RuntimeSession.d.ts +16 -0
  86. package/dist/core/intel/RuntimeSession.d.ts.map +1 -0
  87. package/dist/core/intel/RuntimeSession.js +89 -0
  88. package/dist/core/intel/RuntimeSession.js.map +1 -0
  89. package/dist/core/intel/agentsConfig.d.ts +20 -0
  90. package/dist/core/intel/agentsConfig.d.ts.map +1 -0
  91. package/dist/core/intel/agentsConfig.js +68 -0
  92. package/dist/core/intel/agentsConfig.js.map +1 -0
  93. package/dist/core/intel/planStore.d.ts +23 -0
  94. package/dist/core/intel/planStore.d.ts.map +1 -0
  95. package/dist/core/intel/planStore.js +67 -0
  96. package/dist/core/intel/planStore.js.map +1 -0
  97. package/dist/core/intel/types.d.ts +86 -0
  98. package/dist/core/intel/types.d.ts.map +1 -0
  99. package/dist/core/intel/types.js +8 -0
  100. package/dist/core/intel/types.js.map +1 -0
  101. package/dist/core/memoryIngest.d.ts +18 -0
  102. package/dist/core/memoryIngest.d.ts.map +1 -0
  103. package/dist/core/memoryIngest.js +56 -0
  104. package/dist/core/memoryIngest.js.map +1 -0
  105. package/dist/core/memoryProvider.d.ts +63 -0
  106. package/dist/core/memoryProvider.d.ts.map +1 -0
  107. package/dist/core/memoryProvider.js +205 -0
  108. package/dist/core/memoryProvider.js.map +1 -0
  109. package/dist/core/skillStore.d.ts.map +1 -1
  110. package/dist/core/skillStore.js +2 -1
  111. package/dist/core/skillStore.js.map +1 -1
  112. package/dist/core/skills/SkillsManager.d.ts +38 -0
  113. package/dist/core/skills/SkillsManager.d.ts.map +1 -0
  114. package/dist/core/skills/SkillsManager.js +231 -0
  115. package/dist/core/skills/SkillsManager.js.map +1 -0
  116. package/dist/core/skills/distribution.d.ts +64 -0
  117. package/dist/core/skills/distribution.d.ts.map +1 -0
  118. package/dist/core/skills/distribution.js +269 -0
  119. package/dist/core/skills/distribution.js.map +1 -0
  120. package/dist/core/skills/index.d.ts +13 -0
  121. package/dist/core/skills/index.d.ts.map +1 -0
  122. package/dist/core/skills/index.js +13 -0
  123. package/dist/core/skills/index.js.map +1 -0
  124. package/dist/core/skills/types.d.ts +44 -0
  125. package/dist/core/skills/types.d.ts.map +1 -0
  126. package/dist/core/skills/types.js +9 -0
  127. package/dist/core/skills/types.js.map +1 -0
  128. package/dist/core/taskPrompts.d.ts +0 -12
  129. package/dist/core/taskPrompts.d.ts.map +1 -1
  130. package/dist/core/taskPrompts.js +0 -14
  131. package/dist/core/taskPrompts.js.map +1 -1
  132. package/dist/core/transcriptIngest.d.ts +37 -0
  133. package/dist/core/transcriptIngest.d.ts.map +1 -0
  134. package/dist/core/transcriptIngest.js +137 -0
  135. package/dist/core/transcriptIngest.js.map +1 -0
  136. package/dist/core/wiki/types.d.ts +282 -745
  137. package/dist/core/wiki/types.d.ts.map +1 -1
  138. package/dist/core/wiki/types.js +1 -1
  139. package/dist/core/wiki/types.js.map +1 -1
  140. package/dist/engines/SmartArrangeEngine.d.ts +75 -0
  141. package/dist/engines/SmartArrangeEngine.d.ts.map +1 -0
  142. package/dist/engines/SmartArrangeEngine.js +112 -0
  143. package/dist/engines/SmartArrangeEngine.js.map +1 -0
  144. package/dist/engines/StageEngine.d.ts +3 -17
  145. package/dist/engines/StageEngine.d.ts.map +1 -1
  146. package/dist/engines/StageEngine.js +13 -91
  147. package/dist/engines/StageEngine.js.map +1 -1
  148. package/dist/engines/smartarrange/AcpWorkerExec.d.ts +35 -0
  149. package/dist/engines/smartarrange/AcpWorkerExec.d.ts.map +1 -0
  150. package/dist/engines/smartarrange/AcpWorkerExec.js +71 -0
  151. package/dist/engines/smartarrange/AcpWorkerExec.js.map +1 -0
  152. package/dist/engines/smartarrange/cardSink.d.ts +29 -0
  153. package/dist/engines/smartarrange/cardSink.d.ts.map +1 -0
  154. package/dist/engines/smartarrange/cardSink.js +43 -0
  155. package/dist/engines/smartarrange/cardSink.js.map +1 -0
  156. package/dist/engines/smartarrange/runner.d.ts +24 -0
  157. package/dist/engines/smartarrange/runner.d.ts.map +1 -0
  158. package/dist/engines/smartarrange/runner.js +116 -0
  159. package/dist/engines/smartarrange/runner.js.map +1 -0
  160. package/dist/engines/smartarrange/screenshot.d.ts +5 -0
  161. package/dist/engines/smartarrange/screenshot.d.ts.map +1 -0
  162. package/dist/engines/smartarrange/screenshot.js +117 -0
  163. package/dist/engines/smartarrange/screenshot.js.map +1 -0
  164. package/dist/main.js +127 -92
  165. package/dist/main.js.map +1 -1
  166. package/dist/manager/worker-manager-impl.d.ts.map +1 -1
  167. package/dist/manager/worker-manager-impl.js +7 -0
  168. package/dist/manager/worker-manager-impl.js.map +1 -1
  169. package/dist/providers/LLMClient.d.ts +32 -0
  170. package/dist/providers/LLMClient.d.ts.map +1 -0
  171. package/dist/providers/LLMClient.js +108 -0
  172. package/dist/providers/LLMClient.js.map +1 -0
  173. package/dist/providers/MarkdownTaskBackend.d.ts.map +1 -1
  174. package/dist/providers/MarkdownTaskBackend.js +3 -2
  175. package/dist/providers/MarkdownTaskBackend.js.map +1 -1
  176. package/dist/providers/llm/chatTools.d.ts +11 -0
  177. package/dist/providers/llm/chatTools.d.ts.map +1 -0
  178. package/dist/providers/llm/chatTools.js +57 -0
  179. package/dist/providers/llm/chatTools.js.map +1 -0
  180. package/dist/providers/llm/codexAuth.d.ts +8 -0
  181. package/dist/providers/llm/codexAuth.d.ts.map +1 -0
  182. package/dist/providers/llm/codexAuth.js +57 -0
  183. package/dist/providers/llm/codexAuth.js.map +1 -0
  184. package/dist/providers/llm/codexModel.d.ts +14 -0
  185. package/dist/providers/llm/codexModel.d.ts.map +1 -0
  186. package/dist/providers/llm/codexModel.js +96 -0
  187. package/dist/providers/llm/codexModel.js.map +1 -0
  188. package/dist/providers/llm/localSubscription.d.ts +15 -0
  189. package/dist/providers/llm/localSubscription.d.ts.map +1 -0
  190. package/dist/providers/llm/localSubscription.js +66 -0
  191. package/dist/providers/llm/localSubscription.js.map +1 -0
  192. package/dist/providers/llm/modelFactory.d.ts +14 -0
  193. package/dist/providers/llm/modelFactory.d.ts.map +1 -0
  194. package/dist/providers/llm/modelFactory.js +22 -0
  195. package/dist/providers/llm/modelFactory.js.map +1 -0
  196. package/dist/providers/llm/monitorSkills.d.ts +6 -0
  197. package/dist/providers/llm/monitorSkills.d.ts.map +1 -0
  198. package/dist/providers/llm/monitorSkills.js +37 -0
  199. package/dist/providers/llm/monitorSkills.js.map +1 -0
  200. package/dist/providers/llm/probeTools.d.ts +7 -0
  201. package/dist/providers/llm/probeTools.d.ts.map +1 -0
  202. package/dist/providers/llm/probeTools.js +84 -0
  203. package/dist/providers/llm/probeTools.js.map +1 -0
  204. package/dist/providers/llm/providers.d.ts +26 -0
  205. package/dist/providers/llm/providers.d.ts.map +1 -0
  206. package/dist/providers/llm/providers.js +68 -0
  207. package/dist/providers/llm/providers.js.map +1 -0
  208. package/dist/providers/llm/skillTools.d.ts +4 -0
  209. package/dist/providers/llm/skillTools.d.ts.map +1 -0
  210. package/dist/providers/llm/skillTools.js +42 -0
  211. package/dist/providers/llm/skillTools.js.map +1 -0
  212. package/dist/providers/llm/workerTools.d.ts +9 -0
  213. package/dist/providers/llm/workerTools.d.ts.map +1 -0
  214. package/dist/providers/llm/workerTools.js +111 -0
  215. package/dist/providers/llm/workerTools.js.map +1 -0
  216. package/dist/providers/mcp/spsMcpServer.d.ts +15 -0
  217. package/dist/providers/mcp/spsMcpServer.d.ts.map +1 -0
  218. package/dist/providers/mcp/spsMcpServer.js +67 -0
  219. package/dist/providers/mcp/spsMcpServer.js.map +1 -0
  220. package/dist/providers/mcp/spsMcpStdio.d.ts +2 -0
  221. package/dist/providers/mcp/spsMcpStdio.d.ts.map +1 -0
  222. package/dist/providers/mcp/spsMcpStdio.js +32 -0
  223. package/dist/providers/mcp/spsMcpStdio.js.map +1 -0
  224. package/dist/providers/mcp/spsMcpStdioConfig.d.ts +11 -0
  225. package/dist/providers/mcp/spsMcpStdioConfig.d.ts.map +1 -0
  226. package/dist/providers/mcp/spsMcpStdioConfig.js +19 -0
  227. package/dist/providers/mcp/spsMcpStdioConfig.js.map +1 -0
  228. package/dist/server.d.ts +23 -0
  229. package/dist/server.d.ts.map +1 -1
  230. package/dist/server.js +23 -0
  231. package/dist/server.js.map +1 -1
  232. package/dist/services/ChatService.d.ts +8 -0
  233. package/dist/services/ChatService.d.ts.map +1 -1
  234. package/dist/services/ChatService.js +2 -0
  235. package/dist/services/ChatService.js.map +1 -1
  236. package/dist/services/LogService.d.ts +1 -1
  237. package/dist/services/LogService.d.ts.map +1 -1
  238. package/dist/services/LogService.js +3 -2
  239. package/dist/services/LogService.js.map +1 -1
  240. package/dist/services/ProjectService.d.ts +12 -2
  241. package/dist/services/ProjectService.d.ts.map +1 -1
  242. package/dist/services/ProjectService.js +1 -0
  243. package/dist/services/ProjectService.js.map +1 -1
  244. package/dist/services/SkillService.js +11 -13
  245. package/dist/services/SkillService.js.map +1 -1
  246. package/dist/services/SmartArrangeService.d.ts +12 -0
  247. package/dist/services/SmartArrangeService.d.ts.map +1 -0
  248. package/dist/services/SmartArrangeService.js +37 -0
  249. package/dist/services/SmartArrangeService.js.map +1 -0
  250. package/dist/services/SystemService.d.ts +20 -0
  251. package/dist/services/SystemService.d.ts.map +1 -1
  252. package/dist/services/SystemService.js +93 -0
  253. package/dist/services/SystemService.js.map +1 -1
  254. package/dist/services/WorkerService.d.ts +8 -0
  255. package/dist/services/WorkerService.d.ts.map +1 -1
  256. package/dist/services/WorkerService.js +73 -3
  257. package/dist/services/WorkerService.js.map +1 -1
  258. package/dist/services/container.d.ts +2 -0
  259. package/dist/services/container.d.ts.map +1 -1
  260. package/dist/services/container.js +2 -0
  261. package/dist/services/container.js.map +1 -1
  262. package/dist/shared/localTime.d.ts +8 -0
  263. package/dist/shared/localTime.d.ts.map +1 -0
  264. package/dist/shared/localTime.js +11 -0
  265. package/dist/shared/localTime.js.map +1 -0
  266. package/dist/shared/runtimePaths.d.ts +1 -1
  267. package/dist/shared/runtimePaths.d.ts.map +1 -1
  268. package/dist/shared/runtimePaths.js +2 -2
  269. package/dist/shared/runtimePaths.js.map +1 -1
  270. package/dist/shared/runtimeSchemas.d.ts +74 -245
  271. package/dist/shared/runtimeSchemas.d.ts.map +1 -1
  272. package/dist/shared/runtimeSchemas.js +2 -2
  273. package/dist/shared/runtimeSchemas.js.map +1 -1
  274. package/monitor-skills/probe-playbook/SKILL.md +32 -0
  275. package/monitor-skills/visual-rubric/SKILL.md +34 -0
  276. package/package.json +8 -8
  277. package/project-template/.claude/hooks/stop.sh +3 -1
  278. package/dist/console-assets/assets/index-BvWWj69G.js +0 -557
  279. package/dist/console-assets/assets/index-Eo4PuNPl.css +0 -10
  280. package/dist/interfaces/ACPClient.d.ts +0 -107
  281. package/dist/interfaces/ACPClient.d.ts.map +0 -1
  282. package/dist/interfaces/ACPClient.js +0 -17
  283. package/dist/interfaces/ACPClient.js.map +0 -1
  284. package/dist/interfaces/AgentRuntime.d.ts +0 -40
  285. package/dist/interfaces/AgentRuntime.d.ts.map +0 -1
  286. package/dist/interfaces/AgentRuntime.js +0 -17
  287. package/dist/interfaces/AgentRuntime.js.map +0 -1
  288. package/dist/manager/agentmemory.d.ts +0 -6
  289. package/dist/manager/agentmemory.d.ts.map +0 -1
  290. package/dist/manager/agentmemory.js +0 -73
  291. package/dist/manager/agentmemory.js.map +0 -1
  292. package/dist/models/acp.d.ts +0 -64
  293. package/dist/models/acp.d.ts.map +0 -1
  294. package/dist/models/acp.js +0 -17
  295. package/dist/models/acp.js.map +0 -1
  296. package/dist/providers/LocalACPClient.d.ts +0 -27
  297. package/dist/providers/LocalACPClient.d.ts.map +0 -1
  298. package/dist/providers/LocalACPClient.js +0 -26
  299. package/dist/providers/LocalACPClient.js.map +0 -1
  300. package/dist/providers/adapters/AcpSdkAdapter.d.ts +0 -24
  301. package/dist/providers/adapters/AcpSdkAdapter.d.ts.map +0 -1
  302. package/dist/providers/adapters/AcpSdkAdapter.js +0 -439
  303. package/dist/providers/adapters/AcpSdkAdapter.js.map +0 -1
  304. package/dist/providers/adapters/acp-fs-handlers.d.ts +0 -26
  305. package/dist/providers/adapters/acp-fs-handlers.d.ts.map +0 -1
  306. package/dist/providers/adapters/acp-fs-handlers.js +0 -61
  307. package/dist/providers/adapters/acp-fs-handlers.js.map +0 -1
  308. package/dist/providers/adapters/acp-permissions.d.ts +0 -42
  309. package/dist/providers/adapters/acp-permissions.d.ts.map +0 -1
  310. package/dist/providers/adapters/acp-permissions.js +0 -76
  311. package/dist/providers/adapters/acp-permissions.js.map +0 -1
  312. package/dist/providers/adapters/acp-session-accumulator.d.ts +0 -55
  313. package/dist/providers/adapters/acp-session-accumulator.d.ts.map +0 -1
  314. package/dist/providers/adapters/acp-session-accumulator.js +0 -133
  315. package/dist/providers/adapters/acp-session-accumulator.js.map +0 -1
  316. package/dist/providers/adapters/acp-terminal-manager.d.ts +0 -56
  317. package/dist/providers/adapters/acp-terminal-manager.d.ts.map +0 -1
  318. package/dist/providers/adapters/acp-terminal-manager.js +0 -127
  319. package/dist/providers/adapters/acp-terminal-manager.js.map +0 -1
  320. package/project-template/logs/.gitkeep +0 -0
  321. package/skills/architecture-decision-records/SKILL.md +0 -207
  322. package/skills/backend/SKILL.md +0 -62
  323. package/skills/backend/references/api-design.md +0 -168
  324. package/skills/backend/references/caching.md +0 -181
  325. package/skills/backend/references/data-access.md +0 -173
  326. package/skills/backend/references/layering.md +0 -181
  327. package/skills/backend/references/observability.md +0 -190
  328. package/skills/backend/references/resilience.md +0 -201
  329. package/skills/backend/references/security.md +0 -186
  330. package/skills/backend-architect/SKILL.md +0 -119
  331. package/skills/code-reviewer/SKILL.md +0 -143
  332. package/skills/coding-standards/SKILL.md +0 -60
  333. package/skills/coding-standards/references/clean-code.md +0 -258
  334. package/skills/coding-standards/references/code-review.md +0 -192
  335. package/skills/coding-standards/references/commits-and-prs.md +0 -226
  336. package/skills/coding-standards/references/error-strategy.md +0 -193
  337. package/skills/coding-standards/references/naming.md +0 -185
  338. package/skills/coding-standards/references/tdd.md +0 -171
  339. package/skills/database/SKILL.md +0 -53
  340. package/skills/database/references/indexing.md +0 -190
  341. package/skills/database/references/migrations.md +0 -199
  342. package/skills/database/references/nosql.md +0 -185
  343. package/skills/database/references/queries.md +0 -295
  344. package/skills/database/references/scaling.md +0 -203
  345. package/skills/database/references/schema.md +0 -191
  346. package/skills/database-optimizer/SKILL.md +0 -168
  347. package/skills/debugging-workflow/SKILL.md +0 -244
  348. package/skills/dev-worker/SKILL.md +0 -40
  349. package/skills/dev-worker/references/architect.md +0 -139
  350. package/skills/dev-worker/references/backend.md +0 -163
  351. package/skills/dev-worker/references/frontend.md +0 -122
  352. package/skills/dev-worker/references/fullstack.md +0 -179
  353. package/skills/dev-worker/references/optimizer.md +0 -151
  354. package/skills/dev-worker/references/phaser.md +0 -109
  355. package/skills/dev-worker/references/prototyper.md +0 -171
  356. package/skills/dev-worker/references/reviewer.md +0 -122
  357. package/skills/dev-worker/references/security.md +0 -154
  358. package/skills/dev-worker/references/senior.md +0 -155
  359. package/skills/dev-worker/references/typescript.md +0 -65
  360. package/skills/dev-worker/references/writer.md +0 -201
  361. package/skills/devops/SKILL.md +0 -55
  362. package/skills/devops/references/ci-cd.md +0 -204
  363. package/skills/devops/references/containers.md +0 -272
  364. package/skills/devops/references/deploy.md +0 -201
  365. package/skills/devops/references/iac.md +0 -252
  366. package/skills/devops/references/observability.md +0 -228
  367. package/skills/devops/references/secrets.md +0 -178
  368. package/skills/devops-automator/SKILL.md +0 -164
  369. package/skills/frontend/SKILL.md +0 -52
  370. package/skills/frontend/references/accessibility.md +0 -222
  371. package/skills/frontend/references/components.md +0 -206
  372. package/skills/frontend/references/performance.md +0 -219
  373. package/skills/frontend/references/routing.md +0 -209
  374. package/skills/frontend/references/state.md +0 -190
  375. package/skills/frontend/references/testing.md +0 -216
  376. package/skills/frontend-developer/SKILL.md +0 -115
  377. package/skills/git-workflow/SKILL.md +0 -355
  378. package/skills/golang/SKILL.md +0 -49
  379. package/skills/golang/references/concurrency.md +0 -284
  380. package/skills/golang/references/errors.md +0 -241
  381. package/skills/golang/references/idioms.md +0 -285
  382. package/skills/golang/references/testing.md +0 -238
  383. package/skills/java/SKILL.md +0 -50
  384. package/skills/java/references/concurrency.md +0 -194
  385. package/skills/java/references/idioms.md +0 -283
  386. package/skills/java/references/testing.md +0 -228
  387. package/skills/kotlin/SKILL.md +0 -47
  388. package/skills/kotlin/references/coroutines.md +0 -240
  389. package/skills/kotlin/references/idioms.md +0 -268
  390. package/skills/kotlin/references/testing.md +0 -219
  391. package/skills/mobile/SKILL.md +0 -50
  392. package/skills/mobile/references/architecture.md +0 -204
  393. package/skills/mobile/references/navigation.md +0 -158
  394. package/skills/mobile/references/performance.md +0 -152
  395. package/skills/mobile/references/platform.md +0 -166
  396. package/skills/mobile/references/state-and-data.md +0 -174
  397. package/skills/python/SKILL.md +0 -51
  398. package/skills/python/THIRD_PARTY.md +0 -14
  399. package/skills/python/references/async.md +0 -218
  400. package/skills/python/references/error-handling.md +0 -254
  401. package/skills/python/references/idioms.md +0 -279
  402. package/skills/python/references/packaging.md +0 -233
  403. package/skills/python/references/testing.md +0 -269
  404. package/skills/python/references/typing.md +0 -292
  405. package/skills/qa-tester/SKILL.md +0 -186
  406. package/skills/rust/SKILL.md +0 -50
  407. package/skills/rust/references/async.md +0 -224
  408. package/skills/rust/references/errors.md +0 -240
  409. package/skills/rust/references/ownership.md +0 -263
  410. package/skills/rust/references/testing.md +0 -274
  411. package/skills/rust/references/traits.md +0 -250
  412. package/skills/security-engineer/SKILL.md +0 -157
  413. package/skills/sps-memory/SKILL.md +0 -213
  414. package/skills/sps-pipeline/SKILL.md +0 -476
  415. package/skills/swift/SKILL.md +0 -48
  416. package/skills/swift/references/concurrency.md +0 -280
  417. package/skills/swift/references/idioms.md +0 -334
  418. package/skills/swift/references/testing.md +0 -229
  419. package/skills/tax-worker/SKILL.md +0 -150
  420. package/skills/tax-worker/references/account-codes.md +0 -165
  421. package/skills/typescript/SKILL.md +0 -51
  422. package/skills/typescript/references/async.md +0 -241
  423. package/skills/typescript/references/errors.md +0 -208
  424. package/skills/typescript/references/idioms.md +0 -246
  425. package/skills/typescript/references/testing.md +0 -225
  426. package/skills/typescript/references/tooling.md +0 -208
  427. package/skills/typescript/references/types.md +0 -259
  428. package/skills/wiki-update/SKILL.md +0 -300
@@ -1,47 +0,0 @@
1
- ---
2
- name: kotlin
3
- description: Kotlin language skill — idioms, null safety, coroutines, testing. Covers JVM backend and Android. Pair with `backend` / `mobile` end skills and `coding-standards` for cross-language principles.
4
- origin: original
5
- ---
6
-
7
- # Kotlin
8
-
9
- Null safety, coroutines, expressive stdlib. Used for JVM backend (Ktor, Spring) and Android. **Language-focused**.
10
-
11
- ## When to load
12
-
13
- - Project primary language is Kotlin (JVM / Android / Multiplatform)
14
- - Reviewing Kotlin code
15
- - Coroutines / Flow / async design
16
- - Interop with Java (calling Java APIs, exposing Kotlin to Java)
17
-
18
- ## Core principles
19
-
20
- 1. **Nullability in the type system.** `String?` and `String` are different types; a `NullPointerException` in pure Kotlin code is almost always a mistake.
21
- 2. **`val` by default, `var` only when mutation is required.**
22
- 3. **Data classes for value objects.** `copy`, `equals`, `hashCode`, `toString` for free.
23
- 4. **Prefer expressions over statements.** `if`, `when`, `try` all return values.
24
- 5. **Sealed hierarchies over type codes.** Use `sealed class` / `sealed interface` + `when` with exhaustiveness.
25
- 6. **Coroutines for async.** Never `Thread.sleep` or `.get()` on a `Future` in a coroutine.
26
- 7. **No Java collections when Kotlin collections exist.** `List<T>` (Kotlin) is read-only; `MutableList<T>` is mutable.
27
- 8. **`let` / `run` / `apply` / `also` / `with` — know the difference, don't chain all five.**
28
-
29
- ## How to use references
30
-
31
- | Reference | When to load |
32
- |---|---|
33
- | [`references/idioms.md`](references/idioms.md) | Data classes, sealed classes, scope functions, extension fns, null safety |
34
- | [`references/coroutines.md`](references/coroutines.md) | `suspend`, `CoroutineScope`, structured concurrency, `Flow`, dispatchers |
35
- | [`references/testing.md`](references/testing.md) | JUnit 5, Kotest, MockK, turbine for Flow |
36
-
37
- ## Forbidden patterns (auto-reject)
38
-
39
- - `!!` (force-unwrap) without a comment justifying it's definitely non-null
40
- - `lateinit var` for anything that isn't initialized by a framework (DI, test setup)
41
- - `runBlocking` in library or backend request-path code
42
- - `GlobalScope` — always use a structured `CoroutineScope`
43
- - `Thread.sleep` inside a `suspend` function
44
- - `println` for logging in production code
45
- - Returning Kotlin `List<T>` from an API that Java callers will treat as mutable (or vice versa)
46
- - `Object` singletons holding mutable state
47
- - `runCatching { }.getOrNull()` swallowing errors silently
@@ -1,240 +0,0 @@
1
- # Kotlin — Coroutines
2
-
3
- `suspend`, scopes, dispatchers, `Flow`, cancellation. Structured concurrency is the model.
4
-
5
- ## `suspend` functions
6
-
7
- A `suspend fun` is a function that can pause (free its thread) and resume later.
8
-
9
- ```kotlin
10
- suspend fun fetchUser(id: String): User {
11
- val raw = httpClient.get("/users/$id")
12
- return User.fromJson(raw)
13
- }
14
- ```
15
-
16
- Call from another `suspend` function or from a `CoroutineScope.launch { ... }`. You can't call them from a regular function without `runBlocking` (for main / tests only).
17
-
18
- ## Structured concurrency
19
-
20
- Every coroutine runs in a `CoroutineScope`. When the scope is cancelled, all its children are cancelled. No orphan work.
21
-
22
- ```kotlin
23
- coroutineScope {
24
- val user = async { fetchUser(id) }
25
- val prefs = async { fetchPrefs(id) }
26
- render(user.await(), prefs.await())
27
- // if either throws, the other is cancelled and the exception bubbles
28
- }
29
- ```
30
-
31
- Rule: **no `GlobalScope.launch`, no bare `launch` at top level.** Attach every coroutine to a scope with a known lifecycle.
32
-
33
- ## Dispatchers
34
-
35
- | Dispatcher | Use |
36
- |---|---|
37
- | `Dispatchers.Default` | CPU-bound work (limited to # of cores) |
38
- | `Dispatchers.IO` | Blocking I/O (file, network, blocking JDBC) |
39
- | `Dispatchers.Main` | UI thread (Android, JavaFX) |
40
- | `Dispatchers.Unconfined` | Rarely needed; tests and hacks |
41
-
42
- ```kotlin
43
- suspend fun readFile(path: String): String =
44
- withContext(Dispatchers.IO) { File(path).readText() }
45
- ```
46
-
47
- Only switch dispatchers at boundaries. Don't spray `withContext(IO)` inside tight logic.
48
-
49
- ## `coroutineScope` vs. `supervisorScope`
50
-
51
- ```kotlin
52
- // coroutineScope: one failure cancels siblings (default)
53
- coroutineScope {
54
- launch { critical1() }
55
- launch { critical2() }
56
- }
57
-
58
- // supervisorScope: failures isolated
59
- supervisorScope {
60
- launch { optional1() } // if this fails, optional2 still runs
61
- launch { optional2() }
62
- }
63
- ```
64
-
65
- Default to `coroutineScope`. Use `supervisorScope` for independent tasks where one failure shouldn't kill the rest (e.g., background refreshes).
66
-
67
- ## Cancellation
68
-
69
- Cancellation is cooperative. A coroutine is cancelled when:
70
- - Its scope is cancelled.
71
- - A structured sibling throws (in `coroutineScope`).
72
- - `cancel()` is called on its `Job`.
73
-
74
- `suspend` functions check cancellation at suspension points. CPU-heavy loops must opt in:
75
-
76
- ```kotlin
77
- repeat(1_000_000) {
78
- doWork()
79
- yield() // or ensureActive()
80
- }
81
- ```
82
-
83
- Handle `CancellationException`:
84
- ```kotlin
85
- try {
86
- doWork()
87
- } catch (e: CancellationException) {
88
- // clean up, then RETHROW — don't swallow
89
- throw e
90
- } catch (e: Exception) {
91
- log.error("failed", e)
92
- }
93
- ```
94
-
95
- **Swallowing `CancellationException` breaks the scope contract.** Always re-throw.
96
-
97
- ## `async` / `await`
98
-
99
- For parallel computations that return values.
100
-
101
- ```kotlin
102
- val (u, o) = coroutineScope {
103
- val userD = async { getUser(id) }
104
- val ordsD = async { getOrders(id) }
105
- userD.await() to ordsD.await()
106
- }
107
- ```
108
-
109
- Don't use `async { ... }.await()` back-to-back when you could just call the `suspend` function. That's sequential work dressed up as parallel.
110
-
111
- ## Timeouts
112
-
113
- ```kotlin
114
- withTimeout(5.seconds) {
115
- slowOp()
116
- } // throws TimeoutCancellationException on timeout
117
-
118
- withTimeoutOrNull(5.seconds) {
119
- slowOp()
120
- } // returns null on timeout
121
- ```
122
-
123
- ## `Flow` — asynchronous streams
124
-
125
- `Flow` is a cold async sequence. It doesn't run until collected.
126
-
127
- ```kotlin
128
- fun tick(interval: Duration): Flow<Int> = flow {
129
- var i = 0
130
- while (currentCoroutineContext().isActive) {
131
- emit(i++)
132
- delay(interval)
133
- }
134
- }
135
-
136
- scope.launch {
137
- tick(1.seconds)
138
- .map { it * 2 }
139
- .filter { it > 10 }
140
- .take(5)
141
- .collect { println(it) }
142
- }
143
- ```
144
-
145
- Operators (`map`, `filter`, etc.) return new Flows; `collect` is the terminal.
146
-
147
- ### Cold vs. hot
148
-
149
- - **Cold** (`flow { }`, `flowOf`): starts fresh per collector.
150
- - **Hot** (`SharedFlow`, `StateFlow`): shared; values emitted regardless of collectors.
151
-
152
- Use `StateFlow` for "current value of X" (UI state). Use `SharedFlow` for events (broadcast). Use plain `Flow` for request/response.
153
-
154
- ### Backpressure
155
-
156
- ```kotlin
157
- flow.buffer(100) // buffered producer
158
- flow.conflate() // keep only latest
159
- flow.collectLatest { ... } // cancel prior collector when new value arrives
160
- ```
161
-
162
- ## Channels
163
-
164
- One-shot or producer/consumer.
165
-
166
- ```kotlin
167
- val channel = Channel<Job>(capacity = 100)
168
- launch {
169
- for (job in channel) { process(job) }
170
- }
171
- channel.send(job)
172
- channel.close()
173
- ```
174
-
175
- For most use cases, `Flow` is enough. Use `Channel` when you need direct send/receive semantics.
176
-
177
- ## Exception handling
178
-
179
- Exceptions propagate up the structured-concurrency tree. The parent coroutine sees them at `.await()` or when children complete.
180
-
181
- ```kotlin
182
- try {
183
- coroutineScope {
184
- launch { throwSomething() }
185
- }
186
- } catch (e: SomeError) {
187
- // caught here
188
- }
189
- ```
190
-
191
- Install a `CoroutineExceptionHandler` on a `CoroutineScope` for top-level handlers (Android ViewModel, server main). Don't scatter try/catch inside coroutines.
192
-
193
- ## `runBlocking` — only for `main` and tests
194
-
195
- Bridges blocking and suspending worlds. Inside a request handler or a library, `runBlocking` deadlocks threads. Don't.
196
-
197
- ```kotlin
198
- fun main() = runBlocking {
199
- myApp()
200
- }
201
-
202
- @Test fun test() = runBlocking {
203
- assertEquals(5, add(2, 3))
204
- }
205
- ```
206
-
207
- For tests, prefer `runTest` (from `kotlinx-coroutines-test`) — it virtualizes time.
208
-
209
- ## `runTest` — deterministic async tests
210
-
211
- ```kotlin
212
- @Test
213
- fun fetches() = runTest {
214
- val result = fetchUser("u1") // no real delay; virtual scheduler
215
- assertEquals("u1", result.id)
216
- advanceTimeBy(5.seconds) // control time
217
- }
218
- ```
219
-
220
- ## Android-specific coroutine scopes
221
-
222
- - `viewModelScope` — cancels on `ViewModel.onCleared()`
223
- - `lifecycleScope` — cancels on lifecycle destroy
224
- - `repeatOnLifecycle(STARTED) { flow.collect { ... } }` — cancels on stop, resumes on start
225
-
226
- Never use `GlobalScope` or raw `Job()` from within a component with a defined lifecycle.
227
-
228
- ## Anti-patterns
229
-
230
- | Anti-pattern | Fix |
231
- |---|---|
232
- | `GlobalScope.launch` | Attach to a scope with a known lifecycle |
233
- | `runBlocking` in request path / library code | Make the function `suspend` |
234
- | Swallowing `CancellationException` | Rethrow; scope relies on it |
235
- | `withContext(IO) { ... }` wrapping every line | Switch at I/O boundary only |
236
- | `async { x() }.await()` with no other work in parallel | Just call `x()` as a suspend fun |
237
- | `Thread.sleep` in `suspend fun` | Use `delay` |
238
- | `while (true) { doWork() }` with no yield | Add `yield()` / `ensureActive()` for cancellation |
239
- | `StateFlow` for events (drops duplicates) | Use `SharedFlow` for events |
240
- | Long-running Flow in `collect { ... }` on UI thread that blocks | `flowOn(Dispatchers.IO)` upstream |
@@ -1,268 +0,0 @@
1
- # Kotlin — Idioms
2
-
3
- Null safety, data classes, sealed classes, scope functions, extension functions.
4
-
5
- ## `val` / `var` / `const val`
6
-
7
- ```kotlin
8
- val name = "A" // immutable reference
9
- var count = 0 // mutable
10
- const val MAX = 10 // compile-time constant (top-level or in `object`)
11
- ```
12
-
13
- `val` by default. Reach for `var` only when you reassign.
14
-
15
- ## Nullable types
16
-
17
- ```kotlin
18
- var name: String? = null
19
- name.length // ❌ compile error
20
- name?.length // Int? — null if name is null
21
- name!!.length // throws NPE if null — avoid
22
- name ?: "unknown" // Elvis: use default if null
23
-
24
- if (name != null) {
25
- name.length // smart-cast to String
26
- }
27
- ```
28
-
29
- `!!` is a code smell. Every `!!` should have a comment saying why the value is guaranteed non-null there (and, ideally, a test that checks it).
30
-
31
- ## Type inference
32
-
33
- ```kotlin
34
- val n = 10 // Int
35
- val s = "hi" // String
36
- val users: List<User> = fetch() // annotate when intent is ambiguous
37
- ```
38
-
39
- Annotate public API return types for clarity; let locals infer.
40
-
41
- ## Data classes
42
-
43
- ```kotlin
44
- data class User(val id: String, val email: String, val active: Boolean)
45
-
46
- val u = User("u1", "a@x.com", true)
47
- val updated = u.copy(email = "b@x.com")
48
- u == User("u1", "a@x.com", true) // true — structural equality
49
- ```
50
-
51
- Data classes give you `equals`, `hashCode`, `toString`, `copy`, destructuring for free.
52
-
53
- Don't use data classes for types with behaviour or invariants. If you need a factory or a validation step, make it a regular class with a private constructor + `companion object` factory.
54
-
55
- ## Sealed classes — the Kotlin discriminated union
56
-
57
- ```kotlin
58
- sealed class Result<out T> {
59
- data class Ok<T>(val value: T) : Result<T>()
60
- data class Err(val error: String) : Result<Nothing>()
61
- }
62
-
63
- fun handle(r: Result<User>) = when (r) {
64
- is Result.Ok -> use(r.value)
65
- is Result.Err -> log(r.error)
66
- // `when` is exhaustive — no else needed
67
- }
68
- ```
69
-
70
- `sealed` limits subclasses to the same file (Kotlin < 1.5) or same module (1.5+).
71
-
72
- ## `when` — the superior switch
73
-
74
- ```kotlin
75
- val label = when (status) {
76
- Status.Active -> "active"
77
- Status.Pending -> "pending"
78
- Status.Banned -> "banned"
79
- }
80
-
81
- // Smart patterns
82
- val x = when {
83
- n < 0 -> "neg"
84
- n == 0 -> "zero"
85
- n in 1..10 -> "small"
86
- else -> "big"
87
- }
88
-
89
- // With is + smart-cast
90
- when (v) {
91
- is String -> v.length // v: String
92
- is Int -> v + 1 // v: Int
93
- }
94
- ```
95
-
96
- Exhaustive `when` over `sealed` / `enum` → no `else` required; the compiler forces you to update every branch when you add a case.
97
-
98
- ## Scope functions — `let` / `run` / `apply` / `also` / `with`
99
-
100
- ```kotlin
101
- user?.let { send(it) } // null-safe "do something with it"
102
- val formatted = user.run { "$name <$email>" } // use members inside
103
- val req = Request().apply { url = x; timeout = 5 } // configure, return self
104
- list.also { log("about to sort: $it") }.sort() // side effect, return self
105
- ```
106
-
107
- | | Receiver | Returns |
108
- |---|---|---|
109
- | `let` | `it` | lambda result |
110
- | `run` | `this` | lambda result |
111
- | `apply` | `this` | receiver |
112
- | `also` | `it` | receiver |
113
- | `with(x)` | `this` | lambda result |
114
-
115
- Quick guide:
116
- - **Side effect, keep value** → `also`
117
- - **Configure a builder** → `apply`
118
- - **Null-safe transformation** → `let`
119
- - **Computation using members** → `run`
120
-
121
- Don't chain three+ scope functions — it gets confusing fast.
122
-
123
- ## Extension functions
124
-
125
- Add methods to existing types without inheriting.
126
-
127
- ```kotlin
128
- fun String.toSlug(): String = lowercase().replace(" ", "-")
129
-
130
- "Hello World".toSlug() // "hello-world"
131
- ```
132
-
133
- Rules:
134
- - Can't access private members; no reflection shortcuts.
135
- - Dispatch is static (by declared type, not runtime type) — don't use to "override" methods.
136
- - Place in a file named for the extended type (`StringExt.kt`) or feature (`Slug.kt`).
137
-
138
- ## Destructuring
139
-
140
- ```kotlin
141
- val (id, email) = user // positional, for data classes
142
- val (key, value) = map.entries.first()
143
-
144
- for ((i, x) in list.withIndex()) { ... }
145
- ```
146
-
147
- Don't destructure too-far-apart fields; order becomes a secret convention.
148
-
149
- ## Default & named arguments
150
-
151
- ```kotlin
152
- fun send(to: String, subject: String, body: String = "", priority: Int = 0) { ... }
153
-
154
- send(to = "a@x.com", subject = "hi")
155
- send("a@x.com", "hi", priority = 1)
156
- ```
157
-
158
- Prefer named args at call sites with 3+ params. Defaults obviate overload explosions.
159
-
160
- ## Single-expression functions
161
-
162
- ```kotlin
163
- fun double(x: Int) = x * 2
164
- fun greet(name: String): String = "hi $name"
165
- ```
166
-
167
- Keep for functions that really fit on one line. Force explicit return type on public API.
168
-
169
- ## Collection API
170
-
171
- ```kotlin
172
- // Read-only vs mutable
173
- val immutable: List<Int> = listOf(1, 2, 3)
174
- val mutable: MutableList<Int> = mutableListOf(1, 2, 3)
175
-
176
- // Transformations
177
- users.filter { it.active }.map { it.email }
178
- users.groupBy { it.role }
179
- users.associateBy { it.id } // Map<id, user>
180
- users.sortedBy { it.name }
181
- users.partition { it.active } // Pair<active, inactive>
182
-
183
- // Aggregations
184
- users.count { it.active }
185
- users.sumOf { it.balance }
186
- users.maxByOrNull { it.age }
187
- ```
188
-
189
- Chain 2–3 ops. Beyond that, break into named intermediate values or pull into a function.
190
-
191
- `asSequence()` for lazy evaluation over large collections:
192
- ```kotlin
193
- users.asSequence().filter { ... }.map { ... }.take(10).toList()
194
- ```
195
-
196
- ## Ranges
197
-
198
- ```kotlin
199
- 1..10 // IntRange (inclusive)
200
- 1 until 10 // IntRange 1..9 (exclusive upper)
201
- 10 downTo 1 // reversed
202
- 1..10 step 2 // 1, 3, 5, 7, 9
203
- ```
204
-
205
- Prefer ranges over manual `for (i = ...; i < ...; i++)` — clearer intent.
206
-
207
- ## String templates
208
-
209
- ```kotlin
210
- val msg = "Hello $name, you have ${messages.size} messages"
211
- val raw = """
212
- Multi-line
213
- ${expression}
214
- """.trimIndent()
215
- ```
216
-
217
- No need for format strings in most cases.
218
-
219
- ## Object expressions & declarations
220
-
221
- ```kotlin
222
- // Singleton
223
- object Config {
224
- val url = "https://api.example.com"
225
- }
226
- Config.url
227
-
228
- // Anonymous object
229
- val listener = object : Listener {
230
- override fun onEvent(e: Event) { ... }
231
- }
232
- ```
233
-
234
- Use `object` for singletons and one-off anonymous impls. Avoid `object` for mutable state — it's a global and hard to test.
235
-
236
- ## `companion object`
237
-
238
- ```kotlin
239
- class User private constructor(val id: String) {
240
- companion object {
241
- fun create(email: String): User = User(generateId(email))
242
- }
243
- }
244
-
245
- User.create("a@x.com")
246
- ```
247
-
248
- Factory methods, constants, static-like helpers live here.
249
-
250
- ## Java interop essentials
251
-
252
- - `@JvmStatic` on `companion object` members to expose them as static methods to Java
253
- - `@JvmField` to expose a `val` / `var` as a Java field
254
- - `@JvmOverloads` to generate overloads for default params
255
- - Platform types (`String!`) — values from Java with unknown nullability; treat as non-null by convention OR check.
256
-
257
- ## Anti-patterns
258
-
259
- | Anti-pattern | Fix |
260
- |---|---|
261
- | `!!` used as "I promise this isn't null" | Restructure so the type proves it; or check and handle |
262
- | `lateinit` in application code | Use `by lazy { ... }` or pass via constructor |
263
- | `Unit`-returning function ending with `return Unit` | Implicit; remove |
264
- | `if-else` chain where `when` is clearer | Use `when` |
265
- | `var x: List<T> = mutableListOf()` — type vs reality mismatch | Pick one: `val x: MutableList<T>` or use `+` for new lists |
266
- | Data class used for behaviour-heavy type | Regular class; keep data classes for values |
267
- | Extension functions that hide bugs (subtle override attempts) | Extension dispatch is static; don't rely on polymorphism |
268
- | `companion object` holding request-scoped state | Request scope belongs on a request-scoped object |