fix(init): clarify guidance when using --tools none
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
initsuccess message for the--tools nonepath - add test coverage for the revised output
- keep existing configured-tool guidance unchanged
Validation
pnpm vitest run test/core/init.test.tspnpm buildpnpm 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.
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.tstest/cli-e2e/basic.test.tstest/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()insrc/core/init.tsto change post-openspec initstdout 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.
Comment @coderabbitai help to get the list of available commands and usage tips.