@ketecode/loom 0.0.0-stage → 0.1.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 (656) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +516 -2
  3. package/agents/accessibility-reviewer/AGENT.md +70 -0
  4. package/agents/accessibility-reviewer/evals/triggers.json +15 -0
  5. package/agents/agent-evaluator/AGENT.md +74 -0
  6. package/agents/agent-evaluator/evals/triggers.json +15 -0
  7. package/agents/architect/AGENT.md +82 -0
  8. package/agents/architect/evals/triggers.json +17 -0
  9. package/agents/billing-reviewer/AGENT.md +68 -0
  10. package/agents/billing-reviewer/evals/triggers.json +16 -0
  11. package/agents/code-reviewer/AGENT.md +51 -0
  12. package/agents/code-reviewer/evals/triggers.json +14 -0
  13. package/agents/code-simplifier/AGENT.md +74 -0
  14. package/agents/code-simplifier/evals/triggers.json +15 -0
  15. package/agents/cpp-build-resolver/AGENT.md +73 -0
  16. package/agents/cpp-build-resolver/evals/triggers.json +16 -0
  17. package/agents/cpp-reviewer/AGENT.md +59 -0
  18. package/agents/cpp-reviewer/evals/triggers.json +16 -0
  19. package/agents/csharp-build-resolver/AGENT.md +84 -0
  20. package/agents/csharp-build-resolver/evals/triggers.json +17 -0
  21. package/agents/csharp-reviewer/AGENT.md +88 -0
  22. package/agents/csharp-reviewer/evals/triggers.json +17 -0
  23. package/agents/dart-build-resolver/AGENT.md +80 -0
  24. package/agents/dart-build-resolver/evals/triggers.json +17 -0
  25. package/agents/dart-reviewer/AGENT.md +66 -0
  26. package/agents/dart-reviewer/evals/triggers.json +17 -0
  27. package/agents/database-reviewer/AGENT.md +72 -0
  28. package/agents/database-reviewer/evals/triggers.json +16 -0
  29. package/agents/django-reviewer/AGENT.md +61 -0
  30. package/agents/django-reviewer/evals/triggers.json +15 -0
  31. package/agents/doc-updater/AGENT.md +92 -0
  32. package/agents/doc-updater/evals/triggers.json +14 -0
  33. package/agents/e2e-runner/AGENT.md +88 -0
  34. package/agents/e2e-runner/evals/triggers.json +16 -0
  35. package/agents/fastapi-reviewer/AGENT.md +63 -0
  36. package/agents/fastapi-reviewer/evals/triggers.json +15 -0
  37. package/agents/flutter-reviewer/AGENT.md +70 -0
  38. package/agents/flutter-reviewer/evals/triggers.json +15 -0
  39. package/agents/fsharp-build-resolver/AGENT.md +81 -0
  40. package/agents/fsharp-build-resolver/evals/triggers.json +15 -0
  41. package/agents/fsharp-reviewer/AGENT.md +77 -0
  42. package/agents/fsharp-reviewer/evals/triggers.json +15 -0
  43. package/agents/go-build-resolver/AGENT.md +85 -0
  44. package/agents/go-build-resolver/evals/triggers.json +16 -0
  45. package/agents/go-reviewer/AGENT.md +66 -0
  46. package/agents/go-reviewer/evals/triggers.json +16 -0
  47. package/agents/healthcare-reviewer/AGENT.md +65 -0
  48. package/agents/healthcare-reviewer/evals/triggers.json +16 -0
  49. package/agents/i18n-reviewer/AGENT.md +64 -0
  50. package/agents/i18n-reviewer/evals/triggers.json +16 -0
  51. package/agents/infra-reviewer/AGENT.md +93 -0
  52. package/agents/infra-reviewer/evals/triggers.json +15 -0
  53. package/agents/java-build-resolver/AGENT.md +82 -0
  54. package/agents/java-build-resolver/evals/triggers.json +16 -0
  55. package/agents/java-reviewer/AGENT.md +64 -0
  56. package/agents/java-reviewer/evals/triggers.json +16 -0
  57. package/agents/kotlin-build-resolver/AGENT.md +89 -0
  58. package/agents/kotlin-build-resolver/evals/triggers.json +16 -0
  59. package/agents/kotlin-reviewer/AGENT.md +75 -0
  60. package/agents/kotlin-reviewer/evals/triggers.json +16 -0
  61. package/agents/mle-reviewer/AGENT.md +68 -0
  62. package/agents/mle-reviewer/evals/triggers.json +16 -0
  63. package/agents/network-config-reviewer/AGENT.md +68 -0
  64. package/agents/network-config-reviewer/evals/triggers.json +17 -0
  65. package/agents/payments-reviewer/AGENT.md +64 -0
  66. package/agents/payments-reviewer/evals/triggers.json +16 -0
  67. package/agents/performance-optimizer/AGENT.md +86 -0
  68. package/agents/performance-optimizer/evals/triggers.json +16 -0
  69. package/agents/perl-build-resolver/AGENT.md +84 -0
  70. package/agents/perl-build-resolver/evals/triggers.json +15 -0
  71. package/agents/perl-reviewer/AGENT.md +77 -0
  72. package/agents/perl-reviewer/evals/triggers.json +15 -0
  73. package/agents/php-build-resolver/AGENT.md +88 -0
  74. package/agents/php-build-resolver/evals/triggers.json +16 -0
  75. package/agents/php-reviewer/AGENT.md +61 -0
  76. package/agents/php-reviewer/evals/triggers.json +15 -0
  77. package/agents/planner/AGENT.md +75 -0
  78. package/agents/planner/evals/triggers.json +17 -0
  79. package/agents/pr-test-analyzer/AGENT.md +82 -0
  80. package/agents/pr-test-analyzer/evals/triggers.json +16 -0
  81. package/agents/python-build-resolver/AGENT.md +87 -0
  82. package/agents/python-build-resolver/evals/triggers.json +16 -0
  83. package/agents/python-reviewer/AGENT.md +63 -0
  84. package/agents/python-reviewer/evals/triggers.json +15 -0
  85. package/agents/rag-reviewer/AGENT.md +71 -0
  86. package/agents/rag-reviewer/evals/triggers.json +16 -0
  87. package/agents/react-reviewer/AGENT.md +70 -0
  88. package/agents/react-reviewer/evals/triggers.json +16 -0
  89. package/agents/refactor-cleaner/AGENT.md +82 -0
  90. package/agents/refactor-cleaner/evals/triggers.json +16 -0
  91. package/agents/ruby-build-resolver/AGENT.md +93 -0
  92. package/agents/ruby-build-resolver/evals/triggers.json +16 -0
  93. package/agents/ruby-reviewer/AGENT.md +62 -0
  94. package/agents/ruby-reviewer/evals/triggers.json +16 -0
  95. package/agents/rust-build-resolver/AGENT.md +98 -0
  96. package/agents/rust-build-resolver/evals/triggers.json +16 -0
  97. package/agents/rust-reviewer/AGENT.md +78 -0
  98. package/agents/rust-reviewer/evals/triggers.json +15 -0
  99. package/agents/security-reviewer/AGENT.md +84 -0
  100. package/agents/security-reviewer/evals/triggers.json +16 -0
  101. package/agents/silent-failure-hunter/AGENT.md +66 -0
  102. package/agents/silent-failure-hunter/evals/triggers.json +16 -0
  103. package/agents/solidity-reviewer/AGENT.md +70 -0
  104. package/agents/solidity-reviewer/evals/triggers.json +16 -0
  105. package/agents/swift-build-resolver/AGENT.md +85 -0
  106. package/agents/swift-build-resolver/evals/triggers.json +15 -0
  107. package/agents/swift-reviewer/AGENT.md +75 -0
  108. package/agents/swift-reviewer/evals/triggers.json +15 -0
  109. package/agents/typescript-build-resolver/AGENT.md +76 -0
  110. package/agents/typescript-build-resolver/evals/triggers.json +15 -0
  111. package/agents/typescript-reviewer/AGENT.md +76 -0
  112. package/agents/typescript-reviewer/evals/triggers.json +15 -0
  113. package/agents/vue-reviewer/AGENT.md +75 -0
  114. package/agents/vue-reviewer/evals/triggers.json +15 -0
  115. package/bin/kete-loom.js +683 -0
  116. package/commands/aside.md +19 -0
  117. package/commands/build-fix.md +26 -0
  118. package/commands/campaign.md +19 -0
  119. package/commands/changelog.md +36 -0
  120. package/commands/checkpoint.md +26 -0
  121. package/commands/codemap.md +25 -0
  122. package/commands/commit.md +26 -0
  123. package/commands/deps-audit.md +32 -0
  124. package/commands/epic-decompose.md +21 -0
  125. package/commands/explain.md +37 -0
  126. package/commands/feature-dev.md +22 -0
  127. package/commands/hookify.md +23 -0
  128. package/commands/i18n-check.md +39 -0
  129. package/commands/issue-sync.md +22 -0
  130. package/commands/jira.md +19 -0
  131. package/commands/learn.md +23 -0
  132. package/commands/loom.md +21 -0
  133. package/commands/loop.md +20 -0
  134. package/commands/model-route.md +27 -0
  135. package/commands/onboard.md +35 -0
  136. package/commands/orchestrate.md +21 -0
  137. package/commands/plan-feature.md +36 -0
  138. package/commands/postmortem.md +42 -0
  139. package/commands/pr-describe.md +39 -0
  140. package/commands/pr.md +22 -0
  141. package/commands/prd.md +41 -0
  142. package/commands/project-init.md +21 -0
  143. package/commands/refactor-clean.md +24 -0
  144. package/commands/resume-session.md +22 -0
  145. package/commands/review.md +35 -0
  146. package/commands/save-session.md +37 -0
  147. package/commands/security-scan.md +32 -0
  148. package/commands/sessions.md +21 -0
  149. package/commands/skill-create.md +21 -0
  150. package/commands/tdd.md +36 -0
  151. package/commands/test-coverage.md +24 -0
  152. package/commands/threat-model.md +36 -0
  153. package/commands/update-docs.md +25 -0
  154. package/commands/verify.md +21 -0
  155. package/hooks/block-dangerous-commands/HOOK.md +30 -0
  156. package/hooks/block-dangerous-commands/cases.json +50 -0
  157. package/hooks/block-dangerous-commands/hook.js +75 -0
  158. package/hooks/block-no-verify/HOOK.md +25 -0
  159. package/hooks/block-no-verify/cases.json +30 -0
  160. package/hooks/block-no-verify/hook.js +43 -0
  161. package/hooks/format-on-edit/HOOK.md +24 -0
  162. package/hooks/format-on-edit/hook.js +89 -0
  163. package/hooks/guard-secrets/HOOK.md +19 -0
  164. package/hooks/guard-secrets/cases.json +110 -0
  165. package/hooks/guard-secrets/hook.js +44 -0
  166. package/hooks/load-session-context/HOOK.md +20 -0
  167. package/hooks/load-session-context/hook.js +56 -0
  168. package/hooks/protect-files/HOOK.md +24 -0
  169. package/hooks/protect-files/cases.json +27 -0
  170. package/hooks/protect-files/hook.js +39 -0
  171. package/hooks/run.js +132 -0
  172. package/mcp/atlassian.json +11 -0
  173. package/mcp/chrome-devtools.json +18 -0
  174. package/mcp/cloudflare.json +11 -0
  175. package/mcp/context7.json +11 -0
  176. package/mcp/fetch.json +17 -0
  177. package/mcp/figma.json +11 -0
  178. package/mcp/git.json +17 -0
  179. package/mcp/github.json +11 -0
  180. package/mcp/linear.json +11 -0
  181. package/mcp/memory.json +18 -0
  182. package/mcp/notion.json +11 -0
  183. package/mcp/playwright.json +18 -0
  184. package/mcp/sentry.json +11 -0
  185. package/mcp/stripe.json +11 -0
  186. package/mcp/supabase.json +11 -0
  187. package/mcp/time.json +17 -0
  188. package/package.json +59 -4
  189. package/profiles.json +165 -0
  190. package/rules/common.md +21 -0
  191. package/rules/cpp.md +29 -0
  192. package/rules/csharp.md +25 -0
  193. package/rules/dart.md +29 -0
  194. package/rules/fsharp.md +28 -0
  195. package/rules/git.md +26 -0
  196. package/rules/go.md +29 -0
  197. package/rules/java.md +29 -0
  198. package/rules/kotlin.md +27 -0
  199. package/rules/perl.md +26 -0
  200. package/rules/php.md +28 -0
  201. package/rules/python.md +30 -0
  202. package/rules/ruby.md +27 -0
  203. package/rules/rust.md +26 -0
  204. package/rules/security.md +29 -0
  205. package/rules/swift.md +28 -0
  206. package/rules/testing.md +25 -0
  207. package/rules/typescript.md +29 -0
  208. package/schemas/skill-frontmatter.schema.json +52 -0
  209. package/scripts/lib/audit.js +96 -0
  210. package/scripts/lib/frontmatter.js +65 -0
  211. package/scripts/lib/hooks-install.js +292 -0
  212. package/scripts/lib/i18n.js +51 -0
  213. package/scripts/lib/inventory.js +85 -0
  214. package/scripts/lib/lint.js +158 -0
  215. package/scripts/lib/mcp-install.js +284 -0
  216. package/scripts/lib/profiles.js +128 -0
  217. package/scripts/lib/render.js +86 -0
  218. package/scripts/lib/rules-install.js +118 -0
  219. package/scripts/lib/skills.js +86 -0
  220. package/scripts/lib/targets.js +113 -0
  221. package/skills/accounting-api-integration/SKILL.md +81 -0
  222. package/skills/accounting-api-integration/evals/triggers.json +17 -0
  223. package/skills/accounting-api-integration/references/quickbooks.md +48 -0
  224. package/skills/accounting-api-integration/references/xero.md +45 -0
  225. package/skills/agent-harness-design/SKILL.md +125 -0
  226. package/skills/agent-harness-design/evals/triggers.json +21 -0
  227. package/skills/ai-media-generation/SKILL.md +89 -0
  228. package/skills/ai-media-generation/evals/triggers.json +16 -0
  229. package/skills/ai-media-generation/references/job-pipeline.md +76 -0
  230. package/skills/angular-patterns/SKILL.md +122 -0
  231. package/skills/angular-patterns/evals/triggers.json +16 -0
  232. package/skills/api-design/SKILL.md +96 -0
  233. package/skills/api-design/evals/triggers.json +18 -0
  234. package/skills/api-design/references/conventions.md +133 -0
  235. package/skills/architecture-decision-records/SKILL.md +98 -0
  236. package/skills/architecture-decision-records/evals/triggers.json +17 -0
  237. package/skills/article-writing/SKILL.md +108 -0
  238. package/skills/article-writing/evals/triggers.json +16 -0
  239. package/skills/aspnet-core-patterns/SKILL.md +149 -0
  240. package/skills/aspnet-core-patterns/evals/triggers.json +16 -0
  241. package/skills/auth-patterns/SKILL.md +104 -0
  242. package/skills/auth-patterns/evals/triggers.json +17 -0
  243. package/skills/auth-patterns/references/oauth-oidc.md +64 -0
  244. package/skills/autonomous-loops/SKILL.md +99 -0
  245. package/skills/autonomous-loops/evals/triggers.json +14 -0
  246. package/skills/aws-patterns/SKILL.md +91 -0
  247. package/skills/aws-patterns/evals/triggers.json +16 -0
  248. package/skills/azure-patterns/SKILL.md +86 -0
  249. package/skills/azure-patterns/evals/triggers.json +16 -0
  250. package/skills/benchmark-methodology/SKILL.md +88 -0
  251. package/skills/benchmark-methodology/evals/triggers.json +16 -0
  252. package/skills/benchmark-methodology/references/language-harnesses.md +130 -0
  253. package/skills/bgp-diagnostics/SKILL.md +84 -0
  254. package/skills/bgp-diagnostics/evals/triggers.json +18 -0
  255. package/skills/bgp-diagnostics/references/bgp-reference.md +81 -0
  256. package/skills/bioinformatics-workflows/SKILL.md +108 -0
  257. package/skills/bioinformatics-workflows/evals/triggers.json +16 -0
  258. package/skills/bioinformatics-workflows/references/commands.md +71 -0
  259. package/skills/bioinformatics-workflows/references/formats.md +24 -0
  260. package/skills/bioinformatics-workflows/references/workflow-managers.md +107 -0
  261. package/skills/brand-voice/SKILL.md +112 -0
  262. package/skills/brand-voice/evals/triggers.json +16 -0
  263. package/skills/browser-qa/SKILL.md +99 -0
  264. package/skills/browser-qa/evals/triggers.json +16 -0
  265. package/skills/bun-runtime/SKILL.md +93 -0
  266. package/skills/bun-runtime/evals/triggers.json +16 -0
  267. package/skills/cisco-ios-config/SKILL.md +101 -0
  268. package/skills/cisco-ios-config/evals/triggers.json +18 -0
  269. package/skills/cisco-ios-config/references/verification.md +63 -0
  270. package/skills/clickhouse-patterns/SKILL.md +101 -0
  271. package/skills/clickhouse-patterns/evals/triggers.json +18 -0
  272. package/skills/clickhouse-patterns/references/engines-and-views.md +138 -0
  273. package/skills/clinical-decision-support/SKILL.md +90 -0
  274. package/skills/clinical-decision-support/evals/triggers.json +16 -0
  275. package/skills/clinical-decision-support/references/cds-hooks.md +76 -0
  276. package/skills/clinical-decision-support/references/regulatory-boundaries.md +37 -0
  277. package/skills/code-tour/SKILL.md +97 -0
  278. package/skills/code-tour/evals/triggers.json +14 -0
  279. package/skills/codebase-onboarding/SKILL.md +112 -0
  280. package/skills/codebase-onboarding/evals/triggers.json +14 -0
  281. package/skills/cold-outreach-sequences/SKILL.md +90 -0
  282. package/skills/cold-outreach-sequences/evals/triggers.json +16 -0
  283. package/skills/content-repurposing/SKILL.md +82 -0
  284. package/skills/content-repurposing/evals/triggers.json +16 -0
  285. package/skills/context-budget/SKILL.md +84 -0
  286. package/skills/context-budget/evals/triggers.json +14 -0
  287. package/skills/conventional-commits/SKILL.md +144 -0
  288. package/skills/conventional-commits/evals/triggers.json +16 -0
  289. package/skills/cpp-patterns/SKILL.md +129 -0
  290. package/skills/cpp-patterns/evals/triggers.json +16 -0
  291. package/skills/cpp-patterns/references/cmake-and-tooling.md +88 -0
  292. package/skills/cpp-patterns/references/undefined-behaviour.md +75 -0
  293. package/skills/cpp-testing/SKILL.md +131 -0
  294. package/skills/cpp-testing/evals/triggers.json +16 -0
  295. package/skills/csharp-patterns/SKILL.md +110 -0
  296. package/skills/csharp-patterns/evals/triggers.json +17 -0
  297. package/skills/csharp-patterns/references/analyzers.md +59 -0
  298. package/skills/csharp-testing/SKILL.md +85 -0
  299. package/skills/csharp-testing/evals/triggers.json +17 -0
  300. package/skills/csharp-testing/references/integration-tests.md +77 -0
  301. package/skills/css-architecture/SKILL.md +143 -0
  302. package/skills/css-architecture/evals/triggers.json +16 -0
  303. package/skills/customs-trade-compliance/SKILL.md +95 -0
  304. package/skills/customs-trade-compliance/evals/triggers.json +16 -0
  305. package/skills/customs-trade-compliance/references/incoterms-2020.md +42 -0
  306. package/skills/dart-patterns/SKILL.md +157 -0
  307. package/skills/dart-patterns/evals/triggers.json +18 -0
  308. package/skills/dart-testing/SKILL.md +164 -0
  309. package/skills/dart-testing/evals/triggers.json +18 -0
  310. package/skills/data-analysis-notebooks/SKILL.md +113 -0
  311. package/skills/data-analysis-notebooks/evals/triggers.json +16 -0
  312. package/skills/data-analysis-notebooks/references/dataframe-pitfalls.md +49 -0
  313. package/skills/data-analysis-notebooks/references/statistics-pitfalls.md +24 -0
  314. package/skills/data-pipelines/SKILL.md +90 -0
  315. package/skills/data-pipelines/evals/triggers.json +16 -0
  316. package/skills/data-pipelines/references/orchestrators.md +64 -0
  317. package/skills/database-migrations/SKILL.md +102 -0
  318. package/skills/database-migrations/evals/triggers.json +16 -0
  319. package/skills/database-migrations/references/recipes.md +98 -0
  320. package/skills/database-migrations/references/tools.md +21 -0
  321. package/skills/dbt-patterns/SKILL.md +96 -0
  322. package/skills/dbt-patterns/evals/triggers.json +16 -0
  323. package/skills/dbt-patterns/references/yaml-examples.md +114 -0
  324. package/skills/deep-research/SKILL.md +107 -0
  325. package/skills/deep-research/evals/triggers.json +14 -0
  326. package/skills/dependency-audit/SKILL.md +103 -0
  327. package/skills/dependency-audit/evals/triggers.json +16 -0
  328. package/skills/dependency-audit/references/tools.md +124 -0
  329. package/skills/deployment-strategies/SKILL.md +108 -0
  330. package/skills/deployment-strategies/evals/triggers.json +16 -0
  331. package/skills/django-patterns/SKILL.md +123 -0
  332. package/skills/django-patterns/evals/triggers.json +16 -0
  333. package/skills/docker-patterns/SKILL.md +132 -0
  334. package/skills/docker-patterns/evals/triggers.json +16 -0
  335. package/skills/docker-patterns/references/dockerfiles.md +105 -0
  336. package/skills/e2e-testing-playwright/SKILL.md +94 -0
  337. package/skills/e2e-testing-playwright/evals/triggers.json +16 -0
  338. package/skills/e2e-testing-playwright/references/config-and-ci.md +129 -0
  339. package/skills/ef-core-patterns/SKILL.md +117 -0
  340. package/skills/ef-core-patterns/evals/triggers.json +16 -0
  341. package/skills/email-deliverability/SKILL.md +99 -0
  342. package/skills/email-deliverability/evals/triggers.json +17 -0
  343. package/skills/email-deliverability/references/dns-records.md +85 -0
  344. package/skills/error-handling-patterns/SKILL.md +112 -0
  345. package/skills/error-handling-patterns/evals/triggers.json +18 -0
  346. package/skills/error-handling-patterns/references/language-idioms.md +49 -0
  347. package/skills/estimation-and-scoping/SKILL.md +97 -0
  348. package/skills/estimation-and-scoping/evals/triggers.json +14 -0
  349. package/skills/evm-dapp-integration/SKILL.md +73 -0
  350. package/skills/evm-dapp-integration/evals/triggers.json +16 -0
  351. package/skills/fastapi-patterns/SKILL.md +127 -0
  352. package/skills/fastapi-patterns/evals/triggers.json +16 -0
  353. package/skills/ffmpeg-media-processing/SKILL.md +94 -0
  354. package/skills/ffmpeg-media-processing/evals/triggers.json +16 -0
  355. package/skills/ffmpeg-media-processing/references/recipes.md +112 -0
  356. package/skills/fhir-integration/SKILL.md +81 -0
  357. package/skills/fhir-integration/evals/triggers.json +16 -0
  358. package/skills/fhir-integration/references/search-and-bundles.md +73 -0
  359. package/skills/fhir-integration/references/smart-on-fhir.md +50 -0
  360. package/skills/flask-patterns/SKILL.md +132 -0
  361. package/skills/flask-patterns/evals/triggers.json +16 -0
  362. package/skills/flutter-patterns/SKILL.md +99 -0
  363. package/skills/flutter-patterns/evals/triggers.json +16 -0
  364. package/skills/flutterwave-integration/SKILL.md +75 -0
  365. package/skills/flutterwave-integration/evals/triggers.json +16 -0
  366. package/skills/flutterwave-integration/references/api.md +73 -0
  367. package/skills/flutterwave-integration/references/webhooks.md +49 -0
  368. package/skills/fsharp-patterns/SKILL.md +133 -0
  369. package/skills/fsharp-patterns/evals/triggers.json +16 -0
  370. package/skills/fsharp-testing/SKILL.md +136 -0
  371. package/skills/fsharp-testing/evals/triggers.json +16 -0
  372. package/skills/gcp-patterns/SKILL.md +86 -0
  373. package/skills/gcp-patterns/evals/triggers.json +16 -0
  374. package/skills/git-workflow/SKILL.md +114 -0
  375. package/skills/git-workflow/evals/triggers.json +16 -0
  376. package/skills/github-actions-ci/SKILL.md +117 -0
  377. package/skills/github-actions-ci/evals/triggers.json +16 -0
  378. package/skills/github-api-automation/SKILL.md +101 -0
  379. package/skills/github-api-automation/evals/triggers.json +17 -0
  380. package/skills/go-patterns/SKILL.md +118 -0
  381. package/skills/go-patterns/evals/triggers.json +17 -0
  382. package/skills/go-patterns/references/concurrency.md +162 -0
  383. package/skills/go-testing/SKILL.md +154 -0
  384. package/skills/go-testing/evals/triggers.json +17 -0
  385. package/skills/hexagonal-architecture/SKILL.md +89 -0
  386. package/skills/hexagonal-architecture/evals/triggers.json +17 -0
  387. package/skills/hipaa-compliance/SKILL.md +91 -0
  388. package/skills/hipaa-compliance/evals/triggers.json +18 -0
  389. package/skills/hipaa-compliance/references/safeguards.md +68 -0
  390. package/skills/hl7v2-integration/SKILL.md +69 -0
  391. package/skills/hl7v2-integration/evals/triggers.json +16 -0
  392. package/skills/hl7v2-integration/references/messages-and-ack.md +78 -0
  393. package/skills/homelab-network-setup/SKILL.md +125 -0
  394. package/skills/homelab-network-setup/evals/triggers.json +18 -0
  395. package/skills/homelab-network-setup/references/firewall-and-dns.md +45 -0
  396. package/skills/homelab-network-setup/references/wireguard.md +72 -0
  397. package/skills/hubtel-integration/SKILL.md +77 -0
  398. package/skills/hubtel-integration/evals/triggers.json +16 -0
  399. package/skills/hubtel-integration/references/api.md +92 -0
  400. package/skills/i18n-localization/SKILL.md +114 -0
  401. package/skills/i18n-localization/evals/triggers.json +16 -0
  402. package/skills/i18n-localization/references/libraries.md +52 -0
  403. package/skills/incident-postmortem/SKILL.md +118 -0
  404. package/skills/incident-postmortem/evals/triggers.json +14 -0
  405. package/skills/inventory-demand-planning/SKILL.md +89 -0
  406. package/skills/inventory-demand-planning/evals/triggers.json +16 -0
  407. package/skills/inventory-demand-planning/references/formulas.md +62 -0
  408. package/skills/investor-materials/SKILL.md +127 -0
  409. package/skills/investor-materials/evals/triggers.json +16 -0
  410. package/skills/investor-materials/references/templates.md +74 -0
  411. package/skills/invoicing-and-tax/SKILL.md +84 -0
  412. package/skills/invoicing-and-tax/evals/triggers.json +17 -0
  413. package/skills/invoicing-and-tax/references/e-invoicing.md +24 -0
  414. package/skills/invoicing-and-tax/references/invoice-fields.md +38 -0
  415. package/skills/invoicing-and-tax/references/rounding.md +26 -0
  416. package/skills/java-patterns/SKILL.md +141 -0
  417. package/skills/java-patterns/evals/triggers.json +17 -0
  418. package/skills/java-testing/SKILL.md +142 -0
  419. package/skills/java-testing/evals/triggers.json +16 -0
  420. package/skills/jetpack-compose-patterns/SKILL.md +88 -0
  421. package/skills/jetpack-compose-patterns/evals/triggers.json +16 -0
  422. package/skills/jira-integration/SKILL.md +92 -0
  423. package/skills/jira-integration/evals/triggers.json +17 -0
  424. package/skills/jpa-hibernate/SKILL.md +92 -0
  425. package/skills/jpa-hibernate/evals/triggers.json +18 -0
  426. package/skills/jpa-hibernate/references/mapping.md +99 -0
  427. package/skills/kotlin-multiplatform/SKILL.md +97 -0
  428. package/skills/kotlin-multiplatform/evals/triggers.json +16 -0
  429. package/skills/kotlin-patterns/SKILL.md +128 -0
  430. package/skills/kotlin-patterns/evals/triggers.json +16 -0
  431. package/skills/kotlin-testing/SKILL.md +117 -0
  432. package/skills/kotlin-testing/evals/triggers.json +16 -0
  433. package/skills/ktor-patterns/SKILL.md +135 -0
  434. package/skills/ktor-patterns/evals/triggers.json +18 -0
  435. package/skills/kubernetes-patterns/SKILL.md +106 -0
  436. package/skills/kubernetes-patterns/evals/triggers.json +16 -0
  437. package/skills/kubernetes-patterns/references/manifests.md +115 -0
  438. package/skills/laravel-patterns/SKILL.md +136 -0
  439. package/skills/laravel-patterns/evals/triggers.json +16 -0
  440. package/skills/linear-integration/SKILL.md +98 -0
  441. package/skills/linear-integration/evals/triggers.json +17 -0
  442. package/skills/literature-review/SKILL.md +109 -0
  443. package/skills/literature-review/evals/triggers.json +16 -0
  444. package/skills/literature-review/references/appraisal.md +41 -0
  445. package/skills/literature-review/references/search-sources.md +39 -0
  446. package/skills/llm-app-patterns/SKILL.md +97 -0
  447. package/skills/llm-app-patterns/evals/triggers.json +17 -0
  448. package/skills/llm-evals/SKILL.md +98 -0
  449. package/skills/llm-evals/evals/triggers.json +16 -0
  450. package/skills/llm-evals/references/graders.md +66 -0
  451. package/skills/logistics-exception-management/SKILL.md +90 -0
  452. package/skills/logistics-exception-management/evals/triggers.json +16 -0
  453. package/skills/manim-animations/SKILL.md +106 -0
  454. package/skills/manim-animations/evals/triggers.json +16 -0
  455. package/skills/market-research/SKILL.md +117 -0
  456. package/skills/market-research/evals/triggers.json +16 -0
  457. package/skills/marketing-campaign/SKILL.md +111 -0
  458. package/skills/marketing-campaign/evals/triggers.json +16 -0
  459. package/skills/mcp-server-patterns/SKILL.md +127 -0
  460. package/skills/mcp-server-patterns/evals/triggers.json +18 -0
  461. package/skills/mcp-server-patterns/references/protocol-notes.md +68 -0
  462. package/skills/metrics-dashboards/SKILL.md +113 -0
  463. package/skills/metrics-dashboards/evals/triggers.json +16 -0
  464. package/skills/ml-experiment-workflow/SKILL.md +125 -0
  465. package/skills/ml-experiment-workflow/evals/triggers.json +16 -0
  466. package/skills/mongodb-patterns/SKILL.md +115 -0
  467. package/skills/mongodb-patterns/evals/triggers.json +18 -0
  468. package/skills/mongodb-patterns/references/indexes-and-aggregation.md +94 -0
  469. package/skills/mpesa-daraja-integration/SKILL.md +70 -0
  470. package/skills/mpesa-daraja-integration/evals/triggers.json +16 -0
  471. package/skills/mpesa-daraja-integration/references/api.md +103 -0
  472. package/skills/mpesa-daraja-integration/references/callbacks.md +74 -0
  473. package/skills/mtn-momo-integration/SKILL.md +66 -0
  474. package/skills/mtn-momo-integration/evals/triggers.json +16 -0
  475. package/skills/mtn-momo-integration/references/api.md +153 -0
  476. package/skills/mtn-momo-integration/references/callbacks.md +92 -0
  477. package/skills/mtn-momo-integration/references/sandbox-and-go-live.md +51 -0
  478. package/skills/mtn-momo-integration/scripts/sandbox-setup.js +79 -0
  479. package/skills/mysql-patterns/SKILL.md +96 -0
  480. package/skills/mysql-patterns/evals/triggers.json +16 -0
  481. package/skills/mysql-patterns/references/explain.md +34 -0
  482. package/skills/mysql-patterns/references/online-ddl.md +41 -0
  483. package/skills/nestjs-patterns/SKILL.md +114 -0
  484. package/skills/nestjs-patterns/evals/triggers.json +16 -0
  485. package/skills/nestjs-patterns/references/testing.md +68 -0
  486. package/skills/network-automation/SKILL.md +107 -0
  487. package/skills/network-automation/evals/triggers.json +18 -0
  488. package/skills/network-automation/references/tool-snippets.md +153 -0
  489. package/skills/network-troubleshooting/SKILL.md +152 -0
  490. package/skills/network-troubleshooting/evals/triggers.json +18 -0
  491. package/skills/network-troubleshooting/references/commands.md +33 -0
  492. package/skills/nextjs-patterns/SKILL.md +150 -0
  493. package/skills/nextjs-patterns/evals/triggers.json +18 -0
  494. package/skills/nextjs-patterns/references/caching.md +87 -0
  495. package/skills/node-backend-patterns/SKILL.md +103 -0
  496. package/skills/node-backend-patterns/evals/triggers.json +16 -0
  497. package/skills/node-backend-patterns/references/templates.md +122 -0
  498. package/skills/nuxt-patterns/SKILL.md +103 -0
  499. package/skills/nuxt-patterns/evals/triggers.json +16 -0
  500. package/skills/parallel-agent-orchestration/SKILL.md +106 -0
  501. package/skills/parallel-agent-orchestration/evals/triggers.json +14 -0
  502. package/skills/paystack-integration/SKILL.md +59 -0
  503. package/skills/paystack-integration/evals/triggers.json +14 -0
  504. package/skills/paystack-integration/references/api.md +73 -0
  505. package/skills/paystack-integration/references/mobile-money.md +50 -0
  506. package/skills/paystack-integration/references/webhooks.md +80 -0
  507. package/skills/pci-dss-scope/SKILL.md +103 -0
  508. package/skills/pci-dss-scope/evals/triggers.json +18 -0
  509. package/skills/pci-dss-scope/references/saq-and-data.md +36 -0
  510. package/skills/perl-patterns/SKILL.md +135 -0
  511. package/skills/perl-patterns/evals/triggers.json +18 -0
  512. package/skills/perl-testing/SKILL.md +126 -0
  513. package/skills/perl-testing/evals/triggers.json +17 -0
  514. package/skills/php-patterns/SKILL.md +116 -0
  515. package/skills/php-patterns/evals/triggers.json +16 -0
  516. package/skills/php-testing/SKILL.md +123 -0
  517. package/skills/php-testing/evals/triggers.json +16 -0
  518. package/skills/postgres-patterns/SKILL.md +103 -0
  519. package/skills/postgres-patterns/evals/triggers.json +17 -0
  520. package/skills/postgres-patterns/references/explain.md +59 -0
  521. package/skills/postgres-patterns/references/locks.md +53 -0
  522. package/skills/prd-writing/SKILL.md +124 -0
  523. package/skills/prd-writing/evals/triggers.json +15 -0
  524. package/skills/prisma-patterns/SKILL.md +83 -0
  525. package/skills/prisma-patterns/evals/triggers.json +18 -0
  526. package/skills/prisma-patterns/references/prisma-8.md +46 -0
  527. package/skills/prisma-patterns/references/workflow.md +50 -0
  528. package/skills/privacy-compliance/SKILL.md +121 -0
  529. package/skills/privacy-compliance/evals/triggers.json +18 -0
  530. package/skills/privacy-compliance/references/jurisdictions.md +51 -0
  531. package/skills/production-scheduling/SKILL.md +98 -0
  532. package/skills/production-scheduling/evals/triggers.json +16 -0
  533. package/skills/prompt-engineering/SKILL.md +92 -0
  534. package/skills/prompt-engineering/evals/triggers.json +16 -0
  535. package/skills/python-patterns/SKILL.md +107 -0
  536. package/skills/python-patterns/evals/triggers.json +16 -0
  537. package/skills/python-patterns/references/tooling.md +101 -0
  538. package/skills/python-testing/SKILL.md +126 -0
  539. package/skills/python-testing/evals/triggers.json +16 -0
  540. package/skills/python-testing/references/mocking.md +71 -0
  541. package/skills/pytorch-patterns/SKILL.md +139 -0
  542. package/skills/pytorch-patterns/evals/triggers.json +16 -0
  543. package/skills/pytorch-patterns/references/debugging.md +39 -0
  544. package/skills/quarkus-patterns/SKILL.md +93 -0
  545. package/skills/quarkus-patterns/evals/triggers.json +18 -0
  546. package/skills/rag-pipeline-patterns/SKILL.md +117 -0
  547. package/skills/rag-pipeline-patterns/evals/triggers.json +18 -0
  548. package/skills/rag-pipeline-patterns/references/evaluation.md +37 -0
  549. package/skills/rag-pipeline-patterns/references/retrieval-recipes.md +78 -0
  550. package/skills/rails-patterns/SKILL.md +132 -0
  551. package/skills/rails-patterns/evals/triggers.json +16 -0
  552. package/skills/react-native-patterns/SKILL.md +101 -0
  553. package/skills/react-native-patterns/evals/triggers.json +16 -0
  554. package/skills/react-patterns/SKILL.md +140 -0
  555. package/skills/react-patterns/evals/triggers.json +18 -0
  556. package/skills/react-performance/SKILL.md +107 -0
  557. package/skills/react-performance/evals/triggers.json +18 -0
  558. package/skills/redis-patterns/SKILL.md +109 -0
  559. package/skills/redis-patterns/evals/triggers.json +18 -0
  560. package/skills/redis-patterns/references/operations.md +61 -0
  561. package/skills/refactoring-safely/SKILL.md +107 -0
  562. package/skills/refactoring-safely/evals/triggers.json +17 -0
  563. package/skills/release-management/SKILL.md +141 -0
  564. package/skills/release-management/evals/triggers.json +16 -0
  565. package/skills/remotion-video/SKILL.md +91 -0
  566. package/skills/remotion-video/evals/triggers.json +16 -0
  567. package/skills/remotion-video/references/lambda.md +66 -0
  568. package/skills/returns-reverse-logistics/SKILL.md +97 -0
  569. package/skills/returns-reverse-logistics/evals/triggers.json +16 -0
  570. package/skills/ruby-patterns/SKILL.md +127 -0
  571. package/skills/ruby-patterns/evals/triggers.json +18 -0
  572. package/skills/ruby-testing/SKILL.md +113 -0
  573. package/skills/ruby-testing/evals/triggers.json +18 -0
  574. package/skills/runbook-writing/SKILL.md +101 -0
  575. package/skills/runbook-writing/evals/triggers.json +14 -0
  576. package/skills/rust-patterns/SKILL.md +118 -0
  577. package/skills/rust-patterns/evals/triggers.json +16 -0
  578. package/skills/rust-patterns/references/cargo-and-clippy.md +105 -0
  579. package/skills/rust-patterns/references/errors-and-traits.md +97 -0
  580. package/skills/rust-testing/SKILL.md +148 -0
  581. package/skills/rust-testing/evals/triggers.json +16 -0
  582. package/skills/rust-testing/references/fakes-proptest-async.md +113 -0
  583. package/skills/search-first/SKILL.md +73 -0
  584. package/skills/search-first/evals/triggers.json +14 -0
  585. package/skills/security-review/SKILL.md +58 -0
  586. package/skills/security-review/evals/triggers.json +14 -0
  587. package/skills/security-review/references/checklist.md +54 -0
  588. package/skills/security-review/scripts/scan-secrets.js +79 -0
  589. package/skills/seo-audit/SKILL.md +111 -0
  590. package/skills/seo-audit/evals/triggers.json +16 -0
  591. package/skills/seo-audit/references/checks.md +65 -0
  592. package/skills/session-handoff/SKILL.md +101 -0
  593. package/skills/session-handoff/evals/triggers.json +14 -0
  594. package/skills/skill-authoring/SKILL.md +87 -0
  595. package/skills/skill-authoring/evals/triggers.json +14 -0
  596. package/skills/skill-authoring/references/frontmatter.md +40 -0
  597. package/skills/slack-app-integration/SKILL.md +108 -0
  598. package/skills/slack-app-integration/evals/triggers.json +17 -0
  599. package/skills/smart-contract-security/SKILL.md +110 -0
  600. package/skills/smart-contract-security/evals/triggers.json +16 -0
  601. package/skills/smart-contract-security/references/vulnerability-checklist.md +79 -0
  602. package/skills/social-media-publishing/SKILL.md +84 -0
  603. package/skills/social-media-publishing/evals/triggers.json +17 -0
  604. package/skills/social-media-publishing/references/platform-apis.md +116 -0
  605. package/skills/solidity-patterns/SKILL.md +95 -0
  606. package/skills/solidity-patterns/evals/triggers.json +16 -0
  607. package/skills/spring-boot-patterns/SKILL.md +128 -0
  608. package/skills/spring-boot-patterns/evals/triggers.json +18 -0
  609. package/skills/spring-boot-patterns/references/testing.md +72 -0
  610. package/skills/stripe-integration/SKILL.md +69 -0
  611. package/skills/stripe-integration/evals/triggers.json +16 -0
  612. package/skills/stripe-integration/references/api.md +71 -0
  613. package/skills/stripe-integration/references/billing.md +58 -0
  614. package/skills/stripe-integration/references/webhooks.md +76 -0
  615. package/skills/subscription-billing-ops/SKILL.md +118 -0
  616. package/skills/subscription-billing-ops/evals/triggers.json +17 -0
  617. package/skills/subscription-billing-ops/references/proration.md +47 -0
  618. package/skills/subscription-billing-ops/references/revenue-metrics.md +38 -0
  619. package/skills/svelte-patterns/SKILL.md +122 -0
  620. package/skills/svelte-patterns/evals/triggers.json +16 -0
  621. package/skills/swift-patterns/SKILL.md +113 -0
  622. package/skills/swift-patterns/evals/triggers.json +16 -0
  623. package/skills/swift-patterns/references/concurrency-migration.md +40 -0
  624. package/skills/swift-testing/SKILL.md +121 -0
  625. package/skills/swift-testing/evals/triggers.json +16 -0
  626. package/skills/swift-testing/references/swift-testing-cheatsheet.md +81 -0
  627. package/skills/swiftui-patterns/SKILL.md +102 -0
  628. package/skills/swiftui-patterns/evals/triggers.json +16 -0
  629. package/skills/tdd-workflow/SKILL.md +67 -0
  630. package/skills/tdd-workflow/evals/triggers.json +14 -0
  631. package/skills/technical-writing/SKILL.md +95 -0
  632. package/skills/technical-writing/evals/triggers.json +14 -0
  633. package/skills/terraform-patterns/SKILL.md +122 -0
  634. package/skills/terraform-patterns/evals/triggers.json +16 -0
  635. package/skills/terraform-patterns/references/backends.md +67 -0
  636. package/skills/test-coverage-improvement/SKILL.md +107 -0
  637. package/skills/test-coverage-improvement/evals/triggers.json +16 -0
  638. package/skills/threat-modeling/SKILL.md +113 -0
  639. package/skills/threat-modeling/evals/triggers.json +16 -0
  640. package/skills/typescript-patterns/SKILL.md +122 -0
  641. package/skills/typescript-patterns/evals/triggers.json +16 -0
  642. package/skills/typescript-testing/SKILL.md +101 -0
  643. package/skills/typescript-testing/evals/triggers.json +16 -0
  644. package/skills/verification-loop/SKILL.md +70 -0
  645. package/skills/verification-loop/evals/triggers.json +14 -0
  646. package/skills/verification-loop/scripts/detect-checks.js +102 -0
  647. package/skills/vite-patterns/SKILL.md +117 -0
  648. package/skills/vite-patterns/evals/triggers.json +16 -0
  649. package/skills/vue-patterns/SKILL.md +104 -0
  650. package/skills/vue-patterns/evals/triggers.json +16 -0
  651. package/skills/web-accessibility/SKILL.md +119 -0
  652. package/skills/web-accessibility/evals/triggers.json +16 -0
  653. package/skills/web-performance/SKILL.md +107 -0
  654. package/skills/web-performance/evals/triggers.json +16 -0
  655. package/skills/web-scraping/SKILL.md +80 -0
  656. package/skills/web-scraping/evals/triggers.json +16 -0
