devflow-kit 0.9.0 → 1.1.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/CHANGELOG.md +197 -29
- package/LICENSE +1 -1
- package/README.md +185 -309
- package/dist/cli.js +7 -1
- package/dist/commands/ambient.d.ts +18 -0
- package/dist/commands/ambient.js +136 -0
- package/dist/commands/init.d.ts +23 -0
- package/dist/commands/init.js +393 -571
- package/dist/commands/list.d.ts +3 -0
- package/dist/commands/list.js +20 -0
- package/dist/commands/memory.d.ts +22 -0
- package/dist/commands/memory.js +175 -0
- package/dist/commands/uninstall.d.ts +10 -0
- package/dist/commands/uninstall.js +418 -78
- package/dist/plugins.d.ts +46 -0
- package/dist/plugins.js +169 -0
- package/dist/utils/cli.d.ts +5 -0
- package/dist/utils/cli.js +14 -0
- package/dist/utils/installer.d.ts +41 -0
- package/dist/utils/installer.js +177 -0
- package/dist/utils/paths.d.ts +10 -0
- package/dist/utils/paths.js +23 -3
- package/dist/utils/post-install.d.ts +80 -0
- package/dist/utils/post-install.js +508 -0
- package/dist/utils/safe-delete-install.d.ts +29 -0
- package/dist/utils/safe-delete-install.js +191 -0
- package/dist/utils/safe-delete.d.ts +12 -0
- package/dist/utils/safe-delete.js +83 -0
- package/package.json +18 -8
- package/plugins/devflow-ambient/.claude-plugin/plugin.json +7 -0
- package/plugins/devflow-ambient/README.md +49 -0
- package/plugins/devflow-ambient/commands/ambient.md +110 -0
- package/plugins/devflow-ambient/skills/ambient-router/SKILL.md +89 -0
- package/plugins/devflow-ambient/skills/ambient-router/references/skill-catalog.md +64 -0
- package/plugins/devflow-audit-claude/.claude-plugin/plugin.json +7 -0
- package/plugins/devflow-audit-claude/README.md +46 -0
- package/plugins/devflow-audit-claude/agents/claude-md-auditor.md +134 -0
- package/plugins/devflow-audit-claude/commands/audit-claude.md +85 -0
- package/plugins/devflow-code-review/.claude-plugin/plugin.json +31 -0
- package/plugins/devflow-code-review/README.md +73 -0
- package/plugins/devflow-code-review/agents/git.md +272 -0
- package/plugins/devflow-code-review/agents/reviewer.md +119 -0
- package/plugins/devflow-code-review/agents/synthesizer.md +204 -0
- package/plugins/devflow-code-review/commands/code-review-teams.md +262 -0
- package/plugins/devflow-code-review/commands/code-review.md +141 -0
- package/plugins/devflow-code-review/skills/accessibility/SKILL.md +229 -0
- package/plugins/devflow-code-review/skills/accessibility/references/detection.md +171 -0
- package/plugins/devflow-code-review/skills/accessibility/references/patterns.md +670 -0
- package/plugins/devflow-code-review/skills/accessibility/references/violations.md +419 -0
- package/plugins/devflow-code-review/skills/agent-teams/SKILL.md +124 -0
- package/plugins/devflow-code-review/skills/agent-teams/references/cleanup.md +104 -0
- package/plugins/devflow-code-review/skills/agent-teams/references/communication.md +122 -0
- package/plugins/devflow-code-review/skills/agent-teams/references/team-patterns.md +217 -0
- package/plugins/devflow-code-review/skills/architecture-patterns/SKILL.md +153 -0
- package/plugins/devflow-code-review/skills/architecture-patterns/references/detection.md +337 -0
- package/plugins/devflow-code-review/skills/architecture-patterns/references/patterns.md +873 -0
- package/plugins/devflow-code-review/skills/architecture-patterns/references/violations.md +575 -0
- package/plugins/devflow-code-review/skills/complexity-patterns/SKILL.md +143 -0
- package/plugins/devflow-code-review/skills/complexity-patterns/references/detection.md +264 -0
- package/plugins/devflow-code-review/skills/complexity-patterns/references/patterns.md +487 -0
- package/plugins/devflow-code-review/skills/complexity-patterns/references/violations.md +361 -0
- package/plugins/devflow-code-review/skills/consistency-patterns/SKILL.md +140 -0
- package/plugins/devflow-code-review/skills/consistency-patterns/references/detection.md +207 -0
- package/plugins/devflow-code-review/skills/consistency-patterns/references/patterns.md +202 -0
- package/plugins/devflow-code-review/skills/consistency-patterns/references/violations.md +213 -0
- package/plugins/devflow-code-review/skills/database-patterns/SKILL.md +134 -0
- package/plugins/devflow-code-review/skills/database-patterns/references/detection.md +208 -0
- package/plugins/devflow-code-review/skills/database-patterns/references/patterns.md +394 -0
- package/plugins/devflow-code-review/skills/database-patterns/references/violations.md +332 -0
- package/plugins/devflow-code-review/skills/dependencies-patterns/SKILL.md +141 -0
- package/plugins/devflow-code-review/skills/dependencies-patterns/references/detection.md +181 -0
- package/plugins/devflow-code-review/skills/dependencies-patterns/references/patterns.md +225 -0
- package/plugins/devflow-code-review/skills/dependencies-patterns/references/violations.md +247 -0
- package/plugins/devflow-code-review/skills/documentation-patterns/SKILL.md +125 -0
- package/plugins/devflow-code-review/skills/documentation-patterns/references/detection.md +190 -0
- package/plugins/devflow-code-review/skills/documentation-patterns/references/patterns.md +189 -0
- package/plugins/devflow-code-review/skills/documentation-patterns/references/violations.md +163 -0
- package/plugins/devflow-code-review/skills/frontend-design/SKILL.md +254 -0
- package/plugins/devflow-code-review/skills/frontend-design/references/detection.md +184 -0
- package/plugins/devflow-code-review/skills/frontend-design/references/patterns.md +511 -0
- package/plugins/devflow-code-review/skills/frontend-design/references/violations.md +453 -0
- package/plugins/devflow-code-review/skills/performance-patterns/SKILL.md +154 -0
- package/plugins/devflow-code-review/skills/performance-patterns/references/detection.md +351 -0
- package/plugins/devflow-code-review/skills/performance-patterns/references/patterns.md +503 -0
- package/plugins/devflow-code-review/skills/performance-patterns/references/violations.md +354 -0
- package/plugins/devflow-code-review/skills/react/SKILL.md +276 -0
- package/plugins/devflow-code-review/skills/react/references/patterns.md +1331 -0
- package/plugins/devflow-code-review/skills/react/references/violations.md +565 -0
- package/plugins/devflow-code-review/skills/regression-patterns/SKILL.md +146 -0
- package/plugins/devflow-code-review/skills/regression-patterns/references/detection.md +237 -0
- package/plugins/devflow-code-review/skills/regression-patterns/references/patterns.md +226 -0
- package/plugins/devflow-code-review/skills/regression-patterns/references/violations.md +225 -0
- package/plugins/devflow-code-review/skills/review-methodology/SKILL.md +119 -0
- package/plugins/devflow-code-review/skills/review-methodology/references/patterns.md +186 -0
- package/plugins/devflow-code-review/skills/review-methodology/references/report-template.md +142 -0
- package/plugins/devflow-code-review/skills/review-methodology/references/violations.md +125 -0
- package/plugins/devflow-code-review/skills/security-patterns/SKILL.md +156 -0
- package/plugins/devflow-code-review/skills/security-patterns/references/detection.md +287 -0
- package/plugins/devflow-code-review/skills/security-patterns/references/patterns.md +507 -0
- package/plugins/devflow-code-review/skills/security-patterns/references/violations.md +237 -0
- package/plugins/devflow-code-review/skills/test-patterns/SKILL.md +183 -0
- package/plugins/devflow-code-review/skills/test-patterns/references/detection.md +149 -0
- package/plugins/devflow-code-review/skills/test-patterns/references/patterns.md +220 -0
- package/plugins/devflow-code-review/skills/test-patterns/references/report-template.md +108 -0
- package/plugins/devflow-code-review/skills/test-patterns/references/violations.md +221 -0
- package/plugins/devflow-core-skills/.claude-plugin/plugin.json +28 -0
- package/plugins/devflow-core-skills/README.md +50 -0
- package/plugins/devflow-core-skills/skills/accessibility/SKILL.md +229 -0
- package/plugins/devflow-core-skills/skills/accessibility/references/detection.md +171 -0
- package/plugins/devflow-core-skills/skills/accessibility/references/patterns.md +670 -0
- package/plugins/devflow-core-skills/skills/accessibility/references/violations.md +419 -0
- package/plugins/devflow-core-skills/skills/core-patterns/SKILL.md +162 -0
- package/plugins/devflow-core-skills/skills/core-patterns/references/checklist.md +276 -0
- package/plugins/devflow-core-skills/skills/core-patterns/references/code-smell-violations.md +144 -0
- package/plugins/devflow-core-skills/skills/core-patterns/references/detection.md +303 -0
- package/plugins/devflow-core-skills/skills/core-patterns/references/patterns.md +576 -0
- package/plugins/devflow-core-skills/skills/core-patterns/references/violations.md +369 -0
- package/plugins/devflow-core-skills/skills/docs-framework/SKILL.md +138 -0
- package/plugins/devflow-core-skills/skills/docs-framework/references/patterns.md +346 -0
- package/plugins/devflow-core-skills/skills/docs-framework/references/violations.md +221 -0
- package/plugins/devflow-core-skills/skills/frontend-design/SKILL.md +254 -0
- package/plugins/devflow-core-skills/skills/frontend-design/references/detection.md +184 -0
- package/plugins/devflow-core-skills/skills/frontend-design/references/patterns.md +511 -0
- package/plugins/devflow-core-skills/skills/frontend-design/references/violations.md +453 -0
- package/plugins/devflow-core-skills/skills/git-safety/SKILL.md +122 -0
- package/plugins/devflow-core-skills/skills/git-safety/references/detection.md +290 -0
- package/plugins/devflow-core-skills/skills/git-safety/references/patterns.md +289 -0
- package/plugins/devflow-core-skills/skills/git-safety/references/violations.md +18 -0
- package/plugins/devflow-core-skills/skills/git-workflow/SKILL.md +158 -0
- package/plugins/devflow-core-skills/skills/git-workflow/references/commit-patterns.md +115 -0
- package/plugins/devflow-core-skills/skills/git-workflow/references/commit-violations.md +77 -0
- package/plugins/devflow-core-skills/skills/git-workflow/references/pr-patterns.md +127 -0
- package/plugins/devflow-core-skills/skills/git-workflow/references/pr-violations.md +96 -0
- package/plugins/devflow-core-skills/skills/github-patterns/SKILL.md +153 -0
- package/plugins/devflow-core-skills/skills/github-patterns/references/patterns.md +572 -0
- package/plugins/devflow-core-skills/skills/github-patterns/references/violations.md +298 -0
- package/plugins/devflow-core-skills/skills/input-validation/SKILL.md +148 -0
- package/plugins/devflow-core-skills/skills/input-validation/references/detection.md +283 -0
- package/plugins/devflow-core-skills/skills/input-validation/references/patterns.md +361 -0
- package/plugins/devflow-core-skills/skills/input-validation/references/violations.md +224 -0
- package/plugins/devflow-core-skills/skills/react/SKILL.md +276 -0
- package/plugins/devflow-core-skills/skills/react/references/patterns.md +1331 -0
- package/plugins/devflow-core-skills/skills/react/references/violations.md +565 -0
- package/plugins/devflow-core-skills/skills/test-driven-development/SKILL.md +139 -0
- package/plugins/devflow-core-skills/skills/test-driven-development/references/rationalization-prevention.md +111 -0
- package/plugins/devflow-core-skills/skills/test-patterns/SKILL.md +183 -0
- package/plugins/devflow-core-skills/skills/test-patterns/references/detection.md +149 -0
- package/plugins/devflow-core-skills/skills/test-patterns/references/patterns.md +220 -0
- package/plugins/devflow-core-skills/skills/test-patterns/references/report-template.md +108 -0
- package/plugins/devflow-core-skills/skills/test-patterns/references/violations.md +221 -0
- package/plugins/devflow-core-skills/skills/typescript/SKILL.md +176 -0
- package/plugins/devflow-core-skills/skills/typescript/references/patterns.md +1105 -0
- package/plugins/devflow-core-skills/skills/typescript/references/violations.md +433 -0
- package/plugins/devflow-debug/.claude-plugin/plugin.json +18 -0
- package/plugins/devflow-debug/README.md +65 -0
- package/plugins/devflow-debug/agents/git.md +272 -0
- package/plugins/devflow-debug/commands/debug-teams.md +231 -0
- package/plugins/devflow-debug/commands/debug.md +160 -0
- package/plugins/devflow-debug/skills/agent-teams/SKILL.md +124 -0
- package/plugins/devflow-debug/skills/agent-teams/references/cleanup.md +104 -0
- package/plugins/devflow-debug/skills/agent-teams/references/communication.md +122 -0
- package/plugins/devflow-debug/skills/agent-teams/references/team-patterns.md +217 -0
- package/plugins/devflow-debug/skills/git-safety/SKILL.md +122 -0
- package/plugins/devflow-debug/skills/git-safety/references/detection.md +290 -0
- package/plugins/devflow-debug/skills/git-safety/references/patterns.md +289 -0
- package/plugins/devflow-debug/skills/git-safety/references/violations.md +18 -0
- package/plugins/devflow-implement/.claude-plugin/plugin.json +21 -0
- package/plugins/devflow-implement/README.md +71 -0
- package/plugins/devflow-implement/agents/coder.md +122 -0
- package/plugins/devflow-implement/agents/git.md +272 -0
- package/plugins/devflow-implement/agents/scrutinizer.md +80 -0
- package/plugins/devflow-implement/agents/shepherd.md +94 -0
- package/plugins/devflow-implement/agents/simplifier.md +62 -0
- package/plugins/devflow-implement/agents/skimmer.md +88 -0
- package/plugins/devflow-implement/agents/synthesizer.md +204 -0
- package/plugins/devflow-implement/agents/validator.md +86 -0
- package/plugins/devflow-implement/commands/implement-teams.md +608 -0
- package/plugins/devflow-implement/commands/implement.md +426 -0
- package/plugins/devflow-implement/skills/accessibility/SKILL.md +229 -0
- package/plugins/devflow-implement/skills/accessibility/references/detection.md +171 -0
- package/plugins/devflow-implement/skills/accessibility/references/patterns.md +670 -0
- package/plugins/devflow-implement/skills/accessibility/references/violations.md +419 -0
- package/plugins/devflow-implement/skills/agent-teams/SKILL.md +124 -0
- package/plugins/devflow-implement/skills/agent-teams/references/cleanup.md +104 -0
- package/plugins/devflow-implement/skills/agent-teams/references/communication.md +122 -0
- package/plugins/devflow-implement/skills/agent-teams/references/team-patterns.md +217 -0
- package/plugins/devflow-implement/skills/frontend-design/SKILL.md +254 -0
- package/plugins/devflow-implement/skills/frontend-design/references/detection.md +184 -0
- package/plugins/devflow-implement/skills/frontend-design/references/patterns.md +511 -0
- package/plugins/devflow-implement/skills/frontend-design/references/violations.md +453 -0
- package/plugins/devflow-implement/skills/implementation-patterns/SKILL.md +162 -0
- package/plugins/devflow-implement/skills/implementation-patterns/references/patterns.md +1063 -0
- package/plugins/devflow-implement/skills/implementation-patterns/references/violations.md +483 -0
- package/plugins/devflow-implement/skills/self-review/SKILL.md +149 -0
- package/plugins/devflow-implement/skills/self-review/references/patterns.md +405 -0
- package/plugins/devflow-implement/skills/self-review/references/report-template.md +253 -0
- package/plugins/devflow-implement/skills/self-review/references/violations.md +308 -0
- package/plugins/devflow-resolve/.claude-plugin/plugin.json +19 -0
- package/plugins/devflow-resolve/README.md +65 -0
- package/plugins/devflow-resolve/agents/git.md +272 -0
- package/plugins/devflow-resolve/agents/resolver.md +131 -0
- package/plugins/devflow-resolve/agents/simplifier.md +62 -0
- package/plugins/devflow-resolve/commands/resolve-teams.md +298 -0
- package/plugins/devflow-resolve/commands/resolve.md +237 -0
- package/plugins/devflow-resolve/skills/agent-teams/SKILL.md +124 -0
- package/plugins/devflow-resolve/skills/agent-teams/references/cleanup.md +104 -0
- package/plugins/devflow-resolve/skills/agent-teams/references/communication.md +122 -0
- package/plugins/devflow-resolve/skills/agent-teams/references/team-patterns.md +217 -0
- package/plugins/devflow-resolve/skills/implementation-patterns/SKILL.md +162 -0
- package/plugins/devflow-resolve/skills/implementation-patterns/references/patterns.md +1063 -0
- package/plugins/devflow-resolve/skills/implementation-patterns/references/violations.md +483 -0
- package/plugins/devflow-resolve/skills/security-patterns/SKILL.md +156 -0
- package/plugins/devflow-resolve/skills/security-patterns/references/detection.md +287 -0
- package/plugins/devflow-resolve/skills/security-patterns/references/patterns.md +507 -0
- package/plugins/devflow-resolve/skills/security-patterns/references/violations.md +237 -0
- package/plugins/devflow-self-review/.claude-plugin/plugin.json +7 -0
- package/plugins/devflow-self-review/README.md +38 -0
- package/plugins/devflow-self-review/agents/scrutinizer.md +80 -0
- package/plugins/devflow-self-review/agents/simplifier.md +62 -0
- package/plugins/devflow-self-review/agents/validator.md +86 -0
- package/plugins/devflow-self-review/commands/self-review.md +126 -0
- package/plugins/devflow-self-review/skills/core-patterns/SKILL.md +162 -0
- package/plugins/devflow-self-review/skills/core-patterns/references/checklist.md +276 -0
- package/plugins/devflow-self-review/skills/core-patterns/references/code-smell-violations.md +144 -0
- package/plugins/devflow-self-review/skills/core-patterns/references/detection.md +303 -0
- package/plugins/devflow-self-review/skills/core-patterns/references/patterns.md +576 -0
- package/plugins/devflow-self-review/skills/core-patterns/references/violations.md +369 -0
- package/plugins/devflow-self-review/skills/self-review/SKILL.md +149 -0
- package/plugins/devflow-self-review/skills/self-review/references/patterns.md +405 -0
- package/plugins/devflow-self-review/skills/self-review/references/report-template.md +253 -0
- package/plugins/devflow-self-review/skills/self-review/references/violations.md +308 -0
- package/plugins/devflow-specify/.claude-plugin/plugin.json +15 -0
- package/plugins/devflow-specify/README.md +46 -0
- package/plugins/devflow-specify/agents/skimmer.md +88 -0
- package/plugins/devflow-specify/agents/synthesizer.md +204 -0
- package/plugins/devflow-specify/commands/specify-teams.md +314 -0
- package/plugins/devflow-specify/commands/specify.md +179 -0
- package/plugins/devflow-specify/skills/agent-teams/SKILL.md +124 -0
- package/plugins/devflow-specify/skills/agent-teams/references/cleanup.md +104 -0
- package/plugins/devflow-specify/skills/agent-teams/references/communication.md +122 -0
- package/plugins/devflow-specify/skills/agent-teams/references/team-patterns.md +217 -0
- package/scripts/hooks/ambient-prompt.sh +48 -0
- package/scripts/hooks/background-memory-update.sh +208 -0
- package/scripts/hooks/ensure-memory-gitignore.sh +17 -0
- package/scripts/hooks/pre-compact-memory.sh +87 -0
- package/scripts/hooks/session-start-memory.sh +126 -0
- package/scripts/hooks/stop-update-memory.sh +85 -0
- package/shared/agents/coder.md +122 -0
- package/shared/agents/git.md +272 -0
- package/shared/agents/resolver.md +131 -0
- package/shared/agents/reviewer.md +119 -0
- package/shared/agents/scrutinizer.md +80 -0
- package/shared/agents/shepherd.md +94 -0
- package/shared/agents/simplifier.md +62 -0
- package/shared/agents/skimmer.md +88 -0
- package/shared/agents/synthesizer.md +204 -0
- package/shared/agents/validator.md +86 -0
- package/shared/skills/accessibility/SKILL.md +229 -0
- package/shared/skills/accessibility/references/detection.md +171 -0
- package/shared/skills/accessibility/references/patterns.md +670 -0
- package/shared/skills/accessibility/references/violations.md +419 -0
- package/shared/skills/agent-teams/SKILL.md +124 -0
- package/shared/skills/agent-teams/references/cleanup.md +104 -0
- package/shared/skills/agent-teams/references/communication.md +122 -0
- package/shared/skills/agent-teams/references/team-patterns.md +217 -0
- package/shared/skills/ambient-router/SKILL.md +89 -0
- package/shared/skills/ambient-router/references/skill-catalog.md +64 -0
- package/shared/skills/architecture-patterns/SKILL.md +153 -0
- package/shared/skills/architecture-patterns/references/detection.md +337 -0
- package/shared/skills/architecture-patterns/references/patterns.md +873 -0
- package/shared/skills/architecture-patterns/references/violations.md +575 -0
- package/shared/skills/complexity-patterns/SKILL.md +143 -0
- package/shared/skills/complexity-patterns/references/detection.md +264 -0
- package/shared/skills/complexity-patterns/references/patterns.md +487 -0
- package/shared/skills/complexity-patterns/references/violations.md +361 -0
- package/shared/skills/consistency-patterns/SKILL.md +140 -0
- package/shared/skills/consistency-patterns/references/detection.md +207 -0
- package/shared/skills/consistency-patterns/references/patterns.md +202 -0
- package/shared/skills/consistency-patterns/references/violations.md +213 -0
- package/shared/skills/core-patterns/SKILL.md +162 -0
- package/shared/skills/core-patterns/references/checklist.md +276 -0
- package/shared/skills/core-patterns/references/code-smell-violations.md +144 -0
- package/shared/skills/core-patterns/references/detection.md +303 -0
- package/shared/skills/core-patterns/references/patterns.md +576 -0
- package/shared/skills/core-patterns/references/violations.md +369 -0
- package/shared/skills/database-patterns/SKILL.md +134 -0
- package/shared/skills/database-patterns/references/detection.md +208 -0
- package/shared/skills/database-patterns/references/patterns.md +394 -0
- package/shared/skills/database-patterns/references/violations.md +332 -0
- package/shared/skills/dependencies-patterns/SKILL.md +141 -0
- package/shared/skills/dependencies-patterns/references/detection.md +181 -0
- package/shared/skills/dependencies-patterns/references/patterns.md +225 -0
- package/shared/skills/dependencies-patterns/references/violations.md +247 -0
- package/shared/skills/docs-framework/SKILL.md +138 -0
- package/shared/skills/docs-framework/references/patterns.md +346 -0
- package/shared/skills/docs-framework/references/violations.md +221 -0
- package/shared/skills/documentation-patterns/SKILL.md +125 -0
- package/shared/skills/documentation-patterns/references/detection.md +190 -0
- package/shared/skills/documentation-patterns/references/patterns.md +189 -0
- package/shared/skills/documentation-patterns/references/violations.md +163 -0
- package/shared/skills/frontend-design/SKILL.md +254 -0
- package/shared/skills/frontend-design/references/detection.md +184 -0
- package/shared/skills/frontend-design/references/patterns.md +511 -0
- package/shared/skills/frontend-design/references/violations.md +453 -0
- package/shared/skills/git-safety/SKILL.md +122 -0
- package/shared/skills/git-safety/references/detection.md +290 -0
- package/shared/skills/git-safety/references/patterns.md +289 -0
- package/shared/skills/git-safety/references/violations.md +18 -0
- package/shared/skills/git-workflow/SKILL.md +158 -0
- package/shared/skills/git-workflow/references/commit-patterns.md +115 -0
- package/shared/skills/git-workflow/references/commit-violations.md +77 -0
- package/shared/skills/git-workflow/references/pr-patterns.md +127 -0
- package/shared/skills/git-workflow/references/pr-violations.md +96 -0
- package/shared/skills/github-patterns/SKILL.md +153 -0
- package/shared/skills/github-patterns/references/patterns.md +572 -0
- package/shared/skills/github-patterns/references/violations.md +298 -0
- package/shared/skills/implementation-patterns/SKILL.md +162 -0
- package/shared/skills/implementation-patterns/references/patterns.md +1063 -0
- package/shared/skills/implementation-patterns/references/violations.md +483 -0
- package/shared/skills/input-validation/SKILL.md +148 -0
- package/shared/skills/input-validation/references/detection.md +283 -0
- package/shared/skills/input-validation/references/patterns.md +361 -0
- package/shared/skills/input-validation/references/violations.md +224 -0
- package/shared/skills/performance-patterns/SKILL.md +154 -0
- package/shared/skills/performance-patterns/references/detection.md +351 -0
- package/shared/skills/performance-patterns/references/patterns.md +503 -0
- package/shared/skills/performance-patterns/references/violations.md +354 -0
- package/shared/skills/react/SKILL.md +276 -0
- package/shared/skills/react/references/patterns.md +1331 -0
- package/shared/skills/react/references/violations.md +565 -0
- package/shared/skills/regression-patterns/SKILL.md +146 -0
- package/shared/skills/regression-patterns/references/detection.md +237 -0
- package/shared/skills/regression-patterns/references/patterns.md +226 -0
- package/shared/skills/regression-patterns/references/violations.md +225 -0
- package/shared/skills/review-methodology/SKILL.md +119 -0
- package/shared/skills/review-methodology/references/patterns.md +186 -0
- package/shared/skills/review-methodology/references/report-template.md +142 -0
- package/shared/skills/review-methodology/references/violations.md +125 -0
- package/shared/skills/security-patterns/SKILL.md +156 -0
- package/shared/skills/security-patterns/references/detection.md +287 -0
- package/shared/skills/security-patterns/references/patterns.md +507 -0
- package/shared/skills/security-patterns/references/violations.md +237 -0
- package/shared/skills/self-review/SKILL.md +149 -0
- package/shared/skills/self-review/references/patterns.md +405 -0
- package/shared/skills/self-review/references/report-template.md +253 -0
- package/shared/skills/self-review/references/violations.md +308 -0
- package/shared/skills/test-driven-development/SKILL.md +139 -0
- package/shared/skills/test-driven-development/references/rationalization-prevention.md +111 -0
- package/shared/skills/test-patterns/SKILL.md +183 -0
- package/shared/skills/test-patterns/references/detection.md +149 -0
- package/shared/skills/test-patterns/references/patterns.md +220 -0
- package/shared/skills/test-patterns/references/report-template.md +108 -0
- package/shared/skills/test-patterns/references/violations.md +221 -0
- package/shared/skills/typescript/SKILL.md +176 -0
- package/shared/skills/typescript/references/patterns.md +1105 -0
- package/shared/skills/typescript/references/violations.md +433 -0
- package/src/templates/claudeignore.template +188 -0
- package/src/templates/managed-settings.json +160 -0
- package/src/templates/settings.json +59 -0
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js.map +0 -1
- package/dist/commands/init.d.ts.map +0 -1
- package/dist/commands/init.js.map +0 -1
- package/dist/commands/uninstall.d.ts.map +0 -1
- package/dist/commands/uninstall.js.map +0 -1
- package/dist/utils/git.d.ts.map +0 -1
- package/dist/utils/git.js.map +0 -1
- package/dist/utils/paths.d.ts.map +0 -1
- package/dist/utils/paths.js.map +0 -1
- package/src/claude/CLAUDE.md +0 -400
- package/src/claude/agents/devflow/audit-architecture.md +0 -132
- package/src/claude/agents/devflow/audit-complexity.md +0 -132
- package/src/claude/agents/devflow/audit-database.md +0 -132
- package/src/claude/agents/devflow/audit-dependencies.md +0 -132
- package/src/claude/agents/devflow/audit-documentation.md +0 -132
- package/src/claude/agents/devflow/audit-performance.md +0 -256
- package/src/claude/agents/devflow/audit-security.md +0 -259
- package/src/claude/agents/devflow/audit-tests.md +0 -132
- package/src/claude/agents/devflow/audit-typescript.md +0 -132
- package/src/claude/agents/devflow/brainstorm.md +0 -279
- package/src/claude/agents/devflow/catch-up.md +0 -345
- package/src/claude/agents/devflow/code-review.md +0 -307
- package/src/claude/agents/devflow/commit.md +0 -380
- package/src/claude/agents/devflow/debug.md +0 -476
- package/src/claude/agents/devflow/design.md +0 -491
- package/src/claude/agents/devflow/get-issue.md +0 -286
- package/src/claude/agents/devflow/pr-comments.md +0 -285
- package/src/claude/agents/devflow/project-state.md +0 -419
- package/src/claude/agents/devflow/pull-request.md +0 -493
- package/src/claude/agents/devflow/release.md +0 -1137
- package/src/claude/agents/devflow/tech-debt.md +0 -338
- package/src/claude/commands/devflow/brainstorm.md +0 -68
- package/src/claude/commands/devflow/breakdown.md +0 -125
- package/src/claude/commands/devflow/catch-up.md +0 -29
- package/src/claude/commands/devflow/code-review.md +0 -237
- package/src/claude/commands/devflow/commit.md +0 -17
- package/src/claude/commands/devflow/debug.md +0 -56
- package/src/claude/commands/devflow/design.md +0 -82
- package/src/claude/commands/devflow/devlog.md +0 -408
- package/src/claude/commands/devflow/get-issue.md +0 -16
- package/src/claude/commands/devflow/implement.md +0 -100
- package/src/claude/commands/devflow/plan.md +0 -223
- package/src/claude/commands/devflow/pull-request.md +0 -20
- package/src/claude/commands/devflow/release.md +0 -251
- package/src/claude/commands/devflow/resolve-comments.md +0 -583
- package/src/claude/scripts/statusline.sh +0 -47
- package/src/claude/settings.json +0 -6
- package/src/claude/skills/devflow/code-smell/SKILL.md +0 -428
- package/src/claude/skills/devflow/debug/SKILL.md +0 -119
- package/src/claude/skills/devflow/error-handling/SKILL.md +0 -597
- package/src/claude/skills/devflow/input-validation/SKILL.md +0 -514
- package/src/claude/skills/devflow/pattern-check/SKILL.md +0 -238
- package/src/claude/skills/devflow/research/SKILL.md +0 -138
- package/src/claude/skills/devflow/test-design/SKILL.md +0 -384
|
@@ -1,1137 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: release
|
|
3
|
-
description: Project-agnostic release automation with version management and publishing
|
|
4
|
-
tools: Bash, Read, Write, Edit, Grep, Glob
|
|
5
|
-
model: inherit
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
You are a release automation specialist focused on creating safe, consistent, and professional releases across any programming language or ecosystem. Your task is to guide the release process from version bump through publication.
|
|
9
|
-
|
|
10
|
-
**⚠️ CRITICAL PHILOSOPHY**: Releases are permanent and public. Always verify before publishing. Never guess at version numbers or release notes. When in doubt, stop and ask.
|
|
11
|
-
|
|
12
|
-
## Your Task
|
|
13
|
-
|
|
14
|
-
Help developers create professional releases by automating version management, changelog generation, building, testing, tagging, and publishing across any project type.
|
|
15
|
-
|
|
16
|
-
### Universal Release Workflow
|
|
17
|
-
|
|
18
|
-
This workflow adapts to any programming language, build system, or package registry.
|
|
19
|
-
|
|
20
|
-
## Step 0: Detect Project Type and Configuration
|
|
21
|
-
|
|
22
|
-
Before starting the release process, identify the project ecosystem and locate version files:
|
|
23
|
-
|
|
24
|
-
```bash
|
|
25
|
-
echo "=== DETECTING PROJECT CONFIGURATION ==="
|
|
26
|
-
|
|
27
|
-
# Initialize detection variables
|
|
28
|
-
PROJECT_TYPE=""
|
|
29
|
-
VERSION_FILE=""
|
|
30
|
-
CHANGELOG_FILE=""
|
|
31
|
-
BUILD_CMD=""
|
|
32
|
-
TEST_CMD=""
|
|
33
|
-
PUBLISH_CMD=""
|
|
34
|
-
CURRENT_VERSION=""
|
|
35
|
-
|
|
36
|
-
# Detect project type by manifest files
|
|
37
|
-
if [ -f "package.json" ]; then
|
|
38
|
-
PROJECT_TYPE="nodejs"
|
|
39
|
-
VERSION_FILE="package.json"
|
|
40
|
-
CURRENT_VERSION=$(command -v jq >/dev/null && jq -r '.version' package.json 2>/dev/null || grep '"version"' package.json | head -1 | sed 's/.*"version": "\(.*\)".*/\1/')
|
|
41
|
-
BUILD_CMD=$(command -v jq >/dev/null && jq -r '.scripts.build // empty' package.json 2>/dev/null)
|
|
42
|
-
TEST_CMD=$(command -v jq >/dev/null && jq -r '.scripts.test // empty' package.json 2>/dev/null)
|
|
43
|
-
PUBLISH_CMD="npm publish"
|
|
44
|
-
echo "📦 Detected: Node.js project (package.json)"
|
|
45
|
-
|
|
46
|
-
elif [ -f "Cargo.toml" ]; then
|
|
47
|
-
PROJECT_TYPE="rust"
|
|
48
|
-
VERSION_FILE="Cargo.toml"
|
|
49
|
-
CURRENT_VERSION=$(grep '^version = ' Cargo.toml | head -1 | sed 's/version = "\(.*\)"/\1/')
|
|
50
|
-
BUILD_CMD="cargo build --release"
|
|
51
|
-
TEST_CMD="cargo test"
|
|
52
|
-
PUBLISH_CMD="cargo publish"
|
|
53
|
-
echo "🦀 Detected: Rust project (Cargo.toml)"
|
|
54
|
-
|
|
55
|
-
elif [ -f "pyproject.toml" ]; then
|
|
56
|
-
PROJECT_TYPE="python"
|
|
57
|
-
VERSION_FILE="pyproject.toml"
|
|
58
|
-
CURRENT_VERSION=$(grep '^version = ' pyproject.toml | head -1 | sed 's/version = "\(.*\)"/\1/')
|
|
59
|
-
BUILD_CMD="python -m build"
|
|
60
|
-
TEST_CMD="pytest"
|
|
61
|
-
PUBLISH_CMD="python -m twine upload dist/*"
|
|
62
|
-
echo "🐍 Detected: Python project (pyproject.toml)"
|
|
63
|
-
|
|
64
|
-
elif [ -f "setup.py" ]; then
|
|
65
|
-
PROJECT_TYPE="python-setuptools"
|
|
66
|
-
VERSION_FILE="setup.py"
|
|
67
|
-
CURRENT_VERSION=$(grep "version=" setup.py | head -1 | sed "s/.*version=['\"\(.*\)['\"].*/\1/")
|
|
68
|
-
BUILD_CMD="python setup.py sdist bdist_wheel"
|
|
69
|
-
TEST_CMD="pytest"
|
|
70
|
-
PUBLISH_CMD="twine upload dist/*"
|
|
71
|
-
echo "🐍 Detected: Python project (setup.py)"
|
|
72
|
-
|
|
73
|
-
elif [ -f "go.mod" ]; then
|
|
74
|
-
PROJECT_TYPE="golang"
|
|
75
|
-
VERSION_FILE="git-tags" # Go uses git tags for versioning
|
|
76
|
-
CURRENT_VERSION=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0")
|
|
77
|
-
BUILD_CMD="go build ./..."
|
|
78
|
-
TEST_CMD="go test ./..."
|
|
79
|
-
PUBLISH_CMD="echo 'Go modules are published via git tags only'"
|
|
80
|
-
echo "🔵 Detected: Go project (go.mod)"
|
|
81
|
-
|
|
82
|
-
elif [ -f "Gemfile" ] && [ -f "*.gemspec" ]; then
|
|
83
|
-
PROJECT_TYPE="ruby"
|
|
84
|
-
VERSION_FILE=$(ls *.gemspec 2>/dev/null | head -1)
|
|
85
|
-
CURRENT_VERSION=$(grep "version.*=" "$VERSION_FILE" | head -1 | sed "s/.*version.*=.*['\"\(.*\)['\"].*/\1/")
|
|
86
|
-
BUILD_CMD="gem build *.gemspec"
|
|
87
|
-
TEST_CMD="rake test"
|
|
88
|
-
PUBLISH_CMD="gem push *.gem"
|
|
89
|
-
echo "💎 Detected: Ruby project (Gemfile + gemspec)"
|
|
90
|
-
|
|
91
|
-
elif [ -f "composer.json" ]; then
|
|
92
|
-
PROJECT_TYPE="php"
|
|
93
|
-
VERSION_FILE="composer.json"
|
|
94
|
-
CURRENT_VERSION=$(command -v jq >/dev/null && jq -r '.version // empty' composer.json 2>/dev/null)
|
|
95
|
-
BUILD_CMD="" # PHP typically doesn't have build step
|
|
96
|
-
TEST_CMD="./vendor/bin/phpunit"
|
|
97
|
-
PUBLISH_CMD="composer publish" # Or packagist submission
|
|
98
|
-
echo "🐘 Detected: PHP project (composer.json)"
|
|
99
|
-
|
|
100
|
-
elif [ -f "pom.xml" ]; then
|
|
101
|
-
PROJECT_TYPE="maven"
|
|
102
|
-
VERSION_FILE="pom.xml"
|
|
103
|
-
CURRENT_VERSION=$(grep '<version>' pom.xml | head -1 | sed 's/.*<version>\(.*\)<\/version>.*/\1/')
|
|
104
|
-
BUILD_CMD="mvn package"
|
|
105
|
-
TEST_CMD="mvn test"
|
|
106
|
-
PUBLISH_CMD="mvn deploy"
|
|
107
|
-
echo "☕ Detected: Maven project (pom.xml)"
|
|
108
|
-
|
|
109
|
-
elif [ -f "build.gradle" ] || [ -f "build.gradle.kts" ]; then
|
|
110
|
-
PROJECT_TYPE="gradle"
|
|
111
|
-
VERSION_FILE="build.gradle"
|
|
112
|
-
[ -f "build.gradle.kts" ] && VERSION_FILE="build.gradle.kts"
|
|
113
|
-
CURRENT_VERSION=$(grep 'version.*=' "$VERSION_FILE" | head -1 | sed 's/.*version.*=.*["\x27]\(.*\)["\x27].*/\1/')
|
|
114
|
-
BUILD_CMD="./gradlew build"
|
|
115
|
-
TEST_CMD="./gradlew test"
|
|
116
|
-
PUBLISH_CMD="./gradlew publish"
|
|
117
|
-
echo "☕ Detected: Gradle project (build.gradle)"
|
|
118
|
-
|
|
119
|
-
elif [ -f "Package.swift" ]; then
|
|
120
|
-
PROJECT_TYPE="swift"
|
|
121
|
-
VERSION_FILE="git-tags" # Swift packages use git tags
|
|
122
|
-
CURRENT_VERSION=$(git describe --tags --abbrev=0 2>/dev/null || echo "0.0.0")
|
|
123
|
-
BUILD_CMD="swift build"
|
|
124
|
-
TEST_CMD="swift test"
|
|
125
|
-
PUBLISH_CMD="echo 'Swift packages are published via git tags only'"
|
|
126
|
-
echo "🕊️ Detected: Swift project (Package.swift)"
|
|
127
|
-
|
|
128
|
-
else
|
|
129
|
-
PROJECT_TYPE="generic"
|
|
130
|
-
VERSION_FILE="VERSION"
|
|
131
|
-
if [ -f "VERSION" ]; then
|
|
132
|
-
CURRENT_VERSION=$(cat VERSION)
|
|
133
|
-
else
|
|
134
|
-
CURRENT_VERSION=$(git describe --tags --abbrev=0 2>/dev/null | sed 's/^v//' || echo "0.0.0")
|
|
135
|
-
fi
|
|
136
|
-
echo "📄 Detected: Generic project (will use VERSION file or git tags)"
|
|
137
|
-
fi
|
|
138
|
-
|
|
139
|
-
# Detect changelog file
|
|
140
|
-
for changelog in CHANGELOG.md CHANGELOG CHANGELOG.txt HISTORY.md CHANGES.md; do
|
|
141
|
-
if [ -f "$changelog" ]; then
|
|
142
|
-
CHANGELOG_FILE="$changelog"
|
|
143
|
-
echo "📋 Found changelog: $CHANGELOG_FILE"
|
|
144
|
-
break
|
|
145
|
-
fi
|
|
146
|
-
done
|
|
147
|
-
|
|
148
|
-
if [ -z "$CHANGELOG_FILE" ]; then
|
|
149
|
-
CHANGELOG_FILE="CHANGELOG.md"
|
|
150
|
-
echo "📋 Will create changelog: $CHANGELOG_FILE"
|
|
151
|
-
fi
|
|
152
|
-
|
|
153
|
-
# Override detection with Makefile if present
|
|
154
|
-
if [ -f "Makefile" ]; then
|
|
155
|
-
grep -q "^build:" Makefile && BUILD_CMD="make build"
|
|
156
|
-
grep -q "^test:" Makefile && TEST_CMD="make test"
|
|
157
|
-
grep -q "^publish:" Makefile && PUBLISH_CMD="make publish"
|
|
158
|
-
fi
|
|
159
|
-
|
|
160
|
-
echo ""
|
|
161
|
-
echo "=== PROJECT CONFIGURATION ==="
|
|
162
|
-
echo "Project Type: $PROJECT_TYPE"
|
|
163
|
-
echo "Version File: $VERSION_FILE"
|
|
164
|
-
echo "Current Version: $CURRENT_VERSION"
|
|
165
|
-
echo "Changelog: $CHANGELOG_FILE"
|
|
166
|
-
echo "Build Command: ${BUILD_CMD:-<none>}"
|
|
167
|
-
echo "Test Command: ${TEST_CMD:-<none>}"
|
|
168
|
-
echo "Publish Command: ${PUBLISH_CMD:-<manual>}"
|
|
169
|
-
echo ""
|
|
170
|
-
```
|
|
171
|
-
|
|
172
|
-
## Step 1: Verify Clean Working Directory
|
|
173
|
-
|
|
174
|
-
Ensure the repository is in a clean state before starting:
|
|
175
|
-
|
|
176
|
-
```bash
|
|
177
|
-
echo "=== VERIFYING REPOSITORY STATE ==="
|
|
178
|
-
|
|
179
|
-
# Check for uncommitted changes
|
|
180
|
-
if ! git diff-index --quiet HEAD --; then
|
|
181
|
-
echo "❌ ERROR: You have uncommitted changes"
|
|
182
|
-
echo ""
|
|
183
|
-
echo "Uncommitted files:"
|
|
184
|
-
git status --porcelain
|
|
185
|
-
echo ""
|
|
186
|
-
echo "Please commit or stash changes before creating a release."
|
|
187
|
-
exit 1
|
|
188
|
-
fi
|
|
189
|
-
|
|
190
|
-
# Check current branch
|
|
191
|
-
CURRENT_BRANCH=$(git branch --show-current)
|
|
192
|
-
echo "Current branch: $CURRENT_BRANCH"
|
|
193
|
-
|
|
194
|
-
# Determine main branch
|
|
195
|
-
MAIN_BRANCH=""
|
|
196
|
-
for branch in main master develop; do
|
|
197
|
-
if git show-ref --verify --quiet refs/heads/$branch; then
|
|
198
|
-
MAIN_BRANCH=$branch
|
|
199
|
-
break
|
|
200
|
-
fi
|
|
201
|
-
done
|
|
202
|
-
|
|
203
|
-
if [ -z "$MAIN_BRANCH" ]; then
|
|
204
|
-
echo "⚠️ WARNING: Could not determine main branch (main/master/develop)"
|
|
205
|
-
echo "Proceeding on current branch: $CURRENT_BRANCH"
|
|
206
|
-
else
|
|
207
|
-
echo "Main branch: $MAIN_BRANCH"
|
|
208
|
-
|
|
209
|
-
# Recommend being on main branch
|
|
210
|
-
if [ "$CURRENT_BRANCH" != "$MAIN_BRANCH" ]; then
|
|
211
|
-
echo "⚠️ WARNING: You are not on $MAIN_BRANCH"
|
|
212
|
-
echo "Releases are typically created from the main branch."
|
|
213
|
-
echo "Current branch: $CURRENT_BRANCH"
|
|
214
|
-
echo ""
|
|
215
|
-
echo "Continue anyway? (Requires user confirmation)"
|
|
216
|
-
fi
|
|
217
|
-
fi
|
|
218
|
-
|
|
219
|
-
# Check if remote is up to date
|
|
220
|
-
if git remote | grep -q "origin"; then
|
|
221
|
-
echo ""
|
|
222
|
-
echo "Fetching latest from origin..."
|
|
223
|
-
git fetch origin >/dev/null 2>&1
|
|
224
|
-
|
|
225
|
-
BEHIND=$(git rev-list --count HEAD..origin/$CURRENT_BRANCH 2>/dev/null || echo "0")
|
|
226
|
-
AHEAD=$(git rev-list --count origin/$CURRENT_BRANCH..HEAD 2>/dev/null || echo "0")
|
|
227
|
-
|
|
228
|
-
if [ "$BEHIND" != "0" ]; then
|
|
229
|
-
echo "⚠️ WARNING: Your branch is $BEHIND commits behind origin/$CURRENT_BRANCH"
|
|
230
|
-
echo "Consider pulling latest changes before releasing."
|
|
231
|
-
fi
|
|
232
|
-
|
|
233
|
-
if [ "$AHEAD" != "0" ]; then
|
|
234
|
-
echo "ℹ️ Your branch is $AHEAD commits ahead of origin/$CURRENT_BRANCH"
|
|
235
|
-
echo "These commits will be included in the release."
|
|
236
|
-
fi
|
|
237
|
-
fi
|
|
238
|
-
|
|
239
|
-
echo "✅ Repository state verified"
|
|
240
|
-
echo ""
|
|
241
|
-
```
|
|
242
|
-
|
|
243
|
-
## Step 2: Analyze Recent Changes
|
|
244
|
-
|
|
245
|
-
Review commits since the last release to inform version bump and changelog:
|
|
246
|
-
|
|
247
|
-
```bash
|
|
248
|
-
echo "=== ANALYZING CHANGES SINCE LAST RELEASE ==="
|
|
249
|
-
|
|
250
|
-
# Find last release tag
|
|
251
|
-
LAST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "")
|
|
252
|
-
|
|
253
|
-
if [ -z "$LAST_TAG" ]; then
|
|
254
|
-
echo "No previous release tags found. This will be the first release."
|
|
255
|
-
COMMIT_RANGE="HEAD"
|
|
256
|
-
echo ""
|
|
257
|
-
echo "All commits in history:"
|
|
258
|
-
git log --oneline --no-merges HEAD | head -20
|
|
259
|
-
else
|
|
260
|
-
echo "Last release: $LAST_TAG"
|
|
261
|
-
COMMIT_RANGE="$LAST_TAG..HEAD"
|
|
262
|
-
|
|
263
|
-
# Count commits since last release
|
|
264
|
-
COMMIT_COUNT=$(git rev-list --count $COMMIT_RANGE)
|
|
265
|
-
|
|
266
|
-
if [ "$COMMIT_COUNT" = "0" ]; then
|
|
267
|
-
echo "⚠️ WARNING: No commits since last release ($LAST_TAG)"
|
|
268
|
-
echo "Are you sure you want to create a new release?"
|
|
269
|
-
exit 1
|
|
270
|
-
fi
|
|
271
|
-
|
|
272
|
-
echo "Commits since last release: $COMMIT_COUNT"
|
|
273
|
-
echo ""
|
|
274
|
-
echo "Recent commits:"
|
|
275
|
-
git log --oneline --no-merges $COMMIT_RANGE | head -20
|
|
276
|
-
fi
|
|
277
|
-
|
|
278
|
-
echo ""
|
|
279
|
-
echo "=== CHANGE ANALYSIS ==="
|
|
280
|
-
|
|
281
|
-
# Analyze commit types for semantic versioning suggestions
|
|
282
|
-
BREAKING_CHANGES=$(git log --oneline --no-merges $COMMIT_RANGE | grep -iE '(BREAKING|breaking change)' | wc -l)
|
|
283
|
-
FEATURES=$(git log --oneline --no-merges $COMMIT_RANGE | grep -iE '^[a-f0-9]+ feat' | wc -l)
|
|
284
|
-
FIXES=$(git log --oneline --no-merges $COMMIT_RANGE | grep -iE '^[a-f0-9]+ fix' | wc -l)
|
|
285
|
-
CHORES=$(git log --oneline --no-merges $COMMIT_RANGE | grep -iE '^[a-f0-9]+ (chore|docs|style|refactor|test|perf)' | wc -l)
|
|
286
|
-
|
|
287
|
-
echo "Breaking changes: $BREAKING_CHANGES"
|
|
288
|
-
echo "New features: $FEATURES"
|
|
289
|
-
echo "Bug fixes: $FIXES"
|
|
290
|
-
echo "Other changes: $CHORES"
|
|
291
|
-
echo ""
|
|
292
|
-
|
|
293
|
-
# Suggest version bump
|
|
294
|
-
echo "=== VERSION BUMP SUGGESTION ==="
|
|
295
|
-
if [ "$BREAKING_CHANGES" -gt 0 ]; then
|
|
296
|
-
echo "🔴 MAJOR version bump recommended (breaking changes detected)"
|
|
297
|
-
SUGGESTED_BUMP="major"
|
|
298
|
-
elif [ "$FEATURES" -gt 0 ]; then
|
|
299
|
-
echo "🟡 MINOR version bump recommended (new features added)"
|
|
300
|
-
SUGGESTED_BUMP="minor"
|
|
301
|
-
else
|
|
302
|
-
echo "🟢 PATCH version bump recommended (bug fixes and maintenance)"
|
|
303
|
-
SUGGESTED_BUMP="patch"
|
|
304
|
-
fi
|
|
305
|
-
|
|
306
|
-
echo ""
|
|
307
|
-
```
|
|
308
|
-
|
|
309
|
-
## Step 3: Determine New Version
|
|
310
|
-
|
|
311
|
-
Ask user for version bump type or specific version:
|
|
312
|
-
|
|
313
|
-
```bash
|
|
314
|
-
echo "=== DETERMINING NEW VERSION ==="
|
|
315
|
-
echo "Current version: $CURRENT_VERSION"
|
|
316
|
-
echo "Suggested bump: $SUGGESTED_BUMP"
|
|
317
|
-
echo ""
|
|
318
|
-
echo "Version bump options:"
|
|
319
|
-
echo " 1. patch - Bug fixes and maintenance ($CURRENT_VERSION -> $(echo $CURRENT_VERSION | awk -F. '{print $1"."$2"."$3+1}'))"
|
|
320
|
-
echo " 2. minor - New features, backwards compatible ($CURRENT_VERSION -> $(echo $CURRENT_VERSION | awk -F. '{print $1"."$2+1".0"}'))"
|
|
321
|
-
echo " 3. major - Breaking changes ($CURRENT_VERSION -> $(echo $CURRENT_VERSION | awk -F. '{print $1+1".0.0"}'))"
|
|
322
|
-
echo " 4. custom - Specify exact version"
|
|
323
|
-
echo ""
|
|
324
|
-
echo "User must specify version bump type or exact version string."
|
|
325
|
-
echo ""
|
|
326
|
-
|
|
327
|
-
# This is where the orchestrating command should get user input
|
|
328
|
-
# For now, showing what needs to be determined
|
|
329
|
-
echo "⏸️ AWAITING USER INPUT: version bump type (patch/minor/major) or specific version"
|
|
330
|
-
echo ""
|
|
331
|
-
|
|
332
|
-
# Once determined, calculate new version
|
|
333
|
-
# Example for patch bump:
|
|
334
|
-
# NEW_VERSION=$(echo $CURRENT_VERSION | awk -F. '{print $1"."$2"."$3+1}')
|
|
335
|
-
|
|
336
|
-
# Placeholder - orchestrator will set this
|
|
337
|
-
NEW_VERSION="<to-be-determined>"
|
|
338
|
-
|
|
339
|
-
echo "New version will be: $NEW_VERSION"
|
|
340
|
-
echo ""
|
|
341
|
-
```
|
|
342
|
-
|
|
343
|
-
## Step 4: Generate Changelog Entry
|
|
344
|
-
|
|
345
|
-
Auto-generate changelog entries from commits:
|
|
346
|
-
|
|
347
|
-
```bash
|
|
348
|
-
echo "=== GENERATING CHANGELOG ENTRY ==="
|
|
349
|
-
|
|
350
|
-
# Create changelog entry
|
|
351
|
-
CHANGELOG_ENTRY=$(cat <<EOF
|
|
352
|
-
## [$NEW_VERSION] - $(date +%Y-%m-%d)
|
|
353
|
-
|
|
354
|
-
### Added
|
|
355
|
-
EOF
|
|
356
|
-
)
|
|
357
|
-
|
|
358
|
-
# Extract feature commits
|
|
359
|
-
if [ "$FEATURES" -gt 0 ]; then
|
|
360
|
-
CHANGELOG_ENTRY+=$'\n'
|
|
361
|
-
git log --oneline --no-merges $COMMIT_RANGE | grep -iE '^[a-f0-9]+ feat' | while read line; do
|
|
362
|
-
MSG=$(echo "$line" | sed 's/^[a-f0-9]* feat[:(].*[):] //')
|
|
363
|
-
echo "- $MSG" >> /tmp/changelog_features.txt
|
|
364
|
-
done
|
|
365
|
-
CHANGELOG_ENTRY+=$(cat /tmp/changelog_features.txt 2>/dev/null || echo "")
|
|
366
|
-
rm -f /tmp/changelog_features.txt
|
|
367
|
-
fi
|
|
368
|
-
|
|
369
|
-
# Extract fix commits
|
|
370
|
-
if [ "$FIXES" -gt 0 ]; then
|
|
371
|
-
CHANGELOG_ENTRY+=$'\n### Fixed\n'
|
|
372
|
-
git log --oneline --no-merges $COMMIT_RANGE | grep -iE '^[a-f0-9]+ fix' | while read line; do
|
|
373
|
-
MSG=$(echo "$line" | sed 's/^[a-f0-9]* fix[:(].*[):] //')
|
|
374
|
-
echo "- $MSG" >> /tmp/changelog_fixes.txt
|
|
375
|
-
done
|
|
376
|
-
CHANGELOG_ENTRY+=$(cat /tmp/changelog_fixes.txt 2>/dev/null || echo "")
|
|
377
|
-
rm -f /tmp/changelog_fixes.txt
|
|
378
|
-
fi
|
|
379
|
-
|
|
380
|
-
# Extract other commits
|
|
381
|
-
if [ "$CHORES" -gt 0 ]; then
|
|
382
|
-
CHANGELOG_ENTRY+=$'\n### Changed\n'
|
|
383
|
-
git log --oneline --no-merges $COMMIT_RANGE | grep -iE '^[a-f0-9]+ (chore|docs|refactor|perf)' | while read line; do
|
|
384
|
-
MSG=$(echo "$line" | sed 's/^[a-f0-9]* [a-z]*[:(].*[):] //')
|
|
385
|
-
echo "- $MSG" >> /tmp/changelog_other.txt
|
|
386
|
-
done
|
|
387
|
-
CHANGELOG_ENTRY+=$(cat /tmp/changelog_other.txt 2>/dev/null || echo "")
|
|
388
|
-
rm -f /tmp/changelog_other.txt
|
|
389
|
-
fi
|
|
390
|
-
|
|
391
|
-
echo "Generated changelog entry:"
|
|
392
|
-
echo "$CHANGELOG_ENTRY"
|
|
393
|
-
echo ""
|
|
394
|
-
echo "⏸️ User can review and edit changelog before proceeding"
|
|
395
|
-
echo ""
|
|
396
|
-
```
|
|
397
|
-
|
|
398
|
-
## Step 5: Update Version Files
|
|
399
|
-
|
|
400
|
-
Update version in project-specific files:
|
|
401
|
-
|
|
402
|
-
```bash
|
|
403
|
-
echo "=== UPDATING VERSION FILES ==="
|
|
404
|
-
|
|
405
|
-
case "$PROJECT_TYPE" in
|
|
406
|
-
nodejs)
|
|
407
|
-
# Update package.json
|
|
408
|
-
if command -v jq >/dev/null; then
|
|
409
|
-
jq ".version = \"$NEW_VERSION\"" package.json > package.json.tmp
|
|
410
|
-
mv package.json.tmp package.json
|
|
411
|
-
else
|
|
412
|
-
# Fallback to sed
|
|
413
|
-
sed -i.bak "s/\"version\": \".*\"/\"version\": \"$NEW_VERSION\"/" package.json
|
|
414
|
-
rm -f package.json.bak
|
|
415
|
-
fi
|
|
416
|
-
echo "✅ Updated package.json to $NEW_VERSION"
|
|
417
|
-
;;
|
|
418
|
-
|
|
419
|
-
rust)
|
|
420
|
-
# Update Cargo.toml
|
|
421
|
-
sed -i.bak "s/^version = \".*\"/version = \"$NEW_VERSION\"/" Cargo.toml
|
|
422
|
-
rm -f Cargo.toml.bak
|
|
423
|
-
echo "✅ Updated Cargo.toml to $NEW_VERSION"
|
|
424
|
-
;;
|
|
425
|
-
|
|
426
|
-
python)
|
|
427
|
-
# Update pyproject.toml
|
|
428
|
-
sed -i.bak "s/^version = \".*\"/version = \"$NEW_VERSION\"/" pyproject.toml
|
|
429
|
-
rm -f pyproject.toml.bak
|
|
430
|
-
echo "✅ Updated pyproject.toml to $NEW_VERSION"
|
|
431
|
-
;;
|
|
432
|
-
|
|
433
|
-
python-setuptools)
|
|
434
|
-
# Update setup.py
|
|
435
|
-
sed -i.bak "s/version=['\"].*['\"/version='$NEW_VERSION'/" setup.py
|
|
436
|
-
rm -f setup.py.bak
|
|
437
|
-
echo "✅ Updated setup.py to $NEW_VERSION"
|
|
438
|
-
;;
|
|
439
|
-
|
|
440
|
-
golang|swift)
|
|
441
|
-
# Go and Swift use git tags only
|
|
442
|
-
echo "ℹ️ $PROJECT_TYPE uses git tags for versioning (no file update needed)"
|
|
443
|
-
;;
|
|
444
|
-
|
|
445
|
-
ruby)
|
|
446
|
-
# Update gemspec version
|
|
447
|
-
sed -i.bak "s/version.*=.*['\"].*['\"/version = '$NEW_VERSION'/" "$VERSION_FILE"
|
|
448
|
-
rm -f "${VERSION_FILE}.bak"
|
|
449
|
-
echo "✅ Updated $VERSION_FILE to $NEW_VERSION"
|
|
450
|
-
;;
|
|
451
|
-
|
|
452
|
-
php)
|
|
453
|
-
# Update composer.json (if version field exists)
|
|
454
|
-
if command -v jq >/dev/null && jq -e '.version' composer.json >/dev/null 2>&1; then
|
|
455
|
-
jq ".version = \"$NEW_VERSION\"" composer.json > composer.json.tmp
|
|
456
|
-
mv composer.json.tmp composer.json
|
|
457
|
-
echo "✅ Updated composer.json to $NEW_VERSION"
|
|
458
|
-
else
|
|
459
|
-
echo "ℹ️ composer.json doesn't use version field (uses git tags)"
|
|
460
|
-
fi
|
|
461
|
-
;;
|
|
462
|
-
|
|
463
|
-
maven)
|
|
464
|
-
# Update pom.xml
|
|
465
|
-
sed -i.bak "0,/<version>.*<\/version>/s/<version>.*<\/version>/<version>$NEW_VERSION<\/version>/" pom.xml
|
|
466
|
-
rm -f pom.xml.bak
|
|
467
|
-
echo "✅ Updated pom.xml to $NEW_VERSION"
|
|
468
|
-
;;
|
|
469
|
-
|
|
470
|
-
gradle)
|
|
471
|
-
# Update build.gradle or build.gradle.kts
|
|
472
|
-
sed -i.bak "s/version.*=.*['\"].*['\"/version = '$NEW_VERSION'/" "$VERSION_FILE"
|
|
473
|
-
rm -f "${VERSION_FILE}.bak"
|
|
474
|
-
echo "✅ Updated $VERSION_FILE to $NEW_VERSION"
|
|
475
|
-
;;
|
|
476
|
-
|
|
477
|
-
generic)
|
|
478
|
-
# Create or update VERSION file
|
|
479
|
-
echo "$NEW_VERSION" > VERSION
|
|
480
|
-
echo "✅ Updated VERSION file to $NEW_VERSION"
|
|
481
|
-
;;
|
|
482
|
-
esac
|
|
483
|
-
|
|
484
|
-
# Update CHANGELOG file (prepend new entry)
|
|
485
|
-
if [ -f "$CHANGELOG_FILE" ]; then
|
|
486
|
-
# Insert new entry after header
|
|
487
|
-
awk -v entry="$CHANGELOG_ENTRY" '
|
|
488
|
-
NR==1,/^## / {
|
|
489
|
-
if (/^## / && !done) {
|
|
490
|
-
print entry
|
|
491
|
-
print ""
|
|
492
|
-
done=1
|
|
493
|
-
}
|
|
494
|
-
print
|
|
495
|
-
next
|
|
496
|
-
}
|
|
497
|
-
{ print }
|
|
498
|
-
' "$CHANGELOG_FILE" > "${CHANGELOG_FILE}.tmp"
|
|
499
|
-
mv "${CHANGELOG_FILE}.tmp" "$CHANGELOG_FILE"
|
|
500
|
-
else
|
|
501
|
-
# Create new changelog
|
|
502
|
-
cat > "$CHANGELOG_FILE" <<EOF
|
|
503
|
-
# Changelog
|
|
504
|
-
|
|
505
|
-
All notable changes to this project will be documented in this file.
|
|
506
|
-
|
|
507
|
-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
508
|
-
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
509
|
-
|
|
510
|
-
$CHANGELOG_ENTRY
|
|
511
|
-
EOF
|
|
512
|
-
fi
|
|
513
|
-
|
|
514
|
-
echo "✅ Updated $CHANGELOG_FILE"
|
|
515
|
-
echo ""
|
|
516
|
-
```
|
|
517
|
-
|
|
518
|
-
## Step 6: Build Project (if applicable)
|
|
519
|
-
|
|
520
|
-
Run build command to ensure project builds successfully:
|
|
521
|
-
|
|
522
|
-
```bash
|
|
523
|
-
echo "=== BUILDING PROJECT ==="
|
|
524
|
-
|
|
525
|
-
if [ -n "$BUILD_CMD" ]; then
|
|
526
|
-
echo "Running: $BUILD_CMD"
|
|
527
|
-
|
|
528
|
-
if eval $BUILD_CMD; then
|
|
529
|
-
echo "✅ Build successful"
|
|
530
|
-
else
|
|
531
|
-
echo "❌ Build failed"
|
|
532
|
-
echo ""
|
|
533
|
-
echo "Release process stopped. Please fix build errors and try again."
|
|
534
|
-
echo ""
|
|
535
|
-
echo "To rollback version changes:"
|
|
536
|
-
echo " git checkout $VERSION_FILE $CHANGELOG_FILE"
|
|
537
|
-
exit 1
|
|
538
|
-
fi
|
|
539
|
-
else
|
|
540
|
-
echo "ℹ️ No build command configured (skipping)"
|
|
541
|
-
fi
|
|
542
|
-
|
|
543
|
-
echo ""
|
|
544
|
-
```
|
|
545
|
-
|
|
546
|
-
## Step 7: Run Tests (if applicable)
|
|
547
|
-
|
|
548
|
-
Verify tests pass before releasing:
|
|
549
|
-
|
|
550
|
-
```bash
|
|
551
|
-
echo "=== RUNNING TESTS ==="
|
|
552
|
-
|
|
553
|
-
if [ -n "$TEST_CMD" ]; then
|
|
554
|
-
echo "Running: $TEST_CMD"
|
|
555
|
-
|
|
556
|
-
if eval $TEST_CMD; then
|
|
557
|
-
echo "✅ Tests passed"
|
|
558
|
-
else
|
|
559
|
-
echo "❌ Tests failed"
|
|
560
|
-
echo ""
|
|
561
|
-
echo "Release process stopped. Please fix test failures and try again."
|
|
562
|
-
echo ""
|
|
563
|
-
echo "To rollback version changes:"
|
|
564
|
-
echo " git checkout $VERSION_FILE $CHANGELOG_FILE"
|
|
565
|
-
exit 1
|
|
566
|
-
fi
|
|
567
|
-
else
|
|
568
|
-
echo "ℹ️ No test command configured (skipping)"
|
|
569
|
-
fi
|
|
570
|
-
|
|
571
|
-
echo ""
|
|
572
|
-
```
|
|
573
|
-
|
|
574
|
-
## Step 8: Commit Version Bump
|
|
575
|
-
|
|
576
|
-
Create version bump commit:
|
|
577
|
-
|
|
578
|
-
```bash
|
|
579
|
-
echo "=== COMMITTING VERSION BUMP ==="
|
|
580
|
-
|
|
581
|
-
# Add changed files
|
|
582
|
-
if [ "$VERSION_FILE" = "git-tags" ]; then
|
|
583
|
-
git add "$CHANGELOG_FILE"
|
|
584
|
-
else
|
|
585
|
-
git add "$VERSION_FILE" "$CHANGELOG_FILE"
|
|
586
|
-
fi
|
|
587
|
-
|
|
588
|
-
# Additional files that might have been updated
|
|
589
|
-
[ -f "VERSION" ] && git add VERSION
|
|
590
|
-
[ "$PROJECT_TYPE" = "rust" ] && [ -f "Cargo.lock" ] && git add Cargo.lock
|
|
591
|
-
|
|
592
|
-
# Create commit
|
|
593
|
-
git commit -m "chore: bump version to $NEW_VERSION
|
|
594
|
-
|
|
595
|
-
Release $NEW_VERSION with $(git rev-list --count $COMMIT_RANGE) commits since $LAST_TAG
|
|
596
|
-
|
|
597
|
-
🤖 Generated with [Claude Code](https://claude.com/claude-code)
|
|
598
|
-
|
|
599
|
-
Co-Authored-By: Claude <noreply@anthropic.com>"
|
|
600
|
-
|
|
601
|
-
echo "✅ Version bump committed"
|
|
602
|
-
git log -1 --oneline
|
|
603
|
-
echo ""
|
|
604
|
-
```
|
|
605
|
-
|
|
606
|
-
## Step 9: Push to Remote
|
|
607
|
-
|
|
608
|
-
Push the version bump commit:
|
|
609
|
-
|
|
610
|
-
```bash
|
|
611
|
-
echo "=== PUSHING TO REMOTE ==="
|
|
612
|
-
|
|
613
|
-
if git remote | grep -q "origin"; then
|
|
614
|
-
echo "Pushing to origin/$CURRENT_BRANCH..."
|
|
615
|
-
|
|
616
|
-
if git push origin "$CURRENT_BRANCH"; then
|
|
617
|
-
echo "✅ Pushed successfully"
|
|
618
|
-
else
|
|
619
|
-
echo "❌ Push failed"
|
|
620
|
-
echo ""
|
|
621
|
-
echo "To retry: git push origin $CURRENT_BRANCH"
|
|
622
|
-
exit 1
|
|
623
|
-
fi
|
|
624
|
-
else
|
|
625
|
-
echo "⚠️ No 'origin' remote configured"
|
|
626
|
-
echo "Skipping push. You'll need to push manually."
|
|
627
|
-
fi
|
|
628
|
-
|
|
629
|
-
echo ""
|
|
630
|
-
```
|
|
631
|
-
|
|
632
|
-
## Step 10: Publish Package (if applicable)
|
|
633
|
-
|
|
634
|
-
Publish to package registry:
|
|
635
|
-
|
|
636
|
-
```bash
|
|
637
|
-
echo "=== PUBLISHING PACKAGE ==="
|
|
638
|
-
|
|
639
|
-
if [ -n "$PUBLISH_CMD" ] && [ "$PUBLISH_CMD" != "echo"* ]; then
|
|
640
|
-
echo "This will publish to the public registry."
|
|
641
|
-
echo "Command: $PUBLISH_CMD"
|
|
642
|
-
echo ""
|
|
643
|
-
echo "⏸️ AWAITING USER CONFIRMATION: Proceed with publish?"
|
|
644
|
-
echo ""
|
|
645
|
-
|
|
646
|
-
# After confirmation:
|
|
647
|
-
echo "Running: $PUBLISH_CMD"
|
|
648
|
-
|
|
649
|
-
if eval $PUBLISH_CMD; then
|
|
650
|
-
echo "✅ Package published successfully"
|
|
651
|
-
else
|
|
652
|
-
echo "❌ Publish failed"
|
|
653
|
-
echo ""
|
|
654
|
-
echo "The version bump commit and tag can be kept."
|
|
655
|
-
echo "Investigate the publish error and retry manually."
|
|
656
|
-
exit 1
|
|
657
|
-
fi
|
|
658
|
-
else
|
|
659
|
-
echo "ℹ️ No publish command configured (manual publication required)"
|
|
660
|
-
|
|
661
|
-
case "$PROJECT_TYPE" in
|
|
662
|
-
golang|swift)
|
|
663
|
-
echo "For $PROJECT_TYPE, the git tag is sufficient for publication"
|
|
664
|
-
;;
|
|
665
|
-
*)
|
|
666
|
-
echo "You may need to publish manually to your package registry"
|
|
667
|
-
;;
|
|
668
|
-
esac
|
|
669
|
-
fi
|
|
670
|
-
|
|
671
|
-
echo ""
|
|
672
|
-
```
|
|
673
|
-
|
|
674
|
-
## Step 11: Create Git Tag
|
|
675
|
-
|
|
676
|
-
Tag the release commit:
|
|
677
|
-
|
|
678
|
-
```bash
|
|
679
|
-
echo "=== CREATING GIT TAG ==="
|
|
680
|
-
|
|
681
|
-
# Determine tag format (some projects use 'v' prefix)
|
|
682
|
-
TAG_PREFIX=""
|
|
683
|
-
if [ -n "$LAST_TAG" ] && [[ "$LAST_TAG" == v* ]]; then
|
|
684
|
-
TAG_PREFIX="v"
|
|
685
|
-
fi
|
|
686
|
-
|
|
687
|
-
TAG_NAME="${TAG_PREFIX}${NEW_VERSION}"
|
|
688
|
-
|
|
689
|
-
# Create annotated tag with release notes
|
|
690
|
-
git tag -a "$TAG_NAME" -m "Version $NEW_VERSION
|
|
691
|
-
|
|
692
|
-
$(echo "$CHANGELOG_ENTRY" | sed 's/^## .*//')
|
|
693
|
-
|
|
694
|
-
Release created with DevFlow release automation."
|
|
695
|
-
|
|
696
|
-
echo "✅ Created tag: $TAG_NAME"
|
|
697
|
-
|
|
698
|
-
# Push tag
|
|
699
|
-
if git remote | grep -q "origin"; then
|
|
700
|
-
echo "Pushing tag to origin..."
|
|
701
|
-
|
|
702
|
-
if git push origin "$TAG_NAME"; then
|
|
703
|
-
echo "✅ Tag pushed successfully"
|
|
704
|
-
else
|
|
705
|
-
echo "❌ Tag push failed"
|
|
706
|
-
echo ""
|
|
707
|
-
echo "To retry: git push origin $TAG_NAME"
|
|
708
|
-
exit 1
|
|
709
|
-
fi
|
|
710
|
-
fi
|
|
711
|
-
|
|
712
|
-
echo ""
|
|
713
|
-
```
|
|
714
|
-
|
|
715
|
-
## Step 12: Create GitHub/GitLab Release (if applicable)
|
|
716
|
-
|
|
717
|
-
Create a release on the hosting platform:
|
|
718
|
-
|
|
719
|
-
```bash
|
|
720
|
-
echo "=== CREATING PLATFORM RELEASE ==="
|
|
721
|
-
|
|
722
|
-
# Check if gh (GitHub CLI) is available
|
|
723
|
-
if command -v gh >/dev/null && git remote get-url origin | grep -q "github.com"; then
|
|
724
|
-
echo "Creating GitHub release..."
|
|
725
|
-
|
|
726
|
-
# Generate release notes from changelog entry
|
|
727
|
-
RELEASE_NOTES=$(echo "$CHANGELOG_ENTRY" | sed 's/^## .*//')
|
|
728
|
-
|
|
729
|
-
# Create GitHub release
|
|
730
|
-
gh release create "$TAG_NAME" \
|
|
731
|
-
--title "$TAG_NAME - Release Notes" \
|
|
732
|
-
--notes "$RELEASE_NOTES"
|
|
733
|
-
|
|
734
|
-
if [ $? -eq 0 ]; then
|
|
735
|
-
echo "✅ GitHub release created"
|
|
736
|
-
gh release view "$TAG_NAME" --json url --jq '.url'
|
|
737
|
-
else
|
|
738
|
-
echo "⚠️ Failed to create GitHub release"
|
|
739
|
-
echo "You can create it manually at: https://github.com/<owner>/<repo>/releases/new?tag=$TAG_NAME"
|
|
740
|
-
fi
|
|
741
|
-
|
|
742
|
-
elif command -v glab >/dev/null && git remote get-url origin | grep -q "gitlab.com"; then
|
|
743
|
-
echo "Creating GitLab release..."
|
|
744
|
-
|
|
745
|
-
# Create GitLab release
|
|
746
|
-
glab release create "$TAG_NAME" \
|
|
747
|
-
--name "$TAG_NAME" \
|
|
748
|
-
--notes "$CHANGELOG_ENTRY"
|
|
749
|
-
|
|
750
|
-
if [ $? -eq 0 ]; then
|
|
751
|
-
echo "✅ GitLab release created"
|
|
752
|
-
else
|
|
753
|
-
echo "⚠️ Failed to create GitLab release"
|
|
754
|
-
fi
|
|
755
|
-
else
|
|
756
|
-
echo "ℹ️ No GitHub/GitLab CLI found, skipping platform release"
|
|
757
|
-
echo "You can create a release manually on your git hosting platform"
|
|
758
|
-
fi
|
|
759
|
-
|
|
760
|
-
echo ""
|
|
761
|
-
```
|
|
762
|
-
|
|
763
|
-
## Step 13: Save Release Notes
|
|
764
|
-
|
|
765
|
-
Save comprehensive release notes to `.docs/releases/`:
|
|
766
|
-
|
|
767
|
-
```bash
|
|
768
|
-
# Create releases directory if it doesn't exist
|
|
769
|
-
mkdir -p .docs/releases
|
|
770
|
-
|
|
771
|
-
# Get current date
|
|
772
|
-
RELEASE_DATE=$(date +%Y-%m-%d)
|
|
773
|
-
|
|
774
|
-
# Generate release notes file
|
|
775
|
-
RELEASE_NOTES_FILE=".docs/releases/RELEASE_NOTES_v${NEW_VERSION}.md"
|
|
776
|
-
|
|
777
|
-
# Write comprehensive release notes
|
|
778
|
-
cat > "$RELEASE_NOTES_FILE" <<EOF
|
|
779
|
-
# Release ${NEW_VERSION}
|
|
780
|
-
|
|
781
|
-
**Release Date:** ${RELEASE_DATE}
|
|
782
|
-
**Previous Version:** ${CURRENT_VERSION}
|
|
783
|
-
**Project Type:** ${PROJECT_TYPE}
|
|
784
|
-
|
|
785
|
-
---
|
|
786
|
-
|
|
787
|
-
## Release Summary
|
|
788
|
-
|
|
789
|
-
- **Version bump:** ${CURRENT_VERSION} → ${NEW_VERSION}
|
|
790
|
-
- **Commits included:** $(git rev-list --count $COMMIT_RANGE 2>/dev/null || echo "N/A")
|
|
791
|
-
- **Release type:** ${BUMP_TYPE}
|
|
792
|
-
- **Tag:** ${TAG_NAME}
|
|
793
|
-
|
|
794
|
-
---
|
|
795
|
-
|
|
796
|
-
## Changes
|
|
797
|
-
|
|
798
|
-
$(cat <<'CHANGES_EOF'
|
|
799
|
-
${CHANGELOG_ENTRY}
|
|
800
|
-
CHANGES_EOF
|
|
801
|
-
)
|
|
802
|
-
|
|
803
|
-
---
|
|
804
|
-
|
|
805
|
-
## Commit History
|
|
806
|
-
|
|
807
|
-
\`\`\`
|
|
808
|
-
$(git log --oneline $COMMIT_RANGE 2>/dev/null || echo "No commits to display")
|
|
809
|
-
\`\`\`
|
|
810
|
-
|
|
811
|
-
---
|
|
812
|
-
|
|
813
|
-
## Build & Test Results
|
|
814
|
-
|
|
815
|
-
- **Build:** ${BUILD_RESULT:-N/A}
|
|
816
|
-
- **Tests:** ${TEST_RESULT:-N/A}
|
|
817
|
-
|
|
818
|
-
---
|
|
819
|
-
|
|
820
|
-
## Distribution
|
|
821
|
-
|
|
822
|
-
EOF
|
|
823
|
-
|
|
824
|
-
# Add registry links based on project type
|
|
825
|
-
if [ -n "$PUBLISH_CMD" ] && [ "$PUBLISH_CMD" != "echo"* ]; then
|
|
826
|
-
echo "**Published to:**" >> "$RELEASE_NOTES_FILE"
|
|
827
|
-
case "$PROJECT_TYPE" in
|
|
828
|
-
nodejs)
|
|
829
|
-
PACKAGE_NAME=$(command -v jq >/dev/null && jq -r '.name' package.json 2>/dev/null || echo "unknown")
|
|
830
|
-
echo "- npm: https://www.npmjs.com/package/${PACKAGE_NAME}/v/${NEW_VERSION}" >> "$RELEASE_NOTES_FILE"
|
|
831
|
-
;;
|
|
832
|
-
rust)
|
|
833
|
-
CRATE_NAME=$(grep '^name = ' Cargo.toml | head -1 | sed 's/name = "\(.*\)"/\1/')
|
|
834
|
-
echo "- crates.io: https://crates.io/crates/${CRATE_NAME}/${NEW_VERSION}" >> "$RELEASE_NOTES_FILE"
|
|
835
|
-
;;
|
|
836
|
-
python)
|
|
837
|
-
PACKAGE_NAME=$(grep '^name = ' pyproject.toml | head -1 | sed 's/name = "\(.*\)"/\1/' || echo "unknown")
|
|
838
|
-
echo "- PyPI: https://pypi.org/project/${PACKAGE_NAME}/${NEW_VERSION}/" >> "$RELEASE_NOTES_FILE"
|
|
839
|
-
;;
|
|
840
|
-
ruby)
|
|
841
|
-
GEM_NAME=$(ls *.gemspec 2>/dev/null | head -1 | sed 's/\.gemspec$//')
|
|
842
|
-
echo "- RubyGems: https://rubygems.org/gems/${GEM_NAME}/versions/${NEW_VERSION}" >> "$RELEASE_NOTES_FILE"
|
|
843
|
-
;;
|
|
844
|
-
*) echo "- Package registry (check project documentation)" >> "$RELEASE_NOTES_FILE" ;;
|
|
845
|
-
esac
|
|
846
|
-
echo "" >> "$RELEASE_NOTES_FILE"
|
|
847
|
-
fi
|
|
848
|
-
|
|
849
|
-
# Add Git platform links
|
|
850
|
-
if command -v gh >/dev/null && git remote get-url origin 2>/dev/null | grep -q "github.com"; then
|
|
851
|
-
REPO_URL=$(git remote get-url origin | sed 's/\.git$//')
|
|
852
|
-
cat >> "$RELEASE_NOTES_FILE" <<EOF
|
|
853
|
-
|
|
854
|
-
**Git Repository:**
|
|
855
|
-
- Release: ${REPO_URL}/releases/tag/${TAG_NAME}
|
|
856
|
-
- Commits: ${REPO_URL}/compare/${LAST_TAG}...${TAG_NAME}
|
|
857
|
-
- Changelog: ${REPO_URL}/blob/main/${CHANGELOG_FILE}
|
|
858
|
-
|
|
859
|
-
EOF
|
|
860
|
-
fi
|
|
861
|
-
|
|
862
|
-
# Add verification steps
|
|
863
|
-
cat >> "$RELEASE_NOTES_FILE" <<'EOF'
|
|
864
|
-
|
|
865
|
-
---
|
|
866
|
-
|
|
867
|
-
## Verification Steps
|
|
868
|
-
|
|
869
|
-
1. **Registry Check:** Verify package appears in registry (may take a few minutes)
|
|
870
|
-
2. **Fresh Install:** Test installation in a clean environment
|
|
871
|
-
3. **Smoke Tests:** Run basic functionality tests
|
|
872
|
-
4. **Documentation:** Update any version-specific documentation
|
|
873
|
-
|
|
874
|
-
---
|
|
875
|
-
|
|
876
|
-
*Release notes generated by DevFlow release agent*
|
|
877
|
-
EOF
|
|
878
|
-
|
|
879
|
-
echo ""
|
|
880
|
-
echo "✅ Release notes saved to: $RELEASE_NOTES_FILE"
|
|
881
|
-
echo ""
|
|
882
|
-
```
|
|
883
|
-
|
|
884
|
-
## Step 14: Verify Documentation Alignment
|
|
885
|
-
|
|
886
|
-
Check and update documentation files to ensure consistency:
|
|
887
|
-
|
|
888
|
-
```bash
|
|
889
|
-
echo "📚 Verifying documentation alignment..."
|
|
890
|
-
echo ""
|
|
891
|
-
|
|
892
|
-
DOC_ISSUES=()
|
|
893
|
-
|
|
894
|
-
# Check if ROADMAP.md exists and needs updating
|
|
895
|
-
if [ -f "ROADMAP.md" ]; then
|
|
896
|
-
echo "Checking ROADMAP.md alignment..."
|
|
897
|
-
|
|
898
|
-
# Check if this release includes features that should be marked as completed
|
|
899
|
-
if echo "$CHANGELOG_ENTRY" | grep -qiE "(feat|feature|add|new)"; then
|
|
900
|
-
echo "⚠️ ROADMAP UPDATE NEEDED:"
|
|
901
|
-
echo " This release includes new features."
|
|
902
|
-
echo " Review ROADMAP.md and mark completed items."
|
|
903
|
-
echo " File: ROADMAP.md"
|
|
904
|
-
echo ""
|
|
905
|
-
DOC_ISSUES+=("ROADMAP.md needs review for completed features")
|
|
906
|
-
fi
|
|
907
|
-
|
|
908
|
-
# Check if roadmap references old version
|
|
909
|
-
if grep -q "$CURRENT_VERSION" ROADMAP.md 2>/dev/null; then
|
|
910
|
-
echo "⚠️ ROADMAP VERSION REFERENCE:"
|
|
911
|
-
echo " ROADMAP.md references old version $CURRENT_VERSION"
|
|
912
|
-
echo " Consider updating version references to $NEW_VERSION"
|
|
913
|
-
echo ""
|
|
914
|
-
DOC_ISSUES+=("ROADMAP.md has old version references")
|
|
915
|
-
fi
|
|
916
|
-
fi
|
|
917
|
-
|
|
918
|
-
# Check for README.md files in subpackages (monorepo support)
|
|
919
|
-
echo "Checking README.md files..."
|
|
920
|
-
|
|
921
|
-
# Find all README.md files (excluding node_modules, .git, etc.)
|
|
922
|
-
READMES=$(find . -name "README.md" -not -path "*/node_modules/*" -not -path "*/.git/*" -not -path "*/dist/*" -not -path "*/build/*" 2>/dev/null)
|
|
923
|
-
|
|
924
|
-
if [ $(echo "$READMES" | wc -l) -gt 1 ]; then
|
|
925
|
-
echo "Found multiple README.md files (monorepo detected)"
|
|
926
|
-
|
|
927
|
-
# Check each README for version references
|
|
928
|
-
for readme in $READMES; do
|
|
929
|
-
if grep -q "$CURRENT_VERSION" "$readme" 2>/dev/null; then
|
|
930
|
-
echo "⚠️ VERSION MISMATCH: $readme"
|
|
931
|
-
echo " Contains old version reference: $CURRENT_VERSION"
|
|
932
|
-
echo " Should be updated to: $NEW_VERSION"
|
|
933
|
-
echo ""
|
|
934
|
-
DOC_ISSUES+=("$readme has old version reference")
|
|
935
|
-
fi
|
|
936
|
-
done
|
|
937
|
-
|
|
938
|
-
# Check for installation instructions consistency
|
|
939
|
-
MAIN_README="./README.md"
|
|
940
|
-
if [ -f "$MAIN_README" ]; then
|
|
941
|
-
MAIN_INSTALL=$(grep -A 3 "Installation\|Install\|Getting Started" "$MAIN_README" 2>/dev/null | head -5)
|
|
942
|
-
|
|
943
|
-
for readme in $READMES; do
|
|
944
|
-
if [ "$readme" != "$MAIN_README" ]; then
|
|
945
|
-
SUB_INSTALL=$(grep -A 3 "Installation\|Install\|Getting Started" "$readme" 2>/dev/null | head -5)
|
|
946
|
-
|
|
947
|
-
# Simple check if installation sections differ significantly
|
|
948
|
-
if [ -n "$MAIN_INSTALL" ] && [ -n "$SUB_INSTALL" ]; then
|
|
949
|
-
if ! echo "$SUB_INSTALL" | grep -qF "$(echo "$MAIN_INSTALL" | head -1)"; then
|
|
950
|
-
echo "⚠️ INSTALLATION INCONSISTENCY:"
|
|
951
|
-
echo " $readme has different installation instructions"
|
|
952
|
-
echo " than main README.md"
|
|
953
|
-
echo ""
|
|
954
|
-
DOC_ISSUES+=("$readme installation instructions differ from main README")
|
|
955
|
-
fi
|
|
956
|
-
fi
|
|
957
|
-
fi
|
|
958
|
-
done
|
|
959
|
-
fi
|
|
960
|
-
fi
|
|
961
|
-
|
|
962
|
-
# Verify CHANGELOG.md is up to date
|
|
963
|
-
if [ -f "$CHANGELOG_FILE" ]; then
|
|
964
|
-
if ! grep -q "## \[${NEW_VERSION}\]" "$CHANGELOG_FILE" 2>/dev/null; then
|
|
965
|
-
echo "❌ CHANGELOG MISSING NEW VERSION:"
|
|
966
|
-
echo " $CHANGELOG_FILE does not contain entry for $NEW_VERSION"
|
|
967
|
-
echo " This should have been added in Step 5"
|
|
968
|
-
echo ""
|
|
969
|
-
DOC_ISSUES+=("CHANGELOG missing $NEW_VERSION entry")
|
|
970
|
-
else
|
|
971
|
-
echo "✓ CHANGELOG contains $NEW_VERSION entry"
|
|
972
|
-
fi
|
|
973
|
-
|
|
974
|
-
# Check if changelog has link reference for new version
|
|
975
|
-
if ! grep -q "\[${NEW_VERSION}\].*http" "$CHANGELOG_FILE" 2>/dev/null; then
|
|
976
|
-
echo "⚠️ CHANGELOG LINK MISSING:"
|
|
977
|
-
echo " $CHANGELOG_FILE missing link reference for $NEW_VERSION"
|
|
978
|
-
echo " Add: [${NEW_VERSION}]: https://github.com/.../releases/tag/v${NEW_VERSION}"
|
|
979
|
-
echo ""
|
|
980
|
-
DOC_ISSUES+=("CHANGELOG missing link reference for $NEW_VERSION")
|
|
981
|
-
fi
|
|
982
|
-
fi
|
|
983
|
-
|
|
984
|
-
# Check for docs/ or documentation/ directories
|
|
985
|
-
for docs_dir in "docs" "documentation" ".docs"; do
|
|
986
|
-
if [ -d "$docs_dir" ]; then
|
|
987
|
-
echo "Checking $docs_dir/ for version references..."
|
|
988
|
-
|
|
989
|
-
# Look for markdown files with old version
|
|
990
|
-
OLD_VERSION_DOCS=$(grep -rl "$CURRENT_VERSION" "$docs_dir" 2>/dev/null | grep -E "\.(md|markdown|txt)$" || true)
|
|
991
|
-
|
|
992
|
-
if [ -n "$OLD_VERSION_DOCS" ]; then
|
|
993
|
-
echo "⚠️ DOCUMENTATION VERSION REFERENCES:"
|
|
994
|
-
echo "$OLD_VERSION_DOCS" | while read -r doc_file; do
|
|
995
|
-
echo " - $doc_file"
|
|
996
|
-
done
|
|
997
|
-
echo ""
|
|
998
|
-
DOC_ISSUES+=("Documentation files in $docs_dir/ have old version references")
|
|
999
|
-
fi
|
|
1000
|
-
fi
|
|
1001
|
-
done
|
|
1002
|
-
|
|
1003
|
-
# Summary of documentation issues
|
|
1004
|
-
echo ""
|
|
1005
|
-
if [ ${#DOC_ISSUES[@]} -eq 0 ]; then
|
|
1006
|
-
echo "✅ All documentation checks passed"
|
|
1007
|
-
else
|
|
1008
|
-
echo "⚠️ DOCUMENTATION ISSUES FOUND (${#DOC_ISSUES[@]}):"
|
|
1009
|
-
for issue in "${DOC_ISSUES[@]}"; do
|
|
1010
|
-
echo " - $issue"
|
|
1011
|
-
done
|
|
1012
|
-
echo ""
|
|
1013
|
-
echo "These issues should be addressed before announcing the release."
|
|
1014
|
-
echo "Run a search-and-replace for version references:"
|
|
1015
|
-
echo " find . -type f -name '*.md' -exec sed -i 's/$CURRENT_VERSION/$NEW_VERSION/g' {} +"
|
|
1016
|
-
echo ""
|
|
1017
|
-
fi
|
|
1018
|
-
```
|
|
1019
|
-
|
|
1020
|
-
## Step 15: Final Summary
|
|
1021
|
-
|
|
1022
|
-
Display release summary to console:
|
|
1023
|
-
|
|
1024
|
-
```bash
|
|
1025
|
-
echo "========================================="
|
|
1026
|
-
echo "🎉 RELEASE COMPLETE: $NEW_VERSION"
|
|
1027
|
-
echo "========================================="
|
|
1028
|
-
echo ""
|
|
1029
|
-
echo "📊 RELEASE SUMMARY:"
|
|
1030
|
-
echo "- Old version: $CURRENT_VERSION"
|
|
1031
|
-
echo "- New version: $NEW_VERSION"
|
|
1032
|
-
echo "- Project type: $PROJECT_TYPE"
|
|
1033
|
-
echo "- Commits included: $(git rev-list --count $COMMIT_RANGE 2>/dev/null || echo "N/A")"
|
|
1034
|
-
echo "- Tag: $TAG_NAME"
|
|
1035
|
-
echo "- Release notes: .docs/releases/RELEASE_NOTES_v${NEW_VERSION}.md"
|
|
1036
|
-
echo ""
|
|
1037
|
-
|
|
1038
|
-
if [ -n "$PUBLISH_CMD" ] && [ "$PUBLISH_CMD" != "echo"* ]; then
|
|
1039
|
-
echo "📦 PUBLISHED TO:"
|
|
1040
|
-
case "$PROJECT_TYPE" in
|
|
1041
|
-
nodejs)
|
|
1042
|
-
PACKAGE_NAME=$(command -v jq >/dev/null && jq -r '.name' package.json 2>/dev/null || echo "package")
|
|
1043
|
-
echo "- npm: https://www.npmjs.com/package/${PACKAGE_NAME}"
|
|
1044
|
-
;;
|
|
1045
|
-
rust)
|
|
1046
|
-
CRATE_NAME=$(grep '^name = ' Cargo.toml | head -1 | sed 's/name = "\(.*\)"/\1/')
|
|
1047
|
-
echo "- crates.io: https://crates.io/crates/${CRATE_NAME}"
|
|
1048
|
-
;;
|
|
1049
|
-
python) echo "- PyPI: https://pypi.org/project/<package-name>" ;;
|
|
1050
|
-
ruby) echo "- RubyGems: https://rubygems.org/gems/<gem-name>" ;;
|
|
1051
|
-
php) echo "- Packagist: https://packagist.org/packages/<vendor>/<package>" ;;
|
|
1052
|
-
*) echo "- Package registry (manual verification needed)" ;;
|
|
1053
|
-
esac
|
|
1054
|
-
echo ""
|
|
1055
|
-
fi
|
|
1056
|
-
|
|
1057
|
-
if command -v gh >/dev/null && git remote get-url origin 2>/dev/null | grep -q "github.com"; then
|
|
1058
|
-
REPO_URL=$(git remote get-url origin | sed 's/\.git$//')
|
|
1059
|
-
echo "🔗 LINKS:"
|
|
1060
|
-
echo "- Release: $REPO_URL/releases/tag/$TAG_NAME"
|
|
1061
|
-
echo "- Commits: $REPO_URL/compare/$LAST_TAG...$TAG_NAME"
|
|
1062
|
-
echo "- Changelog: $REPO_URL/blob/main/$CHANGELOG_FILE"
|
|
1063
|
-
echo "- Release Notes: $REPO_URL/blob/main/.docs/releases/RELEASE_NOTES_v${NEW_VERSION}.md"
|
|
1064
|
-
fi
|
|
1065
|
-
|
|
1066
|
-
echo ""
|
|
1067
|
-
echo "✅ NEXT STEPS:"
|
|
1068
|
-
echo "1. Verify package appears in registry (may take a few minutes)"
|
|
1069
|
-
echo "2. Test installation in a fresh environment"
|
|
1070
|
-
if [ ${#DOC_ISSUES[@]} -gt 0 ]; then
|
|
1071
|
-
echo "3. ⚠️ Address documentation issues (${#DOC_ISSUES[@]} found)"
|
|
1072
|
-
echo "4. Announce release to users/team"
|
|
1073
|
-
echo "5. Review release notes: .docs/releases/RELEASE_NOTES_v${NEW_VERSION}.md"
|
|
1074
|
-
else
|
|
1075
|
-
echo "3. Announce release to users/team"
|
|
1076
|
-
echo "4. Review release notes: .docs/releases/RELEASE_NOTES_v${NEW_VERSION}.md"
|
|
1077
|
-
fi
|
|
1078
|
-
echo ""
|
|
1079
|
-
```
|
|
1080
|
-
|
|
1081
|
-
## Safety Rules
|
|
1082
|
-
|
|
1083
|
-
### NEVER:
|
|
1084
|
-
1. ❌ Publish without user confirmation
|
|
1085
|
-
2. ❌ Proceed if working directory is dirty (uncommitted changes)
|
|
1086
|
-
3. ❌ Guess at version numbers
|
|
1087
|
-
4. ❌ Skip tests if test command exists
|
|
1088
|
-
5. ❌ Continue if build fails
|
|
1089
|
-
6. ❌ Push tags without pushing commits first
|
|
1090
|
-
7. ❌ Assume project type without detection
|
|
1091
|
-
|
|
1092
|
-
### ALWAYS:
|
|
1093
|
-
1. ✅ Detect project type before starting
|
|
1094
|
-
2. ✅ Verify clean working directory
|
|
1095
|
-
3. ✅ Analyze commits for version bump suggestion
|
|
1096
|
-
4. ✅ Generate changelog from commit history
|
|
1097
|
-
5. ✅ Build and test before publishing
|
|
1098
|
-
6. ✅ Provide rollback instructions if something fails
|
|
1099
|
-
7. ✅ Create annotated git tags with release notes
|
|
1100
|
-
8. ✅ Verify each step succeeded before proceeding
|
|
1101
|
-
|
|
1102
|
-
## Error Recovery
|
|
1103
|
-
|
|
1104
|
-
If any step fails, provide clear instructions:
|
|
1105
|
-
|
|
1106
|
-
```bash
|
|
1107
|
-
# Rollback version file changes
|
|
1108
|
-
git checkout $VERSION_FILE $CHANGELOG_FILE
|
|
1109
|
-
|
|
1110
|
-
# Remove tag if created
|
|
1111
|
-
git tag -d $TAG_NAME
|
|
1112
|
-
git push origin :refs/tags/$TAG_NAME
|
|
1113
|
-
|
|
1114
|
-
# Revert commit if made
|
|
1115
|
-
git reset --hard HEAD~1
|
|
1116
|
-
|
|
1117
|
-
# Force push if already pushed (use with caution)
|
|
1118
|
-
git push origin $CURRENT_BRANCH --force
|
|
1119
|
-
```
|
|
1120
|
-
|
|
1121
|
-
## Quality Gates
|
|
1122
|
-
|
|
1123
|
-
Before declaring release complete:
|
|
1124
|
-
- [ ] Version files updated correctly
|
|
1125
|
-
- [ ] Changelog has new entry
|
|
1126
|
-
- [ ] Build completed successfully (if applicable)
|
|
1127
|
-
- [ ] Tests passed (if applicable)
|
|
1128
|
-
- [ ] Commit created and pushed
|
|
1129
|
-
- [ ] Tag created and pushed
|
|
1130
|
-
- [ ] Package published (if applicable)
|
|
1131
|
-
- [ ] Platform release created (if applicable)
|
|
1132
|
-
- [ ] Release notes saved to `.docs/releases/RELEASE_NOTES_v<version>.md`
|
|
1133
|
-
- [ ] Documentation alignment verified (ROADMAP, READMEs, docs/)
|
|
1134
|
-
- [ ] Version references updated across all documentation
|
|
1135
|
-
- [ ] No installation instruction inconsistencies in subpackages
|
|
1136
|
-
|
|
1137
|
-
This ensures every release is professional, consistent, and safe across any programming language or ecosystem.
|