spec-kitty-cli 0.2.20__tar.gz

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.
Files changed (182) hide show
  1. spec_kitty_cli-0.2.20/.github/CODEOWNERS +2 -0
  2. spec_kitty_cli-0.2.20/.github/workflows/docs-pages.yml +60 -0
  3. spec_kitty_cli-0.2.20/.github/workflows/docs.yml +67 -0
  4. spec_kitty_cli-0.2.20/.github/workflows/protect-main.yml +114 -0
  5. spec_kitty_cli-0.2.20/.github/workflows/release-readiness.yml +105 -0
  6. spec_kitty_cli-0.2.20/.github/workflows/release.yml +95 -0
  7. spec_kitty_cli-0.2.20/.github/workflows/scripts/check-release-exists.sh +21 -0
  8. spec_kitty_cli-0.2.20/.github/workflows/scripts/create-github-release.sh +44 -0
  9. spec_kitty_cli-0.2.20/.github/workflows/scripts/create-release-packages.sh +235 -0
  10. spec_kitty_cli-0.2.20/.github/workflows/scripts/generate-release-notes.sh +36 -0
  11. spec_kitty_cli-0.2.20/.github/workflows/scripts/get-next-version.sh +24 -0
  12. spec_kitty_cli-0.2.20/.github/workflows/scripts/update-version.sh +23 -0
  13. spec_kitty_cli-0.2.20/.gitignore +47 -0
  14. spec_kitty_cli-0.2.20/.kittify/missions/research/mission.yaml +108 -0
  15. spec_kitty_cli-0.2.20/.kittify/missions/research/templates/data-model-template.md +33 -0
  16. spec_kitty_cli-0.2.20/.kittify/missions/research/templates/research/evidence-log.csv +1 -0
  17. spec_kitty_cli-0.2.20/.kittify/missions/research/templates/research/source-register.csv +1 -0
  18. spec_kitty_cli-0.2.20/.kittify/missions/research/templates/research-template.md +35 -0
  19. spec_kitty_cli-0.2.20/.kittify/missions/software-dev/commands/accept.md +61 -0
  20. spec_kitty_cli-0.2.20/.kittify/missions/software-dev/commands/analyze.md +186 -0
  21. spec_kitty_cli-0.2.20/.kittify/missions/software-dev/commands/checklist.md +289 -0
  22. spec_kitty_cli-0.2.20/.kittify/missions/software-dev/commands/clarify.md +160 -0
  23. spec_kitty_cli-0.2.20/.kittify/missions/software-dev/commands/constitution.md +77 -0
  24. spec_kitty_cli-0.2.20/.kittify/missions/software-dev/commands/dashboard.md +101 -0
  25. spec_kitty_cli-0.2.20/.kittify/missions/software-dev/commands/implement.md +247 -0
  26. spec_kitty_cli-0.2.20/.kittify/missions/software-dev/commands/merge.md +270 -0
  27. spec_kitty_cli-0.2.20/.kittify/missions/software-dev/commands/plan.md +139 -0
  28. spec_kitty_cli-0.2.20/.kittify/missions/software-dev/commands/review.md +83 -0
  29. spec_kitty_cli-0.2.20/.kittify/missions/software-dev/commands/specify.md +237 -0
  30. spec_kitty_cli-0.2.20/.kittify/missions/software-dev/commands/tasks.md +134 -0
  31. spec_kitty_cli-0.2.20/.kittify/missions/software-dev/constitution/principles.md +50 -0
  32. spec_kitty_cli-0.2.20/.kittify/missions/software-dev/mission.yaml +100 -0
  33. spec_kitty_cli-0.2.20/.kittify/missions/software-dev/templates/plan-template.md +106 -0
  34. spec_kitty_cli-0.2.20/.kittify/missions/software-dev/templates/spec-template.md +116 -0
  35. spec_kitty_cli-0.2.20/.kittify/missions/software-dev/templates/task-prompt-template.md +86 -0
  36. spec_kitty_cli-0.2.20/.kittify/missions/software-dev/templates/tasks-template.md +159 -0
  37. spec_kitty_cli-0.2.20/AGENTS.md +278 -0
  38. spec_kitty_cli-0.2.20/CHANGELOG.md +170 -0
  39. spec_kitty_cli-0.2.20/CONTRIBUTING.md +112 -0
  40. spec_kitty_cli-0.2.20/LICENSE +21 -0
  41. spec_kitty_cli-0.2.20/PKG-INFO +1003 -0
  42. spec_kitty_cli-0.2.20/README.md +947 -0
  43. spec_kitty_cli-0.2.20/ascii-art.txt +26 -0
  44. spec_kitty_cli-0.2.20/docs/.gitignore +8 -0
  45. spec_kitty_cli-0.2.20/docs/README.md +42 -0
  46. spec_kitty_cli-0.2.20/docs/assets/css/custom.css +22 -0
  47. spec_kitty_cli-0.2.20/docs/assets/images/dashboard-kanban.png +0 -0
  48. spec_kitty_cli-0.2.20/docs/assets/images/dashboard-overview.png +0 -0
  49. spec_kitty_cli-0.2.20/docs/assets/images/logo_small.webp +0 -0
  50. spec_kitty_cli-0.2.20/docs/claude-code-workflow.md +99 -0
  51. spec_kitty_cli-0.2.20/docs/docfx.json +71 -0
  52. spec_kitty_cli-0.2.20/docs/index.md +776 -0
  53. spec_kitty_cli-0.2.20/docs/installation.md +95 -0
  54. spec_kitty_cli-0.2.20/docs/kanban-dashboard-guide.md +67 -0
  55. spec_kitty_cli-0.2.20/docs/local-development.md +197 -0
  56. spec_kitty_cli-0.2.20/docs/multi-agent-orchestration.md +65 -0
  57. spec_kitty_cli-0.2.20/docs/quickstart.md +168 -0
  58. spec_kitty_cli-0.2.20/docs/releases/readiness-checklist.md +167 -0
  59. spec_kitty_cli-0.2.20/docs/spec-workflow-automation.md +66 -0
  60. spec_kitty_cli-0.2.20/docs/toc.yml +31 -0
  61. spec_kitty_cli-0.2.20/examples/claude-cursor-collaboration.md +22 -0
  62. spec_kitty_cli-0.2.20/examples/dashboard-driven-development.md +19 -0
  63. spec_kitty_cli-0.2.20/examples/multi-agent-feature-development.md +35 -0
  64. spec_kitty_cli-0.2.20/examples/parallel-implementation-tracking.md +20 -0
  65. spec_kitty_cli-0.2.20/kitty-specs/001-mission-system-architecture/meta.json +7 -0
  66. spec_kitty_cli-0.2.20/kitty-specs/001-mission-system-architecture/spec.md +664 -0
  67. spec_kitty_cli-0.2.20/kitty-specs/002-lightweight-pypi-release/checklists/requirements.md +34 -0
  68. spec_kitty_cli-0.2.20/kitty-specs/002-lightweight-pypi-release/contracts/github-release-workflow.yml +59 -0
  69. spec_kitty_cli-0.2.20/kitty-specs/002-lightweight-pypi-release/contracts/release-validation-cli.md +33 -0
  70. spec_kitty_cli-0.2.20/kitty-specs/002-lightweight-pypi-release/data-model.md +63 -0
  71. spec_kitty_cli-0.2.20/kitty-specs/002-lightweight-pypi-release/meta.json +7 -0
  72. spec_kitty_cli-0.2.20/kitty-specs/002-lightweight-pypi-release/plan.md +68 -0
  73. spec_kitty_cli-0.2.20/kitty-specs/002-lightweight-pypi-release/quickstart.md +46 -0
  74. spec_kitty_cli-0.2.20/kitty-specs/002-lightweight-pypi-release/research/evidence-log.csv +0 -0
  75. spec_kitty_cli-0.2.20/kitty-specs/002-lightweight-pypi-release/research/source-register.csv +0 -0
  76. spec_kitty_cli-0.2.20/kitty-specs/002-lightweight-pypi-release/research.md +17 -0
  77. spec_kitty_cli-0.2.20/kitty-specs/002-lightweight-pypi-release/spec.md +93 -0
  78. spec_kitty_cli-0.2.20/kitty-specs/002-lightweight-pypi-release/tasks/done/WP01-release-validation-tooling.md +196 -0
  79. spec_kitty_cli-0.2.20/kitty-specs/002-lightweight-pypi-release/tasks/for_review/WP02-pypi-release-automation.md +123 -0
  80. spec_kitty_cli-0.2.20/kitty-specs/002-lightweight-pypi-release/tasks/for_review/WP03-release-readiness-guardrails.md +115 -0
  81. spec_kitty_cli-0.2.20/kitty-specs/002-lightweight-pypi-release/tasks/for_review/WP04-documentation-and-secret-hygiene.md +109 -0
  82. spec_kitty_cli-0.2.20/kitty-specs/002-lightweight-pypi-release/tasks.md +146 -0
  83. spec_kitty_cli-0.2.20/media/dashboard-kanban.png +0 -0
  84. spec_kitty_cli-0.2.20/media/dashboard-overview.png +0 -0
  85. spec_kitty_cli-0.2.20/media/logo_large.webp +0 -0
  86. spec_kitty_cli-0.2.20/media/logo_small.png +0 -0
  87. spec_kitty_cli-0.2.20/media/logo_small.webp +0 -0
  88. spec_kitty_cli-0.2.20/memory/constitution.md +50 -0
  89. spec_kitty_cli-0.2.20/pyproject.toml +70 -0
  90. spec_kitty_cli-0.2.20/scripts/bash/accept-feature.sh +17 -0
  91. spec_kitty_cli-0.2.20/scripts/bash/check-prerequisites.sh +186 -0
  92. spec_kitty_cli-0.2.20/scripts/bash/common.sh +291 -0
  93. spec_kitty_cli-0.2.20/scripts/bash/create-new-feature.sh +272 -0
  94. spec_kitty_cli-0.2.20/scripts/bash/mark-task-status.sh +99 -0
  95. spec_kitty_cli-0.2.20/scripts/bash/merge-feature.sh +40 -0
  96. spec_kitty_cli-0.2.20/scripts/bash/move-task-to-doing.sh +43 -0
  97. spec_kitty_cli-0.2.20/scripts/bash/refresh-kittify-tasks.sh +108 -0
  98. spec_kitty_cli-0.2.20/scripts/bash/setup-plan.sh +73 -0
  99. spec_kitty_cli-0.2.20/scripts/bash/setup-sandbox.sh +179 -0
  100. spec_kitty_cli-0.2.20/scripts/bash/tasks-add-history-entry.sh +17 -0
  101. spec_kitty_cli-0.2.20/scripts/bash/tasks-list-lanes.sh +17 -0
  102. spec_kitty_cli-0.2.20/scripts/bash/tasks-move-to-lane.sh +40 -0
  103. spec_kitty_cli-0.2.20/scripts/bash/tasks-rollback-move.sh +17 -0
  104. spec_kitty_cli-0.2.20/scripts/bash/update-agent-context.sh +748 -0
  105. spec_kitty_cli-0.2.20/scripts/bash/validate-task-workflow.sh +45 -0
  106. spec_kitty_cli-0.2.20/scripts/git-hooks/pre-commit-task-workflow.sh +45 -0
  107. spec_kitty_cli-0.2.20/scripts/powershell/Merge-Feature.ps1 +38 -0
  108. spec_kitty_cli-0.2.20/scripts/powershell/Set-TaskStatus.ps1 +39 -0
  109. spec_kitty_cli-0.2.20/scripts/powershell/accept-feature.ps1 +21 -0
  110. spec_kitty_cli-0.2.20/scripts/powershell/check-prerequisites.ps1 +148 -0
  111. spec_kitty_cli-0.2.20/scripts/powershell/common.ps1 +228 -0
  112. spec_kitty_cli-0.2.20/scripts/powershell/create-new-feature.ps1 +255 -0
  113. spec_kitty_cli-0.2.20/scripts/powershell/setup-plan.ps1 +72 -0
  114. spec_kitty_cli-0.2.20/scripts/powershell/tasks-add-history-entry.ps1 +21 -0
  115. spec_kitty_cli-0.2.20/scripts/powershell/tasks-list-lanes.ps1 +21 -0
  116. spec_kitty_cli-0.2.20/scripts/powershell/tasks-move-to-lane.ps1 +21 -0
  117. spec_kitty_cli-0.2.20/scripts/powershell/tasks-rollback-move.ps1 +21 -0
  118. spec_kitty_cli-0.2.20/scripts/powershell/update-agent-context.ps1 +452 -0
  119. spec_kitty_cli-0.2.20/scripts/release/README.md +270 -0
  120. spec_kitty_cli-0.2.20/scripts/release/extract_changelog.py +80 -0
  121. spec_kitty_cli-0.2.20/scripts/release/validate_release.py +326 -0
  122. spec_kitty_cli-0.2.20/scripts/tasks/acceptance_support.py +641 -0
  123. spec_kitty_cli-0.2.20/scripts/tasks/task_helpers.py +350 -0
  124. spec_kitty_cli-0.2.20/scripts/tasks/tasks_cli.py +904 -0
  125. spec_kitty_cli-0.2.20/spec-driven.md +504 -0
  126. spec_kitty_cli-0.2.20/src/specify_cli/.kittify/missions/research/mission.yaml +108 -0
  127. spec_kitty_cli-0.2.20/src/specify_cli/.kittify/missions/research/templates/data-model-template.md +33 -0
  128. spec_kitty_cli-0.2.20/src/specify_cli/.kittify/missions/research/templates/research/evidence-log.csv +1 -0
  129. spec_kitty_cli-0.2.20/src/specify_cli/.kittify/missions/research/templates/research/source-register.csv +1 -0
  130. spec_kitty_cli-0.2.20/src/specify_cli/.kittify/missions/research/templates/research-template.md +35 -0
  131. spec_kitty_cli-0.2.20/src/specify_cli/.kittify/missions/software-dev/commands/accept.md +61 -0
  132. spec_kitty_cli-0.2.20/src/specify_cli/.kittify/missions/software-dev/commands/analyze.md +186 -0
  133. spec_kitty_cli-0.2.20/src/specify_cli/.kittify/missions/software-dev/commands/checklist.md +289 -0
  134. spec_kitty_cli-0.2.20/src/specify_cli/.kittify/missions/software-dev/commands/clarify.md +160 -0
  135. spec_kitty_cli-0.2.20/src/specify_cli/.kittify/missions/software-dev/commands/constitution.md +77 -0
  136. spec_kitty_cli-0.2.20/src/specify_cli/.kittify/missions/software-dev/commands/dashboard.md +101 -0
  137. spec_kitty_cli-0.2.20/src/specify_cli/.kittify/missions/software-dev/commands/implement.md +247 -0
  138. spec_kitty_cli-0.2.20/src/specify_cli/.kittify/missions/software-dev/commands/merge.md +270 -0
  139. spec_kitty_cli-0.2.20/src/specify_cli/.kittify/missions/software-dev/commands/plan.md +139 -0
  140. spec_kitty_cli-0.2.20/src/specify_cli/.kittify/missions/software-dev/commands/review.md +83 -0
  141. spec_kitty_cli-0.2.20/src/specify_cli/.kittify/missions/software-dev/commands/specify.md +237 -0
  142. spec_kitty_cli-0.2.20/src/specify_cli/.kittify/missions/software-dev/commands/tasks.md +134 -0
  143. spec_kitty_cli-0.2.20/src/specify_cli/.kittify/missions/software-dev/constitution/principles.md +50 -0
  144. spec_kitty_cli-0.2.20/src/specify_cli/.kittify/missions/software-dev/mission.yaml +100 -0
  145. spec_kitty_cli-0.2.20/src/specify_cli/.kittify/missions/software-dev/templates/plan-template.md +106 -0
  146. spec_kitty_cli-0.2.20/src/specify_cli/.kittify/missions/software-dev/templates/spec-template.md +116 -0
  147. spec_kitty_cli-0.2.20/src/specify_cli/.kittify/missions/software-dev/templates/task-prompt-template.md +86 -0
  148. spec_kitty_cli-0.2.20/src/specify_cli/.kittify/missions/software-dev/templates/tasks-template.md +159 -0
  149. spec_kitty_cli-0.2.20/src/specify_cli/__init__.py +2402 -0
  150. spec_kitty_cli-0.2.20/src/specify_cli/acceptance.py +571 -0
  151. spec_kitty_cli-0.2.20/src/specify_cli/dashboard.py +1964 -0
  152. spec_kitty_cli-0.2.20/src/specify_cli/mission.py +343 -0
  153. spec_kitty_cli-0.2.20/src/specify_cli/static/spec-kitty.png +0 -0
  154. spec_kitty_cli-0.2.20/src/specify_cli/tasks_support.py +311 -0
  155. spec_kitty_cli-0.2.20/templates/agent-file-template.md +25 -0
  156. spec_kitty_cli-0.2.20/templates/checklist-template.md +42 -0
  157. spec_kitty_cli-0.2.20/templates/commands/accept.md +66 -0
  158. spec_kitty_cli-0.2.20/templates/commands/analyze.md +191 -0
  159. spec_kitty_cli-0.2.20/templates/commands/checklist.md +294 -0
  160. spec_kitty_cli-0.2.20/templates/commands/clarify.md +165 -0
  161. spec_kitty_cli-0.2.20/templates/commands/constitution.md +82 -0
  162. spec_kitty_cli-0.2.20/templates/commands/dashboard.md +105 -0
  163. spec_kitty_cli-0.2.20/templates/commands/implement.md +253 -0
  164. spec_kitty_cli-0.2.20/templates/commands/merge.md +274 -0
  165. spec_kitty_cli-0.2.20/templates/commands/plan.md +146 -0
  166. spec_kitty_cli-0.2.20/templates/commands/research.md +37 -0
  167. spec_kitty_cli-0.2.20/templates/commands/review.md +88 -0
  168. spec_kitty_cli-0.2.20/templates/commands/specify.md +242 -0
  169. spec_kitty_cli-0.2.20/templates/commands/tasks.md +139 -0
  170. spec_kitty_cli-0.2.20/templates/plan-template.md +108 -0
  171. spec_kitty_cli-0.2.20/templates/spec-template.md +118 -0
  172. spec_kitty_cli-0.2.20/templates/task-prompt-template.md +88 -0
  173. spec_kitty_cli-0.2.20/templates/tasks-template.md +161 -0
  174. spec_kitty_cli-0.2.20/templates/vscode-settings.json +13 -0
  175. spec_kitty_cli-0.2.20/tests/__init__.py +0 -0
  176. spec_kitty_cli-0.2.20/tests/conftest.py +77 -0
  177. spec_kitty_cli-0.2.20/tests/release/__init__.py +1 -0
  178. spec_kitty_cli-0.2.20/tests/release/test_validate_release.py +202 -0
  179. spec_kitty_cli-0.2.20/tests/test_acceptance_support.py +85 -0
  180. spec_kitty_cli-0.2.20/tests/test_task_helpers.py +58 -0
  181. spec_kitty_cli-0.2.20/tests/test_tasks_cli_commands.py +352 -0
  182. spec_kitty_cli-0.2.20/tests/utils.py +75 -0
@@ -0,0 +1,2 @@
1
+ # Global code owner
2
+ * @localden
@@ -0,0 +1,60 @@
1
+ name: Deploy Docs to GitHub Pages
2
+
3
+ on:
4
+ push:
5
+ branches: [ main ]
6
+ paths:
7
+ - 'docs/**'
8
+ - 'examples/**'
9
+ - 'spec-driven.md'
10
+ - 'README.md'
11
+ - '.github/workflows/docs-pages.yml'
12
+ workflow_dispatch:
13
+
14
+ permissions:
15
+ contents: read
16
+ pages: write
17
+ id-token: write
18
+
19
+ concurrency:
20
+ group: "pages"
21
+ cancel-in-progress: true
22
+
23
+ jobs:
24
+ build:
25
+ runs-on: ubuntu-latest
26
+ steps:
27
+ - name: Checkout
28
+ uses: actions/checkout@v4
29
+
30
+ - name: Setup .NET SDK
31
+ uses: actions/setup-dotnet@v4
32
+ with:
33
+ dotnet-version: '7.0.x'
34
+
35
+ - name: Install DocFX
36
+ run: dotnet tool update --global docfx --version 2.76.0
37
+
38
+ - name: Build documentation
39
+ run: |
40
+ export PATH="$HOME/.dotnet/tools:$PATH"
41
+ docfx docs/docfx.json
42
+
43
+ - name: Setup Pages
44
+ uses: actions/configure-pages@v4
45
+
46
+ - name: Upload artifact
47
+ uses: actions/upload-pages-artifact@v2
48
+ with:
49
+ path: docs/_site
50
+
51
+ deploy:
52
+ runs-on: ubuntu-latest
53
+ needs: build
54
+ environment:
55
+ name: github-pages
56
+ url: ${{ steps.deployment.outputs.page_url }}
57
+ steps:
58
+ - name: Deploy to GitHub Pages
59
+ id: deployment
60
+ uses: actions/deploy-pages@v3
@@ -0,0 +1,67 @@
1
+ # Build and deploy DocFX documentation to GitHub Pages
2
+ name: Deploy Documentation to Pages
3
+
4
+ on:
5
+ # Runs on pushes targeting the default branch
6
+ push:
7
+ branches: ["main"]
8
+ paths:
9
+ - 'docs/**'
10
+
11
+ # Allows you to run this workflow manually from the Actions tab
12
+ workflow_dispatch:
13
+
14
+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
15
+ permissions:
16
+ contents: read
17
+ pages: write
18
+ id-token: write
19
+
20
+ # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
21
+ # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
22
+ concurrency:
23
+ group: "pages"
24
+ cancel-in-progress: false
25
+
26
+ jobs:
27
+ # Build job
28
+ build:
29
+ runs-on: ubuntu-latest
30
+ steps:
31
+ - name: Checkout
32
+ uses: actions/checkout@v4
33
+ with:
34
+ fetch-depth: 0 # Fetch all history for git info
35
+
36
+ - name: Setup .NET
37
+ uses: actions/setup-dotnet@v4
38
+ with:
39
+ dotnet-version: '8.x'
40
+
41
+ - name: Setup DocFX
42
+ run: dotnet tool install -g docfx
43
+
44
+ - name: Build with DocFX
45
+ run: |
46
+ cd docs
47
+ docfx docfx.json
48
+
49
+ - name: Setup Pages
50
+ uses: actions/configure-pages@v5
51
+
52
+ - name: Upload artifact
53
+ uses: actions/upload-pages-artifact@v3
54
+ with:
55
+ path: 'docs/_site'
56
+
57
+ # Deploy job
58
+ deploy:
59
+ environment:
60
+ name: github-pages
61
+ url: ${{ steps.deployment.outputs.page_url }}
62
+ runs-on: ubuntu-latest
63
+ needs: build
64
+ steps:
65
+ - name: Deploy to GitHub Pages
66
+ id: deployment
67
+ uses: actions/deploy-pages@v4
@@ -0,0 +1,114 @@
1
+ name: Protect Main Branch
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+
8
+ permissions:
9
+ contents: read
10
+
11
+ jobs:
12
+ check-merge-compliance:
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - name: Check out repository
16
+ uses: actions/checkout@v4
17
+ with:
18
+ fetch-depth: 2
19
+
20
+ - name: Verify commit came from PR
21
+ run: |
22
+ # Skip check for repository initialization (first commit)
23
+ if [[ "${{ github.event.before }}" == "0000000000000000000000000000000000000000" ]]; then
24
+ echo "✅ Initial commit detected, skipping merge compliance check"
25
+ exit 0
26
+ fi
27
+
28
+ # Get commit message and metadata
29
+ COMMIT_MSG="${{ github.event.head_commit.message }}"
30
+ COMMITTER="${{ github.event.head_commit.committer.name }}"
31
+
32
+ echo "Commit message: $COMMIT_MSG"
33
+ echo "Committer: $COMMITTER"
34
+
35
+ # Check if this is a merge commit from a PR
36
+ # Valid patterns:
37
+ # 1. "Merge pull request #..." (GitHub merge commits)
38
+ # 2. Commits from "GitHub" or "github-actions[bot]" (automated merges)
39
+ # 3. Tag pushes (handled by release workflow, not direct commits)
40
+
41
+ if [[ "$COMMIT_MSG" =~ ^Merge\ pull\ request\ #[0-9]+ ]] || \
42
+ [[ "$COMMITTER" == "GitHub" ]] || \
43
+ [[ "$COMMITTER" == "github-actions[bot]" ]]; then
44
+ echo "✅ Commit is from an approved PR merge or automated process"
45
+ exit 0
46
+ fi
47
+
48
+ # Check if this is a squash/rebase merge
49
+ # GitHub squash merges include the PR number in the commit message
50
+ if [[ "$COMMIT_MSG" =~ \(#[0-9]+\) ]]; then
51
+ echo "✅ Commit is from a squash/rebase merge (contains PR reference)"
52
+ exit 0
53
+ fi
54
+
55
+ # If we get here, this appears to be a direct push
56
+ echo "::error::❌ Direct push to main branch detected!"
57
+ echo "::error::"
58
+ echo "::error::All changes to main must go through a pull request."
59
+ echo "::error::"
60
+ echo "::error::To fix this:"
61
+ echo "::error::1. Create a feature branch from the commit before this one"
62
+ echo "::error::2. Cherry-pick or reapply your changes to that branch"
63
+ echo "::error::3. Open a pull request for review"
64
+ echo "::error::"
65
+ echo "::error::To prevent this in the future:"
66
+ echo "::error::1. Enable branch protection rules for main:"
67
+ echo "::error:: - Go to Settings > Branches > Add rule"
68
+ echo "::error:: - Enable 'Require pull request reviews before merging'"
69
+ echo "::error:: - Enable 'Require status checks to pass before merging'"
70
+ echo "::error::"
71
+ echo "::error::📖 See: docs/releases/readiness-checklist.md for the complete workflow"
72
+
73
+ # Add to job summary
74
+ cat >> $GITHUB_STEP_SUMMARY <<EOF
75
+ # ❌ Direct Push Detected
76
+
77
+ This commit was pushed directly to \`main\` without going through a pull request.
78
+
79
+ ## Required Action
80
+
81
+ All changes to \`main\` must be reviewed via pull requests.
82
+
83
+ ### How to Fix
84
+
85
+ 1. **Revert this commit** (if it hasn't been deployed):
86
+ \`\`\`bash
87
+ git revert HEAD
88
+ git push origin main
89
+ \`\`\`
90
+
91
+ 2. **Create a feature branch**:
92
+ \`\`\`bash
93
+ git checkout -b fix/proper-pr-workflow
94
+ git cherry-pick <this-commit-sha>
95
+ git push origin fix/proper-pr-workflow
96
+ \`\`\`
97
+
98
+ 3. **Open a pull request** for review
99
+
100
+ ### Prevent Future Issues
101
+
102
+ Enable branch protection rules:
103
+ - Go to **Settings > Branches > Add rule**
104
+ - Branch name pattern: \`main\`
105
+ - Enable **"Require pull request reviews before merging"**
106
+ - Enable **"Require status checks to pass before merging"**
107
+ - Select **release-readiness** as a required check
108
+
109
+ ## Reference
110
+
111
+ 📖 [Release Readiness Checklist](https://github.com/${{ github.repository }}/blob/main/docs/releases/readiness-checklist.md)
112
+ EOF
113
+
114
+ exit 1
@@ -0,0 +1,105 @@
1
+ name: Release Readiness Check
2
+
3
+ on:
4
+ pull_request:
5
+ branches:
6
+ - main
7
+ workflow_dispatch:
8
+ inputs:
9
+ tag:
10
+ description: 'Optional tag to validate (for dry runs)'
11
+ required: false
12
+ type: string
13
+ schedule:
14
+ # Run nightly to monitor drift
15
+ - cron: '0 2 * * *'
16
+
17
+ concurrency:
18
+ group: release-readiness-${{ github.ref }}
19
+ cancel-in-progress: true
20
+
21
+ permissions:
22
+ contents: read
23
+ pull-requests: write
24
+
25
+ jobs:
26
+ check-readiness:
27
+ runs-on: ubuntu-latest
28
+ steps:
29
+ - name: Check out repository
30
+ uses: actions/checkout@v4
31
+ with:
32
+ fetch-depth: 0
33
+
34
+ - name: Set up Python
35
+ uses: actions/setup-python@v5
36
+ with:
37
+ python-version: '3.11'
38
+ cache: 'pip'
39
+
40
+ - name: Install dependencies
41
+ run: |
42
+ python -m pip install --upgrade pip
43
+ pip install build tomli packaging pytest
44
+ pip install -e .[test]
45
+
46
+ - name: Run tests
47
+ run: |
48
+ echo "::group::Running test suite"
49
+ python -m pytest -v
50
+ echo "::endgroup::"
51
+
52
+ - name: Validate release metadata
53
+ id: validate
54
+ continue-on-error: true
55
+ run: |
56
+ if [[ -n "${{ inputs.tag }}" ]]; then
57
+ echo "Running validation in tag mode for dry run: ${{ inputs.tag }}"
58
+ python scripts/release/validate_release.py --mode tag --tag "${{ inputs.tag }}"
59
+ else
60
+ echo "Running validation in branch mode"
61
+ python scripts/release/validate_release.py --mode branch
62
+ fi
63
+
64
+ - name: Test packaging
65
+ run: |
66
+ echo "::group::Building wheel to catch packaging issues"
67
+ python -m build --wheel
68
+ echo "::endgroup::"
69
+
70
+ - name: Generate readiness summary
71
+ if: always()
72
+ run: |
73
+ echo "# Release Readiness Report" >> $GITHUB_STEP_SUMMARY
74
+ echo "" >> $GITHUB_STEP_SUMMARY
75
+
76
+ if [[ "${{ steps.validate.outcome }}" == "success" ]]; then
77
+ echo "✅ **All readiness checks passed**" >> $GITHUB_STEP_SUMMARY
78
+ echo "" >> $GITHUB_STEP_SUMMARY
79
+ echo "This branch is ready for release:" >> $GITHUB_STEP_SUMMARY
80
+ echo "- Version is properly bumped" >> $GITHUB_STEP_SUMMARY
81
+ echo "- Changelog entry exists and is populated" >> $GITHUB_STEP_SUMMARY
82
+ echo "- Version progression is monotonic" >> $GITHUB_STEP_SUMMARY
83
+ echo "- Tests pass" >> $GITHUB_STEP_SUMMARY
84
+ echo "- Package builds successfully" >> $GITHUB_STEP_SUMMARY
85
+ else
86
+ echo "❌ **Readiness checks failed**" >> $GITHUB_STEP_SUMMARY
87
+ echo "" >> $GITHUB_STEP_SUMMARY
88
+ echo "Please complete the following before merging:" >> $GITHUB_STEP_SUMMARY
89
+ echo "" >> $GITHUB_STEP_SUMMARY
90
+ echo "### Required Actions" >> $GITHUB_STEP_SUMMARY
91
+ echo "" >> $GITHUB_STEP_SUMMARY
92
+ echo "1. **Version Bump** - Update version in \`pyproject.toml\`" >> $GITHUB_STEP_SUMMARY
93
+ echo "2. **Changelog Entry** - Add release notes under \`## [X.Y.Z]\` in \`CHANGELOG.md\`" >> $GITHUB_STEP_SUMMARY
94
+ echo "3. **Version Progression** - Ensure new version > latest tag" >> $GITHUB_STEP_SUMMARY
95
+ echo "" >> $GITHUB_STEP_SUMMARY
96
+ echo "See the validation output above for specific errors." >> $GITHUB_STEP_SUMMARY
97
+ echo "" >> $GITHUB_STEP_SUMMARY
98
+ echo "📖 **Reference**: [Release Readiness Checklist](https://github.com/${{ github.repository }}/blob/main/docs/releases/readiness-checklist.md)" >> $GITHUB_STEP_SUMMARY
99
+ fi
100
+
101
+ - name: Fail if validation failed
102
+ if: steps.validate.outcome != 'success'
103
+ run: |
104
+ echo "::error::Release readiness checks failed. Review the validation output and job summary for details."
105
+ exit 1
@@ -0,0 +1,95 @@
1
+ name: Publish Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v*.*.*'
7
+ workflow_dispatch:
8
+
9
+ permissions:
10
+ contents: write
11
+ id-token: write
12
+
13
+ jobs:
14
+ release:
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ - name: Check out repository
18
+ uses: actions/checkout@v4
19
+ with:
20
+ fetch-depth: 0
21
+
22
+ - name: Set up Python
23
+ uses: actions/setup-python@v5
24
+ with:
25
+ python-version: '3.11'
26
+ cache: 'pip'
27
+
28
+ - name: Install tooling
29
+ run: |
30
+ python -m pip install --upgrade pip
31
+ pip install build twine tomli packaging pytest
32
+ pip install -e .[test]
33
+
34
+ - name: Run tests
35
+ run: python -m pytest
36
+
37
+ - name: Validate release metadata
38
+ run: python scripts/release/validate_release.py --mode tag --tag "${GITHUB_REF_NAME}"
39
+
40
+ - name: Build distributions
41
+ run: python -m build
42
+
43
+ - name: Check distributions
44
+ run: twine check dist/*.whl dist/*.tar.gz
45
+
46
+ - name: Extract changelog for release
47
+ id: changelog
48
+ run: |
49
+ VERSION="${GITHUB_REF_NAME#v}"
50
+ python scripts/release/extract_changelog.py "${VERSION}" > release-notes.md
51
+ cat release-notes.md
52
+
53
+ - name: Publish to PyPI
54
+ uses: pypa/gh-action-pypi-publish@release/v1
55
+ with:
56
+ password: ${{ secrets.PYPI_API_TOKEN }}
57
+ skip-existing: true
58
+ verbose: true
59
+
60
+ - name: Record artifact checksums
61
+ if: success()
62
+ run: |
63
+ sha256sum dist/*.whl dist/*.tar.gz > SHA256SUMS.txt
64
+ cat SHA256SUMS.txt
65
+
66
+ - name: Create GitHub Release
67
+ uses: softprops/action-gh-release@v2
68
+ if: startsWith(github.ref, 'refs/tags/')
69
+ with:
70
+ body_path: release-notes.md
71
+ files: |
72
+ dist/*.whl
73
+ dist/*.tar.gz
74
+ SHA256SUMS.txt
75
+ draft: false
76
+ prerelease: false
77
+
78
+ - name: Upload build artifacts
79
+ uses: actions/upload-artifact@v4
80
+ if: always()
81
+ with:
82
+ name: release-distributions
83
+ path: |
84
+ dist/
85
+ SHA256SUMS.txt
86
+ retention-days: 30
87
+
88
+ - name: Report failure if secret missing
89
+ if: failure()
90
+ run: |
91
+ echo "::error::Release workflow failed. Common issues:"
92
+ echo "::error::1. PYPI_API_TOKEN secret is not configured"
93
+ echo "::error::2. Validation checks failed (version/changelog mismatch)"
94
+ echo "::error::3. Tests failed"
95
+ echo "::error::Check the logs above for specific failure reasons."
@@ -0,0 +1,21 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ # check-release-exists.sh
5
+ # Check if a GitHub release already exists for the given version
6
+ # Usage: check-release-exists.sh <version>
7
+
8
+ if [[ $# -ne 1 ]]; then
9
+ echo "Usage: $0 <version>" >&2
10
+ exit 1
11
+ fi
12
+
13
+ VERSION="$1"
14
+
15
+ if gh release view "$VERSION" >/dev/null 2>&1; then
16
+ echo "exists=true" >> $GITHUB_OUTPUT
17
+ echo "Release $VERSION already exists, skipping..."
18
+ else
19
+ echo "exists=false" >> $GITHUB_OUTPUT
20
+ echo "Release $VERSION does not exist, proceeding..."
21
+ fi
@@ -0,0 +1,44 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ # create-github-release.sh
5
+ # Create a GitHub release with all template zip files
6
+ # Usage: create-github-release.sh <version>
7
+
8
+ if [[ $# -ne 1 ]]; then
9
+ echo "Usage: $0 <version>" >&2
10
+ exit 1
11
+ fi
12
+
13
+ VERSION="$1"
14
+
15
+ # Remove 'v' prefix from version for release title
16
+ VERSION_NO_V=${VERSION#v}
17
+
18
+ gh release create "$VERSION" \
19
+ .genreleases/spec-kitty-template-copilot-sh-"$VERSION".zip \
20
+ .genreleases/spec-kitty-template-copilot-ps-"$VERSION".zip \
21
+ .genreleases/spec-kitty-template-claude-sh-"$VERSION".zip \
22
+ .genreleases/spec-kitty-template-claude-ps-"$VERSION".zip \
23
+ .genreleases/spec-kitty-template-gemini-sh-"$VERSION".zip \
24
+ .genreleases/spec-kitty-template-gemini-ps-"$VERSION".zip \
25
+ .genreleases/spec-kitty-template-cursor-sh-"$VERSION".zip \
26
+ .genreleases/spec-kitty-template-cursor-ps-"$VERSION".zip \
27
+ .genreleases/spec-kitty-template-opencode-sh-"$VERSION".zip \
28
+ .genreleases/spec-kitty-template-opencode-ps-"$VERSION".zip \
29
+ .genreleases/spec-kitty-template-qwen-sh-"$VERSION".zip \
30
+ .genreleases/spec-kitty-template-qwen-ps-"$VERSION".zip \
31
+ .genreleases/spec-kitty-template-windsurf-sh-"$VERSION".zip \
32
+ .genreleases/spec-kitty-template-windsurf-ps-"$VERSION".zip \
33
+ .genreleases/spec-kitty-template-codex-sh-"$VERSION".zip \
34
+ .genreleases/spec-kitty-template-codex-ps-"$VERSION".zip \
35
+ .genreleases/spec-kitty-template-kilocode-sh-"$VERSION".zip \
36
+ .genreleases/spec-kitty-template-kilocode-ps-"$VERSION".zip \
37
+ .genreleases/spec-kitty-template-auggie-sh-"$VERSION".zip \
38
+ .genreleases/spec-kitty-template-auggie-ps-"$VERSION".zip \
39
+ .genreleases/spec-kitty-template-roo-sh-"$VERSION".zip \
40
+ .genreleases/spec-kitty-template-roo-ps-"$VERSION".zip \
41
+ .genreleases/spec-kitty-template-q-sh-"$VERSION".zip \
42
+ .genreleases/spec-kitty-template-q-ps-"$VERSION".zip \
43
+ --title "Spec Kitty Templates - $VERSION_NO_V" \
44
+ --notes-file release_notes.md