OpenSpec icon indicating copy to clipboard operation
OpenSpec copied to clipboard

fix(init): clarify guidance when using --tools none

Open showms opened this issue 6 months ago β€’ 1 comments

Summary

This PR clarifies the success message for openspec init --tools none.

Previously, init --tools none could still show the standard workflow guidance after setup, even though no AI tool integrations were installed in that mode.

This change makes the output explicit for the --tools none case:

  • OpenSpec structure was created
  • no agent integrations were installed
  • integrations can be added later with openspec init --tools <tool>

All existing guidance for tool-configured setups remains unchanged.

Why

--tools none is a valid non-interactive setup mode when a user wants to initialize the OpenSpec project structure without installing any tool-specific skills/commands yet.

In that case, showing the normal workflow entrypoint guidance is misleading, because there is no installed tool surface to invoke.

Changes

  • update the init success message for the --tools none path
  • add test coverage for the revised output
  • keep existing configured-tool guidance unchanged

Validation

  • pnpm vitest run test/core/init.test.ts
  • pnpm build
  • pnpm vitest run test/cli-e2e/basic.test.ts

Summary by CodeRabbit

  • New Features
    • Enhanced initialization feedback: When no agent integrations are installed during setup, users now receive a message confirming the OpenSpec structure was created and instructions on how to add integrations later using the provided command.

showms avatar Jun 03 '26 01:06 showms

Review Change Stack

No actionable comments were generated in the recent review. πŸŽ‰

ℹ️ Recent review info
βš™οΈ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b5af8233-95b1-4e70-be50-e845389c6cc4

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between bc7ab26650a43384ad525de42a7f58eaa13846f5 and 5c44721754e342517f162a104f5be14aa883e22a.

πŸ“’ Files selected for processing (3)
  • src/core/init.ts
  • test/cli-e2e/basic.test.ts
  • test/core/init.test.ts

πŸ“ Walkthrough

Walkthrough

When openspec init completes with no agent tools configured, the CLI now displays a message indicating the OpenSpec structure was created but no integrations were installed, along with instructions to install tools later. Unit and e2e tests validate this behavior and confirm that the standard "Getting started" output is omitted in this case.

Changes

Empty Tools Initialization Messaging

Layer / File(s) Summary
No agent integrations installed message
src/core/init.ts
displaySuccessMessage detects when both createdTools and refreshedTools are empty and prints a message indicating OpenSpec structure was created without agent integrations, along with instructions to run openspec init --tools <tool> to install them later.
Unit and E2E test assertions for empty tools
test/core/init.test.ts, test/cli-e2e/basic.test.ts
Unit test verifies console.log calls include the "no agent integrations installed" message and the install hint while excluding the propose command path. E2E tests assert that the --tools none case includes the messaging and does not include "/opsx:propose", while the --tools claude case includes the propose command path.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • Fission-AI/OpenSpec#323: Both PRs modify displaySuccessMessage() in src/core/init.ts to change post-openspec init stdout based on tool creation/refresh state.

Suggested reviewers

  • TabishB

Poem

🐰 A bunny hops through empty tool lands,
With structure built but no commands in hand.
"Fear not!" we chirp, "install tools anew!"
Empty baskets fill up, just like we do. 🌾

πŸš₯ Pre-merge checks | βœ… 5
βœ… Passed checks (5 passed)
Check name Status Explanation
Description Check βœ… Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check βœ… Passed The PR title 'fix(init): clarify guidance when using --tools none' directly and accurately describes the main change: improving the success message guidance specifically for the --tools none scenario.
Docstring Coverage βœ… Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check βœ… Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check βœ… Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
πŸ§ͺ Generate unit tests (beta)
  • [ ] Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❀️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot] avatar Jun 03 '26 01:06 coderabbitai[bot]