ai-playbook 1.0.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 (424) hide show
  1. package/README.md +146 -0
  2. package/agents/README.md +168 -0
  3. package/agents/SKILL.md +633 -0
  4. package/agents/architect/AGENT.md +44 -0
  5. package/agents/architect/README.md +5 -0
  6. package/agents/coder/AGENT.md +43 -0
  7. package/agents/coder/README.md +5 -0
  8. package/agents/debugger/AGENT.md +42 -0
  9. package/agents/debugger/README.md +6 -0
  10. package/agents/devops/AGENT.md +43 -0
  11. package/agents/devops/README.md +5 -0
  12. package/agents/documentation/AGENT.md +45 -0
  13. package/agents/documentation/README.md +5 -0
  14. package/agents/examples.md +550 -0
  15. package/agents/performance/AGENT.md +45 -0
  16. package/agents/performance/README.md +6 -0
  17. package/agents/planner/AGENT.md +44 -0
  18. package/agents/planner/README.md +6 -0
  19. package/agents/product-owner/AGENT.md +46 -0
  20. package/agents/product-owner/README.md +6 -0
  21. package/agents/refactorer/AGENT.md +44 -0
  22. package/agents/refactorer/README.md +6 -0
  23. package/agents/release-manager/AGENT.md +45 -0
  24. package/agents/release-manager/README.md +6 -0
  25. package/agents/researcher/AGENT.md +44 -0
  26. package/agents/researcher/README.md +6 -0
  27. package/agents/reviewer/AGENT.md +43 -0
  28. package/agents/reviewer/README.md +6 -0
  29. package/agents/security/AGENT.md +46 -0
  30. package/agents/security/README.md +6 -0
  31. package/agents/support/AGENT.md +45 -0
  32. package/agents/support/README.md +6 -0
  33. package/agents/tester/AGENT.md +46 -0
  34. package/agents/tester/README.md +5 -0
  35. package/bin/cli.js +186 -0
  36. package/commands/README.md +266 -0
  37. package/commands/build.md +135 -0
  38. package/commands/clean.md +126 -0
  39. package/commands/deploy-prod.md +171 -0
  40. package/commands/deploy-staging.md +147 -0
  41. package/commands/deps.md +169 -0
  42. package/commands/dev.md +132 -0
  43. package/commands/format.md +142 -0
  44. package/commands/lint.md +125 -0
  45. package/commands/migrate.md +159 -0
  46. package/commands/release.md +183 -0
  47. package/commands/rollback.md +152 -0
  48. package/commands/seed.md +178 -0
  49. package/commands/setup.md +109 -0
  50. package/commands/test.md +134 -0
  51. package/commands/validate.md +147 -0
  52. package/context/README.md +7 -0
  53. package/context/aem.md +47 -0
  54. package/context/architecture.md +51 -0
  55. package/context/bullminder.md +57 -0
  56. package/context/coding-style.md +42 -0
  57. package/context/communication.md +53 -0
  58. package/context/company.md +46 -0
  59. package/context/engineering.md +63 -0
  60. package/context/project-template.md +71 -0
  61. package/context/trading.md +52 -0
  62. package/hooks/README.md +326 -0
  63. package/hooks/code-review/README.md +6 -0
  64. package/hooks/code-review/check-coverage.md +101 -0
  65. package/hooks/custom/README.md +6 -0
  66. package/hooks/custom/project-specific-hooks.md +273 -0
  67. package/hooks/deployment/README.md +6 -0
  68. package/hooks/deployment/health-check.md +102 -0
  69. package/hooks/deployment/pre-deploy-check.md +84 -0
  70. package/hooks/documentation/README.md +6 -0
  71. package/hooks/documentation/update-changelog.md +146 -0
  72. package/hooks/post-task/README.md +5 -0
  73. package/hooks/post-task/run-tests.md +61 -0
  74. package/hooks/pre-commit/README.md +6 -0
  75. package/hooks/pre-commit/format.md +63 -0
  76. package/hooks/pre-commit/lint.md +62 -0
  77. package/hooks/pre-commit/type-check.md +78 -0
  78. package/hooks/pre-task/README.md +6 -0
  79. package/hooks/pre-task/check-branch.md +48 -0
  80. package/hooks/pre-task/validate-environment.md +48 -0
  81. package/hooks/security-check/README.md +6 -0
  82. package/hooks/security-check/dependency-audit.md +85 -0
  83. package/hooks/security-check/secrets-scan.md +77 -0
  84. package/hooks/test-before-finish/README.md +6 -0
  85. package/hooks/test-before-finish/run-all-tests.md +128 -0
  86. package/index.js +69 -0
  87. package/knowledge/README.md +33 -0
  88. package/knowledge/ai-agents.md +74 -0
  89. package/knowledge/decision-making.md +73 -0
  90. package/knowledge/documentation.md +67 -0
  91. package/knowledge/engineering-principles.md +65 -0
  92. package/knowledge/product-discovery.md +68 -0
  93. package/knowledge/security-privacy.md +54 -0
  94. package/knowledge/testing-quality.md +63 -0
  95. package/package.json +63 -0
  96. package/patterns/README.md +7 -0
  97. package/prompts/README.md +208 -0
  98. package/prompts/architect/README.md +96 -0
  99. package/prompts/architect/design-system.md +140 -0
  100. package/prompts/debugger/README.md +96 -0
  101. package/prompts/debugger/diagnose-issue.md +141 -0
  102. package/prompts/developer/README.md +129 -0
  103. package/prompts/developer/fix-bug.md +136 -0
  104. package/prompts/developer/implement-feature.md +133 -0
  105. package/prompts/product-owner/README.md +116 -0
  106. package/prompts/product-owner/define-feature.md +145 -0
  107. package/prompts/reviewer/README.md +91 -0
  108. package/prompts/reviewer/code-review.md +129 -0
  109. package/prompts/support/README.md +154 -0
  110. package/prompts/support/resolve-issue.md +124 -0
  111. package/roles/README.md +6 -0
  112. package/roles/design-architect/README.md +98 -0
  113. package/roles/design-architect/accessibility/README.md +33 -0
  114. package/roles/design-architect/accessibility/checklists.md +29 -0
  115. package/roles/design-architect/accessibility/examples.md +35 -0
  116. package/roles/design-architect/checklists.md +76 -0
  117. package/roles/design-architect/component-library/README.md +35 -0
  118. package/roles/design-architect/component-library/checklists.md +29 -0
  119. package/roles/design-architect/component-library/examples.md +35 -0
  120. package/roles/design-architect/design-system/README.md +35 -0
  121. package/roles/design-architect/design-system/checklists.md +27 -0
  122. package/roles/design-architect/design-system/examples.md +41 -0
  123. package/roles/design-architect/examples/README.md +31 -0
  124. package/roles/design-architect/examples/checklists.md +26 -0
  125. package/roles/design-architect/examples/examples.md +46 -0
  126. package/roles/design-architect/examples.md +90 -0
  127. package/roles/design-architect/figma/README.md +33 -0
  128. package/roles/design-architect/figma/checklists.md +27 -0
  129. package/roles/design-architect/figma/examples.md +38 -0
  130. package/roles/design-architect/responsibilities.md +73 -0
  131. package/roles/design-architect/responsive/README.md +34 -0
  132. package/roles/design-architect/responsive/checklists.md +26 -0
  133. package/roles/design-architect/responsive/examples.md +39 -0
  134. package/roles/design-architect/role.md +129 -0
  135. package/roles/design-architect/skill-map.md +42 -0
  136. package/roles/design-architect/triggers.md +110 -0
  137. package/roles/design-architect/ui/README.md +36 -0
  138. package/roles/design-architect/ui/checklists.md +29 -0
  139. package/roles/design-architect/ui/examples.md +28 -0
  140. package/roles/design-architect/usability/README.md +34 -0
  141. package/roles/design-architect/usability/checklists.md +28 -0
  142. package/roles/design-architect/usability/examples.md +31 -0
  143. package/roles/design-architect/ux/README.md +36 -0
  144. package/roles/design-architect/ux/checklists.md +28 -0
  145. package/roles/design-architect/ux/examples.md +37 -0
  146. package/roles/design-architect/wireframes/README.md +34 -0
  147. package/roles/design-architect/wireframes/checklists.md +25 -0
  148. package/roles/design-architect/wireframes/examples.md +32 -0
  149. package/roles/design-architect/workflow.md +80 -0
  150. package/roles/devops/README.md +101 -0
  151. package/roles/devops/ansible/README.md +6 -0
  152. package/roles/devops/checklists.md +413 -0
  153. package/roles/devops/ci-cd/README.md +169 -0
  154. package/roles/devops/ci-cd/checklists.md +289 -0
  155. package/roles/devops/ci-cd/examples.md +429 -0
  156. package/roles/devops/cloud-platforms/README.md +109 -0
  157. package/roles/devops/cost-optimization/README.md +131 -0
  158. package/roles/devops/disaster-recovery/README.md +118 -0
  159. package/roles/devops/docker/README.md +6 -0
  160. package/roles/devops/examples/README.md +6 -0
  161. package/roles/devops/examples.md +775 -0
  162. package/roles/devops/github-actions/README.md +6 -0
  163. package/roles/devops/helm/README.md +6 -0
  164. package/roles/devops/infrastructure-as-code/README.md +160 -0
  165. package/roles/devops/infrastructure-as-code/checklists.md +124 -0
  166. package/roles/devops/jenkins/README.md +6 -0
  167. package/roles/devops/kubernetes/README.md +150 -0
  168. package/roles/devops/kubernetes/checklists.md +192 -0
  169. package/roles/devops/kubernetes/examples.md +189 -0
  170. package/roles/devops/monitoring/README.md +93 -0
  171. package/roles/devops/networking/README.md +83 -0
  172. package/roles/devops/performance/README.md +104 -0
  173. package/roles/devops/responsibilities.md +95 -0
  174. package/roles/devops/role.md +130 -0
  175. package/roles/devops/security/README.md +126 -0
  176. package/roles/devops/skill-map.md +162 -0
  177. package/roles/devops/terraform/README.md +6 -0
  178. package/roles/devops/triggers.md +241 -0
  179. package/roles/devops/workflow.md +197 -0
  180. package/roles/qa/README.md +16 -0
  181. package/roles/qa/api-testing/README.md +6 -0
  182. package/roles/qa/automation/README.md +6 -0
  183. package/roles/qa/checklists.md +24 -0
  184. package/roles/qa/examples/README.md +6 -0
  185. package/roles/qa/examples.md +27 -0
  186. package/roles/qa/performance/README.md +6 -0
  187. package/roles/qa/playwright/README.md +6 -0
  188. package/roles/qa/responsibilities.md +16 -0
  189. package/roles/qa/role.md +47 -0
  190. package/roles/qa/selenium/README.md +6 -0
  191. package/roles/qa/skill-map.md +14 -0
  192. package/roles/qa/triggers.md +10 -0
  193. package/roles/qa/workflow.md +9 -0
  194. package/roles/software-architect/README.md +16 -0
  195. package/roles/software-architect/agents/README.md +6 -0
  196. package/roles/software-architect/ai-architecture/README.md +6 -0
  197. package/roles/software-architect/aws/README.md +6 -0
  198. package/roles/software-architect/azure/README.md +6 -0
  199. package/roles/software-architect/caching/README.md +6 -0
  200. package/roles/software-architect/checklists.md +25 -0
  201. package/roles/software-architect/cloud/README.md +6 -0
  202. package/roles/software-architect/database-design/README.md +6 -0
  203. package/roles/software-architect/diagrams/README.md +6 -0
  204. package/roles/software-architect/distributed-systems/README.md +7 -0
  205. package/roles/software-architect/docker/README.md +6 -0
  206. package/roles/software-architect/event-driven/README.md +7 -0
  207. package/roles/software-architect/examples/README.md +6 -0
  208. package/roles/software-architect/examples.md +22 -0
  209. package/roles/software-architect/gcp/README.md +6 -0
  210. package/roles/software-architect/kubernetes/README.md +6 -0
  211. package/roles/software-architect/messaging/README.md +6 -0
  212. package/roles/software-architect/rag/README.md +7 -0
  213. package/roles/software-architect/responsibilities.md +17 -0
  214. package/roles/software-architect/role.md +46 -0
  215. package/roles/software-architect/scalability/README.md +6 -0
  216. package/roles/software-architect/security/README.md +6 -0
  217. package/roles/software-architect/skill-map.md +15 -0
  218. package/roles/software-architect/system-design/README.md +6 -0
  219. package/roles/software-architect/triggers.md +10 -0
  220. package/roles/software-architect/vector-db/README.md +6 -0
  221. package/roles/software-architect/workflow.md +9 -0
  222. package/roles/software-developer/README.md +116 -0
  223. package/roles/software-developer/api/README.md +365 -0
  224. package/roles/software-developer/api/checklist.md +131 -0
  225. package/roles/software-developer/api/examples.md +459 -0
  226. package/roles/software-developer/authentication/README.md +26 -0
  227. package/roles/software-developer/authentication/checklists.md +22 -0
  228. package/roles/software-developer/authentication/examples.md +32 -0
  229. package/roles/software-developer/authorization/README.md +26 -0
  230. package/roles/software-developer/authorization/checklists.md +21 -0
  231. package/roles/software-developer/authorization/examples.md +27 -0
  232. package/roles/software-developer/backend/README.md +26 -0
  233. package/roles/software-developer/backend/checklists.md +21 -0
  234. package/roles/software-developer/backend/examples.md +21 -0
  235. package/roles/software-developer/cache/README.md +25 -0
  236. package/roles/software-developer/cache/checklists.md +21 -0
  237. package/roles/software-developer/cache/examples.md +22 -0
  238. package/roles/software-developer/checklists.md +122 -0
  239. package/roles/software-developer/code-review/README.md +23 -0
  240. package/roles/software-developer/code-review/checklists.md +22 -0
  241. package/roles/software-developer/code-review/examples.md +20 -0
  242. package/roles/software-developer/database/README.md +27 -0
  243. package/roles/software-developer/database/checklists.md +21 -0
  244. package/roles/software-developer/database/examples.md +27 -0
  245. package/roles/software-developer/debugging/README.md +24 -0
  246. package/roles/software-developer/debugging/checklists.md +20 -0
  247. package/roles/software-developer/debugging/examples.md +28 -0
  248. package/roles/software-developer/examples/README.md +22 -0
  249. package/roles/software-developer/examples/checklists.md +8 -0
  250. package/roles/software-developer/examples/examples.md +25 -0
  251. package/roles/software-developer/examples.md +378 -0
  252. package/roles/software-developer/frontend/README.md +76 -0
  253. package/roles/software-developer/frontend/accessibility/README.md +136 -0
  254. package/roles/software-developer/frontend/accessibility/best-practices.md +368 -0
  255. package/roles/software-developer/frontend/code-quality/README.md +136 -0
  256. package/roles/software-developer/frontend/code-quality/best-practices.md +309 -0
  257. package/roles/software-developer/frontend/components/README.md +65 -0
  258. package/roles/software-developer/frontend/components/best-practices.md +273 -0
  259. package/roles/software-developer/frontend/debugging/README.md +149 -0
  260. package/roles/software-developer/frontend/debugging/best-practices.md +329 -0
  261. package/roles/software-developer/frontend/examples/README.md +19 -0
  262. package/roles/software-developer/frontend/examples/checklists.md +8 -0
  263. package/roles/software-developer/frontend/examples/examples.md +17 -0
  264. package/roles/software-developer/frontend/logging-observability/README.md +196 -0
  265. package/roles/software-developer/frontend/logging-observability/best-practices.md +430 -0
  266. package/roles/software-developer/frontend/performance/README.md +99 -0
  267. package/roles/software-developer/frontend/performance/best-practices.md +350 -0
  268. package/roles/software-developer/frontend/state-management/README.md +85 -0
  269. package/roles/software-developer/frontend/state-management/best-practices.md +344 -0
  270. package/roles/software-developer/frontend/testing/README.md +114 -0
  271. package/roles/software-developer/frontend/testing/best-practices.md +272 -0
  272. package/roles/software-developer/fullstack/README.md +25 -0
  273. package/roles/software-developer/fullstack/checklists.md +19 -0
  274. package/roles/software-developer/fullstack/examples.md +14 -0
  275. package/roles/software-developer/graphql/README.md +24 -0
  276. package/roles/software-developer/graphql/checklists.md +20 -0
  277. package/roles/software-developer/graphql/examples.md +24 -0
  278. package/roles/software-developer/integration-tests/README.md +25 -0
  279. package/roles/software-developer/integration-tests/checklists.md +20 -0
  280. package/roles/software-developer/integration-tests/examples.md +18 -0
  281. package/roles/software-developer/java/README.md +24 -0
  282. package/roles/software-developer/java/checklists.md +16 -0
  283. package/roles/software-developer/java/examples.md +22 -0
  284. package/roles/software-developer/javascript/README.md +24 -0
  285. package/roles/software-developer/javascript/checklists.md +15 -0
  286. package/roles/software-developer/javascript/examples.md +18 -0
  287. package/roles/software-developer/logging/README.md +105 -0
  288. package/roles/software-developer/logging/checklists.md +48 -0
  289. package/roles/software-developer/logging/examples.md +135 -0
  290. package/roles/software-developer/messaging/README.md +24 -0
  291. package/roles/software-developer/messaging/checklists.md +21 -0
  292. package/roles/software-developer/messaging/examples.md +26 -0
  293. package/roles/software-developer/microservices/README.md +25 -0
  294. package/roles/software-developer/microservices/checklists.md +21 -0
  295. package/roles/software-developer/microservices/examples.md +21 -0
  296. package/roles/software-developer/node/README.md +25 -0
  297. package/roles/software-developer/node/checklists.md +15 -0
  298. package/roles/software-developer/node/examples.md +15 -0
  299. package/roles/software-developer/nosql/README.md +24 -0
  300. package/roles/software-developer/nosql/checklists.md +21 -0
  301. package/roles/software-developer/nosql/examples.md +20 -0
  302. package/roles/software-developer/observability/README.md +25 -0
  303. package/roles/software-developer/observability/checklists.md +21 -0
  304. package/roles/software-developer/observability/examples.md +22 -0
  305. package/roles/software-developer/performance/README.md +26 -0
  306. package/roles/software-developer/performance/checklists.md +20 -0
  307. package/roles/software-developer/performance/examples.md +20 -0
  308. package/roles/software-developer/python/README.md +25 -0
  309. package/roles/software-developer/python/checklists.md +15 -0
  310. package/roles/software-developer/python/examples.md +17 -0
  311. package/roles/software-developer/react/README.md +24 -0
  312. package/roles/software-developer/react/checklists.md +15 -0
  313. package/roles/software-developer/react/examples.md +22 -0
  314. package/roles/software-developer/refactoring/README.md +23 -0
  315. package/roles/software-developer/refactoring/checklists.md +21 -0
  316. package/roles/software-developer/refactoring/examples.md +11 -0
  317. package/roles/software-developer/responsibilities.md +58 -0
  318. package/roles/software-developer/role.md +127 -0
  319. package/roles/software-developer/skill-map.md +88 -0
  320. package/roles/software-developer/springboot/README.md +25 -0
  321. package/roles/software-developer/springboot/checklists.md +15 -0
  322. package/roles/software-developer/springboot/examples.md +21 -0
  323. package/roles/software-developer/sql/README.md +24 -0
  324. package/roles/software-developer/sql/checklists.md +22 -0
  325. package/roles/software-developer/sql/examples.md +20 -0
  326. package/roles/software-developer/testing/README.md +25 -0
  327. package/roles/software-developer/testing/checklists.md +21 -0
  328. package/roles/software-developer/testing/examples.md +19 -0
  329. package/roles/software-developer/triggers.md +550 -0
  330. package/roles/software-developer/typescript/README.md +25 -0
  331. package/roles/software-developer/typescript/checklists.md +15 -0
  332. package/roles/software-developer/typescript/examples.md +18 -0
  333. package/roles/software-developer/unit-tests/README.md +24 -0
  334. package/roles/software-developer/unit-tests/checklists.md +19 -0
  335. package/roles/software-developer/unit-tests/examples.md +22 -0
  336. package/roles/software-developer/workflow.md +196 -0
  337. package/roles/sre/README.md +16 -0
  338. package/roles/sre/alerts/README.md +6 -0
  339. package/roles/sre/availability/README.md +6 -0
  340. package/roles/sre/chaos/README.md +6 -0
  341. package/roles/sre/checklists.md +24 -0
  342. package/roles/sre/examples/README.md +6 -0
  343. package/roles/sre/examples.md +19 -0
  344. package/roles/sre/observability/README.md +6 -0
  345. package/roles/sre/reliability/README.md +6 -0
  346. package/roles/sre/responsibilities.md +16 -0
  347. package/roles/sre/role.md +46 -0
  348. package/roles/sre/skill-map.md +14 -0
  349. package/roles/sre/slos/README.md +6 -0
  350. package/roles/sre/triggers.md +10 -0
  351. package/roles/sre/workflow.md +9 -0
  352. package/roles/support-engineer/README.md +16 -0
  353. package/roles/support-engineer/checklists.md +24 -0
  354. package/roles/support-engineer/datadog/README.md +6 -0
  355. package/roles/support-engineer/examples/README.md +6 -0
  356. package/roles/support-engineer/examples.md +17 -0
  357. package/roles/support-engineer/incident-response/README.md +6 -0
  358. package/roles/support-engineer/kubernetes/README.md +6 -0
  359. package/roles/support-engineer/linux/README.md +6 -0
  360. package/roles/support-engineer/logs/README.md +6 -0
  361. package/roles/support-engineer/monitoring/README.md +6 -0
  362. package/roles/support-engineer/networking/README.md +6 -0
  363. package/roles/support-engineer/newrelic/README.md +6 -0
  364. package/roles/support-engineer/postmortem/README.md +6 -0
  365. package/roles/support-engineer/production/README.md +6 -0
  366. package/roles/support-engineer/responsibilities.md +16 -0
  367. package/roles/support-engineer/role.md +47 -0
  368. package/roles/support-engineer/root-cause-analysis/README.md +6 -0
  369. package/roles/support-engineer/runbooks/README.md +6 -0
  370. package/roles/support-engineer/skill-map.md +14 -0
  371. package/roles/support-engineer/splunk/README.md +6 -0
  372. package/roles/support-engineer/triggers.md +10 -0
  373. package/roles/support-engineer/troubleshooting/README.md +6 -0
  374. package/roles/support-engineer/workflow.md +9 -0
  375. package/setup.sh +204 -0
  376. package/skills/.claude/README.md +7 -0
  377. package/skills/README.md +21 -0
  378. package/skills/ai-agents/README.md +207 -0
  379. package/skills/ai-agents/examples.md +335 -0
  380. package/skills/ai-agents/skill.md +392 -0
  381. package/skills/architecture/README.md +198 -0
  382. package/skills/architecture/examples.md +316 -0
  383. package/skills/architecture/skill.md +189 -0
  384. package/skills/design-architecture/README.md +107 -0
  385. package/skills/design-architecture/examples.md +84 -0
  386. package/skills/design-architecture/skill.md +192 -0
  387. package/skills/devops/README.md +177 -0
  388. package/skills/devops/examples.md +376 -0
  389. package/skills/devops/skill.md +210 -0
  390. package/skills/documentation/README.md +182 -0
  391. package/skills/documentation/examples.md +364 -0
  392. package/skills/documentation/skill.md +200 -0
  393. package/skills/performance/README.md +177 -0
  394. package/skills/performance/examples.md +376 -0
  395. package/skills/performance/skill.md +199 -0
  396. package/skills/qa/README.md +106 -0
  397. package/skills/qa/examples.md +84 -0
  398. package/skills/qa/skill.md +384 -0
  399. package/skills/security/README.md +108 -0
  400. package/skills/security/examples.md +85 -0
  401. package/skills/security/skill.md +223 -0
  402. package/skills/software-development/README.md +239 -0
  403. package/skills/software-development/assessment.md +0 -0
  404. package/skills/software-development/checklists.md +0 -0
  405. package/skills/software-development/examples.md +375 -0
  406. package/skills/software-development/prompts.md +0 -0
  407. package/skills/software-development/skill.md +390 -0
  408. package/skills/software-development/templates/README.md +7 -0
  409. package/skills/software-development/templates/api-development.md +0 -0
  410. package/skills/software-development/templates/bug-fix.md +0 -0
  411. package/skills/software-development/templates/code-review.md +0 -0
  412. package/skills/software-development/templates/feature-implementation.md +0 -0
  413. package/skills/software-development/templates/llm-integration.md +0 -0
  414. package/skills/software-development/templates/performance-review.md +0 -0
  415. package/skills/software-development/templates/security-review.md +0 -0
  416. package/skills/software-development/templates/test-generation.md +0 -0
  417. package/skills/software-development/tools.md +0 -0
  418. package/skills/software-development/workflows.md +0 -0
  419. package/skills/sre/README.md +107 -0
  420. package/skills/sre/examples.md +379 -0
  421. package/skills/sre/skill.md +256 -0
  422. package/skills/support-engineering/README.md +107 -0
  423. package/skills/support-engineering/examples.md +85 -0
  424. package/skills/support-engineering/skill.md +103 -0
@@ -0,0 +1,289 @@
1
+ # CI/CD Pipeline Checklists
2
+
3
+ Detailed checklists for CI/CD pipeline design and implementation.
4
+
5
+ ---
6
+
7
+ ## CI/CD Pipeline Design Checklist
8
+
9
+ ### Requirements & Goals
10
+ - [ ] Business requirements for pipeline speed understood
11
+ - [ ] Deployment frequency target defined (daily, weekly, on-demand)
12
+ - [ ] Approval workflows and gates defined
13
+ - [ ] Rollout strategy chosen (rolling, blue-green, canary)
14
+ - [ ] Target deployment platforms identified (Kubernetes, VMs, serverless)
15
+ - [ ] Success metrics defined (deployment speed, failure rate, rollback rate)
16
+
17
+ ### Pipeline Architecture
18
+ - [ ] Source repository structure documented
19
+ - [ ] Branching strategy defined (main, develop, feature branches)
20
+ - [ ] Pipeline trigger events identified (push, PR, schedule)
21
+ - [ ] Parallel execution opportunities identified
22
+ - [ ] Pipeline dependencies mapped
23
+ - [ ] Build artifact strategy defined
24
+ - [ ] Secrets and credentials strategy defined
25
+
26
+ ### Build Stage Design
27
+ - [ ] Build tool/platform selected
28
+ - [ ] Dependency management approach defined
29
+ - [ ] Caching strategy for dependencies defined
30
+ - [ ] Build versioning scheme defined
31
+ - [ ] Build artifact storage configured
32
+ - [ ] Build timeout appropriate for typical build time
33
+
34
+ ### Test Stage Design
35
+ - [ ] Unit test execution configured
36
+ - [ ] Test coverage thresholds defined
37
+ - [ ] Integration test strategy defined
38
+ - [ ] Test result reporting configured
39
+ - [ ] Test flakiness tracking implemented
40
+ - [ ] Long-running tests parallelized (if applicable)
41
+
42
+ ### Security Scanning Design
43
+ - [ ] Dependency scanning tool selected
44
+ - [ ] Dependency scanning frequency defined
45
+ - [ ] SAST scanning tool selected and configured
46
+ - [ ] Container scanning strategy defined
47
+ - [ ] Secrets scanning enabled
48
+ - [ ] Security scan result review process defined
49
+ - [ ] Security scan failure policy (block vs. warn) defined
50
+
51
+ ### Artifact Management
52
+ - [ ] Artifact registry/repository selected
53
+ - [ ] Artifact versioning scheme defined
54
+ - [ ] Container image naming convention defined
55
+ - [ ] Artifact retention policy defined
56
+ - [ ] Artifact signature/integrity verification configured
57
+ - [ ] Artifact pull and authentication configured
58
+
59
+ ### Deployment Design
60
+ - [ ] Deployment strategy selected (rolling/blue-green/canary)
61
+ - [ ] Staging environment available for testing
62
+ - [ ] Production environment infrastructure ready
63
+ - [ ] Deployment automation tool selected
64
+ - [ ] Blue-green/canary traffic shifting strategy defined
65
+ - [ ] Health checks for deployment validation defined
66
+ - [ ] Rollback procedure documented
67
+
68
+ ### Approval & Release
69
+ - [ ] Approval process defined for production deployments
70
+ - [ ] Approvers identified and notified
71
+ - [ ] SLA for approval defined
72
+ - [ ] Release notes generation automated
73
+ - [ ] Change tracking/ticketing integration configured
74
+ - [ ] Deployment notifications configured
75
+
76
+ ---
77
+
78
+ ## GitHub Actions Implementation Checklist
79
+
80
+ ### Workflow Setup
81
+ - [ ] `.github/workflows/` directory created
82
+ - [ ] Workflow file naming convention established
83
+ - [ ] Workflow triggers defined (push, PR, schedule)
84
+ - [ ] Environment variables defined
85
+ - [ ] Secrets configured in GitHub settings
86
+ - [ ] Workflow permissions configured (GITHUB_TOKEN scope)
87
+
88
+ ### Build Job
89
+ - [ ] Runner OS selected (ubuntu-latest, macos-latest, windows-latest)
90
+ - [ ] Dependency caching configured (actions/cache)
91
+ - [ ] Build step runs successfully locally first
92
+ - [ ] Build step outputs artifacts
93
+ - [ ] Build step set correct exit codes on failure
94
+
95
+ ### Test Job
96
+ - [ ] Test runner configured
97
+ - [ ] Test discovery automated
98
+ - [ ] Test results reported (JUnit XML, Cobertura)
99
+ - [ ] Coverage thresholds enforced
100
+ - [ ] Failed tests cause workflow failure
101
+
102
+ ### Security Scanning Job
103
+ - [ ] Dependency scanning configured (Dependabot)
104
+ - [ ] Container scanning configured (if applicable)
105
+ - [ ] Secrets scanning enabled
106
+ - [ ] SAST scanning integrated (CodeQL, SonarQube)
107
+
108
+ ### Deployment Job
109
+ - [ ] Deployment credentials stored as secrets
110
+ - [ ] Deployment tool configured (kubectl, Helm, Terraform)
111
+ - [ ] Staging deployment works consistently
112
+ - [ ] Health checks validate deployment
113
+ - [ ] Rollback procedure tested
114
+
115
+ ### Production Deployment
116
+ - [ ] Environment protection rules configured
117
+ - [ ] Approval requirements set for production
118
+ - [ ] Deployment notifications configured
119
+ - [ ] Monitoring alerts configured post-deployment
120
+
121
+ ### Error Handling & Notifications
122
+ - [ ] Failed workflow notifications sent
123
+ - [ ] Status badges configured for readme
124
+ - [ ] Slack integration configured (if used)
125
+ - [ ] PagerDuty integration configured (if used)
126
+
127
+ ---
128
+
129
+ ## GitLab CI Implementation Checklist
130
+
131
+ ### Pipeline Configuration
132
+ - [ ] `.gitlab-ci.yml` created in repository root
133
+ - [ ] Stages defined (build, test, security, deploy)
134
+ - [ ] Pipeline triggers configured
135
+ - [ ] Variables defined (CI_COMMIT_SHA, custom vars)
136
+ - [ ] Protected variables configured for secrets
137
+ - [ ] Pipeline concurrency limits defined
138
+
139
+ ### Docker & Containers
140
+ - [ ] Docker image specified for runners
141
+ - [ ] Docker-in-Docker enabled (if needed)
142
+ - [ ] Container registry URL configured
143
+ - [ ] Container registry credentials configured
144
+ - [ ] Artifact caching configured
145
+
146
+ ### Runners
147
+ - [ ] Runner type selected (Docker, machine, shell)
148
+ - [ ] Runner tags defined and applied
149
+ - [ ] Runner resource limits appropriate
150
+ - [ ] Runner concurrency configured
151
+
152
+ ### Artifacts & Caching
153
+ - [ ] Artifacts configured with retention policy
154
+ - [ ] Cache directories configured
155
+ - [ ] Cache keys optimized to avoid conflicts
156
+ - [ ] Artifact cleanup policy set
157
+
158
+ ### Testing & Code Quality
159
+ - [ ] Test jobs parallelized
160
+ - [ ] Test coverage reported
161
+ - [ ] Code quality gates configured
162
+ - [ ] Test report merge into MR
163
+
164
+ ### Deployment
165
+ - [ ] Manual deployment jobs created (prod gates)
166
+ - [ ] Auto DevOps configured (if used)
167
+ - [ ] Environment-specific configuration
168
+ - [ ] Deployment history visible
169
+
170
+ ---
171
+
172
+ ## Jenkins Pipeline Checklist
173
+
174
+ ### Jenkins Setup
175
+ - [ ] Jenkins instance provisioned and configured
176
+ - [ ] Pipeline plugin installed
177
+ - [ ] Credentials plugin configured
178
+ - [ ] Docker plugin installed (if using Docker agents)
179
+ - [ ] Git plugin configured
180
+
181
+ ### Jenkinsfile
182
+ - [ ] `Jenkinsfile` created in repository
183
+ - [ ] Declarative or Scripted pipeline syntax chosen
184
+ - [ ] Stages defined
185
+ - [ ] Post-build actions configured
186
+ - [ ] Notifications configured
187
+
188
+ ### Pipeline Stages
189
+ - [ ] Checkout stage checks out code
190
+ - [ ] Build stage compiles/packages code
191
+ - [ ] Test stage runs tests
192
+ - [ ] Security scanning stage configured
193
+ - [ ] Deploy stage automates deployment
194
+ - [ ] Validation stage confirms deployment success
195
+
196
+ ### Agents & Resources
197
+ - [ ] Agent labels defined
198
+ - [ ] Resource requirements specified
199
+ - [ ] Docker agents configured (if applicable)
200
+ - [ ] Agent cleanup configured
201
+
202
+ ### Credentials Management
203
+ - [ ] Credentials stored in Jenkins credentials store
204
+ - [ ] Secret masking in logs enabled
205
+ - [ ] Credential scoping (global, folder, etc.) configured
206
+
207
+ ### Webhooks & Triggers
208
+ - [ ] GitHub/GitLab webhooks configured
209
+ - [ ] Poll SCM configured (if webhooks unavailable)
210
+ - [ ] Pipeline triggers (other pipelines) configured
211
+
212
+ ### Notifications
213
+ - [ ] Email notifications configured
214
+ - [ ] Slack notifications configured
215
+ - [ ] Build status badges configured
216
+
217
+ ---
218
+
219
+ ## Deployment Strategy Testing Checklist
220
+
221
+ ### Rolling Deployment
222
+ - [ ] Old instances gradually terminated as new ones start
223
+ - [ ] Health checks configured to prevent bad deployments
224
+ - [ ] Rollback tested and works correctly
225
+ - [ ] Connection draining configured (if load balancer)
226
+ - [ ] Database schema changes backward compatible
227
+
228
+ ### Blue-Green Deployment
229
+ - [ ] Two identical production environments prepared
230
+ - [ ] Traffic switch mechanism configured (DNS, load balancer)
231
+ - [ ] Switch tested (blue→green and green→blue)
232
+ - [ ] Rollback can happen instantly
233
+ - [ ] Parallel testing possible in both environments
234
+ - [ ] Resource doubling cost accepted
235
+
236
+ ### Canary Deployment
237
+ - [ ] Traffic splitting configured (5-10% to canary)
238
+ - [ ] Metrics monitored during rollout
239
+ - [ ] Automated rollback on error rate/latency threshold
240
+ - [ ] Gradual rollout schedule defined
241
+ - [ ] Health checks validate canary
242
+ - [ ] Canary version tagged in monitoring
243
+
244
+ ---
245
+
246
+ ## Post-Deployment Validation Checklist
247
+
248
+ ### Immediate Validation
249
+ - [ ] Application health checks passing
250
+ - [ ] Error rate normal or lower
251
+ - [ ] Response latency normal
252
+ - [ ] Database queries performing normally
253
+ - [ ] External integrations working
254
+
255
+ ### Monitoring & Alerting
256
+ - [ ] Dashboards updated and accessible
257
+ - [ ] Alerts configured for new services/features
258
+ - [ ] Alert thresholds tuned
259
+ - [ ] Log aggregation working
260
+
261
+ ### Testing Post-Deployment
262
+ - [ ] Smoke tests automated and passing
263
+ - [ ] Integration tests automated and passing
264
+ - [ ] E2E tests covering critical paths
265
+ - [ ] Performance tests passing
266
+
267
+ ### Documentation
268
+ - [ ] Release notes published
269
+ - [ ] Runbook updated
270
+ - [ ] Known issues documented
271
+ - [ ] Rollback procedures documented
272
+
273
+ ---
274
+
275
+ ## Pipeline Troubleshooting Checklist
276
+
277
+ When pipeline fails:
278
+
279
+ - [ ] Check build logs for error messages
280
+ - [ ] Verify dependencies are accessible
281
+ - [ ] Check secrets and credentials are configured
282
+ - [ ] Verify deployment target is accessible
283
+ - [ ] Check for resource exhaustion (disk, memory)
284
+ - [ ] Review recent code changes
285
+ - [ ] Test locally to reproduce issue
286
+ - [ ] Check for timeouts (network, build)
287
+ - [ ] Verify environment configuration
288
+ - [ ] Review system logs on build agents
289
+
@@ -0,0 +1,429 @@
1
+ # CI/CD Pipeline Examples
2
+
3
+ Concrete examples of CI/CD pipeline configurations.
4
+
5
+ ---
6
+
7
+ ## GitHub Actions Example
8
+
9
+ See `roles/devops/examples.md` for a complete GitHub Actions workflow example covering:
10
+ - Build and push Docker image
11
+ - Unit tests with coverage
12
+ - Security scanning (Trivy)
13
+ - Staging deployment
14
+ - Production deployment with approval
15
+ - Smoke tests
16
+
17
+ ---
18
+
19
+ ## GitLab CI Configuration Example
20
+
21
+ ```yaml
22
+ # .gitlab-ci.yml
23
+ stages:
24
+ - build
25
+ - test
26
+ - security
27
+ - deploy
28
+
29
+ variables:
30
+ REGISTRY: registry.gitlab.com
31
+ IMAGE_NAME: $CI_PROJECT_PATH
32
+ IMAGE_TAG: $CI_COMMIT_SHA
33
+
34
+ default:
35
+ image: docker:24
36
+ services:
37
+ - docker:24-dind
38
+
39
+ build:
40
+ stage: build
41
+ script:
42
+ - docker build -t $REGISTRY/$IMAGE_NAME:$IMAGE_TAG .
43
+ - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
44
+ - docker push $REGISTRY/$IMAGE_NAME:$IMAGE_TAG
45
+ only:
46
+ - main
47
+ - develop
48
+
49
+ test:
50
+ stage: test
51
+ image: golang:1.21
52
+ before_script:
53
+ - go mod download
54
+ script:
55
+ - go test -v -race -coverprofile=coverage.out ./...
56
+ - go tool cover -html=coverage.out -o coverage.html
57
+ artifacts:
58
+ paths:
59
+ - coverage.html
60
+ reports:
61
+ coverage_report:
62
+ coverage_format: cobertura
63
+ path: coverage.out
64
+ coverage: '/total coverage: \d+\.\d+/'
65
+
66
+ security:scanning:
67
+ stage: security
68
+ image: aquasec/trivy:latest
69
+ script:
70
+ - trivy image --exit-code 0 --severity HIGH,CRITICAL --format template --template '@/contrib/html.tpl' -o report.html $REGISTRY/$IMAGE_NAME:$IMAGE_TAG
71
+ artifacts:
72
+ paths:
73
+ - report.html
74
+ only:
75
+ - main
76
+ - develop
77
+
78
+ deploy:staging:
79
+ stage: deploy
80
+ image: bitnami/kubectl:latest
81
+ script:
82
+ - kubectl set image deployment/myapp myapp=$REGISTRY/$IMAGE_NAME:$IMAGE_TAG -n staging
83
+ - kubectl rollout status deployment/myapp -n staging
84
+ environment:
85
+ name: staging
86
+ url: https://staging.example.com
87
+ only:
88
+ - develop
89
+
90
+ deploy:production:
91
+ stage: deploy
92
+ image: bitnami/kubectl:latest
93
+ script:
94
+ - kubectl set image deployment/myapp myapp=$REGISTRY/$IMAGE_NAME:$IMAGE_TAG -n production
95
+ - kubectl rollout status deployment/myapp -n production
96
+ environment:
97
+ name: production
98
+ url: https://example.com
99
+ only:
100
+ - main
101
+ when: manual
102
+ ```
103
+
104
+ ---
105
+
106
+ ## Jenkins Declarative Pipeline Example
107
+
108
+ ```groovy
109
+ // Jenkinsfile
110
+ pipeline {
111
+ agent any
112
+
113
+ options {
114
+ timeout(time: 1, unit: 'HOURS')
115
+ timestamps()
116
+ buildDiscarder(logRotator(numToKeepStr: '10'))
117
+ }
118
+
119
+ environment {
120
+ REGISTRY = 'docker.io'
121
+ IMAGE_NAME = 'myapp'
122
+ IMAGE_TAG = "${BUILD_NUMBER}"
123
+ DOCKER_CREDENTIALS = credentials('docker-registry')
124
+ }
125
+
126
+ stages {
127
+ stage('Checkout') {
128
+ steps {
129
+ checkout scm
130
+ }
131
+ }
132
+
133
+ stage('Build') {
134
+ steps {
135
+ script {
136
+ sh '''
137
+ docker build -t ${REGISTRY}/${IMAGE_NAME}:${IMAGE_TAG} .
138
+ docker tag ${REGISTRY}/${IMAGE_NAME}:${IMAGE_TAG} ${REGISTRY}/${IMAGE_NAME}:latest
139
+ '''
140
+ }
141
+ }
142
+ }
143
+
144
+ stage('Test') {
145
+ steps {
146
+ script {
147
+ sh '''
148
+ docker run --rm ${REGISTRY}/${IMAGE_NAME}:${IMAGE_TAG} \
149
+ go test -v -race -coverprofile=coverage.out ./...
150
+ '''
151
+ }
152
+ }
153
+ }
154
+
155
+ stage('Security Scan') {
156
+ steps {
157
+ script {
158
+ sh '''
159
+ trivy image --exit-code 0 --severity HIGH,CRITICAL \
160
+ ${REGISTRY}/${IMAGE_NAME}:${IMAGE_TAG}
161
+ '''
162
+ }
163
+ }
164
+ }
165
+
166
+ stage('Push Image') {
167
+ when {
168
+ branch 'main'
169
+ }
170
+ steps {
171
+ script {
172
+ sh '''
173
+ echo $DOCKER_CREDENTIALS_PSW | docker login -u $DOCKER_CREDENTIALS_USR --password-stdin
174
+ docker push ${REGISTRY}/${IMAGE_NAME}:${IMAGE_TAG}
175
+ docker push ${REGISTRY}/${IMAGE_NAME}:latest
176
+ '''
177
+ }
178
+ }
179
+ }
180
+
181
+ stage('Deploy to Staging') {
182
+ when {
183
+ branch 'develop'
184
+ }
185
+ steps {
186
+ script {
187
+ sh '''
188
+ kubectl set image deployment/myapp \
189
+ myapp=${REGISTRY}/${IMAGE_NAME}:${IMAGE_TAG} \
190
+ -n staging --record
191
+ kubectl rollout status deployment/myapp -n staging
192
+ '''
193
+ }
194
+ }
195
+ }
196
+
197
+ stage('Deploy to Production') {
198
+ when {
199
+ branch 'main'
200
+ }
201
+ input {
202
+ message "Deploy to production?"
203
+ ok "Deploy"
204
+ }
205
+ steps {
206
+ script {
207
+ sh '''
208
+ kubectl set image deployment/myapp \
209
+ myapp=${REGISTRY}/${IMAGE_NAME}:${IMAGE_TAG} \
210
+ -n production --record
211
+ kubectl rollout status deployment/myapp -n production
212
+ '''
213
+ }
214
+ }
215
+ }
216
+
217
+ stage('Smoke Tests') {
218
+ when {
219
+ branch 'main'
220
+ }
221
+ steps {
222
+ script {
223
+ sh '''
224
+ ./scripts/smoke-tests.sh https://example.com
225
+ '''
226
+ }
227
+ }
228
+ }
229
+ }
230
+
231
+ post {
232
+ always {
233
+ cleanWs()
234
+ }
235
+
236
+ failure {
237
+ script {
238
+ sh '''
239
+ curl -X POST -H 'Content-type: application/json' \
240
+ --data '{"text":"Build ${BUILD_NUMBER} failed"}' \
241
+ $SLACK_WEBHOOK_URL
242
+ '''
243
+ }
244
+ }
245
+
246
+ success {
247
+ script {
248
+ sh '''
249
+ curl -X POST -H 'Content-type: application/json' \
250
+ --data '{"text":"Build ${BUILD_NUMBER} succeeded"}' \
251
+ $SLACK_WEBHOOK_URL
252
+ '''
253
+ }
254
+ }
255
+ }
256
+ }
257
+ ```
258
+
259
+ ---
260
+
261
+ ## Canary Deployment Example
262
+
263
+ ```yaml
264
+ # .github/workflows/canary-deploy.yml
265
+ name: Canary Deployment
266
+
267
+ on:
268
+ workflow_dispatch:
269
+ inputs:
270
+ percentage:
271
+ description: 'Traffic percentage for canary'
272
+ required: true
273
+ default: '5'
274
+
275
+ jobs:
276
+ deploy-canary:
277
+ runs-on: ubuntu-latest
278
+ steps:
279
+ - uses: actions/checkout@v4
280
+
281
+ - name: Configure kubectl
282
+ run: |
283
+ mkdir -p $HOME/.kube
284
+ echo "${{ secrets.KUBE_CONFIG }}" | base64 -d > $HOME/.kube/config
285
+
286
+ - name: Deploy canary version
287
+ run: |
288
+ kubectl set image deployment/myapp-canary \
289
+ myapp=${{ env.IMAGE_NAME }}:${{ github.sha }} \
290
+ -n production
291
+
292
+ - name: Configure traffic split
293
+ run: |
294
+ cat <<EOF | kubectl apply -f -
295
+ apiVersion: networking.istio.io/v1beta1
296
+ kind: VirtualService
297
+ metadata:
298
+ name: myapp
299
+ namespace: production
300
+ spec:
301
+ hosts:
302
+ - myapp
303
+ http:
304
+ - match:
305
+ - uri:
306
+ prefix: /
307
+ route:
308
+ - destination:
309
+ host: myapp
310
+ subset: stable
311
+ weight: $((100 - ${{ github.event.inputs.percentage }}))
312
+ - destination:
313
+ host: myapp
314
+ subset: canary
315
+ weight: ${{ github.event.inputs.percentage }}
316
+ EOF
317
+
318
+ - name: Monitor canary metrics
319
+ run: |
320
+ ./scripts/monitor-canary.sh "${{ github.event.inputs.percentage }}"
321
+
322
+ - name: Automatic rollback on failure
323
+ if: failure()
324
+ run: |
325
+ # Reset traffic to 100% stable
326
+ kubectl patch vs myapp -n production --patch '{"spec":{"http":[{"route":[{"destination":{"host":"myapp","subset":"stable"},"weight":100}]}]}}'
327
+ # Revert canary deployment
328
+ kubectl rollout undo deployment/myapp-canary -n production
329
+ ```
330
+
331
+ ---
332
+
333
+ ## Multi-Environment Deployment Example
334
+
335
+ ```yaml
336
+ # .github/workflows/multi-env-deploy.yml
337
+ name: Multi-Environment Deploy
338
+
339
+ on:
340
+ push:
341
+ branches:
342
+ - main
343
+ - develop
344
+ - 'release/**'
345
+
346
+ env:
347
+ REGISTRY: ghcr.io
348
+ IMAGE_NAME: ${{ github.repository }}
349
+
350
+ jobs:
351
+ build-and-test:
352
+ runs-on: ubuntu-latest
353
+ outputs:
354
+ image-tag: ${{ steps.meta.outputs.tags }}
355
+ steps:
356
+ - uses: actions/checkout@v4
357
+
358
+ - name: Build and test
359
+ run: |
360
+ docker build -t test-image .
361
+ docker run --rm test-image go test -v ./...
362
+
363
+ - name: Build production image
364
+ run: |
365
+ docker build -t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }} .
366
+ docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
367
+
368
+ deploy-dev:
369
+ runs-on: ubuntu-latest
370
+ needs: build-and-test
371
+ if: github.ref == 'refs/heads/develop'
372
+ environment: development
373
+ steps:
374
+ - uses: actions/checkout@v4
375
+ - name: Deploy to development
376
+ run: |
377
+ kubectl set image deployment/myapp \
378
+ myapp=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }} \
379
+ -n dev
380
+
381
+ deploy-staging:
382
+ runs-on: ubuntu-latest
383
+ needs: build-and-test
384
+ if: startsWith(github.ref, 'refs/heads/release/')
385
+ environment: staging
386
+ steps:
387
+ - uses: actions/checkout@v4
388
+ - name: Deploy to staging
389
+ run: |
390
+ kubectl set image deployment/myapp \
391
+ myapp=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }} \
392
+ -n staging
393
+
394
+ deploy-production:
395
+ runs-on: ubuntu-latest
396
+ needs: build-and-test
397
+ if: github.ref == 'refs/heads/main'
398
+ environment:
399
+ name: production
400
+ url: https://example.com
401
+ steps:
402
+ - uses: actions/checkout@v4
403
+ - name: Deploy to production
404
+ run: |
405
+ kubectl set image deployment/myapp \
406
+ myapp=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }} \
407
+ -n production
408
+ - name: Run smoke tests
409
+ run: ./scripts/smoke-tests.sh https://example.com
410
+ ```
411
+
412
+ ---
413
+
414
+ ## Notes on Examples
415
+
416
+ These examples demonstrate:
417
+
418
+ 1. **Multi-stage pipelines** with proper stage ordering
419
+ 2. **Security scanning** integrated into pipeline
420
+ 3. **Artifact versioning** with commit SHA
421
+ 4. **Environment-specific deployments** (dev, staging, prod)
422
+ 5. **Approval gates** for sensitive environments
423
+ 6. **Health check validation** after deployment
424
+ 7. **Monitoring and alerting** post-deployment
425
+ 8. **Rollback capability** for failed deployments
426
+ 9. **Notification** to team on success/failure
427
+ 10. **Log retention** for troubleshooting
428
+
429
+ Use these as templates and adapt them to your specific requirements and platform.