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,102 @@
|
|
|
1
|
+
# health-check Hook
|
|
2
|
+
|
|
3
|
+
**Category:** deployment
|
|
4
|
+
**Purpose:** Verify system health after deployment
|
|
5
|
+
**Trigger:** After deployment
|
|
6
|
+
|
|
7
|
+
## Description
|
|
8
|
+
|
|
9
|
+
Validates that the deployed system is healthy and responding correctly after deployment completes.
|
|
10
|
+
|
|
11
|
+
## Health Checks Performed
|
|
12
|
+
|
|
13
|
+
- **Service availability** - Can reach health endpoint
|
|
14
|
+
- **Status response** - Returns 200/ok status
|
|
15
|
+
- **Dependencies** - Database, cache, external services
|
|
16
|
+
- **Response time** - Performance within acceptable range
|
|
17
|
+
|
|
18
|
+
## Success Criteria
|
|
19
|
+
|
|
20
|
+
✓ Health endpoint responds with 200 OK
|
|
21
|
+
✓ Status includes "healthy" or "ok"
|
|
22
|
+
✓ Response time < 2 seconds
|
|
23
|
+
✓ All dependencies healthy
|
|
24
|
+
|
|
25
|
+
## Configuration
|
|
26
|
+
|
|
27
|
+
Set health check URL:
|
|
28
|
+
```bash
|
|
29
|
+
export HEALTH_CHECK_URL="https://api.example.com/health"
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Retry Behavior
|
|
33
|
+
|
|
34
|
+
| Parameter | Default | Purpose |
|
|
35
|
+
|---|---|---|
|
|
36
|
+
| `MAX_RETRIES` | 10 | Max attempts |
|
|
37
|
+
| `RETRY_DELAY` | 5s | Wait between retries |
|
|
38
|
+
|
|
39
|
+
## Typical Health Check Response
|
|
40
|
+
|
|
41
|
+
```json
|
|
42
|
+
{
|
|
43
|
+
"status": "ok",
|
|
44
|
+
"uptime": 3600,
|
|
45
|
+
"version": "1.2.3",
|
|
46
|
+
"dependencies": {
|
|
47
|
+
"database": "ok",
|
|
48
|
+
"cache": "ok",
|
|
49
|
+
"api": "ok"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Failure Handling
|
|
55
|
+
|
|
56
|
+
| Scenario | Local | CI |
|
|
57
|
+
|---|---|---|
|
|
58
|
+
| Service down | Prompt to rollback | Auto-rollback |
|
|
59
|
+
| Slow response | Warning | Continue checking |
|
|
60
|
+
| Dependency issue | Alert on dashboard | Notify team |
|
|
61
|
+
|
|
62
|
+
## Environment Variables
|
|
63
|
+
|
|
64
|
+
- `HEALTH_CHECK_URL` - Endpoint to check
|
|
65
|
+
- `MAX_RETRIES` - Number of attempts (default: 10)
|
|
66
|
+
- `RETRY_DELAY` - Seconds between retries (default: 5)
|
|
67
|
+
- `SKIP_HOOKS=true` - Skip check
|
|
68
|
+
|
|
69
|
+
## Related Hooks
|
|
70
|
+
|
|
71
|
+
- `pre-deploy-check.md` - Pre-deployment validation
|
|
72
|
+
- `commands/rollback.sh` - Emergency rollback
|
|
73
|
+
|
|
74
|
+
## Metrics Monitored
|
|
75
|
+
|
|
76
|
+
- **Availability** - Can reach endpoint
|
|
77
|
+
- **Latency** - Response time in ms
|
|
78
|
+
- **Error rate** - 5xx responses
|
|
79
|
+
- **Throughput** - Requests/sec
|
|
80
|
+
|
|
81
|
+
## Common Issues
|
|
82
|
+
|
|
83
|
+
| Issue | Solution |
|
|
84
|
+
|---|---|
|
|
85
|
+
| Slow startup | Increase `RETRY_DELAY` |
|
|
86
|
+
| Connection refused | Check network, endpoints |
|
|
87
|
+
| Unhealthy dependency | Investigate and fix |
|
|
88
|
+
| False positives | Adjust timeout values |
|
|
89
|
+
|
|
90
|
+
## Integration
|
|
91
|
+
|
|
92
|
+
- Slack notifications on failure
|
|
93
|
+
- PagerDuty alerts
|
|
94
|
+
- Datadog monitoring
|
|
95
|
+
- CloudWatch dashboards
|
|
96
|
+
|
|
97
|
+
## Implementation Notes
|
|
98
|
+
|
|
99
|
+
- Runs immediately post-deployment
|
|
100
|
+
- Blocks user access until healthy
|
|
101
|
+
- Automatic rollback if fails
|
|
102
|
+
- Integrates with monitoring systems
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# pre-deploy-check Hook
|
|
2
|
+
|
|
3
|
+
**Category:** deployment
|
|
4
|
+
**Purpose:** Verify system is ready before deployment
|
|
5
|
+
**Trigger:** Before deployment
|
|
6
|
+
|
|
7
|
+
## Description
|
|
8
|
+
|
|
9
|
+
Validates that all prerequisites are met before attempting to deploy code to any environment.
|
|
10
|
+
|
|
11
|
+
## Pre-deployment Checks
|
|
12
|
+
|
|
13
|
+
- **Environment variables** - All required config present
|
|
14
|
+
- **Database connectivity** - Can connect to database
|
|
15
|
+
- **Migrations pending** - Database schema is current
|
|
16
|
+
- **Build artifacts** - Build is recent and present
|
|
17
|
+
- **Git status** - Working directory clean
|
|
18
|
+
|
|
19
|
+
## Configuration Verification
|
|
20
|
+
|
|
21
|
+
Checks for required environment variables per environment:
|
|
22
|
+
|
|
23
|
+
**Production:**
|
|
24
|
+
- `DATABASE_URL` ✓
|
|
25
|
+
- `API_KEY` ✓
|
|
26
|
+
- `SLACK_WEBHOOK` ✓
|
|
27
|
+
|
|
28
|
+
**Staging:**
|
|
29
|
+
- `DATABASE_URL` ✓
|
|
30
|
+
- `API_KEY` ✓
|
|
31
|
+
|
|
32
|
+
## Success Criteria
|
|
33
|
+
|
|
34
|
+
✓ All required variables configured
|
|
35
|
+
✓ Database is reachable
|
|
36
|
+
✓ Migrations up to date
|
|
37
|
+
✓ Build artifacts are recent
|
|
38
|
+
✓ Git working directory clean
|
|
39
|
+
|
|
40
|
+
## Failure Handling
|
|
41
|
+
|
|
42
|
+
| Check | Failure Behavior |
|
|
43
|
+
|---|---|
|
|
44
|
+
| Missing variable | Block deployment |
|
|
45
|
+
| DB unreachable | Warning (may recover) |
|
|
46
|
+
| Stale build | Prompt to rebuild |
|
|
47
|
+
| Uncommitted changes | Block deployment |
|
|
48
|
+
| Pending migrations | Warn, allow override |
|
|
49
|
+
|
|
50
|
+
## Environment Variables
|
|
51
|
+
|
|
52
|
+
- `ENVIRONMENT=staging|production` - Target environment
|
|
53
|
+
- `SKIP_HOOKS=true` - Skip checks (not recommended)
|
|
54
|
+
|
|
55
|
+
## Related Hooks
|
|
56
|
+
|
|
57
|
+
- `health-check.md` - Verify health post-deploy
|
|
58
|
+
- `commands/validate.sh` - General validation
|
|
59
|
+
|
|
60
|
+
## Common Issues
|
|
61
|
+
|
|
62
|
+
| Issue | Solution |
|
|
63
|
+
|---|---|
|
|
64
|
+
| Missing env var | Add to `.env` / secrets manager |
|
|
65
|
+
| DB won't connect | Verify credentials, network |
|
|
66
|
+
| Stale build | Run build before deploy |
|
|
67
|
+
| Uncommitted changes | Commit or stash changes |
|
|
68
|
+
|
|
69
|
+
## Safe Deployment Workflow
|
|
70
|
+
|
|
71
|
+
1. Create release branch
|
|
72
|
+
2. Run tests (all passing)
|
|
73
|
+
3. Build artifacts
|
|
74
|
+
4. Run pre-deploy-check
|
|
75
|
+
5. Deploy to staging
|
|
76
|
+
6. Verify staging
|
|
77
|
+
7. Deploy to production
|
|
78
|
+
|
|
79
|
+
## Implementation Notes
|
|
80
|
+
|
|
81
|
+
- Non-blocking warnings for recovery scenarios
|
|
82
|
+
- Specific error messages for each failure
|
|
83
|
+
- Environment-aware configuration
|
|
84
|
+
- Integration with CI/CD pipelines
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
# update-changelog Hook
|
|
2
|
+
|
|
3
|
+
**Category:** documentation
|
|
4
|
+
**Purpose:** Auto-generate changelog from commits
|
|
5
|
+
**Trigger:** During release process
|
|
6
|
+
|
|
7
|
+
## Description
|
|
8
|
+
|
|
9
|
+
Automatically generates or updates CHANGELOG.md based on commit history using conventional commit format.
|
|
10
|
+
|
|
11
|
+
## Changelog Format
|
|
12
|
+
|
|
13
|
+
Follows [Keep a Changelog](https://keepachangelog.com/) and [Semantic Versioning](https://semver.org/):
|
|
14
|
+
|
|
15
|
+
```markdown
|
|
16
|
+
## [1.2.3] - 2024-01-15
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
- New feature description
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
- Behavior change description
|
|
23
|
+
|
|
24
|
+
### Fixed
|
|
25
|
+
- Bug fix description
|
|
26
|
+
|
|
27
|
+
### Deprecated
|
|
28
|
+
- Deprecated feature description
|
|
29
|
+
|
|
30
|
+
### Removed
|
|
31
|
+
- Removed feature description
|
|
32
|
+
|
|
33
|
+
### Security
|
|
34
|
+
- Security fix description
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Commit Format (Conventional Commits)
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
type(scope): subject
|
|
41
|
+
|
|
42
|
+
body
|
|
43
|
+
|
|
44
|
+
footer
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
**Types:**
|
|
48
|
+
- `feat` → Added
|
|
49
|
+
- `fix` → Fixed
|
|
50
|
+
- `refactor` → Changed
|
|
51
|
+
- `perf` → Changed
|
|
52
|
+
- `docs` → Documentation
|
|
53
|
+
- `test` → Testing
|
|
54
|
+
|
|
55
|
+
## Tools Supported
|
|
56
|
+
|
|
57
|
+
| Tool | Command |
|
|
58
|
+
|------|---------|
|
|
59
|
+
| conventional-changelog | `conventional-changelog` |
|
|
60
|
+
| git-changelog | `git-changelog` |
|
|
61
|
+
| Manual | Edit CHANGELOG.md directly |
|
|
62
|
+
|
|
63
|
+
## Installation
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
npm install -D conventional-changelog-cli
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Success Criteria
|
|
70
|
+
|
|
71
|
+
✓ CHANGELOG.md updated
|
|
72
|
+
✓ Version bumped correctly
|
|
73
|
+
✓ All changes documented
|
|
74
|
+
✓ Changelog staged for commit
|
|
75
|
+
|
|
76
|
+
## Configuration
|
|
77
|
+
|
|
78
|
+
Create `.changelogrc.json`:
|
|
79
|
+
```json
|
|
80
|
+
{
|
|
81
|
+
"preset": "angular",
|
|
82
|
+
"skipCommit": false
|
|
83
|
+
}
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Commit Examples
|
|
87
|
+
|
|
88
|
+
✓ **Good:**
|
|
89
|
+
```
|
|
90
|
+
feat(api): add authentication endpoint
|
|
91
|
+
fix(database): resolve connection pool leak
|
|
92
|
+
docs: update README with examples
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
✗ **Bad:**
|
|
96
|
+
```
|
|
97
|
+
Update stuff
|
|
98
|
+
Fixed things
|
|
99
|
+
Work in progress
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## Generated Sections
|
|
103
|
+
|
|
104
|
+
| Section | Trigger |
|
|
105
|
+
|---------|---------|
|
|
106
|
+
| Added | `feat:` commits |
|
|
107
|
+
| Changed | `refactor:`, `perf:` commits |
|
|
108
|
+
| Fixed | `fix:` commits |
|
|
109
|
+
| Deprecated | Footer `DEPRECATED:` |
|
|
110
|
+
| Removed | Footer `BREAKING CHANGE:` |
|
|
111
|
+
| Security | `security:` commits |
|
|
112
|
+
|
|
113
|
+
## Related Hooks
|
|
114
|
+
|
|
115
|
+
- `commands/release.sh` - Release automation
|
|
116
|
+
- `post-task/run-tests.md` - Validate changes
|
|
117
|
+
|
|
118
|
+
## Common Issues
|
|
119
|
+
|
|
120
|
+
| Issue | Solution |
|
|
121
|
+
|---|---|
|
|
122
|
+
| No changes detected | Check commit format |
|
|
123
|
+
| Wrong version bump | Update version manually |
|
|
124
|
+
| Incomplete changelog | Add missing commits |
|
|
125
|
+
|
|
126
|
+
## Manual Editing
|
|
127
|
+
|
|
128
|
+
If auto-generation doesn't capture everything:
|
|
129
|
+
1. Generate base changelog
|
|
130
|
+
2. Edit sections manually
|
|
131
|
+
3. Add missing changes
|
|
132
|
+
4. Commit updates
|
|
133
|
+
|
|
134
|
+
## Integration
|
|
135
|
+
|
|
136
|
+
- Auto-commit CHANGELOG.md in release
|
|
137
|
+
- Include in version tag
|
|
138
|
+
- GitHub release notes from CHANGELOG
|
|
139
|
+
- NPM package README
|
|
140
|
+
|
|
141
|
+
## Implementation Notes
|
|
142
|
+
|
|
143
|
+
- Runs during release process
|
|
144
|
+
- Reads commit history
|
|
145
|
+
- Parses conventional commits
|
|
146
|
+
- Generates formatted sections
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# run-tests Hook
|
|
2
|
+
|
|
3
|
+
**Category:** post-task
|
|
4
|
+
**Purpose:** Run tests after task completion to validate changes
|
|
5
|
+
**Trigger:** After completing a task
|
|
6
|
+
|
|
7
|
+
## Description
|
|
8
|
+
|
|
9
|
+
Automatically runs test suite after task completion to verify changes work correctly.
|
|
10
|
+
|
|
11
|
+
## Tests Run
|
|
12
|
+
|
|
13
|
+
- Unit tests (if configured)
|
|
14
|
+
- Integration tests (if separate)
|
|
15
|
+
- Coverage reporting (if configured)
|
|
16
|
+
|
|
17
|
+
## Success Criteria
|
|
18
|
+
|
|
19
|
+
✓ All tests pass
|
|
20
|
+
✓ Coverage meets threshold (if configured)
|
|
21
|
+
✓ No test regressions
|
|
22
|
+
|
|
23
|
+
## Test Runners Supported
|
|
24
|
+
|
|
25
|
+
- npm test
|
|
26
|
+
- pytest
|
|
27
|
+
- go test
|
|
28
|
+
- Custom test scripts
|
|
29
|
+
|
|
30
|
+
## Failure Handling
|
|
31
|
+
|
|
32
|
+
| Environment | Failure Behavior |
|
|
33
|
+
|---|---|
|
|
34
|
+
| Local dev | Warning, continue allowed |
|
|
35
|
+
| CI | Error - exit with failure |
|
|
36
|
+
|
|
37
|
+
## Configuration
|
|
38
|
+
|
|
39
|
+
No configuration needed. Auto-detects test framework from:
|
|
40
|
+
- `package.json` (npm)
|
|
41
|
+
- `pytest.ini` (Python)
|
|
42
|
+
- `go.mod` (Go)
|
|
43
|
+
- `Makefile`
|
|
44
|
+
|
|
45
|
+
## Environment Variables
|
|
46
|
+
|
|
47
|
+
- `SKIP_HOOKS=true` - Skip tests
|
|
48
|
+
- `CI=true` - Strict failure mode
|
|
49
|
+
- `COVERAGE=true` - Include coverage report
|
|
50
|
+
|
|
51
|
+
## Related Hooks
|
|
52
|
+
|
|
53
|
+
- `test-before-finish/run-all-tests.md` - Comprehensive suite before finishing
|
|
54
|
+
- `pre-commit/lint.md` - Lint before commit
|
|
55
|
+
|
|
56
|
+
## Implementation Notes
|
|
57
|
+
|
|
58
|
+
- Runs silently if no tests found
|
|
59
|
+
- Caches test results for performance
|
|
60
|
+
- Shows last 20 lines of output on failure
|
|
61
|
+
- Supports parallel test execution
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# format Hook
|
|
2
|
+
|
|
3
|
+
**Category:** pre-commit
|
|
4
|
+
**Purpose:** Auto-format code to project standards before commit
|
|
5
|
+
**Trigger:** Before git commit
|
|
6
|
+
|
|
7
|
+
## Description
|
|
8
|
+
|
|
9
|
+
Automatically formats staged code files to ensure consistent style across the project.
|
|
10
|
+
|
|
11
|
+
## Formatters Supported
|
|
12
|
+
|
|
13
|
+
| Language | Tool |
|
|
14
|
+
|----------|------|
|
|
15
|
+
| JavaScript/TypeScript/JSON/Markdown | Prettier |
|
|
16
|
+
| Python | Black, autopep8 |
|
|
17
|
+
| Go | gofmt |
|
|
18
|
+
| Terraform | terraform fmt |
|
|
19
|
+
| YAML | yamlfmt |
|
|
20
|
+
|
|
21
|
+
## Behavior
|
|
22
|
+
|
|
23
|
+
1. Format staged files
|
|
24
|
+
2. Re-stage formatted files
|
|
25
|
+
3. Allow commit to proceed
|
|
26
|
+
|
|
27
|
+
## Configuration
|
|
28
|
+
|
|
29
|
+
- `.prettierrc` - Prettier config
|
|
30
|
+
- `pyproject.toml` - Black config
|
|
31
|
+
- `.editorconfig` - General formatting
|
|
32
|
+
|
|
33
|
+
## Success Criteria
|
|
34
|
+
|
|
35
|
+
✓ All staged files formatted
|
|
36
|
+
✓ Consistent with project style
|
|
37
|
+
✓ Changes re-staged automatically
|
|
38
|
+
|
|
39
|
+
## Environment Variables
|
|
40
|
+
|
|
41
|
+
- `SKIP_HOOKS=true` - Skip formatting
|
|
42
|
+
- `DRY_RUN=true` - Show what would format
|
|
43
|
+
|
|
44
|
+
## Related Hooks
|
|
45
|
+
|
|
46
|
+
- `lint.md` - Check code quality
|
|
47
|
+
- `type-check.md` - Type validation
|
|
48
|
+
|
|
49
|
+
## Common Scenarios
|
|
50
|
+
|
|
51
|
+
| Scenario | Behavior |
|
|
52
|
+
|----------|----------|
|
|
53
|
+
| Prettier installed | Format JS/TS/JSON/MD |
|
|
54
|
+
| Black installed | Format Python |
|
|
55
|
+
| Both installed | Format all languages |
|
|
56
|
+
| No formatters | Skip silently |
|
|
57
|
+
|
|
58
|
+
## Implementation Notes
|
|
59
|
+
|
|
60
|
+
- Modifies staged files in-place
|
|
61
|
+
- Re-stages formatted changes
|
|
62
|
+
- Formatters run in parallel
|
|
63
|
+
- Non-blocking if formatter not installed
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# lint Hook
|
|
2
|
+
|
|
3
|
+
**Category:** pre-commit
|
|
4
|
+
**Purpose:** Check code quality before committing
|
|
5
|
+
**Trigger:** Before git commit
|
|
6
|
+
|
|
7
|
+
## Description
|
|
8
|
+
|
|
9
|
+
Runs linters on staged files to ensure code meets project quality standards.
|
|
10
|
+
|
|
11
|
+
## Linters Supported
|
|
12
|
+
|
|
13
|
+
| Language | Tools |
|
|
14
|
+
|----------|-------|
|
|
15
|
+
| JavaScript/TypeScript | ESLint |
|
|
16
|
+
| Python | Pylint, Flake8 |
|
|
17
|
+
| Go | golint, go vet |
|
|
18
|
+
| Bash | shellcheck |
|
|
19
|
+
|
|
20
|
+
## Success Criteria
|
|
21
|
+
|
|
22
|
+
✓ No lint errors in staged files
|
|
23
|
+
✓ All configured rules pass
|
|
24
|
+
✓ Code style consistent
|
|
25
|
+
|
|
26
|
+
## What Gets Checked
|
|
27
|
+
|
|
28
|
+
- Code style violations
|
|
29
|
+
- Unused variables
|
|
30
|
+
- Missing imports
|
|
31
|
+
- Syntax errors
|
|
32
|
+
- Best practice violations
|
|
33
|
+
|
|
34
|
+
## Configuration
|
|
35
|
+
|
|
36
|
+
Add `.eslintrc.json`, `.pylintrc`, `.golangci.yml` to project root for custom rules.
|
|
37
|
+
|
|
38
|
+
## Environment Variables
|
|
39
|
+
|
|
40
|
+
- `SKIP_HOOKS=true` - Skip linting
|
|
41
|
+
- `VERBOSE=true` - Show all output
|
|
42
|
+
|
|
43
|
+
## Failure Handling
|
|
44
|
+
|
|
45
|
+
Linting failures prevent commit. Options:
|
|
46
|
+
|
|
47
|
+
1. Fix issues manually
|
|
48
|
+
2. Auto-fix with `format.md` hook
|
|
49
|
+
3. Override with `SKIP_HOOKS=true` (not recommended)
|
|
50
|
+
|
|
51
|
+
## Related Hooks
|
|
52
|
+
|
|
53
|
+
- `format.md` - Auto-format code
|
|
54
|
+
- `type-check.md` - Type validation
|
|
55
|
+
- `test-before-finish/run-all-tests.md` - Full validation
|
|
56
|
+
|
|
57
|
+
## Implementation Notes
|
|
58
|
+
|
|
59
|
+
- Only checks staged files (changed content)
|
|
60
|
+
- Multiple linters run in parallel
|
|
61
|
+
- Fails fast on first error
|
|
62
|
+
- Caches linter config for performance
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# type-check Hook
|
|
2
|
+
|
|
3
|
+
**Category:** pre-commit
|
|
4
|
+
**Purpose:** Run type checker before committing
|
|
5
|
+
**Trigger:** Before git commit
|
|
6
|
+
|
|
7
|
+
## Description
|
|
8
|
+
|
|
9
|
+
Validates type annotations and catches type errors before code is committed.
|
|
10
|
+
|
|
11
|
+
## Type Checkers Supported
|
|
12
|
+
|
|
13
|
+
| Language | Tool |
|
|
14
|
+
|----------|------|
|
|
15
|
+
| TypeScript | tsc (TypeScript Compiler) |
|
|
16
|
+
| JavaScript | Flow |
|
|
17
|
+
| Python | MyPy |
|
|
18
|
+
| Go | go vet |
|
|
19
|
+
|
|
20
|
+
## Success Criteria
|
|
21
|
+
|
|
22
|
+
✓ No type errors
|
|
23
|
+
✓ All type annotations valid
|
|
24
|
+
✓ Type compatibility verified
|
|
25
|
+
|
|
26
|
+
## What Gets Checked
|
|
27
|
+
|
|
28
|
+
- Variable type mismatches
|
|
29
|
+
- Function argument types
|
|
30
|
+
- Return type compatibility
|
|
31
|
+
- Type annotation syntax
|
|
32
|
+
- Generic type constraints
|
|
33
|
+
|
|
34
|
+
## Configuration
|
|
35
|
+
|
|
36
|
+
- `tsconfig.json` - TypeScript config
|
|
37
|
+
- `.flowconfig` - Flow config
|
|
38
|
+
- `mypy.ini` - MyPy config
|
|
39
|
+
|
|
40
|
+
## Failure Handling
|
|
41
|
+
|
|
42
|
+
Type check failures prevent commit. Options:
|
|
43
|
+
|
|
44
|
+
1. Fix type errors
|
|
45
|
+
2. Update type annotations
|
|
46
|
+
3. Skip with `SKIP_HOOKS=true` (not recommended)
|
|
47
|
+
|
|
48
|
+
## Environment Variables
|
|
49
|
+
|
|
50
|
+
- `SKIP_HOOKS=true` - Skip type check
|
|
51
|
+
- `VERBOSE=true` - Show detailed errors
|
|
52
|
+
|
|
53
|
+
## Related Hooks
|
|
54
|
+
|
|
55
|
+
- `lint.md` - Code quality
|
|
56
|
+
- `format.md` - Code formatting
|
|
57
|
+
- `test-before-finish/run-all-tests.md` - Full validation
|
|
58
|
+
|
|
59
|
+
## Performance
|
|
60
|
+
|
|
61
|
+
- TypeScript: ~1-5s (depends on project size)
|
|
62
|
+
- Flow: ~1-3s
|
|
63
|
+
- MyPy: ~2-10s (depends on type coverage)
|
|
64
|
+
|
|
65
|
+
## Common Issues
|
|
66
|
+
|
|
67
|
+
| Issue | Solution |
|
|
68
|
+
|-------|----------|
|
|
69
|
+
| Type errors on valid code | Update .strict mode gradually |
|
|
70
|
+
| Slow type checking | Enable incremental mode |
|
|
71
|
+
| Missing type definitions | Install @types packages |
|
|
72
|
+
|
|
73
|
+
## Implementation Notes
|
|
74
|
+
|
|
75
|
+
- Runs after format/lint hooks
|
|
76
|
+
- Type errors are always blocking
|
|
77
|
+
- Caches type information
|
|
78
|
+
- Supports incremental checking
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# check-branch Hook
|
|
2
|
+
|
|
3
|
+
**Category:** pre-task
|
|
4
|
+
**Purpose:** Verify on correct branch before starting work
|
|
5
|
+
**Trigger:** Before starting a new task
|
|
6
|
+
|
|
7
|
+
## Description
|
|
8
|
+
|
|
9
|
+
Validates that you're on an appropriate branch for making changes and that your local branch is up to date with remote.
|
|
10
|
+
|
|
11
|
+
## Checks Performed
|
|
12
|
+
|
|
13
|
+
- Current branch is not main/master (or warns if it is)
|
|
14
|
+
- Local branch is up to date with remote
|
|
15
|
+
- Offers to pull latest changes if behind
|
|
16
|
+
|
|
17
|
+
## Success Criteria
|
|
18
|
+
|
|
19
|
+
✓ On feature/development branch
|
|
20
|
+
✓ Branch is up to date with remote
|
|
21
|
+
✓ No merge conflicts or divergence
|
|
22
|
+
|
|
23
|
+
## Failure Handling
|
|
24
|
+
|
|
25
|
+
| Scenario | Local Behavior | CI Behavior |
|
|
26
|
+
|----------|---|---|
|
|
27
|
+
| On main/master | Warning, optional pull | Error - exit |
|
|
28
|
+
| Behind remote | Prompt to pull | Skip (requires manual) |
|
|
29
|
+
|
|
30
|
+
## Configuration
|
|
31
|
+
|
|
32
|
+
No configuration needed. Detects main/master/develop branches automatically.
|
|
33
|
+
|
|
34
|
+
## Environment Variables
|
|
35
|
+
|
|
36
|
+
- `SKIP_HOOKS=true` - Skip all validation
|
|
37
|
+
- `CI=true` - Running in CI (stricter checks)
|
|
38
|
+
|
|
39
|
+
## Related Hooks
|
|
40
|
+
|
|
41
|
+
- `validate-environment.md` - Check tools/deps (runs before this)
|
|
42
|
+
|
|
43
|
+
## Implementation Notes
|
|
44
|
+
|
|
45
|
+
- Fetches from remote to check status
|
|
46
|
+
- Non-blocking warnings in local dev
|
|
47
|
+
- Strict checks in CI environment
|
|
48
|
+
- Handles both 'main' and 'master' conventions
|