Skip to content

Store-aware workflows still use repo-local main spec paths #1358

Description

@sib-kahootz

OpenSpec 1.5.0 adds support for using a registered store with --store <id>. The generated skills describe this correctly at the start, but two later instructions still assume the main specs always live in the current repository:

  • sync-specs reads and creates openspec/specs/<capability>/spec.md
  • archive-change compares delta specs against the same path before offering to sync

This is incorrect when a store is selected. In that case, the change and its main specs belong to the selected store, while the repository may also contain its own openspec/ directory.

The result can be misleading or destructive:

  • a sync can update the repository’s specs instead of the selected store’s specs;
  • the selected store can remain out of date;
  • archive can incorrectly report that specs are already synced, based on the wrong location.

The CLI already resolves the active planning location. The generated workflow instructions should use the same resolved root for main specs, for example:

<planningHome.root>\openspec\specs\<capability>\spec.md

rather than assuming:

openspec/specs/<capability>/spec.md

Suggested template changes:

  1. In sync-specs, derive both the main-spec read path and new-main-spec creation path from planningHome.root.
  2. In archive-change, use that same derived path for sync assessment.
  3. Avoid calling CLI-returned delta-spec paths “repo-local,” since they may belong to a selected store.

This preserves current repo-local behaviour while making the workflows consistent with --store <id>.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions