@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,250 +0,0 @@
1
- # Rust — Traits
2
-
3
- Traits, generics, `impl Trait`, associated types, trait objects.
4
-
5
- ## What a trait is
6
-
7
- A trait is a set of methods a type implements. Like interfaces in Go / Java, but:
8
- - You can add a trait impl for a type you don't own (with orphan rule limits).
9
- - Traits can have default methods.
10
- - Generic bounds + associated types make them more expressive than Java interfaces.
11
-
12
- ```rust
13
- pub trait Store {
14
- fn get(&self, k: &str) -> Option<String>;
15
- fn put(&mut self, k: &str, v: &str);
16
- }
17
-
18
- pub struct MemStore { data: HashMap<String, String> }
19
-
20
- impl Store for MemStore {
21
- fn get(&self, k: &str) -> Option<String> { self.data.get(k).cloned() }
22
- fn put(&mut self, k: &str, v: &str) { self.data.insert(k.into(), v.into()); }
23
- }
24
- ```
25
-
26
- ## Define traits at the call site
27
-
28
- Same rule as Go. The consumer specifies what they need.
29
-
30
- ```rust
31
- // ✅ in the caller's module
32
- pub trait UserRepo {
33
- fn find(&self, id: &str) -> Option<User>;
34
- }
35
-
36
- pub struct Service<R: UserRepo> { repo: R }
37
- ```
38
-
39
- Don't pre-emptively define traits in the implementer's module; you don't yet know what consumers will need.
40
-
41
- ## Generics (static dispatch)
42
-
43
- ```rust
44
- fn first<T>(xs: &[T]) -> Option<&T> {
45
- xs.first()
46
- }
47
-
48
- // Bounded
49
- fn sum<T: std::ops::Add<Output = T> + Copy + Default>(xs: &[T]) -> T {
50
- xs.iter().copied().fold(T::default(), |a, b| a + b)
51
- }
52
-
53
- // Where clause for readability
54
- fn process<T, U>(xs: &[T]) -> Vec<U>
55
- where
56
- T: Clone + Debug,
57
- U: From<T>,
58
- {
59
- xs.iter().cloned().map(U::from).collect()
60
- }
61
- ```
62
-
63
- Each concrete instantiation produces specialized machine code — fast, but more compile time.
64
-
65
- ## Trait objects (dynamic dispatch)
66
-
67
- ```rust
68
- fn render_all(items: &[Box<dyn Renderable>]) { ... }
69
- ```
70
-
71
- Use when:
72
- - A collection has mixed concrete types.
73
- - You want to keep the trait out of callers' generic parameter lists.
74
- - Compile time matters more than a vtable indirection.
75
-
76
- A trait must be **object-safe** to be used as `dyn Trait`. Roughly: no generic methods, no `Self` in return type beyond `&Self` / `&mut Self`.
77
-
78
- ## `impl Trait`
79
-
80
- Two meanings depending on where it appears.
81
-
82
- ### Return position
83
-
84
- "I'm returning something that implements this trait, but don't pin me to a concrete type."
85
-
86
- ```rust
87
- fn make_iter() -> impl Iterator<Item = u32> {
88
- (0..10).map(|x| x * 2)
89
- }
90
- ```
91
-
92
- Cheaper than `Box<dyn Iterator<Item = u32>>` — static dispatch, no allocation. But the caller sees only `impl Iterator<...>`, not the concrete type.
93
-
94
- ### Argument position
95
-
96
- Syntactic sugar for a generic:
97
-
98
- ```rust
99
- fn log_all(items: impl Iterator<Item = String>) { ... }
100
- // same as
101
- fn log_all<I: Iterator<Item = String>>(items: I) { ... }
102
- ```
103
-
104
- ## Associated types vs. generic parameters
105
-
106
- ```rust
107
- // ✅ associated type — one impl per (type, associated output) pair
108
- trait Iterator {
109
- type Item;
110
- fn next(&mut self) -> Option<Self::Item>;
111
- }
112
-
113
- // ❌ would be wrong here — you could have a type be Iterator<u32> AND Iterator<String>, weird
114
- trait Iterator<T> {
115
- fn next(&mut self) -> Option<T>;
116
- }
117
- ```
118
-
119
- Use associated types when a trait has "the" output type for a given implementer. Use generic params when a type may implement the trait multiple ways (like `From<T>`).
120
-
121
- ## Default methods
122
-
123
- ```rust
124
- trait Greet {
125
- fn name(&self) -> &str;
126
- fn greet(&self) { println!("Hello, {}", self.name()); }
127
- }
128
- ```
129
-
130
- Implementers get `greet()` free unless they override. Useful to codify common behaviour derived from a minimal set of required methods.
131
-
132
- ## Blanket impls
133
-
134
- ```rust
135
- impl<T: Display> Loggable for T {
136
- fn log(&self) { println!("{self}"); }
137
- }
138
- ```
139
-
140
- Adds the trait to every type that satisfies the bound. Powerful; can cause conflicts if two blanket impls would overlap.
141
-
142
- ## Extension traits
143
-
144
- Add methods to a foreign type by defining a local trait that the foreign type implements via a local impl.
145
-
146
- ```rust
147
- pub trait VecExt<T> {
148
- fn into_sorted(self) -> Self;
149
- }
150
-
151
- impl<T: Ord> VecExt<T> for Vec<T> {
152
- fn into_sorted(mut self) -> Self { self.sort(); self }
153
- }
154
-
155
- let v = vec![3, 1, 2].into_sorted();
156
- ```
157
-
158
- Common in `futures` / `iter` ecosystems (`StreamExt`, `IteratorExt`).
159
-
160
- ## Common standard traits — derive them
161
-
162
- ```rust
163
- #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
164
- pub struct UserId(pub u64);
165
- ```
166
-
167
- | Trait | Meaning |
168
- |---|---|
169
- | `Debug` | `{:?}` formatter — always for types that appear in errors / logs |
170
- | `Clone` | Explicit deep copy |
171
- | `Copy` | Implicit copy (tiny value types only) |
172
- | `Default` | Zero value (`T::default()`) |
173
- | `PartialEq` / `Eq` | Equality |
174
- | `PartialOrd` / `Ord` | Ordering |
175
- | `Hash` | Key in `HashMap` / `HashSet` |
176
- | `Display` | `{}` formatter — implement by hand, not derive |
177
- | `Serialize` / `Deserialize` | `serde` |
178
-
179
- Don't implement `Display` reflexively — only for types that have a canonical string form.
180
-
181
- ## `From` / `Into` — conversions
182
-
183
- ```rust
184
- pub struct Email(String);
185
-
186
- impl From<String> for Email {
187
- fn from(s: String) -> Self { Self(s) }
188
- }
189
-
190
- // Get `Into` for free
191
- let e: Email = "a@x.com".to_string().into();
192
- ```
193
-
194
- Rule: implement `From`, get `Into` free. `TryFrom` / `TryInto` when the conversion may fail.
195
-
196
- ## `PhantomData`
197
-
198
- Tell the compiler about a type parameter that isn't in any field.
199
-
200
- ```rust
201
- use std::marker::PhantomData;
202
-
203
- pub struct Request<State> {
204
- url: String,
205
- _state: PhantomData<State>,
206
- }
207
-
208
- pub struct Unsent;
209
- pub struct Sent;
210
-
211
- impl Request<Unsent> {
212
- fn send(self) -> Request<Sent> { ... }
213
- }
214
- ```
215
-
216
- Enables typestate patterns without runtime cost.
217
-
218
- ## `Sync` and `Send`
219
-
220
- Auto-traits, derived automatically when all fields are.
221
-
222
- - `Send` — safe to transfer to another thread
223
- - `Sync` — safe to share (`&T`) between threads
224
-
225
- `Rc<T>` is neither. `Arc<T>` is both (if inner is `Send + Sync`). `Cell<T>` / `RefCell<T>` are `Send` but not `Sync`.
226
-
227
- If your code needs `T: Send + Sync + 'static`, you're probably building a concurrent abstraction. Don't add these bounds reflexively.
228
-
229
- ## Orphan rule
230
-
231
- You can implement `Trait` for `Type` only if at least one of `Trait` / `Type` is defined in your crate. Prevents conflicting impls across crates.
232
-
233
- Workaround: wrap the foreign type in a newtype of your own:
234
-
235
- ```rust
236
- struct MyVec<T>(Vec<T>);
237
- impl<T> SomeForeignTrait for MyVec<T> { ... }
238
- ```
239
-
240
- ## Anti-patterns
241
-
242
- | Anti-pattern | Fix |
243
- |---|---|
244
- | `Box<dyn Trait>` reflex where static dispatch is fine | Use generics unless you need heterogeneity |
245
- | Trait with 20 methods | Split into smaller traits; compose via super-traits |
246
- | Trait defined before there's a second implementer | Wait until you have real use; write concrete first |
247
- | `where T: Sized + Clone + Send + Sync + 'static + Debug` reflex | Only add bounds the code actually uses |
248
- | `impl<T> MyTrait for T` blanket that conflicts with stdlib | Narrow the bound |
249
- | Using `Box<dyn Fn>` when `impl Fn` works | Pay the allocation only when storing closures of different shapes together |
250
- | `#[derive(Clone)]` on every struct | Consider whether callers should clone; they probably shouldn't for big things |
@@ -1,157 +0,0 @@
1
- ---
2
- name: security-engineer
3
- description: Persona skill — think like a security engineer. Threat-model, enforce least privilege, never roll your own crypto. Overlay on top of `backend` / `devops` + language skills.
4
- origin: original
5
- ---
6
-
7
- # Security Engineer
8
-
9
- Security is correctness under an adversary. This is a **mindset overlay** — see `backend/references/security.md` and `devops/references/secrets.md` for patterns.
10
-
11
- ## When to load
12
-
13
- - Reviewing a PR that touches auth, input parsing, crypto, or PII
14
- - Designing a new externally-facing API
15
- - Auditing an existing system for common weaknesses
16
- - Incident response (suspected breach, leaked credential)
17
- - Reviewing infra-as-code for misconfigurations
18
-
19
- ## The posture
20
-
21
- 1. **Trust nothing from the outside.** Every input is hostile until proven otherwise.
22
- 2. **Least privilege, everywhere.** Every identity — human, service, CI — gets only what it needs.
23
- 3. **Defense in depth.** A single control will fail. Stack them.
24
- 4. **Never roll your own crypto.** Use the standard library; use a vetted library; don't invent.
25
- 5. **Assume breach.** How do we detect? How do we contain? How do we recover?
26
- 6. **Security is an everyday discipline, not a sprint.** Shifts in threat and infra happen constantly.
27
- 7. **Quiet about specifics, loud about patterns.** Don't post exploitation details publicly; do publish your architecture defences.
28
-
29
- ## The questions you always ask
30
-
31
- - **Who's the attacker? What are they after?** — a threat model in one line.
32
- - **What's the blast radius of compromising this credential?**
33
- - **Is this input validated at the edge?**
34
- - **Is every action authorized — not just authenticated?**
35
- - **Where are the secrets?** And who has access?
36
- - **What would a malicious employee do with this access?**
37
- - **What would a stolen laptop let someone do?**
38
- - **Are we logging this access?** Can we tell who did what, when?
39
- - **What's the incident response plan?** If we find out right now that X is compromised, what do we do?
40
-
41
- ## Review checklist (security-focused)
42
-
43
- ### Input handling
44
- - [ ] All external input validated at the edge (whitelist, schemas).
45
- - [ ] Parsed into strong types; no raw dicts flowing deep.
46
- - [ ] No SQL / command / template / LDAP injection pathways.
47
- - [ ] Path traversal defended (canonicalize + whitelist).
48
- - [ ] Upload limits (size, type, count).
49
-
50
- ### AuthN / AuthZ
51
- - [ ] Auth check at the boundary of every non-public endpoint.
52
- - [ ] Authorization evaluated per action (not just "logged in").
53
- - [ ] 403 vs. 404 decided deliberately for enumeration resistance.
54
- - [ ] MFA for sensitive operations (admin, exports, destructive).
55
- - [ ] Session / token lifetimes short; refresh + revoke flow.
56
-
57
- ### Secrets
58
- - [ ] No secrets in code, CI config, or images.
59
- - [ ] Secret manager in use; rotation on schedule + on compromise.
60
- - [ ] Short-lived creds via workload identity where possible.
61
- - [ ] Pre-commit + CI scanning (gitleaks, trufflehog).
62
-
63
- ### Crypto
64
- - [ ] TLS 1.2+ everywhere; cert pinning where warranted.
65
- - [ ] Password hashing: argon2id or bcrypt (cost ≥ 12).
66
- - [ ] Symmetric crypto: AES-GCM via library; never ECB.
67
- - [ ] Asymmetric: Ed25519 / RSA-2048+; key rotation documented.
68
- - [ ] No custom crypto constructions.
69
-
70
- ### Data
71
- - [ ] PII inventory known; minimization applied.
72
- - [ ] Encryption at rest for sensitive stores.
73
- - [ ] Backups encrypted; restore access audited.
74
- - [ ] Data retention policy defined and enforced.
75
-
76
- ### Platform
77
- - [ ] Containers run as non-root.
78
- - [ ] IAM roles scoped per service; no "admin" defaults.
79
- - [ ] Network policies: only required services talk to each other.
80
- - [ ] Public endpoints reviewed; no accidentally-public buckets / DBs.
81
- - [ ] CSP / security headers on HTML-serving endpoints.
82
-
83
- ### Logging & audit
84
- - [ ] Security-relevant events logged (login, password change, role change, sensitive access).
85
- - [ ] Logs immutable, separate storage.
86
- - [ ] Alerts on suspicious patterns (many failed logins, new geo, privilege change).
87
-
88
- ## Threat modelling — STRIDE briefly
89
-
90
- For each asset or flow, ask:
91
- - **S**poofing — can someone pretend to be someone they aren't?
92
- - **T**ampering — can the data in transit / at rest be changed?
93
- - **R**epudiation — can an action be denied by its actor?
94
- - **I**nformation disclosure — can an outsider read what they shouldn't?
95
- - **D**enial of service — can someone make this unavailable?
96
- - **E**levation of privilege — can they get to where they shouldn't be?
97
-
98
- Not every line of code needs a STRIDE pass. Any new externally-facing surface does.
99
-
100
- ## Incident response
101
-
102
- ### Detection → containment → eradication → recovery → lessons
103
-
104
- 1. **Detection**: alerts fired, or someone noticed.
105
- 2. **Containment**: rotate keys, disable compromised accounts, isolate hosts.
106
- 3. **Eradication**: remove the malicious presence / foothold.
107
- 4. **Recovery**: restore clean state; re-enable services.
108
- 5. **Lessons**: postmortem, broadcast across the team.
109
-
110
- Dry-run the playbook. An incident isn't the time to learn the procedure.
111
-
112
- ### Communications during an incident
113
-
114
- - **Short, frequent updates** to the right audience.
115
- - **Internal**: what's compromised, what's being done, ETA.
116
- - **External**: what users should do, what you're committing to disclose.
117
- - **Regulatory**: depending on jurisdiction + data type, required timelines (GDPR, CCPA, breach-notification laws).
118
-
119
- Don't over-promise; don't under-report.
120
-
121
- ## Tradeoffs you name
122
-
123
- - **Usability vs. security.** Every security control has a UX cost. Minimize friction for common paths; slow down destructive paths.
124
- - **Detection vs. prevention.** Some attacks are cheaper to detect than prevent.
125
- - **Strict vs. permissive default.** Prefer strict; allow-list.
126
- - **Short-lived vs. long-lived creds.** Short-lived is safer; plan for the operational cost.
127
- - **In-house expertise vs. vendor.** Buy standard controls (identity, secret management); don't build.
128
-
129
- ## What you always push back on
130
-
131
- - **"Security through obscurity"** presented as a control.
132
- - **"We'll fix it after launch"** for input validation, auth, or crypto.
133
- - **New custom auth / crypto code** — use vetted libraries.
134
- - **Broad permissions "to make it work."** Narrow; exceptions are logged.
135
- - **Logging tokens or PII for debugging.**
136
- - **"The attacker wouldn't bother with us."** Yes, they would. Scans are automated.
137
- - **"Trust the client."** Never.
138
- - **CVSS-high dependency CVEs left unpatched past the agreed SLA.**
139
-
140
- ## Forbidden patterns
141
-
142
- - Hand-rolled crypto
143
- - Comparing secrets with `==` (timing attack)
144
- - Different error messages for "user doesn't exist" vs. "bad password"
145
- - Storing JWTs in `localStorage`
146
- - Running prod DB / cache publicly accessible
147
- - Tokens in URLs (logged by proxies, referrer headers, browser history)
148
- - Disabling TLS verification "temporarily"
149
- - `SELECT ... WHERE id = ${user_input}` — parameterize
150
- - Console-based ad-hoc access to prod without audit trail
151
- - Sharing admin creds in team messaging
152
-
153
- ## Pair with
154
-
155
- - [`backend/references/security.md`](../backend/references/security.md) — concrete patterns.
156
- - [`devops/references/secrets.md`](../devops/references/secrets.md) — secret management.
157
- - [`debugging-workflow`](../debugging-workflow/SKILL.md) — how to approach a live incident.
@@ -1,213 +0,0 @@
1
- ---
2
- name: sps-memory
3
- description: |
4
- SPS persistent memory system — read and write project knowledge, user preferences,
5
- and per-agent observations across sessions. **Auto-injected into Worker prompts**
6
- by StageEngine (no manual fetch needed inside cards). Proactively use when the
7
- user mentions remembering something, project conventions, past decisions, or when
8
- you discover non-obvious information worth persisting. (🪸 Coral SPS, v0.51+)
9
- ---
10
-
11
- # SPS Memory (v0.51 — auto-injected into Worker prompts)
12
-
13
- A 3-layer markdown-on-disk persistence used to carry **non-obvious, reusable facts**
14
- across sessions and across pipeline cards. Lives entirely under `~/.coral/memory/`;
15
- each layer is a flat directory of `*.md` files plus a `MEMORY.md` index.
16
-
17
- ## When SPS injects this for you (pipeline mode)
18
-
19
- When a card is dispatched, `StageEngine.buildStagePrompt` calls
20
- `buildFullMemoryContext({ project, cardSeq })` and folds the result into the prompt's
21
- `knowledge` section — **before** the task description. So inside a card, **you
22
- already see relevant memory**; you don't need to `cat` it.
23
-
24
- What you still need to do:
25
- 1. **Read more context if relevant** — the auto-inject only includes the headline
26
- index + recent items. To see a specific memory file, `cat` it.
27
- 2. **Write new memories when discovery happens** — covered below.
28
-
29
- In `sps agent` (harness) mode, memory is **not** auto-injected. Use the `cat`
30
- patterns at the bottom to pull what you need.
31
-
32
- ## Three layers
33
-
34
- | Layer | Path | Scope | When to use |
35
- |---|---|---|---|
36
- | **User** | `~/.coral/memory/user/` | Cross-project preferences | Coding style, language, workflow habits ("prefers Chinese comments", "uses strict TypeScript") |
37
- | **Agent** | `~/.coral/memory/agents/<agentId>/` | Per daemon instance / per-agent identity | User-interaction patterns you observed, communication preferences specific to this agent ↔ user pair |
38
- | **Project** | `~/.coral/memory/projects/<project-name>/` | Per project | Conventions, architecture decisions, lessons learned, external resource pointers |
39
-
40
- To detect which project the cwd belongs to: scan `~/.coral/projects/*/conf` for a
41
- matching `PROJECT_DIR=`. Pipeline workers always know via `$SPS_PROJECT` env var.
42
-
43
- ## File format
44
-
45
- ```markdown
46
- ---
47
- name: Short title
48
- description: One-line summary (used by index + future fuzzy search)
49
- type: convention | decision | lesson | reference
50
- ---
51
-
52
- Body. For decision/lesson types, include:
53
-
54
- **Why:** the reason / past incident driving this
55
- **Scope:** where this applies (file glob, module, role, ...)
56
- ```
57
-
58
- Filename = slugified `name` (lowercase, hyphens). The CLI does this for you; if
59
- writing by hand, keep it under 50 chars.
60
-
61
- ## Memory types
62
-
63
- | Type | Decay | Use for |
64
- |---|---|---|
65
- | `convention` | Never | Project rules, coding standards, naming conventions |
66
- | `decision` | Slow | Architecture choices, technology selections |
67
- | `lesson` | 30 days | Pitfalls, debugging discoveries, things that broke |
68
- | `reference` | Never | Pointers to external dashboards, runbooks, dependencies |
69
-
70
- `convention` and `reference` never expire; `decision` is auto-deprioritized after
71
- months of no touch; `lesson` decays at 30 days unless re-read.
72
-
73
- ## Index file (`MEMORY.md`)
74
-
75
- Each layer's directory has a `MEMORY.md` index — one line per memory file:
76
-
77
- ```markdown
78
- - [API uses camelCase](api-naming.md) — All REST endpoints use camelCase
79
- - [Auth middleware location](auth-middleware.md) — middleware/auth.ts; not in routes
80
- ```
81
-
82
- After writing a memory file, **always** append (or update) one line in the
83
- sibling `MEMORY.md`. The auto-injector reads `MEMORY.md` first to decide what to
84
- load.
85
-
86
- ## When to read
87
-
88
- - At the start of a card or task — auto-injected for you in pipeline mode
89
- - Before answering a question that could conflict with prior decisions
90
- - When the user says "do you remember", "we agreed", "我们之前说过"
91
- - Before recommending a pattern that might violate a known convention
92
-
93
- ```bash
94
- # Project memory index
95
- cat ~/.coral/memory/projects/<project>/MEMORY.md 2>/dev/null
96
-
97
- # User preferences (always-applicable)
98
- cat ~/.coral/memory/user/MEMORY.md 2>/dev/null
99
-
100
- # Specific memory file
101
- cat ~/.coral/memory/projects/<project>/api-naming.md
102
- ```
103
-
104
- ## When to write
105
-
106
- Only when **all** are true:
107
- - The fact is **non-obvious** (not derivable from `git log`, code, or CLAUDE.md)
108
- - It will be **reusable** across future sessions / cards
109
- - It's **stable enough** to outlive the current task
110
-
111
- Trigger words / situations:
112
- | Situation | Type |
113
- |---|---|
114
- | User states a project rule or preference | `convention` |
115
- | Architectural choice discussed and agreed | `decision` |
116
- | Bug fixed where the root cause was sneaky / non-obvious | `lesson` |
117
- | User points to an external dashboard, runbook, or repo | `reference` |
118
- | You observe a user communication style worth keeping | agent-layer note |
119
-
120
- **Most cards do NOT need memory.** If you're unsure → don't write. Memory is
121
- expensive (read budget on every future card). Empty growth is worse than no
122
- growth.
123
-
124
- ## Writing patterns
125
-
126
- ### Via CLI (recommended for project memories)
127
-
128
- ```bash
129
- sps memory add <project> \
130
- --type convention \
131
- --name "API uses camelCase" \
132
- --description "All REST endpoints use camelCase naming" \
133
- --body "REST API endpoints use camelCase. No snake_case.\n\n**Why:** Frontend SDK auto-generates types from API schema."
134
- ```
135
-
136
- The CLI:
137
- - Slugifies name → filename
138
- - Writes the file with proper frontmatter
139
- - Appends/updates the line in `MEMORY.md`
140
-
141
- ### By hand (for user / agent layer)
142
-
143
- ```bash
144
- mkdir -p ~/.coral/memory/projects/my-project
145
- cat > ~/.coral/memory/projects/my-project/api-naming.md << 'EOF'
146
- ---
147
- name: API uses camelCase
148
- description: All REST endpoints use camelCase naming
149
- type: convention
150
- ---
151
-
152
- REST API endpoints use camelCase. No snake_case.
153
- **Why:** Frontend SDK auto-generates types from API schema.
154
- EOF
155
-
156
- # Update index — keep entry one line, ≤ 100 chars
157
- echo '- [API naming](api-naming.md) — camelCase for all REST endpoints' \
158
- >> ~/.coral/memory/projects/my-project/MEMORY.md
159
- ```
160
-
161
- ## What NOT to save
162
-
163
- - **Code structure / file paths** — derivable from `Read` / `Glob`
164
- - **Git history / blame** — use `git log`
165
- - **Temporary debugging state** — use the conversation
166
- - **Anything already in CLAUDE.md or `docs/`** — don't duplicate
167
- - **Card or task state** — that's runtime, not knowledge
168
- - **Wiki content** — if it belongs in structured knowledge (modules / decisions /
169
- lessons cross-linked), use the **wiki-update skill** instead. Memory is for
170
- ad-hoc / personal facts; Wiki is for structured project knowledge with
171
- cross-references and 5-layer prompt injection.
172
-
173
- ## CLI commands
174
-
175
- ```bash
176
- sps memory list <project> # show project memory index
177
- sps memory list # global view (user)
178
- sps memory list --agent <agentId> # include agent layer
179
-
180
- sps memory context <project> # ★ preview full inject (debug)
181
- sps memory context <project> --card <seq> # card-scoped (matches Worker prompt)
182
-
183
- sps memory add <project> \
184
- --type convention \
185
- --name "title" \
186
- --description "one-line summary" \
187
- --body "content"
188
- ```
189
-
190
- ## Memory vs Wiki — pick the right tool
191
-
192
- | Need | Use |
193
- |---|---|
194
- | User said "remember I prefer ..." | Memory (`user` or `project` layer) |
195
- | Decision recorded in a card review | Could be either; prefer **wiki/decisions/** if it's about the project's architecture (linkable, surfacable to all future cards), memory for personal/team workflow choices |
196
- | Bug fix with non-obvious root cause | **wiki/lessons/** (cross-linked, structured) — memory `lesson` is fallback when wiki not enabled |
197
- | Module purpose / API contract summary | **wiki/modules/** |
198
- | External dashboard URL | Memory `reference` |
199
- | Personal coding style note | Memory (`user`) |
200
-
201
- **Wiki requires `WIKI_ENABLED=true` in project conf** (v0.51+). When wiki is on,
202
- prefer it for project-level structured knowledge — it gets cross-references,
203
- linting, and 5-layer prompt injection. Memory remains the right place for ad-hoc
204
- flat facts and personal preferences.
205
-
206
- ## Honesty rules
207
-
208
- - Don't invent memories. Only write what the user said or you genuinely discovered.
209
- - Don't echo what's already in `MEMORY.md` index.
210
- - If a memory turns out wrong later, **edit or delete it** — don't pile a
211
- contradiction on top.
212
- - Stale `lesson` (>30 days, no recent reference) — feel free to delete or
213
- promote to `convention` if it's hardened into project rule.