hammerkit 1.6.0-alpha.3 → 1.7.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.
Files changed (256) hide show
  1. package/README.md +4 -4
  2. package/build.schema.json +49 -2
  3. package/dist/cache/backends/local-cache-backend.js +58 -1
  4. package/dist/cache/backends/registry/registry-client.js +264 -0
  5. package/dist/cache/backends/registry/registry-credentials.js +81 -0
  6. package/dist/cache/backends/registry/registry-reference.js +36 -0
  7. package/dist/cache/backends/registry-cache-backend.js +145 -0
  8. package/dist/cache/backends/s3-cache-backend.js +99 -46
  9. package/dist/cache/cache-backend-registry.js +2 -0
  10. package/dist/cache/cache-inventory.js +84 -0
  11. package/dist/cache/cache-sync.js +77 -0
  12. package/dist/cache/explain.js +214 -0
  13. package/dist/cache/last-resolved.js +48 -0
  14. package/dist/cache/read-only.js +15 -0
  15. package/dist/cache/retention.js +61 -0
  16. package/dist/cli.js +43 -0
  17. package/dist/docker/using-container.js +5 -1
  18. package/dist/executer/archive-task-entry.js +21 -0
  19. package/dist/executer/await-completed-dependencies.js +32 -14
  20. package/dist/executer/cache-metadata.js +9 -2
  21. package/dist/executer/docker-service.js +2 -1
  22. package/dist/executer/docker-task.js +2 -1
  23. package/dist/executer/dry-run.js +73 -0
  24. package/dist/executer/event-cache.js +6 -5
  25. package/dist/executer/execute-command.js +21 -3
  26. package/dist/executer/execute-work-service.js +10 -1
  27. package/dist/executer/execute-work-task.js +95 -25
  28. package/dist/executer/execute-work-tree.js +26 -1
  29. package/dist/executer/get-scheduler-execute-result.js +4 -1
  30. package/dist/executer/lazy-resolver.js +15 -3
  31. package/dist/executer/reset-work-tree.js +2 -0
  32. package/dist/executer/run-summary.js +102 -0
  33. package/dist/executer/scheduler/enqueue-next.js +15 -60
  34. package/dist/executer/scheduler/state-key.js +78 -0
  35. package/dist/kubernetes/await-running-state.js +73 -19
  36. package/dist/log.js +16 -6
  37. package/dist/logging/live-logger.js +2 -1
  38. package/dist/optimizer/calculate-checksum.js +8 -2
  39. package/dist/optimizer/get-work-cache-stats.js +66 -16
  40. package/dist/optimizer/work-task-cache-description.js +34 -5
  41. package/dist/planner/project-root.js +26 -0
  42. package/dist/planner/utils/append-work-service.js +2 -1
  43. package/dist/planner/utils/append-work-task.js +7 -1
  44. package/dist/planner/utils/parse-work-source.js +35 -30
  45. package/dist/planner/utils/portable-path.js +30 -0
  46. package/dist/planner/work-cache-id.js +2 -2
  47. package/dist/planner/work-graph-serializer.js +103 -0
  48. package/dist/planner/work-instance-id.js +15 -0
  49. package/dist/planner/work-runtime-docker.js +53 -15
  50. package/dist/planner/work-runtime-kubernetes.js +35 -3
  51. package/dist/planner/work-runtime-local.js +9 -3
  52. package/dist/planner/work-service-id.js +16 -4
  53. package/dist/program.js +235 -1
  54. package/dist/schema/build-file-base-task-schema.js +4 -0
  55. package/dist/schema/cache-schema.js +21 -2
  56. package/dist/schema/duration-schema.js +18 -0
  57. package/dist/schema/reference-parser.js +3 -0
  58. package/dist/schema/size-schema.js +18 -0
  59. package/dist/schema/work-scope-parser.js +15 -2
  60. package/dist/utils/units.js +87 -0
  61. package/package.json +15 -4
  62. package/.agents/FEEDBACK.md +0 -74
  63. package/.agents/skills/before-commit/SKILL.md +0 -101
  64. package/.agents/skills/do-the-work/SKILL.md +0 -64
  65. package/.agents/skills/fix-ci/SKILL.md +0 -98
  66. package/.agents/skills/speckit-git-commit/SKILL.md +0 -53
  67. package/.agents/skills/speckit-git-feature/SKILL.md +0 -72
  68. package/.agents/skills/speckit-git-initialize/SKILL.md +0 -54
  69. package/.agents/skills/speckit-git-remote/SKILL.md +0 -50
  70. package/.agents/skills/speckit-git-validate/SKILL.md +0 -54
  71. package/.devcontainer/Dockerfile +0 -5
  72. package/.devcontainer/devcontainer.json +0 -40
  73. package/.gitbook.yaml +0 -5
  74. package/.specify/extensions/.registry +0 -37
  75. package/.specify/extensions/git/README.md +0 -100
  76. package/.specify/extensions/git/commands/speckit.git.commit.md +0 -48
  77. package/.specify/extensions/git/commands/speckit.git.feature.md +0 -67
  78. package/.specify/extensions/git/commands/speckit.git.initialize.md +0 -49
  79. package/.specify/extensions/git/commands/speckit.git.remote.md +0 -45
  80. package/.specify/extensions/git/commands/speckit.git.validate.md +0 -49
  81. package/.specify/extensions/git/config-template.yml +0 -62
  82. package/.specify/extensions/git/extension.yml +0 -140
  83. package/.specify/extensions/git/git-config.yml +0 -62
  84. package/.specify/extensions.yml +0 -149
  85. package/.specify/feature.json +0 -3
  86. package/.specify/init-options.json +0 -10
  87. package/.specify/integration.json +0 -15
  88. package/.specify/integrations/claude.manifest.json +0 -16
  89. package/.specify/integrations/speckit.manifest.json +0 -17
  90. package/.specify/memory/constitution.md +0 -162
  91. package/.specify/templates/checklist-template.md +0 -40
  92. package/.specify/templates/constitution-template.md +0 -50
  93. package/.specify/templates/plan-template.md +0 -113
  94. package/.specify/templates/spec-template.md +0 -131
  95. package/.specify/templates/tasks-template.md +0 -252
  96. package/.specify/workflows/speckit/workflow.yml +0 -77
  97. package/.specify/workflows/workflow-registry.json +0 -13
  98. package/AGENTS.md +0 -94
  99. package/Dockerfile +0 -25
  100. package/FOLLOWUPS.md +0 -34
  101. package/SUMMARY.md +0 -68
  102. package/VALUES.md +0 -53
  103. package/dist/cache/auto-pull.spec.js +0 -123
  104. package/dist/cache/backends/local-cache-backend.spec.js +0 -72
  105. package/dist/cache/backends/s3-cache-backend.spec.js +0 -118
  106. package/dist/cache/cache-backend-registry.spec.js +0 -22
  107. package/dist/cache/resolve-cache.spec.js +0 -52
  108. package/dist/cli.spec.js +0 -23
  109. package/dist/console/get-logger.spec.js +0 -23
  110. package/dist/docker/get-default-platform.spec.js +0 -29
  111. package/dist/docker/longest-common-prefix.spec.js +0 -26
  112. package/dist/docker/package.spec.js +0 -145
  113. package/dist/docker/remove-container.spec.js +0 -32
  114. package/dist/docker/using-container.spec.js +0 -90
  115. package/dist/environment/merge-environment-variables.spec.js +0 -24
  116. package/dist/environment/replace-env-variables.spec.js +0 -47
  117. package/dist/executer/abort.spec.js +0 -18
  118. package/dist/executer/environment-mock.spec.js +0 -22
  119. package/dist/executer/execute.spec.js +0 -51
  120. package/dist/executer/get-service-containers.spec.js +0 -59
  121. package/dist/executer/get-service-env-hints.spec.js +0 -65
  122. package/dist/executer/label-values.spec.js +0 -61
  123. package/dist/executer/lazy-resolver.spec.js +0 -20
  124. package/dist/executer/process-manager.spec.js +0 -54
  125. package/dist/executer/scheduler/enqueue-next.spec.js +0 -136
  126. package/dist/executer/state-resolver.spec.js +0 -37
  127. package/dist/executer/state.spec.js +0 -66
  128. package/dist/executer/states.spec.js +0 -14
  129. package/dist/file/get-file-context.spec.js +0 -178
  130. package/dist/file/move-files.spec.js +0 -48
  131. package/dist/kubernetes/ensure-http-route.spec.js +0 -70
  132. package/dist/kubernetes/ensure-namespace.spec.js +0 -39
  133. package/dist/kubernetes/resolve-pod-name.spec.js +0 -81
  134. package/dist/log.spec.js +0 -131
  135. package/dist/logging/grouped-logger.spec.js +0 -84
  136. package/dist/logging/interactive-logger.spec.js +0 -57
  137. package/dist/logging/live-logger.spec.js +0 -37
  138. package/dist/logging/loggers.spec.js +0 -154
  139. package/dist/optimizer/calculate-checksum.spec.js +0 -34
  140. package/dist/optimizer/get-cache-directory.spec.js +0 -59
  141. package/dist/optimizer/get-work-cache-stats.spec.js +0 -79
  142. package/dist/optimizer/work-task-cache-description.spec.js +0 -45
  143. package/dist/parser/default-build-file.spec.js +0 -48
  144. package/dist/parser/parse-label-arguments.spec.js +0 -27
  145. package/dist/parser/read-build-file.spec.js +0 -89
  146. package/dist/parser/read-env-file.spec.js +0 -42
  147. package/dist/planner/utils/append-work-service.spec.js +0 -71
  148. package/dist/planner/utils/get-container-user.spec.js +0 -30
  149. package/dist/planner/utils/get-default-kube-config.spec.js +0 -11
  150. package/dist/planner/utils/normalize-path.spec.js +0 -24
  151. package/dist/planner/utils/parse-work-command.spec.js +0 -21
  152. package/dist/planner/utils/parse-work-generate.spec.js +0 -45
  153. package/dist/planner/utils/parse-work-mount.spec.js +0 -62
  154. package/dist/planner/utils/parse-work-mounts.spec.js +0 -19
  155. package/dist/planner/utils/parse-work-port.spec.js +0 -24
  156. package/dist/planner/utils/parse-work-ports.spec.js +0 -24
  157. package/dist/planner/utils/parse-work-source.spec.js +0 -58
  158. package/dist/planner/utils/parse-work-volume.spec.js +0 -18
  159. package/dist/planner/utils/plan-work-tasks.spec.js +0 -30
  160. package/dist/planner/utils/plan-work-volume.spec.js +0 -33
  161. package/dist/planner/utils/split-name.spec.js +0 -16
  162. package/dist/planner/utils/template-value.spec.js +0 -14
  163. package/dist/planner/validate.spec.js +0 -251
  164. package/dist/planner/work-cache-id.spec.js +0 -173
  165. package/dist/planner/work-runtime-local.spec.js +0 -193
  166. package/dist/program-commands.spec.js +0 -84
  167. package/dist/program.spec.js +0 -43
  168. package/dist/schema/build-file-schema.spec.js +0 -61
  169. package/dist/schema/doc-build-files.spec.js +0 -223
  170. package/dist/schema/parse-error.spec.js +0 -18
  171. package/dist/schema/reference-parser.spec.js +0 -83
  172. package/dist/schema/schema-parser.spec.js +0 -80
  173. package/dist/schema/type-guards.spec.js +0 -23
  174. package/dist/schema/work-scope-parser.spec.js +0 -66
  175. package/dist/service/update-service-status.spec.js +0 -27
  176. package/dist/testing/ensure-local-registry.js +0 -134
  177. package/dist/testing/example-test-suite.js +0 -63
  178. package/dist/testing/expect.js +0 -82
  179. package/dist/testing/get-test-suite.js +0 -9
  180. package/dist/testing/http-get.js +0 -21
  181. package/dist/testing/integration/cache.spec.js +0 -49
  182. package/dist/testing/integration/cancellation.spec.js +0 -45
  183. package/dist/testing/integration/clean.spec.js +0 -43
  184. package/dist/testing/integration/cmd.spec.js +0 -15
  185. package/dist/testing/integration/concurrency.spec.js +0 -19
  186. package/dist/testing/integration/docker-package-registry.spec.js +0 -44
  187. package/dist/testing/integration/docker-service-crash.spec.js +0 -36
  188. package/dist/testing/integration/docker.spec.js +0 -17
  189. package/dist/testing/integration/env.spec.js +0 -48
  190. package/dist/testing/integration/environment.spec.js +0 -97
  191. package/dist/testing/integration/error.spec.js +0 -19
  192. package/dist/testing/integration/export.spec.js +0 -22
  193. package/dist/testing/integration/extend.spec.js +0 -29
  194. package/dist/testing/integration/glob.spec.js +0 -40
  195. package/dist/testing/integration/include.spec.js +0 -31
  196. package/dist/testing/integration/invalid.spec.js +0 -17
  197. package/dist/testing/integration/invalid_loop.spec.js +0 -56
  198. package/dist/testing/integration/k8s-state-cache.spec.js +0 -41
  199. package/dist/testing/integration/kubernetes-service.spec.js +0 -148
  200. package/dist/testing/integration/kubernetes.spec.js +0 -99
  201. package/dist/testing/integration/labels.spec.js +0 -42
  202. package/dist/testing/integration/local.spec.js +0 -14
  203. package/dist/testing/integration/monorepo.spec.js +0 -15
  204. package/dist/testing/integration/multi-line.spec.js +0 -17
  205. package/dist/testing/integration/reference.spec.js +0 -21
  206. package/dist/testing/integration/services.spec.js +0 -38
  207. package/dist/testing/integration/store.spec.js +0 -52
  208. package/dist/testing/integration/unknown.spec.js +0 -28
  209. package/dist/testing/integration/validate.spec.js +0 -160
  210. package/dist/testing/integration/watch-dependency.spec.js +0 -33
  211. package/dist/testing/integration/watch.spec.js +0 -45
  212. package/dist/testing/requires-kubernetes.js +0 -18
  213. package/dist/testing/requires-linux-containers.js +0 -18
  214. package/dist/testing/requires-windows-containers.js +0 -18
  215. package/dist/testing/test-case.js +0 -75
  216. package/dist/testing/test-streams.js +0 -28
  217. package/dist/testing/test-suite-setup.js +0 -3
  218. package/dist/testing/test-suite.js +0 -3
  219. package/dist/testing/testing-timeout.js +0 -32
  220. package/dist/utils/abort-event.spec.js +0 -46
  221. package/dist/utils/buffer-context.spec.js +0 -38
  222. package/dist/utils/ci.spec.js +0 -53
  223. package/dist/utils/debouncer.spec.js +0 -58
  224. package/dist/utils/emitter.spec.js +0 -34
  225. package/dist/utils/empty-writable.spec.js +0 -18
  226. package/dist/utils/environment-config.spec.js +0 -26
  227. package/dist/utils/fail-never.spec.js +0 -9
  228. package/dist/utils/sleep.spec.js +0 -22
  229. package/dist/version.spec.js +0 -12
  230. package/specs/build-file/caches/spec.md +0 -114
  231. package/specs/build-file/environment-variables/spec.md +0 -82
  232. package/specs/build-file/includes/spec.md +0 -60
  233. package/specs/build-file/references/spec.md +0 -56
  234. package/specs/build-file/spec.md +0 -62
  235. package/specs/cli/clean/spec.md +0 -85
  236. package/specs/cli/down/spec.md +0 -85
  237. package/specs/cli/execute/spec.md +0 -101
  238. package/specs/cli/init/spec.md +0 -64
  239. package/specs/cli/ls/spec.md +0 -66
  240. package/specs/cli/package/spec.md +0 -110
  241. package/specs/cli/spec.md +0 -73
  242. package/specs/cli/store-restore/spec.md +0 -74
  243. package/specs/cli/up/spec.md +0 -80
  244. package/specs/cli/validate/spec.md +0 -70
  245. package/specs/labels/spec.md +0 -91
  246. package/specs/service/container/spec.md +0 -120
  247. package/specs/service/kubernetes/spec.md +0 -97
  248. package/specs/service/spec.md +0 -105
  249. package/specs/task/caching/spec.md +0 -107
  250. package/specs/task/container/spec.md +0 -118
  251. package/specs/task/dependencies/spec.md +0 -70
  252. package/specs/task/extending/spec.md +0 -74
  253. package/specs/task/kubernetes/spec.md +0 -125
  254. package/specs/task/needs/spec.md +0 -59
  255. package/specs/task/spec.md +0 -87
  256. package/specs/task/watching/spec.md +0 -69
