[Bug]: `bundle init <bundle>` initialises with the default integration instead of the bundle's, then aborts with a clash
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
Research direction
Start with src/specify_cli/bundles/command_init.py:33 and compare how bundle install resolves the integration in src/specify_cli/bundles/command_install.py:98; the issue also points to _resolve_init_integration in src/specify_cli/bundles/_commands.py:132. Run the provided offline reproduction to confirm the mismatch. Done when bundle init initializes a fresh project with the bundle’s declared integration and completes without the conflict error.
Written by the indexing model from the issue text.
Description
Bug Description
In a directory that is not yet a Spec Kit project, specify bundle init <bundle> picks the init integration with _resolve_init_integration(integration, None) (src/specify_cli/bundles/command_init.py:33). Because it passes None instead of the manifest, it skips the bundle-declared integration and initialises the project with the default (copilot). The follow-up install then fails because the bundle targets a different integration.
The project is left initialised with the wrong integration, although the error message says "aborting with no changes". specify bundle install <bundle> in the same situation passes the manifest (command_install.py:98) and initialises with the bundle's integration.
Steps to Reproduce
From the root of a fresh clone after uv sync, save the script below as repro.py and run uv run python -I repro.py. It runs the real specify CLI with --offline. No network access is needed, and HOME points at the temp directory so user configuration is not read.
import json, os, subprocess, tempfile
from pathlib import Path
work = Path(tempfile.mkdtemp())
bundle = work / "claude-bundle"; bundle.mkdir()
(bundle / "bundle.yml").write_text(
'schema_version: "1.0"\n'
'bundle: {id: claude-bundle, name: C, version: "1.0.0", role: dev, description: d, author: a, license: MIT}\n'
'requires: {speckit_version: ">=0.0.1"}\n'
'integration: {id: claude}\n'
)
env = {"PATH": os.environ["PATH"], "HOME": str(work), "COLUMNS": "200"}
for command in (["bundle", "install"], ["bundle", "init"]):
project = work / command[1]; project.mkdir()
run = subprocess.run(["specify", *command, str(bundle), "--offline"],
cwd=project, capture_output=True, text=True, env=env)
state = project / ".specify" / "integration.json"
integration = json.loads(state.read_text())["default_integration"] if state.exists() else None
errors = [line for line in (run.stdout + run.stderr).splitlines() if "Error" in line]
print(f"specify {' '.join(command)}: exit {run.returncode}, project integration={integration}, "
f"bundle recorded={(project / '.specify' / 'bundle-records.json').exists()}")
for line in errors:
print(" ", line)
Expected Behavior
bundle init <bundle> should behave like bundle install <bundle> and initialise with the bundle's declared integration (claude):
src/specify_cli/bundles/_commands.py:132: "Precedence (FR-013): explicit override → bundle-declared → default."docs/reference/bundles.md:192describesbundle initas "an explicit one-step bootstrap for a new checkout".docs/reference/bundles.md:77: if a bundle targets a different integration, install "aborts with no changes".
Actual Behavior
specify bundle install: exit 0, project integration=claude, bundle recorded=True
specify bundle init: exit 1, project integration=copilot, bundle recorded=False
Error: Bundle 'claude-bundle' targets integration 'claude', but this project's active integration is 'copilot'. Installing it would conflict; aborting with no changes.
After the failed bundle init, .specify/integration.json records copilot, and the project has been scaffolded for it.
Error Logs
Error: Bundle 'claude-bundle' targets integration 'claude', but this project's active integration is 'copilot'. Installing it would conflict; aborting with no changes.
Specify CLI Version
1.2.4.dev0 (main at 27d14e2)
AI Agent
Claude Code
Operating System
Linux 6.18 (Ubuntu container)
Python Version
Python 3.12.3
Additional Context
Passing --integration claude explicitly avoids the problem. A likely fix is for bundle init to load the bundle's manifest before initialising, as bundle install does.
Also reproduced on macOS (Darwin 25.6, arm64) with Python 3.14.4 and uv run python -I repro.py against 27d14e2; the output matches the above.
AI Disclosure
Found and reproduced with Claude Code (model: Claude Opus 4.8), run autonomously under human supervision. The human reporter re-ran every reproduction above before filing.
- Dominant language
- Python
- Stars
- 147k
- Forks
- 13.2k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 199
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from github/spec-kit
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
[Bug]: `specify preset set-priority` does not update agent command files that are already writtenPossibly taken @mikamikasuki claimed this 15 days ago. Opentriage-must-have
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 1 day
-
[Bug]: Local config override file name differs between the docs (`<id>-config.local.yml`) and ConfigManager (`local-config.yml`)Possibly taken @gavenren claimed this 11 days ago. Opentriage-must-have
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
[Bug]: Extension alias conflict check misses spellings that map to the same file, so one extension overwrites and then deletes another's aliasPossibly taken @chelsealong claimed this 13 days ago. Opentriage-must-have
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
bug-assess invalid triage-must-have
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
github/spec-kit#5080 · 1 comment ·
Maintainers usually reply within 1 day
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 2 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
cunla/fakeredis-py#636 ·
Maintainers usually reply within 2 days
-
namespace
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
EclipseFdn/open-vsx.org#15470 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
opensafely-core/job-server#6180 · 1 comment ·
Maintainers usually reply within 1 day
-
area:models enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day