@@ -0,0 +1,141 @@
1
+ ---
2
+ name: release-management
3
+ description: Ships a software release end to end - deciding the next semantic version from what changed, updating the changelog, tagging, writing release notes for users, cutting alpha/beta/rc pre-releases, patching an old version from a hotfix branch, and wiring up release tooling such as release-please, semantic-release or Changesets. Use when preparing or publishing a release, picking a version number, turning merged work into release notes, shipping a hotfix to an already-released line, or automating versioning and changelogs.
4
+ license: MIT
5
+ compatibility: Any Agent Skills host. Needs git. Publishing steps need the project's package manager and, for GitHub releases, the gh CLI.
6
+ metadata:
7
+ kete-loom/version: "0.1.0"
8
+ kete-loom/category: devops
9
+ kete-loom/risk: runs-commands
10
+ kete-loom/requires: "git"
11
+ kete-loom/owner: "Kete-org"
12
+ ---
13
+
14
+ # Release management
15
+
16
+ A release is a promise: this exact commit, with this version number, does what the notes say. Work through the steps in order and stop at each checkpoint marked **ask**.
17
+
18
+ ## 0. Find the existing process
19
+
20
+ 1. Look for release tooling and docs: `RELEASING.md`, `CONTRIBUTING.md`, `release-please-config.json`, `.release-please-manifest.json`, `.releaserc*`, `release.config.*` or a `release` key in `package.json` (semantic-release), `.changeset/` (Changesets), `cliff.toml` (git-cliff), `.goreleaser.yaml`, and release workflows in `.github/workflows/`.
21
+ 2. If a tool owns versioning, **use the tool**. Don't hand-edit versions or changelogs it generates; that causes drift or a double bump.
22
+ 3. Find every place the version lives: `package.json`, `pyproject.toml`, `Cargo.toml`, `*.csproj`, `build.gradle*`, `pubspec.yaml`, plugin manifests, a `VERSION` file, constants in code. Search the codebase for the current version string to catch the rest.
23
+ 4. Find the last release: `git describe --tags --abbrev=0` and `git tag --sort=-v:refname | head`.
24
+
25
+ ## 1. Check the release is ready
26
+
27
+ - `git fetch --tags --prune`, and confirm you are on the release branch (usually the default branch) with a clean tree and nothing unpushed.
28
+ - CI is green for the exact commit you will tag. Run the project's full check command locally as well.
29
+ - If anything fails, **stop**. Never tag a red build.
30
+
31
+ ## 2. Decide the version (Semantic Versioning 2.0.0)
32
+
33
+ List what changed since the last tag: `git log --oneline <last-tag>..HEAD`. If commits follow Conventional Commits, the type and `!`/`BREAKING CHANGE` footers tell you directly.
34
+
35
+ | Since last release | Bump | Example |
36
+ |---|---|---|
37
+ | Any incompatible change to the public API, config, CLI, data format or supported runtimes | MAJOR | 2.4.1 → 3.0.0 |
38
+ | New backward-compatible functionality, or a deprecation | MINOR | 2.4.1 → 2.5.0 |
39
+ | Only backward-compatible bug fixes | PATCH | 2.4.1 → 2.4.2 |
40
+ | Nothing user-facing (docs, tests, CI) | No release needed | |
41
+
42
+ Rules:
43
+
44
+ - First decide what the **public API** is (exported functions, HTTP endpoints, CLI flags, config keys, file formats). Only changes to it count.
45
+ - Under `0.y.z`, the public API is not stable and anything may change. Most projects bump MINOR for breaking changes and PATCH for everything else; follow the project's history.
46
+ - `1.0.0` is a deliberate decision that the API is stable. **Ask** before making it.
47
+ - A MAJOR bump, or any case where you are unsure whether something is breaking: **ask** the user, with the specific change that makes you think so.
48
+ - Never reuse or move a published version or tag. A bad release gets a new version.
49
+
50
+ ## 3. Update the changelog
51
+
52
+ If no tool generates it, keep `CHANGELOG.md` in the Keep a Changelog style:
53
+
54
+ ```
55
+ ## [2.5.0] - 2026-03-14
56
+
57
+ ### Added
58
+ - CSV export from the reports page (#512)
59
+
60
+ ### Fixed
61
+ - Totals no longer go negative when a refund exceeds the line amount (#498)
62
+ ```
63
+
64
+ - Sections: Added, Changed, Deprecated, Removed, Fixed, Security. Omit empty ones.
65
+ - Write each entry for the user of the software, not the developer: what they can now do or what stopped going wrong. Link the PR or issue.
66
+ - Move entries out of `## [Unreleased]` into the new version heading; date in ISO format.
67
+ - Breaking changes go first under **Changed** or **Removed**, each with the migration step.
68
+
69
+ ## 4. Bump, commit and tag
70
+
71
+ 1. Update every version location from step 0. Use the ecosystem's command where one exists (for example `npm version <x.y.z> --no-git-tag-version`) so lockfiles follow.
72
+ 2. Commit: `git commit -am "chore(release): <x.y.z>"` (or the project's convention).
73
+ 3. Tag with an **annotated** tag: `git tag -a v<x.y.z> -m "v<x.y.z>"`. Use `-s` instead of `-a` if the project signs tags. Match the existing tag prefix (`v1.2.3` or `1.2.3`, or `pkg@1.2.3` in monorepos).
74
+ 4. **Ask** before pushing: pushing a tag usually triggers publishing. Then `git push origin <branch>` and `git push origin v<x.y.z>`. Don't use `git push --tags`, which can push stray local tags.
75
+
76
+ ## 5. Release notes
77
+
78
+ Release notes are the changelog entry rewritten for a reader skimming the release page.
79
+
80
+ ```
81
+ ## Highlights
82
+ <1-3 sentences on why someone should upgrade>
83
+
84
+ ## Breaking changes
85
+ - <what changed> → <what to do>
86
+
87
+ ## What's new / Fixes
88
+ - <user-facing change> (#PR)
89
+
90
+ ## Upgrade
91
+ <command or steps, including any migration>
92
+ ```
93
+
94
+ Publish with `gh release create v<x.y.z> --title "v<x.y.z>" --notes-file notes.md --verify-tag` (add `--prerelease` for pre-releases). `--verify-tag` aborts if the tag is not on the remote, instead of letting gh create a tag from the default branch's head. `--generate-notes` builds a PR list, which is a starting draft, not finished notes.
95
+
96
+ ## 6. Pre-releases
97
+
98
+ - Format: `<x.y.z>-<label>.<n>`, for example `3.0.0-beta.2`. SemVer orders `alpha < beta < rc` and `3.0.0-rc.1 < 3.0.0`. Always put a dot before the counter: `beta.10` sorts after `beta.9` (numeric identifiers compare as numbers), but `beta10` sorts before `beta9` (compared as text).
99
+ - Publish so default installs don't pick them up: `npm publish --tag next` (npm), a pre-release version string for PyPI (`3.0.0b2`, PEP 440), `--prerelease` on the GitHub release.
100
+ - Bump only the counter between pre-releases of the same version; the final release drops the suffix.
101
+
102
+ ## 7. Hotfixes to a released line
103
+
104
+ When a fix must ship without unreleased work on the default branch:
105
+
106
+ 1. Branch from the release tag: `git switch -c hotfix/<x.y.z+1> v<x.y.z>`.
107
+ 2. Land the fix on the default branch first when possible, then `git cherry-pick -x <sha>` onto the hotfix branch (`-x` records the source commit). If it only applies to the old line, fix it there and port forward.
108
+ 3. Run the full checks on the hotfix branch, then do steps 3-5 with a PATCH bump.
109
+ 4. Make sure the changelog entry also reaches the default branch, so the next release doesn't lose it.
110
+ 5. For long-lived support lines, keep a `release/<major>.<minor>` branch instead of recreating it each time.
111
+
112
+ ## 8. Automating releases
113
+
114
+ Pick one tool, and only if the project has none yet. **Ask** before adding it, since it changes how everyone merges.
115
+
116
+ | Tool | Fits | How it works |
117
+ |---|---|---|
118
+ | release-please | GitHub repos, monorepos, wanting a human gate | Opens a release PR from Conventional Commits; merging it tags and releases |
119
+ | semantic-release | Fully automatic releases on every merge | Analyses commits in CI, then bumps, tags and publishes |
120
+ | Changesets | JS monorepos, versioning decided per PR | Contributors add `.changeset/*.md` files; a release PR applies them |
121
+ | git-cliff | Changelog generation only | Builds the changelog from commits via `cliff.toml` |
122
+
123
+ Before wiring one in: confirm commit messages already follow the convention it needs, give the CI token only the permissions the tool's docs list, and run it in dry-run mode first (`semantic-release --dry-run`, or check release-please's PR before merging).
124
+
125
+ ## Never
126
+
127
+ - Never tag or publish from a dirty tree or an unpushed commit.
128
+ - Never delete or move a published tag, or republish the same version with different contents.
129
+ - Never hand-edit files that the release tool generates.
130
+ - Never publish (tag push, registry publish, GitHub release) without the user's go-ahead.
131
+
132
+ ## Report back
133
+
134
+ ```
135
+ Version: <old> → <new> (<major|minor|patch|pre-release|hotfix>), reason: <change that decided it>
136
+ Changed files: <version files, CHANGELOG.md>
137
+ Tag: <tag> (<pushed | local only>)
138
+ Published: <registry/release URL, or not yet>
139
+ Notes: <path or inline>
140
+ Follow-ups: <port hotfix forward, announce, etc.>
141
+ ```
@@ -0,0 +1,16 @@
1
+ {
2
+ "should_trigger": [
3
+ "We removed a deprecated endpoint and added CSV export, what should the next version be? Then cut the release",
4
+ "Prepare release 1.4.0: update CHANGELOG.md, bump the version and tag it",
5
+ "Customers on 2.3.x need a security fix but main has unreleased features, how do we ship 2.3.5?",
6
+ "Set up release-please so merging to main produces versioned releases and a changelog",
7
+ "Publish a 3.0.0 release candidate to npm without making it the default install"
8
+ ],
9
+ "should_not_trigger": [
10
+ "Write a commit message for this fix that follows the feat/fix convention",
11
+ "Rebase my feature branch onto main and push it safely",
12
+ "Plan a blue-green deployment for the API so we can roll back quickly",
13
+ "Write a GitHub Actions workflow that builds and tests the project",
14
+ "Update the README to document the new configuration options"
15
+ ]
16
+ }
@@ -0,0 +1,91 @@
1
+ ---
2
+ name: remotion-video
3
+ description: Remotion video projects written in React, covering Composition and Sequence timing, frame-driven animation with interpolate and spring, staticFile assets, font loading held by delayRender, deterministic rendering with the remotion CLI or renderMedia, and serverless rendering on AWS Lambda with concurrency and S3 privacy settings. Use when building or fixing a Remotion composition, timing scenes in frames, animating with useCurrentFrame, rendering an MP4 from React code, or setting up Remotion Lambda.
4
+ license: MIT
5
+ compatibility: Any Agent Skills host. Needs Node 18+ and a Remotion 4 project; Lambda rendering needs an AWS account and network access.
6
+ metadata:
7
+ kete-loom/version: "0.1.0"
8
+ kete-loom/category: coding
9
+ kete-loom/risk: runs-commands
10
+ kete-loom/requires: "node, npx"
11
+ kete-loom/owner: "Kete-org"
12
+ ---
13
+
14
+ # Remotion video
15
+
16
+ Remotion renders a React tree once per frame in a headless browser and encodes the frames. Everything visible must be a pure function of the current frame. That one rule explains most Remotion bugs.
17
+
18
+ ## Ground rules
19
+
20
+ 1. **Time is frames, not seconds.** Read `useCurrentFrame()` and `useVideoConfig()` (`fps`, `durationInFrames`, `width`, `height`). Convert seconds with `seconds * fps`. Never use `Date.now()`, `setTimeout`, `setInterval` or CSS transitions/animations for motion: they don't follow the frame and render as jumps or flicker.
21
+ 2. **Deterministic.** No `Math.random()`; use `random(seed)` from `remotion`. Data fetched at render time must be the same on every frame and every machine.
22
+ 3. **Anything async holds the frame.** Fetching data, loading fonts, waiting for a canvas or a third-party chart: wrap it with `useDelayRender()` (or `delayRender()` / `continueRender(handle)`), and call `cancelRender(err)` on failure. The default timeout is 30 seconds; raise it per call with `timeoutInMilliseconds`, not globally by habit.
23
+ 4. **Use Remotion's media tags.** `<Img>`, `<Audio>`, and `<Video>` from `@remotion/media` (or `<OffthreadVideo>` for older code) wait for media to load before a frame is captured. A plain `<img>` or `<video>` can be captured half-loaded.
24
+ 5. **Assets come from `public/` through `staticFile('name.png')`**, or from a full URL. Don't import big videos into the bundle.
25
+
26
+ ## Project shape
27
+
28
+ - `src/index.ts` calls `registerRoot(RemotionRoot)`.
29
+ - `src/Root.tsx` lists `<Composition id="Intro" component={Intro} durationInFrames={300} fps={30} width={1920} height={1080} defaultProps={...} />`. The `id` is what you render.
30
+ - Typed props: give the composition a Zod `schema` so props can be edited in the Studio and validated before render. Use `calculateMetadata` when duration or size depends on props or data (for example, length of a voice-over).
31
+ - Preview with `npx remotion studio`. Start a new project with `npx create-video@latest`.
32
+
33
+ ## Timing scenes
34
+
35
+ 1. Put each scene in `<Sequence from={f} durationInFrames={d}>`. Inside, `useCurrentFrame()` restarts at 0, so a scene's animation code doesn't need to know where it sits.
36
+ 2. Lay out back-to-back scenes with `<Series>` and `<Series.Sequence durationInFrames={d}>` instead of adding offsets by hand.
37
+ 3. For crossfades and slides between scenes use `@remotion/transitions` (`TransitionSeries` with `fade()`, `slide()` and a timing such as `linearTiming` or `springTiming`). A transition overlaps two scenes, so the total gets shorter by the transition length.
38
+ 4. Wrap layers in `<AbsoluteFill>` to stack them full-frame.
39
+ 5. Keep timing numbers in one place (a `timings` object or computed from props) so a script change doesn't mean editing ten files.
40
+
41
+ ## Animation
42
+
43
+ - `interpolate(frame, [0, 30], [0, 1], { extrapolateLeft: 'clamp', extrapolateRight: 'clamp' })`. Without `clamp` the value keeps going past the range: opacity above 1, elements flying off-screen. Input ranges must be strictly increasing.
44
+ - Easing: pass `easing: Easing.bezier(...)` or `Easing.out(Easing.cubic)` to `interpolate`.
45
+ - `spring({ frame, fps, config: { damping: 200 }, delay: 10, durationInFrames: 30 })` returns 0 to about 1 with physics; defaults are `mass: 1`, `damping: 10`, `stiffness: 100`. Higher `damping` means less bounce. Feed the result into `interpolate` to map it to pixels or degrees.
46
+ - Colours: `interpolateColors(frame, [0, 60], ['#000', '#fff'])`.
47
+ - Animate `transform` and `opacity`. Animating `width`, `top` or heavy `filter: blur()` per frame is slow to render.
48
+
49
+ ## Text, fonts and audio
50
+
51
+ - Load fonts before frames are captured: `loadFont()` from `@remotion/google-fonts/<Family>`, or `@remotion/fonts` `loadFont({ family, url: staticFile('x.woff2') })`. Both hold the render until the font is ready. A system font that isn't installed on the render machine or Lambda will silently fall back.
52
+ - Measure text with `@remotion/layout-utils` (`measureText`, `fitText`) when it must fit a box.
53
+ - Audio: `<Audio src={staticFile('music.mp3')} volume={(f) => interpolate(f, [0, 30], [0, 1], {extrapolateRight: 'clamp'})} />`. Skip the start with `trimBefore` (in frames; code before 4.0.319 uses `startFrom`) and cap the length by wrapping it in a `<Sequence durationInFrames>`.
54
+ - Captions: `@remotion/captions` for the caption data type and TikTok-style pages.
55
+
56
+ ## Rendering locally
57
+
58
+ 1. `npx remotion render <entry> <composition-id> out/video.mp4` (the entry defaults to the configured entry point). Common flags: `--props=./props.json`, `--codec=h264|h265|vp8|vp9|prores`, `--crf`, `--concurrency`, `--frames=0-59` for a quick check, and `npx remotion still <id> out/frame.png --frame=120` for one frame.
59
+ 2. From Node: `bundle()` from `@remotion/bundler`, then `selectComposition()` and `renderMedia()` from `@remotion/renderer`. Bundle once and reuse it for many renders.
60
+ 3. Check the output with a quick look in a player and `ffprobe out/video.mp4` (duration, fps, resolution, audio stream present).
61
+
62
+ ## Rendering on Lambda
63
+
64
+ Follow `references/lambda.md`. In short: create the IAM role and user from `npx remotion lambda policies role|user`, `npx remotion lambda functions deploy`, `npx remotion lambda sites create src/index.ts --site-name=<name>`, then `npx remotion lambda render <serve-url> <composition-id>` or `renderMediaOnLambda()` with `getRenderProgress()`.
65
+
66
+ ## Performance checklist
67
+
68
+ When renders are slow or time out, check in order:
69
+
70
+ 1. Run `npx remotion benchmark` or render with `--log=verbose` to see slow frames.
71
+ 2. Heavy work per frame (parsing JSON, building big arrays): move it into `useMemo` or `calculateMetadata`.
72
+ 3. Big images: resize to the output size; prefer JPEG/WebP over huge PNGs.
73
+ 4. Too many simultaneous videos, or `<Video>` sources with sparse keyframes: re-encode sources with FFmpeg (see the ffmpeg-media-processing skill).
74
+ 5. GPU-only CSS (`backdrop-filter`, large blurs, WebGL) on a machine without a GPU: check what's available with `npx remotion gpu`, try `--gl=angle` or `--gl=swangle` (the Lambda default), or simplify the effect.
75
+ 6. Tune `--concurrency`; more is not always faster on a small machine.
76
+
77
+ ## Never
78
+
79
+ - Never drive motion with timers, CSS animations, or state updated in `useEffect` per frame.
80
+ - Never leave a `delayRender()` without a matching `continueRender()` or `cancelRender()` on every code path.
81
+ - Never commit AWS keys; `REMOTION_AWS_ACCESS_KEY_ID` and `REMOTION_AWS_SECRET_ACCESS_KEY` live in `.env` that is gitignored.
82
+
83
+ ## Stop and ask the user
84
+
85
+ - Before the first Lambda deploy or a large Lambda render: it creates AWS resources and costs money.
86
+ - Whether rendered files should be public or private in S3 (`--privacy`); the default is public.
87
+ - Licensing: Remotion is free for individuals and companies of up to 3 people; bigger for-profit companies need a company license. Point it out once when the project is for a company; don't decide for them.
88
+
89
+ ## Report back
90
+
91
+ Composition IDs touched, the render command you ran, output path with duration/fps/resolution from `ffprobe`, and any frame you checked by eye.
@@ -0,0 +1,16 @@
1
+ {
2
+ "should_trigger": [
3
+ "Build a 15-second Remotion intro where the logo springs in and the title fades up",
4
+ "My Remotion render flickers because the text animates with a CSS transition, how do I fix it?",
5
+ "Deploy our Remotion composition to Lambda and render personalised videos from an API",
6
+ "Google font isn't showing in the Remotion MP4 even though it works in the Studio",
7
+ "Use Series and TransitionSeries to stitch five slides into one Remotion video with fades"
8
+ ],
9
+ "should_not_trigger": [
10
+ "Trim the first ten seconds off this MP4 and convert it to WebM",
11
+ "Animate a proof of the Pythagorean theorem with Manim",
12
+ "Add a Framer Motion hover animation to the pricing cards",
13
+ "Generate a short product clip from a text prompt with a video generation API",
14
+ "Speed up our React dashboard that re-renders on every keystroke"
15
+ ]
16
+ }
@@ -0,0 +1,66 @@
1
+ # Remotion Lambda setup and rendering
2
+
3
+ Check www.remotion.dev/docs/lambda for the current version before changing anything; the function and the site must be on the same Remotion version as the project.
4
+
5
+ ## One-time setup
6
+
7
+ 1. `npx remotion add @remotion/lambda` (keeps every `remotion` and `@remotion/*` package on the same version).
8
+ 2. In AWS IAM create a role named `remotion-lambda-role` with the policy printed by `npx remotion lambda policies role`.
9
+ 3. Create a user with the policy from `npx remotion lambda policies user` and an access key. Put the key in a gitignored `.env`:
10
+
11
+ ```txt
12
+ REMOTION_AWS_ACCESS_KEY_ID=...
13
+ REMOTION_AWS_SECRET_ACCESS_KEY=...
14
+ ```
15
+
16
+ 4. Check it: `npx remotion lambda policies validate`.
17
+ 5. See your concurrency limit: `npx remotion lambda quotas`. New AWS accounts often have a low limit; request an increase before big renders.
18
+
19
+ ## Deploy
20
+
21
+ ```bash
22
+ npx remotion lambda functions deploy # once per Remotion version / memory / timeout / region
23
+ npx remotion lambda sites create src/index.ts --site-name=my-video # every time the video code changes
24
+ ```
25
+
26
+ `sites create` prints a serve URL. Redeploying with the same `--site-name` overwrites it, so a stable name keeps the URL.
27
+
28
+ ## Render from the CLI
29
+
30
+ ```bash
31
+ npx remotion lambda render <serve-url-or-site-name> <composition-id> [out.mp4] \
32
+ --privacy=private --props=./props.json
33
+ ```
34
+
35
+ - `--concurrency=<n>` or `--frames-per-lambda=<n>` controls how the video is split (one or the other, at most 200 functions).
36
+ - `--privacy`: `public` (default), `private` (use `presignUrl()` to hand out a link) or `no-acl`.
37
+ - Without an output path the file stays in the S3 bucket.
38
+
39
+ ## Render from Node
40
+
41
+ ```ts
42
+ import { renderMediaOnLambda, getRenderProgress } from '@remotion/lambda/client';
43
+
44
+ const { renderId, bucketName } = await renderMediaOnLambda({
45
+ region: 'us-east-1',
46
+ functionName, // from getFunctions({ region, compatibleOnly: true })
47
+ serveUrl,
48
+ composition: 'Intro',
49
+ inputProps: { title },
50
+ codec: 'h264',
51
+ privacy: 'private',
52
+ });
53
+
54
+ // Poll from a job, not from an HTTP request handler
55
+ const progress = await getRenderProgress({ renderId, bucketName, functionName, region: 'us-east-1' });
56
+ // progress.done, progress.overallProgress, progress.outputFile, progress.fatalErrorEncountered, progress.errors
57
+ ```
58
+
59
+ Store `renderId` and `bucketName` with your job row so a restart can resume polling. A `webhook` option on `renderMediaOnLambda` can notify you instead of polling; verify every delivery against the secret you set, using `validateWebhookSignature({ secret, body, signatureHeader })` from `@remotion/lambda/client` with the `X-Remotion-Signature` request header, before you trust it.
60
+
61
+ ## Common failures
62
+
63
+ - Version mismatch between project, function and site: redeploy both after upgrading.
64
+ - Fonts missing on Lambda: load them with `@remotion/google-fonts` or `@remotion/fonts`; Lambda has few system fonts.
65
+ - `delayRender` timeouts on Lambda but not locally: remote assets are slower to fetch; raise `timeoutInMilliseconds` for that call or host assets in the same region.
66
+ - Rate limit / concurrency errors: lower `--concurrency` or raise the AWS quota.
@@ -0,0 +1,97 @@
1
+ ---
2
+ name: returns-reverse-logistics
3
+ description: Returns and reverse-logistics flow design for physical goods, from writing the return policy and issuing RMA authorisations to receiving, inspecting and grading items, routing each one to restock, refurbish, liquidate, recycle or dispose, timing the refund against receipt, and flagging return-fraud patterns such as wardrobing, item swaps and empty boxes. Use when building or fixing a returns portal, RMA workflow or grading rules, deciding when refunds are released, or reducing return losses and abuse.
4
+ license: MIT
5
+ compatibility: Any Agent Skills host. Applies to a store platform, WMS, order system or spreadsheet; consumer law references are EU/UK and must be checked for other markets.
6
+ metadata:
7
+ kete-loom/version: "0.1.0"
8
+ kete-loom/category: business
9
+ kete-loom/risk: writes-files
10
+ kete-loom/owner: "Kete-org"
11
+ ---
12
+
13
+ # Returns and reverse logistics
14
+
15
+ Every return becomes an RMA with a reason, a physical route and a money outcome, and each step changes one status. The goal is to recover the most value per returned unit while refunding honest customers fast.
16
+
17
+ ## 0. Before you design
18
+
19
+ Ask for, or find in the codebase and docs:
20
+
21
+ 1. Markets sold into, and whether customers are consumers or businesses. Consumer law sets minimum rights you cannot design away.
22
+ 2. Product types: apparel, electronics with serials, perishables, hygiene items, made-to-order. Each has different returnability.
23
+ 3. Current return rate and top reasons, if known.
24
+ 4. Who pays return shipping, and whether you use prepaid labels, drop-off points or the customer's own carrier.
25
+ 5. Systems: order system, store platform, WMS, payment provider (for refunds).
26
+
27
+ If the user wants a policy that may breach consumer law in a market (for example no returns at all for distance sales to EU consumers), **stop and say so**; a lawyer must sign off the final policy text.
28
+
29
+ ## 1. Return policy
30
+
31
+ Decide and write down:
32
+
33
+ - Return window and when it starts (delivery date, not order date).
34
+ - Condition rules: unused, tags on, original packaging; what is non-returnable (sealed hygiene items once unsealed, perishables, custom items) where the law allows.
35
+ - Who pays return shipping per reason (defect or wrong item: seller; change of mind: per policy).
36
+ - Refund method (original payment method by default), exchange and store-credit options.
37
+ - Restocking fees, only where legal and disclosed before purchase.
38
+
39
+ Legal floor examples, verify current law per market:
40
+ - EU (Consumer Rights Directive 2011/83/EU) and UK (Consumer Contracts Regulations 2013): consumers have 14 days to withdraw from a distance sale, and the trader must refund within 14 days of being told, but may hold the refund until it receives the goods or proof they were sent back, whichever is first.
41
+ - Faulty goods have separate statutory remedies that a change-of-mind policy does not limit.
42
+
43
+ ## 2. RMA process
44
+
45
+ States: `requested -> authorised -> label_issued -> in_transit -> received -> inspected -> dispositioned -> refunded | exchanged | rejected -> closed`.
46
+
47
+ 1. Customer requests a return with order line, quantity and a **reason code** from a fixed list (wrong size, not as described, defective, damaged in transit, changed mind, arrived late, other + text).
48
+ 2. Auto-authorise inside policy; route exceptions (outside window, high value, repeat returner) to a person.
49
+ 3. Issue the RMA number and label; print the RMA on the label or packing slip so the warehouse can match the parcel.
50
+ 4. Damaged in transit goes to the logistics-exception-management flow for a carrier claim, not just a return.
51
+
52
+ ## 3. Receive, inspect, grade
53
+
54
+ - Scan the RMA on arrival; record date, weight and photos for high-value items.
55
+ - Check: correct item (SKU, serial or IMEI matches the outbound record), quantity, condition, accessories, signs of use.
56
+ - Grade on a fixed scale with written criteria and photo examples:
57
+
58
+ | Grade | Meaning | Default route |
59
+ |---|---|---|
60
+ | A | As new, sealed or unworn, full packaging | Restock as new |
61
+ | B | Opened, fully working, light packaging wear | Restock as open-box or B-stock |
62
+ | C | Cosmetic damage or missing accessories, works | Refurbish or sell as graded |
63
+ | D | Faulty or heavily damaged | Repair if cost < recovery value, else return to vendor, recycle or dispose |
64
+ | X | Wrong item, empty box or tampered | Hold, fraud review, no refund until resolved |
65
+
66
+ Set an inspection SLA (for example 2 business days from receipt) because refunds wait on it.
67
+
68
+ ## 4. Disposition rule
69
+
70
+ For each graded unit: compare **recovery value** (resale price at that grade minus refurbish, repack and handling cost) across restock, refurbish, return to vendor, liquidate, donate, recycle and dispose. Pick the highest; prefer restock or refurbish over disposal. Log the decision so finance can book the right inventory value. Check vendor return-to-vendor terms and any rules on disposing of unsold goods in your markets.
71
+
72
+ ## 5. Refund timing
73
+
74
+ - Pick the trigger per risk: on carrier first scan (fast, more fraud exposure), on receipt, or on inspection (slowest). Low-value, low-risk items can refund on first scan; high-value and serialised items refund on inspection.
75
+ - Respect the legal maximum where it applies (section 1), so inspection must be fast enough to fit inside it.
76
+ - Refund through the payment provider's refund API, keyed by an idempotency key per RMA so a retry cannot refund twice.
77
+ - Partial refunds for missing parts or wear only where the policy and law allow, with the reason and photos stored.
78
+
79
+ ## 6. Fraud and abuse signals
80
+
81
+ Flag for review, never auto-ban:
82
+ - Wardrobing: worn items returned (deodorant, makeup, removed tags reattached), often after events.
83
+ - Item swap: serial mismatch, counterfeit or older model returned.
84
+ - Empty box or weight far below the outbound weight.
85
+ - Serial returner: return rate far above peers, many "not received" plus "defective" claims.
86
+ - Refund to a different payment method than the purchase, or return from a different address.
87
+
88
+ ## Rules
89
+
90
+ - Never auto-refuse a refund that the law requires; route doubtful cases to a person.
91
+ - Never release a refund twice for one RMA; check status and idempotency.
92
+ - Never restock a returned item as new without grading.
93
+ - Do not publish policy text as legally compliant; tell the user it needs legal review.
94
+
95
+ ## Report
96
+
97
+ For a design: the policy summary, the RMA state machine, the grading table, disposition and refund-trigger rules, and the integration points. For a review of existing returns: return rate and top reasons, average days from receipt to refund, recovery value per return, fraud flags raised and confirmed, and the three changes with the biggest saving.
@@ -0,0 +1,16 @@
1
+ {
2
+ "should_trigger": [
3
+ "Design the RMA workflow for our online shop, from return request to refund",
4
+ "Write grading criteria so the warehouse knows whether a returned laptop is restocked, refurbished or scrapped",
5
+ "Should we refund returns when the carrier scans the parcel or only after inspection?",
6
+ "We keep getting empty boxes and swapped serial numbers back, how do we catch return fraud?",
7
+ "Draft a 30 day return policy for our apparel store that also works for EU customers"
8
+ ],
9
+ "should_not_trigger": [
10
+ "The outbound parcel was lost in transit, help me open a trace and claim with the courier",
11
+ "Set up dunning emails and retries for failed subscription renewals",
12
+ "Calculate safety stock for our returnable packaging crates",
13
+ "Generate a VAT-compliant credit note PDF for a cancelled invoice",
14
+ "Pick the right HS code and duty rate for refurbished phones we import"
15
+ ]
16
+ }
@@ -0,0 +1,127 @@
1
+ ---
2
+ name: ruby-patterns
3
+ description: Ruby 3 idioms for plain Ruby and gem code - small objects with clear responsibilities, blocks and Enumerable over manual loops, custom exception hierarchies and narrow rescue, frozen string literals, keyword arguments, Bundler and Gemfile.lock discipline, RuboCop configuration, optional RBS or Sorbet signatures, and the allocation and lookup mistakes that make Ruby slow. Use when writing or restructuring Ruby classes and modules, designing a gem's public API, setting up RuboCop or type signatures, or asking why a Ruby script is slow or allocating heavily.
4
+ license: MIT
5
+ compatibility: Any Agent Skills host. Needs ruby and bundler; rubocop, steep or sorbet only if the project uses them.
6
+ metadata:
7
+ kete-loom/version: "0.1.0"
8
+ kete-loom/category: coding
9
+ kete-loom/risk: runs-commands
10
+ kete-loom/requires: "ruby, bundle"
11
+ kete-loom/owner: "Kete-org"
12
+ ---
13
+
14
+ # Ruby patterns
15
+
16
+ Ruby code that reads plainly, fails loudly, and does not surprise the next person.
17
+
18
+ ## 0. Read the project first
19
+
20
+ 1. Find the Ruby version: `.ruby-version`, `.tool-versions`, the `ruby` line in `Gemfile`, `required_ruby_version` in a `.gemspec`. Do not use syntax newer than that version (for example the `it` block parameter needs Ruby 3.4).
21
+ 2. Read `.rubocop.yml` and any `inherit_from` / `inherit_gem` files. Their rules win over this skill.
22
+ 3. Check for typing: `sig/` and `Steepfile` (RBS + Steep), or `sorbet/` and `# typed:` comments (Sorbet). Follow whichever exists; don't add one without asking.
23
+ 4. Run commands through Bundler: `bundle exec rubocop`, `bundle exec rake`. Never rely on globally installed gem versions.
24
+
25
+ If the code is a Rails app, apply this skill to plain Ruby objects only; framework conventions come from the project.
26
+
27
+ ## 1. Object design
28
+
29
+ - One class, one job. If a class name needs "And" or "Manager", split it.
30
+ - Prefer plain objects with an explicit `initialize` over hashes passed around. A hash with fixed keys that travels more than one method wants to be a `Data` (Ruby 3.2+) or `Struct`:
31
+
32
+ ```ruby
33
+ Point = Data.define(:x, :y) # immutable, value equality, keyword or positional init
34
+ Point.new(x: 1, y: 2).with(y: 3)
35
+ ```
36
+
37
+ - Use keyword arguments for anything beyond one or two obvious positionals. Required keywords (`def charge(amount:, currency:)`) fail at the call site instead of deep inside.
38
+ - Keep the public surface small: mark helpers `private`. Expose `attr_reader`, not `attr_accessor`, unless callers truly must write.
39
+ - Composition over inheritance. Use a module for shared behaviour that has no state of its own; use `Comparable` / `Enumerable` by defining `<=>` / `each`.
40
+ - Avoid metaprogramming (`method_missing`, `define_method`, `send` with user input, `class_eval` strings) unless it removes real duplication. If you add `method_missing`, also define `respond_to_missing?`.
41
+ - Do not monkey-patch core classes. If you must extend one, use a `refinement` scoped with `using`.
42
+
43
+ ## 2. Blocks and Enumerable
44
+
45
+ - Reach for `map`, `select`/`filter`, `reject`, `filter_map`, `each_with_object`, `sum`, `group_by`, `partition`, `tally`, `min_by`/`max_by`, `each_slice`, `find` before writing `each` with an accumulator.
46
+ - `each` is for side effects only. Never `map` and ignore the result.
47
+ - `sum` with floats: `sum(0.0)`; for money use `BigDecimal` or integer minor units, never `Float`.
48
+ - Large or infinite sequences: `.lazy` or `each_slice` so you don't build huge intermediate arrays.
49
+ - Methods that yield should return an `Enumerator` when called without a block: `return enum_for(__method__) unless block_given?`.
50
+ - `&:name` for single method calls; a short block (`{ it.strip }` on 3.4+, `{ _1.strip }` on 2.7+, or a named param) otherwise. Named params read best beyond one line.
51
+
52
+ ## 3. Exceptions
53
+
54
+ - Define one base error per library or domain and subclass it:
55
+
56
+ ```ruby
57
+ module Billing
58
+ class Error < StandardError; end
59
+ class CardDeclined < Error; end
60
+ end
61
+ ```
62
+
63
+ - Rescue the narrowest class you can handle. Never `rescue Exception` (it swallows `Interrupt`, `NoMemoryError`, `SystemExit`). A bare `rescue` means `StandardError`; still too broad unless you re-raise.
64
+ - Never `rescue => e` and then do nothing. Either handle it, re-raise (`raise`), or wrap it with context: `raise Billing::Error, "charge #{id} failed"` (Ruby sets `cause` automatically).
65
+ - Keep `begin` blocks to the call that can fail. Use `ensure` for cleanup, or better a block API (`File.open(path) { |f| ... }`) that closes for you.
66
+ - Use `retry` only with a counter and backoff; an unbounded `retry` loops forever.
67
+ - Don't use exceptions for expected control flow (lookups that may miss): return `nil` or a result object and let the caller decide. Use `fetch` when a missing key is a bug.
68
+
69
+ ## 4. Strings, symbols and nil
70
+
71
+ - Put `# frozen_string_literal: true` at the top of every file if the project does (RuboCop `Style/FrozenStringLiteralComment`). Build strings with `+"..."`, `String.new` or interpolation when you need a mutable one.
72
+ - On Ruby 3.4, mutating a literal in a file without the magic comment emits a deprecation warning when deprecation warnings are on (`ruby -W:deprecated` or `Warning[:deprecated] = true`). Turn them on in CI to find code that will break when literals become frozen.
73
+ - Use `<<` on a mutable buffer for loops; `+=` allocates a new string each time.
74
+ - Treat `nil` deliberately: `&.` for genuinely optional values, `Hash#fetch` / `Array#fetch` to fail loudly, `Array(x)` to normalise. Repeated `&.` chains usually mean a missing object.
75
+ - Symbols for identifiers and keys you control; never `to_sym` on user input in long-lived processes.
76
+
77
+ ## 5. Bundler and dependencies
78
+
79
+ - Commit `Gemfile.lock` for applications. For a gem, declare runtime dependencies in the `.gemspec` with `~>` ranges and keep the lockfile out of the release.
80
+ - Pin loosely with intent: `gem "faraday", "~> 2.9"`. No unbounded `>=` for runtime gems.
81
+ - Group dev and test gems (`group :development, :test do`), and `require: false` for gems loaded on demand (`rubocop`, `bootsnap`).
82
+ - Add or upgrade one gem at a time: `bundle add <gem>`, `bundle update --conservative <gem>`. Never a bare `bundle update` without asking: it moves every gem.
83
+ - In CI and deploys: `bundle config set frozen true` (or `deployment true`) so a stale lockfile fails instead of re-resolving.
84
+ - Since Ruby 3.4, `base64`, `bigdecimal`, `csv`, `drb`, `mutex_m`, `observer`, `getoptlong`, `nkf`, `syslog`, `abbrev`, `rinda` and `resolv-replace` are bundled gems: under Bundler, declare them in the Gemfile if you `require` them.
85
+
86
+ ## 6. RuboCop
87
+
88
+ - Run `bundle exec rubocop` on changed files; `-a` applies safe corrections only. Use `-A` (unsafe) only on files you are editing, and review the diff.
89
+ - Fix the cause rather than disabling a cop. If a disable is right, scope it: `# rubocop:disable Metrics/MethodLength` ... `# rubocop:enable ...` on the smallest range, with a reason.
90
+ - Adopting RuboCop on an old codebase: `rubocop --auto-gen-config` to create `.rubocop_todo.yml`, then shrink it over time. Don't reformat the whole repo in a feature change.
91
+ - Use plugins the project already has (`rubocop-performance`, `rubocop-rspec`, `rubocop-rails`); ask before adding new ones.
92
+
93
+ ## 7. Optional typing
94
+
95
+ Only when the project already uses it, or the user asks.
96
+
97
+ - **RBS + Steep:** signatures in `sig/**/*.rbs`; check with `bundle exec steep check`. Start with `rbs prototype rb lib/foo.rb` and then tighten `untyped` by hand.
98
+ - **Sorbet:** `# typed: false|true|strict` per file, `sig { params(x: Integer).returns(String) }` above methods, check with `bundle exec srb tc`; generate gem RBIs with `bundle exec tapioca gem`.
99
+ - Type the public API first. Don't use `T.unsafe`, `T.untyped` or `untyped` to silence an error you don't understand.
100
+
101
+ ## 8. Performance pitfalls
102
+
103
+ Measure first: `Benchmark.realtime`, `benchmark-ips`, `memory_profiler`, `stackprof`. Then look for:
104
+
105
+ | Pitfall | Fix |
106
+ |---|---|
107
+ | `array.include?(x)` inside a loop | build a `Set` (or Hash) once |
108
+ | `+=` / `+` building strings or arrays in loops | `<<`, `concat`, `join`, `each_with_object` |
109
+ | `.map { }.flatten`, `.select { }.first`, `.select { }.count` | `flat_map`, `find`, `count { }` |
110
+ | Reading a whole file to iterate lines | `File.foreach(path)` |
111
+ | Regex or object built inside a hot loop | hoist it to a constant |
112
+ | `method_missing` / `send` on hot paths | define real methods |
113
+ | `Hash#merge` in a loop | `merge!` / `[]=` on one hash |
114
+ | N+1 calls to a DB or HTTP API per element | batch the call, then index the result by key |
115
+
116
+ Ruby threads share the GVL: they help with I/O waits, not CPU-bound work. For CPU-bound parallelism use processes; consider `Ractor` only after checking it is stable enough for the project's Ruby version.
117
+
118
+ ## Never
119
+
120
+ - `eval`, `instance_eval` or `class_eval` with strings built from input.
121
+ - `Marshal.load` or `YAML.load` of untrusted data; use `JSON.parse` or `YAML.safe_load`.
122
+ - Backticks, `system("cmd #{x}")` or `%x()` with interpolated input; pass an argument list: `system("git", "log", ref)`.
123
+ - Global state via `$globals` or class variables (`@@var`); use constants, injected objects, or class-level instance variables.
124
+
125
+ ## Report back
126
+
127
+ When you finish, say: files changed, the RuboCop (and type-check) command you ran and its result, the test command and pass/fail counts, and anything you chose not to change.
@@ -0,0 +1,18 @@
1
+ {
2
+ "should_trigger": [
3
+ "What's the idiomatic way to model this config hash as a Ruby object? Struct or Data?",
4
+ "Refactor this Ruby class: it's 400 lines and uses each with an accumulator everywhere",
5
+ "Set up RuboCop for our gem and tell me which cops to keep",
6
+ "Why is my Ruby script that dedupes a CSV so slow and eating memory?",
7
+ "Should I add RBS signatures or Sorbet to this Ruby library?",
8
+ "How should I design the error classes for my Ruby gem so callers can rescue them?"
9
+ ],
10
+ "should_not_trigger": [
11
+ "Write RSpec examples for the Invoice#total method",
12
+ "bundle install fails building the pg gem native extension on my Mac",
13
+ "Review my Ruby PR for N+1 queries and unpermitted params before merge",
14
+ "How do I structure a Rails app with service objects and concerns?",
15
+ "Show me the idiomatic way to handle errors in Python with custom exceptions",
16
+ "Write a Ruby on Rails migration that adds an index concurrently"
17
+ ]
18
+ }