Skip to content

Archive ignores ## Purpose from delta spec, writes TBD placeholder #1413

Description

@sagarsinha7777

Description

When archiving a change that creates a new main spec, the openspec archive command ignores the ## Purpose section present in the delta spec and always writes a TBD placeholder in the resulting main spec.

Steps to Reproduce

  1. Create a change: openspec new change my-change
  2. Write a delta spec with both ## Purpose and ## ADDED Requirements:
## Purpose

Ensures every delta spec includes a Purpose section so that archive produces complete main specs without TBD placeholders.

## ADDED Requirements

### Requirement: Example requirement
The system SHALL do something.

#### Scenario: Example
- **WHEN** something happens
- **THEN** result occurs
  1. Complete all artifacts and run: openspec archive my-change --yes

Expected Behavior

The resulting main spec at openspec/specs/<name>/spec.md should carry over the ## Purpose content from the delta spec.

Actual Behavior

The main spec is created with:

## Purpose
TBD - created by archiving change my-change. Update Purpose after archive.

The Purpose provided in the delta spec is discarded.

Workaround

Manually editing the main spec after every archive to replace the TBD placeholder with the intended Purpose.

Environment

  • OpenSpec CLI v1.5.0
  • macOS, Node 22

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