specweave 0.23.16 → 0.24.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 (227) hide show
  1. package/.claude-plugin/marketplace.json +93 -38
  2. package/CLAUDE.md +159 -11
  3. package/dist/plugins/specweave-github/lib/github-spec-content-sync.d.ts.map +1 -1
  4. package/dist/plugins/specweave-github/lib/github-spec-content-sync.js +57 -0
  5. package/dist/plugins/specweave-github/lib/github-spec-content-sync.js.map +1 -1
  6. package/dist/src/cli/commands/sync-spec-content.js +3 -0
  7. package/dist/src/cli/commands/sync-spec-content.js.map +1 -1
  8. package/dist/src/cli/helpers/ado-area-path-mapper.d.ts +89 -0
  9. package/dist/src/cli/helpers/ado-area-path-mapper.d.ts.map +1 -0
  10. package/dist/src/cli/helpers/ado-area-path-mapper.js +213 -0
  11. package/dist/src/cli/helpers/ado-area-path-mapper.js.map +1 -0
  12. package/dist/src/cli/helpers/issue-tracker/ado-auto-discover.d.ts +29 -0
  13. package/dist/src/cli/helpers/issue-tracker/ado-auto-discover.d.ts.map +1 -0
  14. package/dist/src/cli/helpers/issue-tracker/ado-auto-discover.js +109 -0
  15. package/dist/src/cli/helpers/issue-tracker/ado-auto-discover.js.map +1 -0
  16. package/dist/src/cli/helpers/issue-tracker/ado.d.ts +1 -0
  17. package/dist/src/cli/helpers/issue-tracker/ado.d.ts.map +1 -1
  18. package/dist/src/cli/helpers/issue-tracker/ado.js +2 -0
  19. package/dist/src/cli/helpers/issue-tracker/ado.js.map +1 -1
  20. package/dist/src/cli/helpers/smart-filter.d.ts +83 -0
  21. package/dist/src/cli/helpers/smart-filter.d.ts.map +1 -0
  22. package/dist/src/cli/helpers/smart-filter.js +265 -0
  23. package/dist/src/cli/helpers/smart-filter.js.map +1 -0
  24. package/dist/src/core/progress/progress-tracker.d.ts +4 -1
  25. package/dist/src/core/progress/progress-tracker.d.ts.map +1 -1
  26. package/dist/src/core/progress/progress-tracker.js +33 -4
  27. package/dist/src/core/progress/progress-tracker.js.map +1 -1
  28. package/dist/src/core/qa/quality-gate-decider.d.ts +1 -1
  29. package/dist/src/core/qa/quality-gate-decider.js +2 -2
  30. package/dist/src/core/qa/quality-gate-decider.js.map +1 -1
  31. package/dist/src/core/qa/risk-calculator.d.ts +2 -2
  32. package/dist/src/core/qa/risk-calculator.js +2 -2
  33. package/dist/src/core/spec-content-sync.d.ts +1 -1
  34. package/dist/src/core/spec-content-sync.d.ts.map +1 -1
  35. package/dist/src/core/validators/ac-presence-validator.d.ts +56 -0
  36. package/dist/src/core/validators/ac-presence-validator.d.ts.map +1 -0
  37. package/dist/src/core/validators/ac-presence-validator.js +149 -0
  38. package/dist/src/core/validators/ac-presence-validator.js.map +1 -0
  39. package/dist/src/integrations/ado/ado-dependency-loader.d.ts +1 -1
  40. package/dist/src/integrations/ado/ado-dependency-loader.d.ts.map +1 -1
  41. package/dist/src/integrations/ado/ado-dependency-loader.js +39 -7
  42. package/dist/src/integrations/ado/ado-dependency-loader.js.map +1 -1
  43. package/dist/src/integrations/ado/area-path-mapper.d.ts +137 -0
  44. package/dist/src/integrations/ado/area-path-mapper.d.ts.map +1 -0
  45. package/dist/src/integrations/ado/area-path-mapper.js +267 -0
  46. package/dist/src/integrations/ado/area-path-mapper.js.map +1 -0
  47. package/dist/src/integrations/jira/filter-processor.d.ts +126 -0
  48. package/dist/src/integrations/jira/filter-processor.d.ts.map +1 -0
  49. package/dist/src/integrations/jira/filter-processor.js +207 -0
  50. package/dist/src/integrations/jira/filter-processor.js.map +1 -0
  51. package/dist/src/integrations/jira/jira-client.d.ts +13 -0
  52. package/dist/src/integrations/jira/jira-client.d.ts.map +1 -1
  53. package/dist/src/integrations/jira/jira-client.js +33 -0
  54. package/dist/src/integrations/jira/jira-client.js.map +1 -1
  55. package/dist/src/utils/ac-embedder.d.ts +63 -0
  56. package/dist/src/utils/ac-embedder.d.ts.map +1 -0
  57. package/dist/src/utils/ac-embedder.js +217 -0
  58. package/dist/src/utils/ac-embedder.js.map +1 -0
  59. package/dist/src/utils/env-manager.d.ts +86 -0
  60. package/dist/src/utils/env-manager.d.ts.map +1 -0
  61. package/dist/src/utils/env-manager.js +188 -0
  62. package/dist/src/utils/env-manager.js.map +1 -0
  63. package/package.json +1 -1
  64. package/plugins/specweave/.claude-plugin/plugin.json +1 -1
  65. package/plugins/specweave/agents/AGENTS-INDEX.md +1 -1
  66. package/plugins/specweave/agents/increment-quality-judge-v2/AGENT.md +9 -9
  67. package/plugins/specweave/commands/specweave-do.md +37 -0
  68. package/plugins/specweave/commands/specweave-done.md +159 -0
  69. package/plugins/specweave/commands/specweave-embed-acs.md +446 -0
  70. package/plugins/specweave/commands/specweave-next.md +148 -3
  71. package/plugins/specweave/commands/specweave-qa.md +2 -2
  72. package/plugins/specweave/hooks/lib/migrate-increment-work.sh +1 -1
  73. package/plugins/specweave/hooks/lib/migrate-increment-work.sh.bak +245 -0
  74. package/plugins/specweave/hooks/lib/sync-spec-content.sh +2 -2
  75. package/plugins/specweave/hooks/lib/sync-spec-content.sh.bak +149 -0
  76. package/plugins/specweave/hooks/lib/update-status-line.sh +34 -4
  77. package/plugins/specweave/hooks/lib/validate-spec-status.sh +1 -1
  78. package/plugins/specweave/hooks/lib/validate-spec-status.sh.bak +163 -0
  79. package/plugins/specweave/hooks/post-first-increment.sh +1 -1
  80. package/plugins/specweave/hooks/post-first-increment.sh.bak +61 -0
  81. package/plugins/specweave/hooks/post-spec-update.sh +1 -1
  82. package/plugins/specweave/hooks/post-spec-update.sh.bak +158 -0
  83. package/plugins/specweave/hooks/post-user-story-complete.sh +1 -1
  84. package/plugins/specweave/hooks/post-user-story-complete.sh.bak +179 -0
  85. package/plugins/specweave/hooks/pre-command-deduplication.sh +1 -1
  86. package/plugins/specweave/hooks/pre-command-deduplication.sh.bak +83 -0
  87. package/plugins/specweave/hooks/pre-increment-start.sh +168 -0
  88. package/plugins/specweave/hooks/user-prompt-submit.sh +1 -1
  89. package/plugins/specweave/hooks/user-prompt-submit.sh.bak +386 -0
  90. package/plugins/specweave/skills/SKILLS-INDEX.md +1 -1
  91. package/plugins/specweave/skills/specweave-framework/SKILL.md +1 -1
  92. package/plugins/specweave-ado/.claude-plugin/plugin.json +1 -1
  93. package/plugins/specweave-ado/agents/ado-manager/AGENT.md +23 -0
  94. package/plugins/specweave-ado/agents/ado-multi-project-mapper/AGENT.md +23 -0
  95. package/plugins/specweave-ado/agents/ado-sync-judge/AGENT.md +23 -0
  96. package/plugins/specweave-ado/commands/specweave-ado-import-projects.md +331 -0
  97. package/plugins/specweave-alternatives/.claude-plugin/plugin.json +10 -0
  98. package/plugins/specweave-alternatives/commands/alternatives-analyze.md +336 -0
  99. package/plugins/specweave-alternatives/skills/architecture-alternatives/SKILL.md +651 -0
  100. package/plugins/specweave-alternatives/skills/bmad-method/SKILL.md +420 -0
  101. package/plugins/specweave-alternatives/skills/spec-kit-expert/SKILL.md +487 -0
  102. package/plugins/specweave-backend/agents/database-optimizer/AGENT.md +23 -0
  103. package/plugins/specweave-backend/commands/api-scaffold.md +80 -0
  104. package/plugins/specweave-backend/commands/crud-generate.md +109 -0
  105. package/plugins/specweave-backend/commands/migration-generate.md +139 -0
  106. package/plugins/specweave-confluent/agents/confluent-architect/AGENT.md +23 -0
  107. package/plugins/specweave-confluent/commands/connector-deploy.md +154 -0
  108. package/plugins/specweave-confluent/commands/ksqldb-query.md +179 -0
  109. package/plugins/specweave-confluent/commands/schema-register.md +123 -0
  110. package/plugins/specweave-core/.claude-plugin/plugin.json +21 -0
  111. package/plugins/specweave-core/commands/architecture-review.md +288 -0
  112. package/plugins/specweave-core/commands/code-review.md +213 -0
  113. package/plugins/specweave-core/commands/refactor-plan.md +249 -0
  114. package/plugins/specweave-core/skills/code-quality/SKILL.md +157 -0
  115. package/plugins/specweave-core/skills/design-patterns/SKILL.md +244 -0
  116. package/plugins/specweave-core/skills/software-architecture/SKILL.md +83 -0
  117. package/plugins/specweave-cost-optimizer/.claude-plugin/plugin.json +22 -0
  118. package/plugins/specweave-cost-optimizer/commands/cost-analyze.md +360 -0
  119. package/plugins/specweave-cost-optimizer/commands/cost-optimize.md +480 -0
  120. package/plugins/specweave-cost-optimizer/skills/aws-cost-expert/SKILL.md +416 -0
  121. package/plugins/specweave-cost-optimizer/skills/cloud-pricing/SKILL.md +325 -0
  122. package/plugins/specweave-cost-optimizer/skills/cost-optimization/SKILL.md +337 -0
  123. package/plugins/specweave-diagrams/.claude-plugin/plugin.json +1 -1
  124. package/plugins/specweave-diagrams/agents/diagrams-architect/AGENT.md +23 -0
  125. package/plugins/specweave-diagrams/commands/diagrams-generate.md +168 -0
  126. package/plugins/specweave-docs/.claude-plugin/plugin.json +10 -0
  127. package/plugins/specweave-docs/commands/docs-generate.md +441 -0
  128. package/plugins/specweave-docs/commands/docs-init.md +334 -0
  129. package/plugins/specweave-docs/skills/docusaurus/SKILL.md +581 -0
  130. package/plugins/specweave-docs/skills/spec-driven-brainstorming/SKILL.md +689 -0
  131. package/plugins/specweave-docs/skills/technical-writing/SKILL.md +1039 -0
  132. package/plugins/specweave-docs-preview/.claude-plugin/plugin.json +1 -1
  133. package/plugins/specweave-figma/.claude-plugin/plugin.json +23 -0
  134. package/plugins/specweave-figma/commands/figma-import.md +690 -0
  135. package/plugins/specweave-figma/commands/figma-to-react.md +834 -0
  136. package/plugins/specweave-figma/commands/figma-tokens.md +815 -0
  137. package/plugins/specweave-frontend/.claude-plugin/plugin.json +21 -0
  138. package/plugins/specweave-frontend/agents/frontend-architect/AGENT.md +387 -0
  139. package/plugins/specweave-frontend/agents/frontend-architect/README.md +385 -0
  140. package/plugins/specweave-frontend/agents/frontend-architect/examples.md +590 -0
  141. package/plugins/specweave-frontend/agents/frontend-architect/templates/component-template.tsx +152 -0
  142. package/plugins/specweave-frontend/agents/frontend-architect/templates/hook-template.ts +311 -0
  143. package/plugins/specweave-frontend/agents/frontend-architect/templates/page-template.tsx +228 -0
  144. package/plugins/specweave-frontend/commands/component-generate.md +510 -0
  145. package/plugins/specweave-frontend/commands/design-system-init.md +494 -0
  146. package/plugins/specweave-frontend/commands/frontend-scaffold.md +207 -0
  147. package/plugins/specweave-frontend/commands/nextjs-setup.md +396 -0
  148. package/plugins/specweave-frontend/skills/design-system-architect/SKILL.md +278 -0
  149. package/plugins/specweave-frontend/skills/frontend/SKILL.md +420 -0
  150. package/plugins/specweave-frontend/skills/nextjs/SKILL.md +546 -0
  151. package/plugins/specweave-github/.claude-plugin/plugin.json +1 -1
  152. package/plugins/specweave-github/agents/github-manager/AGENT.md +23 -0
  153. package/plugins/specweave-github/agents/github-task-splitter/AGENT.md +25 -0
  154. package/plugins/specweave-github/agents/user-story-updater/AGENT.md +25 -0
  155. package/plugins/specweave-github/hooks/.specweave/logs/hooks-debug.log +194 -0
  156. package/plugins/specweave-github/lib/github-spec-content-sync.js +49 -0
  157. package/plugins/specweave-github/lib/github-spec-content-sync.ts +67 -0
  158. package/plugins/specweave-infrastructure/.claude-plugin/plugin.json +1 -1
  159. package/plugins/specweave-infrastructure/agents/devops/AGENT.md +26 -0
  160. package/plugins/specweave-infrastructure/agents/network-engineer/AGENT.md +26 -0
  161. package/plugins/specweave-infrastructure/agents/observability-engineer/AGENT.md +26 -0
  162. package/plugins/specweave-infrastructure/agents/performance-engineer/AGENT.md +26 -0
  163. package/plugins/specweave-infrastructure/agents/sre/AGENT.md +26 -0
  164. package/plugins/specweave-jira/.claude-plugin/plugin.json +1 -1
  165. package/plugins/specweave-jira/agents/jira-manager/AGENT.md +26 -0
  166. package/plugins/specweave-jira/commands/import-projects.js +183 -0
  167. package/plugins/specweave-jira/commands/import-projects.md +97 -0
  168. package/plugins/specweave-jira/commands/import-projects.ts +288 -0
  169. package/plugins/specweave-jira/commands/specweave-jira-import-projects.md +298 -0
  170. package/plugins/specweave-kafka/.claude-plugin/plugin.json +1 -1
  171. package/plugins/specweave-kafka/agents/kafka-architect/AGENT.md +26 -0
  172. package/plugins/specweave-kafka/agents/kafka-devops/AGENT.md +26 -0
  173. package/plugins/specweave-kafka/agents/kafka-observability/AGENT.md +26 -0
  174. package/plugins/specweave-kafka-streams/.claude-plugin/plugin.json +1 -1
  175. package/plugins/specweave-kubernetes/agents/kubernetes-architect/AGENT.md +26 -0
  176. package/plugins/specweave-kubernetes/commands/cluster-setup.md +262 -0
  177. package/plugins/specweave-kubernetes/commands/deployment-generate.md +242 -0
  178. package/plugins/specweave-kubernetes/commands/helm-scaffold.md +333 -0
  179. package/plugins/specweave-ml/.claude-plugin/plugin.json +3 -3
  180. package/plugins/specweave-ml/agents/data-scientist/AGENT.md +26 -0
  181. package/plugins/specweave-ml/agents/ml-engineer/AGENT.md +26 -0
  182. package/plugins/specweave-ml/agents/mlops-engineer/AGENT.md +26 -0
  183. package/plugins/specweave-mobile/agents/mobile-architect/AGENT.md +26 -0
  184. package/plugins/specweave-mobile/commands/app-scaffold.md +233 -0
  185. package/plugins/specweave-mobile/commands/build-config.md +256 -0
  186. package/plugins/specweave-mobile/commands/screen-generate.md +289 -0
  187. package/plugins/specweave-n8n/.claude-plugin/plugin.json +1 -1
  188. package/plugins/specweave-payments/agents/payment-integration/AGENT.md +26 -0
  189. package/plugins/specweave-plugin-dev/.claude-plugin/plugin.json +20 -0
  190. package/plugins/specweave-plugin-dev/commands/plugin-create.md +333 -0
  191. package/plugins/specweave-plugin-dev/commands/plugin-publish.md +339 -0
  192. package/plugins/specweave-plugin-dev/commands/plugin-test.md +293 -0
  193. package/plugins/specweave-plugin-dev/skills/claude-sdk/SKILL.md +162 -0
  194. package/plugins/specweave-plugin-dev/skills/marketplace-publishing/SKILL.md +263 -0
  195. package/plugins/specweave-plugin-dev/skills/plugin-development/SKILL.md +316 -0
  196. package/plugins/specweave-release/.claude-plugin/plugin.json +1 -1
  197. package/plugins/specweave-release/agents/release-manager/AGENT.md +27 -0
  198. package/plugins/specweave-release/commands/specweave-release-npm.md +110 -0
  199. package/plugins/specweave-release/hooks/.specweave/logs/dora-tracking.log +168 -0
  200. package/plugins/specweave-testing/.claude-plugin/plugin.json +21 -0
  201. package/plugins/specweave-testing/agents/qa-engineer/AGENT.md +797 -0
  202. package/plugins/specweave-testing/agents/qa-engineer/README.md +443 -0
  203. package/plugins/specweave-testing/agents/qa-engineer/templates/playwright-e2e-test.ts +470 -0
  204. package/plugins/specweave-testing/agents/qa-engineer/templates/test-data-factory.ts +507 -0
  205. package/plugins/specweave-testing/agents/qa-engineer/templates/vitest-unit-test.ts +400 -0
  206. package/plugins/specweave-testing/agents/qa-engineer/test-strategies.md +726 -0
  207. package/plugins/specweave-testing/commands/e2e-setup.md +1081 -0
  208. package/plugins/specweave-testing/commands/test-coverage.md +979 -0
  209. package/plugins/specweave-testing/commands/test-generate.md +1156 -0
  210. package/plugins/specweave-testing/commands/test-init.md +409 -0
  211. package/plugins/specweave-testing/skills/e2e-playwright/SKILL.md +769 -0
  212. package/plugins/specweave-testing/skills/tdd-expert/SKILL.md +934 -0
  213. package/plugins/specweave-testing/skills/unit-testing-expert/SKILL.md +1011 -0
  214. package/plugins/specweave-tooling/.claude-plugin/plugin.json +22 -0
  215. package/plugins/specweave-tooling/commands/specweave-tooling-skill-create.md +691 -0
  216. package/plugins/specweave-tooling/commands/specweave-tooling-skill-package.md +751 -0
  217. package/plugins/specweave-tooling/commands/specweave-tooling-skill-validate.md +858 -0
  218. package/plugins/specweave-ui/.claude-plugin/plugin.json +10 -0
  219. package/plugins/specweave-ui/commands/ui-automate.md +199 -0
  220. package/plugins/specweave-ui/commands/ui-inspect.md +70 -0
  221. package/plugins/specweave-ui/skills/browser-automation/SKILL.md +314 -0
  222. package/plugins/specweave-ui/skills/ui-testing/SKILL.md +716 -0
  223. package/plugins/specweave-ui/skills/visual-regression/SKILL.md +728 -0
  224. package/plugins/specweave/commands/check-hooks.md +0 -257
  225. package/plugins/specweave/commands/specweave-archive-increments.md +0 -82
  226. package/plugins/specweave/skills/plugin-expert/SKILL.md +0 -340
  227. /package/plugins/specweave/{agents/code-reviewer.md → skills/code-reviewer/SKILL.md} +0 -0