@@ -1,37 +0,0 @@
1
- {
2
- "schema_version": "1.0",
3
- "extensions": {
4
- "git": {
5
- "version": "1.0.0",
6
- "source": "local",
7
- "manifest_hash": "sha256:9731aa8143a72fbebfdb440f155038ab42642517c2b2bdbbf67c8fdbe076ed79",
8
- "enabled": true,
9
- "priority": 10,
10
- "registered_commands": {
11
- "agy": [
12
- "speckit.git.feature",
13
- "speckit.git.validate",
14
- "speckit.git.remote",
15
- "speckit.git.initialize",
16
- "speckit.git.commit"
17
- ],
18
- "claude": [
19
- "speckit.git.feature",
20
- "speckit.git.validate",
21
- "speckit.git.remote",
22
- "speckit.git.initialize",
23
- "speckit.git.commit"
24
- ],
25
- "codex": [
26
- "speckit.git.feature",
27
- "speckit.git.validate",
28
- "speckit.git.remote",
29
- "speckit.git.initialize",
30
- "speckit.git.commit"
31
- ]
32
- },
33
- "registered_skills": [],
34
- "installed_at": "2026-05-30T06:27:46.894357+00:00"
35
- }
36
- }
37
- }
@@ -1,100 +0,0 @@
1
- # Git Branching Workflow Extension
2
-
3
- Git repository initialization, feature branch creation, numbering (sequential/timestamp), validation, remote detection, and auto-commit for Spec Kit.
4
-
5
- ## Overview
6
-
7
- This extension provides Git operations as an optional, self-contained module. It manages:
8
-
9
- - **Repository initialization** with configurable commit messages
10
- - **Feature branch creation** with sequential (`001-feature-name`) or timestamp (`20260319-143022-feature-name`) numbering
11
- - **Branch validation** to ensure branches follow naming conventions
12
- - **Git remote detection** for GitHub integration (e.g., issue creation)
13
- - **Auto-commit** after core commands (configurable per-command with custom messages)
14
-
15
- ## Commands
16
-
17
- | Command | Description |
18
- |---------|-------------|
19
- | `speckit.git.initialize` | Initialize a Git repository with a configurable commit message |
20
- | `speckit.git.feature` | Create a feature branch with sequential or timestamp numbering |
21
- | `speckit.git.validate` | Validate current branch follows feature branch naming conventions |
22
- | `speckit.git.remote` | Detect Git remote URL for GitHub integration |
23
- | `speckit.git.commit` | Auto-commit changes (configurable per-command enable/disable and messages) |
24
-
25
- ## Hooks
26
-
27
- | Event | Command | Optional | Description |
28
- |-------|---------|----------|-------------|
29
- | `before_constitution` | `speckit.git.initialize` | No | Init git repo before constitution |
30
- | `before_specify` | `speckit.git.feature` | No | Create feature branch before specification |
31
- | `before_clarify` | `speckit.git.commit` | Yes | Commit outstanding changes before clarification |
32
- | `before_plan` | `speckit.git.commit` | Yes | Commit outstanding changes before planning |
33
- | `before_tasks` | `speckit.git.commit` | Yes | Commit outstanding changes before task generation |
34
- | `before_implement` | `speckit.git.commit` | Yes | Commit outstanding changes before implementation |
35
- | `before_checklist` | `speckit.git.commit` | Yes | Commit outstanding changes before checklist |
36
- | `before_analyze` | `speckit.git.commit` | Yes | Commit outstanding changes before analysis |
37
- | `before_taskstoissues` | `speckit.git.commit` | Yes | Commit outstanding changes before issue sync |
38
- | `after_constitution` | `speckit.git.commit` | Yes | Auto-commit after constitution update |
39
- | `after_specify` | `speckit.git.commit` | Yes | Auto-commit after specification |
40
- | `after_clarify` | `speckit.git.commit` | Yes | Auto-commit after clarification |
41
- | `after_plan` | `speckit.git.commit` | Yes | Auto-commit after planning |
42
- | `after_tasks` | `speckit.git.commit` | Yes | Auto-commit after task generation |
43
- | `after_implement` | `speckit.git.commit` | Yes | Auto-commit after implementation |
44
- | `after_checklist` | `speckit.git.commit` | Yes | Auto-commit after checklist |
45
- | `after_analyze` | `speckit.git.commit` | Yes | Auto-commit after analysis |
46
- | `after_taskstoissues` | `speckit.git.commit` | Yes | Auto-commit after issue sync |
47
-
48
- ## Configuration
49
-
50
- Configuration is stored in `.specify/extensions/git/git-config.yml`:
51
-
52
- ```yaml
53
- # Branch numbering strategy: "sequential" or "timestamp"
54
- branch_numbering: sequential
55
-
56
- # Custom commit message for git init
57
- init_commit_message: "[Spec Kit] Initial commit"
58
-
59
- # Auto-commit per command (all disabled by default)
60
- # Example: enable auto-commit after specify
61
- auto_commit:
62
- default: false
63
- after_specify:
64
- enabled: true
65
- message: "[Spec Kit] Add specification"
66
- ```
67
-
68
- ## Installation
69
-
70
- ```bash
71
- # Install the bundled git extension (no network required)
72
- specify extension add git
73
- ```
74
-
75
- ## Disabling
76
-
77
- ```bash
78
- # Disable the git extension (spec creation continues without branching)
79
- specify extension disable git
80
-
81
- # Re-enable it
82
- specify extension enable git
83
- ```
84
-
85
- ## Graceful Degradation
86
-
87
- When Git is not installed or the directory is not a Git repository:
88
- - Spec directories are still created under `specs/`
89
- - Branch creation is skipped with a warning
90
- - Branch validation is skipped with a warning
91
- - Remote detection returns empty results
92
-
93
- ## Scripts
94
-
95
- The extension bundles cross-platform scripts:
96
-
97
- - `scripts/bash/create-new-feature.sh` — Bash implementation
98
- - `scripts/bash/git-common.sh` — Shared Git utilities (Bash)
99
- - `scripts/powershell/create-new-feature.ps1` — PowerShell implementation
100
- - `scripts/powershell/git-common.ps1` — Shared Git utilities (PowerShell)
@@ -1,48 +0,0 @@
1
- ---
2
- description: "Auto-commit changes after a Spec Kit command completes"
3
- ---
4
-
5
- # Auto-Commit Changes
6
-
7
- Automatically stage and commit all changes after a Spec Kit command completes.
8
-
9
- ## Behavior
10
-
11
- This command is invoked as a hook after (or before) core commands. It:
12
-
13
- 1. Determines the event name from the hook context (e.g., if invoked as an `after_specify` hook, the event is `after_specify`; if `before_plan`, the event is `before_plan`)
14
- 2. Checks `.specify/extensions/git/git-config.yml` for the `auto_commit` section
15
- 3. Looks up the specific event key to see if auto-commit is enabled
16
- 4. Falls back to `auto_commit.default` if no event-specific key exists
17
- 5. Uses the per-command `message` if configured, otherwise a default message
18
- 6. If enabled and there are uncommitted changes, runs `git add .` + `git commit`
19
-
20
- ## Execution
21
-
22
- Determine the event name from the hook that triggered this command, then run the script:
23
-
24
- - **Bash**: `.specify/extensions/git/scripts/bash/auto-commit.sh <event_name>`
25
- - **PowerShell**: `.specify/extensions/git/scripts/powershell/auto-commit.ps1 <event_name>`
26
-
27
- Replace `<event_name>` with the actual hook event (e.g., `after_specify`, `before_plan`, `after_implement`).
28
-
29
- ## Configuration
30
-
31
- In `.specify/extensions/git/git-config.yml`:
32
-
33
- ```yaml
34
- auto_commit:
35
- default: false # Global toggle — set true to enable for all commands
36
- after_specify:
37
- enabled: true # Override per-command
38
- message: "[Spec Kit] Add specification"
39
- after_plan:
40
- enabled: false
41
- message: "[Spec Kit] Add implementation plan"
42
- ```
43
-
44
- ## Graceful Degradation
45
-
46
- - If Git is not available or the current directory is not a repository: skips with a warning
47
- - If no config file exists: skips (disabled by default)
48
- - If no changes to commit: skips with a message
@@ -1,67 +0,0 @@
1
- ---
2
- description: "Create a feature branch with sequential or timestamp numbering"
3
- ---
4
-
5
- # Create Feature Branch
6
-
7
- Create and switch to a new git feature branch for the given specification. This command handles **branch creation only** — the spec directory and files are created by the core `__SPECKIT_COMMAND_SPECIFY__` workflow.
8
-
9
- ## User Input
10
-
11
- ```text
12
- $ARGUMENTS
13
- ```
14
-
15
- You **MUST** consider the user input before proceeding (if not empty).
16
-
17
- ## Environment Variable Override
18
-
19
- If the user explicitly provided `GIT_BRANCH_NAME` (e.g., via environment variable, argument, or in their request), pass it through to the script by setting the `GIT_BRANCH_NAME` environment variable before invoking the script. When `GIT_BRANCH_NAME` is set:
20
- - The script uses the exact value as the branch name, bypassing all prefix/suffix generation
21
- - `--short-name`, `--number`, and `--timestamp` flags are ignored
22
- - `FEATURE_NUM` is extracted from the name if it starts with a numeric prefix, otherwise set to the full branch name
23
-
24
- ## Prerequisites
25
-
26
- - Verify Git is available by running `git rev-parse --is-inside-work-tree 2>/dev/null`
27
- - If Git is not available, warn the user and skip branch creation
28
-
29
- ## Branch Numbering Mode
30
-
31
- Determine the branch numbering strategy by checking configuration in this order:
32
-
33
- 1. Check `.specify/extensions/git/git-config.yml` for `branch_numbering` value
34
- 2. Check `.specify/init-options.json` for `branch_numbering` value (backward compatibility)
35
- 3. Default to `sequential` if neither exists
36
-
37
- ## Execution
38
-
39
- Generate a concise short name (2-4 words) for the branch:
40
- - Analyze the feature description and extract the most meaningful keywords
41
- - Use action-noun format when possible (e.g., "add-user-auth", "fix-payment-bug")
42
- - Preserve technical terms and acronyms (OAuth2, API, JWT, etc.)
43
-
44
- Run the appropriate script based on your platform:
45
-
46
- - **Bash**: `.specify/extensions/git/scripts/bash/create-new-feature.sh --json --short-name "<short-name>" "<feature description>"`
47
- - **Bash (timestamp)**: `.specify/extensions/git/scripts/bash/create-new-feature.sh --json --timestamp --short-name "<short-name>" "<feature description>"`
48
- - **PowerShell**: `.specify/extensions/git/scripts/powershell/create-new-feature.ps1 -Json -ShortName "<short-name>" "<feature description>"`
49
- - **PowerShell (timestamp)**: `.specify/extensions/git/scripts/powershell/create-new-feature.ps1 -Json -Timestamp -ShortName "<short-name>" "<feature description>"`
50
-
51
- **IMPORTANT**:
52
- - Do NOT pass `--number` — the script determines the correct next number automatically
53
- - Always include the JSON flag (`--json` for Bash, `-Json` for PowerShell) so the output can be parsed reliably
54
- - You must only ever run this script once per feature
55
- - The JSON output will contain `BRANCH_NAME` and `FEATURE_NUM`
56
-
57
- ## Graceful Degradation
58
-
59
- If Git is not installed or the current directory is not a Git repository:
60
- - Branch creation is skipped with a warning: `[specify] Warning: Git repository not detected; skipped branch creation`
61
- - The script still outputs `BRANCH_NAME` and `FEATURE_NUM` so the caller can reference them
62
-
63
- ## Output
64
-
65
- The script outputs JSON with:
66
- - `BRANCH_NAME`: The branch name (e.g., `003-user-auth` or `20260319-143022-user-auth`)
67
- - `FEATURE_NUM`: The numeric or timestamp prefix used
@@ -1,49 +0,0 @@
1
- ---
2
- description: "Initialize a Git repository with an initial commit"
3
- ---
4
-
5
- # Initialize Git Repository
6
-
7
- Initialize a Git repository in the current project directory if one does not already exist.
8
-
9
- ## Execution
10
-
11
- Run the appropriate script from the project root:
12
-
13
- - **Bash**: `.specify/extensions/git/scripts/bash/initialize-repo.sh`
14
- - **PowerShell**: `.specify/extensions/git/scripts/powershell/initialize-repo.ps1`
15
-
16
- If the extension scripts are not found, fall back to:
17
- - **Bash**: `git init && git add . && git commit -m "Initial commit from Specify template"`
18
- - **PowerShell**: `git init; git add .; git commit -m "Initial commit from Specify template"`
19
-
20
- The script handles all checks internally:
21
- - Skips if Git is not available
22
- - Skips if already inside a Git repository
23
- - Runs `git init`, `git add .`, and `git commit` with an initial commit message
24
-
25
- ## Customization
26
-
27
- Replace the script to add project-specific Git initialization steps:
28
- - Custom `.gitignore` templates
29
- - Default branch naming (`git config init.defaultBranch`)
30
- - Git LFS setup
31
- - Git hooks installation
32
- - Commit signing configuration
33
- - Git Flow initialization
34
-
35
- ## Output
36
-
37
- On success:
38
- - `[OK] Git repository initialized`
39
-
40
- ## Graceful Degradation
41
-
42
- If Git is not installed:
43
- - Warn the user
44
- - Skip repository initialization
45
- - The project continues to function without Git (specs can still be created under `specs/`)
46
-
47
- If Git is installed but `git init`, `git add .`, or `git commit` fails:
48
- - Surface the error to the user
49
- - Stop this command rather than continuing with a partially initialized repository
@@ -1,45 +0,0 @@
1
- ---
2
- description: "Detect Git remote URL for GitHub integration"
3
- ---
4
-
5
- # Detect Git Remote URL
6
-
7
- Detect the Git remote URL for integration with GitHub services (e.g., issue creation).
8
-
9
- ## Prerequisites
10
-
11
- - Check if Git is available by running `git rev-parse --is-inside-work-tree 2>/dev/null`
12
- - If Git is not available, output a warning and return empty:
13
- ```
14
- [specify] Warning: Git repository not detected; cannot determine remote URL
15
- ```
16
-
17
- ## Execution
18
-
19
- Run the following command to get the remote URL:
20
-
21
- ```bash
22
- git config --get remote.origin.url
23
- ```
24
-
25
- ## Output
26
-
27
- Parse the remote URL and determine:
28
-
29
- 1. **Repository owner**: Extract from the URL (e.g., `github` from `https://github.com/github/spec-kit.git`)
30
- 2. **Repository name**: Extract from the URL (e.g., `spec-kit` from `https://github.com/github/spec-kit.git`)
31
- 3. **Is GitHub**: Whether the remote points to a GitHub repository
32
-
33
- Supported URL formats:
34
- - HTTPS: `https://github.com/<owner>/<repo>.git`
35
- - SSH: `git@github.com:<owner>/<repo>.git`
36
-
37
- > [!CAUTION]
38
- > ONLY report a GitHub repository if the remote URL actually points to github.com.
39
- > Do NOT assume the remote is GitHub if the URL format doesn't match.
40
-
41
- ## Graceful Degradation
42
-
43
- If Git is not installed, the directory is not a Git repository, or no remote is configured:
44
- - Return an empty result
45
- - Do NOT error — other workflows should continue without Git remote information
@@ -1,49 +0,0 @@
1
- ---
2
- description: "Validate current branch follows feature branch naming conventions"
3
- ---
4
-
5
- # Validate Feature Branch
6
-
7
- Validate that the current Git branch follows the expected feature branch naming conventions.
8
-
9
- ## Prerequisites
10
-
11
- - Check if Git is available by running `git rev-parse --is-inside-work-tree 2>/dev/null`
12
- - If Git is not available, output a warning and skip validation:
13
- ```
14
- [specify] Warning: Git repository not detected; skipped branch validation
15
- ```
16
-
17
- ## Validation Rules
18
-
19
- Get the current branch name:
20
-
21
- ```bash
22
- git rev-parse --abbrev-ref HEAD
23
- ```
24
-
25
- The branch name must match one of these patterns:
26
-
27
- 1. **Sequential**: `^[0-9]{3,}-` (e.g., `001-feature-name`, `042-fix-bug`, `1000-big-feature`)
28
- 2. **Timestamp**: `^[0-9]{8}-[0-9]{6}-` (e.g., `20260319-143022-feature-name`)
29
-
30
- ## Execution
31
-
32
- If on a feature branch (matches either pattern):
33
- - Output: `✓ On feature branch: <branch-name>`
34
- - Check if the corresponding spec directory exists under `specs/`:
35
- - For sequential branches, look for `specs/<prefix>-*` where prefix matches the numeric portion
36
- - For timestamp branches, look for `specs/<prefix>-*` where prefix matches the `YYYYMMDD-HHMMSS` portion
37
- - If spec directory exists: `✓ Spec directory found: <path>`
38
- - If spec directory missing: `⚠ No spec directory found for prefix <prefix>`
39
-
40
- If NOT on a feature branch:
41
- - Output: `✗ Not on a feature branch. Current branch: <branch-name>`
42
- - Output: `Feature branches should be named like: 001-feature-name or 20260319-143022-feature-name`
43
-
44
- ## Graceful Degradation
45
-
46
- If Git is not installed or the directory is not a Git repository:
47
- - Check the `SPECIFY_FEATURE` environment variable as a fallback
48
- - If set, validate that value against the naming patterns
49
- - If not set, skip validation with a warning
@@ -1,62 +0,0 @@
1
- # Git Branching Workflow Extension Configuration
2
- # Copied to .specify/extensions/git/git-config.yml on install
3
-
4
- # Branch numbering strategy: "sequential" (001, 002, ...) or "timestamp" (YYYYMMDD-HHMMSS)
5
- branch_numbering: sequential
6
-
7
- # Commit message used by `git commit` during repository initialization
8
- init_commit_message: "[Spec Kit] Initial commit"
9
-
10
- # Auto-commit before/after core commands.
11
- # Set "default" to enable for all commands, then override per-command.
12
- # Each key can be true/false. Message is customizable per-command.
13
- auto_commit:
14
- default: false
15
- before_clarify:
16
- enabled: false
17
- message: "[Spec Kit] Save progress before clarification"
18
- before_plan:
19
- enabled: false
20
- message: "[Spec Kit] Save progress before planning"
21
- before_tasks:
22
- enabled: false
23
- message: "[Spec Kit] Save progress before task generation"
24
- before_implement:
25
- enabled: false
26
- message: "[Spec Kit] Save progress before implementation"
27
- before_checklist:
28
- enabled: false
29
- message: "[Spec Kit] Save progress before checklist"
30
- before_analyze:
31
- enabled: false
32
- message: "[Spec Kit] Save progress before analysis"
33
- before_taskstoissues:
34
- enabled: false
35
- message: "[Spec Kit] Save progress before issue sync"
36
- after_constitution:
37
- enabled: false
38
- message: "[Spec Kit] Add project constitution"
39
- after_specify:
40
- enabled: false
41
- message: "[Spec Kit] Add specification"
42
- after_clarify:
43
- enabled: false
44
- message: "[Spec Kit] Clarify specification"
45
- after_plan:
46
- enabled: false
47
- message: "[Spec Kit] Add implementation plan"
48
- after_tasks:
49
- enabled: false
50
- message: "[Spec Kit] Add tasks"
51
- after_implement:
52
- enabled: false
53
- message: "[Spec Kit] Implementation progress"
54
- after_checklist:
55
- enabled: false
56
- message: "[Spec Kit] Add checklist"
57
- after_analyze:
58
- enabled: false
59
- message: "[Spec Kit] Add analysis report"
60
- after_taskstoissues:
61
- enabled: false
62
- message: "[Spec Kit] Sync tasks to issues"
@@ -1,140 +0,0 @@
1
- schema_version: "1.0"
2
-
3
- extension:
4
- id: git
5
- name: "Git Branching Workflow"
6
- version: "1.0.0"
7
- description: "Feature branch creation, numbering (sequential/timestamp), validation, and Git remote detection"
8
- author: spec-kit-core
9
- repository: https://github.com/github/spec-kit
10
- license: MIT
11
-
12
- requires:
13
- speckit_version: ">=0.2.0"
14
- tools:
15
- - name: git
16
- required: false
17
-
18
- provides:
19
- commands:
20
- - name: speckit.git.feature
21
- file: commands/speckit.git.feature.md
22
- description: "Create a feature branch with sequential or timestamp numbering"
23
- - name: speckit.git.validate
24
- file: commands/speckit.git.validate.md
25
- description: "Validate current branch follows feature branch naming conventions"
26
- - name: speckit.git.remote
27
- file: commands/speckit.git.remote.md
28
- description: "Detect Git remote URL for GitHub integration"
29
- - name: speckit.git.initialize
30
- file: commands/speckit.git.initialize.md
31
- description: "Initialize a Git repository with an initial commit"
32
- - name: speckit.git.commit
33
- file: commands/speckit.git.commit.md
34
- description: "Auto-commit changes after a Spec Kit command completes"
35
-
36
- config:
37
- - name: "git-config.yml"
38
- template: "config-template.yml"
39
- description: "Git branching configuration"
40
- required: false
41
-
42
- hooks:
43
- before_constitution:
44
- command: speckit.git.initialize
45
- optional: false
46
- description: "Initialize Git repository before constitution setup"
47
- before_specify:
48
- command: speckit.git.feature
49
- optional: false
50
- description: "Create feature branch before specification"
51
- before_clarify:
52
- command: speckit.git.commit
53
- optional: true
54
- prompt: "Commit outstanding changes before clarification?"
55
- description: "Auto-commit before spec clarification"
56
- before_plan:
57
- command: speckit.git.commit
58
- optional: true
59
- prompt: "Commit outstanding changes before planning?"
60
- description: "Auto-commit before implementation planning"
61
- before_tasks:
62
- command: speckit.git.commit
63
- optional: true
64
- prompt: "Commit outstanding changes before task generation?"
65
- description: "Auto-commit before task generation"
66
- before_implement:
67
- command: speckit.git.commit
68
- optional: true
69
- prompt: "Commit outstanding changes before implementation?"
70
- description: "Auto-commit before implementation"
71
- before_checklist:
72
- command: speckit.git.commit
73
- optional: true
74
- prompt: "Commit outstanding changes before checklist?"
75
- description: "Auto-commit before checklist generation"
76
- before_analyze:
77
- command: speckit.git.commit
78
- optional: true
79
- prompt: "Commit outstanding changes before analysis?"
80
- description: "Auto-commit before analysis"
81
- before_taskstoissues:
82
- command: speckit.git.commit
83
- optional: true
84
- prompt: "Commit outstanding changes before issue sync?"
85
- description: "Auto-commit before tasks-to-issues conversion"
86
- after_constitution:
87
- command: speckit.git.commit
88
- optional: true
89
- prompt: "Commit constitution changes?"
90
- description: "Auto-commit after constitution update"
91
- after_specify:
92
- command: speckit.git.commit
93
- optional: true
94
- prompt: "Commit specification changes?"
95
- description: "Auto-commit after specification"
96
- after_clarify:
97
- command: speckit.git.commit
98
- optional: true
99
- prompt: "Commit clarification changes?"
100
- description: "Auto-commit after spec clarification"
101
- after_plan:
102
- command: speckit.git.commit
103
- optional: true
104
- prompt: "Commit plan changes?"
105
- description: "Auto-commit after implementation planning"
106
- after_tasks:
107
- command: speckit.git.commit
108
- optional: true
109
- prompt: "Commit task changes?"
110
- description: "Auto-commit after task generation"
111
- after_implement:
112
- command: speckit.git.commit
113
- optional: true
114
- prompt: "Commit implementation changes?"
115
- description: "Auto-commit after implementation"
116
- after_checklist:
117
- command: speckit.git.commit
118
- optional: true
119
- prompt: "Commit checklist changes?"
120
- description: "Auto-commit after checklist generation"
121
- after_analyze:
122
- command: speckit.git.commit
123
- optional: true
124
- prompt: "Commit analysis results?"
125
- description: "Auto-commit after analysis"
126
- after_taskstoissues:
127
- command: speckit.git.commit
128
- optional: true
129
- prompt: "Commit after syncing issues?"
130
- description: "Auto-commit after tasks-to-issues conversion"
131
-
132
- tags:
133
- - "git"
134
- - "branching"
135
- - "workflow"
136
-
137
- config:
138
- defaults:
139
- branch_numbering: sequential
140
- init_commit_message: "[Spec Kit] Initial commit"
@@ -1,62 +0,0 @@
1
- # Git Branching Workflow Extension Configuration
2
- # Copied to .specify/extensions/git/git-config.yml on install
3
-
4
- # Branch numbering strategy: "sequential" (001, 002, ...) or "timestamp" (YYYYMMDD-HHMMSS)
5
- branch_numbering: sequential
6
-
7
- # Commit message used by `git commit` during repository initialization
8
- init_commit_message: "[Spec Kit] Initial commit"
9
-
10
- # Auto-commit before/after core commands.
11
- # Set "default" to enable for all commands, then override per-command.
12
- # Each key can be true/false. Message is customizable per-command.
13
- auto_commit:
14
- default: false
15
- before_clarify:
16
- enabled: false
17
- message: "[Spec Kit] Save progress before clarification"
18
- before_plan:
19
- enabled: false
20
- message: "[Spec Kit] Save progress before planning"
21
- before_tasks:
22
- enabled: false
23
- message: "[Spec Kit] Save progress before task generation"
24
- before_implement:
25
- enabled: false
26
- message: "[Spec Kit] Save progress before implementation"
27
- before_checklist:
28
- enabled: false
29
- message: "[Spec Kit] Save progress before checklist"
30
- before_analyze:
31
- enabled: false
32
- message: "[Spec Kit] Save progress before analysis"
33
- before_taskstoissues:
34
- enabled: false
35
- message: "[Spec Kit] Save progress before issue sync"
36
- after_constitution:
37
- enabled: false
38
- message: "[Spec Kit] Add project constitution"
39
- after_specify:
40
- enabled: false
41
- message: "[Spec Kit] Add specification"
42
- after_clarify:
43
- enabled: false
44
- message: "[Spec Kit] Clarify specification"
45
- after_plan:
46
- enabled: false
47
- message: "[Spec Kit] Add implementation plan"
48
- after_tasks:
49
- enabled: false
50
- message: "[Spec Kit] Add tasks"
51
- after_implement:
52
- enabled: false
53
- message: "[Spec Kit] Implementation progress"
54
- after_checklist:
55
- enabled: false
56
- message: "[Spec Kit] Add checklist"
57
- after_analyze:
58
- enabled: false
59
- message: "[Spec Kit] Add analysis report"
60
- after_taskstoissues:
61
- enabled: false
62
- message: "[Spec Kit] Sync tasks to issues"