You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/upgrade.md
+75-53Lines changed: 75 additions & 53 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@
12
12
|**CLI Tool — pin a version**|`specify self upgrade --tag vX.Y.Z[suffix]`| Upgrade to a specific release tag instead of the latest stable. Suffixes are limited to dev, alpha/beta/rc, and/or build metadata forms. |
13
13
|**CLI Tool — manual fallback**|`uv tool install specify-cli --force --from git+https://github.com/github/spec-kit.git@vX.Y.Z`| When `specify self upgrade` isn't available (older installs) or when you want explicit control. |
14
14
|**CLI Tool — manual fallback (pipx)**|`pipx install --force git+https://github.com/github/spec-kit.git@vX.Y.Z`| Same as above, for pipx installs. |
15
-
|**Project Files**|`specify init --here --force --integration <your-agent>`| Update slash commands, templates, and scripts in your project |
15
+
|**Project Files**|`specify integration upgrade <key>`+ `specify extension update`| Refresh installed integration files and extensions in your project |
16
16
|**Both**| Run CLI upgrade, then project update | Recommended for major version updates |
17
17
18
18
---
@@ -89,75 +89,94 @@ specify self check
89
89
90
90
## Part 2: Updating Project Files
91
91
92
-
When Spec Kit releases new features (like new slash commands or updated templates), you need to refresh your project's Spec Kit files.
92
+
When Spec Kit releases new features (like new slash commands, updated templates, or extension changes), you need to refresh the Spec Kit files that were installed into your project.
93
93
94
94
### What gets updated?
95
95
96
-
Running `specify init --here --force` will update:
96
+
For existing Spec Kit projects, use the manifest-aware upgrade path first:
- ✅ **Managed shared scripts and templates** (`.specify/scripts/`, `.specify/templates/`) when they are unchanged from the previous managed copy
100
+
- ✅ **Installed extensions** when you run `specify extension update`
101
+
102
+
The integration upgrade command uses the install manifest to detect local edits. If a managed integration file was modified after install, the command stops and asks you to inspect the change or rerun with `--force`.
102
103
103
104
### What stays safe?
104
105
105
-
These files are **never touched** by the upgrade—the template packages don't even contain them:
106
+
These files are **never touched** by the manifest-aware integration/extension upgrade path:
Replace `<your-agent>` with your AI coding agent. Refer to this list of [Supported AI Coding Agent Integrations](reference/integrations.md)
124
+
This reports the default integration, all installed integrations, and any modified or missing managed files. You can also inspect `.specify/integration.json`; installed integrations are listed under `installed_integrations`.
125
+
126
+
### 2. Upgrade each installed integration
127
+
128
+
Run this inside your project directory:
129
+
130
+
```bash
131
+
specify integration upgrade <key>
132
+
```
133
+
134
+
Replace `<key>` with an installed integration key such as `copilot`, `claude`, or `codex`. In projects with multiple installed integrations, run the command once per installed key.
123
135
124
136
**Example:**
125
137
126
138
```bash
127
-
specify init --here --force --integration copilot
139
+
specify integration upgrade claude
140
+
specify integration upgrade codex
128
141
```
129
142
130
-
### Understanding the `--force` flag
143
+
See the [integration reference](reference/integrations.md#upgrade-an-integration) for options such as `--script`, `--integration-options`, and `--force`.
131
144
132
-
Without `--force`, the CLI warns you and asks for confirmation:
145
+
### 3. Update installed extensions
133
146
134
-
```text
135
-
Warning: Current directory is not empty (25 items)
136
-
Template files will be merged with existing content and may overwrite existing files
137
-
Proceed? [y/N]
147
+
Run:
148
+
149
+
```bash
150
+
specify extension update
138
151
```
139
152
140
-
With `--force`, it skips the confirmation and proceeds immediately. It also **overwrites shared infrastructure files** (`.specify/scripts/` and `.specify/templates/`) with the latest versions from the installed Spec Kit release.
153
+
With no extension name, this updates all installed extensions. Use `specify extension update <name>` to update only one extension. See the [extensions reference](reference/extensions.md#update-extensions) for details.
141
154
142
-
Without `--force`, shared infrastructure files that already exist are skipped — the CLI will print a warning listing the skipped files so you know which ones were not updated.
155
+
### Fallback: re-run init
143
156
144
-
**Important: Your `specs/` directory is always safe.** The `--force` flag only affects template files (commands, scripts, templates, memory). Your feature specifications, plans, and tasks in `specs/` are never included in upgrade packages and cannot be overwritten.
157
+
If a project predates manifests, has missing integration metadata, or needs a broader recovery, you can still re-run init:
Use this as an escape hatch rather than the default project-file upgrade path. It refreshes the selected integration and shared project scaffolding, but it does not use the same per-integration manifest checks before overwriting files.
147
164
148
165
## ⚠️ Important Warnings
149
166
150
-
### 1. Constitution file will be overwritten
167
+
### 1. Constitution file and memory customizations
168
+
169
+
`specify integration upgrade <key>` does not update `.specify/memory/constitution.md`.
151
170
152
-
**Known issue:**`specify init --here --force` currently overwrites `.specify/memory/constitution.md` with the default template, erasing any customizations you made.
171
+
The fallback`specify init --here --force --integration <your-agent>` path can overwrite shared memory files, including `.specify/memory/constitution.md`. If you use the fallback path and customized your constitution, back it up or commit it first.
153
172
154
173
**Workaround:**
155
174
156
175
```bash
157
-
# 1. Back up your constitution before upgrading
176
+
# 1. Back up your constitution before using the fallback init path
# After the fallback init refresh, restore from git history
171
190
git restore .specify/memory/constitution.md
172
191
```
173
192
174
-
### 2. Custom script or template modifications
193
+
### 2. Custom integration, script, or template modifications
194
+
195
+
`specify integration upgrade <key>` blocks when manifest-tracked integration files were modified locally, unless you pass `--force`.
175
196
176
-
If you customized files in `.specify/scripts/` or `.specify/templates/`, the `--force` flag will overwrite them. Back them up first:
197
+
Shared scripts and templates are refreshed when they still match the previously recorded managed copy. Local customizations are preserved unless you explicitly use a force/refresh option that overwrites them. If you customized files in `.specify/scripts/` or `.specify/templates/`, commit or back them up first:
177
198
178
199
```bash
179
200
# Back up custom templates and scripts
@@ -215,29 +236,29 @@ Restart your IDE to refresh the command list.
215
236
# Upgrade CLI (auto-detects uv tool vs pipx install)
216
237
specify self upgrade
217
238
218
-
#Update project files to get new commands
219
-
specify init --here --force --integration copilot
239
+
#Inspect installed integrations
240
+
specify integration status
220
241
221
-
# Restore your constitution if customized
222
-
git restore .specify/memory/constitution.md
242
+
# Update project files to get new commands
243
+
specify integration upgrade <key>
244
+
specify extension update
223
245
```
224
246
225
247
### Scenario 2: "I customized templates and constitution"
**Prevention:**Always commit or back up `constitution.md`before upgrading.
351
+
**Prevention:**Use `specify integration upgrade <key>` for routine project-file updates. If you need the fallback `specify init --here --force` path, commit or back up `constitution.md`first.
331
352
332
353
### "Warning: Current directory is not empty"
333
354
@@ -365,7 +386,7 @@ Only Spec Kit infrastructure files:
365
386
366
387
**How to respond:**
367
388
368
-
-**Type `y` and press Enter** - Proceed with the merge (recommended if upgrading)
389
+
-**Type `y` and press Enter** - Proceed with the merge when using the fallback init path
369
390
-**Type `n` and press Enter** - Cancel the operation
370
391
-**Use `--force` flag** - Skip this confirmation entirely:
371
392
@@ -375,11 +396,11 @@ Only Spec Kit infrastructure files:
375
396
376
397
**When you see this warning:**
377
398
378
-
- ✅ **Expected** when upgrading an existing Spec Kit project
399
+
- ✅ **Expected** when using the fallback init path in an existing Spec Kit project
379
400
- ✅ **Expected** when adding Spec Kit to an existing codebase
380
401
- ⚠️ **Unexpected** if you thought you were creating a new project in an empty directory
381
402
382
-
**Prevention tip:** Before upgrading, commit or back up your `.specify/memory/constitution.md` if you customized it.
403
+
**Prevention tip:** Before using the fallback init path, commit or back up your `.specify/memory/constitution.md` if you customized it.
### "Do I need to run specify every time I open my project?"
420
441
421
-
**Short answer:** No, you only run `specify init` once per project (or when upgrading).
442
+
**Short answer:** No, you only run `specify init` once per project, or later as a fallback recovery path.
422
443
423
444
**Explanation:**
424
445
425
446
The `specify` CLI tool is used for:
426
447
427
448
-**Initial setup:**`specify init` to bootstrap Spec Kit in your project
428
-
-**Upgrades:**`specify init --here --force` to update templates and commands
449
+
-**Routine project-file upgrades:**`specify integration upgrade <key>` and `specify extension update`
450
+
-**Fallback recovery:**`specify init --here --force` when integration metadata is missing or the manifest-aware path cannot be used
429
451
-**Diagnostics:**`specify check` to verify tool installation
430
452
431
453
Once you've run `specify init`, the slash commands (like `/speckit.specify`, `/speckit.plan`, etc.) are **permanently installed** in your project's agent folder (`.claude/`, `.github/prompts/`, `.pi/prompts/`, `.omp/commands/`, etc.). Your AI coding agent reads these command files directly—no need to run `specify` again.
0 commit comments