Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion shipkit/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Shipkit — CLI-agnostic AI dev productivity kit."""

__version__ = "0.1.14"
__version__ = "0.1.15"
23 changes: 10 additions & 13 deletions shipkit/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -810,20 +810,17 @@ def run(prompt: tuple[str, ...], no_agent: bool):
if not no_agent:
cmd.extend(["--agent", f"shipkit v{__version__}"])

# Build prompt — inject init hint for first-time projects
prompt_str = " ".join(prompt) if prompt else ""
# For first-time projects, inject init hint into system prompt
if is_first_run and not no_agent:
init_hint = (
"This project hasn't been configured with shipkit yet. "
"Offer to run /init to set up project-specific MCP servers and preferences."
)
if prompt_str:
prompt_str = init_hint + " Then: " + prompt_str
else:
prompt_str = init_hint

if prompt_str:
cmd.append(prompt_str)
cmd.extend(["--append-system-prompt", (
"IMPORTANT: This is a new project that hasn't been set up with shipkit yet. "
"Your FIRST action must be to run the /init skill to detect the tech stack "
"and configure project-specific MCP servers. Do this before anything else."
)])

# Pass user prompt if provided
if prompt:
cmd.append(" ".join(prompt))

click.echo("Launching shipkit on Claude Code...")
subprocess.run(cmd, check=False)
Expand Down
11 changes: 6 additions & 5 deletions tests/test_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,10 @@ def test_run_first_time_injects_init_hint(self, initialized_home, tmp_repo, monk

assert mock_run.called
call_args = mock_run.call_args[0][0]
# Should include init hint in the prompt
prompt_arg = call_args[-1]
assert "/init" in prompt_arg
# Should include --append-system-prompt with init hint
assert "--append-system-prompt" in call_args
hint_idx = call_args.index("--append-system-prompt") + 1
assert "/init" in call_args[hint_idx]

def test_run_existing_project_no_hint(self, initialized_home, tmp_repo, monkeypatch):
"""Test run command does NOT inject init hint for already-initialized projects."""
Expand All @@ -102,8 +103,8 @@ def test_run_existing_project_no_hint(self, initialized_home, tmp_repo, monkeypa

assert mock_run.called
call_args = mock_run.call_args[0][0]
# Should NOT include any init hint (just claude + --agent)
assert len(call_args) == 3 # claude, --agent, "shipkit v..."
# Should NOT include init hint
assert "--append-system-prompt" not in call_args

def test_run_with_prompt(self, initialized_home, tmp_repo, monkeypatch):
"""Test run command with initial prompt."""
Expand Down
Loading