@@ -300,6 +300,30 @@ def test_init_legacy_creates_commands(self, tmp_path):
300300 assert (target / ".bob" / "commands" / "speckit.plan.md" ).exists ()
301301 assert not (target / ".bob" / "skills" ).exists ()
302302
303+ def test_init_legacy_does_not_set_ai_skills (self , tmp_path ):
304+ """Legacy install must NOT write ai_skills=True to init-options.json.
305+
306+ Regression test: _update_init_options_for_integration previously called
307+ getattr(integration, "_skills_mode", False) which returned the bound method
308+ object (always truthy) instead of calling it, so legacy projects incorrectly
309+ got ai_skills=True and used hyphenated skill invocations.
310+ """
311+ from typer .testing import CliRunner
312+ from specify_cli import app
313+ from specify_cli import load_init_options
314+
315+ target = tmp_path / "test-proj"
316+ result = CliRunner ().invoke (app , [
317+ "init" , str (target ), "--integration" , "bob" ,
318+ "--integration-options" , "--legacy-commands" ,
319+ "--ignore-agent-tools" , "--script" , "sh" ,
320+ ])
321+ assert result .exit_code == 0 , f"init failed: { result .output } "
322+ init_opts = load_init_options (target )
323+ assert init_opts .get ("ai_skills" ) is not True , (
324+ "Legacy Bob project must not have ai_skills=True in init-options.json"
325+ )
326+
303327
304328class TestBobRegistrarConfig :
305329 """Verify AGENT_CONFIGS["bob"] follows the Copilot pattern for extension registration."""
0 commit comments