dev-booster 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 +203 -0
- package/bin/dev-booster.js +4 -0
- package/package.json +41 -0
- package/src/index.js +78 -0
- package/src/sync-template.js +55 -0
- package/template/.devbooster/MANIFEST.md +177 -0
- package/template/.devbooster/boosters/accessibility.md +63 -0
- package/template/.devbooster/boosters/advisor.md +68 -0
- package/template/.devbooster/boosters/atomic.md +58 -0
- package/template/.devbooster/boosters/backend.md +75 -0
- package/template/.devbooster/boosters/changelog.md +126 -0
- package/template/.devbooster/boosters/create.md +85 -0
- package/template/.devbooster/boosters/debug.md +55 -0
- package/template/.devbooster/boosters/deploy.md +11 -0
- package/template/.devbooster/boosters/design.md +56 -0
- package/template/.devbooster/boosters/discovery.md +75 -0
- package/template/.devbooster/boosters/documentation.md +106 -0
- package/template/.devbooster/boosters/frontend.md +82 -0
- package/template/.devbooster/boosters/i18n.md +63 -0
- package/template/.devbooster/boosters/implementation.md +82 -0
- package/template/.devbooster/boosters/investigation.md +96 -0
- package/template/.devbooster/boosters/mobile.md +56 -0
- package/template/.devbooster/boosters/performance.md +70 -0
- package/template/.devbooster/boosters/planning.md +92 -0
- package/template/.devbooster/boosters/refactor.md +17 -0
- package/template/.devbooster/boosters/review.md +88 -0
- package/template/.devbooster/boosters/security.md +60 -0
- package/template/.devbooster/boosters/seo.md +59 -0
- package/template/.devbooster/boosters/templates/implementation_heavy.md +130 -0
- package/template/.devbooster/boosters/templates/implementation_simple.md +109 -0
- package/template/.devbooster/boosters/templates/implementation_standard.md +134 -0
- package/template/.devbooster/boosters/testing.md +76 -0
- package/template/.devbooster/hub/personas/agent_backend-specialist.md +263 -0
- package/template/.devbooster/hub/personas/agent_code-archaeologist.md +106 -0
- package/template/.devbooster/hub/personas/agent_database-architect.md +226 -0
- package/template/.devbooster/hub/personas/agent_debugger.md +225 -0
- package/template/.devbooster/hub/personas/agent_devops-engineer.md +242 -0
- package/template/.devbooster/hub/personas/agent_documentation-writer.md +104 -0
- package/template/.devbooster/hub/personas/agent_explorer-agent.md +73 -0
- package/template/.devbooster/hub/personas/agent_frontend-specialist.md +593 -0
- package/template/.devbooster/hub/personas/agent_game-developer.md +162 -0
- package/template/.devbooster/hub/personas/agent_mobile-developer.md +377 -0
- package/template/.devbooster/hub/personas/agent_orchestrator.md +416 -0
- package/template/.devbooster/hub/personas/agent_penetration-tester.md +188 -0
- package/template/.devbooster/hub/personas/agent_performance-optimizer.md +187 -0
- package/template/.devbooster/hub/personas/agent_product-manager.md +112 -0
- package/template/.devbooster/hub/personas/agent_product-owner.md +95 -0
- package/template/.devbooster/hub/personas/agent_project-planner.md +406 -0
- package/template/.devbooster/hub/personas/agent_qa-automation-engineer.md +103 -0
- package/template/.devbooster/hub/personas/agent_security-auditor.md +170 -0
- package/template/.devbooster/hub/personas/agent_seo-specialist.md +111 -0
- package/template/.devbooster/hub/personas/agent_test-engineer.md +158 -0
- package/template/.devbooster/hub/personas/backend-specialist.md +263 -0
- package/template/.devbooster/hub/personas/brainstorm.md +113 -0
- package/template/.devbooster/hub/personas/code-archaeologist.md +106 -0
- package/template/.devbooster/hub/personas/create.md +59 -0
- package/template/.devbooster/hub/personas/database-architect.md +226 -0
- package/template/.devbooster/hub/personas/debug.md +103 -0
- package/template/.devbooster/hub/personas/debugger.md +225 -0
- package/template/.devbooster/hub/personas/deploy.md +176 -0
- package/template/.devbooster/hub/personas/devops-engineer.md +242 -0
- package/template/.devbooster/hub/personas/documentation-writer.md +104 -0
- package/template/.devbooster/hub/personas/enhance.md +63 -0
- package/template/.devbooster/hub/personas/explorer-agent.md +73 -0
- package/template/.devbooster/hub/personas/frontend-specialist.md +593 -0
- package/template/.devbooster/hub/personas/game-developer.md +162 -0
- package/template/.devbooster/hub/personas/mobile-developer.md +377 -0
- package/template/.devbooster/hub/personas/orchestrate.md +237 -0
- package/template/.devbooster/hub/personas/orchestrator.md +416 -0
- package/template/.devbooster/hub/personas/penetration-tester.md +188 -0
- package/template/.devbooster/hub/personas/performance-optimizer.md +187 -0
- package/template/.devbooster/hub/personas/plan.md +89 -0
- package/template/.devbooster/hub/personas/preview.md +81 -0
- package/template/.devbooster/hub/personas/product-manager.md +112 -0
- package/template/.devbooster/hub/personas/product-owner.md +95 -0
- package/template/.devbooster/hub/personas/project-planner.md +406 -0
- package/template/.devbooster/hub/personas/qa-automation-engineer.md +103 -0
- package/template/.devbooster/hub/personas/security-auditor.md +170 -0
- package/template/.devbooster/hub/personas/seo-specialist.md +111 -0
- package/template/.devbooster/hub/personas/skill_api-patterns.md +567 -0
- package/template/.devbooster/hub/personas/skill_app-builder.md +1855 -0
- package/template/.devbooster/hub/personas/skill_architecture.md +417 -0
- package/template/.devbooster/hub/personas/skill_bash-linux.md +199 -0
- package/template/.devbooster/hub/personas/skill_behavioral-modes.md +242 -0
- package/template/.devbooster/hub/personas/skill_brainstorming.md +519 -0
- package/template/.devbooster/hub/personas/skill_clean-code.md +201 -0
- package/template/.devbooster/hub/personas/skill_code-review-checklist.md +109 -0
- package/template/.devbooster/hub/personas/skill_database-design.md +340 -0
- package/template/.devbooster/hub/personas/skill_deployment-procedures.md +241 -0
- package/template/.devbooster/hub/personas/skill_doc.md +177 -0
- package/template/.devbooster/hub/personas/skill_documentation-templates.md +194 -0
- package/template/.devbooster/hub/personas/skill_frontend-design.md +3670 -0
- package/template/.devbooster/hub/personas/skill_game-development.md +167 -0
- package/template/.devbooster/hub/personas/skill_geo-fundamentals.md +156 -0
- package/template/.devbooster/hub/personas/skill_i18n-localization.md +154 -0
- package/template/.devbooster/hub/personas/skill_intelligent-routing.md +335 -0
- package/template/.devbooster/hub/personas/skill_lint-and-validate.md +45 -0
- package/template/.devbooster/hub/personas/skill_mcp-builder.md +176 -0
- package/template/.devbooster/hub/personas/skill_mobile-design.md +6150 -0
- package/template/.devbooster/hub/personas/skill_nextjs-react-expert.md +3487 -0
- package/template/.devbooster/hub/personas/skill_nodejs-best-practices.md +333 -0
- package/template/.devbooster/hub/personas/skill_parallel-agents.md +175 -0
- package/template/.devbooster/hub/personas/skill_performance-profiling.md +143 -0
- package/template/.devbooster/hub/personas/skill_plan-writing.md +152 -0
- package/template/.devbooster/hub/personas/skill_powershell-windows.md +167 -0
- package/template/.devbooster/hub/personas/skill_python-patterns.md +441 -0
- package/template/.devbooster/hub/personas/skill_red-team-tactics.md +199 -0
- package/template/.devbooster/hub/personas/skill_rust-pro.md +176 -0
- package/template/.devbooster/hub/personas/skill_seo-fundamentals.md +129 -0
- package/template/.devbooster/hub/personas/skill_server-management.md +161 -0
- package/template/.devbooster/hub/personas/skill_systematic-debugging.md +109 -0
- package/template/.devbooster/hub/personas/skill_tailwind-patterns.md +269 -0
- package/template/.devbooster/hub/personas/skill_tdd-workflow.md +149 -0
- package/template/.devbooster/hub/personas/skill_testing-patterns.md +178 -0
- package/template/.devbooster/hub/personas/skill_vulnerability-scanner.md +403 -0
- package/template/.devbooster/hub/personas/skill_web-design-guidelines.md +57 -0
- package/template/.devbooster/hub/personas/skill_webapp-testing.md +187 -0
- package/template/.devbooster/hub/personas/status.md +86 -0
- package/template/.devbooster/hub/personas/test-engineer.md +158 -0
- package/template/.devbooster/hub/personas/test.md +144 -0
- package/template/.devbooster/hub/personas/ui-ux-pro-max.md +296 -0
- package/template/.devbooster/hub/scripts/accessibility_checker.py +183 -0
- package/template/.devbooster/hub/scripts/api_validator.py +211 -0
- package/template/.devbooster/hub/scripts/auto_preview.py +148 -0
- package/template/.devbooster/hub/scripts/checklist.py +217 -0
- package/template/.devbooster/hub/scripts/convert_rules.py +222 -0
- package/template/.devbooster/hub/scripts/geo_checker.py +289 -0
- package/template/.devbooster/hub/scripts/i18n_checker.py +241 -0
- package/template/.devbooster/hub/scripts/lighthouse_audit.py +76 -0
- package/template/.devbooster/hub/scripts/lint_runner.py +184 -0
- package/template/.devbooster/hub/scripts/mobile_audit.py +670 -0
- package/template/.devbooster/hub/scripts/playwright_runner.py +173 -0
- package/template/.devbooster/hub/scripts/react_performance_checker.py +252 -0
- package/template/.devbooster/hub/scripts/schema_validator.py +172 -0
- package/template/.devbooster/hub/scripts/security_scan.py +458 -0
- package/template/.devbooster/hub/scripts/seo_checker.py +219 -0
- package/template/.devbooster/hub/scripts/session_manager.py +120 -0
- package/template/.devbooster/hub/scripts/test_runner.py +219 -0
- package/template/.devbooster/hub/scripts/type_coverage.py +173 -0
- package/template/.devbooster/hub/scripts/ux_audit.py +722 -0
- package/template/.devbooster/hub/scripts/verify_all.py +327 -0
- package/template/.devbooster/hub/skills/api-patterns/SKILL.md +81 -0
- package/template/.devbooster/hub/skills/api-patterns/api-style.md +42 -0
- package/template/.devbooster/hub/skills/api-patterns/auth.md +24 -0
- package/template/.devbooster/hub/skills/api-patterns/documentation.md +26 -0
- package/template/.devbooster/hub/skills/api-patterns/graphql.md +41 -0
- package/template/.devbooster/hub/skills/api-patterns/rate-limiting.md +31 -0
- package/template/.devbooster/hub/skills/api-patterns/response.md +37 -0
- package/template/.devbooster/hub/skills/api-patterns/rest.md +40 -0
- package/template/.devbooster/hub/skills/api-patterns/scripts/api_validator.py +211 -0
- package/template/.devbooster/hub/skills/api-patterns/security-testing.md +122 -0
- package/template/.devbooster/hub/skills/api-patterns/trpc.md +41 -0
- package/template/.devbooster/hub/skills/api-patterns/versioning.md +22 -0
- package/template/.devbooster/hub/skills/app-builder/SKILL.md +75 -0
- package/template/.devbooster/hub/skills/app-builder/agent-coordination.md +71 -0
- package/template/.devbooster/hub/skills/app-builder/feature-building.md +53 -0
- package/template/.devbooster/hub/skills/app-builder/project-detection.md +34 -0
- package/template/.devbooster/hub/skills/app-builder/scaffolding.md +118 -0
- package/template/.devbooster/hub/skills/app-builder/tech-stack.md +40 -0
- package/template/.devbooster/hub/skills/app-builder/templates/SKILL.md +39 -0
- package/template/.devbooster/hub/skills/app-builder/templates/astro-static/TEMPLATE.md +76 -0
- package/template/.devbooster/hub/skills/app-builder/templates/chrome-extension/TEMPLATE.md +92 -0
- package/template/.devbooster/hub/skills/app-builder/templates/cli-tool/TEMPLATE.md +88 -0
- package/template/.devbooster/hub/skills/app-builder/templates/electron-desktop/TEMPLATE.md +88 -0
- package/template/.devbooster/hub/skills/app-builder/templates/express-api/TEMPLATE.md +83 -0
- package/template/.devbooster/hub/skills/app-builder/templates/flutter-app/TEMPLATE.md +90 -0
- package/template/.devbooster/hub/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +90 -0
- package/template/.devbooster/hub/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +122 -0
- package/template/.devbooster/hub/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +122 -0
- package/template/.devbooster/hub/skills/app-builder/templates/nextjs-static/TEMPLATE.md +169 -0
- package/template/.devbooster/hub/skills/app-builder/templates/nuxt-app/TEMPLATE.md +134 -0
- package/template/.devbooster/hub/skills/app-builder/templates/python-fastapi/TEMPLATE.md +83 -0
- package/template/.devbooster/hub/skills/app-builder/templates/react-native-app/TEMPLATE.md +119 -0
- package/template/.devbooster/hub/skills/architecture/SKILL.md +55 -0
- package/template/.devbooster/hub/skills/architecture/context-discovery.md +43 -0
- package/template/.devbooster/hub/skills/architecture/examples.md +94 -0
- package/template/.devbooster/hub/skills/architecture/pattern-selection.md +68 -0
- package/template/.devbooster/hub/skills/architecture/patterns-reference.md +50 -0
- package/template/.devbooster/hub/skills/architecture/trade-off-analysis.md +77 -0
- package/template/.devbooster/hub/skills/bash-linux/SKILL.md +199 -0
- package/template/.devbooster/hub/skills/behavioral-modes/SKILL.md +242 -0
- package/template/.devbooster/hub/skills/brainstorming/SKILL.md +163 -0
- package/template/.devbooster/hub/skills/brainstorming/dynamic-questioning.md +350 -0
- package/template/.devbooster/hub/skills/clean-code/SKILL.md +201 -0
- package/template/.devbooster/hub/skills/code-review-checklist/SKILL.md +109 -0
- package/template/.devbooster/hub/skills/database-design/SKILL.md +52 -0
- package/template/.devbooster/hub/skills/database-design/database-selection.md +43 -0
- package/template/.devbooster/hub/skills/database-design/indexing.md +39 -0
- package/template/.devbooster/hub/skills/database-design/migrations.md +48 -0
- package/template/.devbooster/hub/skills/database-design/optimization.md +36 -0
- package/template/.devbooster/hub/skills/database-design/orm-selection.md +30 -0
- package/template/.devbooster/hub/skills/database-design/schema-design.md +56 -0
- package/template/.devbooster/hub/skills/database-design/scripts/schema_validator.py +172 -0
- package/template/.devbooster/hub/skills/deployment-procedures/SKILL.md +241 -0
- package/template/.devbooster/hub/skills/doc.md +177 -0
- package/template/.devbooster/hub/skills/documentation-templates/SKILL.md +194 -0
- package/template/.devbooster/hub/skills/frontend-design/SKILL.md +418 -0
- package/template/.devbooster/hub/skills/frontend-design/animation-guide.md +331 -0
- package/template/.devbooster/hub/skills/frontend-design/anti-generic-guide.md +252 -0
- package/template/.devbooster/hub/skills/frontend-design/color-system.md +311 -0
- package/template/.devbooster/hub/skills/frontend-design/decision-trees.md +418 -0
- package/template/.devbooster/hub/skills/frontend-design/motion-graphics.md +306 -0
- package/template/.devbooster/hub/skills/frontend-design/scripts/accessibility_checker.py +183 -0
- package/template/.devbooster/hub/skills/frontend-design/scripts/ux_audit.py +722 -0
- package/template/.devbooster/hub/skills/frontend-design/typography-system.md +345 -0
- package/template/.devbooster/hub/skills/frontend-design/ux-psychology.md +1116 -0
- package/template/.devbooster/hub/skills/frontend-design/visual-effects.md +383 -0
- package/template/.devbooster/hub/skills/game-development/2d-games/SKILL.md +119 -0
- package/template/.devbooster/hub/skills/game-development/3d-games/SKILL.md +135 -0
- package/template/.devbooster/hub/skills/game-development/SKILL.md +167 -0
- package/template/.devbooster/hub/skills/game-development/game-art/SKILL.md +185 -0
- package/template/.devbooster/hub/skills/game-development/game-audio/SKILL.md +190 -0
- package/template/.devbooster/hub/skills/game-development/game-design/SKILL.md +129 -0
- package/template/.devbooster/hub/skills/game-development/mobile-games/SKILL.md +108 -0
- package/template/.devbooster/hub/skills/game-development/multiplayer/SKILL.md +132 -0
- package/template/.devbooster/hub/skills/game-development/pc-games/SKILL.md +144 -0
- package/template/.devbooster/hub/skills/game-development/vr-ar/SKILL.md +123 -0
- package/template/.devbooster/hub/skills/game-development/web-games/SKILL.md +150 -0
- package/template/.devbooster/hub/skills/geo-fundamentals/SKILL.md +156 -0
- package/template/.devbooster/hub/skills/geo-fundamentals/scripts/geo_checker.py +289 -0
- package/template/.devbooster/hub/skills/i18n-localization/SKILL.md +154 -0
- package/template/.devbooster/hub/skills/i18n-localization/scripts/i18n_checker.py +241 -0
- package/template/.devbooster/hub/skills/intelligent-routing/SKILL.md +335 -0
- package/template/.devbooster/hub/skills/lint-and-validate/SKILL.md +45 -0
- package/template/.devbooster/hub/skills/lint-and-validate/scripts/lint_runner.py +184 -0
- package/template/.devbooster/hub/skills/lint-and-validate/scripts/type_coverage.py +173 -0
- package/template/.devbooster/hub/skills/mcp-builder/SKILL.md +176 -0
- package/template/.devbooster/hub/skills/mobile-design/SKILL.md +394 -0
- package/template/.devbooster/hub/skills/mobile-design/decision-trees.md +516 -0
- package/template/.devbooster/hub/skills/mobile-design/mobile-backend.md +491 -0
- package/template/.devbooster/hub/skills/mobile-design/mobile-color-system.md +420 -0
- package/template/.devbooster/hub/skills/mobile-design/mobile-debugging.md +122 -0
- package/template/.devbooster/hub/skills/mobile-design/mobile-design-thinking.md +357 -0
- package/template/.devbooster/hub/skills/mobile-design/mobile-navigation.md +458 -0
- package/template/.devbooster/hub/skills/mobile-design/mobile-performance.md +767 -0
- package/template/.devbooster/hub/skills/mobile-design/mobile-testing.md +356 -0
- package/template/.devbooster/hub/skills/mobile-design/mobile-typography.md +433 -0
- package/template/.devbooster/hub/skills/mobile-design/platform-android.md +666 -0
- package/template/.devbooster/hub/skills/mobile-design/platform-ios.md +561 -0
- package/template/.devbooster/hub/skills/mobile-design/scripts/mobile_audit.py +670 -0
- package/template/.devbooster/hub/skills/mobile-design/touch-psychology.md +537 -0
- package/template/.devbooster/hub/skills/nextjs-react-expert/1-async-eliminating-waterfalls.md +312 -0
- package/template/.devbooster/hub/skills/nextjs-react-expert/2-bundle-bundle-size-optimization.md +240 -0
- package/template/.devbooster/hub/skills/nextjs-react-expert/3-server-server-side-performance.md +490 -0
- package/template/.devbooster/hub/skills/nextjs-react-expert/4-client-client-side-data-fetching.md +264 -0
- package/template/.devbooster/hub/skills/nextjs-react-expert/5-rerender-re-render-optimization.md +581 -0
- package/template/.devbooster/hub/skills/nextjs-react-expert/6-rendering-rendering-performance.md +432 -0
- package/template/.devbooster/hub/skills/nextjs-react-expert/7-js-javascript-performance.md +684 -0
- package/template/.devbooster/hub/skills/nextjs-react-expert/8-advanced-advanced-patterns.md +150 -0
- package/template/.devbooster/hub/skills/nextjs-react-expert/SKILL.md +286 -0
- package/template/.devbooster/hub/skills/nextjs-react-expert/scripts/convert_rules.py +222 -0
- package/template/.devbooster/hub/skills/nextjs-react-expert/scripts/react_performance_checker.py +252 -0
- package/template/.devbooster/hub/skills/nodejs-best-practices/SKILL.md +333 -0
- package/template/.devbooster/hub/skills/parallel-agents/SKILL.md +175 -0
- package/template/.devbooster/hub/skills/performance-profiling/SKILL.md +143 -0
- package/template/.devbooster/hub/skills/performance-profiling/scripts/lighthouse_audit.py +76 -0
- package/template/.devbooster/hub/skills/plan-writing/SKILL.md +152 -0
- package/template/.devbooster/hub/skills/powershell-windows/SKILL.md +167 -0
- package/template/.devbooster/hub/skills/python-patterns/SKILL.md +441 -0
- package/template/.devbooster/hub/skills/red-team-tactics/SKILL.md +199 -0
- package/template/.devbooster/hub/skills/rust-pro/SKILL.md +176 -0
- package/template/.devbooster/hub/skills/seo-fundamentals/SKILL.md +129 -0
- package/template/.devbooster/hub/skills/seo-fundamentals/scripts/seo_checker.py +219 -0
- package/template/.devbooster/hub/skills/server-management/SKILL.md +161 -0
- package/template/.devbooster/hub/skills/systematic-debugging/SKILL.md +109 -0
- package/template/.devbooster/hub/skills/tailwind-patterns/SKILL.md +269 -0
- package/template/.devbooster/hub/skills/tdd-workflow/SKILL.md +149 -0
- package/template/.devbooster/hub/skills/testing-patterns/SKILL.md +178 -0
- package/template/.devbooster/hub/skills/testing-patterns/scripts/test_runner.py +219 -0
- package/template/.devbooster/hub/skills/vulnerability-scanner/SKILL.md +276 -0
- package/template/.devbooster/hub/skills/vulnerability-scanner/checklists.md +121 -0
- package/template/.devbooster/hub/skills/vulnerability-scanner/scripts/security_scan.py +458 -0
- package/template/.devbooster/hub/skills/web-design-guidelines/SKILL.md +57 -0
- package/template/.devbooster/hub/skills/webapp-testing/SKILL.md +187 -0
- package/template/.devbooster/hub/skills/webapp-testing/scripts/playwright_runner.py +173 -0
- package/template/.devbooster/hub/workflows/brainstorm.md +113 -0
- package/template/.devbooster/hub/workflows/create.md +59 -0
- package/template/.devbooster/hub/workflows/debug.md +103 -0
- package/template/.devbooster/hub/workflows/deploy.md +176 -0
- package/template/.devbooster/hub/workflows/enhance.md +63 -0
- package/template/.devbooster/hub/workflows/orchestrate.md +237 -0
- package/template/.devbooster/hub/workflows/plan.md +89 -0
- package/template/.devbooster/hub/workflows/preview.md +81 -0
- package/template/.devbooster/hub/workflows/status.md +86 -0
- package/template/.devbooster/hub/workflows/test.md +144 -0
- package/template/.devbooster/hub/workflows/ui-ux-pro-max.md +296 -0
- package/template/.devbooster/rules/BACKEND.md +72 -0
- package/template/.devbooster/rules/COMERCIAL.md +69 -0
- package/template/.devbooster/rules/FRONTEND.md +76 -0
- package/template/.devbooster/rules/GUIDE.md +111 -0
- package/template/.devbooster/rules/PROJECT.md +83 -0
- package/template/.devbooster/rules/PROTOCOL.md +42 -0
- package/template/.devbooster/rules/USER_PREFERENCES.md +33 -0
- package/template/DEVBOOSTER_INIT.md +42 -0
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: code-review-checklist
|
|
3
|
+
description: Code review guidelines covering code quality, security, and best practices.
|
|
4
|
+
allowed-tools: Read, Glob, Grep
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Code Review Checklist
|
|
8
|
+
|
|
9
|
+
## Quick Review Checklist
|
|
10
|
+
|
|
11
|
+
### Correctness
|
|
12
|
+
- [ ] Code does what it's supposed to do
|
|
13
|
+
- [ ] Edge cases handled
|
|
14
|
+
- [ ] Error handling in place
|
|
15
|
+
- [ ] No obvious bugs
|
|
16
|
+
|
|
17
|
+
### Security
|
|
18
|
+
- [ ] Input validated and sanitized
|
|
19
|
+
- [ ] No SQL/NoSQL injection vulnerabilities
|
|
20
|
+
- [ ] No XSS or CSRF vulnerabilities
|
|
21
|
+
- [ ] No hardcoded secrets or sensitive credentials
|
|
22
|
+
- [ ] **AI-Specific:** Protection against Prompt Injection (if applicable)
|
|
23
|
+
- [ ] **AI-Specific:** Outputs are sanitized before being used in critical sinks
|
|
24
|
+
|
|
25
|
+
### Performance
|
|
26
|
+
- [ ] No N+1 queries
|
|
27
|
+
- [ ] No unnecessary loops
|
|
28
|
+
- [ ] Appropriate caching
|
|
29
|
+
- [ ] Bundle size impact considered
|
|
30
|
+
|
|
31
|
+
### Code Quality
|
|
32
|
+
- [ ] Clear naming
|
|
33
|
+
- [ ] DRY - no duplicate code
|
|
34
|
+
- [ ] SOLID principles followed
|
|
35
|
+
- [ ] Appropriate abstraction level
|
|
36
|
+
|
|
37
|
+
### Testing
|
|
38
|
+
- [ ] Unit tests for new code
|
|
39
|
+
- [ ] Edge cases tested
|
|
40
|
+
- [ ] Tests readable and maintainable
|
|
41
|
+
|
|
42
|
+
### Documentation
|
|
43
|
+
- [ ] Complex logic commented
|
|
44
|
+
- [ ] Public APIs documented
|
|
45
|
+
- [ ] README updated if needed
|
|
46
|
+
|
|
47
|
+
## AI & LLM Review Patterns (2025)
|
|
48
|
+
|
|
49
|
+
### Logic & Hallucinations
|
|
50
|
+
- [ ] **Chain of Thought:** Does the logic follow a verifiable path?
|
|
51
|
+
- [ ] **Edge Cases:** Did the AI account for empty states, timeouts, and partial failures?
|
|
52
|
+
- [ ] **External State:** Is the code making safe assumptions about file systems or networks?
|
|
53
|
+
|
|
54
|
+
### Prompt Engineering Review
|
|
55
|
+
```markdown
|
|
56
|
+
// ❌ Vague prompt in code
|
|
57
|
+
const response = await ai.generate(userInput);
|
|
58
|
+
|
|
59
|
+
// ✅ Structured & Safe prompt
|
|
60
|
+
const response = await ai.generate({
|
|
61
|
+
system: "You are a specialized parser...",
|
|
62
|
+
input: sanitize(userInput),
|
|
63
|
+
schema: ResponseSchema
|
|
64
|
+
});
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Anti-Patterns to Flag
|
|
68
|
+
|
|
69
|
+
```typescript
|
|
70
|
+
// ❌ Magic numbers
|
|
71
|
+
if (status === 3) { ... }
|
|
72
|
+
|
|
73
|
+
// ✅ Named constants
|
|
74
|
+
if (status === Status.ACTIVE) { ... }
|
|
75
|
+
|
|
76
|
+
// ❌ Deep nesting
|
|
77
|
+
if (a) { if (b) { if (c) { ... } } }
|
|
78
|
+
|
|
79
|
+
// ✅ Early returns
|
|
80
|
+
if (!a) return;
|
|
81
|
+
if (!b) return;
|
|
82
|
+
if (!c) return;
|
|
83
|
+
// do work
|
|
84
|
+
|
|
85
|
+
// ❌ Long functions (100+ lines)
|
|
86
|
+
// ✅ Small, focused functions
|
|
87
|
+
|
|
88
|
+
// ❌ any type
|
|
89
|
+
const data: any = ...
|
|
90
|
+
|
|
91
|
+
// ✅ Proper types
|
|
92
|
+
const data: UserData = ...
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Review Comments Guide
|
|
96
|
+
|
|
97
|
+
```
|
|
98
|
+
// Blocking issues use 🔴
|
|
99
|
+
🔴 BLOCKING: SQL injection vulnerability here
|
|
100
|
+
|
|
101
|
+
// Important suggestions use 🟡
|
|
102
|
+
🟡 SUGGESTION: Consider using useMemo for performance
|
|
103
|
+
|
|
104
|
+
// Minor nits use 🟢
|
|
105
|
+
🟢 NIT: Prefer const over let for immutable variable
|
|
106
|
+
|
|
107
|
+
// Questions use ❓
|
|
108
|
+
❓ QUESTION: What happens if user is null here?
|
|
109
|
+
```
|
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: database-design
|
|
3
|
+
description: Database design principles and decision-making. Schema design, indexing strategy, ORM selection, serverless databases.
|
|
4
|
+
allowed-tools: Read, Write, Edit, Glob, Grep
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Database Design
|
|
8
|
+
|
|
9
|
+
> **Learn to THINK, not copy SQL patterns.**
|
|
10
|
+
|
|
11
|
+
## 🎯 Selective Reading Rule
|
|
12
|
+
|
|
13
|
+
**Read ONLY files relevant to the request!** Check the content map, find what you need.
|
|
14
|
+
|
|
15
|
+
| File | Description | When to Read |
|
|
16
|
+
|------|-------------|--------------|
|
|
17
|
+
| `database-selection.md` | PostgreSQL vs Neon vs Turso vs SQLite | Choosing database |
|
|
18
|
+
| `orm-selection.md` | Drizzle vs Prisma vs Kysely | Choosing ORM |
|
|
19
|
+
| `schema-design.md` | Normalization, PKs, relationships | Designing schema |
|
|
20
|
+
| `indexing.md` | Index types, composite indexes | Performance tuning |
|
|
21
|
+
| `optimization.md` | N+1, EXPLAIN ANALYZE | Query optimization |
|
|
22
|
+
| `migrations.md` | Safe migrations, serverless DBs | Schema changes |
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## ⚠️ Core Principle
|
|
27
|
+
|
|
28
|
+
- ASK user for database preferences when unclear
|
|
29
|
+
- Choose database/ORM based on CONTEXT
|
|
30
|
+
- Don't default to PostgreSQL for everything
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Decision Checklist
|
|
35
|
+
|
|
36
|
+
Before designing schema:
|
|
37
|
+
|
|
38
|
+
- [ ] Asked user about database preference?
|
|
39
|
+
- [ ] Chosen database for THIS context?
|
|
40
|
+
- [ ] Considered deployment environment?
|
|
41
|
+
- [ ] Planned index strategy?
|
|
42
|
+
- [ ] Defined relationship types?
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Anti-Patterns
|
|
47
|
+
|
|
48
|
+
❌ Default to PostgreSQL for simple apps (SQLite may suffice)
|
|
49
|
+
❌ Skip indexing
|
|
50
|
+
❌ Use SELECT * in production
|
|
51
|
+
❌ Store JSON when structured data is better
|
|
52
|
+
❌ Ignore N+1 queries
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
# Content from database-selection.md
|
|
58
|
+
|
|
59
|
+
# Database Selection (2025)
|
|
60
|
+
|
|
61
|
+
> Choose database based on context, not default.
|
|
62
|
+
|
|
63
|
+
## Decision Tree
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
What are your requirements?
|
|
67
|
+
│
|
|
68
|
+
├── Full relational features needed
|
|
69
|
+
│ ├── Self-hosted → PostgreSQL
|
|
70
|
+
│ └── Serverless → Neon, Supabase
|
|
71
|
+
│
|
|
72
|
+
├── Edge deployment / Ultra-low latency
|
|
73
|
+
│ └── Turso (edge SQLite)
|
|
74
|
+
│
|
|
75
|
+
├── AI / Vector search
|
|
76
|
+
│ └── PostgreSQL + pgvector
|
|
77
|
+
│
|
|
78
|
+
├── Simple / Embedded / Local
|
|
79
|
+
│ └── SQLite
|
|
80
|
+
│
|
|
81
|
+
└── Global distribution
|
|
82
|
+
└── PlanetScale, CockroachDB, Turso
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Comparison
|
|
86
|
+
|
|
87
|
+
| Database | Best For | Trade-offs |
|
|
88
|
+
|----------|----------|------------|
|
|
89
|
+
| **PostgreSQL** | Full features, complex queries | Needs hosting |
|
|
90
|
+
| **Neon** | Serverless PG, branching | PG complexity |
|
|
91
|
+
| **Turso** | Edge, low latency | SQLite limitations |
|
|
92
|
+
| **SQLite** | Simple, embedded, local | Single-writer |
|
|
93
|
+
| **PlanetScale** | MySQL, global scale | No foreign keys |
|
|
94
|
+
|
|
95
|
+
## Questions to Ask
|
|
96
|
+
|
|
97
|
+
1. What's the deployment environment?
|
|
98
|
+
2. How complex are the queries?
|
|
99
|
+
3. Is edge/serverless important?
|
|
100
|
+
4. Vector search needed?
|
|
101
|
+
5. Global distribution required?
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
# Content from indexing.md
|
|
107
|
+
|
|
108
|
+
# Indexing Principles
|
|
109
|
+
|
|
110
|
+
> When and how to create indexes effectively.
|
|
111
|
+
|
|
112
|
+
## When to Create Indexes
|
|
113
|
+
|
|
114
|
+
```
|
|
115
|
+
Index these:
|
|
116
|
+
├── Columns in WHERE clauses
|
|
117
|
+
├── Columns in JOIN conditions
|
|
118
|
+
├── Columns in ORDER BY
|
|
119
|
+
├── Foreign key columns
|
|
120
|
+
└── Unique constraints
|
|
121
|
+
|
|
122
|
+
Don't over-index:
|
|
123
|
+
├── Write-heavy tables (slower inserts)
|
|
124
|
+
├── Low-cardinality columns
|
|
125
|
+
├── Columns rarely queried
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## Index Type Selection
|
|
129
|
+
|
|
130
|
+
| Type | Use For |
|
|
131
|
+
|------|---------|
|
|
132
|
+
| **B-tree** | General purpose, equality & range |
|
|
133
|
+
| **Hash** | Equality only, faster |
|
|
134
|
+
| **GIN** | JSONB, arrays, full-text |
|
|
135
|
+
| **GiST** | Geometric, range types |
|
|
136
|
+
| **HNSW/IVFFlat** | Vector similarity (pgvector) |
|
|
137
|
+
|
|
138
|
+
## Composite Index Principles
|
|
139
|
+
|
|
140
|
+
```
|
|
141
|
+
Order matters for composite indexes:
|
|
142
|
+
├── Equality columns first
|
|
143
|
+
├── Range columns last
|
|
144
|
+
├── Most selective first
|
|
145
|
+
└── Match query pattern
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
# Content from migrations.md
|
|
152
|
+
|
|
153
|
+
# Migration Principles
|
|
154
|
+
|
|
155
|
+
> Safe migration strategy for zero-downtime changes.
|
|
156
|
+
|
|
157
|
+
## Safe Migration Strategy
|
|
158
|
+
|
|
159
|
+
```
|
|
160
|
+
For zero-downtime changes:
|
|
161
|
+
│
|
|
162
|
+
├── Adding column
|
|
163
|
+
│ └── Add as nullable → backfill → add NOT NULL
|
|
164
|
+
│
|
|
165
|
+
├── Removing column
|
|
166
|
+
│ └── Stop using → deploy → remove column
|
|
167
|
+
│
|
|
168
|
+
├── Adding index
|
|
169
|
+
│ └── CREATE INDEX CONCURRENTLY (non-blocking)
|
|
170
|
+
│
|
|
171
|
+
└── Renaming column
|
|
172
|
+
└── Add new → migrate data → deploy → drop old
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
## Migration Philosophy
|
|
176
|
+
|
|
177
|
+
- Never make breaking changes in one step
|
|
178
|
+
- Test migrations on data copy first
|
|
179
|
+
- Have rollback plan
|
|
180
|
+
- Run in transaction when possible
|
|
181
|
+
|
|
182
|
+
## Serverless Databases
|
|
183
|
+
|
|
184
|
+
### Neon (Serverless PostgreSQL)
|
|
185
|
+
|
|
186
|
+
| Feature | Benefit |
|
|
187
|
+
|---------|---------|
|
|
188
|
+
| Scale to zero | Cost savings |
|
|
189
|
+
| Instant branching | Dev/preview |
|
|
190
|
+
| Full PostgreSQL | Compatibility |
|
|
191
|
+
| Autoscaling | Traffic handling |
|
|
192
|
+
|
|
193
|
+
### Turso (Edge SQLite)
|
|
194
|
+
|
|
195
|
+
| Feature | Benefit |
|
|
196
|
+
|---------|---------|
|
|
197
|
+
| Edge locations | Ultra-low latency |
|
|
198
|
+
| SQLite compatible | Simple |
|
|
199
|
+
| Generous free tier | Cost |
|
|
200
|
+
| Global distribution | Performance |
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
# Content from optimization.md
|
|
206
|
+
|
|
207
|
+
# Query Optimization
|
|
208
|
+
|
|
209
|
+
> N+1 problem, EXPLAIN ANALYZE, optimization priorities.
|
|
210
|
+
|
|
211
|
+
## N+1 Problem
|
|
212
|
+
|
|
213
|
+
```
|
|
214
|
+
What is N+1?
|
|
215
|
+
├── 1 query to get parent records
|
|
216
|
+
├── N queries to get related records
|
|
217
|
+
└── Very slow!
|
|
218
|
+
|
|
219
|
+
Solutions:
|
|
220
|
+
├── JOIN → Single query with all data
|
|
221
|
+
├── Eager loading → ORM handles JOIN
|
|
222
|
+
├── DataLoader → Batch and cache (GraphQL)
|
|
223
|
+
└── Subquery → Fetch related in one query
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
## Query Analysis Mindset
|
|
227
|
+
|
|
228
|
+
```
|
|
229
|
+
Before optimizing:
|
|
230
|
+
├── EXPLAIN ANALYZE the query
|
|
231
|
+
├── Look for Seq Scan (full table scan)
|
|
232
|
+
├── Check actual vs estimated rows
|
|
233
|
+
└── Identify missing indexes
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
## Optimization Priorities
|
|
237
|
+
|
|
238
|
+
1. **Add missing indexes** (most common issue)
|
|
239
|
+
2. **Select only needed columns** (not SELECT *)
|
|
240
|
+
3. **Use proper JOINs** (avoid subqueries when possible)
|
|
241
|
+
4. **Limit early** (pagination at database level)
|
|
242
|
+
5. **Cache** (when appropriate)
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
---
|
|
247
|
+
# Content from orm-selection.md
|
|
248
|
+
|
|
249
|
+
# ORM Selection (2025)
|
|
250
|
+
|
|
251
|
+
> Choose ORM based on deployment and DX needs.
|
|
252
|
+
|
|
253
|
+
## Decision Tree
|
|
254
|
+
|
|
255
|
+
```
|
|
256
|
+
What's the context?
|
|
257
|
+
│
|
|
258
|
+
├── Edge deployment / Bundle size matters
|
|
259
|
+
│ └── Drizzle (smallest, SQL-like)
|
|
260
|
+
│
|
|
261
|
+
├── Best DX / Schema-first
|
|
262
|
+
│ └── Prisma (migrations, studio)
|
|
263
|
+
│
|
|
264
|
+
├── Maximum control
|
|
265
|
+
│ └── Raw SQL with query builder
|
|
266
|
+
│
|
|
267
|
+
└── Python ecosystem
|
|
268
|
+
└── SQLAlchemy 2.0 (async support)
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
## Comparison
|
|
272
|
+
|
|
273
|
+
| ORM | Best For | Trade-offs |
|
|
274
|
+
|-----|----------|------------|
|
|
275
|
+
| **Drizzle** | Edge, TypeScript | Newer, less examples |
|
|
276
|
+
| **Prisma** | DX, schema management | Heavier, not edge-ready |
|
|
277
|
+
| **Kysely** | Type-safe SQL builder | Manual migrations |
|
|
278
|
+
| **Raw SQL** | Complex queries, control | Manual type safety |
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
---
|
|
283
|
+
# Content from schema-design.md
|
|
284
|
+
|
|
285
|
+
# Schema Design Principles
|
|
286
|
+
|
|
287
|
+
> Normalization, primary keys, timestamps, relationships.
|
|
288
|
+
|
|
289
|
+
## Normalization Decision
|
|
290
|
+
|
|
291
|
+
```
|
|
292
|
+
When to normalize (separate tables):
|
|
293
|
+
├── Data is repeated across rows
|
|
294
|
+
├── Updates would need multiple changes
|
|
295
|
+
├── Relationships are clear
|
|
296
|
+
└── Query patterns benefit
|
|
297
|
+
|
|
298
|
+
When to denormalize (embed/duplicate):
|
|
299
|
+
├── Read performance critical
|
|
300
|
+
├── Data rarely changes
|
|
301
|
+
├── Always fetched together
|
|
302
|
+
└── Simpler queries needed
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
## Primary Key Selection
|
|
306
|
+
|
|
307
|
+
| Type | Use When |
|
|
308
|
+
|------|----------|
|
|
309
|
+
| **UUID** | Distributed systems, security |
|
|
310
|
+
| **ULID** | UUID + sortable by time |
|
|
311
|
+
| **Auto-increment** | Simple apps, single database |
|
|
312
|
+
| **Natural key** | Rarely (business meaning) |
|
|
313
|
+
|
|
314
|
+
## Timestamp Strategy
|
|
315
|
+
|
|
316
|
+
```
|
|
317
|
+
For every table:
|
|
318
|
+
├── created_at → When created
|
|
319
|
+
├── updated_at → Last modified
|
|
320
|
+
└── deleted_at → Soft delete (if needed)
|
|
321
|
+
|
|
322
|
+
Use TIMESTAMPTZ (with timezone) not TIMESTAMP
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
## Relationship Types
|
|
326
|
+
|
|
327
|
+
| Type | When | Implementation |
|
|
328
|
+
|------|------|----------------|
|
|
329
|
+
| **One-to-One** | Extension data | Separate table with FK |
|
|
330
|
+
| **One-to-Many** | Parent-children | FK on child table |
|
|
331
|
+
| **Many-to-Many** | Both sides have many | Junction table |
|
|
332
|
+
|
|
333
|
+
## Foreign Key ON DELETE
|
|
334
|
+
|
|
335
|
+
```
|
|
336
|
+
├── CASCADE → Delete children with parent
|
|
337
|
+
├── SET NULL → Children become orphans
|
|
338
|
+
├── RESTRICT → Prevent delete if children exist
|
|
339
|
+
└── SET DEFAULT → Children get default value
|
|
340
|
+
```
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: deployment-procedures
|
|
3
|
+
description: Production deployment principles and decision-making. Safe deployment workflows, rollback strategies, and verification. Teaches thinking, not scripts.
|
|
4
|
+
allowed-tools: Read, Glob, Grep, Bash
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Deployment Procedures
|
|
8
|
+
|
|
9
|
+
> Deployment principles and decision-making for safe production releases.
|
|
10
|
+
> **Learn to THINK, not memorize scripts.**
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## ⚠️ How to Use This Skill
|
|
15
|
+
|
|
16
|
+
This skill teaches **deployment principles**, not bash scripts to copy.
|
|
17
|
+
|
|
18
|
+
- Every deployment is unique
|
|
19
|
+
- Understand the WHY behind each step
|
|
20
|
+
- Adapt procedures to your platform
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## 1. Platform Selection
|
|
25
|
+
|
|
26
|
+
### Decision Tree
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
What are you deploying?
|
|
30
|
+
│
|
|
31
|
+
├── Static site / JAMstack
|
|
32
|
+
│ └── Vercel, Netlify, Cloudflare Pages
|
|
33
|
+
│
|
|
34
|
+
├── Simple web app
|
|
35
|
+
│ ├── Managed → Railway, Render, Fly.io
|
|
36
|
+
│ └── Control → VPS + PM2/Docker
|
|
37
|
+
│
|
|
38
|
+
├── Microservices
|
|
39
|
+
│ └── Container orchestration
|
|
40
|
+
│
|
|
41
|
+
└── Serverless
|
|
42
|
+
└── Edge functions, Lambda
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Each Platform Has Different Procedures
|
|
46
|
+
|
|
47
|
+
| Platform | Deployment Method |
|
|
48
|
+
|----------|------------------|
|
|
49
|
+
| **Vercel/Netlify** | Git push, auto-deploy |
|
|
50
|
+
| **Railway/Render** | Git push or CLI |
|
|
51
|
+
| **VPS + PM2** | SSH + manual steps |
|
|
52
|
+
| **Docker** | Image push + orchestration |
|
|
53
|
+
| **Kubernetes** | kubectl apply |
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## 2. Pre-Deployment Principles
|
|
58
|
+
|
|
59
|
+
### The 4 Verification Categories
|
|
60
|
+
|
|
61
|
+
| Category | What to Check |
|
|
62
|
+
|----------|--------------|
|
|
63
|
+
| **Code Quality** | Tests passing, linting clean, reviewed |
|
|
64
|
+
| **Build** | Production build works, no warnings |
|
|
65
|
+
| **Environment** | Env vars set, secrets current |
|
|
66
|
+
| **Safety** | Backup done, rollback plan ready |
|
|
67
|
+
|
|
68
|
+
### Pre-Deployment Checklist
|
|
69
|
+
|
|
70
|
+
- [ ] All tests passing
|
|
71
|
+
- [ ] Code reviewed and approved
|
|
72
|
+
- [ ] Production build successful
|
|
73
|
+
- [ ] Environment variables verified
|
|
74
|
+
- [ ] Database migrations ready (if any)
|
|
75
|
+
- [ ] Rollback plan documented
|
|
76
|
+
- [ ] Team notified
|
|
77
|
+
- [ ] Monitoring ready
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## 3. Deployment Workflow Principles
|
|
82
|
+
|
|
83
|
+
### The 5-Phase Process
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
1. PREPARE
|
|
87
|
+
└── Verify code, build, env vars
|
|
88
|
+
|
|
89
|
+
2. BACKUP
|
|
90
|
+
└── Save current state before changing
|
|
91
|
+
|
|
92
|
+
3. DEPLOY
|
|
93
|
+
└── Execute with monitoring open
|
|
94
|
+
|
|
95
|
+
4. VERIFY
|
|
96
|
+
└── Health check, logs, key flows
|
|
97
|
+
|
|
98
|
+
5. CONFIRM or ROLLBACK
|
|
99
|
+
└── All good? Confirm. Issues? Rollback.
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Phase Principles
|
|
103
|
+
|
|
104
|
+
| Phase | Principle |
|
|
105
|
+
|-------|-----------|
|
|
106
|
+
| **Prepare** | Never deploy untested code |
|
|
107
|
+
| **Backup** | Can't rollback without backup |
|
|
108
|
+
| **Deploy** | Watch it happen, don't walk away |
|
|
109
|
+
| **Verify** | Trust but verify |
|
|
110
|
+
| **Confirm** | Have rollback trigger ready |
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## 4. Post-Deployment Verification
|
|
115
|
+
|
|
116
|
+
### What to Verify
|
|
117
|
+
|
|
118
|
+
| Check | Why |
|
|
119
|
+
|-------|-----|
|
|
120
|
+
| **Health endpoint** | Service is running |
|
|
121
|
+
| **Error logs** | No new errors |
|
|
122
|
+
| **Key user flows** | Critical features work |
|
|
123
|
+
| **Performance** | Response times acceptable |
|
|
124
|
+
|
|
125
|
+
### Verification Window
|
|
126
|
+
|
|
127
|
+
- **First 5 minutes**: Active monitoring
|
|
128
|
+
- **15 minutes**: Confirm stable
|
|
129
|
+
- **1 hour**: Final verification
|
|
130
|
+
- **Next day**: Review metrics
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## 5. Rollback Principles
|
|
135
|
+
|
|
136
|
+
### When to Rollback
|
|
137
|
+
|
|
138
|
+
| Symptom | Action |
|
|
139
|
+
|---------|--------|
|
|
140
|
+
| Service down | Rollback immediately |
|
|
141
|
+
| Critical errors | Rollback |
|
|
142
|
+
| Performance >50% degraded | Consider rollback |
|
|
143
|
+
| Minor issues | Fix forward if quick |
|
|
144
|
+
|
|
145
|
+
### Rollback Strategy by Platform
|
|
146
|
+
|
|
147
|
+
| Platform | Rollback Method |
|
|
148
|
+
|----------|----------------|
|
|
149
|
+
| **Vercel/Netlify** | Redeploy previous commit |
|
|
150
|
+
| **Railway/Render** | Rollback in dashboard |
|
|
151
|
+
| **VPS + PM2** | Restore backup, restart |
|
|
152
|
+
| **Docker** | Previous image tag |
|
|
153
|
+
| **K8s** | kubectl rollout undo |
|
|
154
|
+
|
|
155
|
+
### Rollback Principles
|
|
156
|
+
|
|
157
|
+
1. **Speed over perfection**: Rollback first, debug later
|
|
158
|
+
2. **Don't compound errors**: One rollback, not multiple changes
|
|
159
|
+
3. **Communicate**: Tell team what happened
|
|
160
|
+
4. **Post-mortem**: Understand why after stable
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
## 6. Zero-Downtime Deployment
|
|
165
|
+
|
|
166
|
+
### Strategies
|
|
167
|
+
|
|
168
|
+
| Strategy | How It Works |
|
|
169
|
+
|----------|--------------|
|
|
170
|
+
| **Rolling** | Replace instances one by one |
|
|
171
|
+
| **Blue-Green** | Switch traffic between environments |
|
|
172
|
+
| **Canary** | Gradual traffic shift |
|
|
173
|
+
|
|
174
|
+
### Selection Principles
|
|
175
|
+
|
|
176
|
+
| Scenario | Strategy |
|
|
177
|
+
|----------|----------|
|
|
178
|
+
| Standard release | Rolling |
|
|
179
|
+
| High-risk change | Blue-green (easy rollback) |
|
|
180
|
+
| Need validation | Canary (test with real traffic) |
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
## 7. Emergency Procedures
|
|
185
|
+
|
|
186
|
+
### Service Down Priority
|
|
187
|
+
|
|
188
|
+
1. **Assess**: What's the symptom?
|
|
189
|
+
2. **Quick fix**: Restart if unclear
|
|
190
|
+
3. **Rollback**: If restart doesn't help
|
|
191
|
+
4. **Investigate**: After stable
|
|
192
|
+
|
|
193
|
+
### Investigation Order
|
|
194
|
+
|
|
195
|
+
| Check | Common Issues |
|
|
196
|
+
|-------|--------------|
|
|
197
|
+
| **Logs** | Errors, exceptions |
|
|
198
|
+
| **Resources** | Disk full, memory |
|
|
199
|
+
| **Network** | DNS, firewall |
|
|
200
|
+
| **Dependencies** | Database, APIs |
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
## 8. Anti-Patterns
|
|
205
|
+
|
|
206
|
+
| ❌ Don't | ✅ Do |
|
|
207
|
+
|----------|-------|
|
|
208
|
+
| Deploy on Friday | Deploy early in week |
|
|
209
|
+
| Rush deployment | Follow the process |
|
|
210
|
+
| Skip staging | Always test first |
|
|
211
|
+
| Deploy without backup | Backup before deploy |
|
|
212
|
+
| Walk away after deploy | Monitor for 15+ min |
|
|
213
|
+
| Multiple changes at once | One change at a time |
|
|
214
|
+
|
|
215
|
+
---
|
|
216
|
+
|
|
217
|
+
## 9. Decision Checklist
|
|
218
|
+
|
|
219
|
+
Before deploying:
|
|
220
|
+
|
|
221
|
+
- [ ] **Platform-appropriate procedure?**
|
|
222
|
+
- [ ] **Backup strategy ready?**
|
|
223
|
+
- [ ] **Rollback plan documented?**
|
|
224
|
+
- [ ] **Monitoring configured?**
|
|
225
|
+
- [ ] **Team notified?**
|
|
226
|
+
- [ ] **Time to monitor after?**
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
## 10. Best Practices
|
|
231
|
+
|
|
232
|
+
1. **Small, frequent deploys** over big releases
|
|
233
|
+
2. **Feature flags** for risky changes
|
|
234
|
+
3. **Automate** repetitive steps
|
|
235
|
+
4. **Document** every deployment
|
|
236
|
+
5. **Review** what went wrong after issues
|
|
237
|
+
6. **Test rollback** before you need it
|
|
238
|
+
|
|
239
|
+
---
|
|
240
|
+
|
|
241
|
+
> **Remember:** Every deployment is a risk. Minimize risk through preparation, not speed.
|