openspec-parallel-merge-plan.md
src/core/archive.ts:191 and src/core/archive.ts:501) rebuilds main specs by replacing entire requirement blocks with the content contained in the change delta. The delta format (src/core/parsers/requirement-blocks.ts:113) has no notion of base versions or scenario-level operations.add-windsurf-workflows) adds a Windsurf scenario under Slash Command Configuration.add-kilocode-workflows) adds a Kilo Code scenario to the same requirement, starting from the pre-Windsurf spec.buildUpdatedSpec sees a MODIFIED block for Slash Command Configuration and replaces the requirement with the four-scenario variant shipped in that change. Because that file never learned about Windsurf, the Windsurf scenario disappears.buildUpdatedSpec performs hash-map substitution of requirement blocks and cannot merge or compare individual scenarios (src/core/archive.ts:455-src/core/archive.ts:526).git merge, git rebase, or conflict markers.MODIFIED/REMOVED/RENAMED entry and write it to changes/<id>/meta.json.buildUpdatedSpec mutates specs, recompute the requirement hash from the live spec.openspec/AGENTS.md and docs so contributors know to rerun openspec change sync (see Phase 1) whenever another change lands.Outcome: We prevent data loss immediately while we work on a richer merge story.
openspec change sync <id> (or rebase).
MODIFIED block with the merged text and refresh the stored fingerprint.openspec validate should flag unresolved conflict markers or fingerprint mismatches so errors appear early in the workflow.--rewrite-scenarios helper that merges bullet lists of scenarios to reduce manual editing noise.Outcome: Contributors can safely reconcile their work with the latest spec before archiving, restoring true parallel development.
## MODIFIED Requirements + ## ADDED Scenarios / ## MODIFIED Scenarios sections nested under the requirement header.meta.json. This lets the system reason about individual scenarios.parseDeltaSpec to emit scenario-level operations in addition to requirement blocks.buildUpdatedSpec (or its replacement) to merge scenario lists, preserving order while inserting new entries in a deterministic fashion.Outcome: Most concurrent updates become commutative, drastically reducing the odds of human merges.
Requirement ID: <uuid> markers in specs so renames and moves are trackable.openspec branch scaffolding that aligns spec changes with Git branches, letting teams leverage Git’s conflict editor for the markdown IR.Outcome: OpenSpec graduates from replace-based updates to a resilient, intent-preserving spec management platform.
change sync, enhanced archive) require documentation, help text, and release notes.position metadata or deterministic alphabetical fallbacks.)meta.json file? (CLI should recreate fingerprints on demand.)--accept-outdated escape hatch for emergencies.)openspec change validate and block archive on mismatches.openspec change sync with line-based diff3 merging and conflict markers.sync before archiving.