specweave 0.18.0 → 0.20.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/CLAUDE.md +229 -1817
  2. package/README.md +68 -0
  3. package/bin/specweave.js +62 -6
  4. package/dist/locales/de/.gitkeep +0 -0
  5. package/dist/locales/de/cli.json +108 -0
  6. package/dist/locales/en/cli.json +287 -0
  7. package/dist/locales/en/errors.json +7 -0
  8. package/dist/locales/en/templates.json +6 -0
  9. package/dist/locales/es/.gitkeep +0 -0
  10. package/dist/locales/es/cli.json +41 -0
  11. package/dist/locales/fr/.gitkeep +0 -0
  12. package/dist/locales/fr/cli.json +108 -0
  13. package/dist/locales/ja/.gitkeep +0 -0
  14. package/dist/locales/ja/cli.json +108 -0
  15. package/dist/locales/ko/.gitkeep +0 -0
  16. package/dist/locales/ko/cli.json +108 -0
  17. package/dist/locales/pt/.gitkeep +0 -0
  18. package/dist/locales/pt/cli.json +108 -0
  19. package/dist/locales/ru/.gitkeep +0 -0
  20. package/dist/locales/ru/cli.json +269 -0
  21. package/dist/locales/zh/.gitkeep +0 -0
  22. package/dist/locales/zh/cli.json +108 -0
  23. package/dist/plugins/specweave/lib/hooks/sync-living-docs.d.ts.map +1 -1
  24. package/dist/plugins/specweave/lib/hooks/sync-living-docs.js +3 -0
  25. package/dist/plugins/specweave/lib/hooks/sync-living-docs.js.map +1 -1
  26. package/dist/plugins/specweave/lib/hooks/update-ac-status.d.ts +21 -0
  27. package/dist/plugins/specweave/lib/hooks/update-ac-status.d.ts.map +1 -0
  28. package/dist/plugins/specweave/lib/hooks/update-ac-status.js +162 -0
  29. package/dist/plugins/specweave/lib/hooks/update-ac-status.js.map +1 -0
  30. package/dist/plugins/specweave-ado/lib/ado-spec-content-sync.d.ts.map +1 -1
  31. package/dist/plugins/specweave-ado/lib/ado-spec-content-sync.js +65 -6
  32. package/dist/plugins/specweave-ado/lib/ado-spec-content-sync.js.map +1 -1
  33. package/dist/plugins/specweave-ado/lib/enhanced-ado-sync.d.ts +25 -0
  34. package/dist/plugins/specweave-ado/lib/enhanced-ado-sync.d.ts.map +1 -0
  35. package/dist/plugins/specweave-ado/lib/enhanced-ado-sync.js +191 -0
  36. package/dist/plugins/specweave-ado/lib/enhanced-ado-sync.js.map +1 -0
  37. package/dist/plugins/specweave-github/lib/completion-calculator.d.ts +112 -0
  38. package/dist/plugins/specweave-github/lib/completion-calculator.d.ts.map +1 -0
  39. package/dist/plugins/specweave-github/lib/completion-calculator.js +301 -0
  40. package/dist/plugins/specweave-github/lib/completion-calculator.js.map +1 -0
  41. package/dist/plugins/specweave-github/lib/duplicate-detector.d.ts +3 -3
  42. package/dist/plugins/specweave-github/lib/duplicate-detector.js +3 -3
  43. package/dist/plugins/specweave-github/lib/epic-content-builder.d.ts +70 -0
  44. package/dist/plugins/specweave-github/lib/epic-content-builder.d.ts.map +1 -0
  45. package/dist/plugins/specweave-github/lib/epic-content-builder.js +258 -0
  46. package/dist/plugins/specweave-github/lib/epic-content-builder.js.map +1 -0
  47. package/dist/plugins/specweave-github/lib/github-client-v2.d.ts +14 -0
  48. package/dist/plugins/specweave-github/lib/github-client-v2.d.ts.map +1 -1
  49. package/dist/plugins/specweave-github/lib/github-client-v2.js +51 -0
  50. package/dist/plugins/specweave-github/lib/github-client-v2.js.map +1 -1
  51. package/dist/plugins/specweave-github/lib/github-epic-sync.d.ts +2 -2
  52. package/dist/plugins/specweave-github/lib/github-epic-sync.d.ts.map +1 -1
  53. package/dist/plugins/specweave-github/lib/github-epic-sync.js +20 -5
  54. package/dist/plugins/specweave-github/lib/github-epic-sync.js.map +1 -1
  55. package/dist/plugins/specweave-github/lib/github-feature-sync.d.ts +87 -0
  56. package/dist/plugins/specweave-github/lib/github-feature-sync.d.ts.map +1 -0
  57. package/dist/plugins/specweave-github/lib/github-feature-sync.js +412 -0
  58. package/dist/plugins/specweave-github/lib/github-feature-sync.js.map +1 -0
  59. package/dist/plugins/specweave-github/lib/github-spec-content-sync.d.ts.map +1 -1
  60. package/dist/plugins/specweave-github/lib/github-spec-content-sync.js +64 -13
  61. package/dist/plugins/specweave-github/lib/github-spec-content-sync.js.map +1 -1
  62. package/dist/plugins/specweave-github/lib/progress-comment-builder.d.ts +78 -0
  63. package/dist/plugins/specweave-github/lib/progress-comment-builder.d.ts.map +1 -0
  64. package/dist/plugins/specweave-github/lib/progress-comment-builder.js +237 -0
  65. package/dist/plugins/specweave-github/lib/progress-comment-builder.js.map +1 -0
  66. package/dist/plugins/specweave-github/lib/user-story-content-builder.d.ts +97 -0
  67. package/dist/plugins/specweave-github/lib/user-story-content-builder.d.ts.map +1 -0
  68. package/dist/plugins/specweave-github/lib/user-story-content-builder.js +301 -0
  69. package/dist/plugins/specweave-github/lib/user-story-content-builder.js.map +1 -0
  70. package/dist/plugins/specweave-github/lib/user-story-issue-builder.d.ts +83 -0
  71. package/dist/plugins/specweave-github/lib/user-story-issue-builder.d.ts.map +1 -0
  72. package/dist/plugins/specweave-github/lib/user-story-issue-builder.js +386 -0
  73. package/dist/plugins/specweave-github/lib/user-story-issue-builder.js.map +1 -0
  74. package/dist/plugins/specweave-jira/lib/enhanced-jira-sync.d.ts +28 -0
  75. package/dist/plugins/specweave-jira/lib/enhanced-jira-sync.d.ts.map +1 -0
  76. package/dist/plugins/specweave-jira/lib/enhanced-jira-sync.js +156 -0
  77. package/dist/plugins/specweave-jira/lib/enhanced-jira-sync.js.map +1 -0
  78. package/dist/plugins/specweave-kafka/lib/cli/kcat-wrapper.d.ts +57 -0
  79. package/dist/plugins/specweave-kafka/lib/cli/kcat-wrapper.d.ts.map +1 -0
  80. package/dist/plugins/specweave-kafka/lib/cli/kcat-wrapper.js +248 -0
  81. package/dist/plugins/specweave-kafka/lib/cli/kcat-wrapper.js.map +1 -0
  82. package/dist/plugins/specweave-kafka/lib/cli/types.d.ts +82 -0
  83. package/dist/plugins/specweave-kafka/lib/cli/types.d.ts.map +1 -0
  84. package/dist/plugins/specweave-kafka/lib/cli/types.js +13 -0
  85. package/dist/plugins/specweave-kafka/lib/cli/types.js.map +1 -0
  86. package/dist/plugins/specweave-kafka/lib/mcp/detector.d.ts +49 -0
  87. package/dist/plugins/specweave-kafka/lib/mcp/detector.d.ts.map +1 -0
  88. package/dist/plugins/specweave-kafka/lib/mcp/detector.js +316 -0
  89. package/dist/plugins/specweave-kafka/lib/mcp/detector.js.map +1 -0
  90. package/dist/plugins/specweave-kafka/lib/mcp/types.d.ts +70 -0
  91. package/dist/plugins/specweave-kafka/lib/mcp/types.d.ts.map +1 -0
  92. package/dist/plugins/specweave-kafka/lib/mcp/types.js +23 -0
  93. package/dist/plugins/specweave-kafka/lib/mcp/types.js.map +1 -0
  94. package/dist/plugins/specweave-kafka/lib/utils/partitioning.d.ts +85 -0
  95. package/dist/plugins/specweave-kafka/lib/utils/partitioning.d.ts.map +1 -0
  96. package/dist/plugins/specweave-kafka/lib/utils/partitioning.js +281 -0
  97. package/dist/plugins/specweave-kafka/lib/utils/partitioning.js.map +1 -0
  98. package/dist/plugins/specweave-kafka/lib/utils/sizing.d.ts +75 -0
  99. package/dist/plugins/specweave-kafka/lib/utils/sizing.d.ts.map +1 -0
  100. package/dist/plugins/specweave-kafka/lib/utils/sizing.js +238 -0
  101. package/dist/plugins/specweave-kafka/lib/utils/sizing.js.map +1 -0
  102. package/dist/spec-parser.js +629 -0
  103. package/dist/src/cli/commands/import-docs.js +4 -4
  104. package/dist/src/cli/commands/import-docs.js.map +1 -1
  105. package/dist/src/cli/commands/init-multiproject.d.ts.map +1 -1
  106. package/dist/src/cli/commands/init-multiproject.js +17 -18
  107. package/dist/src/cli/commands/init-multiproject.js.map +1 -1
  108. package/dist/src/cli/commands/init.d.ts.map +1 -1
  109. package/dist/src/cli/commands/init.js +107 -3
  110. package/dist/src/cli/commands/init.js.map +1 -1
  111. package/dist/src/cli/commands/migrate-to-multiproject.d.ts.map +1 -1
  112. package/dist/src/cli/commands/migrate-to-multiproject.js +8 -4
  113. package/dist/src/cli/commands/migrate-to-multiproject.js.map +1 -1
  114. package/dist/src/cli/commands/switch-project.d.ts.map +1 -1
  115. package/dist/src/cli/commands/switch-project.js +9 -26
  116. package/dist/src/cli/commands/switch-project.js.map +1 -1
  117. package/dist/src/cli/commands/sync-spec-content.js +3 -0
  118. package/dist/src/cli/commands/sync-spec-content.js.map +1 -1
  119. package/dist/src/core/deduplication/command-deduplicator.d.ts +166 -0
  120. package/dist/src/core/deduplication/command-deduplicator.d.ts.map +1 -0
  121. package/dist/src/core/deduplication/command-deduplicator.js +254 -0
  122. package/dist/src/core/deduplication/command-deduplicator.js.map +1 -0
  123. package/dist/src/core/increment/active-increment-manager.d.ts +42 -15
  124. package/dist/src/core/increment/active-increment-manager.d.ts.map +1 -1
  125. package/dist/src/core/increment/active-increment-manager.js +113 -46
  126. package/dist/src/core/increment/active-increment-manager.js.map +1 -1
  127. package/dist/src/core/increment/conflict-resolver.d.ts +40 -0
  128. package/dist/src/core/increment/conflict-resolver.d.ts.map +1 -0
  129. package/dist/src/core/increment/conflict-resolver.js +219 -0
  130. package/dist/src/core/increment/conflict-resolver.js.map +1 -0
  131. package/dist/src/core/increment/discipline-checker.d.ts.map +1 -1
  132. package/dist/src/core/increment/discipline-checker.js +7 -1
  133. package/dist/src/core/increment/discipline-checker.js.map +1 -1
  134. package/dist/src/core/increment/duplicate-detector.d.ts +52 -0
  135. package/dist/src/core/increment/duplicate-detector.d.ts.map +1 -0
  136. package/dist/src/core/increment/duplicate-detector.js +276 -0
  137. package/dist/src/core/increment/duplicate-detector.js.map +1 -0
  138. package/dist/src/core/increment/increment-archiver.d.ts +90 -0
  139. package/dist/src/core/increment/increment-archiver.d.ts.map +1 -0
  140. package/dist/src/core/increment/increment-archiver.js +368 -0
  141. package/dist/src/core/increment/increment-archiver.js.map +1 -0
  142. package/dist/src/core/increment/increment-reopener.d.ts +165 -0
  143. package/dist/src/core/increment/increment-reopener.d.ts.map +1 -0
  144. package/dist/src/core/increment/increment-reopener.js +390 -0
  145. package/dist/src/core/increment/increment-reopener.js.map +1 -0
  146. package/dist/src/core/increment/metadata-manager.d.ts +26 -1
  147. package/dist/src/core/increment/metadata-manager.d.ts.map +1 -1
  148. package/dist/src/core/increment/metadata-manager.js +143 -5
  149. package/dist/src/core/increment/metadata-manager.js.map +1 -1
  150. package/dist/src/core/increment/recent-work-scanner.d.ts +121 -0
  151. package/dist/src/core/increment/recent-work-scanner.d.ts.map +1 -0
  152. package/dist/src/core/increment/recent-work-scanner.js +303 -0
  153. package/dist/src/core/increment/recent-work-scanner.js.map +1 -0
  154. package/dist/src/core/increment/types.d.ts +1 -0
  155. package/dist/src/core/increment/types.d.ts.map +1 -1
  156. package/dist/src/core/increment-utils.d.ts +112 -0
  157. package/dist/src/core/increment-utils.d.ts.map +1 -0
  158. package/dist/src/core/increment-utils.js +210 -0
  159. package/dist/src/core/increment-utils.js.map +1 -0
  160. package/dist/src/core/living-docs/ac-project-specific-generator.d.ts +65 -0
  161. package/dist/src/core/living-docs/ac-project-specific-generator.d.ts.map +1 -0
  162. package/dist/src/core/living-docs/ac-project-specific-generator.js +175 -0
  163. package/dist/src/core/living-docs/ac-project-specific-generator.js.map +1 -0
  164. package/dist/src/core/living-docs/feature-archiver.d.ts +130 -0
  165. package/dist/src/core/living-docs/feature-archiver.d.ts.map +1 -0
  166. package/dist/src/core/living-docs/feature-archiver.js +549 -0
  167. package/dist/src/core/living-docs/feature-archiver.js.map +1 -0
  168. package/dist/src/core/living-docs/feature-id-manager.d.ts +81 -0
  169. package/dist/src/core/living-docs/feature-id-manager.d.ts.map +1 -0
  170. package/dist/src/core/living-docs/feature-id-manager.js +339 -0
  171. package/dist/src/core/living-docs/feature-id-manager.js.map +1 -0
  172. package/dist/src/core/living-docs/hierarchy-mapper.d.ts +144 -83
  173. package/dist/src/core/living-docs/hierarchy-mapper.d.ts.map +1 -1
  174. package/dist/src/core/living-docs/hierarchy-mapper.js +488 -270
  175. package/dist/src/core/living-docs/hierarchy-mapper.js.map +1 -1
  176. package/dist/src/core/living-docs/index.d.ts +6 -0
  177. package/dist/src/core/living-docs/index.d.ts.map +1 -1
  178. package/dist/src/core/living-docs/index.js +6 -0
  179. package/dist/src/core/living-docs/index.js.map +1 -1
  180. package/dist/src/core/living-docs/project-detector.d.ts +6 -0
  181. package/dist/src/core/living-docs/project-detector.d.ts.map +1 -1
  182. package/dist/src/core/living-docs/project-detector.js +35 -1
  183. package/dist/src/core/living-docs/project-detector.js.map +1 -1
  184. package/dist/src/core/living-docs/spec-distributor.d.ts +100 -26
  185. package/dist/src/core/living-docs/spec-distributor.d.ts.map +1 -1
  186. package/dist/src/core/living-docs/spec-distributor.js +1275 -258
  187. package/dist/src/core/living-docs/spec-distributor.js.map +1 -1
  188. package/dist/src/core/living-docs/task-project-specific-generator.d.ts +109 -0
  189. package/dist/src/core/living-docs/task-project-specific-generator.d.ts.map +1 -0
  190. package/dist/src/core/living-docs/task-project-specific-generator.js +221 -0
  191. package/dist/src/core/living-docs/task-project-specific-generator.js.map +1 -0
  192. package/dist/src/core/living-docs/types.d.ts +143 -0
  193. package/dist/src/core/living-docs/types.d.ts.map +1 -1
  194. package/dist/src/core/project-manager.d.ts +2 -17
  195. package/dist/src/core/project-manager.d.ts.map +1 -1
  196. package/dist/src/core/project-manager.js +68 -48
  197. package/dist/src/core/project-manager.js.map +1 -1
  198. package/dist/src/core/spec-content-sync.d.ts +1 -1
  199. package/dist/src/core/spec-content-sync.d.ts.map +1 -1
  200. package/dist/src/core/sync/enhanced-content-builder.d.ts +32 -54
  201. package/dist/src/core/sync/enhanced-content-builder.d.ts.map +1 -1
  202. package/dist/src/core/sync/enhanced-content-builder.js +142 -138
  203. package/dist/src/core/sync/enhanced-content-builder.js.map +1 -1
  204. package/dist/src/core/sync/performance-optimizer.d.ts +153 -0
  205. package/dist/src/core/sync/performance-optimizer.d.ts.map +1 -0
  206. package/dist/src/core/sync/performance-optimizer.js +220 -0
  207. package/dist/src/core/sync/performance-optimizer.js.map +1 -0
  208. package/dist/src/core/sync/retry-handler.d.ts +98 -0
  209. package/dist/src/core/sync/retry-handler.d.ts.map +1 -0
  210. package/dist/src/core/sync/retry-handler.js +196 -0
  211. package/dist/src/core/sync/retry-handler.js.map +1 -0
  212. package/dist/src/core/sync/spec-content-sync.d.ts +88 -0
  213. package/dist/src/core/sync/spec-content-sync.d.ts.map +1 -0
  214. package/dist/src/core/sync/spec-content-sync.js +5 -0
  215. package/dist/src/core/sync/spec-content-sync.js.map +1 -0
  216. package/dist/src/core/sync/types.d.ts +52 -0
  217. package/dist/src/core/sync/types.d.ts.map +1 -0
  218. package/dist/src/core/sync/types.js +5 -0
  219. package/dist/src/core/sync/types.js.map +1 -0
  220. package/dist/src/core/types/config.d.ts +125 -0
  221. package/dist/src/core/types/config.d.ts.map +1 -1
  222. package/dist/src/core/types/config.js +25 -0
  223. package/dist/src/core/types/config.js.map +1 -1
  224. package/dist/src/core/types/increment-metadata.d.ts +10 -0
  225. package/dist/src/core/types/increment-metadata.d.ts.map +1 -1
  226. package/dist/src/core/types/increment-metadata.js +10 -1
  227. package/dist/src/core/types/increment-metadata.js.map +1 -1
  228. package/dist/src/integrations/jira/jira-incremental-mapper.d.ts.map +1 -1
  229. package/dist/src/integrations/jira/jira-incremental-mapper.js +4 -8
  230. package/dist/src/integrations/jira/jira-incremental-mapper.js.map +1 -1
  231. package/dist/src/integrations/jira/jira-mapper.d.ts.map +1 -1
  232. package/dist/src/integrations/jira/jira-mapper.js +4 -8
  233. package/dist/src/integrations/jira/jira-mapper.js.map +1 -1
  234. package/dist/tsconfig.tsbuildinfo +1 -0
  235. package/package.json +1 -1
  236. package/plugins/specweave/COMMANDS.md +13 -4
  237. package/plugins/specweave/agents/pm/AGENT.md +159 -12
  238. package/plugins/specweave/commands/specweave-abandon.md +22 -20
  239. package/plugins/specweave/commands/specweave-archive-features.md +121 -0
  240. package/plugins/specweave/commands/specweave-archive-increments.md +82 -0
  241. package/plugins/specweave/commands/specweave-archive.md +363 -0
  242. package/plugins/specweave/commands/specweave-backlog.md +211 -0
  243. package/plugins/specweave/commands/specweave-fix-duplicates.md +517 -0
  244. package/plugins/specweave/commands/specweave-increment.md +4 -3
  245. package/plugins/specweave/commands/specweave-progress.md +176 -27
  246. package/plugins/specweave/commands/specweave-reopen.md +391 -0
  247. package/plugins/specweave/commands/specweave-restore-feature.md +90 -0
  248. package/plugins/specweave/commands/specweave-restore.md +309 -0
  249. package/plugins/specweave/commands/specweave-resume.md +51 -23
  250. package/plugins/specweave/commands/specweave-status.md +41 -7
  251. package/plugins/specweave/commands/specweave-sync-specs.md +425 -0
  252. package/plugins/specweave/commands/specweave.md +70 -405
  253. package/plugins/specweave/hooks/hooks.json +4 -0
  254. package/plugins/specweave/hooks/lib/sync-spec-content.sh +2 -2
  255. package/plugins/specweave/hooks/post-increment-planning.sh +26 -2
  256. package/plugins/specweave/hooks/post-task-completion.sh +39 -0
  257. package/plugins/specweave/hooks/pre-command-deduplication.sh +83 -0
  258. package/plugins/specweave/hooks/user-prompt-submit.sh +1 -1
  259. package/plugins/specweave/lib/hooks/sync-living-docs.js +2 -0
  260. package/plugins/specweave/lib/hooks/sync-living-docs.ts +4 -0
  261. package/plugins/specweave/lib/hooks/update-ac-status.js +102 -0
  262. package/plugins/specweave/lib/hooks/update-ac-status.ts +192 -0
  263. package/plugins/specweave/skills/archive-increments/SKILL.md +198 -0
  264. package/plugins/specweave/skills/increment-planner/scripts/feature-utils.js +14 -0
  265. package/plugins/specweave/skills/smart-reopen-detector/SKILL.md +244 -0
  266. package/plugins/specweave-ado/lib/ado-spec-content-sync.js +49 -5
  267. package/plugins/specweave-ado/lib/ado-spec-content-sync.ts +72 -6
  268. package/plugins/specweave-ado/lib/enhanced-ado-sync.js +170 -0
  269. package/plugins/specweave-confluent/.claude-plugin/plugin.json +23 -0
  270. package/plugins/specweave-confluent/README.md +375 -0
  271. package/plugins/specweave-confluent/agents/confluent-architect/AGENT.md +306 -0
  272. package/plugins/specweave-confluent/skills/confluent-kafka-connect/SKILL.md +453 -0
  273. package/plugins/specweave-confluent/skills/confluent-ksqldb/SKILL.md +470 -0
  274. package/plugins/specweave-confluent/skills/confluent-schema-registry/SKILL.md +316 -0
  275. package/plugins/specweave-github/agents/github-task-splitter/AGENT.md +2 -2
  276. package/plugins/specweave-github/agents/user-story-updater/AGENT.md +148 -0
  277. package/plugins/specweave-github/commands/specweave-github-cleanup-duplicates.md +1 -1
  278. package/plugins/specweave-github/commands/specweave-github-update-user-story.md +156 -0
  279. package/plugins/specweave-github/hooks/post-task-completion.sh +42 -9
  280. package/plugins/specweave-github/lib/completion-calculator.js +262 -0
  281. package/plugins/specweave-github/lib/completion-calculator.ts +434 -0
  282. package/plugins/specweave-github/lib/duplicate-detector.js +3 -3
  283. package/plugins/specweave-github/lib/duplicate-detector.ts +4 -4
  284. package/plugins/specweave-github/lib/epic-content-builder.js +265 -0
  285. package/plugins/specweave-github/lib/epic-content-builder.ts +376 -0
  286. package/plugins/specweave-github/lib/github-client-v2.js +49 -0
  287. package/plugins/specweave-github/lib/github-client-v2.ts +59 -0
  288. package/plugins/specweave-github/lib/github-epic-sync.js +23 -24
  289. package/plugins/specweave-github/lib/github-epic-sync.ts +30 -5
  290. package/plugins/specweave-github/lib/github-feature-sync.js +381 -0
  291. package/plugins/specweave-github/lib/github-feature-sync.ts +568 -0
  292. package/plugins/specweave-github/lib/github-spec-content-sync.js +40 -10
  293. package/plugins/specweave-github/lib/github-spec-content-sync.ts +82 -14
  294. package/plugins/specweave-github/lib/progress-comment-builder.js +229 -0
  295. package/plugins/specweave-github/lib/progress-comment-builder.ts +324 -0
  296. package/plugins/specweave-github/lib/user-story-content-builder.js +299 -0
  297. package/plugins/specweave-github/lib/user-story-content-builder.ts +413 -0
  298. package/plugins/specweave-github/lib/user-story-issue-builder.js +344 -0
  299. package/plugins/specweave-github/lib/user-story-issue-builder.ts +543 -0
  300. package/plugins/specweave-github/skills/github-issue-standard/SKILL.md +189 -0
  301. package/plugins/specweave-jira/lib/enhanced-jira-sync.js +134 -0
  302. package/plugins/specweave-jira/lib/{enhanced-jira-sync.ts.disabled → enhanced-jira-sync.ts} +26 -52
  303. package/plugins/specweave-kafka/.claude-plugin/plugin.json +26 -0
  304. package/plugins/specweave-kafka/IMPLEMENTATION-COMPLETE.md +483 -0
  305. package/plugins/specweave-kafka/README.md +242 -0
  306. package/plugins/specweave-kafka/agents/kafka-architect/AGENT.md +235 -0
  307. package/plugins/specweave-kafka/agents/kafka-devops/AGENT.md +209 -0
  308. package/plugins/specweave-kafka/agents/kafka-observability/AGENT.md +266 -0
  309. package/plugins/specweave-kafka/commands/deploy.md +99 -0
  310. package/plugins/specweave-kafka/commands/dev-env.md +176 -0
  311. package/plugins/specweave-kafka/commands/mcp-configure.md +101 -0
  312. package/plugins/specweave-kafka/commands/monitor-setup.md +96 -0
  313. package/plugins/specweave-kafka/docker/kafka-local/docker-compose.yml +187 -0
  314. package/plugins/specweave-kafka/docker/redpanda/docker-compose.yml +199 -0
  315. package/plugins/specweave-kafka/docker/templates/consumer-nodejs.js +225 -0
  316. package/plugins/specweave-kafka/docker/templates/consumer-python.py +220 -0
  317. package/plugins/specweave-kafka/docker/templates/producer-nodejs.js +168 -0
  318. package/plugins/specweave-kafka/docker/templates/producer-python.py +167 -0
  319. package/plugins/specweave-kafka/lib/adapters/apache-kafka-adapter.js +438 -0
  320. package/plugins/specweave-kafka/lib/adapters/apache-kafka-adapter.ts +541 -0
  321. package/plugins/specweave-kafka/lib/adapters/platform-adapter.js +47 -0
  322. package/plugins/specweave-kafka/lib/adapters/platform-adapter.ts +343 -0
  323. package/plugins/specweave-kafka/lib/cli/kcat-wrapper.js +258 -0
  324. package/plugins/specweave-kafka/lib/cli/kcat-wrapper.ts +298 -0
  325. package/plugins/specweave-kafka/lib/cli/types.js +10 -0
  326. package/plugins/specweave-kafka/lib/cli/types.ts +92 -0
  327. package/plugins/specweave-kafka/lib/connectors/connector-catalog.js +305 -0
  328. package/plugins/specweave-kafka/lib/connectors/connector-catalog.ts +528 -0
  329. package/plugins/specweave-kafka/lib/documentation/diagram-generator.js +114 -0
  330. package/plugins/specweave-kafka/lib/documentation/diagram-generator.ts +195 -0
  331. package/plugins/specweave-kafka/lib/documentation/exporter.js +210 -0
  332. package/plugins/specweave-kafka/lib/documentation/exporter.ts +338 -0
  333. package/plugins/specweave-kafka/lib/documentation/schema-catalog-generator.js +60 -0
  334. package/plugins/specweave-kafka/lib/documentation/schema-catalog-generator.ts +130 -0
  335. package/plugins/specweave-kafka/lib/documentation/topology-generator.js +143 -0
  336. package/plugins/specweave-kafka/lib/documentation/topology-generator.ts +290 -0
  337. package/plugins/specweave-kafka/lib/mcp/detector.js +298 -0
  338. package/plugins/specweave-kafka/lib/mcp/detector.ts +352 -0
  339. package/plugins/specweave-kafka/lib/mcp/types.js +21 -0
  340. package/plugins/specweave-kafka/lib/mcp/types.ts +77 -0
  341. package/plugins/specweave-kafka/lib/multi-cluster/cluster-config-manager.js +193 -0
  342. package/plugins/specweave-kafka/lib/multi-cluster/cluster-config-manager.ts +362 -0
  343. package/plugins/specweave-kafka/lib/multi-cluster/cluster-switcher.js +188 -0
  344. package/plugins/specweave-kafka/lib/multi-cluster/cluster-switcher.ts +359 -0
  345. package/plugins/specweave-kafka/lib/multi-cluster/health-aggregator.js +195 -0
  346. package/plugins/specweave-kafka/lib/multi-cluster/health-aggregator.ts +380 -0
  347. package/plugins/specweave-kafka/lib/observability/opentelemetry-kafka.js +209 -0
  348. package/plugins/specweave-kafka/lib/observability/opentelemetry-kafka.ts +358 -0
  349. package/plugins/specweave-kafka/lib/patterns/advanced-ksqldb-patterns.js +354 -0
  350. package/plugins/specweave-kafka/lib/patterns/advanced-ksqldb-patterns.ts +563 -0
  351. package/plugins/specweave-kafka/lib/patterns/circuit-breaker-resilience.js +259 -0
  352. package/plugins/specweave-kafka/lib/patterns/circuit-breaker-resilience.ts +516 -0
  353. package/plugins/specweave-kafka/lib/patterns/dead-letter-queue.js +233 -0
  354. package/plugins/specweave-kafka/lib/patterns/dead-letter-queue.ts +423 -0
  355. package/plugins/specweave-kafka/lib/patterns/exactly-once-semantics.js +266 -0
  356. package/plugins/specweave-kafka/lib/patterns/exactly-once-semantics.ts +445 -0
  357. package/plugins/specweave-kafka/lib/patterns/flink-kafka-integration.js +312 -0
  358. package/plugins/specweave-kafka/lib/patterns/flink-kafka-integration.ts +561 -0
  359. package/plugins/specweave-kafka/lib/patterns/multi-dc-replication.js +289 -0
  360. package/plugins/specweave-kafka/lib/patterns/multi-dc-replication.ts +607 -0
  361. package/plugins/specweave-kafka/lib/patterns/rate-limiting-backpressure.js +264 -0
  362. package/plugins/specweave-kafka/lib/patterns/rate-limiting-backpressure.ts +498 -0
  363. package/plugins/specweave-kafka/lib/patterns/stream-processing-optimization.js +263 -0
  364. package/plugins/specweave-kafka/lib/patterns/stream-processing-optimization.ts +549 -0
  365. package/plugins/specweave-kafka/lib/patterns/tiered-storage-compaction.js +205 -0
  366. package/plugins/specweave-kafka/lib/patterns/tiered-storage-compaction.ts +399 -0
  367. package/plugins/specweave-kafka/lib/performance/performance-optimizer.js +249 -0
  368. package/plugins/specweave-kafka/lib/performance/performance-optimizer.ts +427 -0
  369. package/plugins/specweave-kafka/lib/security/kafka-security.js +252 -0
  370. package/plugins/specweave-kafka/lib/security/kafka-security.ts +494 -0
  371. package/plugins/specweave-kafka/lib/utils/capacity-planner.js +203 -0
  372. package/plugins/specweave-kafka/lib/utils/capacity-planner.ts +469 -0
  373. package/plugins/specweave-kafka/lib/utils/config-validator.js +419 -0
  374. package/plugins/specweave-kafka/lib/utils/config-validator.ts +564 -0
  375. package/plugins/specweave-kafka/lib/utils/partitioning.js +329 -0
  376. package/plugins/specweave-kafka/lib/utils/partitioning.ts +473 -0
  377. package/plugins/specweave-kafka/lib/utils/sizing.js +221 -0
  378. package/plugins/specweave-kafka/lib/utils/sizing.ts +374 -0
  379. package/plugins/specweave-kafka/monitoring/grafana/dashboards/kafka-broker-metrics.json +628 -0
  380. package/plugins/specweave-kafka/monitoring/grafana/dashboards/kafka-cluster-overview.json +564 -0
  381. package/plugins/specweave-kafka/monitoring/grafana/dashboards/kafka-consumer-lag.json +509 -0
  382. package/plugins/specweave-kafka/monitoring/grafana/dashboards/kafka-jvm-metrics.json +674 -0
  383. package/plugins/specweave-kafka/monitoring/grafana/dashboards/kafka-topic-metrics.json +578 -0
  384. package/plugins/specweave-kafka/monitoring/grafana/provisioning/dashboards/kafka.yml +17 -0
  385. package/plugins/specweave-kafka/monitoring/grafana/provisioning/datasources/prometheus.yml +17 -0
  386. package/plugins/specweave-kafka/monitoring/prometheus/kafka-alerts.yml +415 -0
  387. package/plugins/specweave-kafka/monitoring/prometheus/kafka-jmx-exporter.yml +256 -0
  388. package/plugins/specweave-kafka/package.json +41 -0
  389. package/plugins/specweave-kafka/skills/kafka-architecture/SKILL.md +647 -0
  390. package/plugins/specweave-kafka/skills/kafka-cli-tools/SKILL.md +433 -0
  391. package/plugins/specweave-kafka/skills/kafka-iac-deployment/SKILL.md +449 -0
  392. package/plugins/specweave-kafka/skills/kafka-kubernetes/SKILL.md +667 -0
  393. package/plugins/specweave-kafka/skills/kafka-mcp-integration/SKILL.md +273 -0
  394. package/plugins/specweave-kafka/skills/kafka-observability/SKILL.md +576 -0
  395. package/plugins/specweave-kafka/templates/config/broker-production.properties +254 -0
  396. package/plugins/specweave-kafka/templates/config/consumer-low-latency.properties +112 -0
  397. package/plugins/specweave-kafka/templates/config/producer-high-throughput.properties +120 -0
  398. package/plugins/specweave-kafka/templates/migration/mirrormaker2-config.properties +234 -0
  399. package/plugins/specweave-kafka/templates/monitoring/grafana/multi-cluster-dashboard.json +686 -0
  400. package/plugins/specweave-kafka/terraform/apache-kafka/main.tf +347 -0
  401. package/plugins/specweave-kafka/terraform/apache-kafka/outputs.tf +107 -0
  402. package/plugins/specweave-kafka/terraform/apache-kafka/templates/kafka-broker-init.sh.tpl +216 -0
  403. package/plugins/specweave-kafka/terraform/apache-kafka/variables.tf +156 -0
  404. package/plugins/specweave-kafka/terraform/aws-msk/main.tf +362 -0
  405. package/plugins/specweave-kafka/terraform/aws-msk/outputs.tf +93 -0
  406. package/plugins/specweave-kafka/terraform/aws-msk/templates/server.properties.tpl +32 -0
  407. package/plugins/specweave-kafka/terraform/aws-msk/variables.tf +235 -0
  408. package/plugins/specweave-kafka/terraform/azure-event-hubs/main.tf +281 -0
  409. package/plugins/specweave-kafka/terraform/azure-event-hubs/outputs.tf +118 -0
  410. package/plugins/specweave-kafka/terraform/azure-event-hubs/variables.tf +148 -0
  411. package/plugins/specweave-kafka/tsconfig.json +21 -0
  412. package/plugins/specweave-kafka-streams/.claude-plugin/plugin.json +23 -0
  413. package/plugins/specweave-kafka-streams/README.md +310 -0
  414. package/plugins/specweave-kafka-streams/skills/kafka-streams-topology/SKILL.md +539 -0
  415. package/plugins/specweave-n8n/.claude-plugin/plugin.json +22 -0
  416. package/plugins/specweave-n8n/README.md +354 -0
  417. package/plugins/specweave-n8n/skills/n8n-kafka-workflows/SKILL.md +504 -0
  418. package/plugins/specweave-release/commands/specweave-release-platform.md +1 -1
  419. package/plugins/specweave-release/hooks/post-task-completion.sh +2 -2
  420. package/src/templates/AGENTS.md.template +601 -7
  421. package/src/templates/CLAUDE.md.template +188 -88
  422. package/plugins/specweave-ado/commands/specweave-ado-sync-spec.md +0 -255
  423. package/plugins/specweave-github/commands/specweave-github-sync-epic.md +0 -248
  424. package/plugins/specweave-github/commands/specweave-github-sync-from.md +0 -147
  425. package/plugins/specweave-github/commands/specweave-github-sync-spec.md +0 -208
  426. package/plugins/specweave-github/commands/specweave-github-sync-tasks.md +0 -530
  427. package/plugins/specweave-jira/commands/specweave-jira-sync-epic.md +0 -267
  428. package/plugins/specweave-jira/commands/specweave-jira-sync-spec.md +0 -240