@@ -0,0 +1,262 @@
1
+ # Kubernetes Cluster Setup
2
+
3
+ Set up a production-ready Kubernetes cluster with essential components.
4
+
5
+ ## Task
6
+
7
+ You are a Kubernetes infrastructure expert. Guide users through setting up a production cluster.
8
+
9
+ ### Steps:
10
+
11
+ 1. **Ask for Platform**:
12
+ - Managed (EKS, GKE, AKS)
13
+ - Self-hosted (kubeadm, k3s, kind)
14
+ - Local dev (minikube, kind, k3d)
15
+
16
+ 2. **Generate Cluster Configuration**:
17
+
18
+ #### EKS (AWS):
19
+
20
+ ```bash
21
+ # eksctl config
22
+ apiVersion: eksctl.io/v1alpha5
23
+ kind: ClusterConfig
24
+
25
+ metadata:
26
+ name: production-cluster
27
+ region: us-east-1
28
+ version: "1.28"
29
+
30
+ managedNodeGroups:
31
+ - name: general-purpose
32
+ instanceType: t3.medium
33
+ minSize: 3
34
+ maxSize: 10
35
+ desiredCapacity: 3
36
+ volumeSize: 50
37
+ ssh:
38
+ allow: true
39
+ labels:
40
+ workload-type: general
41
+ tags:
42
+ nodegroup-role: general-purpose
43
+ iam:
44
+ withAddonPolicies:
45
+ autoScaler: true
46
+ certManager: true
47
+ externalDNS: true
48
+ ebs: true
49
+ efs: true
50
+
51
+ addons:
52
+ - name: vpc-cni
53
+ - name: coredns
54
+ - name: kube-proxy
55
+ - name: aws-ebs-csi-driver
56
+ ```
57
+
58
+ #### GKE (Google Cloud):
59
+
60
+ ```bash
61
+ gcloud container clusters create production-cluster \
62
+ --region us-central1 \
63
+ --num-nodes 3 \
64
+ --machine-type n1-standard-2 \
65
+ --disk-size 50 \
66
+ --enable-autoscaling \
67
+ --min-nodes 3 \
68
+ --max-nodes 10 \
69
+ --enable-autorepair \
70
+ --enable-autoupgrade \
71
+ --maintenance-window-start "2024-01-01T00:00:00Z" \
72
+ --maintenance-window-duration 4h \
73
+ --addons HorizontalPodAutoscaling,HttpLoadBalancing,GcePersistentDiskCsiDriver \
74
+ --workload-pool=production-cluster.svc.id.goog \
75
+ --enable-shielded-nodes \
76
+ --enable-ip-alias \
77
+ --network default \
78
+ --subnetwork default \
79
+ --cluster-version latest
80
+ ```
81
+
82
+ #### AKS (Azure):
83
+
84
+ ```bash
85
+ az aks create \
86
+ --resource-group production-rg \
87
+ --name production-cluster \
88
+ --location eastus \
89
+ --kubernetes-version 1.28.0 \
90
+ --node-count 3 \
91
+ --node-vm-size Standard_D2s_v3 \
92
+ --enable-cluster-autoscaler \
93
+ --min-count 3 \
94
+ --max-count 10 \
95
+ --network-plugin azure \
96
+ --enable-managed-identity \
97
+ --enable-pod-security-policy \
98
+ --enable-addons monitoring,azure-policy \
99
+ --generate-ssh-keys
100
+ ```
101
+
102
+ 3. **Install Essential Add-ons**:
103
+
104
+ #### Ingress Controller (NGINX):
105
+
106
+ ```yaml
107
+ # Helm install
108
+ helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
109
+ helm upgrade --install ingress-nginx ingress-nginx/ingress-nginx \
110
+ --namespace ingress-nginx \
111
+ --create-namespace \
112
+ --set controller.replicaCount=3 \
113
+ --set controller.service.type=LoadBalancer \
114
+ --set controller.metrics.enabled=true
115
+ ```
116
+
117
+ #### Cert-Manager (TLS certificates):
118
+
119
+ ```yaml
120
+ helm repo add jetstack https://charts.jetstack.io
121
+ helm upgrade --install cert-manager jetstack/cert-manager \
122
+ --namespace cert-manager \
123
+ --create-namespace \
124
+ --set installCRDs=true
125
+
126
+ # ClusterIssuer for Let's Encrypt
127
+ apiVersion: cert-manager.io/v1
128
+ kind: ClusterIssuer
129
+ metadata:
130
+ name: letsencrypt-prod
131
+ spec:
132
+ acme:
133
+ server: https://acme-v02.api.letsencrypt.org/directory
134
+ email: admin@example.com
135
+ privateKeySecretRef:
136
+ name: letsencrypt-prod
137
+ solvers:
138
+ - http01:
139
+ ingress:
140
+ class: nginx
141
+ ```
142
+
143
+ #### Prometheus + Grafana (Monitoring):
144
+
145
+ ```bash
146
+ helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
147
+ helm upgrade --install kube-prometheus-stack prometheus-community/kube-prometheus-stack \
148
+ --namespace monitoring \
149
+ --create-namespace \
150
+ --set prometheus.prometheusSpec.retention=30d \
151
+ --set prometheus.prometheusSpec.storageSpec.volumeClaimTemplate.spec.resources.requests.storage=50Gi \
152
+ --set grafana.adminPassword=admin123
153
+ ```
154
+
155
+ #### External DNS (auto DNS records):
156
+
157
+ ```yaml
158
+ helm repo add external-dns https://kubernetes-sigs.github.io/external-dns/
159
+ helm upgrade --install external-dns external-dns/external-dns \
160
+ --namespace kube-system \
161
+ --set provider=aws \ # or google, azure
162
+ --set txtOwnerId=production-cluster \
163
+ --set policy=sync
164
+ ```
165
+
166
+ #### ArgoCD (GitOps):
167
+
168
+ ```bash
169
+ kubectl create namespace argocd
170
+ kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
171
+
172
+ # Access UI
173
+ kubectl port-forward svc/argocd-server -n argocd 8080:443
174
+
175
+ # Get admin password
176
+ kubectl -n argocd get secret argocd-initial-admin-secret \
177
+ -o jsonpath="{.data.password}" | base64 -d
178
+ ```
179
+
180
+ 4. **Security Setup**:
181
+
182
+ #### Network Policies:
183
+
184
+ ```yaml
185
+ # Default deny all
186
+ apiVersion: networking.k8s.io/v1
187
+ kind: NetworkPolicy
188
+ metadata:
189
+ name: default-deny-all
190
+ spec:
191
+ podSelector: {}
192
+ policyTypes:
193
+ - Ingress
194
+ - Egress
195
+
196
+ # Allow DNS
197
+ apiVersion: networking.k8s.io/v1
198
+ kind: NetworkPolicy
199
+ metadata:
200
+ name: allow-dns
201
+ spec:
202
+ podSelector: {}
203
+ policyTypes:
204
+ - Egress
205
+ egress:
206
+ - to:
207
+ - namespaceSelector:
208
+ matchLabels:
209
+ name: kube-system
210
+ ports:
211
+ - protocol: UDP
212
+ port: 53
213
+ ```
214
+
215
+ #### Pod Security Standards:
216
+
217
+ ```yaml
218
+ apiVersion: v1
219
+ kind: Namespace
220
+ metadata:
221
+ name: production
222
+ labels:
223
+ pod-security.kubernetes.io/enforce: restricted
224
+ pod-security.kubernetes.io/audit: restricted
225
+ pod-security.kubernetes.io/warn: restricted
226
+ ```
227
+
228
+ 5. **Storage Classes**:
229
+
230
+ ```yaml
231
+ # Fast SSD storage
232
+ apiVersion: storage.k8s.io/v1
233
+ kind: StorageClass
234
+ metadata:
235
+ name: fast
236
+ provisioner: ebs.csi.aws.com # or pd.csi.storage.gke.io, disk.csi.azure.com
237
+ parameters:
238
+ type: gp3
239
+ iops: "3000"
240
+ throughput: "125"
241
+ volumeBindingMode: WaitForFirstConsumer
242
+ allowVolumeExpansion: true
243
+ reclaimPolicy: Delete
244
+ ```
245
+
246
+ ### Best Practices Included:
247
+
248
+ - Multi-AZ/region deployment
249
+ - Auto-scaling (cluster and pods)
250
+ - Monitoring and logging
251
+ - TLS certificate automation
252
+ - GitOps with ArgoCD
253
+ - Network policies
254
+ - Resource quotas
255
+ - RBAC configuration
256
+
257
+ ### Example Usage:
258
+
259
+ ```
260
+ User: "Set up production EKS cluster with monitoring"
261
+ Result: Complete EKS config + all essential add-ons
262
+ ```
@@ -0,0 +1,242 @@
1
+ # Kubernetes Deployment Generator
2
+
3
+ Generate production-ready Kubernetes deployment manifests.
4
+
5
+ ## Task
6
+
7
+ You are a Kubernetes expert. Generate complete deployment manifests with best practices.
8
+
9
+ ### Steps:
10
+
11
+ 1. **Ask for Required Information**:
12
+ - Application name
13
+ - Docker image
14
+ - Port(s)
15
+ - Environment variables
16
+ - Resource requirements
17
+ - Replicas
18
+
19
+ 2. **Generate Deployment Manifest**:
20
+
21
+ ```yaml
22
+ apiVersion: apps/v1
23
+ kind: Deployment
24
+ metadata:
25
+ name: myapp
26
+ labels:
27
+ app: myapp
28
+ version: v1.0.0
29
+ annotations:
30
+ kubernetes.io/change-cause: "Initial deployment"
31
+ spec:
32
+ replicas: 3
33
+ strategy:
34
+ type: RollingUpdate
35
+ rollingUpdate:
36
+ maxSurge: 1
37
+ maxUnavailable: 0
38
+ selector:
39
+ matchLabels:
40
+ app: myapp
41
+ template:
42
+ metadata:
43
+ labels:
44
+ app: myapp
45
+ version: v1.0.0
46
+ annotations:
47
+ prometheus.io/scrape: "true"
48
+ prometheus.io/port: "8080"
49
+ prometheus.io/path: "/metrics"
50
+ spec:
51
+ # Security context
52
+ securityContext:
53
+ runAsNonRoot: true
54
+ runAsUser: 1000
55
+ fsGroup: 2000
56
+
57
+ # Init containers (if needed)
58
+ initContainers:
59
+ - name: init-db
60
+ image: busybox:1.36
61
+ command: ['sh', '-c', 'until nc -z postgres 5432; do echo waiting for db; sleep 2; done;']
62
+
63
+ containers:
64
+ - name: myapp
65
+ image: myapp:1.0.0
66
+ imagePullPolicy: IfNotPresent
67
+
68
+ # Ports
69
+ ports:
70
+ - name: http
71
+ containerPort: 8080
72
+ protocol: TCP
73
+
74
+ # Environment variables
75
+ env:
76
+ - name: NODE_ENV
77
+ value: "production"
78
+ - name: DB_HOST
79
+ valueFrom:
80
+ configMapKeyRef:
81
+ name: myapp-config
82
+ key: db-host
83
+ - name: DB_PASSWORD
84
+ valueFrom:
85
+ secretKeyRef:
86
+ name: myapp-secrets
87
+ key: db-password
88
+
89
+ # Resource limits
90
+ resources:
91
+ requests:
92
+ memory: "256Mi"
93
+ cpu: "250m"
94
+ limits:
95
+ memory: "512Mi"
96
+ cpu: "500m"
97
+
98
+ # Health checks
99
+ livenessProbe:
100
+ httpGet:
101
+ path: /health
102
+ port: http
103
+ initialDelaySeconds: 30
104
+ periodSeconds: 10
105
+ timeoutSeconds: 5
106
+ failureThreshold: 3
107
+
108
+ readinessProbe:
109
+ httpGet:
110
+ path: /ready
111
+ port: http
112
+ initialDelaySeconds: 10
113
+ periodSeconds: 5
114
+ timeoutSeconds: 3
115
+ failureThreshold: 3
116
+
117
+ # Volume mounts
118
+ volumeMounts:
119
+ - name: config
120
+ mountPath: /etc/config
121
+ readOnly: true
122
+ - name: cache
123
+ mountPath: /tmp/cache
124
+
125
+ # Volumes
126
+ volumes:
127
+ - name: config
128
+ configMap:
129
+ name: myapp-config
130
+ - name: cache
131
+ emptyDir: {}
132
+
133
+ # Affinity rules
134
+ affinity:
135
+ podAntiAffinity:
136
+ preferredDuringSchedulingIgnoredDuringExecution:
137
+ - weight: 100
138
+ podAffinityTerm:
139
+ labelSelector:
140
+ matchExpressions:
141
+ - key: app
142
+ operator: In
143
+ values:
144
+ - myapp
145
+ topologyKey: kubernetes.io/hostname
146
+ ```
147
+
148
+ 3. **Generate Service Manifest**:
149
+
150
+ ```yaml
151
+ apiVersion: v1
152
+ kind: Service
153
+ metadata:
154
+ name: myapp
155
+ labels:
156
+ app: myapp
157
+ spec:
158
+ type: ClusterIP
159
+ ports:
160
+ - port: 80
161
+ targetPort: http
162
+ protocol: TCP
163
+ name: http
164
+ selector:
165
+ app: myapp
166
+ ```
167
+
168
+ 4. **Generate ConfigMap**:
169
+
170
+ ```yaml
171
+ apiVersion: v1
172
+ kind: ConfigMap
173
+ metadata:
174
+ name: myapp-config
175
+ data:
176
+ db-host: "postgres.default.svc.cluster.local"
177
+ log-level: "info"
178
+ config.json: |
179
+ {
180
+ "feature_flags": {
181
+ "new_feature": true
182
+ }
183
+ }
184
+ ```
185
+
186
+ 5. **Generate Secret** (base64 encoded):
187
+
188
+ ```yaml
189
+ apiVersion: v1
190
+ kind: Secret
191
+ metadata:
192
+ name: myapp-secrets
193
+ type: Opaque
194
+ data:
195
+ db-password: cGFzc3dvcmQxMjM= # base64 encoded
196
+ ```
197
+
198
+ 6. **Generate HPA (Horizontal Pod Autoscaler)**:
199
+
200
+ ```yaml
201
+ apiVersion: autoscaling/v2
202
+ kind: HorizontalPodAutoscaler
203
+ metadata:
204
+ name: myapp-hpa
205
+ spec:
206
+ scaleTargetRef:
207
+ apiVersion: apps/v1
208
+ kind: Deployment
209
+ name: myapp
210
+ minReplicas: 3
211
+ maxReplicas: 10
212
+ metrics:
213
+ - type: Resource
214
+ resource:
215
+ name: cpu
216
+ target:
217
+ type: Utilization
218
+ averageUtilization: 70
219
+ - type: Resource
220
+ resource:
221
+ name: memory
222
+ target:
223
+ type: Utilization
224
+ averageUtilization: 80
225
+ ```
226
+
227
+ ### Best Practices Included:
228
+
229
+ - Security context (non-root user)
230
+ - Resource requests and limits
231
+ - Liveness and readiness probes
232
+ - Rolling update strategy
233
+ - Pod anti-affinity
234
+ - ConfigMap and Secret separation
235
+ - Horizontal pod autoscaling
236
+
237
+ ### Example Usage:
238
+
239
+ ```
240
+ User: "Generate deployment for Node.js API on port 3000"
241
+ Result: Complete deployment + service + configmap + secret + HPA
242
+ ```