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,142 @@
|
|
|
1
|
+
# format Command
|
|
2
|
+
|
|
3
|
+
**Purpose:** Auto-format code to project standards
|
|
4
|
+
**Usage:** `npm run format`
|
|
5
|
+
**Trigger:** Fix code style issues
|
|
6
|
+
|
|
7
|
+
## Description
|
|
8
|
+
|
|
9
|
+
Automatically formats code according to project style guide using configured formatters.
|
|
10
|
+
|
|
11
|
+
## Formatters
|
|
12
|
+
|
|
13
|
+
| Language | Tool |
|
|
14
|
+
|---|---|
|
|
15
|
+
| JavaScript/TypeScript | Prettier |
|
|
16
|
+
| JSON | Prettier |
|
|
17
|
+
| Markdown | Prettier |
|
|
18
|
+
| Python | Black, autopep8 |
|
|
19
|
+
| Go | gofmt |
|
|
20
|
+
| Terraform | terraform fmt |
|
|
21
|
+
| YAML | yamlfmt |
|
|
22
|
+
|
|
23
|
+
## Configuration Files
|
|
24
|
+
|
|
25
|
+
- `.prettierrc` - Prettier config
|
|
26
|
+
- `pyproject.toml` - Black config
|
|
27
|
+
- `.editorconfig` - General config
|
|
28
|
+
|
|
29
|
+
## What Gets Formatted
|
|
30
|
+
|
|
31
|
+
- Indentation (spaces/tabs)
|
|
32
|
+
- Line length and wrapping
|
|
33
|
+
- Quote style
|
|
34
|
+
- Semicolon usage
|
|
35
|
+
- Trailing commas
|
|
36
|
+
- Import sorting
|
|
37
|
+
|
|
38
|
+
## Success Criteria
|
|
39
|
+
|
|
40
|
+
✓ All files formatted
|
|
41
|
+
✓ Consistent style
|
|
42
|
+
✓ No syntax errors
|
|
43
|
+
✓ Ready to commit
|
|
44
|
+
|
|
45
|
+
## Running Format
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
# Format all files
|
|
49
|
+
npm run format
|
|
50
|
+
|
|
51
|
+
# Format specific file
|
|
52
|
+
npm run format -- src/app.js
|
|
53
|
+
|
|
54
|
+
# Dry-run (preview only)
|
|
55
|
+
npm run format -- --check
|
|
56
|
+
|
|
57
|
+
# Watch mode
|
|
58
|
+
npm run format -- --watch
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Common Formatters
|
|
62
|
+
|
|
63
|
+
### Prettier (JavaScript/TypeScript/JSON)
|
|
64
|
+
```bash
|
|
65
|
+
prettier --write "**/*.{js,ts,json,md}"
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Black (Python)
|
|
69
|
+
```bash
|
|
70
|
+
black . --quiet
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### gofmt (Go)
|
|
74
|
+
```bash
|
|
75
|
+
gofmt -s -w .
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Before vs After
|
|
79
|
+
|
|
80
|
+
**Before:**
|
|
81
|
+
```js
|
|
82
|
+
function hello( name ) {
|
|
83
|
+
console.log( 'Hello '+name )
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
**After:**
|
|
88
|
+
```js
|
|
89
|
+
function hello(name) {
|
|
90
|
+
console.log("Hello " + name);
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Integration
|
|
95
|
+
|
|
96
|
+
- Pre-commit hook runs format
|
|
97
|
+
- IDE auto-format on save
|
|
98
|
+
- CI/CD checks formatting
|
|
99
|
+
- GitHub actions validate
|
|
100
|
+
|
|
101
|
+
## Failure Recovery
|
|
102
|
+
|
|
103
|
+
If format causes issues:
|
|
104
|
+
1. Review changes
|
|
105
|
+
2. Verify no logic changed
|
|
106
|
+
3. Run tests to confirm
|
|
107
|
+
4. Commit formatted code
|
|
108
|
+
|
|
109
|
+
## Editor Integration
|
|
110
|
+
|
|
111
|
+
### VS Code
|
|
112
|
+
```json
|
|
113
|
+
{
|
|
114
|
+
"editor.formatOnSave": true,
|
|
115
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
|
116
|
+
}
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### Prettier
|
|
120
|
+
```bash
|
|
121
|
+
npx prettier --write .
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## Performance
|
|
125
|
+
|
|
126
|
+
- Prettier: 1-5 seconds
|
|
127
|
+
- Black: 2-10 seconds
|
|
128
|
+
- Multiple tools: 2-10 seconds
|
|
129
|
+
|
|
130
|
+
## Related Commands
|
|
131
|
+
|
|
132
|
+
- `lint` - Code quality checks
|
|
133
|
+
- `validate` - All checks
|
|
134
|
+
- `dev` - Development server
|
|
135
|
+
|
|
136
|
+
## Notes
|
|
137
|
+
|
|
138
|
+
- Format before committing
|
|
139
|
+
- Run in CI/CD
|
|
140
|
+
- Safe to run multiple times
|
|
141
|
+
- Non-destructive (only formatting)
|
|
142
|
+
- Whitespace only changes
|
package/commands/lint.md
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# lint Command
|
|
2
|
+
|
|
3
|
+
**Purpose:** Run linters and code quality checks
|
|
4
|
+
**Usage:** `npm run lint`
|
|
5
|
+
**Trigger:** Before committing code
|
|
6
|
+
|
|
7
|
+
## Description
|
|
8
|
+
|
|
9
|
+
Runs static analysis and linting tools to enforce code quality standards.
|
|
10
|
+
|
|
11
|
+
## Linters
|
|
12
|
+
|
|
13
|
+
| Language | Tool |
|
|
14
|
+
|---|---|
|
|
15
|
+
| JavaScript/TypeScript | ESLint |
|
|
16
|
+
| Markdown | Markdownlint |
|
|
17
|
+
| JSON | jsonlint |
|
|
18
|
+
| Python | Pylint, Flake8 |
|
|
19
|
+
| Go | golint, go vet |
|
|
20
|
+
|
|
21
|
+
## Checks Performed
|
|
22
|
+
|
|
23
|
+
- Code style violations
|
|
24
|
+
- Unused variables
|
|
25
|
+
- Missing imports
|
|
26
|
+
- Undefined variables
|
|
27
|
+
- Best practice violations
|
|
28
|
+
- Complexity issues
|
|
29
|
+
|
|
30
|
+
## Success Criteria
|
|
31
|
+
|
|
32
|
+
✓ No lint errors
|
|
33
|
+
✓ All rules pass
|
|
34
|
+
✓ Code style consistent
|
|
35
|
+
✓ No warnings (if strict)
|
|
36
|
+
|
|
37
|
+
## Configuration
|
|
38
|
+
|
|
39
|
+
- `.eslintrc.json` - ESLint config
|
|
40
|
+
- `.pylintrc` - Pylint config
|
|
41
|
+
- `.markdownlintrc` - Markdown config
|
|
42
|
+
|
|
43
|
+
## Running Lint
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
# Check all files
|
|
47
|
+
npm run lint
|
|
48
|
+
|
|
49
|
+
# Check specific file
|
|
50
|
+
npm run lint -- src/auth.js
|
|
51
|
+
|
|
52
|
+
# Auto-fix issues
|
|
53
|
+
npm run lint -- --fix
|
|
54
|
+
|
|
55
|
+
# Watch mode
|
|
56
|
+
npm run lint -- --watch
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Auto-fix
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
# Auto-fix JavaScript
|
|
63
|
+
npm run lint -- --fix
|
|
64
|
+
|
|
65
|
+
# Format with Prettier
|
|
66
|
+
npm run format
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Failure Handling
|
|
70
|
+
|
|
71
|
+
| Error Type | Blocking |
|
|
72
|
+
|---|---|
|
|
73
|
+
| Error | Yes |
|
|
74
|
+
| Warning | No (unless strict) |
|
|
75
|
+
| Style | No |
|
|
76
|
+
|
|
77
|
+
## Common Issues
|
|
78
|
+
|
|
79
|
+
| Error | Fix |
|
|
80
|
+
|---|---|
|
|
81
|
+
| Unused variable | Remove or prefix with _ |
|
|
82
|
+
| Missing import | Add import statement |
|
|
83
|
+
| Line too long | Break into multiple lines |
|
|
84
|
+
| Inconsistent style | Run format --fix |
|
|
85
|
+
|
|
86
|
+
## Rules Categories
|
|
87
|
+
|
|
88
|
+
- **Best practices** - Prevent bugs
|
|
89
|
+
- **Stylistic** - Code formatting
|
|
90
|
+
- **ES6+** - Modern syntax
|
|
91
|
+
- **Accessibility** - Accessibility rules
|
|
92
|
+
- **Security** - Security issues
|
|
93
|
+
|
|
94
|
+
## Severity Levels
|
|
95
|
+
|
|
96
|
+
- **Error** - Must fix before commit
|
|
97
|
+
- **Warning** - Should fix but not required
|
|
98
|
+
- **Info** - Nice to have
|
|
99
|
+
|
|
100
|
+
## Integration
|
|
101
|
+
|
|
102
|
+
- Pre-commit hook runs lint
|
|
103
|
+
- CI/CD fails on errors
|
|
104
|
+
- IDE shows inline errors
|
|
105
|
+
- GitHub shows in review
|
|
106
|
+
|
|
107
|
+
## Related Commands
|
|
108
|
+
|
|
109
|
+
- `format` - Auto-format code
|
|
110
|
+
- `validate` - All quality checks
|
|
111
|
+
- `type-check` - Type validation
|
|
112
|
+
|
|
113
|
+
## Performance
|
|
114
|
+
|
|
115
|
+
- ESLint: 2-5 seconds
|
|
116
|
+
- Pylint: 5-10 seconds
|
|
117
|
+
- Multiple tools: 5-15 seconds
|
|
118
|
+
|
|
119
|
+
## Notes
|
|
120
|
+
|
|
121
|
+
- Lint before pushing
|
|
122
|
+
- Fix errors immediately
|
|
123
|
+
- Follow team conventions
|
|
124
|
+
- Customize rules per project
|
|
125
|
+
- Update rules as team evolves
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
# migrate Command
|
|
2
|
+
|
|
3
|
+
**Purpose:** Run database migrations
|
|
4
|
+
**Usage:** `npm run migrate`
|
|
5
|
+
**Trigger:** Schema changes, deployment
|
|
6
|
+
|
|
7
|
+
## Description
|
|
8
|
+
|
|
9
|
+
Applies pending database schema changes and updates database structure.
|
|
10
|
+
|
|
11
|
+
## Migration Tools
|
|
12
|
+
|
|
13
|
+
| Framework | Tool |
|
|
14
|
+
|---|---|
|
|
15
|
+
| Node.js | Prisma, Knex, TypeORM |
|
|
16
|
+
| Python | Alembic, Django migrations |
|
|
17
|
+
| Go | golang-migrate |
|
|
18
|
+
| SQL | Manual migration files |
|
|
19
|
+
|
|
20
|
+
## What Migrations Do
|
|
21
|
+
|
|
22
|
+
- Create tables
|
|
23
|
+
- Add/remove columns
|
|
24
|
+
- Create indexes
|
|
25
|
+
- Modify constraints
|
|
26
|
+
- Update data
|
|
27
|
+
|
|
28
|
+
## Success Criteria
|
|
29
|
+
|
|
30
|
+
✓ No errors
|
|
31
|
+
✓ Schema updated
|
|
32
|
+
✓ Data intact
|
|
33
|
+
✓ Rollback available
|
|
34
|
+
|
|
35
|
+
## Running Migrations
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
# Run all pending migrations
|
|
39
|
+
npm run migrate
|
|
40
|
+
|
|
41
|
+
# Specific migration
|
|
42
|
+
npm run migrate -- migration-name
|
|
43
|
+
|
|
44
|
+
# Dry-run (preview)
|
|
45
|
+
npm run migrate -- --dry-run
|
|
46
|
+
|
|
47
|
+
# Rollback
|
|
48
|
+
npm run migrate -- rollback
|
|
49
|
+
|
|
50
|
+
# Status
|
|
51
|
+
npm run migrate -- status
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Types of Migrations
|
|
55
|
+
|
|
56
|
+
### Schema Changes
|
|
57
|
+
```sql
|
|
58
|
+
ALTER TABLE users ADD COLUMN age INT;
|
|
59
|
+
CREATE INDEX idx_email ON users(email);
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Data Migrations
|
|
63
|
+
```sql
|
|
64
|
+
UPDATE users SET status = 'active' WHERE created_at > NOW();
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Migration Files
|
|
68
|
+
|
|
69
|
+
Located in `migrations/` or `db/migrations/`
|
|
70
|
+
|
|
71
|
+
**Naming:**
|
|
72
|
+
- `001_create_users.sql`
|
|
73
|
+
- `002_add_email_index.sql`
|
|
74
|
+
- `003_backfill_status.sql`
|
|
75
|
+
|
|
76
|
+
## Prisma Migrations
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
# Create migration
|
|
80
|
+
prisma migrate dev --name add_email
|
|
81
|
+
|
|
82
|
+
# Deploy
|
|
83
|
+
prisma migrate deploy
|
|
84
|
+
|
|
85
|
+
# Rollback
|
|
86
|
+
prisma migrate resolve --rolled-back add_email
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Django Migrations
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
# Make migrations
|
|
93
|
+
python manage.py makemigrations
|
|
94
|
+
|
|
95
|
+
# Apply
|
|
96
|
+
python manage.py migrate
|
|
97
|
+
|
|
98
|
+
# Rollback
|
|
99
|
+
python manage.py migrate app 0001
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## Safety
|
|
103
|
+
|
|
104
|
+
Migrations are:
|
|
105
|
+
- Version controlled
|
|
106
|
+
- Reversible (when possible)
|
|
107
|
+
- Tracked in database
|
|
108
|
+
- Atomic (all or nothing)
|
|
109
|
+
|
|
110
|
+
## Failure Handling
|
|
111
|
+
|
|
112
|
+
| Failure | Recovery |
|
|
113
|
+
|---|---|
|
|
114
|
+
| Syntax error | Fix migration, retry |
|
|
115
|
+
| Constraint violation | Adjust migration, retry |
|
|
116
|
+
| Data loss | Restore backup, fix migration |
|
|
117
|
+
|
|
118
|
+
## Data Safety
|
|
119
|
+
|
|
120
|
+
✓ Always backup first
|
|
121
|
+
✓ Test in staging
|
|
122
|
+
✓ Never skip migrations
|
|
123
|
+
✓ Keep migrations small
|
|
124
|
+
✓ Document complex changes
|
|
125
|
+
|
|
126
|
+
## Environment Variables
|
|
127
|
+
|
|
128
|
+
- `DATABASE_URL` - Database connection
|
|
129
|
+
- `SKIP_HOOKS=true` - Skip validation
|
|
130
|
+
|
|
131
|
+
## Performance
|
|
132
|
+
|
|
133
|
+
Migration time varies:
|
|
134
|
+
- Small schema: < 1 second
|
|
135
|
+
- Data migration: Seconds to minutes
|
|
136
|
+
- Large tables: Can take longer
|
|
137
|
+
|
|
138
|
+
## Best Practices
|
|
139
|
+
|
|
140
|
+
✓ One logical change per migration
|
|
141
|
+
✓ Test migrations locally
|
|
142
|
+
✓ Migrations are one-way
|
|
143
|
+
✓ Keep migrations small
|
|
144
|
+
✓ Document complex logic
|
|
145
|
+
✓ No downtime migrations
|
|
146
|
+
|
|
147
|
+
## Related Commands
|
|
148
|
+
|
|
149
|
+
- `seed` - Populate test data
|
|
150
|
+
- `setup` - Initial environment
|
|
151
|
+
- `deploy-staging` - Deploy with migrations
|
|
152
|
+
|
|
153
|
+
## Notes
|
|
154
|
+
|
|
155
|
+
- Migrations run on deploy
|
|
156
|
+
- Order matters (sequential)
|
|
157
|
+
- Cannot skip migrations
|
|
158
|
+
- Backup before large migrations
|
|
159
|
+
- Test rollback scenarios
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
# release Command
|
|
2
|
+
|
|
3
|
+
**Purpose:** Create a release with version bump, changelog, and git tags
|
|
4
|
+
**Usage:** `npm run release [major|minor|patch]`
|
|
5
|
+
**Trigger:** Release to users
|
|
6
|
+
|
|
7
|
+
## Description
|
|
8
|
+
|
|
9
|
+
Automates release process: version bump, changelog generation, git tagging, and version commit.
|
|
10
|
+
|
|
11
|
+
## Release Types
|
|
12
|
+
|
|
13
|
+
| Type | Version Change | When |
|
|
14
|
+
|---|---|---|
|
|
15
|
+
| **patch** | 1.0.0 → 1.0.1 | Bug fixes |
|
|
16
|
+
| **minor** | 1.0.0 → 1.1.0 | New features |
|
|
17
|
+
| **major** | 1.0.0 → 2.0.0 | Breaking changes |
|
|
18
|
+
|
|
19
|
+
## Pre-release Checklist
|
|
20
|
+
|
|
21
|
+
✓ On main/master
|
|
22
|
+
✓ All tests passing
|
|
23
|
+
✓ Code committed
|
|
24
|
+
✓ No uncommitted changes
|
|
25
|
+
✓ Branch up to date
|
|
26
|
+
✓ Changelog reviewed
|
|
27
|
+
|
|
28
|
+
## Release Process
|
|
29
|
+
|
|
30
|
+
1. **Validate** - Ensure all checks pass
|
|
31
|
+
2. **Version bump** - Update version numbers
|
|
32
|
+
3. **Changelog** - Generate from commits
|
|
33
|
+
4. **Commit** - Version bump commit
|
|
34
|
+
5. **Tag** - Create git tag
|
|
35
|
+
6. **Push** - Push to remote
|
|
36
|
+
|
|
37
|
+
## Running Release
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
# Patch release (bugfix)
|
|
41
|
+
npm run release patch
|
|
42
|
+
|
|
43
|
+
# Minor release (feature)
|
|
44
|
+
npm run release minor
|
|
45
|
+
|
|
46
|
+
# Major release (breaking)
|
|
47
|
+
npm run release major
|
|
48
|
+
|
|
49
|
+
# Custom version
|
|
50
|
+
npm run release 2.1.0
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## What Gets Updated
|
|
54
|
+
|
|
55
|
+
- `package.json` - Version
|
|
56
|
+
- `package-lock.json` - Lock version
|
|
57
|
+
- `CHANGELOG.md` - Release notes
|
|
58
|
+
- `setup.py` - Python version (if exists)
|
|
59
|
+
- `Cargo.toml` - Rust version (if exists)
|
|
60
|
+
|
|
61
|
+
## Changelog Generation
|
|
62
|
+
|
|
63
|
+
Automatic from commit messages:
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
feat: Add new API endpoint → Added
|
|
67
|
+
fix: Resolve database issue → Fixed
|
|
68
|
+
docs: Update README → Documentation
|
|
69
|
+
refactor: Clean up code → Changed
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Version Numbering
|
|
73
|
+
|
|
74
|
+
Follow Semantic Versioning (semver):
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
MAJOR.MINOR.PATCH
|
|
78
|
+
2 . 1 . 0
|
|
79
|
+
|
|
80
|
+
Breaking change → MAJOR++
|
|
81
|
+
New feature → MINOR++
|
|
82
|
+
Bug fix → PATCH++
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Git Tags
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
Tag format: v1.2.3
|
|
89
|
+
Example: v2.1.0
|
|
90
|
+
|
|
91
|
+
git tag -a v2.1.0 -m "Release v2.1.0"
|
|
92
|
+
git push origin v2.1.0
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Release Validation
|
|
96
|
+
|
|
97
|
+
Before tagging:
|
|
98
|
+
✓ Build succeeds
|
|
99
|
+
✓ Tests pass
|
|
100
|
+
✓ Lint passes
|
|
101
|
+
✓ Type checks pass
|
|
102
|
+
|
|
103
|
+
## After Release
|
|
104
|
+
|
|
105
|
+
1. **GitHub Release**
|
|
106
|
+
- Go to Releases tab
|
|
107
|
+
- Create release from tag
|
|
108
|
+
- Copy changelog
|
|
109
|
+
- Publish release
|
|
110
|
+
|
|
111
|
+
2. **Deploy**
|
|
112
|
+
- Deploy to staging
|
|
113
|
+
- Test in staging
|
|
114
|
+
- Deploy to production
|
|
115
|
+
|
|
116
|
+
3. **Announce**
|
|
117
|
+
- Post release notes
|
|
118
|
+
- Update website
|
|
119
|
+
- Notify users
|
|
120
|
+
- Send email
|
|
121
|
+
|
|
122
|
+
## Version Examples
|
|
123
|
+
|
|
124
|
+
```
|
|
125
|
+
1.0.0 - Initial release
|
|
126
|
+
1.0.1 - Bugfix patch
|
|
127
|
+
1.1.0 - New feature (minor)
|
|
128
|
+
2.0.0 - Major breaking changes
|
|
129
|
+
|
|
130
|
+
Development: 1.0.0-alpha.1
|
|
131
|
+
Pre-release: 1.0.0-rc.1
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## Release Schedule
|
|
135
|
+
|
|
136
|
+
Recommended:
|
|
137
|
+
- Patch: As needed (bugs)
|
|
138
|
+
- Minor: Every 2-4 weeks
|
|
139
|
+
- Major: Every quarter or on schedule
|
|
140
|
+
|
|
141
|
+
## Rollback from Release
|
|
142
|
+
|
|
143
|
+
If released version is broken:
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
# Revert tag
|
|
147
|
+
git tag -d v1.2.3
|
|
148
|
+
git push origin :refs/tags/v1.2.3
|
|
149
|
+
|
|
150
|
+
# Rollback code
|
|
151
|
+
git reset --hard v1.2.2
|
|
152
|
+
git push --force
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## Release Checklist
|
|
156
|
+
|
|
157
|
+
- [ ] Tests passing
|
|
158
|
+
- [ ] Lint passing
|
|
159
|
+
- [ ] Build succeeding
|
|
160
|
+
- [ ] Changelog updated
|
|
161
|
+
- [ ] Version bumped
|
|
162
|
+
- [ ] On main branch
|
|
163
|
+
- [ ] No uncommitted changes
|
|
164
|
+
- [ ] Tag created
|
|
165
|
+
- [ ] Pushed to remote
|
|
166
|
+
- [ ] GitHub release created
|
|
167
|
+
- [ ] Deploy to staging
|
|
168
|
+
- [ ] Deploy to production
|
|
169
|
+
|
|
170
|
+
## Related Commands
|
|
171
|
+
|
|
172
|
+
- `deploy-staging` - Test in staging
|
|
173
|
+
- `deploy-prod` - Release to users
|
|
174
|
+
- `validate` - Pre-release checks
|
|
175
|
+
|
|
176
|
+
## Notes
|
|
177
|
+
|
|
178
|
+
- Releases are permanent
|
|
179
|
+
- Tags cannot be moved
|
|
180
|
+
- Version numbers are forever
|
|
181
|
+
- Document breaking changes
|
|
182
|
+
- Plan major releases
|
|
183
|
+
- Keep releases focused
|