You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
openspec init --tools none does not create openspec/config.yaml #712
When running openspec init --tools none (e.g. when managing skills/commands externally via a global agent config), the command creates the openspec/ directory structure (changes/, specs/) but does not create an openspec/config.yaml file.
Steps to Reproduce
Run openspec init --tools none in a project
Check the openspec/ directory
Actual Behavior
openspec/
├── changes/
└── specs/
No config.yaml is created.
Expected Behavior
openspec/
├── changes/
├── specs/
└── config.yaml
config.yaml should always be created during init, regardless of the --tools setting. This file is where users define project-level configuration such as:
The --tools flag controls which AI tool integrations get set up (skills, slash commands, etc.), but config.yaml is an OpenSpec-level project config file, not a tool integration file. Its creation should not be gated by the tools selection.
Use Case
This is particularly relevant for users who manage their AI tool configuration externally (e.g., a shared/global config repo for OpenCode skills) and use --tools none because they don't need per-project tool integration files. They still need config.yaml to define their project context and schema.
The enrichment comment has been posted to issue #712. Here's a summary of the findings:
Root Cause: The canPromptInteractively() method in src/core/init.ts:141 returns false whenever --tools is provided (any value). The createConfig() method at line 496 then skips config creation when not interactive and --force isn't set. So openspec init --tools none (without --force) silently skips config.yaml.
The fix is straightforward — decouple config file creation from the interactivity check, since config.yaml is project-level configuration, not an interactive prompt artifact.
Test gap: The existing test at test/core/init.test.ts:144 masks this bug by always passing force: true alongside tools: 'none'.
Related issues:#385, #653, and #619 provide additional context but this is not a duplicate.
So when a user runs openspec init --tools none (without --force), the config file is silently skipped. The guard at line 496 was intended to prevent config creation in CI/non-interactive pipelines, but it unintentionally gates config creation on the --tools flag as well.
Relevant Files
File
Lines
Purpose
src/core/init.ts
141-145
canPromptInteractively() — returns false when --tools is provided
src/core/init.ts
485-507
createConfig() — skips creation when non-interactive and no --force
src/core/init.ts
84-122
execute() — main init flow, calls createConfig at line 118
src/cli/index.ts
93-130
CLI command definition for init
test/core/init.test.ts
144-156
Existing test for --tools none (uses force: true, masking this bug)
Suggested Fix
The createConfig() method should not be gated by canPromptInteractively(). The config file is project-level configuration, not an interactive prompt. A minimal fix:
This removes the non-interactive guard entirely — config.yaml should always be created if it doesn't already exist, regardless of interactivity or --tools selection.
If there's a reason to preserve the non-interactive guard for true CI environments (no --tools flag, piped stdin), a more targeted fix would be to decouple canPromptInteractively from the --tools flag for config purposes:
The existing test at test/core/init.test.ts:144-156 passes force: true alongside tools: 'none', which bypasses the guard. A new test case should verify config creation without--force:
it('should create config.yaml with --tools none even without --force',async()=>{constinitCommand=newInitCommand({tools: 'none'});awaitinitCommand.execute(testDir);constconfigPath=path.join(testDir,'openspec','config.yaml');expect(awaitfileExists(configPath)).toBe(true);});
Related Issues
CLI Options #385 — CLI Options: This is where --tools none was officially acknowledged by a maintainer as "skip tool configuration." The implementation may have taken this too literally, skipping project config as well.
Closing as fixed. The guard that skipped config creation for non-interactive setups was removed in the stores rework (#1190, commit a0decbe), released in v1.5.0.
Verified on current main: openspec init --tools none now produces changes/, specs/, and config.yaml. The config file no longer requires a tool entourage to show up.
Activity
21st-connector commentedon Feb 14, 2026
Task completed.
The enrichment comment has been posted to issue #712. Here's a summary of the findings:
Root Cause: The
canPromptInteractively()method insrc/core/init.ts:141returnsfalsewhenever--toolsis provided (any value). ThecreateConfig()method at line 496 then skips config creation when not interactive and--forceisn't set. Soopenspec init --tools none(without--force) silently skipsconfig.yaml.The fix is straightforward — decouple config file creation from the interactivity check, since
config.yamlis project-level configuration, not an interactive prompt artifact.Test gap: The existing test at
test/core/init.test.ts:144masks this bug by always passingforce: truealongsidetools: 'none'.Related issues: #385, #653, and #619 provide additional context but this is not a duplicate.
View full conversation
Powered by 1Code
21st-connector commentedon Feb 14, 2026
Issue Analysis
Root Cause
The bug is in
src/core/init.ts— specifically in the interaction betweencanPromptInteractively()(line 141) andcreateConfig()(line 485).When
--toolsis passed (any value, includingnone),canPromptInteractively()returnsfalse:Then in
createConfig()(line 496), config creation is skipped when not interactive and--forceis not set:So when a user runs
openspec init --tools none(without--force), the config file is silently skipped. The guard at line 496 was intended to prevent config creation in CI/non-interactive pipelines, but it unintentionally gates config creation on the--toolsflag as well.Relevant Files
src/core/init.tscanPromptInteractively()— returnsfalsewhen--toolsis providedsrc/core/init.tscreateConfig()— skips creation when non-interactive and no--forcesrc/core/init.tsexecute()— main init flow, callscreateConfigat line 118src/cli/index.tsinittest/core/init.test.ts--tools none(usesforce: true, masking this bug)Suggested Fix
The
createConfig()method should not be gated bycanPromptInteractively(). The config file is project-level configuration, not an interactive prompt. A minimal fix:This removes the non-interactive guard entirely —
config.yamlshould always be created if it doesn't already exist, regardless of interactivity or--toolsselection.If there's a reason to preserve the non-interactive guard for true CI environments (no
--toolsflag, piped stdin), a more targeted fix would be to decouplecanPromptInteractivelyfrom the--toolsflag for config purposes:Test Gap
The existing test at
test/core/init.test.ts:144-156passesforce: truealongsidetools: 'none', which bypasses the guard. A new test case should verify config creation without--force:Related Issues
--tools nonewas officially acknowledged by a maintainer as "skip tool configuration." The implementation may have taken this too literally, skipping project config as well.--tools none.--tools noneas a workaround, compounding this bug.This is not a duplicate of any existing issue.
akoi commentedon Feb 14, 2026
Quick fix is to use the
--forceflag when initialising with--tools none:openspec init --tools none --forcefix(plugins): report enablement honestly when config.yaml is absent
clay-good commentedon Jul 22, 2026
Closing as fixed. The guard that skipped config creation for non-interactive setups was removed in the stores rework (#1190, commit a0decbe), released in v1.5.0.
Verified on current main:
openspec init --tools nonenow produceschanges/,specs/, andconfig.yaml. The config file no longer requires a tool entourage to show up.