@@ -0,0 +1,667 @@
1
+ ---
2
+ name: kafka-kubernetes
3
+ description: Kubernetes deployment expert for Apache Kafka. Guides K8s deployments using Helm charts, operators (Strimzi, Confluent), StatefulSets, and production best practices. Activates for kubernetes, k8s, helm, kafka on kubernetes, strimzi, confluent operator, kafka operator, statefulset, kafka helm chart, k8s deployment, kubernetes kafka, deploy kafka to k8s.
4
+ ---
5
+
6
+ # Kafka on Kubernetes Deployment
7
+
8
+ Expert guidance for deploying Apache Kafka on Kubernetes using industry-standard tools.
9
+
10
+ ## When to Use This Skill
11
+
12
+ I activate when you need help with:
13
+ - **Kubernetes deployments**: "Deploy Kafka on Kubernetes", "run Kafka in K8s", "Kafka Helm chart"
14
+ - **Operator selection**: "Strimzi vs Confluent Operator", "which Kafka operator to use"
15
+ - **StatefulSet patterns**: "Kafka StatefulSet best practices", "persistent volumes for Kafka"
16
+ - **Production K8s**: "Production-ready Kafka on K8s", "Kafka high availability in Kubernetes"
17
+
18
+ ## What I Know
19
+
20
+ ### Deployment Options Comparison
21
+
22
+ | Approach | Difficulty | Production-Ready | Best For |
23
+ |----------|-----------|------------------|----------|
24
+ | **Strimzi Operator** | Easy | ✅ Yes | Self-managed Kafka on K8s, CNCF project |
25
+ | **Confluent Operator** | Medium | ✅ Yes | Enterprise features, Confluent ecosystem |
26
+ | **Bitnami Helm Chart** | Easy | ⚠️ Mostly | Quick dev/staging environments |
27
+ | **Custom StatefulSet** | Hard | ⚠️ Requires expertise | Full control, custom requirements |
28
+
29
+ **Recommendation**: **Strimzi Operator** for most production use cases (CNCF project, active community, KRaft support)
30
+
31
+ ## Deployment Approach 1: Strimzi Operator (Recommended)
32
+
33
+ **Strimzi** is a CNCF Sandbox project providing Kubernetes operators for Apache Kafka.
34
+
35
+ ### Features
36
+ - ✅ KRaft mode support (Kafka 3.6+, no ZooKeeper)
37
+ - ✅ Declarative Kafka management (CRDs)
38
+ - ✅ Automatic rolling upgrades
39
+ - ✅ Built-in monitoring (Prometheus metrics)
40
+ - ✅ Mirror Maker 2 for replication
41
+ - ✅ Kafka Connect integration
42
+ - ✅ User and topic management via CRDs
43
+
44
+ ### Installation (Helm)
45
+
46
+ ```bash
47
+ # 1. Add Strimzi Helm repository
48
+ helm repo add strimzi https://strimzi.io/charts/
49
+ helm repo update
50
+
51
+ # 2. Create namespace
52
+ kubectl create namespace kafka
53
+
54
+ # 3. Install Strimzi Operator
55
+ helm install strimzi-kafka-operator strimzi/strimzi-kafka-operator \
56
+ --namespace kafka \
57
+ --set watchNamespaces="{kafka}" \
58
+ --version 0.39.0
59
+
60
+ # 4. Verify operator is running
61
+ kubectl get pods -n kafka
62
+ # Output: strimzi-cluster-operator-... Running
63
+ ```
64
+
65
+ ### Deploy Kafka Cluster (KRaft Mode)
66
+
67
+ ```yaml
68
+ # kafka-cluster.yaml
69
+ apiVersion: kafka.strimzi.io/v1beta2
70
+ kind: KafkaNodePool
71
+ metadata:
72
+ name: kafka-pool
73
+ namespace: kafka
74
+ labels:
75
+ strimzi.io/cluster: my-kafka-cluster
76
+ spec:
77
+ replicas: 3
78
+ roles:
79
+ - controller
80
+ - broker
81
+ storage:
82
+ type: jbod
83
+ volumes:
84
+ - id: 0
85
+ type: persistent-claim
86
+ size: 100Gi
87
+ class: fast-ssd
88
+ deleteClaim: false
89
+ ---
90
+ apiVersion: kafka.strimzi.io/v1beta2
91
+ kind: Kafka
92
+ metadata:
93
+ name: my-kafka-cluster
94
+ namespace: kafka
95
+ annotations:
96
+ strimzi.io/kraft: enabled
97
+ strimzi.io/node-pools: enabled
98
+ spec:
99
+ kafka:
100
+ version: 3.7.0
101
+ metadataVersion: 3.7-IV4
102
+ replicas: 3
103
+
104
+ listeners:
105
+ - name: plain
106
+ port: 9092
107
+ type: internal
108
+ tls: false
109
+ - name: tls
110
+ port: 9093
111
+ type: internal
112
+ tls: true
113
+ authentication:
114
+ type: tls
115
+ - name: external
116
+ port: 9094
117
+ type: loadbalancer
118
+ tls: true
119
+ authentication:
120
+ type: tls
121
+
122
+ config:
123
+ default.replication.factor: 3
124
+ min.insync.replicas: 2
125
+ offsets.topic.replication.factor: 3
126
+ transaction.state.log.replication.factor: 3
127
+ transaction.state.log.min.isr: 2
128
+ auto.create.topics.enable: false
129
+ log.retention.hours: 168
130
+ log.segment.bytes: 1073741824
131
+ compression.type: lz4
132
+
133
+ resources:
134
+ requests:
135
+ memory: 4Gi
136
+ cpu: "2"
137
+ limits:
138
+ memory: 8Gi
139
+ cpu: "4"
140
+
141
+ jvmOptions:
142
+ -Xms: 2048m
143
+ -Xmx: 4096m
144
+
145
+ metricsConfig:
146
+ type: jmxPrometheusExporter
147
+ valueFrom:
148
+ configMapKeyRef:
149
+ name: kafka-metrics
150
+ key: kafka-metrics-config.yml
151
+ ```
152
+
153
+ ```bash
154
+ # Apply Kafka cluster
155
+ kubectl apply -f kafka-cluster.yaml
156
+
157
+ # Wait for cluster to be ready (5-10 minutes)
158
+ kubectl wait kafka/my-kafka-cluster --for=condition=Ready --timeout=600s -n kafka
159
+
160
+ # Check status
161
+ kubectl get kafka -n kafka
162
+ # Output: my-kafka-cluster 3.7.0 3 True
163
+ ```
164
+
165
+ ### Create Topics (Declaratively)
166
+
167
+ ```yaml
168
+ # kafka-topics.yaml
169
+ apiVersion: kafka.strimzi.io/v1beta2
170
+ kind: KafkaTopic
171
+ metadata:
172
+ name: user-events
173
+ namespace: kafka
174
+ labels:
175
+ strimzi.io/cluster: my-kafka-cluster
176
+ spec:
177
+ partitions: 12
178
+ replicas: 3
179
+ config:
180
+ retention.ms: 604800000 # 7 days
181
+ segment.bytes: 1073741824
182
+ compression.type: lz4
183
+ ---
184
+ apiVersion: kafka.strimzi.io/v1beta2
185
+ kind: KafkaTopic
186
+ metadata:
187
+ name: order-events
188
+ namespace: kafka
189
+ labels:
190
+ strimzi.io/cluster: my-kafka-cluster
191
+ spec:
192
+ partitions: 6
193
+ replicas: 3
194
+ config:
195
+ retention.ms: 2592000000 # 30 days
196
+ min.insync.replicas: 2
197
+ ```
198
+
199
+ ```bash
200
+ # Apply topics
201
+ kubectl apply -f kafka-topics.yaml
202
+
203
+ # Verify topics created
204
+ kubectl get kafkatopics -n kafka
205
+ ```
206
+
207
+ ### Create Users (Declaratively)
208
+
209
+ ```yaml
210
+ # kafka-users.yaml
211
+ apiVersion: kafka.strimzi.io/v1beta2
212
+ kind: KafkaUser
213
+ metadata:
214
+ name: my-producer
215
+ namespace: kafka
216
+ labels:
217
+ strimzi.io/cluster: my-kafka-cluster
218
+ spec:
219
+ authentication:
220
+ type: tls
221
+ authorization:
222
+ type: simple
223
+ acls:
224
+ - resource:
225
+ type: topic
226
+ name: user-events
227
+ patternType: literal
228
+ operations: [Write, Describe]
229
+ - resource:
230
+ type: topic
231
+ name: order-events
232
+ patternType: literal
233
+ operations: [Write, Describe]
234
+ ---
235
+ apiVersion: kafka.strimzi.io/v1beta2
236
+ kind: KafkaUser
237
+ metadata:
238
+ name: my-consumer
239
+ namespace: kafka
240
+ labels:
241
+ strimzi.io/cluster: my-kafka-cluster
242
+ spec:
243
+ authentication:
244
+ type: tls
245
+ authorization:
246
+ type: simple
247
+ acls:
248
+ - resource:
249
+ type: topic
250
+ name: user-events
251
+ patternType: literal
252
+ operations: [Read, Describe]
253
+ - resource:
254
+ type: group
255
+ name: my-consumer-group
256
+ patternType: literal
257
+ operations: [Read]
258
+ ```
259
+
260
+ ```bash
261
+ # Apply users
262
+ kubectl apply -f kafka-users.yaml
263
+
264
+ # Get user credentials (TLS certificates)
265
+ kubectl get secret my-producer -n kafka -o jsonpath='{.data.user\.crt}' | base64 -d > producer.crt
266
+ kubectl get secret my-producer -n kafka -o jsonpath='{.data.user\.key}' | base64 -d > producer.key
267
+ kubectl get secret my-kafka-cluster-cluster-ca-cert -n kafka -o jsonpath='{.data.ca\.crt}' | base64 -d > ca.crt
268
+ ```
269
+
270
+ ## Deployment Approach 2: Confluent Operator
271
+
272
+ **Confluent for Kubernetes (CFK)** provides enterprise-grade Kafka management.
273
+
274
+ ### Features
275
+ - ✅ Full Confluent Platform (Kafka, Schema Registry, ksqlDB, Connect)
276
+ - ✅ Hybrid deployments (K8s + on-prem)
277
+ - ✅ Rolling upgrades with zero downtime
278
+ - ✅ Multi-region replication
279
+ - ✅ Advanced security (RBAC, encryption)
280
+ - ⚠️ Requires Confluent Platform license (paid)
281
+
282
+ ### Installation
283
+
284
+ ```bash
285
+ # 1. Add Confluent Helm repository
286
+ helm repo add confluentinc https://packages.confluent.io/helm
287
+ helm repo update
288
+
289
+ # 2. Create namespace
290
+ kubectl create namespace confluent
291
+
292
+ # 3. Install Confluent Operator
293
+ helm install confluent-operator confluentinc/confluent-for-kubernetes \
294
+ --namespace confluent \
295
+ --version 0.921.11
296
+
297
+ # 4. Verify
298
+ kubectl get pods -n confluent
299
+ ```
300
+
301
+ ### Deploy Kafka Cluster
302
+
303
+ ```yaml
304
+ # kafka-cluster-confluent.yaml
305
+ apiVersion: platform.confluent.io/v1beta1
306
+ kind: Kafka
307
+ metadata:
308
+ name: kafka
309
+ namespace: confluent
310
+ spec:
311
+ replicas: 3
312
+ image:
313
+ application: confluentinc/cp-server:7.6.0
314
+ init: confluentinc/confluent-init-container:2.7.0
315
+
316
+ dataVolumeCapacity: 100Gi
317
+ storageClass:
318
+ name: fast-ssd
319
+
320
+ metricReporter:
321
+ enabled: true
322
+
323
+ listeners:
324
+ internal:
325
+ authentication:
326
+ type: plain
327
+ tls:
328
+ enabled: true
329
+ external:
330
+ authentication:
331
+ type: plain
332
+ tls:
333
+ enabled: true
334
+
335
+ dependencies:
336
+ zookeeper:
337
+ endpoint: zookeeper.confluent.svc.cluster.local:2181
338
+
339
+ podTemplate:
340
+ resources:
341
+ requests:
342
+ memory: 4Gi
343
+ cpu: 2
344
+ limits:
345
+ memory: 8Gi
346
+ cpu: 4
347
+ ```
348
+
349
+ ```bash
350
+ # Apply Kafka cluster
351
+ kubectl apply -f kafka-cluster-confluent.yaml
352
+
353
+ # Wait for cluster
354
+ kubectl wait kafka/kafka --for=condition=Ready --timeout=600s -n confluent
355
+ ```
356
+
357
+ ## Deployment Approach 3: Bitnami Helm Chart (Dev/Staging)
358
+
359
+ **Bitnami Helm Chart** is simple but less suitable for production.
360
+
361
+ ### Installation
362
+
363
+ ```bash
364
+ # 1. Add Bitnami repository
365
+ helm repo add bitnami https://charts.bitnami.com/bitnami
366
+ helm repo update
367
+
368
+ # 2. Install Kafka (KRaft mode)
369
+ helm install kafka bitnami/kafka \
370
+ --namespace kafka \
371
+ --create-namespace \
372
+ --set kraft.enabled=true \
373
+ --set controller.replicaCount=3 \
374
+ --set broker.replicaCount=3 \
375
+ --set persistence.size=100Gi \
376
+ --set persistence.storageClass=fast-ssd \
377
+ --set metrics.kafka.enabled=true \
378
+ --set metrics.jmx.enabled=true
379
+
380
+ # 3. Get bootstrap servers
381
+ export KAFKA_BOOTSTRAP=$(kubectl get svc kafka -n kafka -o jsonpath='{.status.loadBalancer.ingress[0].hostname}'):9092
382
+ ```
383
+
384
+ **Limitations**:
385
+ - ⚠️ Less production-ready than Strimzi/Confluent
386
+ - ⚠️ Limited declarative topic/user management
387
+ - ⚠️ Fewer advanced features (no MirrorMaker 2, limited RBAC)
388
+
389
+ ## Production Best Practices
390
+
391
+ ### 1. Storage Configuration
392
+
393
+ **Use SSD-backed storage classes** for Kafka logs:
394
+
395
+ ```yaml
396
+ apiVersion: storage.k8s.io/v1
397
+ kind: StorageClass
398
+ metadata:
399
+ name: fast-ssd
400
+ provisioner: kubernetes.io/aws-ebs # or pd.csi.storage.gke.io for GKE
401
+ parameters:
402
+ type: gp3 # AWS EBS GP3 (or io2 for extreme performance)
403
+ iopsPerGB: "50"
404
+ throughput: "125"
405
+ allowVolumeExpansion: true
406
+ volumeBindingMode: WaitForFirstConsumer
407
+ ```
408
+
409
+ **Kafka storage requirements**:
410
+ - **Min IOPS**: 3000+ per broker
411
+ - **Min Throughput**: 125 MB/s per broker
412
+ - **Persistent**: Use `deleteClaim: false` (don't delete data on pod deletion)
413
+
414
+ ### 2. Resource Limits
415
+
416
+ ```yaml
417
+ resources:
418
+ requests:
419
+ memory: 4Gi
420
+ cpu: "2"
421
+ limits:
422
+ memory: 8Gi
423
+ cpu: "4"
424
+
425
+ jvmOptions:
426
+ -Xms: 2048m # Initial heap (50% of memory request)
427
+ -Xmx: 4096m # Max heap (50% of memory limit, leave room for OS cache)
428
+ ```
429
+
430
+ **Sizing guidelines**:
431
+ - **Small (dev)**: 2 CPU, 4Gi memory
432
+ - **Medium (staging)**: 4 CPU, 8Gi memory
433
+ - **Large (production)**: 8 CPU, 16Gi memory
434
+
435
+ ### 3. Pod Disruption Budgets
436
+
437
+ Ensure high availability during K8s upgrades:
438
+
439
+ ```yaml
440
+ apiVersion: policy/v1
441
+ kind: PodDisruptionBudget
442
+ metadata:
443
+ name: kafka-pdb
444
+ namespace: kafka
445
+ spec:
446
+ maxUnavailable: 1
447
+ selector:
448
+ matchLabels:
449
+ app.kubernetes.io/name: kafka
450
+ ```
451
+
452
+ ### 4. Affinity Rules
453
+
454
+ **Spread brokers across availability zones**:
455
+
456
+ ```yaml
457
+ spec:
458
+ kafka:
459
+ template:
460
+ pod:
461
+ affinity:
462
+ podAntiAffinity:
463
+ requiredDuringSchedulingIgnoredDuringExecution:
464
+ - labelSelector:
465
+ matchExpressions:
466
+ - key: strimzi.io/name
467
+ operator: In
468
+ values:
469
+ - my-kafka-cluster-kafka
470
+ topologyKey: topology.kubernetes.io/zone
471
+ ```
472
+
473
+ ### 5. Network Policies
474
+
475
+ **Restrict access to Kafka brokers**:
476
+
477
+ ```yaml
478
+ apiVersion: networking.k8s.io/v1
479
+ kind: NetworkPolicy
480
+ metadata:
481
+ name: kafka-network-policy
482
+ namespace: kafka
483
+ spec:
484
+ podSelector:
485
+ matchLabels:
486
+ strimzi.io/name: my-kafka-cluster-kafka
487
+ policyTypes:
488
+ - Ingress
489
+ ingress:
490
+ - from:
491
+ - podSelector:
492
+ matchLabels:
493
+ app: my-producer
494
+ - podSelector:
495
+ matchLabels:
496
+ app: my-consumer
497
+ ports:
498
+ - protocol: TCP
499
+ port: 9092
500
+ - protocol: TCP
501
+ port: 9093
502
+ ```
503
+
504
+ ## Monitoring Integration
505
+
506
+ ### Prometheus + Grafana Setup
507
+
508
+ Strimzi provides built-in Prometheus metrics exporter:
509
+
510
+ ```yaml
511
+ # kafka-metrics-configmap.yaml
512
+ apiVersion: v1
513
+ kind: ConfigMap
514
+ metadata:
515
+ name: kafka-metrics
516
+ namespace: kafka
517
+ data:
518
+ kafka-metrics-config.yml: |
519
+ # Use JMX Exporter config from:
520
+ # plugins/specweave-kafka/monitoring/prometheus/kafka-jmx-exporter.yml
521
+ lowercaseOutputName: true
522
+ lowercaseOutputLabelNames: true
523
+ whitelistObjectNames:
524
+ - "kafka.server:type=BrokerTopicMetrics,name=*"
525
+ # ... (copy from kafka-jmx-exporter.yml)
526
+ ```
527
+
528
+ ```bash
529
+ # Apply metrics config
530
+ kubectl apply -f kafka-metrics-configmap.yaml
531
+
532
+ # Install Prometheus Operator (if not already installed)
533
+ helm install prometheus prometheus-community/kube-prometheus-stack \
534
+ --namespace monitoring \
535
+ --create-namespace
536
+
537
+ # Create PodMonitor for Kafka
538
+ kubectl apply -f - <<EOF
539
+ apiVersion: monitoring.coreos.com/v1
540
+ kind: PodMonitor
541
+ metadata:
542
+ name: kafka-metrics
543
+ namespace: kafka
544
+ spec:
545
+ selector:
546
+ matchLabels:
547
+ strimzi.io/kind: Kafka
548
+ podMetricsEndpoints:
549
+ - port: tcp-prometheus
550
+ interval: 30s
551
+ EOF
552
+
553
+ # Access Grafana dashboards (from kafka-observability skill)
554
+ kubectl port-forward -n monitoring svc/prometheus-grafana 3000:80
555
+ # Open: http://localhost:3000
556
+ # Dashboards: Kafka Cluster Overview, Broker Metrics, Consumer Lag, Topic Metrics, JVM Metrics
557
+ ```
558
+
559
+ ## Troubleshooting
560
+
561
+ ### "Pods stuck in Pending state"
562
+ **Cause**: Insufficient resources or storage class not found
563
+ **Fix**:
564
+ ```bash
565
+ # Check events
566
+ kubectl describe pod kafka-my-kafka-cluster-0 -n kafka
567
+
568
+ # Check storage class exists
569
+ kubectl get storageclass
570
+
571
+ # If missing, create fast-ssd storage class (see Production Best Practices above)
572
+ ```
573
+
574
+ ### "Kafka broker not ready after 10 minutes"
575
+ **Cause**: Slow storage provisioning or resource limits too low
576
+ **Fix**:
577
+ ```bash
578
+ # Check broker logs
579
+ kubectl logs kafka-my-kafka-cluster-0 -n kafka
580
+
581
+ # Common issues:
582
+ # 1. Low IOPS on storage → Use GP3 or better
583
+ # 2. Low memory → Increase resources.requests.memory
584
+ # 3. KRaft quorum not formed → Check all brokers are running
585
+ ```
586
+
587
+ ### "Cannot connect to Kafka from outside K8s"
588
+ **Cause**: External listener not configured
589
+ **Fix**:
590
+ ```yaml
591
+ # Add external listener (Strimzi)
592
+ spec:
593
+ kafka:
594
+ listeners:
595
+ - name: external
596
+ port: 9094
597
+ type: loadbalancer
598
+ tls: true
599
+ authentication:
600
+ type: tls
601
+
602
+ # Get external bootstrap server
603
+ kubectl get kafka my-kafka-cluster -n kafka -o jsonpath='{.status.listeners[?(@.name=="external")].bootstrapServers}'
604
+ ```
605
+
606
+ ## Scaling Operations
607
+
608
+ ### Horizontal Scaling (Add Brokers)
609
+
610
+ ```bash
611
+ # Strimzi: Update KafkaNodePool replicas
612
+ kubectl patch kafkanodepool kafka-pool -n kafka --type='json' \
613
+ -p='[{"op": "replace", "path": "/spec/replicas", "value": 5}]'
614
+
615
+ # Confluent: Update Kafka CR
616
+ kubectl patch kafka kafka -n confluent --type='json' \
617
+ -p='[{"op": "replace", "path": "/spec/replicas", "value": 5}]'
618
+
619
+ # Wait for new brokers
620
+ kubectl rollout status statefulset/kafka-my-kafka-cluster-kafka -n kafka
621
+ ```
622
+
623
+ ### Vertical Scaling (Change Resources)
624
+
625
+ ```bash
626
+ # Update resources in Kafka CR
627
+ kubectl patch kafka my-kafka-cluster -n kafka --type='json' \
628
+ -p='[
629
+ {"op": "replace", "path": "/spec/kafka/resources/requests/memory", "value": "8Gi"},
630
+ {"op": "replace", "path": "/spec/kafka/resources/requests/cpu", "value": "4"}
631
+ ]'
632
+
633
+ # Rolling restart will happen automatically
634
+ ```
635
+
636
+ ## Integration with Other Skills
637
+
638
+ - **kafka-iac-deployment**: Alternative to K8s (use Terraform for cloud-managed Kafka)
639
+ - **kafka-observability**: Set up Prometheus + Grafana dashboards for K8s Kafka
640
+ - **kafka-architecture**: Cluster sizing and partitioning strategy
641
+ - **kafka-cli-tools**: Test K8s Kafka cluster with kcat
642
+
643
+ ## Quick Reference Commands
644
+
645
+ ```bash
646
+ # Strimzi
647
+ kubectl get kafka -n kafka # List Kafka clusters
648
+ kubectl get kafkatopics -n kafka # List topics
649
+ kubectl get kafkausers -n kafka # List users
650
+ kubectl logs kafka-my-kafka-cluster-0 -n kafka # Check broker logs
651
+
652
+ # Confluent
653
+ kubectl get kafka -n confluent # List Kafka clusters
654
+ kubectl get schemaregistry -n confluent # List Schema Registry
655
+ kubectl get ksqldb -n confluent # List ksqlDB
656
+
657
+ # Port-forward for testing
658
+ kubectl port-forward -n kafka svc/my-kafka-cluster-kafka-bootstrap 9092:9092
659
+ ```
660
+
661
+ ---
662
+
663
+ **Next Steps After K8s Deployment**:
664
+ 1. Use **kafka-observability** skill to verify Prometheus metrics and Grafana dashboards
665
+ 2. Use **kafka-cli-tools** skill to test cluster with kcat
666
+ 3. Deploy your producer/consumer applications to K8s
667
+ 4. Set up GitOps for declarative topic/user management (ArgoCD, Flux)