Skip to content

Exploration: should OpenSpec stop merging specs deterministically in openspec archive? #2033

Description

@TabishB

This is an open question, not a proposal ready to implement. Please don't open a PR from this issue yet. It needs more careful thought and discussion first, and we'd like to hear from the community.

The question

openspec archive merges delta specs into main specs by matching requirement headers. We're starting to think a deterministic merge isn't realistic to support well, and that the merge belongs with an agent instead. We don't yet know what should replace it, or what that would break.

What we're seeing

Directions we're thinking about

None of these are decided. Each one has trade-offs we haven't worked through.

  1. Agent merges, CLI checks. Drop the deterministic merge. The agent updates the specs, and the CLI keeps checks that must hold. For example: specs parse, no leftover delta sections, tasks are done. Close to Proposal: prepare → agent work → validate → confirm → finalize flow for archive #1460.
  2. Sync as you go, no archive step. Spec updates become part of the task list. Each task group updates the specs it implemented, and a final task checks that everything was updated. Specs land in the same PR as the code, so there's no separate archive PR. See Exploration: OpenSpec without archive #1968, and feat(cli): archive a completed change without a separate step #1831 for a related angle.
  3. Keep the deterministic merge, fix what it matches on. For example, stable requirement IDs instead of names. This is the main option that keeps openspec archive as it is.

Open questions

  1. What breaks for people who run openspec archive from CI or scripts?
  2. If the CLI no longer merges, what can it still guarantee? Any "specs are in sync" check still has to match requirements somehow.
  3. How does this work with several changes in progress at once, or specs in a separate repo?
  4. What happens to bulk archive, and to hooks that run around archive (Feat : Add Extensible Hook Capability to OpenSpec Archive Operation #682, Feature Request: Support on_archive (post-archive hooks) in schema for custom artifact moves/copies #704, Add optional lifecycle hooks for sync and archive #1910)?
  5. Should the command be removed, kept as a plain "move to archive" step, or kept as it is?

How you can help

  • Tell us how you archive today, and whether the CLI merge has worked for you or against you.
  • Share workflows where removing it would hurt.
  • Suggest directions we've missed.

Related

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    design-reviewNeeds product/design decision

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions