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.
- package/README.md +146 -0
- package/agents/README.md +168 -0
- package/agents/SKILL.md +633 -0
- package/agents/architect/AGENT.md +44 -0
- package/agents/architect/README.md +5 -0
- package/agents/coder/AGENT.md +43 -0
- package/agents/coder/README.md +5 -0
- package/agents/debugger/AGENT.md +42 -0
- package/agents/debugger/README.md +6 -0
- package/agents/devops/AGENT.md +43 -0
- package/agents/devops/README.md +5 -0
- package/agents/documentation/AGENT.md +45 -0
- package/agents/documentation/README.md +5 -0
- package/agents/examples.md +550 -0
- package/agents/performance/AGENT.md +45 -0
- package/agents/performance/README.md +6 -0
- package/agents/planner/AGENT.md +44 -0
- package/agents/planner/README.md +6 -0
- package/agents/product-owner/AGENT.md +46 -0
- package/agents/product-owner/README.md +6 -0
- package/agents/refactorer/AGENT.md +44 -0
- package/agents/refactorer/README.md +6 -0
- package/agents/release-manager/AGENT.md +45 -0
- package/agents/release-manager/README.md +6 -0
- package/agents/researcher/AGENT.md +44 -0
- package/agents/researcher/README.md +6 -0
- package/agents/reviewer/AGENT.md +43 -0
- package/agents/reviewer/README.md +6 -0
- package/agents/security/AGENT.md +46 -0
- package/agents/security/README.md +6 -0
- package/agents/support/AGENT.md +45 -0
- package/agents/support/README.md +6 -0
- package/agents/tester/AGENT.md +46 -0
- package/agents/tester/README.md +5 -0
- package/bin/cli.js +186 -0
- package/commands/README.md +266 -0
- package/commands/build.md +135 -0
- package/commands/clean.md +126 -0
- package/commands/deploy-prod.md +171 -0
- package/commands/deploy-staging.md +147 -0
- package/commands/deps.md +169 -0
- package/commands/dev.md +132 -0
- package/commands/format.md +142 -0
- package/commands/lint.md +125 -0
- package/commands/migrate.md +159 -0
- package/commands/release.md +183 -0
- package/commands/rollback.md +152 -0
- package/commands/seed.md +178 -0
- package/commands/setup.md +109 -0
- package/commands/test.md +134 -0
- package/commands/validate.md +147 -0
- package/context/README.md +7 -0
- package/context/aem.md +47 -0
- package/context/architecture.md +51 -0
- package/context/bullminder.md +57 -0
- package/context/coding-style.md +42 -0
- package/context/communication.md +53 -0
- package/context/company.md +46 -0
- package/context/engineering.md +63 -0
- package/context/project-template.md +71 -0
- package/context/trading.md +52 -0
- package/hooks/README.md +326 -0
- package/hooks/code-review/README.md +6 -0
- package/hooks/code-review/check-coverage.md +101 -0
- package/hooks/custom/README.md +6 -0
- package/hooks/custom/project-specific-hooks.md +273 -0
- package/hooks/deployment/README.md +6 -0
- package/hooks/deployment/health-check.md +102 -0
- package/hooks/deployment/pre-deploy-check.md +84 -0
- package/hooks/documentation/README.md +6 -0
- package/hooks/documentation/update-changelog.md +146 -0
- package/hooks/post-task/README.md +5 -0
- package/hooks/post-task/run-tests.md +61 -0
- package/hooks/pre-commit/README.md +6 -0
- package/hooks/pre-commit/format.md +63 -0
- package/hooks/pre-commit/lint.md +62 -0
- package/hooks/pre-commit/type-check.md +78 -0
- package/hooks/pre-task/README.md +6 -0
- package/hooks/pre-task/check-branch.md +48 -0
- package/hooks/pre-task/validate-environment.md +48 -0
- package/hooks/security-check/README.md +6 -0
- package/hooks/security-check/dependency-audit.md +85 -0
- package/hooks/security-check/secrets-scan.md +77 -0
- package/hooks/test-before-finish/README.md +6 -0
- package/hooks/test-before-finish/run-all-tests.md +128 -0
- package/index.js +69 -0
- package/knowledge/README.md +33 -0
- package/knowledge/ai-agents.md +74 -0
- package/knowledge/decision-making.md +73 -0
- package/knowledge/documentation.md +67 -0
- package/knowledge/engineering-principles.md +65 -0
- package/knowledge/product-discovery.md +68 -0
- package/knowledge/security-privacy.md +54 -0
- package/knowledge/testing-quality.md +63 -0
- package/package.json +63 -0
- package/patterns/README.md +7 -0
- package/prompts/README.md +208 -0
- package/prompts/architect/README.md +96 -0
- package/prompts/architect/design-system.md +140 -0
- package/prompts/debugger/README.md +96 -0
- package/prompts/debugger/diagnose-issue.md +141 -0
- package/prompts/developer/README.md +129 -0
- package/prompts/developer/fix-bug.md +136 -0
- package/prompts/developer/implement-feature.md +133 -0
- package/prompts/product-owner/README.md +116 -0
- package/prompts/product-owner/define-feature.md +145 -0
- package/prompts/reviewer/README.md +91 -0
- package/prompts/reviewer/code-review.md +129 -0
- package/prompts/support/README.md +154 -0
- package/prompts/support/resolve-issue.md +124 -0
- package/roles/README.md +6 -0
- package/roles/design-architect/README.md +98 -0
- package/roles/design-architect/accessibility/README.md +33 -0
- package/roles/design-architect/accessibility/checklists.md +29 -0
- package/roles/design-architect/accessibility/examples.md +35 -0
- package/roles/design-architect/checklists.md +76 -0
- package/roles/design-architect/component-library/README.md +35 -0
- package/roles/design-architect/component-library/checklists.md +29 -0
- package/roles/design-architect/component-library/examples.md +35 -0
- package/roles/design-architect/design-system/README.md +35 -0
- package/roles/design-architect/design-system/checklists.md +27 -0
- package/roles/design-architect/design-system/examples.md +41 -0
- package/roles/design-architect/examples/README.md +31 -0
- package/roles/design-architect/examples/checklists.md +26 -0
- package/roles/design-architect/examples/examples.md +46 -0
- package/roles/design-architect/examples.md +90 -0
- package/roles/design-architect/figma/README.md +33 -0
- package/roles/design-architect/figma/checklists.md +27 -0
- package/roles/design-architect/figma/examples.md +38 -0
- package/roles/design-architect/responsibilities.md +73 -0
- package/roles/design-architect/responsive/README.md +34 -0
- package/roles/design-architect/responsive/checklists.md +26 -0
- package/roles/design-architect/responsive/examples.md +39 -0
- package/roles/design-architect/role.md +129 -0
- package/roles/design-architect/skill-map.md +42 -0
- package/roles/design-architect/triggers.md +110 -0
- package/roles/design-architect/ui/README.md +36 -0
- package/roles/design-architect/ui/checklists.md +29 -0
- package/roles/design-architect/ui/examples.md +28 -0
- package/roles/design-architect/usability/README.md +34 -0
- package/roles/design-architect/usability/checklists.md +28 -0
- package/roles/design-architect/usability/examples.md +31 -0
- package/roles/design-architect/ux/README.md +36 -0
- package/roles/design-architect/ux/checklists.md +28 -0
- package/roles/design-architect/ux/examples.md +37 -0
- package/roles/design-architect/wireframes/README.md +34 -0
- package/roles/design-architect/wireframes/checklists.md +25 -0
- package/roles/design-architect/wireframes/examples.md +32 -0
- package/roles/design-architect/workflow.md +80 -0
- package/roles/devops/README.md +101 -0
- package/roles/devops/ansible/README.md +6 -0
- package/roles/devops/checklists.md +413 -0
- package/roles/devops/ci-cd/README.md +169 -0
- package/roles/devops/ci-cd/checklists.md +289 -0
- package/roles/devops/ci-cd/examples.md +429 -0
- package/roles/devops/cloud-platforms/README.md +109 -0
- package/roles/devops/cost-optimization/README.md +131 -0
- package/roles/devops/disaster-recovery/README.md +118 -0
- package/roles/devops/docker/README.md +6 -0
- package/roles/devops/examples/README.md +6 -0
- package/roles/devops/examples.md +775 -0
- package/roles/devops/github-actions/README.md +6 -0
- package/roles/devops/helm/README.md +6 -0
- package/roles/devops/infrastructure-as-code/README.md +160 -0
- package/roles/devops/infrastructure-as-code/checklists.md +124 -0
- package/roles/devops/jenkins/README.md +6 -0
- package/roles/devops/kubernetes/README.md +150 -0
- package/roles/devops/kubernetes/checklists.md +192 -0
- package/roles/devops/kubernetes/examples.md +189 -0
- package/roles/devops/monitoring/README.md +93 -0
- package/roles/devops/networking/README.md +83 -0
- package/roles/devops/performance/README.md +104 -0
- package/roles/devops/responsibilities.md +95 -0
- package/roles/devops/role.md +130 -0
- package/roles/devops/security/README.md +126 -0
- package/roles/devops/skill-map.md +162 -0
- package/roles/devops/terraform/README.md +6 -0
- package/roles/devops/triggers.md +241 -0
- package/roles/devops/workflow.md +197 -0
- package/roles/qa/README.md +16 -0
- package/roles/qa/api-testing/README.md +6 -0
- package/roles/qa/automation/README.md +6 -0
- package/roles/qa/checklists.md +24 -0
- package/roles/qa/examples/README.md +6 -0
- package/roles/qa/examples.md +27 -0
- package/roles/qa/performance/README.md +6 -0
- package/roles/qa/playwright/README.md +6 -0
- package/roles/qa/responsibilities.md +16 -0
- package/roles/qa/role.md +47 -0
- package/roles/qa/selenium/README.md +6 -0
- package/roles/qa/skill-map.md +14 -0
- package/roles/qa/triggers.md +10 -0
- package/roles/qa/workflow.md +9 -0
- package/roles/software-architect/README.md +16 -0
- package/roles/software-architect/agents/README.md +6 -0
- package/roles/software-architect/ai-architecture/README.md +6 -0
- package/roles/software-architect/aws/README.md +6 -0
- package/roles/software-architect/azure/README.md +6 -0
- package/roles/software-architect/caching/README.md +6 -0
- package/roles/software-architect/checklists.md +25 -0
- package/roles/software-architect/cloud/README.md +6 -0
- package/roles/software-architect/database-design/README.md +6 -0
- package/roles/software-architect/diagrams/README.md +6 -0
- package/roles/software-architect/distributed-systems/README.md +7 -0
- package/roles/software-architect/docker/README.md +6 -0
- package/roles/software-architect/event-driven/README.md +7 -0
- package/roles/software-architect/examples/README.md +6 -0
- package/roles/software-architect/examples.md +22 -0
- package/roles/software-architect/gcp/README.md +6 -0
- package/roles/software-architect/kubernetes/README.md +6 -0
- package/roles/software-architect/messaging/README.md +6 -0
- package/roles/software-architect/rag/README.md +7 -0
- package/roles/software-architect/responsibilities.md +17 -0
- package/roles/software-architect/role.md +46 -0
- package/roles/software-architect/scalability/README.md +6 -0
- package/roles/software-architect/security/README.md +6 -0
- package/roles/software-architect/skill-map.md +15 -0
- package/roles/software-architect/system-design/README.md +6 -0
- package/roles/software-architect/triggers.md +10 -0
- package/roles/software-architect/vector-db/README.md +6 -0
- package/roles/software-architect/workflow.md +9 -0
- package/roles/software-developer/README.md +116 -0
- package/roles/software-developer/api/README.md +365 -0
- package/roles/software-developer/api/checklist.md +131 -0
- package/roles/software-developer/api/examples.md +459 -0
- package/roles/software-developer/authentication/README.md +26 -0
- package/roles/software-developer/authentication/checklists.md +22 -0
- package/roles/software-developer/authentication/examples.md +32 -0
- package/roles/software-developer/authorization/README.md +26 -0
- package/roles/software-developer/authorization/checklists.md +21 -0
- package/roles/software-developer/authorization/examples.md +27 -0
- package/roles/software-developer/backend/README.md +26 -0
- package/roles/software-developer/backend/checklists.md +21 -0
- package/roles/software-developer/backend/examples.md +21 -0
- package/roles/software-developer/cache/README.md +25 -0
- package/roles/software-developer/cache/checklists.md +21 -0
- package/roles/software-developer/cache/examples.md +22 -0
- package/roles/software-developer/checklists.md +122 -0
- package/roles/software-developer/code-review/README.md +23 -0
- package/roles/software-developer/code-review/checklists.md +22 -0
- package/roles/software-developer/code-review/examples.md +20 -0
- package/roles/software-developer/database/README.md +27 -0
- package/roles/software-developer/database/checklists.md +21 -0
- package/roles/software-developer/database/examples.md +27 -0
- package/roles/software-developer/debugging/README.md +24 -0
- package/roles/software-developer/debugging/checklists.md +20 -0
- package/roles/software-developer/debugging/examples.md +28 -0
- package/roles/software-developer/examples/README.md +22 -0
- package/roles/software-developer/examples/checklists.md +8 -0
- package/roles/software-developer/examples/examples.md +25 -0
- package/roles/software-developer/examples.md +378 -0
- package/roles/software-developer/frontend/README.md +76 -0
- package/roles/software-developer/frontend/accessibility/README.md +136 -0
- package/roles/software-developer/frontend/accessibility/best-practices.md +368 -0
- package/roles/software-developer/frontend/code-quality/README.md +136 -0
- package/roles/software-developer/frontend/code-quality/best-practices.md +309 -0
- package/roles/software-developer/frontend/components/README.md +65 -0
- package/roles/software-developer/frontend/components/best-practices.md +273 -0
- package/roles/software-developer/frontend/debugging/README.md +149 -0
- package/roles/software-developer/frontend/debugging/best-practices.md +329 -0
- package/roles/software-developer/frontend/examples/README.md +19 -0
- package/roles/software-developer/frontend/examples/checklists.md +8 -0
- package/roles/software-developer/frontend/examples/examples.md +17 -0
- package/roles/software-developer/frontend/logging-observability/README.md +196 -0
- package/roles/software-developer/frontend/logging-observability/best-practices.md +430 -0
- package/roles/software-developer/frontend/performance/README.md +99 -0
- package/roles/software-developer/frontend/performance/best-practices.md +350 -0
- package/roles/software-developer/frontend/state-management/README.md +85 -0
- package/roles/software-developer/frontend/state-management/best-practices.md +344 -0
- package/roles/software-developer/frontend/testing/README.md +114 -0
- package/roles/software-developer/frontend/testing/best-practices.md +272 -0
- package/roles/software-developer/fullstack/README.md +25 -0
- package/roles/software-developer/fullstack/checklists.md +19 -0
- package/roles/software-developer/fullstack/examples.md +14 -0
- package/roles/software-developer/graphql/README.md +24 -0
- package/roles/software-developer/graphql/checklists.md +20 -0
- package/roles/software-developer/graphql/examples.md +24 -0
- package/roles/software-developer/integration-tests/README.md +25 -0
- package/roles/software-developer/integration-tests/checklists.md +20 -0
- package/roles/software-developer/integration-tests/examples.md +18 -0
- package/roles/software-developer/java/README.md +24 -0
- package/roles/software-developer/java/checklists.md +16 -0
- package/roles/software-developer/java/examples.md +22 -0
- package/roles/software-developer/javascript/README.md +24 -0
- package/roles/software-developer/javascript/checklists.md +15 -0
- package/roles/software-developer/javascript/examples.md +18 -0
- package/roles/software-developer/logging/README.md +105 -0
- package/roles/software-developer/logging/checklists.md +48 -0
- package/roles/software-developer/logging/examples.md +135 -0
- package/roles/software-developer/messaging/README.md +24 -0
- package/roles/software-developer/messaging/checklists.md +21 -0
- package/roles/software-developer/messaging/examples.md +26 -0
- package/roles/software-developer/microservices/README.md +25 -0
- package/roles/software-developer/microservices/checklists.md +21 -0
- package/roles/software-developer/microservices/examples.md +21 -0
- package/roles/software-developer/node/README.md +25 -0
- package/roles/software-developer/node/checklists.md +15 -0
- package/roles/software-developer/node/examples.md +15 -0
- package/roles/software-developer/nosql/README.md +24 -0
- package/roles/software-developer/nosql/checklists.md +21 -0
- package/roles/software-developer/nosql/examples.md +20 -0
- package/roles/software-developer/observability/README.md +25 -0
- package/roles/software-developer/observability/checklists.md +21 -0
- package/roles/software-developer/observability/examples.md +22 -0
- package/roles/software-developer/performance/README.md +26 -0
- package/roles/software-developer/performance/checklists.md +20 -0
- package/roles/software-developer/performance/examples.md +20 -0
- package/roles/software-developer/python/README.md +25 -0
- package/roles/software-developer/python/checklists.md +15 -0
- package/roles/software-developer/python/examples.md +17 -0
- package/roles/software-developer/react/README.md +24 -0
- package/roles/software-developer/react/checklists.md +15 -0
- package/roles/software-developer/react/examples.md +22 -0
- package/roles/software-developer/refactoring/README.md +23 -0
- package/roles/software-developer/refactoring/checklists.md +21 -0
- package/roles/software-developer/refactoring/examples.md +11 -0
- package/roles/software-developer/responsibilities.md +58 -0
- package/roles/software-developer/role.md +127 -0
- package/roles/software-developer/skill-map.md +88 -0
- package/roles/software-developer/springboot/README.md +25 -0
- package/roles/software-developer/springboot/checklists.md +15 -0
- package/roles/software-developer/springboot/examples.md +21 -0
- package/roles/software-developer/sql/README.md +24 -0
- package/roles/software-developer/sql/checklists.md +22 -0
- package/roles/software-developer/sql/examples.md +20 -0
- package/roles/software-developer/testing/README.md +25 -0
- package/roles/software-developer/testing/checklists.md +21 -0
- package/roles/software-developer/testing/examples.md +19 -0
- package/roles/software-developer/triggers.md +550 -0
- package/roles/software-developer/typescript/README.md +25 -0
- package/roles/software-developer/typescript/checklists.md +15 -0
- package/roles/software-developer/typescript/examples.md +18 -0
- package/roles/software-developer/unit-tests/README.md +24 -0
- package/roles/software-developer/unit-tests/checklists.md +19 -0
- package/roles/software-developer/unit-tests/examples.md +22 -0
- package/roles/software-developer/workflow.md +196 -0
- package/roles/sre/README.md +16 -0
- package/roles/sre/alerts/README.md +6 -0
- package/roles/sre/availability/README.md +6 -0
- package/roles/sre/chaos/README.md +6 -0
- package/roles/sre/checklists.md +24 -0
- package/roles/sre/examples/README.md +6 -0
- package/roles/sre/examples.md +19 -0
- package/roles/sre/observability/README.md +6 -0
- package/roles/sre/reliability/README.md +6 -0
- package/roles/sre/responsibilities.md +16 -0
- package/roles/sre/role.md +46 -0
- package/roles/sre/skill-map.md +14 -0
- package/roles/sre/slos/README.md +6 -0
- package/roles/sre/triggers.md +10 -0
- package/roles/sre/workflow.md +9 -0
- package/roles/support-engineer/README.md +16 -0
- package/roles/support-engineer/checklists.md +24 -0
- package/roles/support-engineer/datadog/README.md +6 -0
- package/roles/support-engineer/examples/README.md +6 -0
- package/roles/support-engineer/examples.md +17 -0
- package/roles/support-engineer/incident-response/README.md +6 -0
- package/roles/support-engineer/kubernetes/README.md +6 -0
- package/roles/support-engineer/linux/README.md +6 -0
- package/roles/support-engineer/logs/README.md +6 -0
- package/roles/support-engineer/monitoring/README.md +6 -0
- package/roles/support-engineer/networking/README.md +6 -0
- package/roles/support-engineer/newrelic/README.md +6 -0
- package/roles/support-engineer/postmortem/README.md +6 -0
- package/roles/support-engineer/production/README.md +6 -0
- package/roles/support-engineer/responsibilities.md +16 -0
- package/roles/support-engineer/role.md +47 -0
- package/roles/support-engineer/root-cause-analysis/README.md +6 -0
- package/roles/support-engineer/runbooks/README.md +6 -0
- package/roles/support-engineer/skill-map.md +14 -0
- package/roles/support-engineer/splunk/README.md +6 -0
- package/roles/support-engineer/triggers.md +10 -0
- package/roles/support-engineer/troubleshooting/README.md +6 -0
- package/roles/support-engineer/workflow.md +9 -0
- package/setup.sh +204 -0
- package/skills/.claude/README.md +7 -0
- package/skills/README.md +21 -0
- package/skills/ai-agents/README.md +207 -0
- package/skills/ai-agents/examples.md +335 -0
- package/skills/ai-agents/skill.md +392 -0
- package/skills/architecture/README.md +198 -0
- package/skills/architecture/examples.md +316 -0
- package/skills/architecture/skill.md +189 -0
- package/skills/design-architecture/README.md +107 -0
- package/skills/design-architecture/examples.md +84 -0
- package/skills/design-architecture/skill.md +192 -0
- package/skills/devops/README.md +177 -0
- package/skills/devops/examples.md +376 -0
- package/skills/devops/skill.md +210 -0
- package/skills/documentation/README.md +182 -0
- package/skills/documentation/examples.md +364 -0
- package/skills/documentation/skill.md +200 -0
- package/skills/performance/README.md +177 -0
- package/skills/performance/examples.md +376 -0
- package/skills/performance/skill.md +199 -0
- package/skills/qa/README.md +106 -0
- package/skills/qa/examples.md +84 -0
- package/skills/qa/skill.md +384 -0
- package/skills/security/README.md +108 -0
- package/skills/security/examples.md +85 -0
- package/skills/security/skill.md +223 -0
- package/skills/software-development/README.md +239 -0
- package/skills/software-development/assessment.md +0 -0
- package/skills/software-development/checklists.md +0 -0
- package/skills/software-development/examples.md +375 -0
- package/skills/software-development/prompts.md +0 -0
- package/skills/software-development/skill.md +390 -0
- package/skills/software-development/templates/README.md +7 -0
- package/skills/software-development/templates/api-development.md +0 -0
- package/skills/software-development/templates/bug-fix.md +0 -0
- package/skills/software-development/templates/code-review.md +0 -0
- package/skills/software-development/templates/feature-implementation.md +0 -0
- package/skills/software-development/templates/llm-integration.md +0 -0
- package/skills/software-development/templates/performance-review.md +0 -0
- package/skills/software-development/templates/security-review.md +0 -0
- package/skills/software-development/templates/test-generation.md +0 -0
- package/skills/software-development/tools.md +0 -0
- package/skills/software-development/workflows.md +0 -0
- package/skills/sre/README.md +107 -0
- package/skills/sre/examples.md +379 -0
- package/skills/sre/skill.md +256 -0
- package/skills/support-engineering/README.md +107 -0
- package/skills/support-engineering/examples.md +85 -0
- package/skills/support-engineering/skill.md +103 -0
|
@@ -0,0 +1,379 @@
|
|
|
1
|
+
1. Service‑Level Objective (SLO) definitions
|
|
2
|
+
Service Metric Target (SLO) Error‑Budget Burn Rate (per 30 days)
|
|
3
|
+
Inference API (LLM‑Chat) 99th‑percentile request latency ≤ 250 ms ≤ 10 % of the budget (≈ 3 days)
|
|
4
|
+
Batch‑Training Job Job completion within scheduled window ≤ 6 h wall‑time for a 100 GB dataset ≤ 5 % of the budget (≈ 1.5 days)
|
|
5
|
+
Feature‑Store Service Availability of online store 99.95 % ≤ 0.1 % burn per month (≈ 45 min)
|
|
6
|
+
Model‑Registry API Success rate of GET /models/{name} 100 % (no 5xx) No burn; any 5xx must be fixed instantly
|
|
7
|
+
Example SLO definition (YAML – used by Prometheus‑Operator)
|
|
8
|
+
|
|
9
|
+
apiVersion: monitoring.coreos.com/v1
|
|
10
|
+
kind: ServiceLevelObjectives
|
|
11
|
+
metadata:
|
|
12
|
+
name: inference‑api‑slo
|
|
13
|
+
spec:
|
|
14
|
+
provider: prometheus
|
|
15
|
+
metrics:
|
|
16
|
+
- name: kube_deployment_status_replicas
|
|
17
|
+
value: "1"
|
|
18
|
+
selector:
|
|
19
|
+
match: deployment{app="inference-api"}
|
|
20
|
+
- name: http_request_duration_seconds_bucket
|
|
21
|
+
value: 0.25 # 250 ms bucket
|
|
22
|
+
selector:
|
|
23
|
+
url_path="/v1/chat"
|
|
24
|
+
- name: http_request_total
|
|
25
|
+
value: "1"
|
|
26
|
+
- name: http_request_success
|
|
27
|
+
value: "1"
|
|
28
|
+
- name: model_accuracy
|
|
29
|
+
value: "0.92" # 92 % top‑1 accuracy on validation set
|
|
30
|
+
- name: model_latency
|
|
31
|
+
value: "0.25" # 250 ms
|
|
32
|
+
objectives:
|
|
33
|
+
- metricName: http_request_duration_seconds_bucket
|
|
34
|
+
objectivemin: 1 # 100 % of requests ≤ 250 ms
|
|
35
|
+
tolerance: 0.01 # 1 % allowed breach
|
|
36
|
+
- metricName: model_accuracy
|
|
37
|
+
objectivemin: 0.90
|
|
38
|
+
tolerance: 0.02 # 2 % accuracy drop allowed
|
|
39
|
+
2. Error‑budget burn‑rate dashboard (Grafana panel JSON)
|
|
40
|
+
{
|
|
41
|
+
"type": "stat",
|
|
42
|
+
"title": "Error‑Budget Burn Rate (30 days)",
|
|
43
|
+
"datasource": "Prometheus",
|
|
44
|
+
"targets": [
|
|
45
|
+
{
|
|
46
|
+
"expr": "sum(rate(http_request_error_total[1h])) / ignoring(re) sum(rate(http_request_total[1h])) * 100",
|
|
47
|
+
"legendFormat": "Error Rate %"
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
"options": {
|
|
51
|
+
"colorMode": "background",
|
|
52
|
+
"reduceOptions": {
|
|
53
|
+
"values": false,
|
|
54
|
+
"calcs": ["Last"]
|
|
55
|
+
},
|
|
56
|
+
"textMode": "value",
|
|
57
|
+
"colorRange": [
|
|
58
|
+
{ "from": 0, "to": 5, "mode": "thresholds", "value": 5 },
|
|
59
|
+
{ "from": 5, "to": 15, "mode": "thresholds", "value": 10 },
|
|
60
|
+
{ "from": 15, "to": 100, "mode": "thresholds", "value": 20 }
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
"fieldConfig": {
|
|
64
|
+
"defaults": {
|
|
65
|
+
"thresholds": {
|
|
66
|
+
"mode": "absolute",
|
|
67
|
+
"steps": [
|
|
68
|
+
{ "color": "green", "value": null },
|
|
69
|
+
{ "color": "orange", "value": 5 },
|
|
70
|
+
{ "color": "red", "value": 15 }
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
Interpretation: The panel shows the percentage of error‑budget consumed over the selected time window. When the gauge turns orange → 5 % burn, red → > 15 % burn, prompting a remediation ticket.
|
|
77
|
+
|
|
78
|
+
3. Canary deployment with Istio (Kubernetes YAML)
|
|
79
|
+
apiVersion: networking.istio.io/v1beta1
|
|
80
|
+
kind: VirtualService
|
|
81
|
+
metadata:
|
|
82
|
+
name: inference-api-vs
|
|
83
|
+
spec:
|
|
84
|
+
hosts:
|
|
85
|
+
- inference-api.default.svc.cluster.local
|
|
86
|
+
http:
|
|
87
|
+
- route:
|
|
88
|
+
- destination:
|
|
89
|
+
host: inference-api
|
|
90
|
+
subset: v2 # new version
|
|
91
|
+
weight: 5 # 5 % traffic
|
|
92
|
+
- destination:
|
|
93
|
+
host: inference-api
|
|
94
|
+
subset: v1 # current version
|
|
95
|
+
weight: 95
|
|
96
|
+
mirrors:
|
|
97
|
+
- route:
|
|
98
|
+
- destination:
|
|
99
|
+
host: inference-api
|
|
100
|
+
subset: v1
|
|
101
|
+
weight: 5
|
|
102
|
+
What it does: Sends 5 % of real‑world traffic to the new model version while a full replica of the old version handles the rest. If the latency or error‑budget violation exceeds the configured threshold, the traffic weight can be automatically reduced to 0 via an Istio DestinationRule rollback rule.
|
|
103
|
+
|
|
104
|
+
4. Model‑drift detection Prometheus rule
|
|
105
|
+
groups:
|
|
106
|
+
- name: model‑drift
|
|
107
|
+
rules:
|
|
108
|
+
- alert: DataDriftSpike
|
|
109
|
+
expr: |
|
|
110
|
+
(sum_over_time(feature_missing_total[5m]) / ignoring(__name__) sum_over_time(feature_total[5m])) > 0.3
|
|
111
|
+
for: 5m
|
|
112
|
+
labels:
|
|
113
|
+
severity: warning
|
|
114
|
+
system: feature-store
|
|
115
|
+
annotations:
|
|
116
|
+
summary: "Feature {{ $labels.feature }} missingness increased >30 % in 5 min"
|
|
117
|
+
description: |
|
|
118
|
+
The proportion of missing values for feature {{ $labels.feature }} crossed the 30 % threshold.
|
|
119
|
+
Consider pausing model inference or switching to a fallback.
|
|
120
|
+
|
|
121
|
+
- alert: ConceptDriftScore
|
|
122
|
+
expr: |
|
|
123
|
+
drift_score{model="sentiment‑v2"} > 0.45
|
|
124
|
+
for: 10m
|
|
125
|
+
labels:
|
|
126
|
+
severity: critical
|
|
127
|
+
model: sentiment‑v2
|
|
128
|
+
annotations:
|
|
129
|
+
summary: "Concept‑drift score > 0.45 for sentiment‑v2"
|
|
130
|
+
description: |
|
|
131
|
+
The model’s concept‑drift detector reports a high drift score.
|
|
132
|
+
Investigate recent input distributions or schedule a retraining job.
|
|
133
|
+
Explanation: Two alerts fire when missing‑feature ratios or concept‑drift scores exceed safe thresholds, directly tying the health of the model to a Prometheus metric that can be scraped from a drift‑detection library (e.g., Alibi Detect).
|
|
134
|
+
|
|
135
|
+
5. Model‑registry CI/CD step (GitHub Actions)
|
|
136
|
+
name: Deploy‑Model‑Canary
|
|
137
|
+
on:
|
|
138
|
+
push:
|
|
139
|
+
branches: [ main ]
|
|
140
|
+
paths:
|
|
141
|
+
- 'models/sentiment/*.py'
|
|
142
|
+
- 'models/sentiment/requirements.txt'
|
|
143
|
+
|
|
144
|
+
jobs:
|
|
145
|
+
build-and-deploy:
|
|
146
|
+
runs-on: ubuntu-latest
|
|
147
|
+
permissions:
|
|
148
|
+
contents: read
|
|
149
|
+
id-token: write # for OIDC to GCP
|
|
150
|
+
steps:
|
|
151
|
+
- name: Checkout code
|
|
152
|
+
uses: actions/checkout@v4
|
|
153
|
+
|
|
154
|
+
- name: Set up Python
|
|
155
|
+
uses: actions/setup-python@v5
|
|
156
|
+
with:
|
|
157
|
+
python-version: '3.11'
|
|
158
|
+
|
|
159
|
+
- name: Install dependencies
|
|
160
|
+
run: |
|
|
161
|
+
python -m pip install --upgrade pip
|
|
162
|
+
pip install -r models/sentiment/requirements.txt
|
|
163
|
+
|
|
164
|
+
- name: Train & Export Model
|
|
165
|
+
run: |
|
|
166
|
+
python train.py --config configs/sentiment_v2.yaml
|
|
167
|
+
python export.py --model-output gs://my-bucket/models/sentiment/v2.tar.gz
|
|
168
|
+
|
|
169
|
+
- name: Authenticate to GKE
|
|
170
|
+
uses: google-github-actions/auth@v2
|
|
171
|
+
with:
|
|
172
|
+
token_format: access_token
|
|
173
|
+
workload_identity_provider: projects/1234567890/locations/global/workloadIdentityPools/model-ci-pool/providers/model-ci-provider
|
|
174
|
+
service_account: model-ci-sa@my-project.iam.gserviceaccount.com
|
|
175
|
+
|
|
176
|
+
- name: Deploy Canary to Kubernetes
|
|
177
|
+
env:
|
|
178
|
+
NEW_VERSION: v2
|
|
179
|
+
run: |
|
|
180
|
+
envsubst <<EOF > k8s/canary-${NEW_VERSION}.yaml
|
|
181
|
+
apiVersion: apps/v1
|
|
182
|
+
kind: Deployment
|
|
183
|
+
metadata:
|
|
184
|
+
name: sentiment-inference-${NEW_VERSION}
|
|
185
|
+
labels:
|
|
186
|
+
app: sentiment
|
|
187
|
+
version: ${NEW_VERSION}
|
|
188
|
+
spec:
|
|
189
|
+
replicas: 2
|
|
190
|
+
selector:
|
|
191
|
+
matchLabels:
|
|
192
|
+
app: sentiment
|
|
193
|
+
version: ${NEW_VERSION}
|
|
194
|
+
template:
|
|
195
|
+
metadata:
|
|
196
|
+
labels:
|
|
197
|
+
app: sentiment
|
|
198
|
+
version: ${NEW_VERSION}
|
|
199
|
+
spec:
|
|
200
|
+
serviceAccountName: model-serving-sa
|
|
201
|
+
containers:
|
|
202
|
+
- name: server
|
|
203
|
+
image: gcr.io/my-project/sentiment:${NEW_VERSION}
|
|
204
|
+
resources:
|
|
205
|
+
limits:
|
|
206
|
+
cpu: "2"
|
|
207
|
+
memory: "4Gi"
|
|
208
|
+
nvidia.com/gpu: "1"
|
|
209
|
+
env:
|
|
210
|
+
- name: MODEL_PATH
|
|
211
|
+
value: "/models/sentiment_v2"
|
|
212
|
+
- name: PORT
|
|
213
|
+
value: "8080"
|
|
214
|
+
command: ["python", "-m", "fastapi", "run", "--host", "0.0.0.0", "--port", "8080"]
|
|
215
|
+
EOF
|
|
216
|
+
|
|
217
|
+
kubectl apply -f k8s/canary-${NEW_VERSION}.yaml
|
|
218
|
+
kubectl annotate deployment sentiment-inference-${NEW_VERSION} \
|
|
219
|
+
traffic=5% --overwrite
|
|
220
|
+
What it does: Triggers on a push to main that changes the sentiment model, builds, trains, exports the artifact to GCS, then creates a canary Deployment with a 5 % traffic weight via Istio (handled by an external step not shown). If the canary’s error‑budget burn exceeds the configured limit, a rollback webhook can automatically set the weight back to 0.
|
|
221
|
+
|
|
222
|
+
6. Retraining trigger based on drift + budget consumption
|
|
223
|
+
# Trigger when drift_score > 0.4 OR remaining_error_budget < 0.1
|
|
224
|
+
schedule:
|
|
225
|
+
cron: "0 */6 * * *" # every 6 h
|
|
226
|
+
jobs:
|
|
227
|
+
evaluate_drift_and_budget:
|
|
228
|
+
runs-on: ubuntu-latest
|
|
229
|
+
steps:
|
|
230
|
+
- name: Pull latest data & compute drift_score
|
|
231
|
+
run: |
|
|
232
|
+
python scripts/compute_drift.py --model-version v3 --output drift.json
|
|
233
|
+
echo "drift_score=$(jq .drift_score drift.json)" > env.txt
|
|
234
|
+
echo "budget_remaining=$(kubectl get configmap error-budget -o jsonpath='{.data.remaining}')" >> env.txt
|
|
235
|
+
|
|
236
|
+
- name: Check condition
|
|
237
|
+
id: condition
|
|
238
|
+
run: |
|
|
239
|
+
source env.txt
|
|
240
|
+
if (( $(echo "$drift_score > 0.4" | bc -l) )) || (( $(echo "$budget_remaining < 0.1" | bc -l) )); then
|
|
241
|
+
echo "need_retrain=true" >> $GITHUB_OUTPUT
|
|
242
|
+
else
|
|
243
|
+
echo "need_retrain=false" >> $GITHUB_OUTPUT
|
|
244
|
+
fi
|
|
245
|
+
|
|
246
|
+
- name: Schedule Retraining
|
|
247
|
+
if: steps.condition.outputs.need_retrain == 'true'
|
|
248
|
+
run: |
|
|
249
|
+
curl -X POST https://mlops.mycompany.com/api/v1/retrain \
|
|
250
|
+
-H "Authorization: Bearer $AUTH_TOKEN" \
|
|
251
|
+
-d '{"model":"sentiment","trigger":"drift_or_budget"}'
|
|
252
|
+
Explanation: A scheduled job evaluates both data‑drift and error‑budget metrics. If either condition crosses its limit, the workflow calls a central retraining orchestrator to spin up a new training pipeline, ensuring that model freshness is aligned with operational health.
|
|
253
|
+
|
|
254
|
+
7. Runbook snippet: “Model‑inference latency spikes”
|
|
255
|
+
# Incident: Sudden latency increase on /v1/chat endpoint
|
|
256
|
+
## 1️⃣ Immediate mitigation
|
|
257
|
+
1. Roll back traffic from canary to 0%:
|
|
258
|
+
```bash
|
|
259
|
+
kubectl annotate virtualservice inference-api-vs traffic-
|
|
260
|
+
Warm‑up the next instance (if any) by sending dummy requests:
|
|
261
|
+
for i in {1..30}; do curl -s -o /dev/null -X POST https://api.example.com/v1/chat -d '{"msg":"ping"}'; done
|
|
262
|
+
2️⃣ Diagnostics
|
|
263
|
+
Check GPU utilisation: kubectl top pod -l app=inference-api -c server
|
|
264
|
+
Inspect inference latency histogram: curl http://prometheus:9090/api/v1/query?query=histogram_quantile(0.99, sum(rate(http_request_duration_seconds_bucket[5m])) by (le, service))
|
|
265
|
+
Review recent model version metadata:
|
|
266
|
+
{
|
|
267
|
+
"model_version": "v2.3",
|
|
268
|
+
"gpu_memory_mb": 11264,
|
|
269
|
+
"batch_size": 8,
|
|
270
|
+
"max_seq_length": 512,
|
|
271
|
+
"latency_ms": 285
|
|
272
|
+
}
|
|
273
|
+
3️⃣ Root cause analysis (RCA)
|
|
274
|
+
Observed: Memory allocation failed → OOM → pod restarts → traffic spikes.
|
|
275
|
+
Trigger: A recent change increased max_seq_length from 256 → 1024 without updating gpu_memory_limit in the Deployment spec.
|
|
276
|
+
Impact: 15 % of requests exceeded latency SLO (250 ms) → error‑budget burned ~ 8 % in 30 min.
|
|
277
|
+
4️⃣ Action items
|
|
278
|
+
Update Helm values:
|
|
279
|
+
resources:
|
|
280
|
+
limits:
|
|
281
|
+
nvidia.com/gpu: "1"
|
|
282
|
+
memory: "16Gi"
|
|
283
|
+
Add a pre‑deployment validation step that checks requested GPU memory ≥ model’s required memory (scripts/check_gpu_mem.py).
|
|
284
|
+
Create an alert: model_gpu_memory_usage_bytes > 0.95 * limits.memory.
|
|
285
|
+
5️⃣ Post‑mortem follow‑up
|
|
286
|
+
Document RCA in Confluence under INC-2025-11-03‑LatencySpike.
|
|
287
|
+
Add a model‑size validation test to CI pipeline.
|
|
288
|
+
Schedule a quarterly review of model‑size vs. allocated GPU memory for all services.
|
|
289
|
+
|
|
290
|
+
---
|
|
291
|
+
|
|
292
|
+
## 8. Cost‑per‑inference dashboard (Grafana JSON)
|
|
293
|
+
|
|
294
|
+
```json
|
|
295
|
+
{
|
|
296
|
+
"type": "graph",
|
|
297
|
+
"title": "Cost / 1k Inferences",
|
|
298
|
+
"datasource": "Prometheus",
|
|
299
|
+
"targets": [
|
|
300
|
+
{
|
|
301
|
+
"expr": "sum(rate(cpu_usage_seconds_total{service=\"inference-api\"}[5m])) * 0.001 * 0.12",
|
|
302
|
+
"legendFormat": "CPU cost ($/1k)"
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
"expr": "sum(rate(gpu_usage_percent{service=\"inference-api\"}[5m])) * 0.002 * 0.45",
|
|
306
|
+
"legendFormat": "GPU cost ($/1k)"
|
|
307
|
+
}
|
|
308
|
+
],
|
|
309
|
+
"fieldConfig": {
|
|
310
|
+
"defaults": {
|
|
311
|
+
"unit": "currencyUSD",
|
|
312
|
+
"thresholds": {
|
|
313
|
+
"mode": "absolute",
|
|
314
|
+
"steps": [
|
|
315
|
+
{ "color": "green", "value": null },
|
|
316
|
+
{ "color": "orange", "value": 0.5 },
|
|
317
|
+
{ "color": "red", "value": 1.0 }
|
|
318
|
+
]
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
Result: Shows the dollar cost of running 1 000 inferences broken into CPU and GPU components, allowing the team to keep the cost per inference under a predefined budget (e.g., $0.30/1k for a cheap model, $2.5/1k for a large LLM).
|
|
324
|
+
|
|
325
|
+
9. “Feature‑store consistency” test (Kubernetes Job)
|
|
326
|
+
apiVersion: batch/v1
|
|
327
|
+
kind: Job
|
|
328
|
+
metadata:
|
|
329
|
+
name: feature-store-consistency-check
|
|
330
|
+
spec:
|
|
331
|
+
template:
|
|
332
|
+
spec:
|
|
333
|
+
restartPolicy: Never
|
|
334
|
+
containers:
|
|
335
|
+
- name: checker
|
|
336
|
+
image: myorg/feature-store-checker:latest
|
|
337
|
+
env:
|
|
338
|
+
- name: ONLINE_ENDPOINT
|
|
339
|
+
value: "http://feature-store-online.default.svc.cluster.local:8080/online features"
|
|
340
|
+
- name: OFFLINE_ENDPOINT
|
|
341
|
+
value: "s3://my-bucket/offline_features/"
|
|
342
|
+
command: ["/bin/bash", "-c"]
|
|
343
|
+
args:
|
|
344
|
+
- |
|
|
345
|
+
python /app/consistency.py \
|
|
346
|
+
--online $ONLINE_ENDPOINT \
|
|
347
|
+
--offline $OFFLINE_ENDPOINT \
|
|
348
|
+
--tolerance 0.01 \
|
|
349
|
+
--max-diff 0.05
|
|
350
|
+
serviceAccountName: feature-store-checker-sa
|
|
351
|
+
backoffLimit: 2
|
|
352
|
+
What it does: Periodically (e.g., every night via a CronJob) compares a random sample of features served from the online store with the offline snapshot stored in S3. If the absolute difference exceeds 5 % for any feature, the job exits with a non‑zero status, causing the CI pipeline to fail and raise an alert.
|
|
353
|
+
|
|
354
|
+
10. Model‑registry metadata example (JSON)
|
|
355
|
+
{
|
|
356
|
+
"model_id": "sentiment-v2",
|
|
357
|
+
"version": "2025-09-15",
|
|
358
|
+
"framework": "pytorch",
|
|
359
|
+
"framework_version": "2.2.0",
|
|
360
|
+
"export_format": "torchscript",
|
|
361
|
+
"artifact_uri": "s3://ml-models/sentiment/v2.tar.gz",
|
|
362
|
+
"training_data_hash": "sha256:3f9e2b7c7a9d...",
|
|
363
|
+
"training_tags": ["clean-data","balanced-label"],
|
|
364
|
+
"metrics": {
|
|
365
|
+
"accuracy": 0.927,
|
|
366
|
+
"f1": 0.914,
|
|
367
|
+
"latency_ms": 210,
|
|
368
|
+
"gpu_memory_mb": 11264
|
|
369
|
+
},
|
|
370
|
+
"privacy": {
|
|
371
|
+
"has_pii": false,
|
|
372
|
+
"differential_privacy_eps": 1.0,
|
|
373
|
+
"differential_privacy_delta": 1e-5
|
|
374
|
+
},
|
|
375
|
+
"owner": "ml-team@company.com",
|
|
376
|
+
"status": "READY",
|
|
377
|
+
"registered_at": "2025-09-16T12:34:56Z"
|
|
378
|
+
}
|
|
379
|
+
Use: This JSON can be stored in a model registry (e.g., MLflow, SageMaker Model Registry) and consumed by CI/CD pipelines to verify that a model satisfies accuracy, latency, and privacy gates before it may be promoted to production.
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
# 🤖 Site Reliability Engineering (SRE) Skill
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Defines the knowledge, capabilities, workflows, and best practices required for an AI model to operate as a Site Reliability Engineer responsible for building, operating, and improving highly available, scalable, secure, and observable production systems.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Table of Contents
|
|
10
|
+
|
|
11
|
+
1. Core SRE Foundations
|
|
12
|
+
2. Reliability Engineering
|
|
13
|
+
3. Production Operations
|
|
14
|
+
4. AI/ML Platform Reliability
|
|
15
|
+
5. Incident Management
|
|
16
|
+
6. Monitoring & Observability
|
|
17
|
+
7. Performance Engineering
|
|
18
|
+
8. Capacity Planning
|
|
19
|
+
9. Security
|
|
20
|
+
10. Infrastructure & Automation
|
|
21
|
+
11. Disaster Recovery
|
|
22
|
+
12. DevOps Collaboration
|
|
23
|
+
13. Soft Skills
|
|
24
|
+
14. Operational Workflow
|
|
25
|
+
15. Deliverables
|
|
26
|
+
16. Success Criteria
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
# 1. Core SRE Foundations
|
|
31
|
+
|
|
32
|
+
Skill What It Means for AI Typical Proficiency Level
|
|
33
|
+
Service Level Objectives (SLOs) & Error Budgets Define latency, throughput, and accuracy targets for model inference and batch jobs. Ability to set quantitative SLOs (e.g., 99.9% request success, < 30 ms latency) and manage error‑budget burn.
|
|
34
|
+
Error Budgets & Burn Rate Analysis Treat accuracy regressions (e.g., F1 drop) as “errors” and allocate budget accordingly. Use burn‑rate dashboards to prioritize work.
|
|
35
|
+
Capacity Planning Forecast GPU/CPU/TPU usage, memory, and storage for training & serving workloads. Conduct regular scaling simulations with traffic and model-size projections.
|
|
36
|
+
Reliability Principles (RED, BLUE, etc.) Apply RED (Rate, Error, Duration) to request‑level metrics; BLUE (Burn, Latency, Under‑utilization) to resource usage. Design alerts & dashboards that reflect these patterns.
|
|
37
|
+
Post‑mortem Culture Conduct blameless post‑mortems that capture AI‑specific failure modes (e.g., data drift, model staleness). Produce clear action items and track remediation.
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
# 2. Reliability Engineering
|
|
42
|
+
|
|
43
|
+
Skill Description Example Tools / Concepts
|
|
44
|
+
Model Lifecycle Management Understand versioning, packaging, deployment, and rollback of ML models. MLflow, DVC, SageMaker Model Registry, KFServing, TorchServe.
|
|
45
|
+
Data Pipelines & Versioning Design reproducible data ingestion, cleaning, and feature stores. Delta Lake, Feast, Snowflake, Great Expectations.
|
|
46
|
+
Feature Engineering Ops Treat features as first‑class services with versioning and monitoring. Feature Store APIs, online/offline feature consistency checks.
|
|
47
|
+
Model Monitoring & Drift Detection Detect statistical, concept, and data‑drift changes in real time. Evidently AI, Alibi Detect, custom Prometheus metrics, Prometheus‑Rule‑Alerts.
|
|
48
|
+
Inference Latency & Throughput Optimization Optimize serving stack (Batching, GPU sharing, TensorRT, ONNX, FP8). KEDA, KServe, Triton Inference Server, model quantizations.
|
|
49
|
+
Distributed Training & Scheduler Knowledge Run large‑scale training jobs reliably across clusters. Kubernetes Job/CRDs, Ray, Kubeflow Pipelines, AWS Batch, Horovod.
|
|
50
|
+
Hyperparameter Tuning Automation Integrate search strategies with CI/CD and budget constraints. Optuna, Ray Tune, Google Vizier, W&B Sweeps.
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
# 3. Production Operations
|
|
56
|
+
|
|
57
|
+
3.1. Code → Deploy → Monitor → Retrain Loop
|
|
58
|
+
CI/CD for Model Artifacts
|
|
59
|
+
|
|
60
|
+
Lint & unit‑test training scripts (pytest, flake8).
|
|
61
|
+
Store model binaries/weights in artifact registry (e.g., S3 + ECR).
|
|
62
|
+
Automated promotion through staging → production via canary or blue‑green.
|
|
63
|
+
Canary & Shadow Deployments
|
|
64
|
+
|
|
65
|
+
Route a small percentage of traffic to a new model version.
|
|
66
|
+
Compare latency, error‑rate, and downstream metrics before full rollout.
|
|
67
|
+
Model Governance
|
|
68
|
+
|
|
69
|
+
Maintain a model registry with metadata (training data hash, performance, fairness score).
|
|
70
|
+
Enforce policy checks (e.g., no model > X GB without review).
|
|
71
|
+
Retraining Triggers
|
|
72
|
+
|
|
73
|
+
Automated schedule or drift‑based triggers (e.g., when data‑drift score > 0.5).
|
|
74
|
+
Gate retraining with a budget that respects operational cost constraints.
|
|
75
|
+
|
|
76
|
+
3.2. Rolling Upgrades & Rollbacks
|
|
77
|
+
Action How to Execute Safety Mechanism
|
|
78
|
+
Blue‑Green Deployment Deploy new version to a separate service namespace; switch traffic via Service mesh (Istio, Linkerd). Traffic split can be rolled back instantly.
|
|
79
|
+
Canary with Istio VirtualService Define canary: 5% traffic to new revision; monitor error‑budget burn. Automatic revert if SLO breach > threshold.
|
|
80
|
+
Rollback Script kubectl rollout undo deployment/ml‑service + invalidate cache. Tests in staging ensure rollback works.
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
# 4. AI/ML Platform Reliability
|
|
85
|
+
|
|
86
|
+
Metric Why It Matters Typical Target / Alert
|
|
87
|
+
P99 Latency Guarantees user experience during peaks. Alert if > 2× SLO latency.
|
|
88
|
+
GPU Utilization Ensure costly hardware is not under‑ or over‑provisioned. Alert if < 20 % or > 95 % for > 5 min.
|
|
89
|
+
Throughput (requests/s) Must meet peak traffic spikes (e.g., Black‑Friday). Scale‑out trigger at 80 % of capacity.
|
|
90
|
+
Model Size & Memory Footprint Impacts container start‑up and cold‑start latency. Reject deployments > X GB without GPU memory reservation.
|
|
91
|
+
Batch Latency Important for nightly training / inference jobs. Ensure batch jobs finish within allocated window.
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
# 5. Incident Management
|
|
96
|
+
|
|
97
|
+
Pattern Application to AI Example Implementation
|
|
98
|
+
Circuit Breaker Stop sending traffic to a failing model server that returns high error rates. Envoy circuit_breakers or custom Python wrapper.
|
|
99
|
+
Bulkhead Isolate GPU pools per product line to avoid “noisy neighbor” effects. Kubernetes taints/tolerations per inference service.
|
|
100
|
+
Retry with Backoff + Jitter Recover from transient inference failures (e.g., OOM). Istio/Linkerd retry policies with exponential backoff.
|
|
101
|
+
Graceful Degradation Switch to a lighter model or fallback service when resources are constrained. Feature flag that toggles to distilbert-base when latency budget exceeded.
|
|
102
|
+
Chaos Engineering for ML Inject failures (e.g., data‑drift spikes, missing features) to test resilience. Gremlin or custom chaos scripts that mutate input payloads.
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
# 6. Monitoring & Observability
|
|
107
|
+
|
|
108
|
+
Area SRE Responsibility Tools / Practices
|
|
109
|
+
Model Isolation Enforce network policies (NetworkPolicies, Service Mesh mTLS). Calico, Istio.
|
|
110
|
+
Secrets Management Keep API keys, encryption keys, and access tokens out of code. HashiCorp Vault, AWS Secrets Manager.
|
|
111
|
+
Data Governance Ensure training/serving data does not expose PII. Data masking, differential privacy libs.
|
|
112
|
+
Model Attack Surfaces Harden container images, run as non‑root, use read‑only filesystems. Docker Bench, Cosign for image signing.
|
|
113
|
+
Compliance Audits Maintain logs of model version changes, lineage, and access control. OpenTelemetry + audit logs to SIEM.
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
# 7. Performance Engineering
|
|
119
|
+
|
|
120
|
+
7.1. What to Measure
|
|
121
|
+
Category Sample Metrics Suggested Alerts
|
|
122
|
+
Request‑Level http_request_duration_seconds, http_request_total, http_request_success Latency > SLO, error‑rate > 0.5%
|
|
123
|
+
Model‑Level model_inference_time_ms, cpu_gpu_utilization, concurrent_requests Utilization > 90 % for > 5 min, latency spike
|
|
124
|
+
Data‑Quality feature_missing_rate, numeric_outlier_count, drift_score Drift score > 0.8
|
|
125
|
+
Resource container_memory_usage_bytes, node_gpu_usage_percent Memory > 80 % for > 2 min, GPU OOM
|
|
126
|
+
Business conversion_rate, revenue_per_user derived from model output Sudden drop > 5 % compared to baseline
|
|
127
|
+
7.2. Stack Recommendations
|
|
128
|
+
Metrics: Prometheus + Grafana; export custom exporters for ML frameworks (e.g., torch metrics).
|
|
129
|
+
Tracing: OpenTelemetry + Jaeger; propagate request IDs across data pipeline stages.
|
|
130
|
+
Logging: Structured JSON logs → Loki or Elasticsearch; include model_version, input_hash, inference_time.
|
|
131
|
+
Alerting: Alertmanager with routing to PagerDuty/Slack; use burn‑rate alerts for SLOs.
|
|
132
|
+
7.3. Model‑Specific Dashboards
|
|
133
|
+
Model Health – latency, error rate, GPU memory, concurrent request count.
|
|
134
|
+
Data Drift – histogram of key features, drift score over time.
|
|
135
|
+
Cost‑Performance – cost per inference, cost per training job, cost per dataset GB.
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
# 8. Capacity Planning
|
|
141
|
+
|
|
142
|
+
Aspect Practice Tooling
|
|
143
|
+
Reproducible Environments Dockerfiles + layer caching; use docker-compose for local dev. docker build --cache-from
|
|
144
|
+
Cluster Provisioning GitOps‑driven cluster lifecycle (create/destroy). Pulumi, Terraform, Anthos, eksctl
|
|
145
|
+
Kubernetes Manifests Helm charts for inference services; include resources.requests.limits.gpu. Helm, Kustomize
|
|
146
|
+
CI/CD Pipelines Build → Test → Package → Deploy → Canary → Promotion. GitHub Actions, GitLab CI, Tekton
|
|
147
|
+
Self‑Healing Operators (e.g., KServe) that auto‑restart failing pods. KServe, Seldon Core Operator
|
|
148
|
+
Infrastructure Testing Validate YAML syntax, Helm values, and policy compliance. kubeval, conftest, OPA policies
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
# 9. Security
|
|
154
|
+
|
|
155
|
+
Phase SRE Action AI‑Specific Twist
|
|
156
|
+
Detection Alert fires → Page. Identify whether the alert is from model latency, drift, or data quality.
|
|
157
|
+
Triage Gather logs, metrics, and model version. Pull input sample and prediction signature; compare against baseline model.
|
|
158
|
+
Mitigation Roll back or route traffic away. Possibly switch to a shadow model or enable a fallback (e.g., rule‑based service).
|
|
159
|
+
Resolution Apply hot‑fix, restart service, or redeploy. Re‑train or fine‑tune a model if the issue is systematic (e.g., data pipeline bug).
|
|
160
|
+
Post‑mortem Blameless retrospective → action items. Include model‑lineage review, data‑drift root cause, and cost impact analysis.
|
|
161
|
+
Blameless Documentation Store in Confluence/Notion; link to runbooks. Tag with model_<name>_incident_YYYYMMDD for traceability.
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
# 10. Infrastructure & Automation
|
|
166
|
+
|
|
167
|
+
Skill Why It’s Critical for AI SREs
|
|
168
|
+
Cross‑Functional Communication Bridge gaps between data scientists, ML engineers, and product teams.
|
|
169
|
+
Empathy for Data Understand that data is noisy, and anomalies may be natural rather than bugs.
|
|
170
|
+
Continuous Learning AI fields evolve rapidly; stay abreast of new model families, quantization, and serving standards.
|
|
171
|
+
Advocacy for Reliability Push for SLOs and error‑budget policies in feature‑request meetings.
|
|
172
|
+
Mentorship Coach junior engineers on model instrumentation and observability.
|
|
173
|
+
Decision‑Making Under Uncertainty When to release a new model vs. hold back based on risk metrics.
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
# 11. Disaster Recovery
|
|
179
|
+
|
|
180
|
+
Stage Topics Recommended Resources
|
|
181
|
+
Foundations (0‑3 mo) SRE fundamentals, Kubernetes, Prometheus, basic ML concepts. “Site Reliability Engineering” (Google), Kubernetes Up & Running, Coursera MLOps Fundamentals.
|
|
182
|
+
AI‑Ops Specialization (3‑6 mo) Model lifecycle, feature stores, drift detection, quantization, MLOps platforms. “MLOps Engineering” (Coursera), Seldon Core docs, Feast tutorials.
|
|
183
|
+
Advanced Reliability (6‑12 mo) Distributed training, chaos engineering for ML, multi‑model serving, cost‑optimization. Kubeflow Pipelines docs, “Chaos Engineering” (O'Reilly), Google Cloud AI Platform deep‑dive.
|
|
184
|
+
Certification / Mastery (≥12 mo) Earn SRE certifications (e.g., Google Cloud Professional SRE), contribute to open‑source model‑serving projects. SRE Certification pathways, CNCF courses, community meetups.
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
# 12. DevOps Collaboration
|
|
190
|
+
|
|
191
|
+
...
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
# 13. Soft Skills
|
|
196
|
+
|
|
197
|
+
...
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
# 14. Operational Workflow
|
|
202
|
+
|
|
203
|
+
Incident
|
|
204
|
+
↓
|
|
205
|
+
Detection
|
|
206
|
+
↓
|
|
207
|
+
Triage
|
|
208
|
+
↓
|
|
209
|
+
Mitigation
|
|
210
|
+
↓
|
|
211
|
+
Root Cause Analysis
|
|
212
|
+
↓
|
|
213
|
+
Permanent Fix
|
|
214
|
+
↓
|
|
215
|
+
Validation
|
|
216
|
+
↓
|
|
217
|
+
Postmortem
|
|
218
|
+
↓
|
|
219
|
+
Knowledge Base Update
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
# 15. Deliverables
|
|
224
|
+
|
|
225
|
+
Every completed task should include:
|
|
226
|
+
|
|
227
|
+
• Incident Summary
|
|
228
|
+
|
|
229
|
+
• Root Cause Analysis
|
|
230
|
+
|
|
231
|
+
• Timeline
|
|
232
|
+
|
|
233
|
+
• Customer Impact
|
|
234
|
+
|
|
235
|
+
• Resolution
|
|
236
|
+
|
|
237
|
+
• Preventive Actions
|
|
238
|
+
|
|
239
|
+
• Monitoring Improvements
|
|
240
|
+
|
|
241
|
+
• Documentation Updates
|
|
242
|
+
|
|
243
|
+
---
|
|
244
|
+
|
|
245
|
+
# 16. Success Criteria
|
|
246
|
+
|
|
247
|
+
A successful SRE implementation should:
|
|
248
|
+
|
|
249
|
+
- Meet SLOs
|
|
250
|
+
- Minimize downtime
|
|
251
|
+
- Reduce MTTR
|
|
252
|
+
- Improve MTBF
|
|
253
|
+
- Prevent recurring incidents
|
|
254
|
+
- Increase observability
|
|
255
|
+
- Automate repetitive operations
|
|
256
|
+
- Improve system resilience
|