Problem
OpenSpec profile/workflow configuration is currently global-only, which causes cross-project coupling.
Today:
openspec config advertises only global scope
openspec update reads global config and regenerates project skills/commands from it
This means enabling/disabling workflows (e.g. sync) for one repo can unintentionally affect other repos on the same machine.
Relevant source:
src/commands/config.ts:
--scope <scope> says only global is supported
- non-global scope is rejected with:
Error: Project-local config is not yet implemented
src/core/global-config.ts: config path is global ($XDG_CONFIG_HOME / ~/.config)
src/core/update.ts: update resolves workflows from global config
Proposed Fix
Add project-scoped config support for profile/workflows with explicit precedence.
Scope model
--scope global (existing)
--scope project (new, repository-scoped)
Precedence (highest -> lowest)
- CLI flags
- Project config (
--scope project)
- Global config (
--scope global)
- Built-in defaults (
core, both)
CLI behavior
openspec config list --scope project
openspec config get <key> --scope project
openspec config set <key> <value> --scope project
openspec config profile --scope project
openspec update should use effective config from precedence above
Acceptance Criteria
Why this helps
Problem
OpenSpec profile/workflow configuration is currently global-only, which causes cross-project coupling.
Today:
openspec configadvertises only global scopeopenspec updatereads global config and regenerates project skills/commands from itThis means enabling/disabling workflows (e.g.
sync) for one repo can unintentionally affect other repos on the same machine.Relevant source:
src/commands/config.ts:--scope <scope>says only global is supportedError: Project-local config is not yet implementedsrc/core/global-config.ts: config path is global ($XDG_CONFIG_HOME/~/.config)src/core/update.ts: update resolves workflows from global configProposed Fix
Add project-scoped config support for profile/workflows with explicit precedence.
Scope model
--scope global(existing)--scope project(new, repository-scoped)Precedence (highest -> lowest)
--scope project)--scope global)core,both)CLI behavior
openspec config list --scope projectopenspec config get <key> --scope projectopenspec config set <key> <value> --scope projectopenspec config profile --scope projectopenspec updateshould use effective config from precedence aboveAcceptance Criteria
--scope projectis supported for config read/write commandsprofile,delivery, andworkflowscan be persisted in-repoopenspec updateuses project config when presentWhy this helps
--profile expandedto init compatibly with 1.1.x #779